emdash 0.25.1 → 0.26.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 (346) hide show
  1. package/dist/api/route-utils.d.mts +3 -3
  2. package/dist/api/route-utils.mjs +11 -11
  3. package/dist/{api-D2_sbavn.mjs → api-BMfveMoB.mjs} +15 -15
  4. package/dist/{api-D2_sbavn.mjs.map → api-BMfveMoB.mjs.map} +1 -1
  5. package/dist/{apply-Bk2mAuLn.mjs → apply--IVNSdXn.mjs} +18 -16
  6. package/dist/apply--IVNSdXn.mjs.map +1 -0
  7. package/dist/astro/index.d.mts +7 -7
  8. package/dist/astro/index.mjs +2 -1
  9. package/dist/astro/index.mjs.map +1 -1
  10. package/dist/astro/middleware/auth.d.mts +7 -7
  11. package/dist/astro/middleware/auth.mjs +2 -2
  12. package/dist/astro/middleware/redirect.mjs +4 -4
  13. package/dist/astro/middleware.d.mts +1 -1
  14. package/dist/astro/middleware.mjs +85 -85
  15. package/dist/astro/middleware.mjs.map +1 -1
  16. package/dist/astro/routes/api/admin/allowed-domains/_domain_.mjs +3 -3
  17. package/dist/astro/routes/api/admin/allowed-domains/index.mjs +3 -3
  18. package/dist/astro/routes/api/admin/api-tokens/_id_.mjs +2 -2
  19. package/dist/astro/routes/api/admin/api-tokens/index.mjs +3 -3
  20. package/dist/astro/routes/api/admin/byline-fields/_slug_/usage.mjs +3 -3
  21. package/dist/astro/routes/api/admin/byline-fields/_slug_.mjs +4 -4
  22. package/dist/astro/routes/api/admin/byline-fields/index.mjs +4 -4
  23. package/dist/astro/routes/api/admin/byline-fields/reorder.mjs +4 -4
  24. package/dist/astro/routes/api/admin/bylines/_id_/index.mjs +10 -10
  25. package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs +10 -10
  26. package/dist/astro/routes/api/admin/bylines/index.mjs +10 -10
  27. package/dist/astro/routes/api/admin/comments/_id_/status.mjs +8 -8
  28. package/dist/astro/routes/api/admin/comments/_id_.mjs +6 -6
  29. package/dist/astro/routes/api/admin/comments/bulk.mjs +7 -7
  30. package/dist/astro/routes/api/admin/comments/counts.mjs +6 -6
  31. package/dist/astro/routes/api/admin/comments/index.mjs +7 -7
  32. package/dist/astro/routes/api/admin/hooks/exclusive/_hookName_.mjs +4 -4
  33. package/dist/astro/routes/api/admin/hooks/exclusive/index.mjs +3 -3
  34. package/dist/astro/routes/api/admin/oauth-clients/_id_.mjs +3 -3
  35. package/dist/astro/routes/api/admin/oauth-clients/index.mjs +3 -3
  36. package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs +28 -28
  37. package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +28 -28
  38. package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +28 -28
  39. package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +28 -28
  40. package/dist/astro/routes/api/admin/plugins/_id_/update.mjs +28 -28
  41. package/dist/astro/routes/api/admin/plugins/index.mjs +28 -28
  42. package/dist/astro/routes/api/admin/plugins/marketplace/_id_/icon.mjs +3 -3
  43. package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs +28 -28
  44. package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs +28 -28
  45. package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +28 -28
  46. package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.mjs +28 -28
  47. package/dist/astro/routes/api/admin/plugins/registry/_id_/update.mjs +29 -29
  48. package/dist/astro/routes/api/admin/plugins/registry/artifact.mjs +28 -28
  49. package/dist/astro/routes/api/admin/plugins/registry/install.mjs +29 -29
  50. package/dist/astro/routes/api/admin/plugins/updates.mjs +28 -28
  51. package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +28 -28
  52. package/dist/astro/routes/api/admin/themes/marketplace/_id_/thumbnail.mjs +3 -3
  53. package/dist/astro/routes/api/admin/themes/marketplace/index.mjs +28 -28
  54. package/dist/astro/routes/api/admin/users/_id_/disable.mjs +2 -2
  55. package/dist/astro/routes/api/admin/users/_id_/enable.mjs +2 -2
  56. package/dist/astro/routes/api/admin/users/_id_/index.mjs +3 -3
  57. package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs +2 -2
  58. package/dist/astro/routes/api/admin/users/index.mjs +3 -3
  59. package/dist/astro/routes/api/auth/dev-bypass.mjs +3 -3
  60. package/dist/astro/routes/api/auth/invite/accept.mjs +2 -2
  61. package/dist/astro/routes/api/auth/invite/complete.mjs +3 -3
  62. package/dist/astro/routes/api/auth/invite/index.mjs +3 -3
  63. package/dist/astro/routes/api/auth/invite/register-options.mjs +3 -3
  64. package/dist/astro/routes/api/auth/logout.mjs +2 -2
  65. package/dist/astro/routes/api/auth/magic-link/send.mjs +4 -4
  66. package/dist/astro/routes/api/auth/magic-link/verify.mjs +2 -2
  67. package/dist/astro/routes/api/auth/me.mjs +4 -4
  68. package/dist/astro/routes/api/auth/passkey/_id_.mjs +3 -3
  69. package/dist/astro/routes/api/auth/passkey/index.mjs +2 -2
  70. package/dist/astro/routes/api/auth/passkey/options.mjs +4 -4
  71. package/dist/astro/routes/api/auth/passkey/register/options.mjs +3 -3
  72. package/dist/astro/routes/api/auth/passkey/register/verify.mjs +3 -3
  73. package/dist/astro/routes/api/auth/passkey/verify.mjs +3 -3
  74. package/dist/astro/routes/api/auth/signup/complete.mjs +3 -3
  75. package/dist/astro/routes/api/auth/signup/request.mjs +4 -4
  76. package/dist/astro/routes/api/auth/signup/verify.mjs +2 -2
  77. package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs +7 -7
  78. package/dist/astro/routes/api/comments/_collection_/_contentId_/reactions.mjs +7 -7
  79. package/dist/astro/routes/api/content/_collection_/_id_/compare.mjs +3 -3
  80. package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs +3 -3
  81. package/dist/astro/routes/api/content/_collection_/_id_/duplicate.mjs +3 -3
  82. package/dist/astro/routes/api/content/_collection_/_id_/permanent.mjs +3 -3
  83. package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs +4 -4
  84. package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs +4 -4
  85. package/dist/astro/routes/api/content/_collection_/_id_/restore.mjs +3 -3
  86. package/dist/astro/routes/api/content/_collection_/_id_/revisions.mjs +3 -3
  87. package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs +4 -4
  88. package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs +9 -9
  89. package/dist/astro/routes/api/content/_collection_/_id_/translations.mjs +3 -3
  90. package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs +3 -3
  91. package/dist/astro/routes/api/content/_collection_/_id_.mjs +4 -4
  92. package/dist/astro/routes/api/content/_collection_/authors.mjs +3 -3
  93. package/dist/astro/routes/api/content/_collection_/index.mjs +4 -4
  94. package/dist/astro/routes/api/content/_collection_/trash.mjs +4 -4
  95. package/dist/astro/routes/api/dashboard.mjs +8 -8
  96. package/dist/astro/routes/api/dev/emails.mjs +2 -2
  97. package/dist/astro/routes/api/import/probe.d.mts +2 -2
  98. package/dist/astro/routes/api/import/probe.mjs +4 -4
  99. package/dist/astro/routes/api/import/wordpress/analyze.mjs +3 -3
  100. package/dist/astro/routes/api/import/wordpress/execute.d.mts +7 -7
  101. package/dist/astro/routes/api/import/wordpress/execute.mjs +9 -9
  102. package/dist/astro/routes/api/import/wordpress/media.d.mts +7 -7
  103. package/dist/astro/routes/api/import/wordpress/media.mjs +4 -4
  104. package/dist/astro/routes/api/import/wordpress/prepare.mjs +6 -6
  105. package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs +5 -5
  106. package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs +4 -4
  107. package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs +7 -7
  108. package/dist/astro/routes/api/manifest.mjs +3 -3
  109. package/dist/astro/routes/api/mcp.mjs +34 -34
  110. package/dist/astro/routes/api/media/_id_/confirm.mjs +4 -4
  111. package/dist/astro/routes/api/media/_id_.mjs +4 -4
  112. package/dist/astro/routes/api/media/file/_...key_.mjs +2 -2
  113. package/dist/astro/routes/api/media/providers/_providerId_/_itemId_.mjs +3 -3
  114. package/dist/astro/routes/api/media/providers/_providerId_/index.mjs +3 -3
  115. package/dist/astro/routes/api/media/providers/index.mjs +3 -3
  116. package/dist/astro/routes/api/media/upload-url.mjs +4 -4
  117. package/dist/astro/routes/api/media.mjs +5 -5
  118. package/dist/astro/routes/api/menus/_name_/items/_id_.mjs +6 -6
  119. package/dist/astro/routes/api/menus/_name_/items.mjs +6 -6
  120. package/dist/astro/routes/api/menus/_name_/reorder.mjs +6 -6
  121. package/dist/astro/routes/api/menus/_name_/translations.mjs +6 -6
  122. package/dist/astro/routes/api/menus/_name_.mjs +6 -6
  123. package/dist/astro/routes/api/menus/index.mjs +6 -6
  124. package/dist/astro/routes/api/oauth/device/authorize.mjs +3 -3
  125. package/dist/astro/routes/api/oauth/device/code.mjs +4 -4
  126. package/dist/astro/routes/api/oauth/device/token.mjs +4 -4
  127. package/dist/astro/routes/api/oauth/register.mjs +2 -2
  128. package/dist/astro/routes/api/oauth/token/refresh.mjs +3 -3
  129. package/dist/astro/routes/api/oauth/token/revoke.mjs +3 -3
  130. package/dist/astro/routes/api/oauth/token.mjs +2 -2
  131. package/dist/astro/routes/api/openapi.json.mjs +2 -2
  132. package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs +3 -3
  133. package/dist/astro/routes/api/redirects/404s/index.mjs +6 -6
  134. package/dist/astro/routes/api/redirects/404s/summary.mjs +6 -6
  135. package/dist/astro/routes/api/redirects/_id_.mjs +7 -7
  136. package/dist/astro/routes/api/redirects/index.mjs +7 -7
  137. package/dist/astro/routes/api/revisions/_revisionId_/index.mjs +3 -3
  138. package/dist/astro/routes/api/revisions/_revisionId_/restore.mjs +3 -3
  139. package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs +28 -28
  140. package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs +28 -28
  141. package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs +28 -28
  142. package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +28 -28
  143. package/dist/astro/routes/api/schema/collections/index.mjs +28 -28
  144. package/dist/astro/routes/api/schema/index.mjs +6 -6
  145. package/dist/astro/routes/api/schema/orphans/_slug_.mjs +28 -28
  146. package/dist/astro/routes/api/schema/orphans/index.mjs +28 -28
  147. package/dist/astro/routes/api/search/enable.mjs +7 -7
  148. package/dist/astro/routes/api/search/index.mjs +6 -6
  149. package/dist/astro/routes/api/search/rebuild.mjs +7 -7
  150. package/dist/astro/routes/api/search/stats.mjs +6 -6
  151. package/dist/astro/routes/api/search/suggest.mjs +6 -6
  152. package/dist/astro/routes/api/sections/_slug_.mjs +6 -6
  153. package/dist/astro/routes/api/sections/index.mjs +6 -6
  154. package/dist/astro/routes/api/settings/email.mjs +4 -4
  155. package/dist/astro/routes/api/settings.mjs +9 -9
  156. package/dist/astro/routes/api/setup/admin-verify.mjs +3 -3
  157. package/dist/astro/routes/api/setup/admin.mjs +3 -3
  158. package/dist/astro/routes/api/setup/dev-bypass.mjs +17 -17
  159. package/dist/astro/routes/api/setup/dev-reset.mjs +2 -2
  160. package/dist/astro/routes/api/setup/index.mjs +18 -18
  161. package/dist/astro/routes/api/setup/status.mjs +3 -3
  162. package/dist/astro/routes/api/snapshot.mjs +3 -3
  163. package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs +9 -9
  164. package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs +9 -9
  165. package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs +9 -9
  166. package/dist/astro/routes/api/taxonomies/index.mjs +9 -9
  167. package/dist/astro/routes/api/themes/preview.mjs +3 -3
  168. package/dist/astro/routes/api/typegen.mjs +5 -5
  169. package/dist/astro/routes/api/widget-areas/_name_/reorder.mjs +4 -4
  170. package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs +6 -6
  171. package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs +6 -6
  172. package/dist/astro/routes/api/widget-areas/_name_.mjs +5 -5
  173. package/dist/astro/routes/api/widget-areas/index.mjs +6 -6
  174. package/dist/astro/routes/api/widget-components.mjs +2 -2
  175. package/dist/astro/routes/robots.txt.mjs +5 -5
  176. package/dist/astro/routes/sitemap-_collection_.xml.mjs +10 -9
  177. package/dist/astro/routes/sitemap-_collection_.xml.mjs.map +1 -1
  178. package/dist/astro/routes/sitemap.xml.mjs +5 -5
  179. package/dist/astro/types.d.mts +7 -7
  180. package/dist/{authorize-CuxZ0i2t.mjs → authorize-BZnOGJFo.mjs} +2 -2
  181. package/dist/{authorize-CuxZ0i2t.mjs.map → authorize-BZnOGJFo.mjs.map} +1 -1
  182. package/dist/{byline-C-YajfV7.mjs → byline-LL8lyqdb.mjs} +6 -6
  183. package/dist/{byline-C-YajfV7.mjs.map → byline-LL8lyqdb.mjs.map} +1 -1
  184. package/dist/{bylines-D4KADDAi.mjs → bylines-BmJ7Vg7J.mjs} +4 -4
  185. package/dist/{bylines-D4KADDAi.mjs.map → bylines-BmJ7Vg7J.mjs.map} +1 -1
  186. package/dist/{bylines-CPc_q2Vd.mjs → bylines-DE47vP8d.mjs} +5 -5
  187. package/dist/{bylines-CPc_q2Vd.mjs.map → bylines-DE47vP8d.mjs.map} +1 -1
  188. package/dist/{cache-C35VWD5D.mjs → cache-D9jF5bYw.mjs} +2 -2
  189. package/dist/{cache-C35VWD5D.mjs.map → cache-D9jF5bYw.mjs.map} +1 -1
  190. package/dist/{chunks-BHgcHh2C.mjs → chunks-OCG163rN.mjs} +2 -2
  191. package/dist/{chunks-BHgcHh2C.mjs.map → chunks-OCG163rN.mjs.map} +1 -1
  192. package/dist/cli/index.mjs +16 -16
  193. package/dist/{comment-BDx50EX5.mjs → comment-D9BLDpZI.mjs} +3 -3
  194. package/dist/{comment-BDx50EX5.mjs.map → comment-D9BLDpZI.mjs.map} +1 -1
  195. package/dist/{comment-reaction-Gv_pgfI3.mjs → comment-reaction-Drl9SkNu.mjs} +2 -2
  196. package/dist/{comment-reaction-Gv_pgfI3.mjs.map → comment-reaction-Drl9SkNu.mjs.map} +1 -1
  197. package/dist/{comments-CXHuQ6jI.mjs → comments-BjJ9SKGU.mjs} +3 -3
  198. package/dist/{comments-CXHuQ6jI.mjs.map → comments-BjJ9SKGU.mjs.map} +1 -1
  199. package/dist/{content-B43-YrIq.mjs → content-ncUWWjna.mjs} +4 -4
  200. package/dist/{content-B43-YrIq.mjs.map → content-ncUWWjna.mjs.map} +1 -1
  201. package/dist/{context-BW3N7wyt.mjs → context-C_g-iJVA.mjs} +7 -7
  202. package/dist/{context-BW3N7wyt.mjs.map → context-C_g-iJVA.mjs.map} +1 -1
  203. package/dist/{dashboard-FIe0S512.mjs → dashboard-CotyqQrW.mjs} +4 -4
  204. package/dist/{dashboard-FIe0S512.mjs.map → dashboard-CotyqQrW.mjs.map} +1 -1
  205. package/dist/db/index.d.mts +2 -2
  206. package/dist/db/index.mjs +1 -1
  207. package/dist/{error-DXnK2wF4.mjs → error-rVGiqWDt.mjs} +2 -2
  208. package/dist/{error-DXnK2wF4.mjs.map → error-rVGiqWDt.mjs.map} +1 -1
  209. package/dist/{field-defs-cache-CYYx8xlG.mjs → field-defs-cache-ljXzJCfc.mjs} +2 -2
  210. package/dist/{field-defs-cache-CYYx8xlG.mjs.map → field-defs-cache-ljXzJCfc.mjs.map} +1 -1
  211. package/dist/{fts-manager-DW_NR-Fs.mjs → fts-manager-BbCCbEKA.mjs} +2 -2
  212. package/dist/{fts-manager-DW_NR-Fs.mjs.map → fts-manager-BbCCbEKA.mjs.map} +1 -1
  213. package/dist/{index-Cz6_JBL3.d.mts → index-BRNabKrx.d.mts} +36 -11
  214. package/dist/index-BRNabKrx.d.mts.map +1 -0
  215. package/dist/{index-qbL02uhs.d.mts → index-Dt0OKJB4.d.mts} +2 -2
  216. package/dist/{index-qbL02uhs.d.mts.map → index-Dt0OKJB4.d.mts.map} +1 -1
  217. package/dist/index.d.mts +8 -8
  218. package/dist/index.mjs +38 -38
  219. package/dist/{load-DMFi4n1p.mjs → load-DMjXghbZ.mjs} +2 -2
  220. package/dist/{load-DMFi4n1p.mjs.map → load-DMjXghbZ.mjs.map} +1 -1
  221. package/dist/{loader-DrpofRon.mjs → loader-BA_zhkS_.mjs} +81 -18
  222. package/dist/loader-BA_zhkS_.mjs.map +1 -0
  223. package/dist/{manifest-schema-BOfPXse0.mjs → manifest-schema-kPGX7VS-.mjs} +3 -1
  224. package/dist/manifest-schema-kPGX7VS-.mjs.map +1 -0
  225. package/dist/media/local-runtime.d.mts +7 -7
  226. package/dist/media/local-runtime.mjs +5 -5
  227. package/dist/{media-BjKxjzk8.mjs → media-C5t_eCnk.mjs} +2 -2
  228. package/dist/{media-BjKxjzk8.mjs.map → media-C5t_eCnk.mjs.map} +1 -1
  229. package/dist/{menus-8O6xNcYW.mjs → menus-CBb6UrMU.mjs} +3 -3
  230. package/dist/{menus-8O6xNcYW.mjs.map → menus-CBb6UrMU.mjs.map} +1 -1
  231. package/dist/{menus-CxqJ-z-N.mjs → menus-CYH09a41.mjs} +50 -68
  232. package/dist/menus-CYH09a41.mjs.map +1 -0
  233. package/dist/{object-cache-SEb2IM4Z.mjs → object-cache-CHbHv83-.mjs} +8 -4
  234. package/dist/object-cache-CHbHv83-.mjs.map +1 -0
  235. package/dist/{options-BvClpP5Q.d.mts → options-41nCWqi9.d.mts} +2 -2
  236. package/dist/{options-BvClpP5Q.d.mts.map → options-41nCWqi9.d.mts.map} +1 -1
  237. package/dist/page/index.d.mts +5 -2
  238. package/dist/page/index.d.mts.map +1 -1
  239. package/dist/page/index.mjs +3 -2
  240. package/dist/page/index.mjs.map +1 -1
  241. package/dist/{parse-DqMWHQ8x.mjs → parse-BwAdS7FZ.mjs} +2 -2
  242. package/dist/{parse-DqMWHQ8x.mjs.map → parse-BwAdS7FZ.mjs.map} +1 -1
  243. package/dist/plugin-types.d.mts +4 -2
  244. package/dist/plugin-types.d.mts.map +1 -1
  245. package/dist/plugin-utils.d.mts +7 -7
  246. package/dist/plugins/adapt-sandbox-entry.d.mts +7 -7
  247. package/dist/plugins/adapt-sandbox-entry.mjs +1 -1
  248. package/dist/{query-34pfm02Q.mjs → query-BpQb-blG.mjs} +14 -14
  249. package/dist/{query-34pfm02Q.mjs.map → query-BpQb-blG.mjs.map} +1 -1
  250. package/dist/{rate-limit-CBQK4ygJ.mjs → rate-limit-Dap6HMNM.mjs} +2 -2
  251. package/dist/{rate-limit-CBQK4ygJ.mjs.map → rate-limit-Dap6HMNM.mjs.map} +1 -1
  252. package/dist/{redirect-C1KVGYWe.mjs → redirect-_M0trWoo.mjs} +2 -2
  253. package/dist/{redirect-C1KVGYWe.mjs.map → redirect-_M0trWoo.mjs.map} +1 -1
  254. package/dist/{redirects-DgnypVir.mjs → redirects-w0V9vj_j.mjs} +3 -3
  255. package/dist/{redirects-DgnypVir.mjs.map → redirects-w0V9vj_j.mjs.map} +1 -1
  256. package/dist/{registry-3aOAS4My.mjs → registry-g8yYt4cC.mjs} +4 -4
  257. package/dist/{registry-3aOAS4My.mjs.map → registry-g8yYt4cC.mjs.map} +1 -1
  258. package/dist/{runner-CEtq-6Sm.d.mts → runner-BbR3DfrL.d.mts} +2 -2
  259. package/dist/{runner-CEtq-6Sm.d.mts.map → runner-BbR3DfrL.d.mts.map} +1 -1
  260. package/dist/{runner-BsquExlK.mjs → runner-DPdt_Wpa.mjs} +250 -178
  261. package/dist/runner-DPdt_Wpa.mjs.map +1 -0
  262. package/dist/runtime.d.mts +7 -7
  263. package/dist/runtime.mjs +2 -2
  264. package/dist/{schema-BGwx8AQY.mjs → schema-DoLd3j2e.mjs} +5 -5
  265. package/dist/{schema-BGwx8AQY.mjs.map → schema-DoLd3j2e.mjs.map} +1 -1
  266. package/dist/{search-Gl747zMP.mjs → search-BR0ZeZmh.mjs} +4 -4
  267. package/dist/{search-Gl747zMP.mjs.map → search-BR0ZeZmh.mjs.map} +1 -1
  268. package/dist/{sections-C-umuuLj.mjs → sections-5J2YJPqJ.mjs} +3 -3
  269. package/dist/{sections-C-umuuLj.mjs.map → sections-5J2YJPqJ.mjs.map} +1 -1
  270. package/dist/seed/index.d.mts +2 -2
  271. package/dist/seed/index.mjs +15 -15
  272. package/dist/{seo-BNzkiK_W.mjs → seo-DKeXHkzE.mjs} +3 -3
  273. package/dist/{seo-BNzkiK_W.mjs.map → seo-DKeXHkzE.mjs.map} +1 -1
  274. package/dist/{service-CQHK_10l.mjs → service-BbO2s8gT.mjs} +2 -2
  275. package/dist/{service-CQHK_10l.mjs.map → service-BbO2s8gT.mjs.map} +1 -1
  276. package/dist/{settings-fPSR6dJa.mjs → settings-BMNr9Dmi.mjs} +3 -3
  277. package/dist/{settings-fPSR6dJa.mjs.map → settings-BMNr9Dmi.mjs.map} +1 -1
  278. package/dist/{settings-C4tXRYiG.mjs → settings-DJeki-97.mjs} +4 -4
  279. package/dist/{settings-C4tXRYiG.mjs.map → settings-DJeki-97.mjs.map} +1 -1
  280. package/dist/{taxonomies-DbAtL6m4.mjs → taxonomies-CM_fUqLU.mjs} +5 -4
  281. package/dist/taxonomies-CM_fUqLU.mjs.map +1 -0
  282. package/dist/{taxonomies-n8w72lLQ.mjs → taxonomies-D13i2ctt.mjs} +75 -20
  283. package/dist/taxonomies-D13i2ctt.mjs.map +1 -0
  284. package/dist/{taxonomy-BBUlGug5.mjs → taxonomy-BU0LjdVb.mjs} +4 -4
  285. package/dist/{taxonomy-BBUlGug5.mjs.map → taxonomy-BU0LjdVb.mjs.map} +1 -1
  286. package/dist/{types-h2Cwbzi2.d.mts → types-BYnDBVwe.d.mts} +24 -5
  287. package/dist/{types-h2Cwbzi2.d.mts.map → types-BYnDBVwe.d.mts.map} +1 -1
  288. package/dist/{types-CmI1OyQg.mjs → types-CZgK3EMW.mjs} +2 -2
  289. package/dist/{types-CmI1OyQg.mjs.map → types-CZgK3EMW.mjs.map} +1 -1
  290. package/dist/{types-B-gIxFCE.d.mts → types-xIfVRNLp.d.mts} +38 -1
  291. package/dist/types-xIfVRNLp.d.mts.map +1 -0
  292. package/dist/{user-JAuc8VUf.mjs → user-DkG2jKCp.mjs} +3 -3
  293. package/dist/{user-JAuc8VUf.mjs.map → user-DkG2jKCp.mjs.map} +1 -1
  294. package/dist/{validate-Va_An3qb.d.mts → validate-CG0V0wNR.d.mts} +2 -2
  295. package/dist/{validate-Va_An3qb.d.mts.map → validate-CG0V0wNR.d.mts.map} +1 -1
  296. package/dist/{validate-BzXHWnkV.mjs → validate-CuJ1Ps9j.mjs} +2 -2
  297. package/dist/{validate-BzXHWnkV.mjs.map → validate-CuJ1Ps9j.mjs.map} +1 -1
  298. package/dist/{validation-B6DKPTtU.mjs → validation-CwUfTdGF.mjs} +5 -5
  299. package/dist/{validation-B6DKPTtU.mjs.map → validation-CwUfTdGF.mjs.map} +1 -1
  300. package/dist/version-BoNBItP_.mjs +7 -0
  301. package/dist/{version-DHdCA24u.mjs.map → version-BoNBItP_.mjs.map} +1 -1
  302. package/dist/{widgets-C2RbFN0G.mjs → widgets-BfOZ-ajY.mjs} +2 -2
  303. package/dist/{widgets-C2RbFN0G.mjs.map → widgets-BfOZ-ajY.mjs.map} +1 -1
  304. package/dist/{zod-generator-xEHODMJf.mjs → zod-generator-gFsRuNNy.mjs} +6 -3
  305. package/dist/zod-generator-gFsRuNNy.mjs.map +1 -0
  306. package/package.json +5 -5
  307. package/src/api/handlers/taxonomies.ts +5 -1
  308. package/src/astro/integration/virtual-modules.ts +15 -0
  309. package/src/astro/routes/sitemap-[collection].xml.ts +5 -4
  310. package/src/components/EmDashHead.astro +23 -3
  311. package/src/components/JsonLdScript.astro +9 -0
  312. package/src/database/migrations/036_i18n_menus_and_taxonomies.ts +16 -0
  313. package/src/database/migrations/046_media_usage_index.ts +115 -0
  314. package/src/database/migrations/047_restore_taxonomy_parent_index.ts +29 -0
  315. package/src/database/migrations/runner.ts +4 -0
  316. package/src/database/repositories/media-usage.ts +444 -0
  317. package/src/database/types.ts +39 -0
  318. package/src/emdash-runtime.ts +61 -52
  319. package/src/index.ts +3 -0
  320. package/src/loader.ts +110 -31
  321. package/src/media/usage/extractor.ts +302 -0
  322. package/src/media/usage/types.ts +46 -0
  323. package/src/object-cache/index.ts +8 -2
  324. package/src/page/metadata.ts +23 -3
  325. package/src/plugin-types.ts +10 -0
  326. package/src/plugins/define-plugin.ts +14 -5
  327. package/src/plugins/hooks.ts +53 -65
  328. package/src/plugins/index.ts +5 -0
  329. package/src/plugins/manager.ts +22 -0
  330. package/src/plugins/manifest-schema.ts +2 -0
  331. package/src/plugins/types.ts +35 -3
  332. package/src/schema/zod-generator.ts +9 -1
  333. package/src/seed/apply.ts +6 -0
  334. package/src/taxonomies/index.ts +121 -18
  335. package/dist/apply-Bk2mAuLn.mjs.map +0 -1
  336. package/dist/index-Cz6_JBL3.d.mts.map +0 -1
  337. package/dist/loader-DrpofRon.mjs.map +0 -1
  338. package/dist/manifest-schema-BOfPXse0.mjs.map +0 -1
  339. package/dist/menus-CxqJ-z-N.mjs.map +0 -1
  340. package/dist/object-cache-SEb2IM4Z.mjs.map +0 -1
  341. package/dist/runner-BsquExlK.mjs.map +0 -1
  342. package/dist/taxonomies-DbAtL6m4.mjs.map +0 -1
  343. package/dist/taxonomies-n8w72lLQ.mjs.map +0 -1
  344. package/dist/types-B-gIxFCE.d.mts.map +0 -1
  345. package/dist/version-DHdCA24u.mjs +0 -7
  346. package/dist/zod-generator-xEHODMJf.mjs.map +0 -1
@@ -1,12 +1,12 @@
1
- import "../../options-BvClpP5Q.mjs";
2
- import "../../types-B-gIxFCE.mjs";
3
- import "../../types-h2Cwbzi2.mjs";
1
+ import "../../options-41nCWqi9.mjs";
2
+ import "../../types-xIfVRNLp.mjs";
3
+ import "../../types-BYnDBVwe.mjs";
4
4
  import "../../byline-fields-KD3JFRuH.mjs";
5
- import "../../index-Cz6_JBL3.mjs";
6
- import "../../runner-CEtq-6Sm.mjs";
7
- import "../../index-qbL02uhs.mjs";
5
+ import "../../index-BRNabKrx.mjs";
6
+ import "../../runner-BbR3DfrL.mjs";
7
+ import "../../index-Dt0OKJB4.mjs";
8
8
  import "../../types-CUsXGRVj.mjs";
9
- import "../../validate-Va_An3qb.mjs";
9
+ import "../../validate-CG0V0wNR.mjs";
10
10
  import { EmDashHandlers } from "../types.mjs";
11
11
  import { User } from "@emdash-cms/auth";
12
12
  import * as astro from "astro";
@@ -1,7 +1,7 @@
1
1
  import "../../after-B1IIdH3Y.mjs";
2
2
  import "../../base64-CmWvODNW.mjs";
3
- import "../../types-CmI1OyQg.mjs";
4
- import { t as apiError } from "../../error-DXnK2wF4.mjs";
3
+ import "../../types-CZgK3EMW.mjs";
4
+ import { t as apiError } from "../../error-rVGiqWDt.mjs";
5
5
  import { n as getPublicOrigin } from "../../public-url-CTVqgMmg.mjs";
6
6
  import { t as getAuthMode } from "../../mode-BB0F8xTC.mjs";
7
7
  import { t as resolveSessionUser } from "../../session-user-B8aLtKAH.mjs";
@@ -1,9 +1,9 @@
1
1
  import "../../dialect-helpers-DRI5pyY3.mjs";
2
2
  import "../../base64-CmWvODNW.mjs";
3
- import "../../types-CmI1OyQg.mjs";
4
- import { t as RedirectRepository } from "../../redirect-C1KVGYWe.mjs";
5
- import { a as setCachedRedirects, i as matchCachedPatterns, n as getCachedRedirects } from "../../cache-C35VWD5D.mjs";
6
- import { a as getDb } from "../../loader-DrpofRon.mjs";
3
+ import "../../types-CZgK3EMW.mjs";
4
+ import { t as RedirectRepository } from "../../redirect-_M0trWoo.mjs";
5
+ import { a as setCachedRedirects, i as matchCachedPatterns, n as getCachedRedirects } from "../../cache-D9jF5bYw.mjs";
6
+ import { a as getDb } from "../../loader-BA_zhkS_.mjs";
7
7
  import { n as isTerminalStatus } from "../../status-vUK0SA17.mjs";
8
8
  import { defineMiddleware } from "astro:middleware";
9
9
 
@@ -1,4 +1,4 @@
1
- import "../types-B-gIxFCE.mjs";
1
+ import "../types-xIfVRNLp.mjs";
2
2
  import { Kysely } from "kysely";
3
3
  import * as astro from "astro";
4
4
 
@@ -1,57 +1,57 @@
1
- import { i as runMigrations, t as MIGRATION_RACE_WAIT_MS } from "../runner-BsquExlK.mjs";
1
+ import { i as runMigrations, t as MIGRATION_RACE_WAIT_MS } from "../runner-DPdt_Wpa.mjs";
2
2
  import { t as validateIdentifier } from "../validate-VPnKoIzW.mjs";
3
3
  import { o as isSqlite } from "../dialect-helpers-DRI5pyY3.mjs";
4
4
  import { i as setI18nConfig } from "../config-CVssduLe.mjs";
5
- import { _ as resolveExclusiveHooks, g as createHookPipeline, m as EmailPipeline, p as PluginRouteRegistry, t as getMenu, v as definePlugin } from "../menus-CxqJ-z-N.mjs";
5
+ import { _ as resolveExclusiveHooks, g as createHookPipeline, m as EmailPipeline, p as PluginRouteRegistry, t as getMenu, v as definePlugin } from "../menus-CYH09a41.mjs";
6
6
  import { t as after } from "../after-B1IIdH3Y.mjs";
7
7
  import { createRequestMetrics, getRequestContext, runWithContext } from "../request-context.mjs";
8
- import "../object-cache-SEb2IM4Z.mjs";
9
- import { r as RevisionRepository, t as ContentRepository } from "../content-B43-YrIq.mjs";
8
+ import "../object-cache-CHbHv83-.mjs";
9
+ import { r as RevisionRepository, t as ContentRepository } from "../content-ncUWWjna.mjs";
10
10
  import "../base64-CmWvODNW.mjs";
11
- import "../types-CmI1OyQg.mjs";
12
- import { t as MediaRepository } from "../media-BjKxjzk8.mjs";
13
- import "../user-JAuc8VUf.mjs";
14
- import "../taxonomy-BBUlGug5.mjs";
15
- import "../comment-BDx50EX5.mjs";
11
+ import "../types-CZgK3EMW.mjs";
12
+ import { t as MediaRepository } from "../media-C5t_eCnk.mjs";
13
+ import "../user-DkG2jKCp.mjs";
14
+ import "../taxonomy-BU0LjdVb.mjs";
15
+ import "../comment-D9BLDpZI.mjs";
16
16
  import { t as OptionsRepository } from "../options-DTTML-Tx.mjs";
17
- import "../context-BW3N7wyt.mjs";
18
- import "../menus-8O6xNcYW.mjs";
19
- import "../redirect-C1KVGYWe.mjs";
17
+ import "../context-C_g-iJVA.mjs";
18
+ import "../menus-CBb6UrMU.mjs";
19
+ import "../redirect-_M0trWoo.mjs";
20
20
  import { i as setRequestCacheEntry, r as requestCached } from "../request-cache-KCNHp_RJ.mjs";
21
21
  import "../byline-registry-BOjqDOim.mjs";
22
22
  import { n as initWithLock, t as createInitLock } from "../init-lock-6b309ZrF.mjs";
23
- import "../field-defs-cache-CYYx8xlG.mjs";
24
- import "../byline-C-YajfV7.mjs";
23
+ import "../field-defs-cache-ljXzJCfc.mjs";
24
+ import "../byline-LL8lyqdb.mjs";
25
25
  import { n as normalizeMediaValue } from "../normalize-CeglrBT9.mjs";
26
26
  import "../enrich-BQ0mxJRs.mjs";
27
- import "../seo-BNzkiK_W.mjs";
27
+ import "../seo-DKeXHkzE.mjs";
28
28
  import { n as isMissingTableError } from "../db-errors-CK46D-ly.mjs";
29
- import { $ as handleContentGet, B as handleMediaUpdate, G as handleContentAuthors, H as handleRevisionList, I as handleMediaCreate, J as handleContentCountTrashed, K as handleContentCompare, L as handleMediaDelete, Q as handleContentDuplicate, R as handleMediaGet, S as PluginStateRepository, U as handleRevisionRestore, V as handleRevisionGet, X as handleContentDelete, Y as handleContentCreate, Z as handleContentDiscardDraft, _ as loadBundleFromR2, at as handleContentRestore, ct as handleContentUnpublish, dt as validateRev, et as handleContentGetIncludingTrashed, it as handleContentPublish, lt as handleContentUnschedule, nt as handleContentListTrashed, ot as handleContentSchedule, q as handleContentCountScheduled, rt as handleContentPermanentDelete, s as normalizeRegistryConfig, st as handleContentTranslations, tt as handleContentList, ut as handleContentUpdate, z as handleMediaList } from "../api-D2_sbavn.mjs";
30
- import "../dashboard-FIe0S512.mjs";
29
+ import { $ as handleContentGet, B as handleMediaUpdate, G as handleContentAuthors, H as handleRevisionList, I as handleMediaCreate, J as handleContentCountTrashed, K as handleContentCompare, L as handleMediaDelete, Q as handleContentDuplicate, R as handleMediaGet, S as PluginStateRepository, U as handleRevisionRestore, V as handleRevisionGet, X as handleContentDelete, Y as handleContentCreate, Z as handleContentDiscardDraft, _ as loadBundleFromR2, at as handleContentRestore, ct as handleContentUnpublish, dt as validateRev, et as handleContentGetIncludingTrashed, it as handleContentPublish, lt as handleContentUnschedule, nt as handleContentListTrashed, ot as handleContentSchedule, q as handleContentCountScheduled, rt as handleContentPermanentDelete, s as normalizeRegistryConfig, st as handleContentTranslations, tt as handleContentList, ut as handleContentUpdate, z as handleMediaList } from "../api-BMfveMoB.mjs";
30
+ import "../dashboard-CotyqQrW.mjs";
31
31
  import { n as hashString } from "../hash-DrvzIXcz.mjs";
32
- import { t as FTSManager } from "../fts-manager-DW_NR-Fs.mjs";
33
- import { n as SchemaRegistry } from "../registry-3aOAS4My.mjs";
32
+ import { t as FTSManager } from "../fts-manager-BbCCbEKA.mjs";
33
+ import { n as SchemaRegistry } from "../registry-g8yYt4cC.mjs";
34
34
  import { createRecorder, flushRecorder, isInstrumentationEnabled, kyselyLogOption } from "../database/instrumentation.mjs";
35
- import { a as getDb } from "../loader-DrpofRon.mjs";
36
- import "../schema-BGwx8AQY.mjs";
37
- import "../zod-generator-xEHODMJf.mjs";
35
+ import { a as getDb } from "../loader-BA_zhkS_.mjs";
36
+ import "../schema-DoLd3j2e.mjs";
37
+ import "../zod-generator-gFsRuNNy.mjs";
38
38
  import "../seo-BkhuuaaE.mjs";
39
- import "../sections-C-umuuLj.mjs";
39
+ import "../sections-5J2YJPqJ.mjs";
40
40
  import { r as singleFlightCached, t as createSingleFlightCache } from "../single-flight-cache-Cdfkic3t.mjs";
41
- import { i as getSiteSettings, o as invalidateSiteSettingsCache } from "../settings-C4tXRYiG.mjs";
42
- import "../settings-fPSR6dJa.mjs";
41
+ import { i as getSiteSettings, o as invalidateSiteSettingsCache } from "../settings-DJeki-97.mjs";
42
+ import "../settings-BMNr9Dmi.mjs";
43
43
  import "../resolve-C7I0qiR0.mjs";
44
- import { a as getTaxonomyDefs, o as getTaxonomyTerms } from "../taxonomies-n8w72lLQ.mjs";
45
- import "../taxonomies-DbAtL6m4.mjs";
46
- import { r as normalizeManifestRoute } from "../manifest-schema-BOfPXse0.mjs";
44
+ import { a as getTaxonomyDefs, o as getTaxonomyTerms } from "../taxonomies-D13i2ctt.mjs";
45
+ import "../taxonomies-CM_fUqLU.mjs";
46
+ import { r as normalizeManifestRoute } from "../manifest-schema-kPGX7VS-.mjs";
47
47
  import "../types-BvbeGEtr.mjs";
48
48
  import "../ssrf-BRKb343l.mjs";
49
- import "../error-DXnK2wF4.mjs";
50
- import "../parse-DqMWHQ8x.mjs";
49
+ import "../error-rVGiqWDt.mjs";
50
+ import "../parse-BwAdS7FZ.mjs";
51
51
  import "../redirects-Dcbuisoj.mjs";
52
52
  import "../byline-fields-eyJMblSr.mjs";
53
53
  import "../status-vUK0SA17.mjs";
54
- import { a as invalidateUrlPatternCache } from "../query-34pfm02Q.mjs";
54
+ import { a as invalidateUrlPatternCache } from "../query-BpQb-blG.mjs";
55
55
  import "../import-Bb1T9WJS.mjs";
56
56
  import { t as getTrustedProxyHeaders } from "../trusted-proxy-DZY5WCn2.mjs";
57
57
  import { n as sanitizeHeadersForSandbox, t as extractRequestMeta } from "../request-meta-CmS1tDFf.mjs";
@@ -61,14 +61,14 @@ import { r as devConsoleEmailDeliver, t as DEV_CONSOLE_EMAIL_PLUGIN_ID } from ".
61
61
  import "../utils-B7A57fm9.mjs";
62
62
  import "../tokens-LeuXF9gG.mjs";
63
63
  import "../preview-DKGCt2_p.mjs";
64
- import "../comment-reaction-Gv_pgfI3.mjs";
65
- import "../bylines-CPc_q2Vd.mjs";
66
- import { n as getWidgetAreas } from "../widgets-C2RbFN0G.mjs";
67
- import "../apply-Bk2mAuLn.mjs";
68
- import "../load-DMFi4n1p.mjs";
69
- import "../search-Gl747zMP.mjs";
64
+ import "../comment-reaction-Drl9SkNu.mjs";
65
+ import "../bylines-DE47vP8d.mjs";
66
+ import { n as getWidgetAreas } from "../widgets-BfOZ-ajY.mjs";
67
+ import "../apply--IVNSdXn.mjs";
68
+ import "../load-DMjXghbZ.mjs";
69
+ import "../search-BR0ZeZmh.mjs";
70
70
  import "../index.mjs";
71
- import { n as VERSION, t as COMMIT } from "../version-DHdCA24u.mjs";
71
+ import { n as VERSION, t as COMMIT } from "../version-BoNBItP_.mjs";
72
72
  import { t as getAuthMode } from "../mode-BB0F8xTC.mjs";
73
73
  import { t as cleanupExpiredChallenges } from "../challenge-store-LhiqMccz.mjs";
74
74
  import { a as validateEncryptionKeyAtStartup } from "../secrets-BSf9pRRY.mjs";
@@ -925,9 +925,9 @@ var EmDashRuntime = class EmDashRuntime {
925
925
  const seedHolder = getSeedHolder();
926
926
  try {
927
927
  await initWithLock(seedHolder.lock, () => seedHolder.done.has(seedKey) ? true : void 0, async () => {
928
- const { applySeed } = await import("../apply-Bk2mAuLn.mjs").then((n) => n.n);
929
- const { loadSeed } = await import("../load-DMFi4n1p.mjs").then((n) => n.r);
930
- const { validateSeed } = await import("../validate-BzXHWnkV.mjs").then((n) => n.n);
928
+ const { applySeed } = await import("../apply--IVNSdXn.mjs").then((n) => n.n);
929
+ const { loadSeed } = await import("../load-DMjXghbZ.mjs").then((n) => n.r);
930
+ const { validateSeed } = await import("../validate-CuJ1Ps9j.mjs").then((n) => n.n);
931
931
  const seed = await loadSeed();
932
932
  if (validateSeed(seed).valid) {
933
933
  await applySeed(db, seed, { onConflict: "skip" });
@@ -1663,7 +1663,7 @@ var EmDashRuntime = class EmDashRuntime {
1663
1663
  if (this.hooks.hasHooks("content:beforeSave")) processedData = (await this.hooks.runContentBeforeSave(body.data, collection, true)).content;
1664
1664
  processedData = await this.runSandboxedBeforeSave(processedData, collection, true);
1665
1665
  processedData = await this.normalizeMediaFields(collection, processedData);
1666
- const { validateContentData } = await import("../validation-B6DKPTtU.mjs");
1666
+ const { validateContentData } = await import("../validation-CwUfTdGF.mjs");
1667
1667
  const validation = await validateContentData(this.db, collection, processedData, { partial: false });
1668
1668
  if (!validation.ok) return {
1669
1669
  success: false,
@@ -1679,7 +1679,7 @@ var EmDashRuntime = class EmDashRuntime {
1679
1679
  return result;
1680
1680
  }
1681
1681
  async handleContentUpdate(collection, id, body) {
1682
- const { ContentRepository } = await import("../content-B43-YrIq.mjs").then((n) => n.n);
1682
+ const { ContentRepository } = await import("../content-ncUWWjna.mjs").then((n) => n.n);
1683
1683
  const repo = new ContentRepository(this.db);
1684
1684
  const resolvedItem = await repo.findByIdOrSlug(collection, id, body.locale);
1685
1685
  const resolvedId = resolvedItem?.id ?? id;
@@ -1706,7 +1706,7 @@ var EmDashRuntime = class EmDashRuntime {
1706
1706
  if (this.hooks.hasHooks("content:beforeSave")) processedData = (await this.hooks.runContentBeforeSave(bodyWithoutRev.data, collection, false)).content;
1707
1707
  processedData = await this.runSandboxedBeforeSave(processedData, collection, false);
1708
1708
  processedData = await this.normalizeMediaFields(collection, processedData);
1709
- const { validateContentData } = await import("../validation-B6DKPTtU.mjs");
1709
+ const { validateContentData } = await import("../validation-CwUfTdGF.mjs");
1710
1710
  const validation = await validateContentData(this.db, collection, processedData, { partial: true });
1711
1711
  if (!validation.ok) return {
1712
1712
  success: false,
@@ -1812,10 +1812,14 @@ var EmDashRuntime = class EmDashRuntime {
1812
1812
  return result;
1813
1813
  }
1814
1814
  async handleContentSchedule(collection, id, scheduledAt) {
1815
- return handleContentSchedule(this.db, collection, id, scheduledAt);
1815
+ const result = await handleContentSchedule(this.db, collection, id, scheduledAt);
1816
+ if (result.success && result.data) this.runAfterScheduleHooks(contentItemToRecord(result.data.item), collection);
1817
+ return result;
1816
1818
  }
1817
1819
  async handleContentUnschedule(collection, id) {
1818
- return handleContentUnschedule(this.db, collection, id);
1820
+ const result = await handleContentUnschedule(this.db, collection, id);
1821
+ if (result.success && result.data) this.runAfterUnscheduleHooks(contentItemToRecord(result.data.item), collection);
1822
+ return result;
1819
1823
  }
1820
1824
  async handleContentCountScheduled(collection) {
1821
1825
  return handleContentCountScheduled(this.db, collection);
@@ -2093,12 +2097,29 @@ var EmDashRuntime = class EmDashRuntime {
2093
2097
  }).catch((err) => console.error(`EmDash: Sandboxed plugin ${pluginId} afterDelete error:`, err));
2094
2098
  }
2095
2099
  }
2096
- runAfterPublishHooks(content, collection) {
2100
+ runDeferredContentHook(name, content, collection) {
2101
+ const label = name.slice(8);
2097
2102
  after(async () => {
2098
- if (this.hooks.hasHooks("content:afterPublish")) try {
2099
- await this.hooks.runContentAfterPublish(content, collection);
2103
+ if (this.hooks.hasHooks(name)) try {
2104
+ switch (name) {
2105
+ case "content:afterPublish":
2106
+ await this.hooks.runContentAfterPublish(content, collection);
2107
+ break;
2108
+ case "content:afterUnpublish":
2109
+ await this.hooks.runContentAfterUnpublish(content, collection);
2110
+ break;
2111
+ case "content:afterRestore":
2112
+ await this.hooks.runContentAfterRestore(content, collection);
2113
+ break;
2114
+ case "content:afterSchedule":
2115
+ await this.hooks.runContentAfterSchedule(content, collection);
2116
+ break;
2117
+ case "content:afterUnschedule":
2118
+ await this.hooks.runContentAfterUnschedule(content, collection);
2119
+ break;
2120
+ }
2100
2121
  } catch (err) {
2101
- console.error("EmDash afterPublish hook error:", err);
2122
+ console.error(`EmDash ${label} hook error:`, err);
2102
2123
  }
2103
2124
  const tasks = [];
2104
2125
  for (const [pluginKey, plugin] of this.sandboxedPlugins) {
@@ -2106,53 +2127,32 @@ var EmDashRuntime = class EmDashRuntime {
2106
2127
  if (!pluginId || !this.isPluginEnabled(pluginId)) continue;
2107
2128
  tasks.push((async () => {
2108
2129
  try {
2109
- await plugin.invokeHook("content:afterPublish", {
2130
+ await plugin.invokeHook(name, {
2110
2131
  content,
2111
2132
  collection
2112
2133
  });
2113
2134
  } catch (err) {
2114
- console.error(`EmDash: Sandboxed plugin ${pluginId} afterPublish error:`, err);
2135
+ console.error(`EmDash: Sandboxed plugin ${pluginId} ${label} error:`, err);
2115
2136
  }
2116
2137
  })());
2117
2138
  }
2118
2139
  await Promise.allSettled(tasks);
2119
2140
  });
2120
2141
  }
2142
+ runAfterPublishHooks(content, collection) {
2143
+ this.runDeferredContentHook("content:afterPublish", content, collection);
2144
+ }
2121
2145
  runAfterUnpublishHooks(content, collection) {
2122
- if (this.hooks.hasHooks("content:afterUnpublish")) this.hooks.runContentAfterUnpublish(content, collection).catch((err) => console.error("EmDash afterUnpublish hook error:", err));
2123
- for (const [pluginKey, plugin] of this.sandboxedPlugins) {
2124
- const [pluginId] = pluginKey.split(":");
2125
- if (!pluginId || !this.isPluginEnabled(pluginId)) continue;
2126
- plugin.invokeHook("content:afterUnpublish", {
2127
- content,
2128
- collection
2129
- }).catch((err) => console.error(`EmDash: Sandboxed plugin ${pluginId} afterUnpublish error:`, err));
2130
- }
2146
+ this.runDeferredContentHook("content:afterUnpublish", content, collection);
2131
2147
  }
2132
2148
  runAfterRestoreHooks(content, collection) {
2133
- after(async () => {
2134
- if (this.hooks.hasHooks("content:afterRestore")) try {
2135
- await this.hooks.runContentAfterRestore(content, collection);
2136
- } catch (err) {
2137
- console.error("EmDash afterRestore hook error:", err);
2138
- }
2139
- const tasks = [];
2140
- for (const [pluginKey, plugin] of this.sandboxedPlugins) {
2141
- const [pluginId] = pluginKey.split(":");
2142
- if (!pluginId || !this.isPluginEnabled(pluginId)) continue;
2143
- tasks.push((async () => {
2144
- try {
2145
- await plugin.invokeHook("content:afterRestore", {
2146
- content,
2147
- collection
2148
- });
2149
- } catch (err) {
2150
- console.error(`EmDash: Sandboxed plugin ${pluginId} afterRestore error:`, err);
2151
- }
2152
- })());
2153
- }
2154
- await Promise.allSettled(tasks);
2155
- });
2149
+ this.runDeferredContentHook("content:afterRestore", content, collection);
2150
+ }
2151
+ runAfterScheduleHooks(content, collection) {
2152
+ this.runDeferredContentHook("content:afterSchedule", content, collection);
2153
+ }
2154
+ runAfterUnscheduleHooks(content, collection) {
2155
+ this.runDeferredContentHook("content:afterUnschedule", content, collection);
2156
2156
  }
2157
2157
  async handleSandboxedRoute(plugin, path, request) {
2158
2158
  const routeName = path.replace(LEADING_SLASH_PATTERN, "");
@@ -2818,7 +2818,7 @@ const onRequest = defineMiddleware(async (context, next) => {
2818
2818
  if (!isSetupVerified() && !context.isPrerendered) {
2819
2819
  const t0 = performance.now();
2820
2820
  try {
2821
- const { getDb } = await import("../loader-DrpofRon.mjs").then((n) => n.o);
2821
+ const { getDb } = await import("../loader-BA_zhkS_.mjs").then((n) => n.o);
2822
2822
  await (await getDb()).selectFrom("_emdash_migrations").selectAll().limit(1).execute();
2823
2823
  markSetupVerified();
2824
2824
  } catch (error) {