emdash 0.15.0 → 0.16.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 (351) hide show
  1. package/dist/api/route-utils.mjs +10 -10
  2. package/dist/api/schemas/index.d.mts +1 -1
  3. package/dist/{api-CLwG_3dh.mjs → api-BNKqxyFX.mjs} +54 -14
  4. package/dist/{api-CLwG_3dh.mjs.map → api-BNKqxyFX.mjs.map} +1 -1
  5. package/dist/{apply-wJhM_bwU.mjs → apply-BOPaD-s9.mjs} +16 -16
  6. package/dist/{apply-wJhM_bwU.mjs.map → apply-BOPaD-s9.mjs.map} +1 -1
  7. package/dist/astro/index.d.mts +3 -3
  8. package/dist/astro/index.d.mts.map +1 -1
  9. package/dist/astro/index.mjs +33 -1
  10. package/dist/astro/index.mjs.map +1 -1
  11. package/dist/astro/middleware/auth.d.mts +3 -3
  12. package/dist/astro/middleware/auth.mjs +2 -2
  13. package/dist/astro/middleware/redirect.mjs +4 -4
  14. package/dist/astro/middleware/request-context.mjs +1 -1
  15. package/dist/astro/middleware.d.mts.map +1 -1
  16. package/dist/astro/middleware.mjs +66 -46
  17. package/dist/astro/middleware.mjs.map +1 -1
  18. package/dist/astro/routes/api/admin/allowed-domains/_domain_.mjs +3 -3
  19. package/dist/astro/routes/api/admin/allowed-domains/index.mjs +3 -3
  20. package/dist/astro/routes/api/admin/api-tokens/_id_.mjs +2 -2
  21. package/dist/astro/routes/api/admin/api-tokens/index.mjs +3 -3
  22. package/dist/astro/routes/api/admin/bylines/_id_/index.mjs +8 -8
  23. package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs +9 -9
  24. package/dist/astro/routes/api/admin/bylines/index.mjs +9 -9
  25. package/dist/astro/routes/api/admin/comments/_id_/status.mjs +7 -7
  26. package/dist/astro/routes/api/admin/comments/_id_.mjs +5 -5
  27. package/dist/astro/routes/api/admin/comments/bulk.mjs +6 -6
  28. package/dist/astro/routes/api/admin/comments/counts.mjs +5 -5
  29. package/dist/astro/routes/api/admin/comments/index.mjs +6 -6
  30. package/dist/astro/routes/api/admin/hooks/exclusive/_hookName_.mjs +4 -4
  31. package/dist/astro/routes/api/admin/hooks/exclusive/index.mjs +3 -3
  32. package/dist/astro/routes/api/admin/oauth-clients/_id_.mjs +3 -3
  33. package/dist/astro/routes/api/admin/oauth-clients/index.mjs +3 -3
  34. package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs +27 -27
  35. package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +27 -27
  36. package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +27 -27
  37. package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +27 -27
  38. package/dist/astro/routes/api/admin/plugins/_id_/update.mjs +27 -27
  39. package/dist/astro/routes/api/admin/plugins/index.mjs +27 -27
  40. package/dist/astro/routes/api/admin/plugins/marketplace/_id_/icon.mjs +3 -3
  41. package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs +27 -27
  42. package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs +27 -27
  43. package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +27 -27
  44. package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.mjs +27 -27
  45. package/dist/astro/routes/api/admin/plugins/registry/_id_/update.d.mts.map +1 -1
  46. package/dist/astro/routes/api/admin/plugins/registry/_id_/update.mjs +41 -28
  47. package/dist/astro/routes/api/admin/plugins/registry/_id_/update.mjs.map +1 -1
  48. package/dist/astro/routes/api/admin/plugins/registry/artifact.d.mts +8 -0
  49. package/dist/astro/routes/api/admin/plugins/registry/artifact.d.mts.map +1 -0
  50. package/dist/astro/routes/api/admin/plugins/registry/artifact.mjs +301 -0
  51. package/dist/astro/routes/api/admin/plugins/registry/artifact.mjs.map +1 -0
  52. package/dist/astro/routes/api/admin/plugins/registry/install.d.mts.map +1 -1
  53. package/dist/astro/routes/api/admin/plugins/registry/install.mjs +46 -28
  54. package/dist/astro/routes/api/admin/plugins/registry/install.mjs.map +1 -1
  55. package/dist/astro/routes/api/admin/plugins/updates.mjs +27 -27
  56. package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +27 -27
  57. package/dist/astro/routes/api/admin/themes/marketplace/_id_/thumbnail.mjs +3 -3
  58. package/dist/astro/routes/api/admin/themes/marketplace/index.mjs +27 -27
  59. package/dist/astro/routes/api/admin/users/_id_/disable.mjs +2 -2
  60. package/dist/astro/routes/api/admin/users/_id_/enable.mjs +2 -2
  61. package/dist/astro/routes/api/admin/users/_id_/index.mjs +3 -3
  62. package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs +2 -2
  63. package/dist/astro/routes/api/admin/users/index.mjs +3 -3
  64. package/dist/astro/routes/api/auth/dev-bypass.mjs +3 -3
  65. package/dist/astro/routes/api/auth/invite/accept.mjs +2 -2
  66. package/dist/astro/routes/api/auth/invite/complete.mjs +3 -3
  67. package/dist/astro/routes/api/auth/invite/index.mjs +3 -3
  68. package/dist/astro/routes/api/auth/invite/register-options.mjs +3 -3
  69. package/dist/astro/routes/api/auth/logout.mjs +2 -2
  70. package/dist/astro/routes/api/auth/magic-link/send.mjs +4 -4
  71. package/dist/astro/routes/api/auth/magic-link/verify.mjs +2 -2
  72. package/dist/astro/routes/api/auth/me.mjs +3 -3
  73. package/dist/astro/routes/api/auth/passkey/_id_.mjs +3 -3
  74. package/dist/astro/routes/api/auth/passkey/index.mjs +2 -2
  75. package/dist/astro/routes/api/auth/passkey/options.mjs +4 -4
  76. package/dist/astro/routes/api/auth/passkey/register/options.mjs +3 -3
  77. package/dist/astro/routes/api/auth/passkey/register/verify.mjs +3 -3
  78. package/dist/astro/routes/api/auth/passkey/verify.mjs +3 -3
  79. package/dist/astro/routes/api/auth/signup/complete.mjs +3 -3
  80. package/dist/astro/routes/api/auth/signup/request.mjs +4 -4
  81. package/dist/astro/routes/api/auth/signup/verify.mjs +2 -2
  82. package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs +6 -6
  83. package/dist/astro/routes/api/content/_collection_/_id_/compare.mjs +3 -3
  84. package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs +3 -3
  85. package/dist/astro/routes/api/content/_collection_/_id_/duplicate.mjs +3 -3
  86. package/dist/astro/routes/api/content/_collection_/_id_/permanent.mjs +3 -3
  87. package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs +4 -4
  88. package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs +4 -4
  89. package/dist/astro/routes/api/content/_collection_/_id_/restore.mjs +3 -3
  90. package/dist/astro/routes/api/content/_collection_/_id_/revisions.mjs +3 -3
  91. package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs +4 -4
  92. package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs +8 -8
  93. package/dist/astro/routes/api/content/_collection_/_id_/translations.mjs +3 -3
  94. package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs +3 -3
  95. package/dist/astro/routes/api/content/_collection_/_id_.mjs +4 -4
  96. package/dist/astro/routes/api/content/_collection_/index.mjs +4 -4
  97. package/dist/astro/routes/api/content/_collection_/trash.mjs +4 -4
  98. package/dist/astro/routes/api/dashboard.mjs +7 -7
  99. package/dist/astro/routes/api/dev/emails.mjs +2 -2
  100. package/dist/astro/routes/api/import/probe.mjs +4 -4
  101. package/dist/astro/routes/api/import/wordpress/analyze.mjs +3 -3
  102. package/dist/astro/routes/api/import/wordpress/execute.d.mts +3 -3
  103. package/dist/astro/routes/api/import/wordpress/execute.mjs +8 -8
  104. package/dist/astro/routes/api/import/wordpress/media.mjs +4 -4
  105. package/dist/astro/routes/api/import/wordpress/prepare.mjs +6 -6
  106. package/dist/astro/routes/api/import/wordpress/rewrite-url-helpers.d.mts +11 -1
  107. package/dist/astro/routes/api/import/wordpress/rewrite-url-helpers.d.mts.map +1 -1
  108. package/dist/astro/routes/api/import/wordpress/rewrite-url-helpers.mjs +17 -1
  109. package/dist/astro/routes/api/import/wordpress/rewrite-url-helpers.mjs.map +1 -1
  110. package/dist/astro/routes/api/import/wordpress/rewrite-urls.d.mts.map +1 -1
  111. package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs +7 -7
  112. package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs.map +1 -1
  113. package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs +4 -4
  114. package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs +5 -5
  115. package/dist/astro/routes/api/manifest.mjs +3 -3
  116. package/dist/astro/routes/api/mcp.mjs +26 -26
  117. package/dist/astro/routes/api/media/_id_/confirm.mjs +4 -4
  118. package/dist/astro/routes/api/media/_id_.mjs +4 -4
  119. package/dist/astro/routes/api/media/file/_...key_.mjs +2 -2
  120. package/dist/astro/routes/api/media/providers/_providerId_/_itemId_.mjs +3 -3
  121. package/dist/astro/routes/api/media/providers/_providerId_/index.mjs +3 -3
  122. package/dist/astro/routes/api/media/providers/index.mjs +3 -3
  123. package/dist/astro/routes/api/media/upload-url.mjs +4 -4
  124. package/dist/astro/routes/api/media.mjs +5 -5
  125. package/dist/astro/routes/api/menus/_name_/items/_id_.mjs +5 -5
  126. package/dist/astro/routes/api/menus/_name_/items.mjs +5 -5
  127. package/dist/astro/routes/api/menus/_name_/reorder.mjs +5 -5
  128. package/dist/astro/routes/api/menus/_name_/translations.mjs +5 -5
  129. package/dist/astro/routes/api/menus/_name_.mjs +5 -5
  130. package/dist/astro/routes/api/menus/index.mjs +5 -5
  131. package/dist/astro/routes/api/oauth/device/authorize.mjs +3 -3
  132. package/dist/astro/routes/api/oauth/device/code.mjs +4 -4
  133. package/dist/astro/routes/api/oauth/device/token.mjs +4 -4
  134. package/dist/astro/routes/api/oauth/register.mjs +2 -2
  135. package/dist/astro/routes/api/oauth/token/refresh.mjs +3 -3
  136. package/dist/astro/routes/api/oauth/token/revoke.mjs +3 -3
  137. package/dist/astro/routes/api/oauth/token.mjs +2 -2
  138. package/dist/astro/routes/api/openapi.json.mjs +2 -2
  139. package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs +3 -3
  140. package/dist/astro/routes/api/redirects/404s/index.mjs +6 -6
  141. package/dist/astro/routes/api/redirects/404s/summary.mjs +6 -6
  142. package/dist/astro/routes/api/redirects/_id_.mjs +7 -7
  143. package/dist/astro/routes/api/redirects/index.mjs +7 -7
  144. package/dist/astro/routes/api/revisions/_revisionId_/index.mjs +3 -3
  145. package/dist/astro/routes/api/revisions/_revisionId_/restore.mjs +3 -3
  146. package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs +27 -27
  147. package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs +27 -27
  148. package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs +27 -27
  149. package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +27 -27
  150. package/dist/astro/routes/api/schema/collections/index.mjs +27 -27
  151. package/dist/astro/routes/api/schema/index.mjs +6 -6
  152. package/dist/astro/routes/api/schema/orphans/_slug_.mjs +27 -27
  153. package/dist/astro/routes/api/schema/orphans/index.mjs +27 -27
  154. package/dist/astro/routes/api/search/enable.mjs +7 -7
  155. package/dist/astro/routes/api/search/index.mjs +6 -6
  156. package/dist/astro/routes/api/search/rebuild.mjs +7 -7
  157. package/dist/astro/routes/api/search/stats.mjs +6 -6
  158. package/dist/astro/routes/api/search/suggest.mjs +6 -6
  159. package/dist/astro/routes/api/sections/_slug_.mjs +6 -6
  160. package/dist/astro/routes/api/sections/index.mjs +6 -6
  161. package/dist/astro/routes/api/settings/email.mjs +4 -4
  162. package/dist/astro/routes/api/settings.mjs +8 -8
  163. package/dist/astro/routes/api/setup/admin-verify.mjs +3 -3
  164. package/dist/astro/routes/api/setup/admin.mjs +3 -3
  165. package/dist/astro/routes/api/setup/dev-bypass.mjs +15 -15
  166. package/dist/astro/routes/api/setup/dev-reset.mjs +2 -2
  167. package/dist/astro/routes/api/setup/index.mjs +16 -16
  168. package/dist/astro/routes/api/setup/status.mjs +3 -3
  169. package/dist/astro/routes/api/snapshot.mjs +4 -4
  170. package/dist/astro/routes/api/snapshot.mjs.map +1 -1
  171. package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs +9 -9
  172. package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs +9 -9
  173. package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs +9 -9
  174. package/dist/astro/routes/api/taxonomies/index.mjs +9 -9
  175. package/dist/astro/routes/api/themes/preview.mjs +3 -3
  176. package/dist/astro/routes/api/typegen.mjs +5 -5
  177. package/dist/astro/routes/api/widget-areas/_name_/reorder.mjs +4 -4
  178. package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs +6 -6
  179. package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs +6 -6
  180. package/dist/astro/routes/api/widget-areas/_name_.mjs +5 -5
  181. package/dist/astro/routes/api/widget-areas/index.mjs +6 -6
  182. package/dist/astro/routes/api/widget-components.mjs +2 -2
  183. package/dist/astro/routes/robots.txt.mjs +4 -4
  184. package/dist/astro/routes/sitemap-_collection_.xml.d.mts.map +1 -1
  185. package/dist/astro/routes/sitemap-_collection_.xml.mjs +58 -13
  186. package/dist/astro/routes/sitemap-_collection_.xml.mjs.map +1 -1
  187. package/dist/astro/routes/sitemap.xml.mjs +5 -5
  188. package/dist/astro/types.d.mts +10 -3
  189. package/dist/astro/types.d.mts.map +1 -1
  190. package/dist/{authorize-Bkwe8kuL.mjs → authorize-Bn4S4DUT.mjs} +2 -2
  191. package/dist/{authorize-Bkwe8kuL.mjs.map → authorize-Bn4S4DUT.mjs.map} +1 -1
  192. package/dist/{byline-CTaWkMh5.mjs → byline-BDylH_m4.mjs} +3 -3
  193. package/dist/{byline-CTaWkMh5.mjs.map → byline-BDylH_m4.mjs.map} +1 -1
  194. package/dist/{bylines-DtDRNF1n.d.mts → bylines-B2_XmnSU.d.mts} +34 -34
  195. package/dist/{bylines-DtDRNF1n.d.mts.map → bylines-B2_XmnSU.d.mts.map} +1 -1
  196. package/dist/{bylines-H0Xh5TMy.mjs → bylines-B7TFEvFf.mjs} +2 -2
  197. package/dist/{bylines-H0Xh5TMy.mjs.map → bylines-B7TFEvFf.mjs.map} +1 -1
  198. package/dist/{bylines-BYHWU3T7.mjs → bylines-n6nykUyI.mjs} +6 -6
  199. package/dist/{bylines-BYHWU3T7.mjs.map → bylines-n6nykUyI.mjs.map} +1 -1
  200. package/dist/{cache-CNk1jIxp.mjs → cache-BcI1yUjR.mjs} +2 -2
  201. package/dist/{cache-CNk1jIxp.mjs.map → cache-BcI1yUjR.mjs.map} +1 -1
  202. package/dist/{chunks-BkfVdD-3.mjs → chunks-cYG4SnIP.mjs} +2 -2
  203. package/dist/{chunks-BkfVdD-3.mjs.map → chunks-cYG4SnIP.mjs.map} +1 -1
  204. package/dist/cli/index.mjs +61 -15
  205. package/dist/cli/index.mjs.map +1 -1
  206. package/dist/client/cf-access.d.mts +1 -1
  207. package/dist/client/index.d.mts +1 -1
  208. package/dist/{comment-_yzlBYPx.mjs → comment-C76G-9tz.mjs} +2 -2
  209. package/dist/{comment-_yzlBYPx.mjs.map → comment-C76G-9tz.mjs.map} +1 -1
  210. package/dist/{comments-DxID-rsd.mjs → comments-CCxFFGY1.mjs} +3 -3
  211. package/dist/{comments-DxID-rsd.mjs.map → comments-CCxFFGY1.mjs.map} +1 -1
  212. package/dist/{content-C0ooIs-f.mjs → content-8voQNTXX.mjs} +3 -3
  213. package/dist/{content-C0ooIs-f.mjs.map → content-8voQNTXX.mjs.map} +1 -1
  214. package/dist/{context-sAnCaUIR.mjs → context-B7qiYrz2.mjs} +7 -7
  215. package/dist/{context-sAnCaUIR.mjs.map → context-B7qiYrz2.mjs.map} +1 -1
  216. package/dist/{dashboard-Cqw3ay2X.mjs → dashboard-BeaFSPpx.mjs} +4 -4
  217. package/dist/{dashboard-Cqw3ay2X.mjs.map → dashboard-BeaFSPpx.mjs.map} +1 -1
  218. package/dist/db/index.d.mts +1 -1
  219. package/dist/db/index.mjs +1 -1
  220. package/dist/db/sqlite.mjs +1 -1
  221. package/dist/{db-errors-CGN9kJfo.mjs → db-errors-BiYqoX-n.mjs} +14 -2
  222. package/dist/db-errors-BiYqoX-n.mjs.map +1 -0
  223. package/dist/{error-CPh_8eLq.mjs → error-ChfADBuu.mjs} +5 -3
  224. package/dist/error-ChfADBuu.mjs.map +1 -0
  225. package/dist/errors-9P_FDrJ_.mjs +17 -0
  226. package/dist/errors-9P_FDrJ_.mjs.map +1 -0
  227. package/dist/{fts-manager-Mnrtn-r2.mjs → fts-manager-C_b-4x8u.mjs} +2 -2
  228. package/dist/{fts-manager-Mnrtn-r2.mjs.map → fts-manager-C_b-4x8u.mjs.map} +1 -1
  229. package/dist/{index-Bv1Wf1zB.d.mts → index-BPZFAcgE.d.mts} +154 -110
  230. package/dist/index-BPZFAcgE.d.mts.map +1 -0
  231. package/dist/index.d.mts +4 -4
  232. package/dist/index.mjs +38 -38
  233. package/dist/{load-DmXNVhst.mjs → load-CLFRjk9r.mjs} +2 -2
  234. package/dist/{load-DmXNVhst.mjs.map → load-CLFRjk9r.mjs.map} +1 -1
  235. package/dist/{loader-Chm5h7Gr.mjs → loader-D-vIJjfY.mjs} +86 -46
  236. package/dist/loader-D-vIJjfY.mjs.map +1 -0
  237. package/dist/media/local-runtime.d.mts +3 -3
  238. package/dist/media/local-runtime.mjs +4 -4
  239. package/dist/{media-oqRcNiQf.mjs → media-CKQd8AYU.mjs} +2 -2
  240. package/dist/{media-oqRcNiQf.mjs.map → media-CKQd8AYU.mjs.map} +1 -1
  241. package/dist/{menus-C75SSmRy.mjs → menus-C-nWT5Tu.mjs} +17 -11
  242. package/dist/menus-C-nWT5Tu.mjs.map +1 -0
  243. package/dist/{menus-Bjf5R1Qq.mjs → menus-arUNspyU.mjs} +2 -2
  244. package/dist/{menus-Bjf5R1Qq.mjs.map → menus-arUNspyU.mjs.map} +1 -1
  245. package/dist/{parse-3-caTKgt.mjs → parse-DHbXfvxO.mjs} +2 -2
  246. package/dist/{parse-3-caTKgt.mjs.map → parse-DHbXfvxO.mjs.map} +1 -1
  247. package/dist/plugin-utils.d.mts +25 -10
  248. package/dist/plugin-utils.d.mts.map +1 -1
  249. package/dist/plugin-utils.mjs +11 -10
  250. package/dist/plugin-utils.mjs.map +1 -1
  251. package/dist/plugins/adapt-sandbox-entry.d.mts +3 -3
  252. package/dist/{query-BJn8TOPk.mjs → query-7m6-l0f_.mjs} +21 -14
  253. package/dist/query-7m6-l0f_.mjs.map +1 -0
  254. package/dist/{rate-limit-D_-gAeJ0.mjs → rate-limit-D8RAXN8b.mjs} +2 -2
  255. package/dist/{rate-limit-D_-gAeJ0.mjs.map → rate-limit-D8RAXN8b.mjs.map} +1 -1
  256. package/dist/{redirect-CNv4mHX2.mjs → redirect-CjfDGrTd.mjs} +2 -2
  257. package/dist/{redirect-CNv4mHX2.mjs.map → redirect-CjfDGrTd.mjs.map} +1 -1
  258. package/dist/{redirects-B-CUZ1Xh.mjs → redirects-CowoEHdE.mjs} +3 -3
  259. package/dist/{redirects-B-CUZ1Xh.mjs.map → redirects-CowoEHdE.mjs.map} +1 -1
  260. package/dist/{registry-DqrAQDXH.mjs → registry-Cyp-dx6J.mjs} +4 -4
  261. package/dist/{registry-DqrAQDXH.mjs.map → registry-Cyp-dx6J.mjs.map} +1 -1
  262. package/dist/resolve-D6sM-SgF.mjs +143 -0
  263. package/dist/resolve-D6sM-SgF.mjs.map +1 -0
  264. package/dist/{runner-CNHRo1mT.d.mts → runner-DSQBurMS.d.mts} +7 -4
  265. package/dist/runner-DSQBurMS.d.mts.map +1 -0
  266. package/dist/{runner-CGlojznK.mjs → runner-Drnvs96u.mjs} +20 -24
  267. package/dist/{runner-CGlojznK.mjs.map → runner-Drnvs96u.mjs.map} +1 -1
  268. package/dist/runtime.d.mts +3 -3
  269. package/dist/runtime.mjs +2 -2
  270. package/dist/{schema-Djdlfi5G.mjs → schema-CI9mYPX3.mjs} +4 -4
  271. package/dist/{schema-Djdlfi5G.mjs.map → schema-CI9mYPX3.mjs.map} +1 -1
  272. package/dist/{search-By-NN3da.mjs → search-DKz_mGBP.mjs} +4 -4
  273. package/dist/{search-By-NN3da.mjs.map → search-DKz_mGBP.mjs.map} +1 -1
  274. package/dist/{sections-DcBIlOq1.mjs → sections-DBbCDIAT.mjs} +3 -3
  275. package/dist/{sections-DcBIlOq1.mjs.map → sections-DBbCDIAT.mjs.map} +1 -1
  276. package/dist/seed/index.mjs +13 -13
  277. package/dist/{seo-bjDoq9Eg.mjs → seo-BGCyDlkb.mjs} +2 -2
  278. package/dist/{seo-bjDoq9Eg.mjs.map → seo-BGCyDlkb.mjs.map} +1 -1
  279. package/dist/{seo-BoR4wCUh.mjs → seo-Dq707mNQ.mjs} +5 -3
  280. package/dist/seo-Dq707mNQ.mjs.map +1 -0
  281. package/dist/{service-BuuTdGAT.mjs → service-B0H7U1Y9.mjs} +2 -2
  282. package/dist/{service-BuuTdGAT.mjs.map → service-B0H7U1Y9.mjs.map} +1 -1
  283. package/dist/{settings-hcubRfkr.mjs → settings-BSXRtTzk.mjs} +3 -3
  284. package/dist/{settings-hcubRfkr.mjs.map → settings-BSXRtTzk.mjs.map} +1 -1
  285. package/dist/{settings-CJnKiWuR.mjs → settings-DfwNyQkf.mjs} +3 -3
  286. package/dist/{settings-CJnKiWuR.mjs.map → settings-DfwNyQkf.mjs.map} +1 -1
  287. package/dist/{taxonomies-CLs9HPE2.mjs → taxonomies-4vx0nmMr.mjs} +4 -4
  288. package/dist/{taxonomies-CLs9HPE2.mjs.map → taxonomies-4vx0nmMr.mjs.map} +1 -1
  289. package/dist/{taxonomies-WamPVA2x.mjs → taxonomies-CcvrMLbR.mjs} +7 -7
  290. package/dist/{taxonomies-WamPVA2x.mjs.map → taxonomies-CcvrMLbR.mjs.map} +1 -1
  291. package/dist/{taxonomy-D4Uc2LsZ.mjs → taxonomy-zqGQUqgu.mjs} +3 -3
  292. package/dist/{taxonomy-D4Uc2LsZ.mjs.map → taxonomy-zqGQUqgu.mjs.map} +1 -1
  293. package/dist/{transport-DOxLfUir.d.mts → transport-C2MGqtL6.d.mts} +1 -1
  294. package/dist/{transport-DOxLfUir.d.mts.map → transport-C2MGqtL6.d.mts.map} +1 -1
  295. package/dist/{types-ByV5sgsv.mjs → types-B0bmgwMG.mjs} +2 -2
  296. package/dist/{types-ByV5sgsv.mjs.map → types-B0bmgwMG.mjs.map} +1 -1
  297. package/dist/{user-D3BD5zdT.mjs → user-hUSOaIJy.mjs} +2 -2
  298. package/dist/{user-D3BD5zdT.mjs.map → user-hUSOaIJy.mjs.map} +1 -1
  299. package/dist/{validate-mz87i8_1.mjs → validate-IGltez8n.mjs} +2 -2
  300. package/dist/{validate-mz87i8_1.mjs.map → validate-IGltez8n.mjs.map} +1 -1
  301. package/dist/{validation-DKHhXjPr.mjs → validation-Bmymau7y.mjs} +6 -6
  302. package/dist/{validation-DKHhXjPr.mjs.map → validation-Bmymau7y.mjs.map} +1 -1
  303. package/dist/version-BTc87L3L.mjs +7 -0
  304. package/dist/{version-Ct7C6RSo.mjs.map → version-BTc87L3L.mjs.map} +1 -1
  305. package/dist/{widgets-lShIQXU5.mjs → widgets-yHQa4c6c.mjs} +2 -2
  306. package/dist/{widgets-lShIQXU5.mjs.map → widgets-yHQa4c6c.mjs.map} +1 -1
  307. package/dist/{zod-generator-dvxgmd1M.mjs → zod-generator-B80aap1J.mjs} +2 -2
  308. package/dist/{zod-generator-dvxgmd1M.mjs.map → zod-generator-B80aap1J.mjs.map} +1 -1
  309. package/package.json +7 -7
  310. package/src/api/errors.ts +2 -0
  311. package/src/api/handlers/index.ts +2 -0
  312. package/src/api/handlers/registry.ts +69 -1
  313. package/src/api/handlers/seo.ts +16 -1
  314. package/src/api/handlers/snapshot.ts +1 -1
  315. package/src/astro/integration/index.ts +26 -0
  316. package/src/astro/integration/routes.ts +5 -0
  317. package/src/astro/integration/runtime.ts +8 -0
  318. package/src/astro/middleware.ts +4 -0
  319. package/src/astro/public-plugin-api-routes.ts +41 -0
  320. package/src/astro/routes/api/admin/plugins/registry/[id]/update.ts +4 -0
  321. package/src/astro/routes/api/admin/plugins/registry/artifact.ts +388 -0
  322. package/src/astro/routes/api/admin/plugins/registry/install.ts +7 -1
  323. package/src/astro/routes/api/import/wordpress/rewrite-url-helpers.ts +22 -0
  324. package/src/astro/routes/api/import/wordpress/rewrite-urls.ts +5 -2
  325. package/src/astro/routes/sitemap-[collection].xml.ts +114 -14
  326. package/src/astro/types.ts +14 -0
  327. package/src/content/converters/portable-text-to-prosemirror.ts +35 -11
  328. package/src/database/connection.ts +3 -10
  329. package/src/database/errors.ts +14 -0
  330. package/src/database/index.ts +3 -1
  331. package/src/database/migrations/runner.ts +29 -21
  332. package/src/emdash-runtime.ts +1 -0
  333. package/src/i18n/resolve.ts +152 -0
  334. package/src/index.ts +2 -0
  335. package/src/loader.ts +133 -59
  336. package/src/plugin-utils.ts +23 -0
  337. package/src/query.ts +24 -5
  338. package/src/utils/db-errors.ts +24 -0
  339. package/dist/connection-2igzM-AT.mjs +0 -57
  340. package/dist/connection-2igzM-AT.mjs.map +0 -1
  341. package/dist/db-errors-CGN9kJfo.mjs.map +0 -1
  342. package/dist/error-CPh_8eLq.mjs.map +0 -1
  343. package/dist/index-Bv1Wf1zB.d.mts.map +0 -1
  344. package/dist/loader-Chm5h7Gr.mjs.map +0 -1
  345. package/dist/menus-C75SSmRy.mjs.map +0 -1
  346. package/dist/query-BJn8TOPk.mjs.map +0 -1
  347. package/dist/resolve-Cj98DuqN.mjs +0 -39
  348. package/dist/resolve-Cj98DuqN.mjs.map +0 -1
  349. package/dist/runner-CNHRo1mT.d.mts.map +0 -1
  350. package/dist/seo-BoR4wCUh.mjs.map +0 -1
  351. package/dist/version-Ct7C6RSo.mjs +0 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "emdash",
3
- "version": "0.15.0",
3
+ "version": "0.16.0",
4
4
  "description": "Astro-native CMS with WordPress migration support",
5
5
  "type": "module",
6
6
  "main": "dist/index.mjs",
@@ -218,10 +218,10 @@
218
218
  "upng-js": "^2.1.0",
219
219
  "zod": "^4.4.1",
220
220
  "@atcute/client": "^4.2.1",
221
- "@emdash-cms/admin": "0.15.0",
222
- "@emdash-cms/auth": "0.15.0",
223
- "@emdash-cms/gutenberg-to-portable-text": "0.15.0",
224
- "@emdash-cms/registry-client": "0.2.0",
221
+ "@emdash-cms/auth": "0.16.0",
222
+ "@emdash-cms/admin": "0.16.0",
223
+ "@emdash-cms/gutenberg-to-portable-text": "0.16.0",
224
+ "@emdash-cms/registry-client": "0.3.0",
225
225
  "@emdash-cms/plugin-types": "0.0.1"
226
226
  },
227
227
  "optionalDependencies": {
@@ -248,14 +248,14 @@
248
248
  "@types/react": "19.2.14",
249
249
  "@types/sanitize-html": "^2.16.0",
250
250
  "@types/sax": "^1.2.7",
251
- "@vitest/ui": "^4.1.5",
251
+ "@vitest/ui": "^4.1.7",
252
252
  "publint": "0.3.17",
253
253
  "tsdown": "0.20.3",
254
254
  "typescript": "^6.0.3",
255
255
  "vite": "^6.0.0",
256
256
  "vitest": "^4.1.5",
257
257
  "zod-openapi": "^5.4.6",
258
- "@emdash-cms/blocks": "0.15.0"
258
+ "@emdash-cms/blocks": "0.16.0"
259
259
  },
260
260
  "repository": {
261
261
  "type": "git",
package/src/api/errors.ts CHANGED
@@ -201,6 +201,7 @@ export const ErrorCode = {
201
201
  AGGREGATOR_NOT_FOUND: "AGGREGATOR_NOT_FOUND",
202
202
  CAPABILITY_ESCALATION: "CAPABILITY_ESCALATION",
203
203
  ROUTE_VISIBILITY_ESCALATION: "ROUTE_VISIBILITY_ESCALATION",
204
+ ENV_INCOMPATIBLE: "ENV_INCOMPATIBLE",
204
205
  INSTALL_FAILED: "INSTALL_FAILED",
205
206
  UNINSTALL_FAILED: "UNINSTALL_FAILED",
206
207
  SEARCH_FAILED: "SEARCH_FAILED",
@@ -414,6 +415,7 @@ export function mapErrorStatus(code: string | undefined): number {
414
415
  case ErrorCode.ALREADY_INSTALLED:
415
416
  case ErrorCode.ALREADY_CONFIGURED:
416
417
  case ErrorCode.ALREADY_UP_TO_DATE:
418
+ case ErrorCode.ENV_INCOMPATIBLE:
417
419
  return 409;
418
420
 
419
421
  // 410 Gone
@@ -171,6 +171,8 @@ export {
171
171
 
172
172
  // Registry handlers (experimental)
173
173
  export {
174
+ assertEnvCompatible,
175
+ assertSafeArtifactUrl,
174
176
  handleRegistryInstall,
175
177
  handleRegistryUninstall,
176
178
  handleRegistryUpdate,
@@ -40,6 +40,8 @@
40
40
 
41
41
  import { ClientResponseError, ClientValidationError } from "@atcute/client";
42
42
  import type { Did } from "@atcute/lexicons";
43
+ import { checkEnvCompatibility, findSkippedEnvConstraints } from "@emdash-cms/registry-client/env";
44
+ import type { HostEnv } from "@emdash-cms/registry-client/env";
43
45
  import type { Kysely } from "kysely";
44
46
 
45
47
  import type { Database } from "../../database/types.js";
@@ -520,6 +522,52 @@ async function fetchArtifact(mirrors: string[], declaredUrl: string): Promise<Ui
520
522
  );
521
523
  }
522
524
 
525
+ /**
526
+ * The shape of a single env-compatibility failure returned to the admin in
527
+ * the `ENV_INCOMPATIBLE` error's `details`.
528
+ */
529
+ interface EnvIncompatibleError {
530
+ code: "ENV_INCOMPATIBLE";
531
+ message: string;
532
+ details: { requires: Record<string, string>; host: HostEnv };
533
+ }
534
+
535
+ /**
536
+ * Gate a release's `requires` constraints against the running host
537
+ * environment. `requires` is the lexicon-`unknown` value off the signed
538
+ * release record — never trust its shape; `checkEnvCompatibility` guards it.
539
+ *
540
+ * Returns `null` when every advertised constraint is satisfied (or there are
541
+ * none), or a structured `ENV_INCOMPATIBLE` error naming the unsatisfied
542
+ * constraints and the host versions. The error carries the guarded `requires`
543
+ * and `host` maps so the admin can render the same mismatch the UI gate shows.
544
+ */
545
+ export function assertEnvCompatible(
546
+ requires: unknown,
547
+ hostEnv: HostEnv,
548
+ ): EnvIncompatibleError | null {
549
+ // A constraint the host can't evaluate (unknown or unparseable host
550
+ // version) downgrades the gate to a no-op for that env. Log it so a
551
+ // silent bypass is observable rather than invisible.
552
+ for (const skipped of findSkippedEnvConstraints(requires, hostEnv)) {
553
+ console.warn(
554
+ `[registry] env compatibility constraint skipped: ${skipped.key} requires ${skipped.required} but host version is ${skipped.reason}`,
555
+ );
556
+ }
557
+ const mismatches = checkEnvCompatibility(requires, hostEnv);
558
+ if (mismatches.length === 0) return null;
559
+ const guarded: Record<string, string> = {};
560
+ for (const m of mismatches) guarded[m.key] = m.required;
561
+ const summary = mismatches
562
+ .map((m) => `${m.key} requires ${m.required} but host is ${m.host}`)
563
+ .join("; ");
564
+ return {
565
+ code: "ENV_INCOMPATIBLE",
566
+ message: `This release is not compatible with the current environment: ${summary}.`,
567
+ details: { requires: guarded, host: hostEnv },
568
+ };
569
+ }
570
+
523
571
  // ── Install ────────────────────────────────────────────────────────
524
572
 
525
573
  export async function handleRegistryInstall(
@@ -528,7 +576,7 @@ export async function handleRegistryInstall(
528
576
  sandboxRunner: SandboxRunner | null,
529
577
  registryConfigInput: RegistryConfigInput | undefined,
530
578
  input: RegistryInstallInput,
531
- opts?: { configuredPluginIds?: Set<string> },
579
+ opts?: { configuredPluginIds?: Set<string>; hostEnv?: HostEnv },
532
580
  ): Promise<ApiResult<RegistryInstallResult>> {
533
581
  // Accept either the bare-string shorthand or the full
534
582
  // `RegistryConfig` object (see `RegistryConfigInput`).
@@ -737,6 +785,17 @@ export async function handleRegistryInstall(
737
785
  };
738
786
  }
739
787
 
788
+ // Step 3b: environment compatibility. The signed release record may
789
+ // carry a `requires` block (`env:emdash`, `env:astro`, ...). Refuse
790
+ // the install if the running host doesn't satisfy a constraint, so a
791
+ // stale browser tab or non-UI caller can't bypass the admin's
792
+ // disabled Install button. `requires` is lexicon-`unknown`; the
793
+ // helper guards its shape.
794
+ if (opts?.hostEnv) {
795
+ const envError = assertEnvCompatible(releaseView.release?.requires, opts.hostEnv);
796
+ if (envError) return { success: false, error: envError };
797
+ }
798
+
740
799
  // Step 3a: enforce the configured minimum release age. The browser
741
800
  // applies the same check up front for UX, but the gate lives here
742
801
  // -- a stale browser tab, a deep link, or a non-admin-UI caller
@@ -1212,6 +1271,7 @@ export async function handleRegistryUpdate(
1212
1271
  version?: string;
1213
1272
  confirmCapabilityChanges?: boolean;
1214
1273
  confirmRouteVisibilityChanges?: boolean;
1274
+ hostEnv?: HostEnv;
1215
1275
  },
1216
1276
  ): Promise<ApiResult<RegistryUpdateResult>> {
1217
1277
  const registryConfig = coerceRegistryConfig(registryConfigInput);
@@ -1363,6 +1423,14 @@ export async function handleRegistryUpdate(
1363
1423
  };
1364
1424
  }
1365
1425
 
1426
+ // Environment compatibility gate. An ungated update could otherwise
1427
+ // land a version whose `requires` the host doesn't satisfy. Same
1428
+ // guard as install; `requires` is lexicon-`unknown`.
1429
+ if (opts?.hostEnv) {
1430
+ const envError = assertEnvCompatible(signedRelease.requires, opts.hostEnv);
1431
+ if (envError) return { success: false, error: envError };
1432
+ }
1433
+
1366
1434
  const declaredUrl = signedRelease.artifacts?.package?.url;
1367
1435
  const declaredChecksum = signedRelease.artifacts?.package?.checksum;
1368
1436
  if (!declaredUrl || !declaredChecksum) {
@@ -18,6 +18,17 @@ export interface SitemapContentEntry {
18
18
  slug: string | null;
19
19
  /** ISO date of last modification */
20
20
  updatedAt: string;
21
+ /**
22
+ * Locale of this row (e.g. `"en"`, `"fr"`). Always present — rows in
23
+ * pre-i18n databases are backfilled to the configured `defaultLocale`.
24
+ */
25
+ locale: string;
26
+ /**
27
+ * `translation_group` ULID shared across all locale variants of the
28
+ * same content. Used by the sitemap route to emit `hreflang`
29
+ * alternates between siblings.
30
+ */
31
+ translationGroup: string | null;
21
32
  }
22
33
 
23
34
  /** Per-collection sitemap data with entries and URL pattern */
@@ -93,8 +104,10 @@ export async function handleSitemapData(
93
104
  slug: string | null;
94
105
  id: string;
95
106
  updated_at: string;
107
+ locale: string;
108
+ translation_group: string | null;
96
109
  }>`
97
- SELECT c.slug, c.id, c.updated_at
110
+ SELECT c.slug, c.id, c.updated_at, c.locale, c.translation_group
98
111
  FROM ${sql.ref(tableName)} c
99
112
  LEFT JOIN _emdash_seo s
100
113
  ON s.collection = ${col.slug}
@@ -114,6 +127,8 @@ export async function handleSitemapData(
114
127
  id: row.id,
115
128
  slug: row.slug,
116
129
  updatedAt: row.updated_at,
130
+ locale: row.locale,
131
+ translationGroup: row.translation_group,
117
132
  });
118
133
  }
119
134
 
@@ -294,7 +294,7 @@ export async function generateSnapshot(
294
294
  await sql<Record<string, unknown>>`
295
295
  SELECT * FROM ${sql.raw(`"${tableName}"`)}
296
296
  WHERE deleted_at IS NULL
297
- AND (status = 'published' OR (status = 'scheduled' AND scheduled_at <= datetime('now')))
297
+ AND (status = 'published' OR (status = 'scheduled' AND scheduled_at <= strftime('%Y-%m-%dT%H:%M:%fZ', 'now')))
298
298
  `.execute(db)
299
299
  ).rows;
300
300
  }
@@ -10,6 +10,8 @@
10
10
  * to avoid bundling Node.js-only code into the production build.
11
11
  */
12
12
 
13
+ import { createRequire } from "node:module";
14
+
13
15
  import type { AstroIntegration, AstroIntegrationLogger } from "astro";
14
16
 
15
17
  import { validateAllowedOrigins, validateOriginShape } from "../../auth/allowed-origins.js";
@@ -34,6 +36,23 @@ export type {
34
36
  } from "./runtime.js";
35
37
  export { getStoredConfig } from "./runtime.js";
36
38
 
39
+ /**
40
+ * Resolve the version of Astro the host project is building with, by reading
41
+ * `astro/package.json` from the project's own dependency tree. Surfaced to the
42
+ * admin and the registry install gate so a plugin's `env:astro` constraint can
43
+ * be evaluated against the real host version. Returns `undefined` if Astro
44
+ * can't be resolved (shouldn't happen in a real build, but never throw here).
45
+ */
46
+ function resolveAstroVersion(): string | undefined {
47
+ try {
48
+ const require = createRequire(import.meta.url);
49
+ const pkg = require("astro/package.json") as { version?: unknown };
50
+ return typeof pkg.version === "string" ? pkg.version : undefined;
51
+ } catch {
52
+ return undefined;
53
+ }
54
+ }
55
+
37
56
  /** Default storage: Local filesystem in .emdash directory */
38
57
  const DEFAULT_STORAGE = local({
39
58
  directory: "./.emdash/uploads",
@@ -204,6 +223,13 @@ export function emdash(config: EmDashConfig = {}): AstroIntegration {
204
223
  command,
205
224
  }) => {
206
225
  printBanner(logger);
226
+ // Capture the host's Astro version so the runtime can expose it
227
+ // to the admin and the registry install gate for `env:astro`
228
+ // constraint checks.
229
+ const astroVersion = resolveAstroVersion();
230
+ if (astroVersion !== undefined) {
231
+ serializableConfig.astroVersion = astroVersion;
232
+ }
207
233
  // Extract i18n config from Astro config
208
234
  // Astro locales can be strings OR { path, codes } objects — normalize to paths
209
235
  if (astroConfig.i18n) {
@@ -382,6 +382,11 @@ export function injectCoreRoutes(injectRoute: InjectRoute): void {
382
382
  entrypoint: resolveRoute("api/admin/plugins/registry/install.ts"),
383
383
  });
384
384
 
385
+ injectRoute({
386
+ pattern: "/_emdash/api/admin/plugins/registry/artifact",
387
+ entrypoint: resolveRoute("api/admin/plugins/registry/artifact.ts"),
388
+ });
389
+
385
390
  injectRoute({
386
391
  pattern: "/_emdash/api/admin/plugins/[id]/update",
387
392
  entrypoint: resolveRoute("api/admin/plugins/[id]/update.ts"),
@@ -527,6 +527,14 @@ export interface EmDashConfig {
527
527
  /** URL or path to a custom favicon for the admin panel. */
528
528
  favicon?: string;
529
529
  };
530
+
531
+ /**
532
+ * Version of Astro the host project is building with. Populated by the
533
+ * integration's `astro:config:setup` hook (not authored by the user) and
534
+ * surfaced to the admin and the registry install gate so a plugin's
535
+ * `env:astro` requirement can be evaluated against the real host version.
536
+ */
537
+ astroVersion?: string;
530
538
  }
531
539
 
532
540
  const STORED_CONFIG_KEY = Symbol.for("emdash:stored-config");
@@ -51,6 +51,7 @@ import {
51
51
  runWithContext,
52
52
  } from "../request-context.js";
53
53
  import type { EmDashConfig } from "./integration/runtime.js";
54
+ import { createPublicPluginApiRouteHandler } from "./public-plugin-api-routes.js";
54
55
  import type { EmDashHandlers } from "./types.js";
55
56
 
56
57
  // Cached runtime instance (persists across requests within worker)
@@ -368,8 +369,10 @@ export const onRequest = defineMiddleware(async (context, next) => {
368
369
  try {
369
370
  const runtime = await getRuntime(config, initSubTimings);
370
371
  setupVerified = true;
372
+ const handlePublicPluginApiRoute = createPublicPluginApiRouteHandler(runtime);
371
373
  // eslint-disable-next-line typescript/no-unsafe-type-assertion -- partial object; getPageRuntime() only checks for the page-contribution methods
372
374
  locals.emdash = {
375
+ handlePublicPluginApiRoute,
373
376
  collectPageMetadata: runtime.collectPageMetadata.bind(runtime),
374
377
  collectPageFragments: runtime.collectPageFragments.bind(runtime),
375
378
  getPublicMediaUrl: createPublicMediaUrlResolver(runtime.storage),
@@ -496,6 +499,7 @@ export const onRequest = defineMiddleware(async (context, next) => {
496
499
 
497
500
  // Plugin routes
498
501
  handlePluginApiRoute: runtime.handlePluginApiRoute.bind(runtime),
502
+ handlePublicPluginApiRoute: createPublicPluginApiRouteHandler(runtime),
499
503
  getPluginRouteMeta: runtime.getPluginRouteMeta.bind(runtime),
500
504
 
501
505
  // Media provider methods
@@ -0,0 +1,41 @@
1
+ import type { HandlerResponse } from "./types.js";
2
+
3
+ export type PublicPluginApiRouteHandler = (
4
+ pluginId: string,
5
+ method: string,
6
+ path: string,
7
+ request: Request,
8
+ ) => Promise<HandlerResponse>;
9
+
10
+ interface PublicPluginApiRouteRuntime {
11
+ getPluginRouteMeta(pluginId: string, path: string): { public: boolean } | null;
12
+ handlePluginApiRoute(
13
+ pluginId: string,
14
+ method: string,
15
+ path: string,
16
+ request: Request,
17
+ ): Promise<HandlerResponse>;
18
+ }
19
+
20
+ function pluginRouteNotFound(): HandlerResponse {
21
+ return {
22
+ success: false,
23
+ error: {
24
+ code: "NOT_FOUND",
25
+ message: "Plugin route not found",
26
+ },
27
+ };
28
+ }
29
+
30
+ export function createPublicPluginApiRouteHandler(
31
+ runtime: PublicPluginApiRouteRuntime,
32
+ ): PublicPluginApiRouteHandler {
33
+ return async (pluginId, method, path, request) => {
34
+ const meta = runtime.getPluginRouteMeta(pluginId, path);
35
+ if (meta?.public !== true) {
36
+ return pluginRouteNotFound();
37
+ }
38
+
39
+ return runtime.handlePluginApiRoute(pluginId, method, path, request);
40
+ };
41
+ }
@@ -9,6 +9,7 @@
9
9
  * routes and `confirmRouteVisibilityChanges` is absent.
10
10
  */
11
11
 
12
+ import { hostEnvFromVersions } from "@emdash-cms/registry-client/env";
12
13
  import type { APIRoute } from "astro";
13
14
  import { z } from "zod";
14
15
 
@@ -17,6 +18,8 @@ import { apiError, handleError, unwrapResult } from "#api/error.js";
17
18
  import { handleRegistryUpdate } from "#api/index.js";
18
19
  import { isParseError, parseOptionalBody } from "#api/parse.js";
19
20
 
21
+ import { VERSION } from "../../../../../../../version.js";
22
+
20
23
  export const prerender = false;
21
24
 
22
25
  const updateBodySchema = z.object({
@@ -64,6 +67,7 @@ export const POST: APIRoute = async ({ params, request, locals }) => {
64
67
  version: body.version,
65
68
  confirmCapabilityChanges: body.confirmCapabilityChanges,
66
69
  confirmRouteVisibilityChanges: body.confirmRouteVisibilityChanges,
70
+ hostEnv: hostEnvFromVersions(VERSION, emdash.config.astroVersion),
67
71
  },
68
72
  );
69
73