emdash 0.41.0 → 0.42.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 (1483) hide show
  1. package/dist/action-token-DBki7IT4.mjs +26 -0
  2. package/dist/action-token-DBki7IT4.mjs.map +1 -0
  3. package/dist/activation-DDuqAat2.mjs +387 -0
  4. package/dist/activation-DDuqAat2.mjs.map +1 -0
  5. package/dist/adapters-BrZxU6vM.d.mts +171 -0
  6. package/dist/adapters-BrZxU6vM.d.mts.map +1 -0
  7. package/dist/allowed-origins-CFtudhyw.mjs +116 -0
  8. package/dist/allowed-origins-CFtudhyw.mjs.map +1 -0
  9. package/dist/api/route-utils.d.mts +5 -4
  10. package/dist/api/route-utils.d.mts.map +1 -1
  11. package/dist/api/route-utils.mjs +52 -47
  12. package/dist/api/route-utils.mjs.map +1 -1
  13. package/dist/api/schemas/index.d.mts +2 -2
  14. package/dist/api/schemas/index.mjs +11 -10
  15. package/dist/api-CFQn8VLR.mjs +4973 -0
  16. package/dist/api-CFQn8VLR.mjs.map +1 -0
  17. package/dist/api-tokens-P3mAaQgr.mjs +166 -0
  18. package/dist/api-tokens-P3mAaQgr.mjs.map +1 -0
  19. package/dist/apply-C1kq5l7p.mjs +1672 -0
  20. package/dist/apply-C1kq5l7p.mjs.map +1 -0
  21. package/dist/approvals-l9sGqPmL.mjs +460 -0
  22. package/dist/approvals-l9sGqPmL.mjs.map +1 -0
  23. package/dist/artifact-fetch-CWxyELVI.mjs +659 -0
  24. package/dist/artifact-fetch-CWxyELVI.mjs.map +1 -0
  25. package/dist/astro/index.d.mts +14 -14
  26. package/dist/astro/index.d.mts.map +1 -1
  27. package/dist/astro/index.mjs +96 -546
  28. package/dist/astro/index.mjs.map +1 -1
  29. package/dist/astro/middleware/auth.d.mts +12 -12
  30. package/dist/astro/middleware/auth.mjs +10 -10
  31. package/dist/astro/middleware/media-usage-write-fence.mjs +5 -5
  32. package/dist/astro/middleware/redirect.d.mts.map +1 -1
  33. package/dist/astro/middleware/redirect.mjs +19 -9
  34. package/dist/astro/middleware/redirect.mjs.map +1 -1
  35. package/dist/astro/middleware/request-context.d.mts +2 -1
  36. package/dist/astro/middleware/request-context.d.mts.map +1 -1
  37. package/dist/astro/middleware/request-context.mjs +15 -6
  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 +12 -12
  41. package/dist/astro/middleware.mjs +114 -110
  42. package/dist/astro/middleware.mjs.map +1 -1
  43. package/dist/astro/routes/api/admin/allowed-domains/_domain_.mjs +15 -14
  44. package/dist/astro/routes/api/admin/allowed-domains/_domain_.mjs.map +1 -1
  45. package/dist/astro/routes/api/admin/allowed-domains/index.mjs +15 -14
  46. package/dist/astro/routes/api/admin/allowed-domains/index.mjs.map +1 -1
  47. package/dist/astro/routes/api/admin/api-tokens/_id_.mjs +6 -6
  48. package/dist/astro/routes/api/admin/api-tokens/index.mjs +7 -7
  49. package/dist/astro/routes/api/admin/byline-fields/_slug_/usage.mjs +7 -7
  50. package/dist/astro/routes/api/admin/byline-fields/_slug_.mjs +18 -17
  51. package/dist/astro/routes/api/admin/byline-fields/_slug_.mjs.map +1 -1
  52. package/dist/astro/routes/api/admin/byline-fields/index.mjs +18 -17
  53. package/dist/astro/routes/api/admin/byline-fields/index.mjs.map +1 -1
  54. package/dist/astro/routes/api/admin/byline-fields/reorder.mjs +18 -17
  55. package/dist/astro/routes/api/admin/byline-fields/reorder.mjs.map +1 -1
  56. package/dist/astro/routes/api/admin/bylines/_id_/index.d.mts.map +1 -1
  57. package/dist/astro/routes/api/admin/bylines/_id_/index.mjs +36 -27
  58. package/dist/astro/routes/api/admin/bylines/_id_/index.mjs.map +1 -1
  59. package/dist/astro/routes/api/admin/bylines/_id_/translations.d.mts.map +1 -1
  60. package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs +32 -26
  61. package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs.map +1 -1
  62. package/dist/astro/routes/api/admin/bylines/index.d.mts.map +1 -1
  63. package/dist/astro/routes/api/admin/bylines/index.mjs +32 -26
  64. package/dist/astro/routes/api/admin/bylines/index.mjs.map +1 -1
  65. package/dist/astro/routes/api/admin/comments/_id_/status.mjs +20 -19
  66. package/dist/astro/routes/api/admin/comments/_id_/status.mjs.map +1 -1
  67. package/dist/astro/routes/api/admin/comments/_id_.mjs +8 -8
  68. package/dist/astro/routes/api/admin/comments/bulk.mjs +19 -18
  69. package/dist/astro/routes/api/admin/comments/bulk.mjs.map +1 -1
  70. package/dist/astro/routes/api/admin/comments/counts.mjs +8 -8
  71. package/dist/astro/routes/api/admin/comments/index.mjs +19 -18
  72. package/dist/astro/routes/api/admin/comments/index.mjs.map +1 -1
  73. package/dist/astro/routes/api/admin/core-update.d.mts +8 -0
  74. package/dist/astro/routes/api/admin/core-update.d.mts.map +1 -0
  75. package/dist/astro/routes/api/admin/core-update.mjs +28 -0
  76. package/dist/astro/routes/api/admin/core-update.mjs.map +1 -0
  77. package/dist/astro/routes/api/admin/hooks/exclusive/_hookName_.mjs +6 -6
  78. package/dist/astro/routes/api/admin/hooks/exclusive/index.mjs +5 -5
  79. package/dist/astro/routes/api/admin/media-usage/activation.mjs +21 -20
  80. package/dist/astro/routes/api/admin/media-usage/activation.mjs.map +1 -1
  81. package/dist/astro/routes/api/admin/media-usage/collection-deletions/index.mjs +23 -22
  82. package/dist/astro/routes/api/admin/media-usage/collection-deletions/index.mjs.map +1 -1
  83. package/dist/astro/routes/api/admin/media-usage/collection-deletions/retry.mjs +23 -22
  84. package/dist/astro/routes/api/admin/media-usage/collection-deletions/retry.mjs.map +1 -1
  85. package/dist/astro/routes/api/admin/media-usage/progress.mjs +26 -25
  86. package/dist/astro/routes/api/admin/media-usage/progress.mjs.map +1 -1
  87. package/dist/astro/routes/api/admin/media-usage/repair.mjs +32 -31
  88. package/dist/astro/routes/api/admin/media-usage/repair.mjs.map +1 -1
  89. package/dist/astro/routes/api/admin/media-usage/work/index.mjs +23 -22
  90. package/dist/astro/routes/api/admin/media-usage/work/index.mjs.map +1 -1
  91. package/dist/astro/routes/api/admin/media-usage/work/retry.mjs +23 -22
  92. package/dist/astro/routes/api/admin/media-usage/work/retry.mjs.map +1 -1
  93. package/dist/astro/routes/api/admin/oauth-clients/_id_.mjs +6 -6
  94. package/dist/astro/routes/api/admin/oauth-clients/index.mjs +6 -6
  95. package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs +8 -8
  96. package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +8 -8
  97. package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +75 -73
  98. package/dist/astro/routes/api/admin/plugins/_id_/index.mjs.map +1 -1
  99. package/dist/astro/routes/api/admin/plugins/_id_/mcp.mjs +7 -7
  100. package/dist/astro/routes/api/admin/plugins/_id_/settings.mjs +74 -72
  101. package/dist/astro/routes/api/admin/plugins/_id_/settings.mjs.map +1 -1
  102. package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +75 -73
  103. package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs.map +1 -1
  104. package/dist/astro/routes/api/admin/plugins/_id_/update.mjs +86 -83
  105. package/dist/astro/routes/api/admin/plugins/_id_/update.mjs.map +1 -1
  106. package/dist/astro/routes/api/admin/plugins/index.mjs +75 -73
  107. package/dist/astro/routes/api/admin/plugins/index.mjs.map +1 -1
  108. package/dist/astro/routes/api/admin/plugins/marketplace/_id_/icon.d.mts.map +1 -1
  109. package/dist/astro/routes/api/admin/plugins/marketplace/_id_/icon.mjs +10 -7
  110. package/dist/astro/routes/api/admin/plugins/marketplace/_id_/icon.mjs.map +1 -1
  111. package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs +74 -72
  112. package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs.map +1 -1
  113. package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs +85 -82
  114. package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs.map +1 -1
  115. package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +74 -72
  116. package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs.map +1 -1
  117. package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.mjs +75 -73
  118. package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.mjs.map +1 -1
  119. package/dist/astro/routes/api/admin/plugins/registry/_id_/update.mjs +87 -84
  120. package/dist/astro/routes/api/admin/plugins/registry/_id_/update.mjs.map +1 -1
  121. package/dist/astro/routes/api/admin/plugins/registry/artifact.mjs +9 -9
  122. package/dist/astro/routes/api/admin/plugins/registry/install.mjs +77 -75
  123. package/dist/astro/routes/api/admin/plugins/registry/install.mjs.map +1 -1
  124. package/dist/astro/routes/api/admin/plugins/registry/publisher-handle.mjs +7 -7
  125. package/dist/astro/routes/api/admin/plugins/registry/verify.mjs +75 -73
  126. package/dist/astro/routes/api/admin/plugins/registry/verify.mjs.map +1 -1
  127. package/dist/astro/routes/api/admin/plugins/updates.mjs +74 -72
  128. package/dist/astro/routes/api/admin/plugins/updates.mjs.map +1 -1
  129. package/dist/astro/routes/api/admin/scheduled-policy-rejections/_collection_/_id_.mjs +6 -6
  130. package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +74 -72
  131. package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs.map +1 -1
  132. package/dist/astro/routes/api/admin/themes/marketplace/_id_/thumbnail.d.mts.map +1 -1
  133. package/dist/astro/routes/api/admin/themes/marketplace/_id_/thumbnail.mjs +10 -7
  134. package/dist/astro/routes/api/admin/themes/marketplace/_id_/thumbnail.mjs.map +1 -1
  135. package/dist/astro/routes/api/admin/themes/marketplace/index.mjs +74 -72
  136. package/dist/astro/routes/api/admin/themes/marketplace/index.mjs.map +1 -1
  137. package/dist/astro/routes/api/admin/transfer/_...path_.mjs +4 -4
  138. package/dist/astro/routes/api/admin/transfer/approvals/_id_/approve.mjs +42 -41
  139. package/dist/astro/routes/api/admin/transfer/approvals/_id_/approve.mjs.map +1 -1
  140. package/dist/astro/routes/api/admin/transfer/approvals/_id_/deny.mjs +42 -41
  141. package/dist/astro/routes/api/admin/transfer/approvals/_id_/deny.mjs.map +1 -1
  142. package/dist/astro/routes/api/admin/transfer/approvals/index.mjs +44 -43
  143. package/dist/astro/routes/api/admin/transfer/approvals/index.mjs.map +1 -1
  144. package/dist/astro/routes/api/admin/transfer/capabilities.mjs +44 -43
  145. package/dist/astro/routes/api/admin/transfer/capabilities.mjs.map +1 -1
  146. package/dist/astro/routes/api/admin/transfer/exports/_id_/advance.mjs +44 -43
  147. package/dist/astro/routes/api/admin/transfer/exports/_id_/advance.mjs.map +1 -1
  148. package/dist/astro/routes/api/admin/transfer/exports/_id_/archive.mjs +45 -44
  149. package/dist/astro/routes/api/admin/transfer/exports/_id_/archive.mjs.map +1 -1
  150. package/dist/astro/routes/api/admin/transfer/exports/_id_/files/_...path_.mjs +45 -44
  151. package/dist/astro/routes/api/admin/transfer/exports/_id_/files/_...path_.mjs.map +1 -1
  152. package/dist/astro/routes/api/admin/transfer/exports/_id_/index.mjs +44 -43
  153. package/dist/astro/routes/api/admin/transfer/exports/_id_/index.mjs.map +1 -1
  154. package/dist/astro/routes/api/admin/transfer/exports/_id_/manifest.mjs +45 -44
  155. package/dist/astro/routes/api/admin/transfer/exports/_id_/manifest.mjs.map +1 -1
  156. package/dist/astro/routes/api/admin/transfer/exports/index.mjs +46 -45
  157. package/dist/astro/routes/api/admin/transfer/exports/index.mjs.map +1 -1
  158. package/dist/astro/routes/api/admin/transfer/imports/_id_/abandon.mjs +44 -43
  159. package/dist/astro/routes/api/admin/transfer/imports/_id_/abandon.mjs.map +1 -1
  160. package/dist/astro/routes/api/admin/transfer/imports/_id_/advance.mjs +44 -43
  161. package/dist/astro/routes/api/admin/transfer/imports/_id_/advance.mjs.map +1 -1
  162. package/dist/astro/routes/api/admin/transfer/imports/_id_/analyze.mjs +46 -45
  163. package/dist/astro/routes/api/admin/transfer/imports/_id_/analyze.mjs.map +1 -1
  164. package/dist/astro/routes/api/admin/transfer/imports/_id_/cancel.mjs +44 -43
  165. package/dist/astro/routes/api/admin/transfer/imports/_id_/cancel.mjs.map +1 -1
  166. package/dist/astro/routes/api/admin/transfer/imports/_id_/execute.mjs +46 -45
  167. package/dist/astro/routes/api/admin/transfer/imports/_id_/execute.mjs.map +1 -1
  168. package/dist/astro/routes/api/admin/transfer/imports/_id_/files/_...path_.mjs +44 -43
  169. package/dist/astro/routes/api/admin/transfer/imports/_id_/files/_...path_.mjs.map +1 -1
  170. package/dist/astro/routes/api/admin/transfer/imports/_id_/index.mjs +44 -43
  171. package/dist/astro/routes/api/admin/transfer/imports/_id_/index.mjs.map +1 -1
  172. package/dist/astro/routes/api/admin/transfer/imports/_id_/missing.mjs +46 -45
  173. package/dist/astro/routes/api/admin/transfer/imports/_id_/missing.mjs.map +1 -1
  174. package/dist/astro/routes/api/admin/transfer/imports/_id_/plan.mjs +44 -43
  175. package/dist/astro/routes/api/admin/transfer/imports/_id_/plan.mjs.map +1 -1
  176. package/dist/astro/routes/api/admin/transfer/imports/_id_/receipt.mjs +44 -43
  177. package/dist/astro/routes/api/admin/transfer/imports/_id_/receipt.mjs.map +1 -1
  178. package/dist/astro/routes/api/admin/transfer/imports/index.mjs +46 -45
  179. package/dist/astro/routes/api/admin/transfer/imports/index.mjs.map +1 -1
  180. package/dist/astro/routes/api/admin/users/_id_/disable.mjs +5 -5
  181. package/dist/astro/routes/api/admin/users/_id_/enable.mjs +4 -4
  182. package/dist/astro/routes/api/admin/users/_id_/index.mjs +16 -15
  183. package/dist/astro/routes/api/admin/users/_id_/index.mjs.map +1 -1
  184. package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs +6 -6
  185. package/dist/astro/routes/api/admin/users/index.mjs +15 -14
  186. package/dist/astro/routes/api/admin/users/index.mjs.map +1 -1
  187. package/dist/astro/routes/api/auth/dev-bypass.mjs +6 -6
  188. package/dist/astro/routes/api/auth/invite/accept.mjs +4 -4
  189. package/dist/astro/routes/api/auth/invite/complete.d.mts.map +1 -1
  190. package/dist/astro/routes/api/auth/invite/complete.mjs +23 -19
  191. package/dist/astro/routes/api/auth/invite/complete.mjs.map +1 -1
  192. package/dist/astro/routes/api/auth/invite/index.mjs +17 -16
  193. package/dist/astro/routes/api/auth/invite/index.mjs.map +1 -1
  194. package/dist/astro/routes/api/auth/invite/register-options.mjs +18 -17
  195. package/dist/astro/routes/api/auth/invite/register-options.mjs.map +1 -1
  196. package/dist/astro/routes/api/auth/logout.mjs +5 -5
  197. package/dist/astro/routes/api/auth/magic-link/send.mjs +19 -18
  198. package/dist/astro/routes/api/auth/magic-link/send.mjs.map +1 -1
  199. package/dist/astro/routes/api/auth/magic-link/verify.d.mts.map +1 -1
  200. package/dist/astro/routes/api/auth/magic-link/verify.mjs +19 -15
  201. package/dist/astro/routes/api/auth/magic-link/verify.mjs.map +1 -1
  202. package/dist/astro/routes/api/auth/me.mjs +16 -15
  203. package/dist/astro/routes/api/auth/me.mjs.map +1 -1
  204. package/dist/astro/routes/api/auth/mode.mjs +5 -5
  205. package/dist/astro/routes/api/auth/oauth/_provider_/callback.d.mts.map +1 -1
  206. package/dist/astro/routes/api/auth/oauth/_provider_/callback.mjs +13 -4
  207. package/dist/astro/routes/api/auth/oauth/_provider_/callback.mjs.map +1 -1
  208. package/dist/astro/routes/api/auth/oauth/_provider_.mjs +2 -2
  209. package/dist/astro/routes/api/auth/passkey/_id_.mjs +15 -14
  210. package/dist/astro/routes/api/auth/passkey/_id_.mjs.map +1 -1
  211. package/dist/astro/routes/api/auth/passkey/index.mjs +4 -4
  212. package/dist/astro/routes/api/auth/passkey/options.mjs +20 -19
  213. package/dist/astro/routes/api/auth/passkey/options.mjs.map +1 -1
  214. package/dist/astro/routes/api/auth/passkey/register/options.mjs +18 -17
  215. package/dist/astro/routes/api/auth/passkey/register/options.mjs.map +1 -1
  216. package/dist/astro/routes/api/auth/passkey/register/verify.mjs +19 -18
  217. package/dist/astro/routes/api/auth/passkey/register/verify.mjs.map +1 -1
  218. package/dist/astro/routes/api/auth/passkey/verify.d.mts.map +1 -1
  219. package/dist/astro/routes/api/auth/passkey/verify.mjs +23 -19
  220. package/dist/astro/routes/api/auth/passkey/verify.mjs.map +1 -1
  221. package/dist/astro/routes/api/auth/signup/complete.d.mts.map +1 -1
  222. package/dist/astro/routes/api/auth/signup/complete.mjs +23 -19
  223. package/dist/astro/routes/api/auth/signup/complete.mjs.map +1 -1
  224. package/dist/astro/routes/api/auth/signup/request.mjs +18 -17
  225. package/dist/astro/routes/api/auth/signup/request.mjs.map +1 -1
  226. package/dist/astro/routes/api/auth/signup/verify.mjs +4 -4
  227. package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs +13 -13
  228. package/dist/astro/routes/api/comments/_collection_/_contentId_/reactions.mjs +20 -19
  229. package/dist/astro/routes/api/comments/_collection_/_contentId_/reactions.mjs.map +1 -1
  230. package/dist/astro/routes/api/content/_collection_/_id_/compare.mjs +5 -5
  231. package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs +18 -17
  232. package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs.map +1 -1
  233. package/dist/astro/routes/api/content/_collection_/_id_/duplicate.mjs +5 -5
  234. package/dist/astro/routes/api/content/_collection_/_id_/lock.mjs +18 -17
  235. package/dist/astro/routes/api/content/_collection_/_id_/lock.mjs.map +1 -1
  236. package/dist/astro/routes/api/content/_collection_/_id_/permanent.mjs +5 -5
  237. package/dist/astro/routes/api/content/_collection_/_id_/plugin-extensions/_pluginId_/_kind_/_extensionId_.mjs +12 -11
  238. package/dist/astro/routes/api/content/_collection_/_id_/plugin-extensions/_pluginId_/_kind_/_extensionId_.mjs.map +1 -1
  239. package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs +33 -32
  240. package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs.map +1 -1
  241. package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs +18 -17
  242. package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs.map +1 -1
  243. package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/children.mjs +36 -35
  244. package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/children.mjs.map +1 -1
  245. package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/parents.mjs +36 -35
  246. package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/parents.mjs.map +1 -1
  247. package/dist/astro/routes/api/content/_collection_/_id_/restore.mjs +5 -5
  248. package/dist/astro/routes/api/content/_collection_/_id_/revisions.mjs +5 -5
  249. package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs +18 -17
  250. package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs.map +1 -1
  251. package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs +27 -26
  252. package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs.map +1 -1
  253. package/dist/astro/routes/api/content/_collection_/_id_/translations.mjs +5 -5
  254. package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs +18 -17
  255. package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs.map +1 -1
  256. package/dist/astro/routes/api/content/_collection_/_id_.mjs +18 -17
  257. package/dist/astro/routes/api/content/_collection_/_id_.mjs.map +1 -1
  258. package/dist/astro/routes/api/content/_collection_/authors.mjs +5 -5
  259. package/dist/astro/routes/api/content/_collection_/index.mjs +16 -15
  260. package/dist/astro/routes/api/content/_collection_/index.mjs.map +1 -1
  261. package/dist/astro/routes/api/content/_collection_/trash.mjs +16 -15
  262. package/dist/astro/routes/api/content/_collection_/trash.mjs.map +1 -1
  263. package/dist/astro/routes/api/dashboard.mjs +13 -11
  264. package/dist/astro/routes/api/dashboard.mjs.map +1 -1
  265. package/dist/astro/routes/api/dev/emails.mjs +5 -5
  266. package/dist/astro/routes/api/health.mjs +6 -6
  267. package/dist/astro/routes/api/import/probe.d.mts +3 -3
  268. package/dist/astro/routes/api/import/probe.mjs +25 -24
  269. package/dist/astro/routes/api/import/probe.mjs.map +1 -1
  270. package/dist/astro/routes/api/import/wordpress/analyze.mjs +6 -6
  271. package/dist/astro/routes/api/import/wordpress/execute.d.mts +14 -14
  272. package/dist/astro/routes/api/import/wordpress/execute.d.mts.map +1 -1
  273. package/dist/astro/routes/api/import/wordpress/execute.mjs +167 -21
  274. package/dist/astro/routes/api/import/wordpress/execute.mjs.map +1 -1
  275. package/dist/astro/routes/api/import/wordpress/media.d.mts +12 -12
  276. package/dist/astro/routes/api/import/wordpress/media.mjs +20 -19
  277. package/dist/astro/routes/api/import/wordpress/media.mjs.map +1 -1
  278. package/dist/astro/routes/api/import/wordpress/prepare.mjs +19 -18
  279. package/dist/astro/routes/api/import/wordpress/prepare.mjs.map +1 -1
  280. package/dist/astro/routes/api/import/wordpress/rewrite-urls.d.mts +13 -13
  281. package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs +29 -28
  282. package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs.map +1 -1
  283. package/dist/astro/routes/api/import/wordpress-plugin/analyze.d.mts +1 -1
  284. package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs +25 -24
  285. package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs.map +1 -1
  286. package/dist/astro/routes/api/import/wordpress-plugin/execute.d.mts +13 -13
  287. package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs +36 -35
  288. package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs.map +1 -1
  289. package/dist/astro/routes/api/manifest.mjs +6 -6
  290. package/dist/astro/routes/api/mcp.mjs +167 -110
  291. package/dist/astro/routes/api/mcp.mjs.map +1 -1
  292. package/dist/astro/routes/api/media/_id_/confirm.mjs +20 -19
  293. package/dist/astro/routes/api/media/_id_/confirm.mjs.map +1 -1
  294. package/dist/astro/routes/api/media/_id_/replace.mjs +17 -16
  295. package/dist/astro/routes/api/media/_id_/replace.mjs.map +1 -1
  296. package/dist/astro/routes/api/media/_id_/upload.mjs +9 -9
  297. package/dist/astro/routes/api/media/_id_/usage.mjs +34 -33
  298. package/dist/astro/routes/api/media/_id_/usage.mjs.map +1 -1
  299. package/dist/astro/routes/api/media/_id_.mjs +32 -31
  300. package/dist/astro/routes/api/media/_id_.mjs.map +1 -1
  301. package/dist/astro/routes/api/media/asset/_id_/_filename_.mjs +6 -6
  302. package/dist/astro/routes/api/media/file/_...key_.mjs +9 -9
  303. package/dist/astro/routes/api/media/folders/_id_.mjs +17 -16
  304. package/dist/astro/routes/api/media/folders/_id_.mjs.map +1 -1
  305. package/dist/astro/routes/api/media/folders/index.mjs +17 -16
  306. package/dist/astro/routes/api/media/folders/index.mjs.map +1 -1
  307. package/dist/astro/routes/api/media/providers/_providerId_/_itemId_.mjs +5 -5
  308. package/dist/astro/routes/api/media/providers/_providerId_/index.mjs +5 -5
  309. package/dist/astro/routes/api/media/providers/index.mjs +5 -5
  310. package/dist/astro/routes/api/media/upload-url.mjs +19 -18
  311. package/dist/astro/routes/api/media/upload-url.mjs.map +1 -1
  312. package/dist/astro/routes/api/media.mjs +36 -35
  313. package/dist/astro/routes/api/media.mjs.map +1 -1
  314. package/dist/astro/routes/api/menus/_name_/items/_id_.mjs +19 -18
  315. package/dist/astro/routes/api/menus/_name_/items/_id_.mjs.map +1 -1
  316. package/dist/astro/routes/api/menus/_name_/items.mjs +19 -18
  317. package/dist/astro/routes/api/menus/_name_/items.mjs.map +1 -1
  318. package/dist/astro/routes/api/menus/_name_/reorder.mjs +19 -18
  319. package/dist/astro/routes/api/menus/_name_/reorder.mjs.map +1 -1
  320. package/dist/astro/routes/api/menus/_name_/translations.mjs +19 -18
  321. package/dist/astro/routes/api/menus/_name_/translations.mjs.map +1 -1
  322. package/dist/astro/routes/api/menus/_name_.mjs +19 -18
  323. package/dist/astro/routes/api/menus/_name_.mjs.map +1 -1
  324. package/dist/astro/routes/api/menus/index.mjs +19 -18
  325. package/dist/astro/routes/api/menus/index.mjs.map +1 -1
  326. package/dist/astro/routes/api/oauth/authorize.mjs +6 -6
  327. package/dist/astro/routes/api/oauth/device/authorize.mjs +8 -8
  328. package/dist/astro/routes/api/oauth/device/code.mjs +11 -11
  329. package/dist/astro/routes/api/oauth/device/token.mjs +10 -10
  330. package/dist/astro/routes/api/oauth/register.d.mts.map +1 -1
  331. package/dist/astro/routes/api/oauth/register.mjs +15 -7
  332. package/dist/astro/routes/api/oauth/register.mjs.map +1 -1
  333. package/dist/astro/routes/api/oauth/token/refresh.mjs +8 -8
  334. package/dist/astro/routes/api/oauth/token/revoke.mjs +8 -8
  335. package/dist/astro/routes/api/oauth/token.mjs +8 -8
  336. package/dist/astro/routes/api/openapi.json.mjs +21 -20
  337. package/dist/astro/routes/api/openapi.json.mjs.map +1 -1
  338. package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs +12 -11
  339. package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs.map +1 -1
  340. package/dist/astro/routes/api/redirects/404s/index.mjs +20 -19
  341. package/dist/astro/routes/api/redirects/404s/index.mjs.map +1 -1
  342. package/dist/astro/routes/api/redirects/404s/summary.mjs +20 -19
  343. package/dist/astro/routes/api/redirects/404s/summary.mjs.map +1 -1
  344. package/dist/astro/routes/api/redirects/_id_.mjs +20 -19
  345. package/dist/astro/routes/api/redirects/_id_.mjs.map +1 -1
  346. package/dist/astro/routes/api/redirects/index.mjs +20 -19
  347. package/dist/astro/routes/api/redirects/index.mjs.map +1 -1
  348. package/dist/astro/routes/api/relations/_id_/index.mjs +36 -35
  349. package/dist/astro/routes/api/relations/_id_/index.mjs.map +1 -1
  350. package/dist/astro/routes/api/relations/index.mjs +36 -35
  351. package/dist/astro/routes/api/relations/index.mjs.map +1 -1
  352. package/dist/astro/routes/api/revisions/_revisionId_/index.mjs +5 -5
  353. package/dist/astro/routes/api/revisions/_revisionId_/restore.d.mts.map +1 -1
  354. package/dist/astro/routes/api/revisions/_revisionId_/restore.mjs +26 -6
  355. package/dist/astro/routes/api/revisions/_revisionId_/restore.mjs.map +1 -1
  356. package/dist/astro/routes/api/schema/block-types/_slug_/index.mjs +74 -72
  357. package/dist/astro/routes/api/schema/block-types/_slug_/index.mjs.map +1 -1
  358. package/dist/astro/routes/api/schema/block-types/_slug_/versions/_version_/activate.mjs +74 -72
  359. package/dist/astro/routes/api/schema/block-types/_slug_/versions/_version_/activate.mjs.map +1 -1
  360. package/dist/astro/routes/api/schema/block-types/index.mjs +74 -72
  361. package/dist/astro/routes/api/schema/block-types/index.mjs.map +1 -1
  362. package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs +74 -72
  363. package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs.map +1 -1
  364. package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs +74 -72
  365. package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs.map +1 -1
  366. package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs +74 -72
  367. package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs.map +1 -1
  368. package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +74 -72
  369. package/dist/astro/routes/api/schema/collections/_slug_/index.mjs.map +1 -1
  370. package/dist/astro/routes/api/schema/collections/index.mjs +74 -72
  371. package/dist/astro/routes/api/schema/collections/index.mjs.map +1 -1
  372. package/dist/astro/routes/api/schema/collections/reorder.mjs +74 -72
  373. package/dist/astro/routes/api/schema/collections/reorder.mjs.map +1 -1
  374. package/dist/astro/routes/api/schema/index.mjs +17 -16
  375. package/dist/astro/routes/api/schema/index.mjs.map +1 -1
  376. package/dist/astro/routes/api/schema/orphans/_slug_.mjs +74 -72
  377. package/dist/astro/routes/api/schema/orphans/_slug_.mjs.map +1 -1
  378. package/dist/astro/routes/api/schema/orphans/index.mjs +74 -72
  379. package/dist/astro/routes/api/schema/orphans/index.mjs.map +1 -1
  380. package/dist/astro/routes/api/search/enable.mjs +20 -19
  381. package/dist/astro/routes/api/search/enable.mjs.map +1 -1
  382. package/dist/astro/routes/api/search/index.mjs +19 -18
  383. package/dist/astro/routes/api/search/index.mjs.map +1 -1
  384. package/dist/astro/routes/api/search/rebuild.mjs +20 -19
  385. package/dist/astro/routes/api/search/rebuild.mjs.map +1 -1
  386. package/dist/astro/routes/api/search/stats.mjs +9 -9
  387. package/dist/astro/routes/api/search/suggest.mjs +19 -18
  388. package/dist/astro/routes/api/search/suggest.mjs.map +1 -1
  389. package/dist/astro/routes/api/sections/_slug_.mjs +19 -18
  390. package/dist/astro/routes/api/sections/_slug_.mjs.map +1 -1
  391. package/dist/astro/routes/api/sections/index.mjs +19 -18
  392. package/dist/astro/routes/api/sections/index.mjs.map +1 -1
  393. package/dist/astro/routes/api/settings/backups/archives/_name_.mjs +7 -7
  394. package/dist/astro/routes/api/settings/backups/archives/index.mjs +7 -7
  395. package/dist/astro/routes/api/settings/backups/export.mjs +7 -7
  396. package/dist/astro/routes/api/settings/backups/index.mjs +8 -8
  397. package/dist/astro/routes/api/settings/email.mjs +6 -6
  398. package/dist/astro/routes/api/settings.mjs +23 -22
  399. package/dist/astro/routes/api/settings.mjs.map +1 -1
  400. package/dist/astro/routes/api/setup/admin-verify.d.mts.map +1 -1
  401. package/dist/astro/routes/api/setup/admin-verify.mjs +26 -24
  402. package/dist/astro/routes/api/setup/admin-verify.mjs.map +1 -1
  403. package/dist/astro/routes/api/setup/admin.mjs +19 -18
  404. package/dist/astro/routes/api/setup/admin.mjs.map +1 -1
  405. package/dist/astro/routes/api/setup/dev-bypass.mjs +47 -46
  406. package/dist/astro/routes/api/setup/dev-bypass.mjs.map +1 -1
  407. package/dist/astro/routes/api/setup/dev-reset.mjs +4 -4
  408. package/dist/astro/routes/api/setup/index.mjs +52 -51
  409. package/dist/astro/routes/api/setup/index.mjs.map +1 -1
  410. package/dist/astro/routes/api/setup/status.mjs +6 -6
  411. package/dist/astro/routes/api/snapshot.mjs +8 -8
  412. package/dist/astro/routes/api/taxonomies/_name_/reorder.mjs +25 -24
  413. package/dist/astro/routes/api/taxonomies/_name_/reorder.mjs.map +1 -1
  414. package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs +25 -24
  415. package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs.map +1 -1
  416. package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs +25 -24
  417. package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs.map +1 -1
  418. package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs +25 -24
  419. package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs.map +1 -1
  420. package/dist/astro/routes/api/taxonomies/_name_/translations.mjs +24 -23
  421. package/dist/astro/routes/api/taxonomies/_name_/translations.mjs.map +1 -1
  422. package/dist/astro/routes/api/taxonomies/_name_.mjs +25 -24
  423. package/dist/astro/routes/api/taxonomies/_name_.mjs.map +1 -1
  424. package/dist/astro/routes/api/taxonomies/bulk-tag.mjs +42 -41
  425. package/dist/astro/routes/api/taxonomies/bulk-tag.mjs.map +1 -1
  426. package/dist/astro/routes/api/taxonomies/index.mjs +25 -24
  427. package/dist/astro/routes/api/taxonomies/index.mjs.map +1 -1
  428. package/dist/astro/routes/api/themes/preview.mjs +6 -6
  429. package/dist/astro/routes/api/typegen.d.mts.map +1 -1
  430. package/dist/astro/routes/api/typegen.mjs +8 -39
  431. package/dist/astro/routes/api/typegen.mjs.map +1 -1
  432. package/dist/astro/routes/api/visual-editing/action-token.mjs +6 -6
  433. package/dist/astro/routes/api/visual-editing/content/_collection_/_id_/publish.mjs +20 -19
  434. package/dist/astro/routes/api/visual-editing/content/_collection_/_id_/publish.mjs.map +1 -1
  435. package/dist/astro/routes/api/visual-editing/toolbar-labels.mjs +4 -4
  436. package/dist/astro/routes/api/well-known/auth.mjs +1 -1
  437. package/dist/astro/routes/api/well-known/oauth-authorization-server.mjs +2 -2
  438. package/dist/astro/routes/api/well-known/oauth-protected-resource.mjs +2 -2
  439. package/dist/astro/routes/api/widget-areas/_name_/reorder.mjs +17 -16
  440. package/dist/astro/routes/api/widget-areas/_name_/reorder.mjs.map +1 -1
  441. package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs +20 -19
  442. package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs.map +1 -1
  443. package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs +20 -19
  444. package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs.map +1 -1
  445. package/dist/astro/routes/api/widget-areas/_name_.mjs +9 -9
  446. package/dist/astro/routes/api/widget-areas/index.mjs +20 -19
  447. package/dist/astro/routes/api/widget-areas/index.mjs.map +1 -1
  448. package/dist/astro/routes/api/widget-components.mjs +5 -5
  449. package/dist/astro/routes/robots.txt.mjs +7 -7
  450. package/dist/astro/routes/sitemap-_collection_.xml.mjs +10 -10
  451. package/dist/astro/routes/sitemap.xml.mjs +8 -8
  452. package/dist/astro/types.d.mts +23 -17
  453. package/dist/astro/types.d.mts.map +1 -1
  454. package/dist/audit-BszbE_BP.mjs +127 -0
  455. package/dist/audit-BszbE_BP.mjs.map +1 -0
  456. package/dist/auth/providers/github.d.mts +1 -1
  457. package/dist/auth/providers/google.d.mts +1 -1
  458. package/dist/authoritative-records-dSvXCfzb.mjs +5172 -0
  459. package/dist/authoritative-records-dSvXCfzb.mjs.map +1 -0
  460. package/dist/authorize-soZXK7U0.mjs +49 -0
  461. package/dist/authorize-soZXK7U0.mjs.map +1 -0
  462. package/dist/backup-DQ3CABsO.mjs +246 -0
  463. package/dist/backup-DQ3CABsO.mjs.map +1 -0
  464. package/dist/block-types-DIG_KZwi.mjs +132 -0
  465. package/dist/block-types-DIG_KZwi.mjs.map +1 -0
  466. package/dist/block-values-BrTrtA-v.mjs +175 -0
  467. package/dist/block-values-BrTrtA-v.mjs.map +1 -0
  468. package/dist/byline-02tu_Uc-.mjs +909 -0
  469. package/dist/byline-02tu_Uc-.mjs.map +1 -0
  470. package/dist/byline-fields-B01Txzyx.mjs +123 -0
  471. package/dist/byline-fields-B01Txzyx.mjs.map +1 -0
  472. package/dist/byline-fields-DHJs0Mja.mjs +280 -0
  473. package/dist/byline-fields-DHJs0Mja.mjs.map +1 -0
  474. package/dist/byline-registry-dvt4N3xV.mjs +406 -0
  475. package/dist/byline-registry-dvt4N3xV.mjs.map +1 -0
  476. package/dist/bylines-COTwmMBF.mjs +150 -0
  477. package/dist/bylines-COTwmMBF.mjs.map +1 -0
  478. package/dist/bylines-D_S8UKRX.mjs +214 -0
  479. package/dist/bylines-D_S8UKRX.mjs.map +1 -0
  480. package/dist/cache-CPanL9IO.mjs +114 -0
  481. package/dist/cache-CPanL9IO.mjs.map +1 -0
  482. package/dist/canonical-CAecl1UQ.mjs +174 -0
  483. package/dist/canonical-CAecl1UQ.mjs.map +1 -0
  484. package/dist/capture-triggers-CdZfvHtF.mjs +362 -0
  485. package/dist/capture-triggers-CdZfvHtF.mjs.map +1 -0
  486. package/dist/challenge-store-CxZxPqaw.mjs +51 -0
  487. package/dist/challenge-store-CxZxPqaw.mjs.map +1 -0
  488. package/dist/checksum-DtH6m5uk.mjs +162 -0
  489. package/dist/checksum-DtH6m5uk.mjs.map +1 -0
  490. package/dist/chrome-tags-CKELm-bo.mjs +24 -0
  491. package/dist/chrome-tags-CKELm-bo.mjs.map +1 -0
  492. package/dist/chunks-DBmkKmBH.mjs +25 -0
  493. package/dist/chunks-DBmkKmBH.mjs.map +1 -0
  494. package/dist/cli/index.mjs +58 -911
  495. package/dist/cli/index.mjs.map +1 -1
  496. package/dist/client/cf-access.d.mts +1 -1
  497. package/dist/client/index.d.mts +39 -34
  498. package/dist/client/index.d.mts.map +1 -1
  499. package/dist/client/index.mjs +8 -3
  500. package/dist/client/index.mjs.map +1 -1
  501. package/dist/collection-deletion-JecE26cS.mjs +436 -0
  502. package/dist/collection-deletion-JecE26cS.mjs.map +1 -0
  503. package/dist/collection-deletion-processor-DgCfF3a1.mjs +217 -0
  504. package/dist/collection-deletion-processor-DgCfF3a1.mjs.map +1 -0
  505. package/dist/collection-slugs-cache-BNRAPNiu.mjs +85 -0
  506. package/dist/collection-slugs-cache-BNRAPNiu.mjs.map +1 -0
  507. package/dist/comment-Cq1UYN8_.mjs +313 -0
  508. package/dist/comment-Cq1UYN8_.mjs.map +1 -0
  509. package/dist/comment-reaction-DPeGAfjd.mjs +85 -0
  510. package/dist/comment-reaction-DPeGAfjd.mjs.map +1 -0
  511. package/dist/comments-BRtp992B.mjs +99 -0
  512. package/dist/comments-BRtp992B.mjs.map +1 -0
  513. package/dist/comments-Bi2j9IoX.mjs +195 -0
  514. package/dist/comments-Bi2j9IoX.mjs.map +1 -0
  515. package/dist/components-CQY-Sgm-.mjs +108 -0
  516. package/dist/components-CQY-Sgm-.mjs.map +1 -0
  517. package/dist/config-BnuORwSP.mjs +242 -0
  518. package/dist/config-BnuORwSP.mjs.map +1 -0
  519. package/dist/config-CDmPF4p7.d.mts +39 -0
  520. package/dist/config-CDmPF4p7.d.mts.map +1 -0
  521. package/dist/config-DHsDMpXc.d.mts +6707 -0
  522. package/dist/config-DHsDMpXc.d.mts.map +1 -0
  523. package/dist/connection-B9pIasFd.mjs +36 -0
  524. package/dist/connection-B9pIasFd.mjs.map +1 -0
  525. package/dist/content-RzEXY3QX.mjs +2020 -0
  526. package/dist/content-RzEXY3QX.mjs.map +1 -0
  527. package/dist/content-list-query-CnXfe1Nu.d.mts +26 -0
  528. package/dist/content-list-query-CnXfe1Nu.d.mts.map +1 -0
  529. package/dist/content-policy-Dm32n9C6.mjs +46 -0
  530. package/dist/content-policy-Dm32n9C6.mjs.map +1 -0
  531. package/dist/content-repair-B-k5JrVN.mjs +442 -0
  532. package/dist/content-repair-B-k5JrVN.mjs.map +1 -0
  533. package/dist/context-CtRvoSAj.mjs +2026 -0
  534. package/dist/context-CtRvoSAj.mjs.map +1 -0
  535. package/dist/credits-CAFPFhuk.mjs +110 -0
  536. package/dist/credits-CAFPFhuk.mjs.map +1 -0
  537. package/dist/cron-xe5XKqA-.mjs +306 -0
  538. package/dist/cron-xe5XKqA-.mjs.map +1 -0
  539. package/dist/dashboard-BoV4pwPP.mjs +151 -0
  540. package/dist/dashboard-BoV4pwPP.mjs.map +1 -0
  541. package/dist/db/index.d.mts +3 -3
  542. package/dist/db/index.mjs +1 -1
  543. package/dist/db/libsql-migrations.d.mts +1 -1
  544. package/dist/db/libsql-migrations.mjs +4 -4
  545. package/dist/db/libsql.d.mts +1 -1
  546. package/dist/db/postgres-migrations.d.mts +1 -1
  547. package/dist/db/postgres-migrations.mjs +4 -4
  548. package/dist/db/postgres.d.mts +1 -1
  549. package/dist/db/sqlite-migrations.d.mts +1 -1
  550. package/dist/db/sqlite-migrations.mjs +4 -4
  551. package/dist/db/sqlite.d.mts +1 -1
  552. package/dist/db/sqlite.mjs +1 -1
  553. package/dist/default-DaoYyFRS.mjs +81 -0
  554. package/dist/default-DaoYyFRS.mjs.map +1 -0
  555. package/dist/deferred-tasks-OBADxoFf.d.mts +9 -0
  556. package/dist/deferred-tasks-OBADxoFf.d.mts.map +1 -0
  557. package/dist/destination-r2zIAZ2S.mjs +18 -0
  558. package/dist/destination-r2zIAZ2S.mjs.map +1 -0
  559. package/dist/dev-typegen-8JlYYFno.mjs +29 -0
  560. package/dist/dev-typegen-8JlYYFno.mjs.map +1 -0
  561. package/dist/device-flow-CzKi6tID.mjs +521 -0
  562. package/dist/device-flow-CzKi6tID.mjs.map +1 -0
  563. package/dist/digest-DiYAoZpf.mjs +194 -0
  564. package/dist/digest-DiYAoZpf.mjs.map +1 -0
  565. package/dist/direct-executor-CsEmH_2m.mjs +104 -0
  566. package/dist/direct-executor-CsEmH_2m.mjs.map +1 -0
  567. package/dist/dist-Cfu8mMBs.mjs +810 -0
  568. package/dist/dist-Cfu8mMBs.mjs.map +1 -0
  569. package/dist/email-console-DmqVF5J_.mjs +50 -0
  570. package/dist/email-console-DmqVF5J_.mjs.map +1 -0
  571. package/dist/email-locale-B5OjmAj_.mjs +25 -0
  572. package/dist/email-locale-B5OjmAj_.mjs.map +1 -0
  573. package/dist/emdash-runtime-CMdYH2Of.mjs +4229 -0
  574. package/dist/emdash-runtime-CMdYH2Of.mjs.map +1 -0
  575. package/dist/enrich-BDdVNeDK.mjs +194 -0
  576. package/dist/enrich-BDdVNeDK.mjs.map +1 -0
  577. package/dist/entry-lock-B-1bUDxX.d.mts +4544 -0
  578. package/dist/entry-lock-B-1bUDxX.d.mts.map +1 -0
  579. package/dist/entry-lock-B5eaZEZP.mjs +163 -0
  580. package/dist/entry-lock-B5eaZEZP.mjs.map +1 -0
  581. package/dist/entry-lock-PP1JCXBB.mjs +1180 -0
  582. package/dist/entry-lock-PP1JCXBB.mjs.map +1 -0
  583. package/dist/entry-locks-DJAqVweV.mjs +167 -0
  584. package/dist/entry-locks-DJAqVweV.mjs.map +1 -0
  585. package/dist/env-types-BaTCgn-y.mjs +38 -0
  586. package/dist/env-types-BaTCgn-y.mjs.map +1 -0
  587. package/dist/error-CEdm_AWU.mjs +90 -0
  588. package/dist/error-CEdm_AWU.mjs.map +1 -0
  589. package/dist/errors-CNvATh_7.mjs +469 -0
  590. package/dist/errors-CNvATh_7.mjs.map +1 -0
  591. package/dist/errors-CjXd1LgH.mjs +120 -0
  592. package/dist/errors-CjXd1LgH.mjs.map +1 -0
  593. package/dist/escape-nJW7dR0s.mjs +9 -0
  594. package/dist/escape-nJW7dR0s.mjs.map +1 -0
  595. package/dist/fence-BrnQffdY.mjs +162 -0
  596. package/dist/fence-BrnQffdY.mjs.map +1 -0
  597. package/dist/field-defs-cache-DEkFYCDE.mjs +77 -0
  598. package/dist/field-defs-cache-DEkFYCDE.mjs.map +1 -0
  599. package/dist/field-map-Cp5hDSRU.mjs +83 -0
  600. package/dist/field-map-Cp5hDSRU.mjs.map +1 -0
  601. package/dist/focal-point-JX8kcOTQ.mjs +23 -0
  602. package/dist/focal-point-JX8kcOTQ.mjs.map +1 -0
  603. package/dist/fts-manager-DU03MxWu.mjs +443 -0
  604. package/dist/fts-manager-DU03MxWu.mjs.map +1 -0
  605. package/dist/gc-Gf9LOF42.mjs +75 -0
  606. package/dist/gc-Gf9LOF42.mjs.map +1 -0
  607. package/dist/hash-CY4QdeMJ.mjs +37 -0
  608. package/dist/hash-CY4QdeMJ.mjs.map +1 -0
  609. package/dist/hook-result-DjdVwWpw.d.mts +31 -0
  610. package/dist/hook-result-DjdVwWpw.d.mts.map +1 -0
  611. package/dist/hreflang-Bq0ahAd4.mjs +105 -0
  612. package/dist/hreflang-Bq0ahAd4.mjs.map +1 -0
  613. package/dist/hreflang-C7ETs0Tv.d.mts +50 -0
  614. package/dist/hreflang-C7ETs0Tv.d.mts.map +1 -0
  615. package/dist/http-route-dispatch-B2G7_OOm.mjs +339 -0
  616. package/dist/http-route-dispatch-B2G7_OOm.mjs.map +1 -0
  617. package/dist/identity-u3KgtUC9.mjs +35 -0
  618. package/dist/identity-u3KgtUC9.mjs.map +1 -0
  619. package/dist/import-CzP9ffo0.mjs +2020 -0
  620. package/dist/import-CzP9ffo0.mjs.map +1 -0
  621. package/dist/index-D1_ykO2u.d.mts +623 -0
  622. package/dist/index-D1_ykO2u.d.mts.map +1 -0
  623. package/dist/index.d.mts +24 -24
  624. package/dist/index.mjs +108 -104
  625. package/dist/install-finalization-TbcQozrV.mjs +58 -0
  626. package/dist/install-finalization-TbcQozrV.mjs.map +1 -0
  627. package/dist/keys-r08WvAng.mjs +61 -0
  628. package/dist/keys-r08WvAng.mjs.map +1 -0
  629. package/dist/kinds-CXY-fwQ6.mjs +974 -0
  630. package/dist/kinds-CXY-fwQ6.mjs.map +1 -0
  631. package/dist/lifecycle-CpebZNAA.mjs +25 -0
  632. package/dist/lifecycle-CpebZNAA.mjs.map +1 -0
  633. package/dist/load-dHcR5yh9.mjs +28 -0
  634. package/dist/load-dHcR5yh9.mjs.map +1 -0
  635. package/dist/loader-B_bcoE1h.mjs +1197 -0
  636. package/dist/loader-B_bcoE1h.mjs.map +1 -0
  637. package/dist/loops-Dn1i16FP.mjs +205 -0
  638. package/dist/loops-Dn1i16FP.mjs.map +1 -0
  639. package/dist/manifest-builder-D7Y8iirE.mjs +189 -0
  640. package/dist/manifest-builder-D7Y8iirE.mjs.map +1 -0
  641. package/dist/manifest-schema-gy37bD_D.mjs +496 -0
  642. package/dist/manifest-schema-gy37bD_D.mjs.map +1 -0
  643. package/dist/marketplace-tHWSsCUo.mjs +257 -0
  644. package/dist/marketplace-tHWSsCUo.mjs.map +1 -0
  645. package/dist/media/image-endpoint.mjs +1 -1
  646. package/dist/media/index.d.mts +1 -1
  647. package/dist/media/index.mjs +4 -4
  648. package/dist/media/local-runtime.d.mts +14 -14
  649. package/dist/media/local-runtime.mjs +7 -7
  650. package/dist/media-3v7mqAVX.mjs +294 -0
  651. package/dist/media-3v7mqAVX.mjs.map +1 -0
  652. package/dist/media-CputjGE1.mjs +373 -0
  653. package/dist/media-CputjGE1.mjs.map +1 -0
  654. package/dist/media-D1z_jisb.mjs +408 -0
  655. package/dist/media-D1z_jisb.mjs.map +1 -0
  656. package/dist/media-allowlist-D5a4d-RA.mjs +44 -0
  657. package/dist/media-allowlist-D5a4d-RA.mjs.map +1 -0
  658. package/dist/media-folders-D2VdVBf6.mjs +210 -0
  659. package/dist/media-folders-D2VdVBf6.mjs.map +1 -0
  660. package/dist/media-url-DloW2xrP.mjs +43 -0
  661. package/dist/media-url-DloW2xrP.mjs.map +1 -0
  662. package/dist/media-usage-B8q0owWQ.mjs +1629 -0
  663. package/dist/media-usage-B8q0owWQ.mjs.map +1 -0
  664. package/dist/media-usage-activation-CQWOOTJi.mjs +78 -0
  665. package/dist/media-usage-activation-CQWOOTJi.mjs.map +1 -0
  666. package/dist/media-usage-work-BC0qpkMD.mjs +152 -0
  667. package/dist/media-usage-work-BC0qpkMD.mjs.map +1 -0
  668. package/dist/media-usage-work-BlMjwPg8.mjs +586 -0
  669. package/dist/media-usage-work-BlMjwPg8.mjs.map +1 -0
  670. package/dist/menus-BQKqf0Up.mjs +92 -0
  671. package/dist/menus-BQKqf0Up.mjs.map +1 -0
  672. package/dist/menus-DiuhXKWf.mjs +3646 -0
  673. package/dist/menus-DiuhXKWf.mjs.map +1 -0
  674. package/dist/menus-trvc6_fW.mjs +753 -0
  675. package/dist/menus-trvc6_fW.mjs.map +1 -0
  676. package/dist/migrations/index.d.mts +1 -1
  677. package/dist/migrations/index.mjs +3 -3
  678. package/dist/mime-IZf-LHIS.mjs +36 -0
  679. package/dist/mime-IZf-LHIS.mjs.map +1 -0
  680. package/dist/mode-nh0ppSX5.mjs +23 -0
  681. package/dist/mode-nh0ppSX5.mjs.map +1 -0
  682. package/dist/node-sqlite-compat-CDOEcc97.mjs +63 -0
  683. package/dist/node-sqlite-compat-CDOEcc97.mjs.map +1 -0
  684. package/dist/normalize-BuWa0lvd.mjs +191 -0
  685. package/dist/normalize-BuWa0lvd.mjs.map +1 -0
  686. package/dist/oauth-authorization-BcRdGojQ.mjs +274 -0
  687. package/dist/oauth-authorization-BcRdGojQ.mjs.map +1 -0
  688. package/dist/oauth-clients-C-8WDTqj.mjs +266 -0
  689. package/dist/oauth-clients-C-8WDTqj.mjs.map +1 -0
  690. package/dist/oauth-state-store-CM5ZEYQS.mjs +50 -0
  691. package/dist/oauth-state-store-CM5ZEYQS.mjs.map +1 -0
  692. package/dist/oauth-user-lookup-DrrqvTZC.mjs +26 -0
  693. package/dist/oauth-user-lookup-DrrqvTZC.mjs.map +1 -0
  694. package/dist/object-cache/memory.d.mts +1 -1
  695. package/dist/object-cache-Bo6DGaC9.mjs +586 -0
  696. package/dist/object-cache-Bo6DGaC9.mjs.map +1 -0
  697. package/dist/options-C2IDQnD2.d.mts +81 -0
  698. package/dist/options-C2IDQnD2.d.mts.map +1 -0
  699. package/dist/ownership-DoeAIuTg.mjs +12 -0
  700. package/dist/ownership-DoeAIuTg.mjs.map +1 -0
  701. package/dist/page/index.d.mts +2 -2
  702. package/dist/page/index.mjs +6 -6
  703. package/dist/parse-D5Sw9wAI.d.mts +172 -0
  704. package/dist/parse-D5Sw9wAI.d.mts.map +1 -0
  705. package/dist/parse-Gt2l4Sld.mjs +81 -0
  706. package/dist/parse-Gt2l4Sld.mjs.map +1 -0
  707. package/dist/passkey-config-CkQsrcU-.mjs +46 -0
  708. package/dist/passkey-config-CkQsrcU-.mjs.map +1 -0
  709. package/dist/paths-DiENGBx5.mjs +77 -0
  710. package/dist/paths-DiENGBx5.mjs.map +1 -0
  711. package/dist/patterns-DyZJ67I7.mjs +140 -0
  712. package/dist/patterns-DyZJ67I7.mjs.map +1 -0
  713. package/dist/placeholder-Cq5wLDCX.d.mts +306 -0
  714. package/dist/placeholder-Cq5wLDCX.d.mts.map +1 -0
  715. package/dist/plan-BxCS1tl5.mjs +135 -0
  716. package/dist/plan-BxCS1tl5.mjs.map +1 -0
  717. package/dist/plugin-test-runtime.d.mts +14 -14
  718. package/dist/plugin-test-runtime.mjs +115 -111
  719. package/dist/plugin-types.d.mts +5 -3
  720. package/dist/plugin-types.d.mts.map +1 -1
  721. package/dist/plugin-types.mjs.map +1 -1
  722. package/dist/plugin-utils.d.mts +12 -12
  723. package/dist/plugins/adapt-sandbox-entry.d.mts +12 -12
  724. package/dist/plugins/adapt-sandbox-entry.d.mts.map +1 -1
  725. package/dist/plugins/adapt-sandbox-entry.mjs +48 -10
  726. package/dist/plugins/adapt-sandbox-entry.mjs.map +1 -1
  727. package/dist/plugins/host.d.mts +6 -6
  728. package/dist/plugins/host.mjs +49 -44
  729. package/dist/plugins-BpLkXA1S.mjs +277 -0
  730. package/dist/plugins-BpLkXA1S.mjs.map +1 -0
  731. package/dist/policy-C1qpNxrr.mjs +45 -0
  732. package/dist/policy-C1qpNxrr.mjs.map +1 -0
  733. package/dist/portable-text-BnRuiR1-.mjs +307 -0
  734. package/dist/portable-text-BnRuiR1-.mjs.map +1 -0
  735. package/dist/preview-DU5rwz_m.mjs +107 -0
  736. package/dist/preview-DU5rwz_m.mjs.map +1 -0
  737. package/dist/protocol-B9GEhEyi.d.mts +61 -0
  738. package/dist/protocol-B9GEhEyi.d.mts.map +1 -0
  739. package/dist/public-submission-yZaTTfsC.mjs +250 -0
  740. package/dist/public-submission-yZaTTfsC.mjs.map +1 -0
  741. package/dist/public-url-B5a0QAh6.mjs +101 -0
  742. package/dist/public-url-B5a0QAh6.mjs.map +1 -0
  743. package/dist/query-6e2CQxUv.mjs +1161 -0
  744. package/dist/query-6e2CQxUv.mjs.map +1 -0
  745. package/dist/query-DC3bv__4.mjs +41 -0
  746. package/dist/query-DC3bv__4.mjs.map +1 -0
  747. package/dist/rate-limit-BXx3Ecp9.mjs +120 -0
  748. package/dist/rate-limit-BXx3Ecp9.mjs.map +1 -0
  749. package/dist/receipt-q1VK9jhj.mjs +43 -0
  750. package/dist/receipt-q1VK9jhj.mjs.map +1 -0
  751. package/dist/redirect-BvFKh8Sz.mjs +416 -0
  752. package/dist/redirect-BvFKh8Sz.mjs.map +1 -0
  753. package/dist/redirect-D1AmADlk.mjs +19 -0
  754. package/dist/redirect-D1AmADlk.mjs.map +1 -0
  755. package/dist/redirects-CWQMKYOS.mjs +446 -0
  756. package/dist/redirects-CWQMKYOS.mjs.map +1 -0
  757. package/dist/redirects-D4EWeXAo.mjs +148 -0
  758. package/dist/redirects-D4EWeXAo.mjs.map +1 -0
  759. package/dist/registry/testing.d.mts +16 -4
  760. package/dist/registry/testing.d.mts.map +1 -1
  761. package/dist/registry/testing.mjs +20 -10
  762. package/dist/registry/testing.mjs.map +1 -1
  763. package/dist/registry-CtHRqVe-.mjs +6771 -0
  764. package/dist/registry-CtHRqVe-.mjs.map +1 -0
  765. package/dist/relations-CVI2nbrn.mjs +776 -0
  766. package/dist/relations-CVI2nbrn.mjs.map +1 -0
  767. package/dist/request-cache-C4CIo5ad.mjs +104 -0
  768. package/dist/request-cache-C4CIo5ad.mjs.map +1 -0
  769. package/dist/request-context.d.mts +9 -1
  770. package/dist/request-context.d.mts.map +1 -1
  771. package/dist/request-context.mjs.map +1 -1
  772. package/dist/request-meta-B6blULFY.mjs +141 -0
  773. package/dist/request-meta-B6blULFY.mjs.map +1 -0
  774. package/dist/resolve-Cx0Pwz0-.mjs +100 -0
  775. package/dist/resolve-Cx0Pwz0-.mjs.map +1 -0
  776. package/dist/resolve-D-kqyKns.mjs +199 -0
  777. package/dist/resolve-D-kqyKns.mjs.map +1 -0
  778. package/dist/revision-CGkQA0e5.mjs +366 -0
  779. package/dist/revision-CGkQA0e5.mjs.map +1 -0
  780. package/dist/route-wire-DK600v4u.mjs +197 -0
  781. package/dist/route-wire-DK600v4u.mjs.map +1 -0
  782. package/dist/routes-DTduBPzX.mjs +272 -0
  783. package/dist/routes-DTduBPzX.mjs.map +1 -0
  784. package/dist/runner-CLpxmhl8.mjs +6197 -0
  785. package/dist/runner-CLpxmhl8.mjs.map +1 -0
  786. package/dist/runner-Ji7qyH2A.d.mts +68 -0
  787. package/dist/runner-Ji7qyH2A.d.mts.map +1 -0
  788. package/dist/runtime.d.mts +13 -13
  789. package/dist/runtime.mjs +3 -3
  790. package/dist/schema/project-env-types.d.mts +12 -0
  791. package/dist/schema/project-env-types.d.mts.map +1 -0
  792. package/dist/schema/project-env-types.mjs +86 -0
  793. package/dist/schema/project-env-types.mjs.map +1 -0
  794. package/dist/schema-BZPj3kwZ.mjs +13 -0
  795. package/dist/schema-BZPj3kwZ.mjs.map +1 -0
  796. package/dist/schema-Berj5VQx.mjs +815 -0
  797. package/dist/schema-Berj5VQx.mjs.map +1 -0
  798. package/dist/scopes-C1HJaIyf.mjs +34 -0
  799. package/dist/scopes-C1HJaIyf.mjs.map +1 -0
  800. package/dist/search-thYf8j9F.mjs +448 -0
  801. package/dist/search-thYf8j9F.mjs.map +1 -0
  802. package/dist/sections-2k1uIgJ0.mjs +346 -0
  803. package/dist/sections-2k1uIgJ0.mjs.map +1 -0
  804. package/dist/seed/index.d.mts +2 -2
  805. package/dist/seed/index.mjs +39 -38
  806. package/dist/seo/index.d.mts +3 -3
  807. package/dist/seo/index.mjs +24 -23
  808. package/dist/seo/index.mjs.map +1 -1
  809. package/dist/seo-C61bnPuV.mjs +114 -0
  810. package/dist/seo-C61bnPuV.mjs.map +1 -0
  811. package/dist/seo-DpYxmGaL.mjs +133 -0
  812. package/dist/seo-DpYxmGaL.mjs.map +1 -0
  813. package/dist/service-BFUImckH.mjs +150 -0
  814. package/dist/service-BFUImckH.mjs.map +1 -0
  815. package/dist/session-user-DVcHsFD5.mjs +61 -0
  816. package/dist/session-user-DVcHsFD5.mjs.map +1 -0
  817. package/dist/settings-B0zQj_Tj.mjs +61 -0
  818. package/dist/settings-B0zQj_Tj.mjs.map +1 -0
  819. package/dist/settings-BJjK_X7x.mjs +51 -0
  820. package/dist/settings-BJjK_X7x.mjs.map +1 -0
  821. package/dist/settings-BbVRRGDp.mjs +439 -0
  822. package/dist/settings-BbVRRGDp.mjs.map +1 -0
  823. package/dist/setup-complete-CuLcTDTU.mjs +65 -0
  824. package/dist/setup-complete-CuLcTDTU.mjs.map +1 -0
  825. package/dist/setup-nonce-CAQoY5PC.mjs +25 -0
  826. package/dist/setup-nonce-CAQoY5PC.mjs.map +1 -0
  827. package/dist/site-settings-AYFvhwQn.mjs +50 -0
  828. package/dist/site-settings-AYFvhwQn.mjs.map +1 -0
  829. package/dist/site-url-Ceq_AUK0.mjs +16 -0
  830. package/dist/site-url-Ceq_AUK0.mjs.map +1 -0
  831. package/dist/snapshot-Dzsn3NZa.mjs +414 -0
  832. package/dist/snapshot-Dzsn3NZa.mjs.map +1 -0
  833. package/dist/ssrf-DsmvZB80.mjs +406 -0
  834. package/dist/ssrf-DsmvZB80.mjs.map +1 -0
  835. package/dist/stage-Cf9PqdUB.mjs +662 -0
  836. package/dist/stage-Cf9PqdUB.mjs.map +1 -0
  837. package/dist/staged-Bw5eHbKS.mjs +686 -0
  838. package/dist/staged-Bw5eHbKS.mjs.map +1 -0
  839. package/dist/state-kGdOMQRY.mjs +153 -0
  840. package/dist/state-kGdOMQRY.mjs.map +1 -0
  841. package/dist/status-D39Fpy8R.mjs +30 -0
  842. package/dist/status-D39Fpy8R.mjs.map +1 -0
  843. package/dist/storage/local.d.mts +1 -1
  844. package/dist/storage/local.mjs +1 -1
  845. package/dist/storage/s3.d.mts +1 -1
  846. package/dist/storage/s3.mjs +1 -1
  847. package/dist/storage-query-C9bK0Dg6.d.mts +1614 -0
  848. package/dist/storage-query-C9bK0Dg6.d.mts.map +1 -0
  849. package/dist/tar-lDI_fzLD.mjs +449 -0
  850. package/dist/tar-lDI_fzLD.mjs.map +1 -0
  851. package/dist/target-DOFs5oUC.mjs +27 -0
  852. package/dist/target-DOFs5oUC.mjs.map +1 -0
  853. package/dist/taxonomies-DQGomz9p.mjs +939 -0
  854. package/dist/taxonomies-DQGomz9p.mjs.map +1 -0
  855. package/dist/taxonomies-DWv-OYT0.mjs +697 -0
  856. package/dist/taxonomies-DWv-OYT0.mjs.map +1 -0
  857. package/dist/taxonomy-BesdHIwi.mjs +525 -0
  858. package/dist/taxonomy-BesdHIwi.mjs.map +1 -0
  859. package/dist/tokens-BIGxi8sP.mjs +171 -0
  860. package/dist/tokens-BIGxi8sP.mjs.map +1 -0
  861. package/dist/transaction-BVYIo_yu.mjs +29 -0
  862. package/dist/transaction-BVYIo_yu.mjs.map +1 -0
  863. package/dist/transfer-BtzoaXLk.mjs +166 -0
  864. package/dist/transfer-BtzoaXLk.mjs.map +1 -0
  865. package/dist/transfer-DLu_6AXL.mjs +8856 -0
  866. package/dist/transfer-DLu_6AXL.mjs.map +1 -0
  867. package/dist/transfer-download-b_PCrqJJ.mjs +33 -0
  868. package/dist/transfer-download-b_PCrqJJ.mjs.map +1 -0
  869. package/dist/transformations-DdnpSdeC.mjs +196 -0
  870. package/dist/transformations-DdnpSdeC.mjs.map +1 -0
  871. package/dist/transport-flR-Zmds.d.mts +42 -0
  872. package/dist/transport-flR-Zmds.d.mts.map +1 -0
  873. package/dist/transport-umzEbgYO.mjs +136 -0
  874. package/dist/transport-umzEbgYO.mjs.map +1 -0
  875. package/dist/trusted-proxy-BqfQFs6a.mjs +51 -0
  876. package/dist/trusted-proxy-BqfQFs6a.mjs.map +1 -0
  877. package/dist/turnstile-IvQp2uyD.mjs +53 -0
  878. package/dist/turnstile-IvQp2uyD.mjs.map +1 -0
  879. package/dist/types-2V_MVPYy.d.mts +125 -0
  880. package/dist/types-2V_MVPYy.d.mts.map +1 -0
  881. package/dist/types-B-WCvzdi.d.mts +198 -0
  882. package/dist/types-B-WCvzdi.d.mts.map +1 -0
  883. package/dist/types-BGmQ0uXs.mjs +201 -0
  884. package/dist/types-BGmQ0uXs.mjs.map +1 -0
  885. package/dist/types-CVsmpTcU.mjs +18 -0
  886. package/dist/types-CVsmpTcU.mjs.map +1 -0
  887. package/dist/types-C_V-_vMS.d.mts +198 -0
  888. package/dist/types-C_V-_vMS.d.mts.map +1 -0
  889. package/dist/types-CdEMurNh.mjs +77 -0
  890. package/dist/types-CdEMurNh.mjs.map +1 -0
  891. package/dist/types-CsmwbOwa.mjs +22 -0
  892. package/dist/types-CsmwbOwa.mjs.map +1 -0
  893. package/dist/types-Cw-1it3n.d.mts +287 -0
  894. package/dist/types-Cw-1it3n.d.mts.map +1 -0
  895. package/dist/types-D7B20WFC.d.mts +374 -0
  896. package/dist/types-D7B20WFC.d.mts.map +1 -0
  897. package/dist/types-DGw8KMX_.mjs +16 -0
  898. package/dist/types-DGw8KMX_.mjs.map +1 -0
  899. package/dist/types-DZeDpzMc.d.mts +896 -0
  900. package/dist/types-DZeDpzMc.d.mts.map +1 -0
  901. package/dist/types-DuQAIPA-.d.mts +363 -0
  902. package/dist/types-DuQAIPA-.d.mts.map +1 -0
  903. package/dist/types-edRPQchz.d.mts +85 -0
  904. package/dist/types-edRPQchz.d.mts.map +1 -0
  905. package/dist/types-j6MBDjlZ.mjs +103 -0
  906. package/dist/types-j6MBDjlZ.mjs.map +1 -0
  907. package/dist/types-pOLeFKGq.d.mts +1720 -0
  908. package/dist/types-pOLeFKGq.d.mts.map +1 -0
  909. package/dist/update-check-CaZyFHZC.mjs +161 -0
  910. package/dist/update-check-CaZyFHZC.mjs.map +1 -0
  911. package/dist/upload-attempts-BodUoFBu.mjs +32 -0
  912. package/dist/upload-attempts-BodUoFBu.mjs.map +1 -0
  913. package/dist/url-Dn3IStq8.mjs +104 -0
  914. package/dist/url-Dn3IStq8.mjs.map +1 -0
  915. package/dist/url-pattern-DGAG6ZP2.mjs +41 -0
  916. package/dist/url-pattern-DGAG6ZP2.mjs.map +1 -0
  917. package/dist/user-BOvuF1sQ.mjs +171 -0
  918. package/dist/user-BOvuF1sQ.mjs.map +1 -0
  919. package/dist/utils-CoV-PYhg.mjs +439 -0
  920. package/dist/utils-CoV-PYhg.mjs.map +1 -0
  921. package/dist/validate-WkjGwBSO.mjs +516 -0
  922. package/dist/validate-WkjGwBSO.mjs.map +1 -0
  923. package/dist/validate-dK97qe7F.d.mts +468 -0
  924. package/dist/validate-dK97qe7F.d.mts.map +1 -0
  925. package/dist/validation-D-ICq_tY.mjs +219 -0
  926. package/dist/validation-D-ICq_tY.mjs.map +1 -0
  927. package/dist/version-DbT04wbH.mjs +9 -0
  928. package/dist/version-DbT04wbH.mjs.map +1 -0
  929. package/dist/version-IneBU54o.mjs +7 -0
  930. package/dist/version-IneBU54o.mjs.map +1 -0
  931. package/dist/virtual-modules-Brh6mRVe.mjs +516 -0
  932. package/dist/virtual-modules-Brh6mRVe.mjs.map +1 -0
  933. package/dist/widgets-D8T0xBYs.mjs +126 -0
  934. package/dist/widgets-D8T0xBYs.mjs.map +1 -0
  935. package/dist/wxr-taxonomies-B6iE8m9I.d.mts +34 -0
  936. package/dist/wxr-taxonomies-B6iE8m9I.d.mts.map +1 -0
  937. package/dist/wxr-taxonomies-DEzR9N7e.mjs +453 -0
  938. package/dist/wxr-taxonomies-DEzR9N7e.mjs.map +1 -0
  939. package/dist/zod-generator-DnfG5sGQ.mjs +424 -0
  940. package/dist/zod-generator-DnfG5sGQ.mjs.map +1 -0
  941. package/package.json +13 -14
  942. package/src/api/errors.ts +11 -0
  943. package/src/api/handlers/bulk-tag.ts +4 -4
  944. package/src/api/handlers/content.ts +39 -17
  945. package/src/api/handlers/index.ts +3 -0
  946. package/src/api/handlers/manifest.ts +2 -0
  947. package/src/api/handlers/media-upload.ts +3 -0
  948. package/src/api/handlers/media.ts +2 -2
  949. package/src/api/handlers/registry.ts +123 -70
  950. package/src/api/handlers/revision.ts +10 -2
  951. package/src/api/handlers/staged-references.ts +72 -6
  952. package/src/api/handlers/update-check.ts +236 -0
  953. package/src/api/redirect.ts +9 -1
  954. package/src/api/schemas/content.ts +4 -0
  955. package/src/api/schemas/import.ts +50 -14
  956. package/src/api/schemas/schema.ts +12 -6
  957. package/src/api/setup-complete.ts +49 -1
  958. package/src/api/types.ts +4 -0
  959. package/src/astro/dev-typegen.ts +15 -22
  960. package/src/astro/integration/dev-typegen.ts +32 -3
  961. package/src/astro/integration/index.ts +88 -22
  962. package/src/astro/integration/routes.ts +6 -0
  963. package/src/astro/integration/runtime.ts +33 -7
  964. package/src/astro/integration/virtual-modules.ts +1 -0
  965. package/src/astro/integration/vite-config.ts +16 -8
  966. package/src/astro/middleware/redirect.ts +15 -2
  967. package/src/astro/middleware/request-context.ts +13 -6
  968. package/src/astro/routes/api/admin/bylines/[id]/index.ts +11 -1
  969. package/src/astro/routes/api/admin/bylines/[id]/translations.ts +7 -1
  970. package/src/astro/routes/api/admin/bylines/index.ts +6 -1
  971. package/src/astro/routes/api/admin/core-update.ts +34 -0
  972. package/src/astro/routes/api/admin/plugins/marketplace/[id]/icon.ts +6 -2
  973. package/src/astro/routes/api/admin/themes/marketplace/[id]/thumbnail.ts +6 -2
  974. package/src/astro/routes/api/auth/invite/complete.ts +4 -4
  975. package/src/astro/routes/api/auth/magic-link/verify.ts +4 -1
  976. package/src/astro/routes/api/auth/oauth/[provider]/callback.ts +9 -4
  977. package/src/astro/routes/api/auth/passkey/verify.ts +4 -4
  978. package/src/astro/routes/api/auth/signup/complete.ts +4 -4
  979. package/src/astro/routes/api/import/wordpress/execute.ts +252 -6
  980. package/src/astro/routes/api/import/wordpress/prepare.ts +1 -2
  981. package/src/astro/routes/api/oauth/register.ts +22 -2
  982. package/src/astro/routes/api/revisions/[revisionId]/restore.ts +17 -1
  983. package/src/astro/routes/api/setup/admin-verify.ts +6 -5
  984. package/src/astro/routes/api/typegen.ts +4 -46
  985. package/src/astro/session-user.ts +14 -0
  986. package/src/astro/types.ts +6 -0
  987. package/src/bylines/credits.ts +149 -0
  988. package/src/bylines/index.ts +4 -142
  989. package/src/cli/commands/seed.ts +2 -0
  990. package/src/cli/credentials.ts +1 -60
  991. package/src/cli/index.ts +0 -2
  992. package/src/client/index.ts +8 -2
  993. package/src/components/Image.astro +24 -13
  994. package/src/components/InlinePortableTextEditor.tsx +25 -8
  995. package/src/content/converters/portable-text-to-prosemirror.ts +23 -17
  996. package/src/content/converters/prosemirror-to-portable-text.ts +16 -5
  997. package/src/content/converters/types.ts +1 -0
  998. package/src/database/content-datetime.ts +111 -23
  999. package/src/database/migrations/036_i18n_menus_and_taxonomies.ts +132 -92
  1000. package/src/database/migrations/088_cron_oneshot_utc.ts +39 -0
  1001. package/src/database/migrations/089_auto_seed_completion.ts +13 -0
  1002. package/src/database/migrations/runner.ts +4 -0
  1003. package/src/database/repositories/comment.ts +2 -2
  1004. package/src/database/repositories/content.ts +15 -8
  1005. package/src/database/repositories/plugin-storage.ts +1 -1
  1006. package/src/database/repositories/redirect.ts +7 -2
  1007. package/src/database/repositories/relation.ts +2 -2
  1008. package/src/database/types.ts +1 -1
  1009. package/src/db/node-sqlite-compat.ts +63 -37
  1010. package/src/emdash-runtime.ts +63 -35
  1011. package/src/import/wxr-taxonomies.ts +163 -88
  1012. package/src/index.ts +10 -0
  1013. package/src/loader.ts +8 -1
  1014. package/src/mcp/server.ts +90 -8
  1015. package/src/media/usage/activation.ts +18 -9
  1016. package/src/migrations/config-loader.ts +5 -0
  1017. package/src/object-cache/index.ts +19 -7
  1018. package/src/object-cache/types.ts +3 -2
  1019. package/src/plugin-types.ts +7 -0
  1020. package/src/plugins/adapt-sandbox-entry.ts +47 -12
  1021. package/src/plugins/byline-access.ts +158 -0
  1022. package/src/plugins/context.ts +7 -1
  1023. package/src/plugins/cron.ts +27 -4
  1024. package/src/plugins/hooks.ts +47 -0
  1025. package/src/plugins/host.ts +1 -0
  1026. package/src/plugins/index.ts +10 -1
  1027. package/src/plugins/manifest-schema.ts +5 -1
  1028. package/src/plugins/marketplace.ts +48 -36
  1029. package/src/plugins/sandbox/proxy.ts +1 -0
  1030. package/src/plugins/types.ts +95 -0
  1031. package/src/query.ts +9 -2
  1032. package/src/redirects/cache.ts +11 -1
  1033. package/src/redirects/destination.ts +20 -0
  1034. package/src/redirects/loops.ts +10 -6
  1035. package/src/redirects/patterns.ts +12 -30
  1036. package/src/references/staged.ts +40 -0
  1037. package/src/registry/testing.ts +59 -14
  1038. package/src/request-context.ts +8 -0
  1039. package/src/schema/block-type-registry.ts +1 -1
  1040. package/src/schema/env-types.ts +37 -0
  1041. package/src/schema/project-env-types.ts +41 -0
  1042. package/src/schema/registry.ts +33 -2
  1043. package/src/schema/types.ts +5 -0
  1044. package/src/schema/url-pattern.ts +10 -0
  1045. package/src/schema/zod-generator.ts +11 -1
  1046. package/src/seed/apply.ts +34 -1
  1047. package/src/seed/ownership.ts +15 -0
  1048. package/src/seed/validate.ts +45 -2
  1049. package/src/transfer/analyze/validate.ts +113 -1
  1050. package/src/transfer/analyze/values.ts +104 -1
  1051. package/src/transfer/analyze/write-rules.ts +8 -0
  1052. package/src/utils/url.ts +58 -3
  1053. package/src/virtual-modules.d.ts +3 -0
  1054. package/dist/action-token-CbKDcPJi.mjs +0 -26
  1055. package/dist/action-token-CbKDcPJi.mjs.map +0 -1
  1056. package/dist/activation-PtniBLt9.mjs +0 -382
  1057. package/dist/activation-PtniBLt9.mjs.map +0 -1
  1058. package/dist/adapters-C_Tf5x90.d.mts +0 -171
  1059. package/dist/adapters-C_Tf5x90.d.mts.map +0 -1
  1060. package/dist/allowed-origins-U1z4TdEZ.mjs +0 -116
  1061. package/dist/allowed-origins-U1z4TdEZ.mjs.map +0 -1
  1062. package/dist/api-CXwQkV_m.mjs +0 -5122
  1063. package/dist/api-CXwQkV_m.mjs.map +0 -1
  1064. package/dist/api-tokens-89WlohEN.mjs +0 -166
  1065. package/dist/api-tokens-89WlohEN.mjs.map +0 -1
  1066. package/dist/apply-Do3KNnUk.mjs +0 -1659
  1067. package/dist/apply-Do3KNnUk.mjs.map +0 -1
  1068. package/dist/approvals-CAX9Yw33.mjs +0 -460
  1069. package/dist/approvals-CAX9Yw33.mjs.map +0 -1
  1070. package/dist/artifact-fetch-B9W4CEST.mjs +0 -659
  1071. package/dist/artifact-fetch-B9W4CEST.mjs.map +0 -1
  1072. package/dist/audit-CrgmE9LE.mjs +0 -127
  1073. package/dist/audit-CrgmE9LE.mjs.map +0 -1
  1074. package/dist/authoritative-records-C2YzIdbu.mjs +0 -5172
  1075. package/dist/authoritative-records-C2YzIdbu.mjs.map +0 -1
  1076. package/dist/authorize-WgdKF8QY.mjs +0 -49
  1077. package/dist/authorize-WgdKF8QY.mjs.map +0 -1
  1078. package/dist/backup-Ck8_lMO3.mjs +0 -246
  1079. package/dist/backup-Ck8_lMO3.mjs.map +0 -1
  1080. package/dist/block-types-BQ90asVI.mjs +0 -132
  1081. package/dist/block-types-BQ90asVI.mjs.map +0 -1
  1082. package/dist/block-values-ACFqgB1D.mjs +0 -175
  1083. package/dist/block-values-ACFqgB1D.mjs.map +0 -1
  1084. package/dist/bundle-Db1iNMv_.mjs +0 -667
  1085. package/dist/bundle-Db1iNMv_.mjs.map +0 -1
  1086. package/dist/byline-BayaYGoj.mjs +0 -909
  1087. package/dist/byline-BayaYGoj.mjs.map +0 -1
  1088. package/dist/byline-fields-B8HH-35f.mjs +0 -254
  1089. package/dist/byline-fields-B8HH-35f.mjs.map +0 -1
  1090. package/dist/byline-fields-hMPjf6Eu.mjs +0 -123
  1091. package/dist/byline-fields-hMPjf6Eu.mjs.map +0 -1
  1092. package/dist/byline-registry-B_EK_TQf.mjs +0 -406
  1093. package/dist/byline-registry-B_EK_TQf.mjs.map +0 -1
  1094. package/dist/bylines-DFAaFXWi.mjs +0 -214
  1095. package/dist/bylines-DFAaFXWi.mjs.map +0 -1
  1096. package/dist/bylines-DkIxUxmr.mjs +0 -232
  1097. package/dist/bylines-DkIxUxmr.mjs.map +0 -1
  1098. package/dist/cache-DkvhQ8XE.mjs +0 -108
  1099. package/dist/cache-DkvhQ8XE.mjs.map +0 -1
  1100. package/dist/canonical-CcSuuTlH.mjs +0 -174
  1101. package/dist/canonical-CcSuuTlH.mjs.map +0 -1
  1102. package/dist/capture-triggers-DJEoOTOq.mjs +0 -362
  1103. package/dist/capture-triggers-DJEoOTOq.mjs.map +0 -1
  1104. package/dist/challenge-store-CvBl81AQ.mjs +0 -51
  1105. package/dist/challenge-store-CvBl81AQ.mjs.map +0 -1
  1106. package/dist/checksum-CClweQzI.mjs +0 -162
  1107. package/dist/checksum-CClweQzI.mjs.map +0 -1
  1108. package/dist/chrome-tags-D5caJwwp.mjs +0 -24
  1109. package/dist/chrome-tags-D5caJwwp.mjs.map +0 -1
  1110. package/dist/chunks-DwBaj8aT.mjs +0 -25
  1111. package/dist/chunks-DwBaj8aT.mjs.map +0 -1
  1112. package/dist/collection-deletion-CLCdXsnV.mjs +0 -436
  1113. package/dist/collection-deletion-CLCdXsnV.mjs.map +0 -1
  1114. package/dist/collection-deletion-processor-hNw8x01F.mjs +0 -217
  1115. package/dist/collection-deletion-processor-hNw8x01F.mjs.map +0 -1
  1116. package/dist/collection-slugs-cache-CUuiduLq.mjs +0 -85
  1117. package/dist/collection-slugs-cache-CUuiduLq.mjs.map +0 -1
  1118. package/dist/comment-D2uvL63j.mjs +0 -313
  1119. package/dist/comment-D2uvL63j.mjs.map +0 -1
  1120. package/dist/comment-reaction-DevUuzg4.mjs +0 -85
  1121. package/dist/comment-reaction-DevUuzg4.mjs.map +0 -1
  1122. package/dist/comments-Cq0s7_hO.mjs +0 -195
  1123. package/dist/comments-Cq0s7_hO.mjs.map +0 -1
  1124. package/dist/comments-M4EDYAHw.mjs +0 -99
  1125. package/dist/comments-M4EDYAHw.mjs.map +0 -1
  1126. package/dist/components-CuIGwXMs.mjs +0 -108
  1127. package/dist/components-CuIGwXMs.mjs.map +0 -1
  1128. package/dist/config-52Ea5IWt.d.mts +0 -39
  1129. package/dist/config-52Ea5IWt.d.mts.map +0 -1
  1130. package/dist/config-CCz3xOLc.mjs +0 -242
  1131. package/dist/config-CCz3xOLc.mjs.map +0 -1
  1132. package/dist/config-D3d5Qudq.d.mts +0 -6669
  1133. package/dist/config-D3d5Qudq.d.mts.map +0 -1
  1134. package/dist/content-CbnufDsM.mjs +0 -2018
  1135. package/dist/content-CbnufDsM.mjs.map +0 -1
  1136. package/dist/content-list-query-D_7B1FE5.d.mts +0 -26
  1137. package/dist/content-list-query-D_7B1FE5.d.mts.map +0 -1
  1138. package/dist/content-policy-CYu6K1KB.mjs +0 -46
  1139. package/dist/content-policy-CYu6K1KB.mjs.map +0 -1
  1140. package/dist/content-repair-DlDUgFGp.mjs +0 -442
  1141. package/dist/content-repair-DlDUgFGp.mjs.map +0 -1
  1142. package/dist/context-CGQLA1-a.mjs +0 -1922
  1143. package/dist/context-CGQLA1-a.mjs.map +0 -1
  1144. package/dist/cron-c4D5C5Fx.mjs +0 -284
  1145. package/dist/cron-c4D5C5Fx.mjs.map +0 -1
  1146. package/dist/dashboard-CBq9kmOn.mjs +0 -151
  1147. package/dist/dashboard-CBq9kmOn.mjs.map +0 -1
  1148. package/dist/default-DPsys51U.mjs +0 -81
  1149. package/dist/default-DPsys51U.mjs.map +0 -1
  1150. package/dist/deferred-tasks-CZ7rzBdo.d.mts +0 -9
  1151. package/dist/deferred-tasks-CZ7rzBdo.d.mts.map +0 -1
  1152. package/dist/dev-typegen-HRxwLRcT.mjs +0 -29
  1153. package/dist/dev-typegen-HRxwLRcT.mjs.map +0 -1
  1154. package/dist/device-flow-OcSqE9uY.mjs +0 -521
  1155. package/dist/device-flow-OcSqE9uY.mjs.map +0 -1
  1156. package/dist/digest-DVZ--cE9.mjs +0 -194
  1157. package/dist/digest-DVZ--cE9.mjs.map +0 -1
  1158. package/dist/direct-executor-DyjAqkpT.mjs +0 -104
  1159. package/dist/direct-executor-DyjAqkpT.mjs.map +0 -1
  1160. package/dist/dist-FPR93_xf.mjs +0 -810
  1161. package/dist/dist-FPR93_xf.mjs.map +0 -1
  1162. package/dist/email-console-DyQIgEnz.mjs +0 -50
  1163. package/dist/email-console-DyQIgEnz.mjs.map +0 -1
  1164. package/dist/email-locale-BYb16rVd.mjs +0 -25
  1165. package/dist/email-locale-BYb16rVd.mjs.map +0 -1
  1166. package/dist/emdash-runtime-CrzxJFmF.mjs +0 -4214
  1167. package/dist/emdash-runtime-CrzxJFmF.mjs.map +0 -1
  1168. package/dist/enrich-DBtCncE2.mjs +0 -194
  1169. package/dist/enrich-DBtCncE2.mjs.map +0 -1
  1170. package/dist/entry-lock-BN5y4YbO.d.mts +0 -4481
  1171. package/dist/entry-lock-BN5y4YbO.d.mts.map +0 -1
  1172. package/dist/entry-lock-BaRBHCsH.mjs +0 -1173
  1173. package/dist/entry-lock-BaRBHCsH.mjs.map +0 -1
  1174. package/dist/entry-lock-C6NcnZPV.mjs +0 -163
  1175. package/dist/entry-lock-C6NcnZPV.mjs.map +0 -1
  1176. package/dist/entry-locks-BTyQLdbC.mjs +0 -167
  1177. package/dist/entry-locks-BTyQLdbC.mjs.map +0 -1
  1178. package/dist/error-BfsNNrIE.mjs +0 -90
  1179. package/dist/error-BfsNNrIE.mjs.map +0 -1
  1180. package/dist/errors-BN1QAnEY.mjs +0 -460
  1181. package/dist/errors-BN1QAnEY.mjs.map +0 -1
  1182. package/dist/errors-Bt3goF8I.mjs +0 -120
  1183. package/dist/errors-Bt3goF8I.mjs.map +0 -1
  1184. package/dist/escape-BveidMa2.mjs +0 -9
  1185. package/dist/escape-BveidMa2.mjs.map +0 -1
  1186. package/dist/fence-Bb_IbCxI.mjs +0 -162
  1187. package/dist/fence-Bb_IbCxI.mjs.map +0 -1
  1188. package/dist/field-defs-cache-CsZctvbu.mjs +0 -77
  1189. package/dist/field-defs-cache-CsZctvbu.mjs.map +0 -1
  1190. package/dist/field-map-6m9rF49t.mjs +0 -83
  1191. package/dist/field-map-6m9rF49t.mjs.map +0 -1
  1192. package/dist/focal-point-CZ3d1wK5.mjs +0 -23
  1193. package/dist/focal-point-CZ3d1wK5.mjs.map +0 -1
  1194. package/dist/fts-manager-CCaZTp8y.mjs +0 -443
  1195. package/dist/fts-manager-CCaZTp8y.mjs.map +0 -1
  1196. package/dist/gc-xowRjczI.mjs +0 -75
  1197. package/dist/gc-xowRjczI.mjs.map +0 -1
  1198. package/dist/hash-COVK27Pc.mjs +0 -37
  1199. package/dist/hash-COVK27Pc.mjs.map +0 -1
  1200. package/dist/hook-result-CYSk0XFe.d.mts +0 -31
  1201. package/dist/hook-result-CYSk0XFe.d.mts.map +0 -1
  1202. package/dist/hreflang-CChPV7jx.mjs +0 -105
  1203. package/dist/hreflang-CChPV7jx.mjs.map +0 -1
  1204. package/dist/hreflang-DRslq3QI.d.mts +0 -50
  1205. package/dist/hreflang-DRslq3QI.d.mts.map +0 -1
  1206. package/dist/http-route-dispatch-CAdp2onn.mjs +0 -339
  1207. package/dist/http-route-dispatch-CAdp2onn.mjs.map +0 -1
  1208. package/dist/identity-NVTOOQyq.mjs +0 -35
  1209. package/dist/identity-NVTOOQyq.mjs.map +0 -1
  1210. package/dist/import-wpSO2N0x.mjs +0 -2020
  1211. package/dist/import-wpSO2N0x.mjs.map +0 -1
  1212. package/dist/index-CDs2wq4X.d.mts +0 -623
  1213. package/dist/index-CDs2wq4X.d.mts.map +0 -1
  1214. package/dist/install-finalization-D9R9R-W8.mjs +0 -58
  1215. package/dist/install-finalization-D9R9R-W8.mjs.map +0 -1
  1216. package/dist/keys-Bck6LBfF.mjs +0 -61
  1217. package/dist/keys-Bck6LBfF.mjs.map +0 -1
  1218. package/dist/kinds-CYmRESWj.mjs +0 -974
  1219. package/dist/kinds-CYmRESWj.mjs.map +0 -1
  1220. package/dist/lifecycle-C815ZQfV.mjs +0 -25
  1221. package/dist/lifecycle-C815ZQfV.mjs.map +0 -1
  1222. package/dist/load-D99axixL.mjs +0 -28
  1223. package/dist/load-D99axixL.mjs.map +0 -1
  1224. package/dist/loader-CrRPfkHS.mjs +0 -1197
  1225. package/dist/loader-CrRPfkHS.mjs.map +0 -1
  1226. package/dist/loops-DMKlygqX.mjs +0 -203
  1227. package/dist/loops-DMKlygqX.mjs.map +0 -1
  1228. package/dist/manifest-builder-BQzCHNgB.mjs +0 -189
  1229. package/dist/manifest-builder-BQzCHNgB.mjs.map +0 -1
  1230. package/dist/manifest-schema-Ci2gmd0u.mjs +0 -492
  1231. package/dist/manifest-schema-Ci2gmd0u.mjs.map +0 -1
  1232. package/dist/media-BUQePMxP.mjs +0 -373
  1233. package/dist/media-BUQePMxP.mjs.map +0 -1
  1234. package/dist/media-DH8ibNlY.mjs +0 -294
  1235. package/dist/media-DH8ibNlY.mjs.map +0 -1
  1236. package/dist/media-OEIQ3bVc.mjs +0 -408
  1237. package/dist/media-OEIQ3bVc.mjs.map +0 -1
  1238. package/dist/media-allowlist-pYtaBA95.mjs +0 -44
  1239. package/dist/media-allowlist-pYtaBA95.mjs.map +0 -1
  1240. package/dist/media-folders-Bf8_s4de.mjs +0 -210
  1241. package/dist/media-folders-Bf8_s4de.mjs.map +0 -1
  1242. package/dist/media-url-C6klEuNd.mjs +0 -43
  1243. package/dist/media-url-C6klEuNd.mjs.map +0 -1
  1244. package/dist/media-usage-D7Y64m6v.mjs +0 -1629
  1245. package/dist/media-usage-D7Y64m6v.mjs.map +0 -1
  1246. package/dist/media-usage-activation-DrqbmgLA.mjs +0 -78
  1247. package/dist/media-usage-activation-DrqbmgLA.mjs.map +0 -1
  1248. package/dist/media-usage-work-DommYhYA.mjs +0 -152
  1249. package/dist/media-usage-work-DommYhYA.mjs.map +0 -1
  1250. package/dist/media-usage-work-HU63hNDu.mjs +0 -586
  1251. package/dist/media-usage-work-HU63hNDu.mjs.map +0 -1
  1252. package/dist/menus-BQfusWEC.mjs +0 -3608
  1253. package/dist/menus-BQfusWEC.mjs.map +0 -1
  1254. package/dist/menus-BtwjQt5s.mjs +0 -753
  1255. package/dist/menus-BtwjQt5s.mjs.map +0 -1
  1256. package/dist/menus-p_M1V7J_.mjs +0 -139
  1257. package/dist/menus-p_M1V7J_.mjs.map +0 -1
  1258. package/dist/mime-C94qBG-P.mjs +0 -36
  1259. package/dist/mime-C94qBG-P.mjs.map +0 -1
  1260. package/dist/mode-DpYW3w6U.mjs +0 -23
  1261. package/dist/mode-DpYW3w6U.mjs.map +0 -1
  1262. package/dist/node-sqlite-compat-pWFw0lcc.mjs +0 -46
  1263. package/dist/node-sqlite-compat-pWFw0lcc.mjs.map +0 -1
  1264. package/dist/normalize-DduyxBjf.mjs +0 -191
  1265. package/dist/normalize-DduyxBjf.mjs.map +0 -1
  1266. package/dist/oauth-authorization-DAXsH1H9.mjs +0 -274
  1267. package/dist/oauth-authorization-DAXsH1H9.mjs.map +0 -1
  1268. package/dist/oauth-clients-DENiDQri.mjs +0 -266
  1269. package/dist/oauth-clients-DENiDQri.mjs.map +0 -1
  1270. package/dist/oauth-state-store-y8mEYVq9.mjs +0 -50
  1271. package/dist/oauth-state-store-y8mEYVq9.mjs.map +0 -1
  1272. package/dist/oauth-user-lookup-CtTYAy-O.mjs +0 -26
  1273. package/dist/oauth-user-lookup-CtTYAy-O.mjs.map +0 -1
  1274. package/dist/object-cache-CqWNY5uP.mjs +0 -582
  1275. package/dist/object-cache-CqWNY5uP.mjs.map +0 -1
  1276. package/dist/options-BYa1FgIM.d.mts +0 -81
  1277. package/dist/options-BYa1FgIM.d.mts.map +0 -1
  1278. package/dist/parse-CORGGhHf.mjs +0 -81
  1279. package/dist/parse-CORGGhHf.mjs.map +0 -1
  1280. package/dist/parse-avNM1xWV.d.mts +0 -168
  1281. package/dist/parse-avNM1xWV.d.mts.map +0 -1
  1282. package/dist/passkey-config-Dih5YeIS.mjs +0 -46
  1283. package/dist/passkey-config-Dih5YeIS.mjs.map +0 -1
  1284. package/dist/paths-d51RFm8M.mjs +0 -77
  1285. package/dist/paths-d51RFm8M.mjs.map +0 -1
  1286. package/dist/patterns-CoqlXUvk.mjs +0 -145
  1287. package/dist/patterns-CoqlXUvk.mjs.map +0 -1
  1288. package/dist/placeholder-D2aksPMF.d.mts +0 -306
  1289. package/dist/placeholder-D2aksPMF.d.mts.map +0 -1
  1290. package/dist/plan-DqeZKuaR.mjs +0 -135
  1291. package/dist/plan-DqeZKuaR.mjs.map +0 -1
  1292. package/dist/plugins-Bb7oqjQA.mjs +0 -277
  1293. package/dist/plugins-Bb7oqjQA.mjs.map +0 -1
  1294. package/dist/policy-BcEqut3n.mjs +0 -45
  1295. package/dist/policy-BcEqut3n.mjs.map +0 -1
  1296. package/dist/portable-text-DXE8ymtD.mjs +0 -307
  1297. package/dist/portable-text-DXE8ymtD.mjs.map +0 -1
  1298. package/dist/preview-DEDWbwA_.mjs +0 -107
  1299. package/dist/preview-DEDWbwA_.mjs.map +0 -1
  1300. package/dist/protocol-BJbTzvwl.d.mts +0 -61
  1301. package/dist/protocol-BJbTzvwl.d.mts.map +0 -1
  1302. package/dist/public-submission-D9c9S14m.mjs +0 -250
  1303. package/dist/public-submission-D9c9S14m.mjs.map +0 -1
  1304. package/dist/public-url-CIRe-2T6.mjs +0 -101
  1305. package/dist/public-url-CIRe-2T6.mjs.map +0 -1
  1306. package/dist/query-BzifXlPS.mjs +0 -1156
  1307. package/dist/query-BzifXlPS.mjs.map +0 -1
  1308. package/dist/query-OzMJ6vJP.mjs +0 -41
  1309. package/dist/query-OzMJ6vJP.mjs.map +0 -1
  1310. package/dist/rate-limit-Csp60Vik.mjs +0 -120
  1311. package/dist/rate-limit-Csp60Vik.mjs.map +0 -1
  1312. package/dist/receipt-B-aU4hpJ.mjs +0 -43
  1313. package/dist/receipt-B-aU4hpJ.mjs.map +0 -1
  1314. package/dist/redirect-CDSw1sU3.mjs +0 -17
  1315. package/dist/redirect-CDSw1sU3.mjs.map +0 -1
  1316. package/dist/redirect-D1ArbO85.mjs +0 -411
  1317. package/dist/redirect-D1ArbO85.mjs.map +0 -1
  1318. package/dist/redirects-BjTwDTsV.mjs +0 -148
  1319. package/dist/redirects-BjTwDTsV.mjs.map +0 -1
  1320. package/dist/redirects-Ck50kH3n.mjs +0 -446
  1321. package/dist/redirects-Ck50kH3n.mjs.map +0 -1
  1322. package/dist/registry-CFcNCayZ.mjs +0 -6754
  1323. package/dist/registry-CFcNCayZ.mjs.map +0 -1
  1324. package/dist/relations-Cfaa1fDl.mjs +0 -776
  1325. package/dist/relations-Cfaa1fDl.mjs.map +0 -1
  1326. package/dist/request-cache-iHRlHx1d.mjs +0 -104
  1327. package/dist/request-cache-iHRlHx1d.mjs.map +0 -1
  1328. package/dist/request-meta-D47mqyev.mjs +0 -141
  1329. package/dist/request-meta-D47mqyev.mjs.map +0 -1
  1330. package/dist/resolve-BPE8sMvx.mjs +0 -99
  1331. package/dist/resolve-BPE8sMvx.mjs.map +0 -1
  1332. package/dist/resolve-C0s1E_fH.mjs +0 -199
  1333. package/dist/resolve-C0s1E_fH.mjs.map +0 -1
  1334. package/dist/revision-j1p4-bOj.mjs +0 -302
  1335. package/dist/revision-j1p4-bOj.mjs.map +0 -1
  1336. package/dist/route-wire-C9PJV9aL.mjs +0 -197
  1337. package/dist/route-wire-C9PJV9aL.mjs.map +0 -1
  1338. package/dist/routes-lyYw0mMf.mjs +0 -272
  1339. package/dist/routes-lyYw0mMf.mjs.map +0 -1
  1340. package/dist/runner-B3eyB9Gb.mjs +0 -6121
  1341. package/dist/runner-B3eyB9Gb.mjs.map +0 -1
  1342. package/dist/runner-DoYH2Jcu.d.mts +0 -68
  1343. package/dist/runner-DoYH2Jcu.d.mts.map +0 -1
  1344. package/dist/schema-BAayK46S.mjs +0 -13
  1345. package/dist/schema-BAayK46S.mjs.map +0 -1
  1346. package/dist/schema-Gqcl-8G4.mjs +0 -815
  1347. package/dist/schema-Gqcl-8G4.mjs.map +0 -1
  1348. package/dist/scopes-BqPOKoKf.mjs +0 -34
  1349. package/dist/scopes-BqPOKoKf.mjs.map +0 -1
  1350. package/dist/search-YJKPIEV6.mjs +0 -448
  1351. package/dist/search-YJKPIEV6.mjs.map +0 -1
  1352. package/dist/sections-BR_e-wK5.mjs +0 -346
  1353. package/dist/sections-BR_e-wK5.mjs.map +0 -1
  1354. package/dist/seo-Dsj8hy3j.mjs +0 -114
  1355. package/dist/seo-Dsj8hy3j.mjs.map +0 -1
  1356. package/dist/seo-XvH4LNNp.mjs +0 -133
  1357. package/dist/seo-XvH4LNNp.mjs.map +0 -1
  1358. package/dist/service-BsVG05gS.mjs +0 -150
  1359. package/dist/service-BsVG05gS.mjs.map +0 -1
  1360. package/dist/session-user-DgKbYrlj.mjs +0 -51
  1361. package/dist/session-user-DgKbYrlj.mjs.map +0 -1
  1362. package/dist/settings-CNPUntkh.mjs +0 -51
  1363. package/dist/settings-CNPUntkh.mjs.map +0 -1
  1364. package/dist/settings-D5EHi0Tk.mjs +0 -439
  1365. package/dist/settings-D5EHi0Tk.mjs.map +0 -1
  1366. package/dist/settings-DSfE7wOa.mjs +0 -61
  1367. package/dist/settings-DSfE7wOa.mjs.map +0 -1
  1368. package/dist/setup-complete-B8W8sJ9v.mjs +0 -26
  1369. package/dist/setup-complete-B8W8sJ9v.mjs.map +0 -1
  1370. package/dist/setup-nonce-DnSBP260.mjs +0 -25
  1371. package/dist/setup-nonce-DnSBP260.mjs.map +0 -1
  1372. package/dist/site-settings-NGzdrt7O.mjs +0 -50
  1373. package/dist/site-settings-NGzdrt7O.mjs.map +0 -1
  1374. package/dist/site-url-D6JB7tLW.mjs +0 -16
  1375. package/dist/site-url-D6JB7tLW.mjs.map +0 -1
  1376. package/dist/snapshot-CdcwwWAf.mjs +0 -414
  1377. package/dist/snapshot-CdcwwWAf.mjs.map +0 -1
  1378. package/dist/ssrf-Dv0_tRpo.mjs +0 -406
  1379. package/dist/ssrf-Dv0_tRpo.mjs.map +0 -1
  1380. package/dist/stage-CUjhED3P.mjs +0 -662
  1381. package/dist/stage-CUjhED3P.mjs.map +0 -1
  1382. package/dist/staged-C36IWXff.mjs +0 -659
  1383. package/dist/staged-C36IWXff.mjs.map +0 -1
  1384. package/dist/state-CKouMCSY.mjs +0 -153
  1385. package/dist/state-CKouMCSY.mjs.map +0 -1
  1386. package/dist/status-lzyj4Uu7.mjs +0 -30
  1387. package/dist/status-lzyj4Uu7.mjs.map +0 -1
  1388. package/dist/storage-query-B-cWcTjJ.d.mts +0 -1594
  1389. package/dist/storage-query-B-cWcTjJ.d.mts.map +0 -1
  1390. package/dist/tar-DsTXX6ch.mjs +0 -449
  1391. package/dist/tar-DsTXX6ch.mjs.map +0 -1
  1392. package/dist/target-DLQCwp_Z.mjs +0 -27
  1393. package/dist/target-DLQCwp_Z.mjs.map +0 -1
  1394. package/dist/taxonomies-BlAjr4BL.mjs +0 -697
  1395. package/dist/taxonomies-BlAjr4BL.mjs.map +0 -1
  1396. package/dist/taxonomies-Byyo7LOZ.mjs +0 -939
  1397. package/dist/taxonomies-Byyo7LOZ.mjs.map +0 -1
  1398. package/dist/taxonomy-CKDwM61Y.mjs +0 -525
  1399. package/dist/taxonomy-CKDwM61Y.mjs.map +0 -1
  1400. package/dist/tokens-BojXlk49.mjs +0 -171
  1401. package/dist/tokens-BojXlk49.mjs.map +0 -1
  1402. package/dist/transaction-DLPQWik1.mjs +0 -29
  1403. package/dist/transaction-DLPQWik1.mjs.map +0 -1
  1404. package/dist/transfer-XSTh2BCr.mjs +0 -8706
  1405. package/dist/transfer-XSTh2BCr.mjs.map +0 -1
  1406. package/dist/transfer-download-DkoCDA9d.mjs +0 -33
  1407. package/dist/transfer-download-DkoCDA9d.mjs.map +0 -1
  1408. package/dist/transfer-iQ26J-RT.mjs +0 -166
  1409. package/dist/transfer-iQ26J-RT.mjs.map +0 -1
  1410. package/dist/transformations-C7RQabKQ.mjs +0 -196
  1411. package/dist/transformations-C7RQabKQ.mjs.map +0 -1
  1412. package/dist/transport-D3RulfD6.mjs +0 -136
  1413. package/dist/transport-D3RulfD6.mjs.map +0 -1
  1414. package/dist/transport-DhlZlf4D.d.mts +0 -42
  1415. package/dist/transport-DhlZlf4D.d.mts.map +0 -1
  1416. package/dist/trusted-proxy-B6ECOZJc.mjs +0 -51
  1417. package/dist/trusted-proxy-B6ECOZJc.mjs.map +0 -1
  1418. package/dist/turnstile-lqUiY7lP.mjs +0 -53
  1419. package/dist/turnstile-lqUiY7lP.mjs.map +0 -1
  1420. package/dist/types-4Dn9bZhu.mjs +0 -77
  1421. package/dist/types-4Dn9bZhu.mjs.map +0 -1
  1422. package/dist/types-5LSo7PPx.d.mts +0 -85
  1423. package/dist/types-5LSo7PPx.d.mts.map +0 -1
  1424. package/dist/types-BQ3hwYJT.d.mts +0 -896
  1425. package/dist/types-BQ3hwYJT.d.mts.map +0 -1
  1426. package/dist/types-BYEk7qo3.d.mts +0 -198
  1427. package/dist/types-BYEk7qo3.d.mts.map +0 -1
  1428. package/dist/types-CJKsWVFR.mjs +0 -199
  1429. package/dist/types-CJKsWVFR.mjs.map +0 -1
  1430. package/dist/types-Ca_w8mmY.d.mts +0 -363
  1431. package/dist/types-Ca_w8mmY.d.mts.map +0 -1
  1432. package/dist/types-CkE41ZAG.mjs +0 -18
  1433. package/dist/types-CkE41ZAG.mjs.map +0 -1
  1434. package/dist/types-D0aJW2uR.d.mts +0 -1641
  1435. package/dist/types-D0aJW2uR.d.mts.map +0 -1
  1436. package/dist/types-DbpN4Qto.d.mts +0 -372
  1437. package/dist/types-DbpN4Qto.d.mts.map +0 -1
  1438. package/dist/types-ILDI1sdY.mjs +0 -16
  1439. package/dist/types-ILDI1sdY.mjs.map +0 -1
  1440. package/dist/types-OC5c-edM.mjs +0 -22
  1441. package/dist/types-OC5c-edM.mjs.map +0 -1
  1442. package/dist/types-aOOxRSx6.mjs +0 -103
  1443. package/dist/types-aOOxRSx6.mjs.map +0 -1
  1444. package/dist/types-m1WbUffD.d.mts +0 -198
  1445. package/dist/types-m1WbUffD.d.mts.map +0 -1
  1446. package/dist/types-uxLoPBio.d.mts +0 -124
  1447. package/dist/types-uxLoPBio.d.mts.map +0 -1
  1448. package/dist/types-we5uR-tV.d.mts +0 -287
  1449. package/dist/types-we5uR-tV.d.mts.map +0 -1
  1450. package/dist/upload-attempts-DduMy6B0.mjs +0 -32
  1451. package/dist/upload-attempts-DduMy6B0.mjs.map +0 -1
  1452. package/dist/url-pattern-B3EwxAAk.mjs +0 -33
  1453. package/dist/url-pattern-B3EwxAAk.mjs.map +0 -1
  1454. package/dist/user-ElwQjTQT.mjs +0 -171
  1455. package/dist/user-ElwQjTQT.mjs.map +0 -1
  1456. package/dist/utils-BlAXmfOG.mjs +0 -439
  1457. package/dist/utils-BlAXmfOG.mjs.map +0 -1
  1458. package/dist/validate-CH0X5b2c.d.mts +0 -468
  1459. package/dist/validate-CH0X5b2c.d.mts.map +0 -1
  1460. package/dist/validate-CfgRpcjA.mjs +0 -492
  1461. package/dist/validate-CfgRpcjA.mjs.map +0 -1
  1462. package/dist/validation-DvYJtv4k.mjs +0 -218
  1463. package/dist/validation-DvYJtv4k.mjs.map +0 -1
  1464. package/dist/version-DgYjhTud.mjs +0 -9
  1465. package/dist/version-DgYjhTud.mjs.map +0 -1
  1466. package/dist/version-Dq71scUb.mjs +0 -7
  1467. package/dist/version-Dq71scUb.mjs.map +0 -1
  1468. package/dist/widgets-ChFIj0be.mjs +0 -126
  1469. package/dist/widgets-ChFIj0be.mjs.map +0 -1
  1470. package/dist/wxr-taxonomies-CBZMp2YX.mjs +0 -372
  1471. package/dist/wxr-taxonomies-CBZMp2YX.mjs.map +0 -1
  1472. package/dist/wxr-taxonomies-DlKDpWN1.d.mts +0 -34
  1473. package/dist/wxr-taxonomies-DlKDpWN1.d.mts.map +0 -1
  1474. package/dist/zod-generator-DmTKI-Ig.mjs +0 -426
  1475. package/dist/zod-generator-DmTKI-Ig.mjs.map +0 -1
  1476. package/src/cli/commands/bundle-utils.ts +0 -408
  1477. package/src/cli/commands/bundle.ts +0 -659
  1478. package/src/cli/commands/plugin-init.ts +0 -417
  1479. package/src/cli/commands/plugin-validate.ts +0 -31
  1480. package/src/cli/commands/plugin.ts +0 -33
  1481. package/src/cli/commands/publish.ts +0 -721
  1482. /package/dist/{api-tokens-FaG1zPsj.mjs → api-tokens-BLz2MtQs.mjs} +0 -0
  1483. /package/dist/{ssrf-DZOt8Qof.mjs → ssrf-tA45vIPX.mjs} +0 -0
@@ -0,0 +1,1614 @@
1
+ import { f as UpdateContentInput, i as ContentItem, l as FindManyOptions, s as CreateContentInput, t as BylineSummary, u as FindManyResult } from "./types-Cw-1it3n.mjs";
2
+ import { t as Database } from "./types-DZeDpzMc.mjs";
3
+ import { At as MediaBytes, Bt as PageMetadataEvent, D as ContentAccess, Dn as SettingsAccess, E as ConditionalWriteResult, En as SettingField, Et as MediaAccess, G as ContentItem$1, Gn as VersionedValue, H as ContentCreateOptions, Hn as UserInfo, It as PageFragmentContribution, J as ContentPolicyEvent, Kn as WhereClause, Lt as PageFragmentEvent, Mt as MediaMetadataPatch, Nn as TaxonomyAccessWithWrite, O as ContentAccessWithWrite, On as SiteInfo, Q as ContentSchedulePolicyEvent, Sn as ResolvedPlugin, T as ConditionalDeleteResult, Tn as SchemaAccess, Un as VersionedContentItem, Vn as UpdateIfResult, Wt as PaginatedResult, Xt as PluginCommentStatus, Yt as PluginComment, Zt as PluginContentCreateCallback, _ as CommentAfterModerateEvent, bn as RequestMeta, fn as QueryOptions, h as CommentAfterCreateEvent, ht as EmailMessage, in as PluginManifest, it as CronEvent, jt as MediaItem$1, kn as StorageCollection, m as CommentAccess, mn as RedirectAccessWithWrite, nt as ContentWriteInput, ot as CronTaskInfo, pn as RedirectAccess, r as BylineAccess, rt as CronAccess, t as ActorInfo, xt as HttpAccess, y as CommentBeforeCreateEvent, zt as PageMetadataContribution } from "./types-pOLeFKGq.mjs";
4
+ import { t as OptionsRepository } from "./options-C2IDQnD2.mjs";
5
+ import { d as Storage } from "./types-C_V-_vMS.mjs";
6
+ import { Kysely } from "kysely";
7
+ import { PluginUiContext } from "@emdash-cms/blocks/server";
8
+
9
+ //#region src/config/secrets.d.ts
10
+ /**
11
+ * A parsed encryption key with its kid (key id) fingerprint.
12
+ *
13
+ * `kid` is the first 8 chars of the SHA-256 hash of the decoded key bytes
14
+ * (lowercase hex), used to tag envelopes so the decryptor can pick the right
15
+ * key during rotation.
16
+ */
17
+ interface ParsedEncryptionKey {
18
+ /** 8-char lowercase hex fingerprint derived from the decoded key bytes. */
19
+ kid: string;
20
+ /** The 32 raw key bytes, ready for `crypto.subtle.importKey`. */
21
+ key: Uint8Array;
22
+ /** The original env-var-formatted string (kept for re-emit; never log). */
23
+ raw: string;
24
+ }
25
+ /** Environment-variable shape consulted by the resolver. */
26
+ interface SecretsEnv {
27
+ /**
28
+ * Read by `validateEncryptionKeyAtStartup` and the plugin-secret encryption
29
+ * layer. **Not** consulted by `resolveSecrets`,
30
+ * so a malformed value can't 500 the preview/comment hot paths.
31
+ */
32
+ EMDASH_ENCRYPTION_KEY?: string;
33
+ EMDASH_PREVIEW_SECRET?: string;
34
+ /** Legacy alias; new docs point at EMDASH_PREVIEW_SECRET. */
35
+ PREVIEW_SECRET?: string;
36
+ EMDASH_IP_SALT?: string;
37
+ /**
38
+ * Legacy fallback. Prior code derived the IP salt from
39
+ * `EMDASH_AUTH_SECRET || AUTH_SECRET || "emdash-ip-salt"`. We preserve
40
+ * the env-var fallback (so existing installs keep their stable salt)
41
+ * but no longer read it from `import.meta.env` in route handlers.
42
+ */
43
+ EMDASH_AUTH_SECRET?: string;
44
+ /** Legacy alias. */
45
+ AUTH_SECRET?: string;
46
+ }
47
+ /**
48
+ * Resolve the encryption keys used for plugin secret settings.
49
+ *
50
+ * This is deliberately separate from `resolveSecrets`: plugin settings are
51
+ * not on the anonymous request path, and a missing or malformed key must only
52
+ * fail operations that need encrypted plugin settings.
53
+ */
54
+ declare function resolvePluginEncryptionKeys(env?: SecretsEnv): Promise<ParsedEncryptionKey[] | null>;
55
+ //#endregion
56
+ //#region src/datetime-normalization.d.ts
57
+ interface DatetimeFieldDescriptor {
58
+ slug: string;
59
+ type: "datetime" | "repeater";
60
+ datetimeSubFields?: readonly string[];
61
+ }
62
+ //#endregion
63
+ //#region src/database/content-datetime.d.ts
64
+ interface UrlFieldDescriptor {
65
+ slug: string;
66
+ urlSubFields?: readonly string[];
67
+ }
68
+ interface DatetimeContext {
69
+ timezone: string;
70
+ fields: DatetimeFieldDescriptor[];
71
+ urlFields: UrlFieldDescriptor[];
72
+ }
73
+ /**
74
+ * Datetime contexts by collection slug, shared so that a bulk write reads each
75
+ * collection's context once. A cached context doesn't see later writes to the
76
+ * `site:timezone` setting or to field definitions, so share one only across
77
+ * work that makes neither.
78
+ */
79
+ type DatetimeContextCache = Map<string, Promise<DatetimeContext>>;
80
+ //#endregion
81
+ //#region src/database/repositories/content.d.ts
82
+ type ContentRevisionPrecondition = Pick<ContentItem, "version" | "updatedAt">;
83
+ /**
84
+ * Repository for content CRUD operations
85
+ *
86
+ * Content is stored in per-collection tables (ec_posts, ec_pages, etc.)
87
+ * Each field becomes a real column in the table.
88
+ */
89
+ declare class ContentRepository {
90
+ private db;
91
+ private readonly datetimeContexts?;
92
+ private readonly datetimes;
93
+ constructor(db: Kysely<Database>, datetimeContexts?: DatetimeContextCache | undefined);
94
+ /**
95
+ * Create a new content item
96
+ */
97
+ create(input: CreateContentInput): Promise<ContentItem>;
98
+ /**
99
+ * Generate a unique slug for a content item within a collection.
100
+ *
101
+ * Checks the collection table for existing slugs that match `baseSlug`
102
+ * (optionally scoped to a locale) and appends a numeric suffix (`-1`,
103
+ * `-2`, etc.) on collision to guarantee uniqueness.
104
+ *
105
+ * Returns null when slug normalization cannot produce a value.
106
+ */
107
+ generateUniqueSlug(type: string, text: string, locale?: string): Promise<string | null>;
108
+ /**
109
+ * Duplicate a content item
110
+ * Creates a new draft copy with "(Copy)" appended to the title.
111
+ * A slug is auto-generated from the new title by the handler layer.
112
+ */
113
+ duplicate(type: string, id: string, authorId?: string): Promise<ContentItem>;
114
+ /**
115
+ * Find content by ID
116
+ */
117
+ findById(type: string, id: string): Promise<ContentItem | null>;
118
+ findManyByIds(type: string, ids: string[], options?: {
119
+ includeTrashed?: boolean;
120
+ }): Promise<Map<string, ContentItem>>;
121
+ findManyBySlugsInLocale(type: string, slugs: string[], locale: string, options?: {
122
+ includeTrashed?: boolean;
123
+ }): Promise<Map<string, ContentItem>>;
124
+ /**
125
+ * Find content by id, including trashed (soft-deleted) items.
126
+ * Used by restore endpoint for ownership checks.
127
+ *
128
+ * `deletedAt` rides along because the row is already in hand: a caller that
129
+ * has to know whether the row is trashed before touching anything else would
130
+ * otherwise pay a second read for a column this row already carries.
131
+ */
132
+ findByIdIncludingTrashed(type: string, id: string): Promise<(ContentItem & {
133
+ deletedAt: string | null;
134
+ }) | null>;
135
+ /**
136
+ * Find content by ID or slug. Tries ID first if it looks like a ULID,
137
+ * otherwise tries slug. Falls back to the other if the first lookup misses.
138
+ */
139
+ findByIdOrSlug(type: string, identifier: string, locale?: string): Promise<ContentItem | null>;
140
+ /**
141
+ * Find content by ID or slug, including trashed (soft-deleted) items.
142
+ * Used by restore/permanent-delete endpoints.
143
+ */
144
+ findByIdOrSlugIncludingTrashed(type: string, identifier: string, locale?: string): Promise<ContentItem | null>;
145
+ isTrashed(type: string, id: string): Promise<boolean>;
146
+ private _findByIdOrSlug;
147
+ /**
148
+ * Find content by slug
149
+ */
150
+ findBySlug(type: string, slug: string, locale?: string): Promise<ContentItem | null>;
151
+ /**
152
+ * Find content by slug, including trashed (soft-deleted) items.
153
+ * Used by restore/permanent-delete endpoints.
154
+ */
155
+ findBySlugIncludingTrashed(type: string, slug: string, locale?: string): Promise<ContentItem | null>;
156
+ /**
157
+ * Find many content items with filtering and pagination
158
+ */
159
+ findMany(type: string, options?: FindManyOptions): Promise<FindManyResult<ContentItem>>;
160
+ /**
161
+ * Update content
162
+ */
163
+ update(type: string, id: string, input: UpdateContentInput): Promise<ContentItem>;
164
+ restoreRevision(type: string, id: string, revisionData: Record<string, unknown>, authorId: string): Promise<{
165
+ item: ContentItem;
166
+ revisionId: string;
167
+ }>;
168
+ restoreDraftRevision(type: string, id: string, revisionData: Record<string, unknown>, authorId: string): Promise<string | null>;
169
+ /**
170
+ * Update plugin-authored fields without letting content columns diverge
171
+ * from the revision pointers that publication promotes.
172
+ */
173
+ updateDraftAware(type: string, id: string, input: UpdateContentInput): Promise<ContentItem>;
174
+ private deleteUnstagedRevision;
175
+ private replaceDraftRevisionForUpdate;
176
+ /**
177
+ * Copy non-translatable field values to every other entry in the
178
+ * translation group, trashed entries included.
179
+ *
180
+ * Only the fields present in `data` are copied. With `previous`, `data` is
181
+ * the entry's complete new state and only the fields whose value differs
182
+ * from `previous` are copied, an absent field as null. An entry that already
183
+ * holds every copied value is left untouched, so its `updated_at` does not
184
+ * move.
185
+ *
186
+ * On collections with revisions a changed entry also gets a new live
187
+ * revision, because republishing and unpublishing read that revision rather
188
+ * than the columns. A pending draft takes a value only where it still holds
189
+ * the entry's previous value, so an unpublished edit to the field survives.
190
+ */
191
+ syncNonTranslatableFields(type: string, sourceId: string, translationGroup: string, data: Record<string, unknown>, options?: {
192
+ previous?: Record<string, unknown>;
193
+ }): Promise<void>;
194
+ private syncSiblingValues;
195
+ /**
196
+ * Delete content (soft delete - moves to trash)
197
+ */
198
+ delete(type: string, id: string): Promise<boolean>;
199
+ /**
200
+ * Restore content from trash
201
+ *
202
+ * The entry comes back as a draft with no schedule. The live version is not
203
+ * copied into a draft revision: collections without revisions save to the
204
+ * columns, and a draft revision would hide those saves.
205
+ */
206
+ restore(type: string, id: string, expectedRevision?: ContentRevisionPrecondition): Promise<ContentItem | null>;
207
+ /**
208
+ * Permanently delete content (cannot be undone)
209
+ */
210
+ /**
211
+ * Permanently delete a soft-deleted content row.
212
+ *
213
+ * Returns `true` only when a soft-deleted (trashed) row was removed.
214
+ * Returns `false` when no row exists OR when the row exists but is live —
215
+ * the caller is responsible for distinguishing these cases (typically via
216
+ * a follow-up `findByIdOrSlugIncludingTrashed` to surface NOT_FOUND vs
217
+ * NOT_TRASHED). The `AND deleted_at IS NOT NULL` clause is the safety net
218
+ * that prevents permanent delete from bypassing the trash workflow.
219
+ */
220
+ permanentDelete(type: string, id: string): Promise<boolean>;
221
+ /**
222
+ * Find trashed content items
223
+ */
224
+ findTrashed(type: string, options?: Omit<FindManyOptions, "where"> & {
225
+ where?: {
226
+ locale?: string;
227
+ };
228
+ }): Promise<FindManyResult<ContentItem & {
229
+ deletedAt: string;
230
+ }>>;
231
+ /**
232
+ * Count trashed content items
233
+ */
234
+ countTrashed(type: string, options?: {
235
+ locale?: string;
236
+ }): Promise<number>;
237
+ /**
238
+ * Apply the optional `q` filter.
239
+ *
240
+ * When the handler sets `useFts` (collection has a healthy FTS5 index
241
+ * covering the display columns; SQLite only), the filter is served from
242
+ * the index: a token-prefix MATCH against `_emdash_fts_<slug>` OR'd with
243
+ * an index-served `slug GLOB 'term*'` prefix (the slug is not in the FTS
244
+ * index). Both sides are index-backed, so SQLite's OR optimization avoids
245
+ * the full-table scan the LIKE fallback needs (#1517). The trade-off is
246
+ * search semantics: token-prefix matching instead of arbitrary substring.
247
+ *
248
+ * Fallback (Postgres, search disabled, or no usable terms): case-
249
+ * insensitive substring LIKE across the handler-resolved `searchColumns`
250
+ * (OR'd). User input is treated literally (LIKE wildcards escaped) and
251
+ * `lower()` is applied on both sides for SQLite/Postgres parity.
252
+ */
253
+ private applySearchFilter;
254
+ /**
255
+ * Apply the optional inclusive date-range filter. The field is mapped
256
+ * through `DATE_FILTER_COLUMNS` (a closed whitelist), and bounds compare
257
+ * lexicographically against the stored ISO 8601 timestamps. A `publishedAt`
258
+ * range naturally excludes never-published rows (their column is NULL).
259
+ */
260
+ private applyDateFilter;
261
+ /**
262
+ * Apply the optional byline filter as a correlated (NOT) EXISTS against
263
+ * `_emdash_content_bylines`.
264
+ *
265
+ * Correlating from the content table preserves the outer sort index so
266
+ * `LIMIT` can short-circuit. `mode: "none"` tests the junction rather than
267
+ * `primary_byline_id` because the two are written in the same call but
268
+ * are not atomically consistent, so the junction is authoritative.
269
+ *
270
+ * Whether a credit *renders* is locale-scoped; whether one *exists* is
271
+ * not. Both are needed: the first decides what the filter matches, the
272
+ * second decides whether the author fallback applies at all.
273
+ */
274
+ private applyBylineFilter;
275
+ /**
276
+ * Count content items
277
+ */
278
+ count(type: string, where?: FindManyOptions["where"]): Promise<number>;
279
+ private countWithResolvedFilters;
280
+ /**
281
+ * Distinct, non-null `author_id` values across the collection's live
282
+ * (non-trashed) content. Used to populate the admin author filter with
283
+ * only the users who have actually authored entries, rather than the
284
+ * full user directory (which requires admin privileges to read).
285
+ */
286
+ findDistinctAuthorIds(type: string): Promise<string[]>;
287
+ getStats(type: string, now?: Date): Promise<{
288
+ total: number;
289
+ published: number;
290
+ draft: number;
291
+ scheduled: number;
292
+ overdueScheduled: number;
293
+ }>;
294
+ /**
295
+ * Schedule content for future publishing
296
+ *
297
+ * Sets status to 'scheduled' and stores the scheduled publish time.
298
+ * The content will be auto-published when the scheduled time is reached.
299
+ */
300
+ schedule(type: string, id: string, scheduledAt: string, currentTime?: Date, expectedRevision?: ContentRevisionPrecondition): Promise<ContentItem>;
301
+ /**
302
+ * Unschedule content
303
+ *
304
+ * Clears the scheduled time. Published posts stay published;
305
+ * draft/scheduled posts revert to 'draft'.
306
+ */
307
+ unschedule(type: string, id: string, expectedRevision?: ContentRevisionPrecondition): Promise<ContentItem>;
308
+ /**
309
+ * Find content that is ready to be published
310
+ *
311
+ * Returns all content where scheduled_at <= now, regardless of status.
312
+ * This covers both draft-scheduled posts (status='scheduled') and
313
+ * published posts with scheduled draft changes (status='published').
314
+ *
315
+ * `limit` (optional) caps how many due rows are returned, oldest-due first.
316
+ * The scheduled-publishing sweep passes a limit so a large backlog can't
317
+ * fan out unbounded publish/webhook work in a single tick (and blow a Worker
318
+ * invocation's CPU/subrequest budget); the remainder drains on later ticks.
319
+ */
320
+ findReadyToPublish(type: string, limit?: number, currentTime?: Date, after?: {
321
+ scheduledAt: string;
322
+ id: string;
323
+ }): Promise<ContentItem[]>;
324
+ findTranslationIds(type: string, translationGroup: string): Promise<string[]>;
325
+ findTranslationIdsForGroups(type: string, translationGroups: string[]): Promise<Map<string, string[]>>;
326
+ /**
327
+ * Find all translations in a translation group
328
+ */
329
+ findTranslations(type: string, translationGroup: string): Promise<ContentItem[]>;
330
+ /**
331
+ * Whether any row still shares `translationGroup`, trashed rows included.
332
+ * Group-keyed satellite data (term assignments, reference edges) is owned by
333
+ * the group, not by a single locale row, so a purge may only cascade to it
334
+ * once nothing is left to own it — and a trashed sibling is still restorable.
335
+ */
336
+ hasTranslationsIncludingTrashed(type: string, translationGroup: string, options?: {
337
+ excludeId?: string;
338
+ }): Promise<boolean>;
339
+ /**
340
+ * Batch variant of {@link findTranslations}: every (non-deleted) locale
341
+ * variant for any of `translationGroups`, in one `WHERE translation_group IN
342
+ * (...)` query chunked at `SQL_BATCH_SIZE` for D1's bind-parameter limit.
343
+ * Lets callers resolve many edge groups without an N+1 per group. The caller
344
+ * groups the flat result by `translationGroup` itself.
345
+ *
346
+ * `translation_group` leads the sort so the ordering follows
347
+ * `idx_{table}_del_tg_locale` past its `deleted_at` equality; callers group by
348
+ * `translationGroup`, so the per-group locale order they rely on is preserved.
349
+ *
350
+ * `publishedOnly` restricts the result to `status = 'published'` — reference
351
+ * reads pass this for callers without `content:read_drafts` so draft/scheduled
352
+ * entries never leak through an edge traversal.
353
+ *
354
+ * A reference edge stores only a collection slug (no SQL FK), so the table may
355
+ * have been dropped since the edge was written. That is a tolerated dangling
356
+ * state, not an error: a missing table resolves to no rows, mirroring how the
357
+ * content read handlers treat `isMissingTableError`.
358
+ */
359
+ findTranslationsForGroups(type: string, translationGroups: string[], options?: {
360
+ publishedOnly?: boolean;
361
+ }): Promise<ContentItem[]>;
362
+ /**
363
+ * Batch variant of {@link findByIdOrSlug}: resolve many identifiers (each an
364
+ * id OR a slug) within `type` in a constant number of queries — one `WHERE id
365
+ * IN (...)` and one `WHERE slug IN (...)`, each chunked at `SQL_BATCH_SIZE`.
366
+ * Returns a map from the input identifier to its resolved item; identifiers
367
+ * that match nothing are absent. Used on write paths that accept a list of
368
+ * references, so a single request doesn't fan out to an N+1 of point lookups.
369
+ *
370
+ * Resolution mirrors {@link findByIdOrSlug}: a ULID-shaped identifier prefers
371
+ * the id match and falls back to slug; anything else prefers the slug match
372
+ * and falls back to id. Slug matches collapse to the lowest-locale variant
373
+ * (`ORDER BY locale ASC`), matching the slug-without-locale lookup.
374
+ */
375
+ findManyByIdOrSlug(type: string, identifiers: string[]): Promise<Map<string, ContentItem>>;
376
+ /**
377
+ * Publish the current draft
378
+ *
379
+ * Promotes draft_revision_id to live_revision_id and clears draft pointer.
380
+ * Syncs the draft revision's data into the content table columns so the
381
+ * content table always reflects the published version.
382
+ * If no draft revision exists, creates one from current data and publishes it.
383
+ * When `promoteRevision` is false, publishes the current content-table data
384
+ * by changing lifecycle metadata only.
385
+ *
386
+ * `publishedAt` (optional) overrides the publication timestamp. If omitted,
387
+ * the existing `published_at` is preserved (idempotent re-publish keeps the
388
+ * original date) and falls back to the current time on first publish. Pass
389
+ * an explicit value to backdate a publish (e.g. when migrating content from
390
+ * another CMS).
391
+ *
392
+ * `requireDue` gates the final update on the row still being due.
393
+ * `expectedScheduledAt` additionally fences changes made after a sweep
394
+ * selected the row but before publication preparation began.
395
+ */
396
+ publish(type: string, id: string, publishedAt?: string, requireDue?: boolean, expectedScheduledAt?: string, promoteRevision?: boolean, requireSlug?: boolean, expectedRevision?: ContentRevisionPrecondition, currentTime?: Date): Promise<ContentItem>;
397
+ /**
398
+ * Unpublish content
399
+ *
400
+ * Removes live pointer and cancels any pending schedule, but preserves the
401
+ * draft and publication date. If no draft exists, creates one from the live
402
+ * version so the content isn't lost.
403
+ */
404
+ unpublish(type: string, id: string, expectedRevision?: ContentRevisionPrecondition): Promise<ContentItem>;
405
+ /**
406
+ * Set the draft revision pointer for a content item.
407
+ *
408
+ * Used by seed/import paths that stage a new revision's data before
409
+ * promoting it to live via `publish()`.
410
+ *
411
+ * Validates that the content item exists and is not soft-deleted, that
412
+ * the revision exists, and that the revision belongs to the same
413
+ * collection and entry. Without these checks, a caller could leave the
414
+ * content row pointing at a missing or unrelated revision.
415
+ */
416
+ setDraftRevision(type: string, id: string, revisionId: string): Promise<void>;
417
+ replaceDraftRevision(type: string, id: string, revisionId: string, expected: Pick<ContentItem, "version" | "liveRevisionId" | "draftRevisionId">): Promise<boolean>;
418
+ /**
419
+ * Discard pending draft changes
420
+ *
421
+ * Clears draft_revision_id. The content table columns already hold the
422
+ * published version, so no data sync is needed.
423
+ */
424
+ discardDraft(type: string, id: string, expectedRevision?: ContentRevisionPrecondition): Promise<ContentItem>;
425
+ /**
426
+ * Count content items with a pending schedule.
427
+ * Includes both draft-scheduled (status='scheduled') and published
428
+ * posts with scheduled draft changes (status='published', scheduled_at set).
429
+ */
430
+ countScheduled(type: string): Promise<number>;
431
+ /**
432
+ * Map database row to ContentItem
433
+ * Extracts system columns and puts content fields in data
434
+ * Excludes null values from data to match input semantics
435
+ */
436
+ private mapRow;
437
+ private normalizeFilterScalar;
438
+ private normalizeFieldFilter;
439
+ private collectionExists;
440
+ private resolveFieldFilters;
441
+ private applyFieldFilters;
442
+ /**
443
+ * Map order field names to database columns.
444
+ * Only allows known fields to prevent column enumeration via crafted orderBy values.
445
+ */
446
+ private mapOrderField;
447
+ private resolveOrderField;
448
+ }
449
+ //#endregion
450
+ //#region src/media/focal-point.d.ts
451
+ interface FocalPointUpdate {
452
+ focalX?: number | null;
453
+ focalY?: number | null;
454
+ }
455
+ //#endregion
456
+ //#region src/database/repositories/media.d.ts
457
+ type MediaStatus = "pending" | "ready" | "failed";
458
+ interface MediaItem {
459
+ id: string;
460
+ filename: string;
461
+ mimeType: string;
462
+ size: number | null;
463
+ width: number | null;
464
+ height: number | null;
465
+ focalX: number | null;
466
+ focalY: number | null;
467
+ alt: string | null;
468
+ caption: string | null;
469
+ storageKey: string;
470
+ status: MediaStatus;
471
+ contentHash: string | null;
472
+ blurhash: string | null;
473
+ dominantColor: string | null;
474
+ createdAt: string;
475
+ authorId: string | null;
476
+ folderId?: string | null;
477
+ }
478
+ interface CreateMediaInput {
479
+ filename: string;
480
+ mimeType: string;
481
+ size?: number;
482
+ width?: number;
483
+ height?: number;
484
+ alt?: string;
485
+ caption?: string;
486
+ storageKey: string;
487
+ contentHash?: string;
488
+ blurhash?: string;
489
+ dominantColor?: string;
490
+ status?: MediaStatus;
491
+ authorId?: string;
492
+ folderId?: string | null;
493
+ }
494
+ interface FindManyMediaOptions {
495
+ limit?: number;
496
+ cursor?: string;
497
+ /** Filter by MIME type. Pass a string for a single prefix/exact, or an array to match any. Strings ending with "/" are treated as LIKE prefix matches; others are exact equality. */
498
+ mimeType?: string | readonly string[];
499
+ status?: MediaStatus | "all";
500
+ /** Case-insensitive substring matched against the filename (covers filename and extension). */
501
+ q?: string;
502
+ /** Omit for all media, pass null for the Main library, or pass a folder ID. */
503
+ folderId?: string | null;
504
+ }
505
+ interface UpdateMediaInput extends FocalPointUpdate {
506
+ alt?: string | null;
507
+ caption?: string | null;
508
+ width?: number;
509
+ height?: number;
510
+ folderId?: string | null;
511
+ }
512
+ interface ReplaceReadyMediaInput {
513
+ size: number;
514
+ width: number;
515
+ height: number;
516
+ contentHash: string;
517
+ }
518
+ interface FindMediaPageOptions extends Omit<FindManyMediaOptions, "cursor"> {
519
+ page: number;
520
+ }
521
+ interface MediaPageResult {
522
+ items: MediaItem[];
523
+ totalCount: number;
524
+ }
525
+ /**
526
+ * Media repository for database operations
527
+ */
528
+ declare class MediaRepository {
529
+ private db;
530
+ constructor(db: Kysely<Database>);
531
+ /**
532
+ * Create a new media item
533
+ */
534
+ create(input: CreateMediaInput): Promise<MediaItem>;
535
+ /**
536
+ * Create a pending media item (for signed URL upload flow)
537
+ */
538
+ createPending(input: {
539
+ filename: string;
540
+ mimeType: string;
541
+ size?: number;
542
+ storageKey: string;
543
+ contentHash?: string;
544
+ authorId?: string;
545
+ folderId?: string | null;
546
+ }): Promise<MediaItem>;
547
+ createUploadAttempt(mediaId: string, storageKey: string): Promise<void>;
548
+ /**
549
+ * Register a stored object for cleanup before its media row is removed,
550
+ * so a failed storage delete is retried by the cleanup sweep instead of
551
+ * leaving the object unreferenced and unreachable.
552
+ */
553
+ trackStorageKeyForCleanup(mediaId: string, storageKey: string): Promise<void>;
554
+ hasUploadAttempt(storageKey: string): Promise<boolean>;
555
+ claimUploadAttemptForCleanup(storageKey: string): Promise<boolean>;
556
+ deleteUploadAttempt(storageKey: string): Promise<void>;
557
+ deferUploadAttemptCleanup(storageKey: string): Promise<void>;
558
+ deleteCompletedUploadAttempts(): Promise<number>;
559
+ findUploadAttemptsForCleanup(maxAgeMs?: number, limit?: number): Promise<string[]>;
560
+ publishPendingStorageKey(id: string, expectedStorageKey: string, storageKey: string, contentHash?: string): Promise<boolean>;
561
+ /**
562
+ * Confirm upload (mark as ready)
563
+ */
564
+ confirmUpload(id: string, metadata?: {
565
+ width?: number;
566
+ height?: number;
567
+ size?: number;
568
+ blurhash?: string;
569
+ dominantColor?: string;
570
+ contentHash?: string | null;
571
+ }, expectedStorageKey?: string): Promise<MediaItem | null>;
572
+ /**
573
+ * Mark upload as failed
574
+ */
575
+ markFailed(id: string, expectedStorageKey?: string): Promise<MediaItem | null>;
576
+ /**
577
+ * Find the pending media row minted for a signed upload URL.
578
+ */
579
+ findPendingByStorageKey(storageKey: string): Promise<MediaItem | null>;
580
+ /**
581
+ * Find media by ID
582
+ */
583
+ findById(id: string): Promise<MediaItem | null>;
584
+ /**
585
+ * Find media by filename
586
+ * Useful for idempotent imports
587
+ */
588
+ findByFilename(filename: string): Promise<MediaItem | null>;
589
+ findAvailableFilename(filename: string): Promise<string>;
590
+ /**
591
+ * Find media by content hash
592
+ * Used for deduplication - same content = same hash
593
+ */
594
+ findByContentHash(contentHash: string): Promise<MediaItem | null>;
595
+ /**
596
+ * Find many media items with cursor pagination
597
+ *
598
+ * Uses keyset pagination (cursor-based) for consistent results.
599
+ * The cursor encodes the created_at and id of the last item.
600
+ */
601
+ findMany(options?: FindManyMediaOptions): Promise<FindManyResult<MediaItem>>;
602
+ findPage(options: FindMediaPageOptions): Promise<MediaPageResult>;
603
+ /**
604
+ * Update media metadata
605
+ */
606
+ update(id: string, input: UpdateMediaInput): Promise<MediaItem | null>;
607
+ updateReadyMetadata(id: string, input: Pick<UpdateMediaInput, "alt" | "caption" | "focalX" | "focalY">): Promise<MediaItem | null>;
608
+ replaceReadyFile(id: string, expectedStorageKey: string, input: ReplaceReadyMediaInput): Promise<MediaItem | null>;
609
+ /**
610
+ * Delete media item
611
+ */
612
+ deleteWithStorageKey(id: string): Promise<string | null>;
613
+ isStorageKeyReferenced(storageKey: string): Promise<boolean>;
614
+ delete(id: string): Promise<boolean>;
615
+ /**
616
+ * Count media items
617
+ */
618
+ count(mimeType?: string | readonly string[]): Promise<number>;
619
+ private applyListFilters;
620
+ /**
621
+ * Delete pending uploads older than the given age.
622
+ * Pending uploads that were never confirmed indicate abandoned upload flows.
623
+ *
624
+ * Returns the storage keys of deleted rows so callers can remove the
625
+ * corresponding files from object storage.
626
+ */
627
+ cleanupPendingUploads(maxAgeMs?: number): Promise<string[]>;
628
+ /**
629
+ * Convert database row to MediaItem
630
+ */
631
+ private rowToItem;
632
+ }
633
+ //#endregion
634
+ //#region src/database/repositories/plugin-storage.d.ts
635
+ declare class PluginStorageRepository<T = unknown> implements StorageCollection<T> {
636
+ private db;
637
+ private pluginId;
638
+ private collection;
639
+ private indexedFields;
640
+ constructor(db: Kysely<Database>, pluginId: string, collection: string, indexes: Array<string | string[]>);
641
+ /**
642
+ * Get a document by ID
643
+ */
644
+ get(id: string): Promise<T | null>;
645
+ /**
646
+ * Store a document
647
+ */
648
+ put(id: string, data: T): Promise<void>;
649
+ getVersioned(id: string): Promise<VersionedValue<T> | null>;
650
+ compareAndSet(id: string, expectedRevision: string | null, data: T): Promise<ConditionalWriteResult>;
651
+ compareAndDelete(id: string, expectedRevision: string): Promise<ConditionalDeleteResult>;
652
+ /**
653
+ * Delete a document
654
+ */
655
+ delete(id: string): Promise<boolean>;
656
+ /**
657
+ * Check if a document exists
658
+ */
659
+ exists(id: string): Promise<boolean>;
660
+ /**
661
+ * Get multiple documents by ID
662
+ */
663
+ getMany(ids: string[]): Promise<Map<string, T>>;
664
+ /**
665
+ * Store multiple documents
666
+ */
667
+ putMany(items: Array<{
668
+ id: string;
669
+ data: T;
670
+ }>): Promise<void>;
671
+ /**
672
+ * Delete multiple documents
673
+ */
674
+ deleteMany(ids: string[]): Promise<number>;
675
+ /**
676
+ * Query documents with filters
677
+ */
678
+ query(options?: QueryOptions): Promise<PaginatedResult<{
679
+ id: string;
680
+ data: T;
681
+ }>>;
682
+ /**
683
+ * Count documents matching a filter
684
+ */
685
+ count(where?: WhereClause): Promise<number>;
686
+ updateIf(id: string, args: unknown): Promise<UpdateIfResult<T>>;
687
+ }
688
+ //#endregion
689
+ //#region src/plugins/hooks.d.ts
690
+ type HookNameV2 = "plugin:install" | "plugin:activate" | "plugin:deactivate" | "plugin:uninstall" | "content:beforeSave" | "content:afterSave" | "content:beforeDelete" | "content:afterDelete" | "content:beforePublish" | "content:beforeSchedule" | "content:beforeUnpublish" | "content:afterPublish" | "content:afterUnpublish" | "content:afterRestore" | "content:afterSchedule" | "content:afterUnschedule" | "media:beforeUpload" | "media:afterUpload" | "cron" | "email:beforeSend" | "email:deliver" | "email:afterSend" | "comment:beforeCreate" | "comment:moderate" | "comment:afterCreate" | "comment:afterModerate" | "byline:afterSave" | "byline:afterDelete" | "page:metadata" | "page:fragments";
691
+ type ContentPolicyHookName = "content:beforePublish" | "content:beforeSchedule" | "content:beforeUnpublish";
692
+ type ContentPolicyRunResult = {
693
+ cancellation?: {
694
+ pluginId: string;
695
+ reason: string;
696
+ };
697
+ results: HookResult<void>[];
698
+ };
699
+ /**
700
+ * Hook execution result
701
+ */
702
+ interface HookResult<T> {
703
+ success: boolean;
704
+ value?: T;
705
+ error?: Error;
706
+ pluginId: string;
707
+ duration: number;
708
+ }
709
+ /**
710
+ * Hook pipeline for executing hooks in order
711
+ */
712
+ declare class HookPipeline {
713
+ private hooks;
714
+ private pluginMap;
715
+ private contextFactory;
716
+ /** Stored so setContextFactory can merge incrementally. */
717
+ private contextFactoryOptions;
718
+ /** Hook names where at least one handler declared exclusive: true */
719
+ private exclusiveHookNames;
720
+ /**
721
+ * Selected provider plugin ID for each exclusive hook.
722
+ * Set by the PluginManager after resolution.
723
+ */
724
+ private exclusiveSelections;
725
+ constructor(plugins: ResolvedPlugin[], factoryOptions?: PluginContextFactoryOptions);
726
+ /**
727
+ * Set or update the context factory options.
728
+ *
729
+ * When called on a pipeline that already has a factory, the new options
730
+ * are merged on top of the existing ones so that callers don't need to
731
+ * repeat every field (e.g. adding `cronReschedule` without losing
732
+ * `storage` / `getUploadUrl`).
733
+ */
734
+ setContextFactory(options: Partial<PluginContextFactoryOptions>): void;
735
+ /**
736
+ * Get context for a plugin
737
+ */
738
+ private getContext;
739
+ /**
740
+ * Get typed hooks for a specific hook name.
741
+ * The internal map stores ResolvedHook<unknown>, but we know each name
742
+ * maps to a specific handler type via HookHandlerMap.
743
+ *
744
+ * Exclusive hooks that have a selected provider are filtered out — they
745
+ * should only run via invokeExclusiveHook(), not in the regular pipeline.
746
+ */
747
+ private getTypedHooks;
748
+ /**
749
+ * Register all hooks from plugins.
750
+ *
751
+ * Registers each hook name individually to preserve type safety. The
752
+ * internal map stores ResolvedHook<unknown> since it's keyed by string,
753
+ * but getTypedHooks() restores the correct handler type on retrieval.
754
+ */
755
+ private registerPlugins;
756
+ /**
757
+ * Maps hook names to the capability required to register them.
758
+ *
759
+ * Hooks not listed here have no capability requirement (e.g. lifecycle
760
+ * hooks, cron). Any plugin declaring a listed hook without the required
761
+ * capability will have that hook silently skipped at registration time.
762
+ */
763
+ private static readonly HOOK_REQUIRED_CAPABILITY;
764
+ /**
765
+ * Register a single plugin's hook by name
766
+ */
767
+ private registerPluginHook;
768
+ /**
769
+ * Register a single hook
770
+ */
771
+ private registerHook;
772
+ /**
773
+ * Sort hooks by priority and dependencies
774
+ */
775
+ private sortHooks;
776
+ /**
777
+ * Execute a hook with timeout
778
+ */
779
+ private executeWithTimeout;
780
+ /**
781
+ * Run plugin:install hooks
782
+ */
783
+ runPluginInstall(pluginId: string): Promise<HookResult<void>[]>;
784
+ /**
785
+ * Run plugin:activate hooks
786
+ */
787
+ runPluginActivate(pluginId: string): Promise<HookResult<void>[]>;
788
+ /**
789
+ * Run plugin:deactivate hooks
790
+ */
791
+ runPluginDeactivate(pluginId: string): Promise<HookResult<void>[]>;
792
+ /**
793
+ * Run plugin:uninstall hooks
794
+ */
795
+ runPluginUninstall(pluginId: string, deleteData: boolean): Promise<HookResult<void>[]>;
796
+ private runLifecycleHook;
797
+ /**
798
+ * Run content:beforeSave hooks
799
+ * Returns modified content from the pipeline. `id` is the existing item's
800
+ * ID when updating. `actor` is the authenticated user that triggered the
801
+ * save, when one is available.
802
+ */
803
+ runContentBeforeSave(content: Record<string, unknown>, collection: string, isNew: boolean, id?: string, actor?: ActorInfo): Promise<{
804
+ content: Record<string, unknown>;
805
+ results: HookResult<Record<string, unknown>>[];
806
+ }>;
807
+ /**
808
+ * Run content:afterSave hooks
809
+ */
810
+ runContentAfterSave(content: Record<string, unknown>, collection: string, isNew: boolean, actor?: ActorInfo, excludePluginId?: string): Promise<HookResult<void>[]>;
811
+ /**
812
+ * Run content:beforeDelete hooks
813
+ * Returns whether deletion is allowed
814
+ */
815
+ runContentBeforeDelete(id: string, collection: string): Promise<{
816
+ allowed: boolean;
817
+ results: HookResult<boolean>[];
818
+ }>;
819
+ /**
820
+ * Run content:afterDelete hooks
821
+ */
822
+ runContentAfterDelete(id: string, collection: string, permanent: boolean): Promise<HookResult<void>[]>;
823
+ runContentPolicy(name: "content:beforePublish", event: ContentPolicyEvent): Promise<ContentPolicyRunResult>;
824
+ runContentPolicy(name: "content:beforeSchedule", event: ContentSchedulePolicyEvent): Promise<ContentPolicyRunResult>;
825
+ runContentPolicy(name: "content:beforeUnpublish", event: ContentPolicyEvent): Promise<ContentPolicyRunResult>;
826
+ runContentPolicy(name: ContentPolicyHookName, event: ContentPolicyEvent | ContentSchedulePolicyEvent): Promise<ContentPolicyRunResult>;
827
+ private runContentPolicyHooks;
828
+ /**
829
+ * Run content state-change hooks that all share the same event shape.
830
+ */
831
+ private runContentStateChangeHook;
832
+ /**
833
+ * Run content:afterPublish hooks (fire-and-forget).
834
+ */
835
+ runContentAfterPublish(content: Record<string, unknown>, collection: string): Promise<HookResult<void>[]>;
836
+ /**
837
+ * Run content:afterUnpublish hooks (fire-and-forget).
838
+ */
839
+ runContentAfterUnpublish(content: Record<string, unknown>, collection: string): Promise<HookResult<void>[]>;
840
+ /**
841
+ * Run content:afterRestore hooks (fire-and-forget).
842
+ */
843
+ runContentAfterRestore(content: Record<string, unknown>, collection: string): Promise<HookResult<void>[]>;
844
+ /**
845
+ * Run content:afterSchedule hooks (fire-and-forget).
846
+ */
847
+ runContentAfterSchedule(content: Record<string, unknown>, collection: string): Promise<HookResult<void>[]>;
848
+ /**
849
+ * Run content:afterUnschedule hooks (fire-and-forget).
850
+ */
851
+ runContentAfterUnschedule(content: Record<string, unknown>, collection: string): Promise<HookResult<void>[]>;
852
+ /**
853
+ * Run media:beforeUpload hooks
854
+ */
855
+ runMediaBeforeUpload(file: {
856
+ name: string;
857
+ type: string;
858
+ size: number;
859
+ }): Promise<{
860
+ file: {
861
+ name: string;
862
+ type: string;
863
+ size: number;
864
+ };
865
+ results: HookResult<{
866
+ name: string;
867
+ type: string;
868
+ size: number;
869
+ }>[];
870
+ }>;
871
+ /**
872
+ * Run media:afterUpload hooks
873
+ */
874
+ runMediaAfterUpload(media: {
875
+ id: string;
876
+ filename: string;
877
+ mimeType: string;
878
+ size: number | null;
879
+ url: string;
880
+ createdAt: string;
881
+ }): Promise<HookResult<void>[]>;
882
+ /**
883
+ * Invoke the cron hook for a specific plugin.
884
+ *
885
+ * Unlike other hooks which broadcast to all plugins, the cron hook is
886
+ * dispatched only to the target plugin — the one that owns the task.
887
+ */
888
+ invokeCronHook(pluginId: string, event: CronEvent): Promise<HookResult<void>>;
889
+ /**
890
+ * Run email:beforeSend hooks (middleware pipeline).
891
+ *
892
+ * Each handler receives the message and returns a modified message or
893
+ * `false` to cancel delivery. The pipeline chains message transformations —
894
+ * each handler receives the output of the previous one.
895
+ */
896
+ runEmailBeforeSend(message: EmailMessage, source: string): Promise<{
897
+ message: EmailMessage | false;
898
+ results: HookResult<EmailMessage | false>[];
899
+ }>;
900
+ /**
901
+ * Run email:afterSend hooks (fire-and-forget).
902
+ *
903
+ * Errors are logged but don't propagate — they don't affect the caller.
904
+ */
905
+ runEmailAfterSend(message: EmailMessage, source: string): Promise<HookResult<void>[]>;
906
+ /**
907
+ * Run comment:beforeCreate hooks (middleware pipeline).
908
+ *
909
+ * Each handler receives the event and returns a modified event or
910
+ * `false` to reject the comment. The pipeline chains transformations —
911
+ * each handler receives the output of the previous one.
912
+ */
913
+ runCommentBeforeCreate(event: CommentBeforeCreateEvent): Promise<CommentBeforeCreateEvent | false>;
914
+ /**
915
+ * Run comment:afterCreate hooks (fire-and-forget).
916
+ *
917
+ * Errors are logged but don't propagate — they don't affect the caller.
918
+ */
919
+ runCommentAfterCreate(event: CommentAfterCreateEvent): Promise<void>;
920
+ /**
921
+ * Run comment:afterModerate hooks (fire-and-forget).
922
+ *
923
+ * Errors are logged but don't propagate — they don't affect the caller.
924
+ */
925
+ runCommentAfterModerate(event: CommentAfterModerateEvent): Promise<void>;
926
+ /** Run byline:afterSave hooks. Errors are logged and never propagate. */
927
+ runBylineAfterSave(byline: BylineSummary, isNew: boolean): Promise<void>;
928
+ /** Run byline:afterDelete hooks. Errors are logged and never propagate. */
929
+ runBylineAfterDelete(byline: BylineSummary): Promise<void>;
930
+ private runLoggedHook;
931
+ /**
932
+ * Run page:metadata hooks. Each handler returns contributions that are
933
+ * merged by the metadata collector. Errors are logged but don't propagate.
934
+ */
935
+ runPageMetadata(event: PageMetadataEvent): Promise<Array<{
936
+ pluginId: string;
937
+ contributions: PageMetadataContribution[];
938
+ }>>;
939
+ /**
940
+ * Run page:fragments hooks. Only trusted plugins should be registered
941
+ * for this hook. Errors are logged but don't propagate.
942
+ */
943
+ runPageFragments(event: PageFragmentEvent): Promise<Array<{
944
+ pluginId: string;
945
+ contributions: PageFragmentContribution[];
946
+ }>>;
947
+ /**
948
+ * Check if any hooks are registered for a given name
949
+ */
950
+ hasHooks(name: HookNameV2): boolean;
951
+ /**
952
+ * Get hook count for debugging
953
+ */
954
+ getHookCount(name: HookNameV2): number;
955
+ /**
956
+ * Get all registered hook names
957
+ */
958
+ getRegisteredHooks(): HookNameV2[];
959
+ /**
960
+ * Returns hook names where at least one handler declared exclusive: true
961
+ */
962
+ getRegisteredExclusiveHooks(): string[];
963
+ /**
964
+ * Check if a hook is exclusive
965
+ */
966
+ isExclusiveHook(name: string): boolean;
967
+ /**
968
+ * Set the selected provider for an exclusive hook.
969
+ * Called by PluginManager after resolution.
970
+ */
971
+ setExclusiveSelection(hookName: string, pluginId: string): void;
972
+ /**
973
+ * Clear the selected provider for an exclusive hook.
974
+ */
975
+ clearExclusiveSelection(hookName: string): void;
976
+ /**
977
+ * Get the selected provider for an exclusive hook (if any).
978
+ */
979
+ getExclusiveSelection(hookName: string): string | undefined;
980
+ /**
981
+ * Get all plugins that registered a handler for a given exclusive hook.
982
+ */
983
+ getExclusiveHookProviders(hookName: string): Array<{
984
+ pluginId: string;
985
+ }>;
986
+ /**
987
+ * Get all plugins that registered a non-exclusive handler for a given
988
+ * hook (e.g. `email:beforeSend`, `email:afterSend`), preserving priority
989
+ * order. Partitions with `getExclusiveHookProviders()`, which returns
990
+ * plugins whose registration is marked `exclusive: true`.
991
+ */
992
+ getHookProviders(hookName: string): Array<{
993
+ pluginId: string;
994
+ }>;
995
+ /**
996
+ * Invoke an exclusive hook — dispatch only to the selected provider.
997
+ * Returns null if no provider is selected or if the selected hook
998
+ * is not found in the pipeline.
999
+ *
1000
+ * This is a generic dispatch used by the email pipeline and other
1001
+ * exclusive hook consumers. The handler type is unknown — callers
1002
+ * must know the expected signature.
1003
+ *
1004
+ * Errors are isolated: a failing handler returns an error result
1005
+ * instead of propagating the exception to the caller.
1006
+ */
1007
+ invokeExclusiveHook(hookName: string, event: unknown): Promise<{
1008
+ result: unknown;
1009
+ pluginId: string;
1010
+ error?: Error;
1011
+ duration: number;
1012
+ } | null>;
1013
+ }
1014
+ /**
1015
+ * Create a hook pipeline from plugins
1016
+ */
1017
+ declare function createHookPipeline(plugins: ResolvedPlugin[], factoryOptions?: PluginContextFactoryOptions): HookPipeline;
1018
+ //#endregion
1019
+ //#region src/plugins/email.d.ts
1020
+ /**
1021
+ * EmailPipeline orchestrates email delivery through the plugin hook system.
1022
+ *
1023
+ * The pipeline runs in three stages:
1024
+ * 1. email:beforeSend — middleware hooks that can transform or cancel messages
1025
+ * 2. email:deliver — exclusive hook dispatching to the selected provider
1026
+ * 3. email:afterSend — fire-and-forget hooks for logging/analytics
1027
+ */
1028
+ declare class EmailPipeline {
1029
+ private pipeline;
1030
+ constructor(pipeline: HookPipeline);
1031
+ /**
1032
+ * Replace the underlying hook pipeline.
1033
+ *
1034
+ * Called by the runtime when rebuilding the hook pipeline after a
1035
+ * plugin is enabled or disabled, so the email pipeline dispatches
1036
+ * to the current set of active hooks.
1037
+ */
1038
+ setPipeline(pipeline: HookPipeline): void;
1039
+ /**
1040
+ * Send an email through the full pipeline.
1041
+ *
1042
+ * @param message - The email to send
1043
+ * @param source - Where the email originated ("system" for auth, plugin ID for plugins)
1044
+ * @throws EmailNotConfiguredError if no provider is selected
1045
+ * @throws EmailRecursionError if called re-entrantly from within a hook
1046
+ * @throws Error if the provider handler throws
1047
+ */
1048
+ send(message: EmailMessage, source: string): Promise<void>;
1049
+ /**
1050
+ * Inner send implementation, separated from the recursion guard.
1051
+ */
1052
+ private sendInner;
1053
+ /**
1054
+ * Check if an email provider is configured and available.
1055
+ *
1056
+ * Returns true if an email:deliver provider is selected in the exclusive
1057
+ * hook system. Plugins and auth code use this to decide whether to show
1058
+ * "send invite" vs "copy invite link" UI.
1059
+ */
1060
+ isAvailable(): boolean;
1061
+ }
1062
+ //#endregion
1063
+ //#region src/plugins/settings.d.ts
1064
+ interface EncryptedPluginSetting {
1065
+ $emdash: "plugin-setting";
1066
+ v: 1;
1067
+ kid: string;
1068
+ iv: string;
1069
+ ciphertext: string;
1070
+ }
1071
+ declare class PluginSettingEncryptionError extends Error {
1072
+ readonly name = "PluginSettingEncryptionError";
1073
+ readonly code: "PLUGIN_SETTING_ENCRYPTION_KEY_MISSING" | "PLUGIN_SETTING_ENCRYPTION_KEY_UNKNOWN" | "PLUGIN_SETTING_ENCRYPTION_FAILED" | "PLUGIN_SETTING_DECRYPTION_FAILED";
1074
+ constructor(code: PluginSettingEncryptionError["code"], message: string);
1075
+ }
1076
+ declare function isEncryptedPluginSetting(value: unknown): value is EncryptedPluginSetting;
1077
+ declare function encryptPluginSetting(pluginId: string, key: string, value: string, keys?: ParsedEncryptionKey[] | null): Promise<EncryptedPluginSetting>;
1078
+ declare function decodePluginSettingValue<T = unknown>(pluginId: string, key: string, value: unknown, schema: Record<string, SettingField>, keys?: ParsedEncryptionKey[] | null, onSecret?: (key: string, value: string) => void): Promise<T>;
1079
+ declare function createSettingsAccess(optionsRepo: OptionsRepository, pluginId: string, schema?: Record<string, SettingField>, keys?: ParsedEncryptionKey[] | null, onSecret?: (key: string, value: string) => void): SettingsAccess;
1080
+ //#endregion
1081
+ //#region src/plugins/content-access.d.ts
1082
+ declare function createContentAccess(db: Kysely<Database>, accessOptions?: {
1083
+ site?: SiteInfo;
1084
+ revisions?: boolean;
1085
+ }): ContentAccess;
1086
+ //#endregion
1087
+ //#region src/plugins/context.d.ts
1088
+ declare function createSchemaAccess(db: Kysely<Database>): SchemaAccess;
1089
+ declare function createCommentAccess(db: Kysely<Database>, moderate?: (id: string, status: PluginCommentStatus, expectedStatus: PluginCommentStatus) => Promise<PluginComment>): CommentAccess;
1090
+ declare class RedirectAccessError extends Error {
1091
+ readonly code: string;
1092
+ readonly name = "RedirectAccessError";
1093
+ constructor(code: string, message: string);
1094
+ }
1095
+ declare function createRedirectAccess(db: Kysely<Database>): RedirectAccess;
1096
+ declare function createRedirectAccess(db: Kysely<Database>, writable: true): RedirectAccessWithWrite;
1097
+ /**
1098
+ * Called immediately before a plugin content write; it throws to refuse the
1099
+ * write. When it returns a function, that function is called once the write
1100
+ * has succeeded.
1101
+ */
1102
+ type ContentWriteGuard = () => Promise<void | (() => Promise<void>)>;
1103
+ /**
1104
+ * Create full content access with write operations.
1105
+ *
1106
+ * `create` and `update` accept a reserved `seo` key in their `data`
1107
+ * argument. When present, it is routed to the core SEO panel
1108
+ * (`_emdash_seo`) via `SeoRepository.upsert`, in the same transaction as
1109
+ * the content write. The returned `ContentItem.seo` reflects the resulting
1110
+ * SEO state for SEO-enabled collections.
1111
+ */
1112
+ declare function createContentAccessWithWrite(db: Kysely<Database>, beforeContentWrite?: ContentWriteGuard, accessOptions?: {
1113
+ site?: SiteInfo;
1114
+ revisions?: boolean;
1115
+ }, contentCreate?: (data: {
1116
+ collection: string;
1117
+ input: ContentWriteInput;
1118
+ options?: ContentCreateOptions;
1119
+ }) => Promise<ContentItem$1>): ContentAccessWithWrite;
1120
+ /**
1121
+ * Create read-only media access
1122
+ */
1123
+ declare function createMediaAccess(db: Kysely<Database>): MediaAccess;
1124
+ /**
1125
+ * Create HTTP access with host validation and SSRF protection.
1126
+ *
1127
+ * Uses redirect: "manual" to re-validate each redirect target before dispatch.
1128
+ */
1129
+ declare function createHttpAccess(pluginId: string, allowedHosts: string[], fetchImpl?: typeof fetch): HttpAccess;
1130
+ /**
1131
+ * Create unrestricted HTTP access (for plugins with network:request:unrestricted capability).
1132
+ * No host validation, but applies SSRF protection on redirect targets to
1133
+ * prevent plugins from being tricked into reaching internal services.
1134
+ */
1135
+ declare function createUnrestrictedHttpAccess(pluginId: string, fetchImpl?: typeof fetch): HttpAccess;
1136
+ /**
1137
+ * Options for creating site info
1138
+ */
1139
+ interface SiteInfoOptions {
1140
+ /** Site name from options table */
1141
+ siteName?: string;
1142
+ /** Site URL from options table or Astro config */
1143
+ siteUrl?: string;
1144
+ /** Site locale from options table */
1145
+ locale?: string;
1146
+ /** Astro's `trailingSlash` config (from `virtual:emdash/config`). */
1147
+ trailingSlash?: "always" | "never" | "ignore";
1148
+ }
1149
+ interface PluginContextFactoryOptions {
1150
+ db: Kysely<Database>;
1151
+ beforeContentWrite?: ContentWriteGuard;
1152
+ contentCreate?: PluginContentCreateCallback;
1153
+ contentActions?: ContentActionCallbacks;
1154
+ /**
1155
+ * Resolver for the database connection, preferred over `db` when present.
1156
+ * Called per `createContext()` so connection-backed adapters (e.g. Postgres
1157
+ * over Hyperdrive) get the current request/event-scoped connection from ALS
1158
+ * rather than a snapshot of the per-isolate singleton — reusing the
1159
+ * singleton's socket from a later event trips workerd's cross-request I/O
1160
+ * guard. When omitted, `db` is used directly (correct for stateless
1161
+ * adapters like D1 and Node SQLite). `db` remains required as the fallback.
1162
+ */
1163
+ getDb?: () => Kysely<Database>;
1164
+ /**
1165
+ * Storage backend for direct media uploads.
1166
+ * If not provided, upload() will throw.
1167
+ */
1168
+ storage?: Storage;
1169
+ /**
1170
+ * Explicit provider for `ctx.media.getUploadUrl()`. Optional: when omitted
1171
+ * but `storage` is configured, the factory derives a working `getUploadUrl()`
1172
+ * (and `upload()`) from storage. Only when neither `getUploadUrl` nor
1173
+ * `storage` is present do media write operations become unavailable.
1174
+ */
1175
+ getUploadUrl?: (filename: string, contentType: string) => Promise<{
1176
+ uploadUrl: string;
1177
+ mediaId: string;
1178
+ }>;
1179
+ /**
1180
+ * Site information for ctx.site and ctx.url().
1181
+ * If not provided, site info will have empty defaults.
1182
+ */
1183
+ siteInfo?: SiteInfoOptions;
1184
+ /**
1185
+ * Callback to notify the cron scheduler that the next due time may have changed.
1186
+ * If not provided, ctx.cron will not be available.
1187
+ */
1188
+ cronReschedule?: () => void;
1189
+ /** Clock used to calculate the first run of recurring plugin tasks. */
1190
+ now?: () => Date;
1191
+ /**
1192
+ * Email pipeline instance for ctx.email.
1193
+ * If not provided (or no provider configured), ctx.email will be undefined.
1194
+ */
1195
+ emailPipeline?: EmailPipeline;
1196
+ /**
1197
+ * Pre-resolved list of trusted proxy header names (from the runtime
1198
+ * `EmDashConfig.trustedProxyHeaders` or the env var). Plugin route
1199
+ * handlers pass this to `extractRequestMeta` so plugins see the same
1200
+ * client IP the core auth path does.
1201
+ */
1202
+ trustedProxyHeaders?: string[];
1203
+ commentModerate?: (pluginId: string, id: string, status: PluginCommentStatus, expectedStatus: PluginCommentStatus) => Promise<PluginComment>;
1204
+ }
1205
+ interface ContentActionCallbacks {
1206
+ /** Register a sandbox invocation before it can call a content action. */
1207
+ begin?(pluginId: string, invocationId: string, invalidateContentCache?: (tags: string[]) => Promise<void>): void;
1208
+ /** Release queued after-hooks; `final: false` keeps late actions self-scheduling after timeout. */
1209
+ flush(pluginId: string, invocationId?: string, final?: boolean): Promise<void>;
1210
+ getVersioned(pluginId: string, collection: string, id: string): Promise<VersionedContentItem | null>;
1211
+ publish(pluginId: string, collection: string, id: string, options: {
1212
+ _rev: string;
1213
+ }, invocationId?: string, invalidateContentCache?: (tags: string[]) => Promise<void>): Promise<VersionedContentItem>;
1214
+ unpublish(pluginId: string, collection: string, id: string, options: {
1215
+ _rev: string;
1216
+ }, invocationId?: string, invalidateContentCache?: (tags: string[]) => Promise<void>): Promise<VersionedContentItem>;
1217
+ schedule(pluginId: string, collection: string, id: string, options: {
1218
+ scheduledAt: string;
1219
+ _rev: string;
1220
+ }, invocationId?: string, invalidateContentCache?: (tags: string[]) => Promise<void>): Promise<VersionedContentItem>;
1221
+ unschedule(pluginId: string, collection: string, id: string, options: {
1222
+ _rev: string;
1223
+ }, invocationId?: string, invalidateContentCache?: (tags: string[]) => Promise<void>): Promise<VersionedContentItem>;
1224
+ getTrashedVersioned(pluginId: string, collection: string, id: string): Promise<VersionedContentItem | null>;
1225
+ restore(pluginId: string, collection: string, id: string, options: {
1226
+ _rev: string;
1227
+ }, invocationId?: string, invalidateContentCache?: (tags: string[]) => Promise<void>): Promise<VersionedContentItem>;
1228
+ }
1229
+ //#endregion
1230
+ //#region src/plugins/sandbox/types.d.ts
1231
+ /**
1232
+ * Resource limits for sandboxed plugins.
1233
+ * Enforced by the sandbox runtime (e.g., Worker Loader).
1234
+ */
1235
+ interface ResourceLimits {
1236
+ /** CPU time per invocation in milliseconds (default: 50ms) */
1237
+ cpuMs?: number;
1238
+ /** Memory limit in MB (default: 128MB) */
1239
+ memoryMb?: number;
1240
+ /** Maximum subrequests per invocation (default: 10) */
1241
+ subrequests?: number;
1242
+ /** Wall-clock time limit in milliseconds (default: 30000ms) */
1243
+ wallTimeMs?: number;
1244
+ }
1245
+ /**
1246
+ * Storage interface for loading plugin code.
1247
+ * Could be R2, local filesystem, or any other storage backend.
1248
+ */
1249
+ interface PluginCodeStorage {
1250
+ /** Get plugin bundle code by path */
1251
+ get(path: string): Promise<string | null>;
1252
+ /** Check if a bundle exists */
1253
+ exists(path: string): Promise<boolean>;
1254
+ }
1255
+ /**
1256
+ * Serialized email message for sandbox RPC transport.
1257
+ * Matches the core EmailMessage type but uses only serializable fields.
1258
+ */
1259
+ interface SandboxEmailMessage {
1260
+ to: string;
1261
+ cc?: string[];
1262
+ replyTo?: string;
1263
+ subject: string;
1264
+ text: string;
1265
+ html?: string;
1266
+ }
1267
+ /**
1268
+ * Callback for sending email from a sandboxed plugin.
1269
+ * The sandbox runner wires this up from the EmailPipeline.
1270
+ *
1271
+ * @param message - The email message to send
1272
+ * @param pluginId - The sending plugin's ID (used as source)
1273
+ */
1274
+ type SandboxEmailSendCallback = (message: SandboxEmailMessage, pluginId: string) => Promise<void>;
1275
+ type SandboxCommentModerateCallback = (pluginId: string, id: string, status: PluginCommentStatus, expectedStatus: PluginCommentStatus) => Promise<PluginComment>;
1276
+ type SandboxContentCreateCallback = (pluginId: string, collection: string, data: ContentWriteInput, options?: ContentCreateOptions & {
1277
+ originHook?: "content:beforeSave" | "content:afterSave";
1278
+ sandboxOrigin?: true;
1279
+ }) => Promise<ContentItem$1>;
1280
+ type SandboxHttpFetchCallback = typeof fetch;
1281
+ /**
1282
+ * Options for creating a sandbox runner
1283
+ */
1284
+ interface SandboxOptions {
1285
+ /** Storage interface for loading plugin code */
1286
+ storage?: PluginCodeStorage;
1287
+ /** Database for bridge operations */
1288
+ db: Kysely<Database>;
1289
+ /**
1290
+ * Called immediately before a sandboxed plugin content mutation; it throws
1291
+ * to refuse the write. When it returns a function, the bridge calls that
1292
+ * function once the write has succeeded.
1293
+ */
1294
+ beforeContentWrite?: () => Promise<void | (() => Promise<void>)>;
1295
+ /** Runtime-owned taxonomy mutation surface used by sandbox bridges. */
1296
+ taxonomyWrite?: TaxonomyAccessWithWrite;
1297
+ contentActions?: ContentActionCallbacks;
1298
+ /** Clock used to calculate recurring plugin task schedules. */
1299
+ now?: () => Date;
1300
+ /** Default resource limits */
1301
+ limits?: ResourceLimits;
1302
+ /** Site info for plugin context (injected into wrapper at generation time) */
1303
+ siteInfo?: {
1304
+ name: string;
1305
+ url: string;
1306
+ locale: string;
1307
+ trailingSlash?: "always" | "never" | "ignore";
1308
+ };
1309
+ /** Email send callback, wired from the EmailPipeline by the runtime */
1310
+ emailSend?: SandboxEmailSendCallback;
1311
+ commentModerate?: SandboxCommentModerateCallback;
1312
+ /** Optional host HTTP transport used by test hosts and custom runtimes. */
1313
+ httpFetch?: SandboxHttpFetchCallback;
1314
+ /**
1315
+ * Media storage adapter for sandboxed plugin byte reads, uploads, and deletes.
1316
+ * Each operation remains gated by its own media capability.
1317
+ */
1318
+ mediaStorage?: {
1319
+ upload(options: {
1320
+ key: string;
1321
+ body: Uint8Array;
1322
+ contentType: string;
1323
+ }): Promise<unknown>;
1324
+ download(key: string): Promise<{
1325
+ body: ReadableStream<Uint8Array>;
1326
+ contentType: string;
1327
+ size: number;
1328
+ }>;
1329
+ delete(key: string): Promise<unknown>;
1330
+ };
1331
+ /** Worker Loader name suffix. The plugin's logical ID remains unchanged. */
1332
+ isolateKey?: string;
1333
+ }
1334
+ /**
1335
+ * Handle to a sandboxed plugin running inside an isolate. Returned
1336
+ * by `SandboxRunner.load` and held by the runtime's cache so hooks /
1337
+ * routes can be invoked across the isolate boundary. Distinct from
1338
+ * the author-facing `SandboxedPlugin` type in `emdash/plugin`, which
1339
+ * describes the source-level shape of a plugin's default export.
1340
+ */
1341
+ interface SandboxedPluginInstance {
1342
+ /** Unique identifier: `${manifest.id}:${manifest.version}` */
1343
+ readonly id: string;
1344
+ /**
1345
+ * Invoke a hook in the sandboxed plugin.
1346
+ *
1347
+ * @param hookName - Name of the hook (e.g., "content:beforeSave")
1348
+ * @param event - Event data to pass to the hook
1349
+ * @returns Hook result (transformed content, void, etc.)
1350
+ */
1351
+ invokeHook(hookName: string, event: unknown): Promise<unknown>;
1352
+ /**
1353
+ * Invoke an API route in the sandboxed plugin.
1354
+ *
1355
+ * @param routeName - Name of the route
1356
+ * @param input - Validated input data
1357
+ * @param request - Serialized request info for context
1358
+ * @returns Route response data
1359
+ */
1360
+ invokeRoute(routeName: string, input: unknown, request: SerializedRequest, options?: SandboxInvocationOptions): Promise<unknown>;
1361
+ /**
1362
+ * Change whether the plugin may access host services.
1363
+ * Deactivation revokes credentials synchronously; reactivation issues fresh credentials.
1364
+ */
1365
+ setActive?(active: boolean): void;
1366
+ /**
1367
+ * Terminate the sandboxed plugin.
1368
+ * Releases resources and prevents further invocations.
1369
+ */
1370
+ terminate(): Promise<void>;
1371
+ }
1372
+ interface SandboxInvocationOptions {
1373
+ invalidateContentCache?: (tags: string[]) => Promise<void>;
1374
+ }
1375
+ /**
1376
+ * Serialized request for RPC transport.
1377
+ * Worker Loader can't pass Request objects directly.
1378
+ */
1379
+ interface SerializedRequest {
1380
+ url: string;
1381
+ method: string;
1382
+ headers: Record<string, string>;
1383
+ /** Normalized request metadata extracted before RPC serialization */
1384
+ meta: RequestMeta;
1385
+ /** Host-attested context for a validated Block Kit request. */
1386
+ ui?: PluginUiContext;
1387
+ /**
1388
+ * Authenticated caller for private routes, resolved by the host before
1389
+ * dispatch. Undefined for public routes and unbound machine tokens.
1390
+ */
1391
+ user?: UserInfo;
1392
+ }
1393
+ declare const SANDBOX_ROUTE_ERROR_DEFINITIONS: {
1394
+ readonly MEDIA_USAGE_ACTIVATION_IN_PROGRESS: {
1395
+ readonly message: "Media usage activation is in progress";
1396
+ readonly status: 503;
1397
+ };
1398
+ readonly MEDIA_USAGE_ACTIVATION_CHECK_FAILED: {
1399
+ readonly message: "Unable to verify media usage activation state";
1400
+ readonly status: 503;
1401
+ };
1402
+ readonly TRANSFER_IMPORT_IN_PROGRESS: {
1403
+ readonly message: "A site import is in progress or incomplete; writes are disabled";
1404
+ readonly status: 503;
1405
+ };
1406
+ readonly TRANSFER_FENCE_CHECK_FAILED: {
1407
+ readonly message: "Unable to verify whether site writes are allowed";
1408
+ readonly status: 503;
1409
+ };
1410
+ };
1411
+ type SandboxRouteErrorCode = keyof typeof SANDBOX_ROUTE_ERROR_DEFINITIONS;
1412
+ interface SandboxRouteErrorDetails {
1413
+ code: SandboxRouteErrorCode;
1414
+ message: string;
1415
+ status: 503;
1416
+ }
1417
+ interface SandboxRouteErrorEnvelope {
1418
+ __emdashSandboxRouteError: true;
1419
+ error: SandboxRouteErrorDetails;
1420
+ }
1421
+ declare function getSandboxRouteErrorDetails(error: unknown): SandboxRouteErrorDetails | null;
1422
+ declare function createSandboxRouteError(code: SandboxRouteErrorCode): Error & SandboxRouteErrorDetails;
1423
+ declare function createSandboxRouteErrorEnvelope(error: unknown): SandboxRouteErrorEnvelope | null;
1424
+ declare function getSandboxRouteErrorEnvelope(value: unknown): SandboxRouteErrorEnvelope | null;
1425
+ /**
1426
+ * Sandbox runner interface.
1427
+ * Platform adapters implement this to provide plugin isolation.
1428
+ */
1429
+ interface SandboxRunner {
1430
+ /**
1431
+ * Check if sandboxing is available on this platform.
1432
+ * Returns false for platforms that don't support isolation.
1433
+ */
1434
+ isAvailable(): boolean;
1435
+ /**
1436
+ * Check if the sandbox runtime is currently healthy.
1437
+ * For in-process runners this always returns true.
1438
+ * For sidecar-based runners (workerd), returns false if the
1439
+ * child process has crashed and hasn't been restarted yet.
1440
+ */
1441
+ isHealthy(): boolean;
1442
+ /**
1443
+ * Why the runner cannot run plugins, once isAvailable() or isHealthy()
1444
+ * has returned false. A lowercase clause without a final period: callers
1445
+ * append it to their own message after a colon.
1446
+ *
1447
+ * Making this required breaks runners implemented outside this repository.
1448
+ */
1449
+ unavailableReason?(): string;
1450
+ /**
1451
+ * Load a sandboxed plugin from code.
1452
+ *
1453
+ * @param manifest - Plugin manifest with metadata and capabilities
1454
+ * @param code - The bundled plugin JavaScript code
1455
+ * @returns A sandboxed plugin instance
1456
+ * @throws If sandboxing is not available or plugin can't be loaded
1457
+ */
1458
+ load(manifest: PluginManifest, code: string): Promise<SandboxedPluginInstance>;
1459
+ /**
1460
+ * Set the email send callback for sandboxed plugins.
1461
+ * Called after the EmailPipeline is created, since the pipeline
1462
+ * doesn't exist when the sandbox runner is constructed.
1463
+ */
1464
+ setEmailSend(callback: SandboxEmailSendCallback | null): void;
1465
+ setCommentModerate?(callback: SandboxCommentModerateCallback | null): void;
1466
+ setContentCreate?(callback: SandboxContentCreateCallback | null): void;
1467
+ setContentActions?(callback: ContentActionCallbacks | null): void;
1468
+ /** Wake a long-lived scheduler after a sandboxed plugin changes its tasks. */
1469
+ setCronReschedule?(callback: (() => void) | null): void;
1470
+ /**
1471
+ * Terminate all loaded sandboxed plugins.
1472
+ * Called during shutdown or when reconfiguring.
1473
+ */
1474
+ terminateAll(): Promise<void>;
1475
+ }
1476
+ /**
1477
+ * Error thrown when the sandbox runtime is unavailable.
1478
+ * This happens when the sidecar process has crashed or hasn't started.
1479
+ */
1480
+ declare class SandboxUnavailableError extends Error {
1481
+ constructor(pluginId: string, reason: string);
1482
+ }
1483
+ /**
1484
+ * Factory function type for creating sandbox runners.
1485
+ * Exported by platform adapters (e.g., @emdash-cms/cloudflare/sandbox).
1486
+ *
1487
+ * @example
1488
+ * ```typescript
1489
+ * // In @emdash-cms/cloudflare/sandbox
1490
+ * export const createSandboxRunner: SandboxRunnerFactory = (options) => {
1491
+ * return new CloudflareSandboxRunner(options);
1492
+ * };
1493
+ * ```
1494
+ */
1495
+ type SandboxRunnerFactory = (options: SandboxOptions) => SandboxRunner;
1496
+ //#endregion
1497
+ //#region src/plugins/cron.d.ts
1498
+ /**
1499
+ * Callback to invoke a plugin's cron hook.
1500
+ * Provided by PluginManager so CronExecutor stays decoupled from the hook pipeline.
1501
+ */
1502
+ type InvokeCronHookFn = (pluginId: string, event: CronEvent) => Promise<void>;
1503
+ /**
1504
+ * Callback to notify the scheduler that the next due time may have changed.
1505
+ */
1506
+ type RescheduleFn = () => void;
1507
+ /**
1508
+ * Executes overdue cron tasks.
1509
+ *
1510
+ * Called by the platform driver: the NodeCronScheduler timer on Node, or the
1511
+ * Worker's `scheduled()` handler (via runScheduledTasks) on Cloudflare.
1512
+ * Stateless — all state lives in the database.
1513
+ */
1514
+ declare class CronExecutor {
1515
+ private invokeCronHook;
1516
+ private readonly now;
1517
+ /**
1518
+ * Resolves the database connection to use for this tick. A resolver (not a
1519
+ * captured instance) so connection-backed adapters work across events: on
1520
+ * Cloudflare the `scheduled()` handler installs an event-scoped connection
1521
+ * in ALS, and this resolves to it instead of the per-isolate singleton
1522
+ * whose socket belongs to an earlier request. Accepts a plain `Kysely` too
1523
+ * (wrapped in a constant resolver) for callers/tests that don't need ALS.
1524
+ */
1525
+ private readonly resolveDb;
1526
+ constructor(db: Kysely<Database> | (() => Kysely<Database>), invokeCronHook: InvokeCronHookFn, now?: () => Date);
1527
+ private get db();
1528
+ /**
1529
+ * Process all overdue tasks.
1530
+ *
1531
+ * 1. Atomically claim tasks whose next_run_at <= now, status = idle, enabled = 1.
1532
+ * 2. For each claimed task, invoke the plugin's cron hook.
1533
+ * 3. On success: compute next_run_at and reset to idle, or delete one-shots.
1534
+ * 4. On failure: reset to idle (retry on next tick).
1535
+ */
1536
+ tick(): Promise<number>;
1537
+ /**
1538
+ * Recover tasks stuck in 'running' for more than STALE_LOCK_MINUTES.
1539
+ * These likely crashed mid-execution.
1540
+ */
1541
+ recoverStaleLocks(): Promise<number>;
1542
+ /**
1543
+ * Get the next due time across all enabled tasks.
1544
+ * Returns null if no tasks are scheduled.
1545
+ */
1546
+ getNextDueTime(): Promise<string | null>;
1547
+ }
1548
+ /**
1549
+ * Per-plugin cron API implementation.
1550
+ * Scoped to a single plugin ID — plugins cannot see or modify other plugins' tasks.
1551
+ */
1552
+ declare class CronAccessImpl implements CronAccess {
1553
+ private db;
1554
+ private pluginId;
1555
+ private reschedule;
1556
+ private readonly now;
1557
+ constructor(db: Kysely<Database>, pluginId: string, reschedule: RescheduleFn, now?: () => Date);
1558
+ schedule(name: string, opts: {
1559
+ schedule: string;
1560
+ data?: Record<string, unknown>;
1561
+ }): Promise<void>;
1562
+ cancel(name: string): Promise<void>;
1563
+ list(): Promise<CronTaskInfo[]>;
1564
+ }
1565
+ //#endregion
1566
+ //#region src/plugins/byline-access.d.ts
1567
+ /**
1568
+ * Create read-only byline access (gated on `bylines:read`).
1569
+ */
1570
+ declare function createBylineAccess(db: Kysely<Database>): BylineAccess;
1571
+ //#endregion
1572
+ //#region src/plugins/media.d.ts
1573
+ declare const DEFAULT_PLUGIN_MEDIA_READ_BYTES: number;
1574
+ declare const MAX_PLUGIN_MEDIA_READ_BYTES: number;
1575
+ declare function toPluginMediaItem(item: MediaItem): MediaItem$1;
1576
+ declare function readPluginMediaBytes(db: Kysely<Database>, storage: Pick<Storage, "download"> | undefined, id: string, options?: {
1577
+ maxBytes?: number;
1578
+ }): Promise<MediaBytes>;
1579
+ declare function updatePluginMediaMetadata(db: Kysely<Database>, id: string, patch: MediaMetadataPatch): Promise<MediaItem$1>;
1580
+ declare function parsePluginMediaMetadataPatch(value: unknown): MediaMetadataPatch;
1581
+ //#endregion
1582
+ //#region src/plugins/storage-query.d.ts
1583
+ /**
1584
+ * Error thrown when a guarded `updateIf` loses a concurrent race by aborting
1585
+ * rather than resolving to `{ applied: false }`.
1586
+ *
1587
+ * `updateIf`'s `{ applied: false }` contract (row absent OR guard failed)
1588
+ * assumes READ COMMITTED — the default. There, a losing concurrent writer
1589
+ * re-evaluates the guard against the winner's freshly committed row and
1590
+ * cleanly resolves to `{ applied: false }`. Two aborts escape that contract:
1591
+ *
1592
+ * - `40001` (serialization_failure), only above READ COMMITTED, where the
1593
+ * loser cannot re-read against a newer snapshot.
1594
+ * - `40P01` (deadlock_detected), at any isolation level, when transactions
1595
+ * take row locks in opposite order.
1596
+ *
1597
+ * This error surfaces either abort so the caller can retry the write.
1598
+ *
1599
+ * The no-oversell SAFETY invariant holds either way: a losing writer NEVER
1600
+ * applies its update — it either sees `{ applied: false }` or throws here.
1601
+ */
1602
+ declare class StorageSerializationError extends Error {
1603
+ readonly code = "STORAGE_SERIALIZATION_FAILURE";
1604
+ readonly retryable = true;
1605
+ /** The Postgres SQLSTATE that triggered this error (`40001` / `40P01`). */
1606
+ readonly sqlState?: string;
1607
+ constructor(message: string, options?: {
1608
+ cause?: unknown;
1609
+ sqlState?: string;
1610
+ });
1611
+ }
1612
+ //#endregion
1613
+ export { MediaItem as $, ContentActionCallbacks as A, createContentAccess as B, SandboxUnavailableError as C, createSandboxRouteErrorEnvelope as D, createSandboxRouteError as E, createHttpAccess as F, encryptPluginSetting as G, PluginSettingEncryptionError as H, createMediaAccess as I, HookPipeline as J, isEncryptedPluginSetting as K, createRedirectAccess as L, RedirectAccessError as M, createCommentAccess as N, getSandboxRouteErrorDetails as O, createContentAccessWithWrite as P, CreateMediaInput as Q, createSchemaAccess as R, SandboxRunnerFactory as S, SerializedRequest as T, createSettingsAccess as U, EncryptedPluginSetting as V, decodePluginSettingValue as W, createHookPipeline as X, HookResult as Y, PluginStorageRepository as Z, SandboxOptions as _, readPluginMediaBytes as a, SandboxRouteErrorEnvelope as b, createBylineAccess as c, SandboxCommentModerateCallback as d, MediaRepository as et, SandboxContentCreateCallback as f, SandboxInvocationOptions as g, SandboxHttpFetchCallback as h, parsePluginMediaMetadataPatch as i, resolvePluginEncryptionKeys as it, ContentWriteGuard as j, getSandboxRouteErrorEnvelope as k, CronAccessImpl as l, SandboxEmailSendCallback as m, DEFAULT_PLUGIN_MEDIA_READ_BYTES as n, ContentRepository as nt, toPluginMediaItem as o, SandboxEmailMessage as p, EmailPipeline as q, MAX_PLUGIN_MEDIA_READ_BYTES as r, DatetimeContextCache as rt, updatePluginMediaMetadata as s, StorageSerializationError as t, FocalPointUpdate as tt, CronExecutor as u, SandboxRouteErrorCode as v, SandboxedPluginInstance as w, SandboxRunner as x, SandboxRouteErrorDetails as y, createUnrestrictedHttpAccess as z };
1614
+ //# sourceMappingURL=storage-query-C9bK0Dg6.d.mts.map