emdash 0.31.1 → 0.33.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.
- package/dist/{adapters-C0ONzkUP.d.mts → adapters-BMyNSSZi.d.mts} +9 -1
- package/dist/adapters-BMyNSSZi.d.mts.map +1 -0
- package/dist/after-CBU2vkoO.mjs +96 -0
- package/dist/after-CBU2vkoO.mjs.map +1 -0
- package/dist/{allowed-origins-CCEi9bPI.mjs → allowed-origins-CG1pACtS.mjs} +2 -2
- package/dist/{allowed-origins-CCEi9bPI.mjs.map → allowed-origins-CG1pACtS.mjs.map} +1 -1
- package/dist/api/route-utils.d.mts +3 -4
- package/dist/api/route-utils.d.mts.map +1 -1
- package/dist/api/route-utils.mjs +23 -21
- package/dist/api/route-utils.mjs.map +1 -1
- package/dist/api/schemas/index.d.mts +2 -2
- package/dist/api/schemas/index.mjs +5 -5
- package/dist/{api-BkqFzIu4.mjs → api-D2hunekQ.mjs} +254 -48
- package/dist/api-D2hunekQ.mjs.map +1 -0
- package/dist/{api-tokens-uPt8UDpx.mjs → api-tokens-CSND0i1z.mjs} +2 -2
- package/dist/{api-tokens-uPt8UDpx.mjs.map → api-tokens-CSND0i1z.mjs.map} +1 -1
- package/dist/{apply-DuXsqll7.mjs → apply-kwNEJW2l.mjs} +36 -23
- package/dist/apply-kwNEJW2l.mjs.map +1 -0
- package/dist/astro/index.d.mts +12 -12
- package/dist/astro/index.mjs +17 -3
- package/dist/astro/index.mjs.map +1 -1
- package/dist/astro/middleware/auth.d.mts +10 -10
- package/dist/astro/middleware/auth.mjs +8 -8
- package/dist/astro/middleware/redirect.d.mts.map +1 -1
- package/dist/astro/middleware/redirect.mjs +8 -8
- package/dist/astro/middleware/redirect.mjs.map +1 -1
- package/dist/astro/middleware/request-context.mjs +4 -4
- package/dist/astro/middleware/setup.mjs +1 -1
- package/dist/astro/middleware.d.mts +10 -10
- package/dist/astro/middleware.d.mts.map +1 -1
- package/dist/astro/middleware.mjs +370 -171
- package/dist/astro/middleware.mjs.map +1 -1
- package/dist/astro/routes/api/admin/allowed-domains/_domain_.mjs +7 -7
- package/dist/astro/routes/api/admin/allowed-domains/index.mjs +7 -7
- package/dist/astro/routes/api/admin/api-tokens/_id_.mjs +4 -4
- package/dist/astro/routes/api/admin/api-tokens/index.mjs +5 -5
- package/dist/astro/routes/api/admin/byline-fields/_slug_/usage.mjs +5 -5
- package/dist/astro/routes/api/admin/byline-fields/_slug_.mjs +10 -10
- package/dist/astro/routes/api/admin/byline-fields/index.mjs +10 -10
- package/dist/astro/routes/api/admin/byline-fields/reorder.mjs +10 -10
- package/dist/astro/routes/api/admin/bylines/_id_/index.mjs +19 -18
- package/dist/astro/routes/api/admin/bylines/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs +19 -18
- package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs.map +1 -1
- package/dist/astro/routes/api/admin/bylines/index.mjs +19 -19
- package/dist/astro/routes/api/admin/comments/_id_/status.mjs +16 -16
- package/dist/astro/routes/api/admin/comments/_id_/status.mjs.map +1 -1
- package/dist/astro/routes/api/admin/comments/_id_.mjs +7 -7
- package/dist/astro/routes/api/admin/comments/bulk.mjs +12 -12
- package/dist/astro/routes/api/admin/comments/counts.mjs +7 -7
- package/dist/astro/routes/api/admin/comments/index.mjs +12 -12
- package/dist/astro/routes/api/admin/hooks/exclusive/_hookName_.mjs +5 -5
- package/dist/astro/routes/api/admin/hooks/exclusive/index.mjs +4 -4
- package/dist/astro/routes/api/admin/media-usage/repair.mjs +13 -11
- package/dist/astro/routes/api/admin/media-usage/repair.mjs.map +1 -1
- package/dist/astro/routes/api/admin/oauth-clients/_id_.mjs +4 -4
- package/dist/astro/routes/api/admin/oauth-clients/index.mjs +4 -4
- package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs +47 -44
- package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +47 -44
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +46 -43
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/mcp.mjs +5 -5
- package/dist/astro/routes/api/admin/plugins/_id_/settings.mjs +46 -43
- package/dist/astro/routes/api/admin/plugins/_id_/settings.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +46 -43
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs +46 -43
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/index.mjs +46 -43
- package/dist/astro/routes/api/admin/plugins/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/icon.mjs +3 -3
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs +46 -43
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs +46 -43
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +46 -43
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.mjs +46 -43
- package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/_id_/update.mjs +47 -44
- package/dist/astro/routes/api/admin/plugins/registry/_id_/update.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/artifact.mjs +46 -43
- package/dist/astro/routes/api/admin/plugins/registry/artifact.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/install.mjs +47 -44
- package/dist/astro/routes/api/admin/plugins/registry/install.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/updates.mjs +46 -43
- package/dist/astro/routes/api/admin/plugins/updates.mjs.map +1 -1
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +46 -43
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/thumbnail.mjs +3 -3
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs +46 -43
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/users/_id_/disable.mjs +3 -3
- package/dist/astro/routes/api/admin/users/_id_/enable.mjs +2 -2
- package/dist/astro/routes/api/admin/users/_id_/index.mjs +8 -8
- package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs +5 -5
- package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs.map +1 -1
- package/dist/astro/routes/api/admin/users/index.mjs +7 -7
- package/dist/astro/routes/api/auth/dev-bypass.mjs +7 -6
- package/dist/astro/routes/api/auth/dev-bypass.mjs.map +1 -1
- package/dist/astro/routes/api/auth/invite/accept.mjs +2 -2
- package/dist/astro/routes/api/auth/invite/complete.mjs +12 -12
- package/dist/astro/routes/api/auth/invite/index.mjs +10 -10
- package/dist/astro/routes/api/auth/invite/index.mjs.map +1 -1
- package/dist/astro/routes/api/auth/invite/register-options.mjs +11 -11
- package/dist/astro/routes/api/auth/logout.mjs +3 -3
- package/dist/astro/routes/api/auth/magic-link/send.mjs +12 -12
- package/dist/astro/routes/api/auth/magic-link/send.mjs.map +1 -1
- package/dist/astro/routes/api/auth/magic-link/verify.mjs +3 -3
- package/dist/astro/routes/api/auth/me.mjs +8 -8
- package/dist/astro/routes/api/auth/mode.mjs +3 -3
- package/dist/astro/routes/api/auth/oauth/_provider_/callback.mjs +4 -4
- package/dist/astro/routes/api/auth/oauth/_provider_.mjs +2 -2
- package/dist/astro/routes/api/auth/passkey/_id_.mjs +7 -7
- package/dist/astro/routes/api/auth/passkey/index.mjs +2 -2
- package/dist/astro/routes/api/auth/passkey/options.mjs +13 -13
- package/dist/astro/routes/api/auth/passkey/register/options.mjs +11 -11
- package/dist/astro/routes/api/auth/passkey/register/verify.mjs +12 -12
- package/dist/astro/routes/api/auth/passkey/verify.mjs +12 -12
- package/dist/astro/routes/api/auth/signup/complete.mjs +12 -12
- package/dist/astro/routes/api/auth/signup/request.mjs +12 -12
- package/dist/astro/routes/api/auth/signup/request.mjs.map +1 -1
- package/dist/astro/routes/api/auth/signup/verify.mjs +2 -2
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs +18 -18
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs.map +1 -1
- package/dist/astro/routes/api/comments/_collection_/_contentId_/reactions.mjs +15 -15
- package/dist/astro/routes/api/content/_collection_/_id_/compare.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs +4 -4
- package/dist/astro/routes/api/content/_collection_/_id_/duplicate.mjs +4 -4
- package/dist/astro/routes/api/content/_collection_/_id_/permanent.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs +14 -14
- package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs +9 -9
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/children.mjs +19 -17
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/children.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/parents.mjs +19 -17
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/parents.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/restore.mjs +4 -4
- package/dist/astro/routes/api/content/_collection_/_id_/revisions.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs +9 -9
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs +17 -16
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/translations.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs +4 -4
- package/dist/astro/routes/api/content/_collection_/_id_.d.mts.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_.mjs +10 -10
- package/dist/astro/routes/api/content/_collection_/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/authors.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/index.mjs +9 -9
- package/dist/astro/routes/api/content/_collection_/trash.mjs +8 -8
- package/dist/astro/routes/api/dashboard.mjs +9 -9
- package/dist/astro/routes/api/dev/emails.mjs +3 -3
- package/dist/astro/routes/api/import/probe.d.mts +3 -3
- package/dist/astro/routes/api/import/probe.mjs +19 -19
- package/dist/astro/routes/api/import/wordpress/analyze.mjs +4 -4
- package/dist/astro/routes/api/import/wordpress/execute.d.mts +11 -11
- package/dist/astro/routes/api/import/wordpress/execute.mjs +16 -15
- package/dist/astro/routes/api/import/wordpress/execute.mjs.map +1 -1
- package/dist/astro/routes/api/import/wordpress/media.d.mts +10 -10
- package/dist/astro/routes/api/import/wordpress/media.mjs +10 -10
- package/dist/astro/routes/api/import/wordpress/prepare.mjs +11 -11
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.d.mts +11 -11
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs +13 -11
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs.map +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.d.mts +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs +19 -19
- package/dist/astro/routes/api/import/wordpress-plugin/execute.d.mts +11 -11
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs +28 -27
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs.map +1 -1
- package/dist/astro/routes/api/manifest.mjs +5 -5
- package/dist/astro/routes/api/mcp.mjs +42 -42
- package/dist/astro/routes/api/media/_id_/confirm.d.mts.map +1 -1
- package/dist/astro/routes/api/media/_id_/confirm.mjs +106 -37
- package/dist/astro/routes/api/media/_id_/confirm.mjs.map +1 -1
- package/dist/astro/routes/api/media/_id_/upload.d.mts +8 -0
- package/dist/astro/routes/api/media/_id_/upload.d.mts.map +1 -0
- package/dist/astro/routes/api/media/_id_/upload.mjs +168 -0
- package/dist/astro/routes/api/media/_id_/upload.mjs.map +1 -0
- package/dist/astro/routes/api/media/_id_/usage.mjs +15 -13
- package/dist/astro/routes/api/media/_id_/usage.mjs.map +1 -1
- package/dist/astro/routes/api/media/_id_.d.mts.map +1 -1
- package/dist/astro/routes/api/media/_id_.mjs +22 -15
- package/dist/astro/routes/api/media/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/media/file/_...key_.mjs +2 -2
- package/dist/astro/routes/api/media/providers/_providerId_/_itemId_.mjs +3 -3
- package/dist/astro/routes/api/media/providers/_providerId_/index.mjs +3 -3
- package/dist/astro/routes/api/media/providers/index.mjs +3 -3
- package/dist/astro/routes/api/media/upload-url.d.mts.map +1 -1
- package/dist/astro/routes/api/media/upload-url.mjs +35 -24
- package/dist/astro/routes/api/media/upload-url.mjs.map +1 -1
- package/dist/astro/routes/api/media.mjs +14 -13
- package/dist/astro/routes/api/media.mjs.map +1 -1
- package/dist/astro/routes/api/menus/_name_/items/_id_.mjs +12 -11
- package/dist/astro/routes/api/menus/_name_/items/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/menus/_name_/items.mjs +12 -11
- package/dist/astro/routes/api/menus/_name_/items.mjs.map +1 -1
- package/dist/astro/routes/api/menus/_name_/reorder.mjs +12 -11
- package/dist/astro/routes/api/menus/_name_/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/menus/_name_/translations.mjs +12 -11
- package/dist/astro/routes/api/menus/_name_/translations.mjs.map +1 -1
- package/dist/astro/routes/api/menus/_name_.mjs +12 -11
- package/dist/astro/routes/api/menus/_name_.mjs.map +1 -1
- package/dist/astro/routes/api/menus/index.mjs +12 -11
- package/dist/astro/routes/api/menus/index.mjs.map +1 -1
- package/dist/astro/routes/api/oauth/authorize.mjs +6 -6
- package/dist/astro/routes/api/oauth/device/authorize.mjs +6 -6
- package/dist/astro/routes/api/oauth/device/code.mjs +9 -9
- package/dist/astro/routes/api/oauth/device/token.mjs +8 -8
- package/dist/astro/routes/api/oauth/register.mjs +3 -3
- package/dist/astro/routes/api/oauth/token/refresh.mjs +6 -6
- package/dist/astro/routes/api/oauth/token/revoke.mjs +6 -6
- package/dist/astro/routes/api/oauth/token.mjs +6 -6
- package/dist/astro/routes/api/openapi.json.mjs +62 -9
- package/dist/astro/routes/api/openapi.json.mjs.map +1 -1
- package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs +5 -5
- package/dist/astro/routes/api/redirects/404s/index.mjs +12 -12
- package/dist/astro/routes/api/redirects/404s/summary.mjs +12 -12
- package/dist/astro/routes/api/redirects/_id_.mjs +14 -13
- package/dist/astro/routes/api/redirects/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/redirects/index.mjs +14 -13
- package/dist/astro/routes/api/redirects/index.mjs.map +1 -1
- package/dist/astro/routes/api/relations/_id_/index.mjs +19 -17
- package/dist/astro/routes/api/relations/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/relations/_id_/translations.mjs +14 -12
- package/dist/astro/routes/api/relations/_id_/translations.mjs.map +1 -1
- package/dist/astro/routes/api/relations/index.mjs +19 -17
- package/dist/astro/routes/api/relations/index.mjs.map +1 -1
- package/dist/astro/routes/api/revisions/_revisionId_/index.mjs +3 -3
- package/dist/astro/routes/api/revisions/_revisionId_/restore.mjs +4 -4
- package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs +46 -43
- package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs +46 -43
- package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs +46 -43
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +46 -43
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/index.mjs +46 -43
- package/dist/astro/routes/api/schema/collections/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/reorder.d.mts +8 -0
- package/dist/astro/routes/api/schema/collections/reorder.d.mts.map +1 -0
- package/dist/astro/routes/api/schema/collections/reorder.mjs +66 -0
- package/dist/astro/routes/api/schema/collections/reorder.mjs.map +1 -0
- package/dist/astro/routes/api/schema/index.mjs +12 -8
- package/dist/astro/routes/api/schema/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs +46 -43
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs.map +1 -1
- package/dist/astro/routes/api/schema/orphans/index.mjs +46 -43
- package/dist/astro/routes/api/schema/orphans/index.mjs.map +1 -1
- package/dist/astro/routes/api/search/enable.d.mts +1 -0
- package/dist/astro/routes/api/search/enable.d.mts.map +1 -1
- package/dist/astro/routes/api/search/enable.mjs +18 -13
- package/dist/astro/routes/api/search/enable.mjs.map +1 -1
- package/dist/astro/routes/api/search/index.mjs +12 -11
- package/dist/astro/routes/api/search/index.mjs.map +1 -1
- package/dist/astro/routes/api/search/rebuild.mjs +14 -13
- package/dist/astro/routes/api/search/rebuild.mjs.map +1 -1
- package/dist/astro/routes/api/search/stats.mjs +8 -7
- package/dist/astro/routes/api/search/stats.mjs.map +1 -1
- package/dist/astro/routes/api/search/suggest.mjs +12 -11
- package/dist/astro/routes/api/search/suggest.mjs.map +1 -1
- package/dist/astro/routes/api/sections/_slug_.mjs +11 -11
- package/dist/astro/routes/api/sections/index.mjs +11 -11
- package/dist/astro/routes/api/settings/backups/archives/_name_.mjs +7 -7
- package/dist/astro/routes/api/settings/backups/archives/index.mjs +6 -6
- package/dist/astro/routes/api/settings/backups/export.mjs +7 -7
- package/dist/astro/routes/api/settings/backups/index.mjs +8 -8
- package/dist/astro/routes/api/settings/email.mjs +5 -5
- package/dist/astro/routes/api/settings.mjs +16 -16
- package/dist/astro/routes/api/setup/admin-verify.mjs +13 -13
- package/dist/astro/routes/api/setup/admin.mjs +12 -12
- package/dist/astro/routes/api/setup/dev-bypass.mjs +31 -29
- package/dist/astro/routes/api/setup/dev-bypass.mjs.map +1 -1
- package/dist/astro/routes/api/setup/dev-reset.mjs +3 -3
- package/dist/astro/routes/api/setup/index.mjs +33 -31
- package/dist/astro/routes/api/setup/index.mjs.map +1 -1
- package/dist/astro/routes/api/setup/status.mjs +4 -4
- package/dist/astro/routes/api/snapshot.mjs +9 -9
- package/dist/astro/routes/api/taxonomies/_name_/reorder.d.mts +8 -0
- package/dist/astro/routes/api/taxonomies/_name_/reorder.d.mts.map +1 -0
- package/dist/astro/routes/api/taxonomies/_name_/reorder.mjs +43 -0
- package/dist/astro/routes/api/taxonomies/_name_/reorder.mjs.map +1 -0
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs +17 -16
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs +17 -16
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.d.mts.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs +22 -18
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/index.mjs +17 -16
- package/dist/astro/routes/api/taxonomies/index.mjs.map +1 -1
- package/dist/astro/routes/api/themes/preview.mjs +7 -7
- package/dist/astro/routes/api/typegen.mjs +5 -5
- package/dist/astro/routes/api/well-known/auth.mjs +2 -2
- package/dist/astro/routes/api/well-known/oauth-authorization-server.mjs +2 -2
- package/dist/astro/routes/api/well-known/oauth-protected-resource.mjs +2 -2
- package/dist/astro/routes/api/widget-areas/_name_/reorder.mjs +8 -8
- package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs +11 -11
- package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs +11 -11
- package/dist/astro/routes/api/widget-areas/_name_.mjs +6 -6
- package/dist/astro/routes/api/widget-areas/index.mjs +11 -11
- package/dist/astro/routes/api/widget-components.mjs +3 -3
- package/dist/astro/routes/robots.txt.mjs +9 -9
- package/dist/astro/routes/sitemap-_collection_.xml.mjs +13 -13
- package/dist/astro/routes/sitemap.xml.mjs +10 -10
- package/dist/astro/types.d.mts +20 -13
- package/dist/astro/types.d.mts.map +1 -1
- package/dist/auth/providers/github.d.mts +1 -1
- package/dist/auth/providers/google.d.mts +1 -1
- package/dist/{authorize-6WPZa1xZ.mjs → authorize-qRhWQnel.mjs} +2 -2
- package/dist/{authorize-6WPZa1xZ.mjs.map → authorize-qRhWQnel.mjs.map} +1 -1
- package/dist/{backup-DoW-H0r4.mjs → backup-CtA6LDNw.mjs} +5 -5
- package/dist/{backup-DoW-H0r4.mjs.map → backup-CtA6LDNw.mjs.map} +1 -1
- package/dist/{byline-BTOxUlFF.mjs → byline-Cp6csL84.mjs} +9 -9
- package/dist/{byline-BTOxUlFF.mjs.map → byline-Cp6csL84.mjs.map} +1 -1
- package/dist/{byline-fields-CdU_LTF1.mjs → byline-fields-CNc0Yq5i.mjs} +2 -2
- package/dist/{byline-fields-CdU_LTF1.mjs.map → byline-fields-CNc0Yq5i.mjs.map} +1 -1
- package/dist/{byline-registry-BCuOp4UF.mjs → byline-registry-ZkPKqEwC.mjs} +4 -4
- package/dist/{byline-registry-BCuOp4UF.mjs.map → byline-registry-ZkPKqEwC.mjs.map} +1 -1
- package/dist/{bylines-Bc-3xtpz.mjs → bylines-CEj5CdT4.mjs} +7 -7
- package/dist/{bylines-Bc-3xtpz.mjs.map → bylines-CEj5CdT4.mjs.map} +1 -1
- package/dist/{bylines-oVN0iPwX.mjs → bylines-cf-C9lmF.mjs} +5 -5
- package/dist/{bylines-oVN0iPwX.mjs.map → bylines-cf-C9lmF.mjs.map} +1 -1
- package/dist/cache-C9FptTFR.mjs +108 -0
- package/dist/cache-C9FptTFR.mjs.map +1 -0
- package/dist/{challenge-store-BFzgFRog.mjs → challenge-store-D9VNKELo.mjs} +1 -1
- package/dist/{challenge-store-BFzgFRog.mjs.map → challenge-store-D9VNKELo.mjs.map} +1 -1
- package/dist/{chunks-Bq-5DPrD.mjs → chunks-DbYzib_k.mjs} +2 -2
- package/dist/{chunks-Bq-5DPrD.mjs.map → chunks-DbYzib_k.mjs.map} +1 -1
- package/dist/cli/index.mjs +41 -32
- package/dist/cli/index.mjs.map +1 -1
- package/dist/client/cf-access.d.mts +1 -1
- package/dist/client/index.d.mts +1 -1
- package/dist/client/index.mjs +2 -2
- package/dist/{comment-B9cUud8H.mjs → comment-BIkJ6Fil.mjs} +3 -3
- package/dist/{comment-B9cUud8H.mjs.map → comment-BIkJ6Fil.mjs.map} +1 -1
- package/dist/{comment-reaction-VUXO981F.mjs → comment-reaction-D-laEceb.mjs} +2 -2
- package/dist/{comment-reaction-VUXO981F.mjs.map → comment-reaction-D-laEceb.mjs.map} +1 -1
- package/dist/{comments-PXj1E9Si.mjs → comments-0_w6KChA.mjs} +3 -3
- package/dist/{comments-PXj1E9Si.mjs.map → comments-0_w6KChA.mjs.map} +1 -1
- package/dist/{components-DZkL4Fx0.mjs → components-BPxrRjpE.mjs} +1 -1
- package/dist/{components-DZkL4Fx0.mjs.map → components-BPxrRjpE.mjs.map} +1 -1
- package/dist/{config-B6b_BobR.mjs → config-DyF3OKg_.mjs} +15 -10
- package/dist/config-DyF3OKg_.mjs.map +1 -0
- package/dist/{content-BC43pICM.mjs → content-CJ94NEx5.mjs} +170 -117
- package/dist/content-CJ94NEx5.mjs.map +1 -0
- package/dist/{content-refresh-CPMSauD3.mjs → content-refresh-Xw7aKmou.mjs} +7 -7
- package/dist/{content-refresh-CPMSauD3.mjs.map → content-refresh-Xw7aKmou.mjs.map} +1 -1
- package/dist/{context-DOurRIrb.mjs → context-C_1nrqnW.mjs} +14 -14
- package/dist/{context-DOurRIrb.mjs.map → context-C_1nrqnW.mjs.map} +1 -1
- package/dist/{cron-BlKIMD_e.mjs → cron-DRV-UC4K.mjs} +1 -1
- package/dist/{cron-BlKIMD_e.mjs.map → cron-DRV-UC4K.mjs.map} +1 -1
- package/dist/{dashboard-CBm4zhc3.mjs → dashboard-DINnNVVU.mjs} +5 -5
- package/dist/{dashboard-CBm4zhc3.mjs.map → dashboard-DINnNVVU.mjs.map} +1 -1
- package/dist/db/index.d.mts +3 -3
- package/dist/db/index.mjs +3 -2
- package/dist/db/index.mjs.map +1 -1
- package/dist/db/libsql.d.mts +1 -1
- package/dist/db/postgres.d.mts +1 -1
- package/dist/db/sqlite.d.mts +1 -1
- package/dist/{default-C4v9KP56.mjs → default-BD2FG0xV.mjs} +1 -1
- package/dist/{default-C4v9KP56.mjs.map → default-BD2FG0xV.mjs.map} +1 -1
- package/dist/deferred-tasks-C-WRCcKo.d.mts +9 -0
- package/dist/deferred-tasks-C-WRCcKo.d.mts.map +1 -0
- package/dist/{device-flow-BeA6lUS1.mjs → device-flow-CTqd8mud.mjs} +5 -5
- package/dist/{device-flow-BeA6lUS1.mjs.map → device-flow-CTqd8mud.mjs.map} +1 -1
- package/dist/{dialect-helpers-BtOwo2us.mjs → dialect-helpers-BSbfaO3F.mjs} +43 -16
- package/dist/dialect-helpers-BSbfaO3F.mjs.map +1 -0
- package/dist/{email-console-C-9Ng8DM.mjs → email-console-C6WdcWbL.mjs} +1 -1
- package/dist/{email-console-C-9Ng8DM.mjs.map → email-console-C6WdcWbL.mjs.map} +1 -1
- package/dist/{error-DJ98TRbQ.mjs → error-oh_9i6bR.mjs} +3 -3
- package/dist/{error-DJ98TRbQ.mjs.map → error-oh_9i6bR.mjs.map} +1 -1
- package/dist/{errors-DtEXIQQV.mjs → errors-BucQ8VYz.mjs} +2 -1
- package/dist/errors-BucQ8VYz.mjs.map +1 -0
- package/dist/{escape-CFedIB1C.mjs → escape-CXps5F_v.mjs} +1 -1
- package/dist/{escape-CFedIB1C.mjs.map → escape-CXps5F_v.mjs.map} +1 -1
- package/dist/{field-defs-cache-KfNJ_qLQ.mjs → field-defs-cache-WD82dMQq.mjs} +4 -4
- package/dist/{field-defs-cache-KfNJ_qLQ.mjs.map → field-defs-cache-WD82dMQq.mjs.map} +1 -1
- package/dist/{fts-manager-hyCU9OOp.mjs → fts-manager-BITakW_R.mjs} +37 -13
- package/dist/fts-manager-BITakW_R.mjs.map +1 -0
- package/dist/{hash-DFFrkivP.mjs → hash-Cg0TXJPV.mjs} +8 -4
- package/dist/hash-Cg0TXJPV.mjs.map +1 -0
- package/dist/{hreflang-CIxH_LKz.d.mts → hreflang-BaLCNcDx.d.mts} +2 -2
- package/dist/{hreflang-CIxH_LKz.d.mts.map → hreflang-BaLCNcDx.d.mts.map} +1 -1
- package/dist/{hreflang-CbYeCzl9.mjs → hreflang-BdZuVBhL.mjs} +7 -7
- package/dist/{hreflang-CbYeCzl9.mjs.map → hreflang-BdZuVBhL.mjs.map} +1 -1
- package/dist/{import-oDYCgNYQ.mjs → import-C-9uqyT3.mjs} +6 -6
- package/dist/{import-oDYCgNYQ.mjs.map → import-C-9uqyT3.mjs.map} +1 -1
- package/dist/{index-BZJ_5FOX.d.mts → index-M37iz29I.d.mts} +112 -37
- package/dist/index-M37iz29I.d.mts.map +1 -0
- package/dist/{index-BEui-cRd.d.mts → index-MGw47uWq.d.mts} +3 -3
- package/dist/{index-BEui-cRd.d.mts.map → index-MGw47uWq.d.mts.map} +1 -1
- package/dist/index.d.mts +19 -19
- package/dist/index.mjs +69 -67
- package/dist/{load-Dg5gtWma.mjs → load-DV1DZuUJ.mjs} +2 -2
- package/dist/{load-Dg5gtWma.mjs.map → load-DV1DZuUJ.mjs.map} +1 -1
- package/dist/{loader-D4rigvjR.mjs → loader-CGugY7Zl.mjs} +29 -15
- package/dist/loader-CGugY7Zl.mjs.map +1 -0
- package/dist/{manifest-schema-bCq54i7F.mjs → manifest-schema-Da7kj23y.mjs} +1 -1
- package/dist/{manifest-schema-bCq54i7F.mjs.map → manifest-schema-Da7kj23y.mjs.map} +1 -1
- package/dist/media/index.d.mts +1 -1
- package/dist/media/local-runtime.d.mts +12 -12
- package/dist/media/local-runtime.mjs +8 -8
- package/dist/{media-its1WLYv.mjs → media-BP7S-nHT.mjs} +60 -15
- package/dist/media-BP7S-nHT.mjs.map +1 -0
- package/dist/{media-BJ6SRY3g.mjs → media-OhYL-7Io.mjs} +8 -4
- package/dist/{media-BJ6SRY3g.mjs.map → media-OhYL-7Io.mjs.map} +1 -1
- package/dist/{media-allowlist-jUppPWFy.mjs → media-allowlist-D-peH1H5.mjs} +1 -1
- package/dist/{media-allowlist-jUppPWFy.mjs.map → media-allowlist-D-peH1H5.mjs.map} +1 -1
- package/dist/{media-upload-DNu3QySc.mjs → media-upload-DtrwU2B0.mjs} +7 -7
- package/dist/{media-upload-DNu3QySc.mjs.map → media-upload-DtrwU2B0.mjs.map} +1 -1
- package/dist/{media-url-BCm5vBn6.mjs → media-url-DYs_YLOx.mjs} +1 -1
- package/dist/{media-url-BCm5vBn6.mjs.map → media-url-DYs_YLOx.mjs.map} +1 -1
- package/dist/{media-usage-DPQ3K4xB.mjs → media-usage-BlxfTkN0.mjs} +8 -8
- package/dist/{media-usage-DPQ3K4xB.mjs.map → media-usage-BlxfTkN0.mjs.map} +1 -1
- package/dist/{menus-BMGzWyWH.mjs → menus-BcQWxeXu.mjs} +5 -5
- package/dist/{menus-BMGzWyWH.mjs.map → menus-BcQWxeXu.mjs.map} +1 -1
- package/dist/{menus-CPf_SW7u.mjs → menus-Y54RDPIN.mjs} +215 -38
- package/dist/menus-Y54RDPIN.mjs.map +1 -0
- package/dist/{mode-fiXRMfeA.mjs → mode-BWyTBe3I.mjs} +1 -1
- package/dist/{mode-fiXRMfeA.mjs.map → mode-BWyTBe3I.mjs.map} +1 -1
- package/dist/{oauth-authorization-oqfbBuMH.mjs → oauth-authorization-ClvktmrL.mjs} +5 -5
- package/dist/{oauth-authorization-oqfbBuMH.mjs.map → oauth-authorization-ClvktmrL.mjs.map} +1 -1
- package/dist/{oauth-clients-BlrUHAsf.mjs → oauth-clients-8ao-U66l.mjs} +1 -1
- package/dist/{oauth-clients-BlrUHAsf.mjs.map → oauth-clients-8ao-U66l.mjs.map} +1 -1
- package/dist/{oauth-state-store-DnvjRMy6.mjs → oauth-state-store-B1ofdTiQ.mjs} +1 -1
- package/dist/{oauth-state-store-DnvjRMy6.mjs.map → oauth-state-store-B1ofdTiQ.mjs.map} +1 -1
- package/dist/{oauth-user-lookup-oUllxvAv.mjs → oauth-user-lookup-CscEuIiR.mjs} +1 -1
- package/dist/{oauth-user-lookup-oUllxvAv.mjs.map → oauth-user-lookup-CscEuIiR.mjs.map} +1 -1
- package/dist/object-cache/memory.d.mts +1 -1
- package/dist/{object-cache-Bok5j2ae.mjs → object-cache-71tPfV4A.mjs} +106 -5
- package/dist/object-cache-71tPfV4A.mjs.map +1 -0
- package/dist/{options-BqMkWfYa.d.mts → options-CA4eVX6P.d.mts} +3 -3
- package/dist/{options-BqMkWfYa.d.mts.map → options-CA4eVX6P.d.mts.map} +1 -1
- package/dist/{options-BlmBHTvX.mjs → options-CBXIHUoT.mjs} +1 -1
- package/dist/{options-BlmBHTvX.mjs.map → options-CBXIHUoT.mjs.map} +1 -1
- package/dist/page/index.d.mts +2 -2
- package/dist/{parse-53zyxlpv.mjs → parse-CJKNuewM.mjs} +2 -2
- package/dist/{parse-53zyxlpv.mjs.map → parse-CJKNuewM.mjs.map} +1 -1
- package/dist/{passkey-config-C-SKpc0-.mjs → passkey-config-D-zrzMJI.mjs} +1 -1
- package/dist/{passkey-config-C-SKpc0-.mjs.map → passkey-config-D-zrzMJI.mjs.map} +1 -1
- package/dist/{placeholder-Dop47JMM.d.mts → placeholder-DaeNS-VG.d.mts} +1 -1
- package/dist/{placeholder-Dop47JMM.d.mts.map → placeholder-DaeNS-VG.d.mts.map} +1 -1
- package/dist/plugin-types.d.mts +1 -1
- package/dist/plugin-utils.d.mts +10 -10
- package/dist/plugins/adapt-sandbox-entry.d.mts +10 -10
- package/dist/plugins/adapt-sandbox-entry.mjs +2 -2
- package/dist/{portable-text-sDj92Kxv.mjs → portable-text-B_kqBmXB.mjs} +1 -1
- package/dist/{portable-text-sDj92Kxv.mjs.map → portable-text-B_kqBmXB.mjs.map} +1 -1
- package/dist/{preview-D4Jnbfx7.mjs → preview-BU6PaLpM.mjs} +2 -2
- package/dist/{preview-D4Jnbfx7.mjs.map → preview-BU6PaLpM.mjs.map} +1 -1
- package/dist/{public-url-DSGTnJFw.mjs → public-url-Ox9oOlgp.mjs} +14 -3
- package/dist/public-url-Ox9oOlgp.mjs.map +1 -0
- package/dist/{query-Bz9bWZfm.mjs → query-C5w7PsRQ.mjs} +43 -44
- package/dist/query-C5w7PsRQ.mjs.map +1 -0
- package/dist/{query-DdFGHzQF.mjs → query-rC9HKv1N.mjs} +4 -4
- package/dist/{query-DdFGHzQF.mjs.map → query-rC9HKv1N.mjs.map} +1 -1
- package/dist/{rate-limit-D3IEiUi2.mjs → rate-limit-kug6q99V.mjs} +2 -2
- package/dist/{rate-limit-D3IEiUi2.mjs.map → rate-limit-kug6q99V.mjs.map} +1 -1
- package/dist/{redirect-BoUac4NT.mjs → redirect-DIJxXKOG.mjs} +3 -3
- package/dist/{redirect-BoUac4NT.mjs.map → redirect-DIJxXKOG.mjs.map} +1 -1
- package/dist/{redirect-Botom7X6.mjs → redirect-Egf2R9yP.mjs} +1 -1
- package/dist/{redirect-Botom7X6.mjs.map → redirect-Egf2R9yP.mjs.map} +1 -1
- package/dist/{redirects-ChbpqKiS.mjs → redirects-Bzm812bY.mjs} +5 -5
- package/dist/{redirects-ChbpqKiS.mjs.map → redirects-Bzm812bY.mjs.map} +1 -1
- package/dist/{redirects-D457qwt0.mjs → redirects-G8wAhWAf.mjs} +25 -7
- package/dist/redirects-G8wAhWAf.mjs.map +1 -0
- package/dist/{registry-y21kjhfG.mjs → registry-Dbodb4Uo.mjs} +59 -14
- package/dist/registry-Dbodb4Uo.mjs.map +1 -0
- package/dist/{relation-Du0r04E0.mjs → relation-Cbe3Sd3m.mjs} +3 -3
- package/dist/{relation-Du0r04E0.mjs.map → relation-Cbe3Sd3m.mjs.map} +1 -1
- package/dist/{relations-CZMpBqEd.mjs → relations-Bw_E1TXo.mjs} +3 -3
- package/dist/{relations-CZMpBqEd.mjs.map → relations-Bw_E1TXo.mjs.map} +1 -1
- package/dist/{relations-qKmSj9KM.d.mts → relations-G2ta7GIl.d.mts} +50 -12
- package/dist/relations-G2ta7GIl.d.mts.map +1 -0
- package/dist/{relations-DtX1UMBH.mjs → relations-qHwpUe66.mjs} +6 -6
- package/dist/{relations-DtX1UMBH.mjs.map → relations-qHwpUe66.mjs.map} +1 -1
- package/dist/request-context.d.mts +3 -0
- package/dist/request-context.d.mts.map +1 -1
- package/dist/request-context.mjs.map +1 -1
- package/dist/{request-meta-DzXYYI-n.mjs → request-meta-Df-jFbAd.mjs} +2 -2
- package/dist/{request-meta-DzXYYI-n.mjs.map → request-meta-Df-jFbAd.mjs.map} +1 -1
- package/dist/{resolve-DFr4kq72.mjs → resolve-DZzG4HqM.mjs} +2 -2
- package/dist/{resolve-DFr4kq72.mjs.map → resolve-DZzG4HqM.mjs.map} +1 -1
- package/dist/{runner-BdeLEgad.mjs → runner-BFTrkYhu.mjs} +497 -213
- package/dist/runner-BFTrkYhu.mjs.map +1 -0
- package/dist/{runner-Dd8m8k9F.d.mts → runner-BaADli8l.d.mts} +2 -2
- package/dist/{runner-Dd8m8k9F.d.mts.map → runner-BaADli8l.d.mts.map} +1 -1
- package/dist/runtime.d.mts +11 -11
- package/dist/runtime.mjs +3 -3
- package/dist/{schema-BH8P8vaC.mjs → schema-CiQXr6_F.mjs} +3 -3
- package/dist/{schema-BH8P8vaC.mjs.map → schema-CiQXr6_F.mjs.map} +1 -1
- package/dist/{scopes-DTIkIaGA.mjs → scopes-CNJVT5i5.mjs} +3 -3
- package/dist/{scopes-DTIkIaGA.mjs.map → scopes-CNJVT5i5.mjs.map} +1 -1
- package/dist/{search-D-Yhpmvs.mjs → search-FZhx5dDU.mjs} +7 -7
- package/dist/{search-D-Yhpmvs.mjs.map → search-FZhx5dDU.mjs.map} +1 -1
- package/dist/{secrets-CQ-69kF9.mjs → secrets-DLd8RXee.mjs} +4 -4
- package/dist/{secrets-CQ-69kF9.mjs.map → secrets-DLd8RXee.mjs.map} +1 -1
- package/dist/{sections-CzVBAKjw.mjs → sections-BrIrMUCn.mjs} +3 -3
- package/dist/{sections-CzVBAKjw.mjs.map → sections-BrIrMUCn.mjs.map} +1 -1
- package/dist/seed/index.d.mts +2 -2
- package/dist/seed/index.mjs +25 -23
- package/dist/seo/index.d.mts +3 -3
- package/dist/seo/index.mjs +18 -16
- package/dist/seo/index.mjs.map +1 -1
- package/dist/{seo-C3GDfT0V.mjs → seo-CobNfOvb.mjs} +2 -2
- package/dist/{seo-C3GDfT0V.mjs.map → seo-CobNfOvb.mjs.map} +1 -1
- package/dist/{seo-kJzVAmmu.mjs → seo-DTHRntNC.mjs} +3 -3
- package/dist/{seo-kJzVAmmu.mjs.map → seo-DTHRntNC.mjs.map} +1 -1
- package/dist/{service-CQnc276a.mjs → service-B-pYGPgR.mjs} +4 -4
- package/dist/{service-CQnc276a.mjs.map → service-B-pYGPgR.mjs.map} +1 -1
- package/dist/{session-user-DbHqKDKe.mjs → session-user-BvM9-zNl.mjs} +2 -2
- package/dist/{session-user-DbHqKDKe.mjs.map → session-user-BvM9-zNl.mjs.map} +1 -1
- package/dist/{settings-Dtc0DU31.mjs → settings-DPHau-WH.mjs} +3 -3
- package/dist/{settings-Dtc0DU31.mjs.map → settings-DPHau-WH.mjs.map} +1 -1
- package/dist/{settings-C2PaBS49.mjs → settings-kJhGiQ4z.mjs} +7 -7
- package/dist/{settings-C2PaBS49.mjs.map → settings-kJhGiQ4z.mjs.map} +1 -1
- package/dist/{setup-complete-CdIlqloh.mjs → setup-complete-u50Qm8rY.mjs} +2 -2
- package/dist/{setup-complete-CdIlqloh.mjs.map → setup-complete-u50Qm8rY.mjs.map} +1 -1
- package/dist/{setup-nonce-DqiIPr-J.mjs → setup-nonce-DCjiiOD2.mjs} +1 -1
- package/dist/{setup-nonce-DqiIPr-J.mjs.map → setup-nonce-DCjiiOD2.mjs.map} +1 -1
- package/dist/{single-flight-cache-C2exrGAi.mjs → single-flight-cache-DW3w11Pu.mjs} +1 -1
- package/dist/{single-flight-cache-C2exrGAi.mjs.map → single-flight-cache-DW3w11Pu.mjs.map} +1 -1
- package/dist/site-url-I-lJ5kma.mjs +16 -0
- package/dist/site-url-I-lJ5kma.mjs.map +1 -0
- package/dist/{snapshot-BdpUJKD-.mjs → snapshot-I_fjLDaD.mjs} +2 -2
- package/dist/{snapshot-BdpUJKD-.mjs.map → snapshot-I_fjLDaD.mjs.map} +1 -1
- package/dist/{ssrf-CviKqWmq.mjs → ssrf-CTa6v21i.mjs} +1 -1
- package/dist/{ssrf-CviKqWmq.mjs.map → ssrf-CTa6v21i.mjs.map} +1 -1
- package/dist/{state-xxv6ZTMv.mjs → state-CQvoefYP.mjs} +1 -1
- package/dist/{state-xxv6ZTMv.mjs.map → state-CQvoefYP.mjs.map} +1 -1
- package/dist/{status-COfycGIU.mjs → status-CIsmlC1E.mjs} +1 -1
- package/dist/{status-COfycGIU.mjs.map → status-CIsmlC1E.mjs.map} +1 -1
- package/dist/storage/local.d.mts +1 -1
- package/dist/storage/local.mjs +1 -1
- package/dist/storage/s3.d.mts +1 -1
- package/dist/storage/s3.mjs +2 -2
- package/dist/storage/s3.mjs.map +1 -1
- package/dist/{taxonomies-BN6M9Nrv.mjs → taxonomies-CKuaZER5.mjs} +90 -9
- package/dist/taxonomies-CKuaZER5.mjs.map +1 -0
- package/dist/{taxonomies-r7pqLBCn.mjs → taxonomies-CLN1N92E.mjs} +57 -32
- package/dist/taxonomies-CLN1N92E.mjs.map +1 -0
- package/dist/{taxonomy-0mCI25HN.mjs → taxonomy-pOrB2kZe.mjs} +142 -15
- package/dist/taxonomy-pOrB2kZe.mjs.map +1 -0
- package/dist/{tokens-DVltpO2D.mjs → tokens-DagaJGK8.mjs} +1 -1
- package/dist/{tokens-DVltpO2D.mjs.map → tokens-DagaJGK8.mjs.map} +1 -1
- package/dist/{transaction-D0FOsb3X.mjs → transaction-NQj4VJ7Z.mjs} +1 -1
- package/dist/{transaction-D0FOsb3X.mjs.map → transaction-NQj4VJ7Z.mjs.map} +1 -1
- package/dist/{transport-Vd7VdqHv.d.mts → transport-CAwTaTp_.d.mts} +1 -1
- package/dist/{transport-Vd7VdqHv.d.mts.map → transport-CAwTaTp_.d.mts.map} +1 -1
- package/dist/{transport-CKrlqSpD.mjs → transport-DVsa5YYo.mjs} +1 -1
- package/dist/{transport-CKrlqSpD.mjs.map → transport-DVsa5YYo.mjs.map} +1 -1
- package/dist/{trusted-proxy-CwjQj0YG.mjs → trusted-proxy-D20_7fyX.mjs} +1 -1
- package/dist/{trusted-proxy-CwjQj0YG.mjs.map → trusted-proxy-D20_7fyX.mjs.map} +1 -1
- package/dist/{types-BfYUPJdP.d.mts → types-BGWPMiBO.d.mts} +2 -2
- package/dist/{types-BfYUPJdP.d.mts.map → types-BGWPMiBO.d.mts.map} +1 -1
- package/dist/{types-iVeZ5g6N.d.mts → types-BK6U01Ro.d.mts} +1 -1
- package/dist/{types-iVeZ5g6N.d.mts.map → types-BK6U01Ro.d.mts.map} +1 -1
- package/dist/{types-BD40g7zz.mjs → types-BjxTKxrZ.mjs} +1 -1
- package/dist/{types-BD40g7zz.mjs.map → types-BjxTKxrZ.mjs.map} +1 -1
- package/dist/{types-Kmaxdarz.d.mts → types-BnFP1M3J.d.mts} +22 -1
- package/dist/types-BnFP1M3J.d.mts.map +1 -0
- package/dist/{types-C7U0HlEr.d.mts → types-C8oz_ayJ.d.mts} +1 -1
- package/dist/{types-C7U0HlEr.d.mts.map → types-C8oz_ayJ.d.mts.map} +1 -1
- package/dist/{types-B4vm81VH.d.mts → types-CbUcuxxc.d.mts} +1 -1
- package/dist/{types-B4vm81VH.d.mts.map → types-CbUcuxxc.d.mts.map} +1 -1
- package/dist/{types-CrRUFdej.mjs → types-Cd8iuS1J.mjs} +10 -3
- package/dist/{types-CrRUFdej.mjs.map → types-Cd8iuS1J.mjs.map} +1 -1
- package/dist/types-CtzytVXn.mjs +18 -0
- package/dist/types-CtzytVXn.mjs.map +1 -0
- package/dist/{types-BvB7gDOD.d.mts → types-Cz8hNch2.d.mts} +5 -5
- package/dist/{types-BvB7gDOD.d.mts.map → types-Cz8hNch2.d.mts.map} +1 -1
- package/dist/{types-B97jg3aW.d.mts → types-DLG4IFEQ.d.mts} +1 -1
- package/dist/{types-B97jg3aW.d.mts.map → types-DLG4IFEQ.d.mts.map} +1 -1
- package/dist/{types-DPKhI5ib.d.mts → types-Dc4ntQjQ.d.mts} +18 -1
- package/dist/types-Dc4ntQjQ.d.mts.map +1 -0
- package/dist/{types-BNfPHfay.d.mts → types-LoagAGzH.d.mts} +1 -1
- package/dist/{types-BNfPHfay.d.mts.map → types-LoagAGzH.d.mts.map} +1 -1
- package/dist/{types-o7xo7VgH.mjs → types-NBI3rF-_.mjs} +3 -2
- package/dist/types-NBI3rF-_.mjs.map +1 -0
- package/dist/upload-attempts-D8QAFLUJ.mjs +27 -0
- package/dist/upload-attempts-D8QAFLUJ.mjs.map +1 -0
- package/dist/{user-aTXqmXBz.mjs → user-DBrq4UVq.mjs} +3 -3
- package/dist/{user-aTXqmXBz.mjs.map → user-DBrq4UVq.mjs.map} +1 -1
- package/dist/{utils-BbUgmeZG.mjs → utils-hLzi_2Fn.mjs} +2 -2
- package/dist/{utils-BbUgmeZG.mjs.map → utils-hLzi_2Fn.mjs.map} +1 -1
- package/dist/{validate-VPnKoIzW.mjs → validate-BpwoDOgt.mjs} +25 -2
- package/dist/validate-BpwoDOgt.mjs.map +1 -0
- package/dist/{validate-DULfgpJP.d.mts → validate-C3oSmA7F.d.mts} +15 -5
- package/dist/validate-C3oSmA7F.d.mts.map +1 -0
- package/dist/{validate-CDT1jl6_.mjs → validate-mKo3RxBM.mjs} +4 -4
- package/dist/{validate-CDT1jl6_.mjs.map → validate-mKo3RxBM.mjs.map} +1 -1
- package/dist/{validation-DlD0E35W.mjs → validation-BgpucsvF.mjs} +11 -9
- package/dist/{validation-DlD0E35W.mjs.map → validation-BgpucsvF.mjs.map} +1 -1
- package/dist/version-C4PnpmoV.mjs +7 -0
- package/dist/{version-BRMngh9I.mjs.map → version-C4PnpmoV.mjs.map} +1 -1
- package/dist/{widgets-5fipNkMT.mjs → widgets-CJJtkiKh.mjs} +3 -3
- package/dist/{widgets-5fipNkMT.mjs.map → widgets-CJJtkiKh.mjs.map} +1 -1
- package/dist/{wxr-taxonomies-DrihupaC.mjs → wxr-taxonomies-9PPSy8X6.mjs} +4 -4
- package/dist/{wxr-taxonomies-DrihupaC.mjs.map → wxr-taxonomies-9PPSy8X6.mjs.map} +1 -1
- package/dist/{wxr-taxonomies-B4tMuN5T.d.mts → wxr-taxonomies-Bkpp_2tK.d.mts} +1 -1
- package/dist/{wxr-taxonomies-B4tMuN5T.d.mts.map → wxr-taxonomies-Bkpp_2tK.d.mts.map} +1 -1
- package/dist/{zod-generator-CwkHWz4f.mjs → zod-generator-CG64Hnbh.mjs} +3 -3
- package/dist/{zod-generator-CwkHWz4f.mjs.map → zod-generator-CG64Hnbh.mjs.map} +1 -1
- package/package.json +12 -8
- package/src/after.ts +6 -1
- package/src/api/errors.ts +1 -0
- package/src/api/handlers/content.ts +45 -4
- package/src/api/handlers/marketplace.ts +14 -0
- package/src/api/handlers/media.ts +4 -4
- package/src/api/handlers/registry.ts +14 -0
- package/src/api/handlers/revision.ts +19 -5
- package/src/api/handlers/schema.ts +37 -0
- package/src/api/handlers/snapshot.ts +1 -1
- package/src/api/handlers/taxonomies.ts +111 -10
- package/src/api/openapi/document.ts +84 -3
- package/src/api/public-url.ts +14 -2
- package/src/api/schemas/media.ts +9 -2
- package/src/api/schemas/schema.ts +13 -0
- package/src/api/schemas/search.ts +2 -0
- package/src/api/schemas/taxonomies.ts +34 -1
- package/src/api/site-url.ts +16 -6
- package/src/astro/integration/routes.ts +19 -0
- package/src/astro/integration/runtime.ts +13 -0
- package/src/astro/integration/virtual-modules.ts +2 -0
- package/src/astro/middleware/redirect.ts +2 -10
- package/src/astro/middleware/scoped-db.ts +35 -4
- package/src/astro/middleware.ts +56 -22
- package/src/astro/routes/api/admin/comments/[id]/status.ts +1 -1
- package/src/astro/routes/api/admin/users/[id]/send-recovery.ts +2 -2
- package/src/astro/routes/api/auth/invite/index.ts +2 -2
- package/src/astro/routes/api/auth/magic-link/send.ts +2 -2
- package/src/astro/routes/api/auth/signup/request.ts +2 -2
- package/src/astro/routes/api/comments/[collection]/[contentId]/index.ts +1 -1
- package/src/astro/routes/api/content/[collection]/[id].ts +3 -1
- package/src/astro/routes/api/media/[id]/confirm.ts +148 -59
- package/src/astro/routes/api/media/[id]/upload.ts +262 -0
- package/src/astro/routes/api/media/[id].ts +19 -10
- package/src/astro/routes/api/media/upload-url.ts +28 -31
- package/src/astro/routes/api/schema/collections/reorder.ts +31 -0
- package/src/astro/routes/api/schema/index.ts +2 -0
- package/src/astro/routes/api/search/enable.ts +5 -1
- package/src/astro/routes/api/search/rebuild.ts +6 -1
- package/src/astro/routes/api/taxonomies/[name]/reorder.ts +41 -0
- package/src/astro/routes/api/taxonomies/[name]/terms/index.ts +6 -3
- package/src/astro/types.ts +7 -0
- package/src/cleanup.ts +54 -26
- package/src/cli/commands/dev.ts +13 -3
- package/src/cli/commands/export-seed.ts +2 -0
- package/src/cli/index.ts +1 -1
- package/src/components/CommentForm.astro +1 -1
- package/src/components/Comments.astro +1 -1
- package/src/components/InlinePortableTextEditor.tsx +175 -31
- package/src/components/OrderedList.astro +14 -0
- package/src/components/PortableText.astro +26 -4
- package/src/components/code-mark.ts +11 -0
- package/src/components/index.ts +12 -1
- package/src/components/ordered-list.ts +549 -0
- package/src/content/converters/numbered-list.ts +148 -0
- package/src/content/converters/portable-text-to-prosemirror.ts +59 -9
- package/src/content/converters/prosemirror-to-portable-text.ts +23 -12
- package/src/content/converters/types.ts +2 -0
- package/src/content/portable-text-lists.ts +205 -0
- package/src/database/dialect-helpers.ts +41 -22
- package/src/database/migrations/054_media_upload_attempts.ts +41 -0
- package/src/database/migrations/055_content_translation_group_locale_index.ts +67 -0
- package/src/database/migrations/056_taxonomy_term_sort_order.ts +189 -0
- package/src/database/migrations/057_collection_hidden.ts +24 -0
- package/src/database/migrations/058_collection_sort_order.ts +20 -0
- package/src/database/migrations/059_revision_prune_queue.ts +36 -0
- package/src/database/migrations/runner.ts +12 -0
- package/src/database/repositories/content.ts +193 -183
- package/src/database/repositories/media.ts +158 -28
- package/src/database/repositories/revision.ts +82 -17
- package/src/database/repositories/taxonomy.ts +202 -7
- package/src/database/repositories/types.ts +7 -0
- package/src/database/types.ts +23 -1
- package/src/database/validate.ts +39 -0
- package/src/db/adapters.ts +8 -0
- package/src/deferred-tasks.ts +71 -0
- package/src/emdash-runtime.ts +277 -88
- package/src/i18n/config.ts +17 -10
- package/src/index.ts +3 -0
- package/src/loader.ts +46 -24
- package/src/media/upload-attempts.ts +33 -0
- package/src/media/usage/gc.ts +50 -0
- package/src/object-cache/index.ts +160 -3
- package/src/plugins/routes.ts +34 -0
- package/src/plugins/storage-indexes.ts +50 -11
- package/src/query.ts +50 -44
- package/src/redirects/cache.ts +79 -19
- package/src/request-context.ts +3 -0
- package/src/scheduled-publish.ts +6 -1
- package/src/schema/registry.ts +95 -3
- package/src/schema/types.ts +24 -0
- package/src/search/fts-manager.ts +50 -10
- package/src/search/index.ts +2 -0
- package/src/search/types.ts +6 -0
- package/src/seed/apply.ts +22 -2
- package/src/seed/types.ts +10 -0
- package/src/storage/s3.ts +1 -1
- package/src/taxonomies/index.ts +11 -7
- package/src/taxonomies/term-counts.ts +56 -28
- package/src/ui-comments.ts +19 -0
- package/src/ui.ts +11 -3
- package/src/utils/hash.ts +14 -3
- package/src/virtual-modules.d.ts +8 -0
- package/dist/adapters-C0ONzkUP.d.mts.map +0 -1
- package/dist/after-B1IIdH3Y.mjs +0 -29
- package/dist/after-B1IIdH3Y.mjs.map +0 -1
- package/dist/api-BkqFzIu4.mjs.map +0 -1
- package/dist/apply-DuXsqll7.mjs.map +0 -1
- package/dist/cache-DDwy3JDW.mjs +0 -65
- package/dist/cache-DDwy3JDW.mjs.map +0 -1
- package/dist/config-B6b_BobR.mjs.map +0 -1
- package/dist/content-BC43pICM.mjs.map +0 -1
- package/dist/dialect-helpers-BtOwo2us.mjs.map +0 -1
- package/dist/errors-DtEXIQQV.mjs.map +0 -1
- package/dist/fts-manager-hyCU9OOp.mjs.map +0 -1
- package/dist/hash-DFFrkivP.mjs.map +0 -1
- package/dist/index-BZJ_5FOX.d.mts.map +0 -1
- package/dist/loader-D4rigvjR.mjs.map +0 -1
- package/dist/media-its1WLYv.mjs.map +0 -1
- package/dist/menus-CPf_SW7u.mjs.map +0 -1
- package/dist/object-cache-Bok5j2ae.mjs.map +0 -1
- package/dist/public-url-DSGTnJFw.mjs.map +0 -1
- package/dist/query-Bz9bWZfm.mjs.map +0 -1
- package/dist/redirects-D457qwt0.mjs.map +0 -1
- package/dist/registry-y21kjhfG.mjs.map +0 -1
- package/dist/relations-qKmSj9KM.d.mts.map +0 -1
- package/dist/runner-BdeLEgad.mjs.map +0 -1
- package/dist/site-url-NGJT6NTU.mjs +0 -13
- package/dist/site-url-NGJT6NTU.mjs.map +0 -1
- package/dist/taxonomies-BN6M9Nrv.mjs.map +0 -1
- package/dist/taxonomies-r7pqLBCn.mjs.map +0 -1
- package/dist/taxonomy-0mCI25HN.mjs.map +0 -1
- package/dist/types-DPKhI5ib.d.mts.map +0 -1
- package/dist/types-Kmaxdarz.d.mts.map +0 -1
- package/dist/types-o7xo7VgH.mjs.map +0 -1
- package/dist/validate-DULfgpJP.d.mts.map +0 -1
- package/dist/validate-VPnKoIzW.mjs.map +0 -1
- package/dist/version-BRMngh9I.mjs +0 -7
- /package/dist/{api-tokens-Cvmixds7.mjs → api-tokens-Dai9dND0.mjs} +0 -0
- /package/dist/{ssrf-BB__xfNM.mjs → ssrf-Cj568Dgs.mjs} +0 -0
- /package/dist/{types-CK0LxPUQ.mjs → types-DKuWPYV5.mjs} +0 -0
|
@@ -15,6 +15,7 @@ import { RevisionRepository } from "../../database/repositories/revision.js";
|
|
|
15
15
|
import { SeoRepository } from "../../database/repositories/seo.js";
|
|
16
16
|
import { TaxonomyRepository } from "../../database/repositories/taxonomy.js";
|
|
17
17
|
import {
|
|
18
|
+
ContentMutationConflictError,
|
|
18
19
|
EmDashValidationError,
|
|
19
20
|
ScheduledNotDueError,
|
|
20
21
|
InvalidCursorError,
|
|
@@ -376,6 +377,15 @@ async function createSlugChangeRedirect(
|
|
|
376
377
|
newSlug: string,
|
|
377
378
|
contentId: string,
|
|
378
379
|
): Promise<void> {
|
|
380
|
+
// A URL pattern has no locale token, so every locale variant of an entry
|
|
381
|
+
// generates the same URL, and slugs are unique per (slug, locale) — a
|
|
382
|
+
// translation may still hold the old slug. Redirecting away from a URL
|
|
383
|
+
// another row still answers on would take that page down: the redirect
|
|
384
|
+
// middleware runs `order: "pre"`, so routing never gets a chance.
|
|
385
|
+
// Any surviving row counts, published or not: a draft that publishes later
|
|
386
|
+
// would otherwise be shadowed by the redirect.
|
|
387
|
+
if (await slugStillTaken(db, collection, oldSlug, contentId)) return;
|
|
388
|
+
|
|
379
389
|
const collectionRow = await db
|
|
380
390
|
.selectFrom("_emdash_collections")
|
|
381
391
|
.select("url_pattern")
|
|
@@ -393,6 +403,24 @@ async function createSlugChangeRedirect(
|
|
|
393
403
|
invalidateRedirectCache();
|
|
394
404
|
}
|
|
395
405
|
|
|
406
|
+
/** Whether a row other than `contentId` still holds `slug` in this collection. */
|
|
407
|
+
async function slugStillTaken(
|
|
408
|
+
db: Kysely<Database>,
|
|
409
|
+
collection: string,
|
|
410
|
+
slug: string,
|
|
411
|
+
contentId: string,
|
|
412
|
+
): Promise<boolean> {
|
|
413
|
+
validateIdentifier(collection, "collection slug");
|
|
414
|
+
const result = await sql<{ id: string }>`
|
|
415
|
+
SELECT id FROM ${sql.ref(`ec_${collection}`)}
|
|
416
|
+
WHERE slug = ${slug}
|
|
417
|
+
AND id != ${contentId}
|
|
418
|
+
AND deleted_at IS NULL
|
|
419
|
+
LIMIT 1
|
|
420
|
+
`.execute(db);
|
|
421
|
+
return result.rows.length > 0;
|
|
422
|
+
}
|
|
423
|
+
|
|
396
424
|
/** Matches a date-only `YYYY-MM-DD` bound (no time component). */
|
|
397
425
|
const DATE_ONLY_RE = /^\d{4}-\d{2}-\d{2}$/;
|
|
398
426
|
|
|
@@ -1450,15 +1478,18 @@ export async function handleContentUnschedule(
|
|
|
1450
1478
|
/**
|
|
1451
1479
|
* Publish content immediately.
|
|
1452
1480
|
*
|
|
1453
|
-
*
|
|
1454
|
-
*
|
|
1455
|
-
* be atomic to prevent FTS shadow table corruption on crash.
|
|
1481
|
+
* Publication is one atomic content-row statement. On databases that support
|
|
1482
|
+
* transactions, the existing slug-redirect side write remains grouped with it.
|
|
1456
1483
|
*/
|
|
1457
1484
|
export async function handleContentPublish(
|
|
1458
1485
|
db: Kysely<Database>,
|
|
1459
1486
|
collection: string,
|
|
1460
1487
|
id: string,
|
|
1461
|
-
options: {
|
|
1488
|
+
options: {
|
|
1489
|
+
publishedAt?: string;
|
|
1490
|
+
requireScheduledDue?: boolean;
|
|
1491
|
+
expectedScheduledAt?: string;
|
|
1492
|
+
} = {},
|
|
1462
1493
|
): Promise<ApiResult<ContentResponse>> {
|
|
1463
1494
|
try {
|
|
1464
1495
|
const item = await withTransaction(db, async (trx) => {
|
|
@@ -1477,6 +1508,7 @@ export async function handleContentPublish(
|
|
|
1477
1508
|
resolvedId,
|
|
1478
1509
|
options.publishedAt,
|
|
1479
1510
|
options.requireScheduledDue,
|
|
1511
|
+
options.expectedScheduledAt,
|
|
1480
1512
|
);
|
|
1481
1513
|
|
|
1482
1514
|
// Leave a 301 behind when publishing changed the slug of an entry that
|
|
@@ -1502,6 +1534,15 @@ export async function handleContentPublish(
|
|
|
1502
1534
|
data: { item },
|
|
1503
1535
|
};
|
|
1504
1536
|
} catch (error) {
|
|
1537
|
+
if (error instanceof ContentMutationConflictError) {
|
|
1538
|
+
return {
|
|
1539
|
+
success: false,
|
|
1540
|
+
error: {
|
|
1541
|
+
code: "CONFLICT",
|
|
1542
|
+
message: error.message,
|
|
1543
|
+
},
|
|
1544
|
+
};
|
|
1545
|
+
}
|
|
1505
1546
|
// The scheduled sweep gates publish on the row still being due; a row
|
|
1506
1547
|
// unscheduled in the meantime is a silent skip, not a failure.
|
|
1507
1548
|
if (error instanceof ScheduledNotDueError) {
|
|
@@ -24,6 +24,10 @@ import {
|
|
|
24
24
|
} from "../../plugins/marketplace.js";
|
|
25
25
|
import type { SandboxRunner } from "../../plugins/sandbox/types.js";
|
|
26
26
|
import { PluginStateRepository } from "../../plugins/state.js";
|
|
27
|
+
import {
|
|
28
|
+
removeAllPluginIndexes,
|
|
29
|
+
syncDeclaredStorageIndexes,
|
|
30
|
+
} from "../../plugins/storage-indexes.js";
|
|
27
31
|
import { normalizeCapabilities } from "../../plugins/types.js";
|
|
28
32
|
import type { PluginManifest } from "../../plugins/types.js";
|
|
29
33
|
import { EmDashStorageError } from "../../storage/types.js";
|
|
@@ -475,6 +479,8 @@ export async function handleMarketplaceInstall(
|
|
|
475
479
|
description: pluginDetail.description ?? undefined,
|
|
476
480
|
});
|
|
477
481
|
|
|
482
|
+
await syncDeclaredStorageIndexes(db, [bundle.manifest]);
|
|
483
|
+
|
|
478
484
|
// Fire-and-forget install stat
|
|
479
485
|
client.reportInstall(pluginId, version).catch(() => {
|
|
480
486
|
// Intentional: never fails the install
|
|
@@ -713,6 +719,8 @@ export async function handleMarketplaceUpdate(
|
|
|
713
719
|
mcpToolsConsent: null,
|
|
714
720
|
});
|
|
715
721
|
|
|
722
|
+
await syncDeclaredStorageIndexes(db, [bundle.manifest]);
|
|
723
|
+
|
|
716
724
|
// Clean up old bundle from R2 (best-effort)
|
|
717
725
|
deleteBundleFromR2(storage, pluginId, oldVersion).catch(() => {});
|
|
718
726
|
|
|
@@ -786,6 +794,12 @@ export async function handleMarketplaceUninstall(
|
|
|
786
794
|
}
|
|
787
795
|
}
|
|
788
796
|
|
|
797
|
+
try {
|
|
798
|
+
await removeAllPluginIndexes(db, pluginId);
|
|
799
|
+
} catch {
|
|
800
|
+
// Nothing to drop, or tracking table predates the feature
|
|
801
|
+
}
|
|
802
|
+
|
|
789
803
|
// Delete state row
|
|
790
804
|
await stateRepo.delete(pluginId);
|
|
791
805
|
|
|
@@ -185,12 +185,12 @@ export async function handleMediaUpdate(
|
|
|
185
185
|
export async function handleMediaDelete(
|
|
186
186
|
db: Kysely<Database>,
|
|
187
187
|
id: string,
|
|
188
|
-
): Promise<ApiResult<{ deleted: true }>> {
|
|
188
|
+
): Promise<ApiResult<{ deleted: true; storageKey: string }>> {
|
|
189
189
|
try {
|
|
190
190
|
const repo = new MediaRepository(db);
|
|
191
|
-
const
|
|
191
|
+
const storageKey = await repo.deleteWithStorageKey(id);
|
|
192
192
|
|
|
193
|
-
if (!
|
|
193
|
+
if (!storageKey) {
|
|
194
194
|
return {
|
|
195
195
|
success: false,
|
|
196
196
|
error: {
|
|
@@ -202,7 +202,7 @@ export async function handleMediaDelete(
|
|
|
202
202
|
|
|
203
203
|
return {
|
|
204
204
|
success: true,
|
|
205
|
-
data: { deleted: true },
|
|
205
|
+
data: { deleted: true, storageKey },
|
|
206
206
|
};
|
|
207
207
|
} catch {
|
|
208
208
|
return {
|
|
@@ -49,6 +49,10 @@ import { extractBundle } from "../../plugins/marketplace.js";
|
|
|
49
49
|
import type { PluginBundle } from "../../plugins/marketplace.js";
|
|
50
50
|
import type { SandboxRunner } from "../../plugins/sandbox/types.js";
|
|
51
51
|
import { PluginStateRepository } from "../../plugins/state.js";
|
|
52
|
+
import {
|
|
53
|
+
removeAllPluginIndexes,
|
|
54
|
+
syncDeclaredStorageIndexes,
|
|
55
|
+
} from "../../plugins/storage-indexes.js";
|
|
52
56
|
import { declaredAccessToCapabilities } from "../../plugins/types.js";
|
|
53
57
|
import type { DeclaredAccess } from "../../plugins/types.js";
|
|
54
58
|
import {
|
|
@@ -1181,6 +1185,8 @@ export async function handleRegistryInstall(
|
|
|
1181
1185
|
throw stateErr;
|
|
1182
1186
|
}
|
|
1183
1187
|
|
|
1188
|
+
await syncDeclaredStorageIndexes(db, [bundle.manifest]);
|
|
1189
|
+
|
|
1184
1190
|
return {
|
|
1185
1191
|
success: true,
|
|
1186
1192
|
data: {
|
|
@@ -1288,6 +1294,12 @@ export async function handleRegistryUninstall(
|
|
|
1288
1294
|
await deleteBundleFromR2(storage, pluginId, version, "registry");
|
|
1289
1295
|
}
|
|
1290
1296
|
|
|
1297
|
+
try {
|
|
1298
|
+
await removeAllPluginIndexes(db, pluginId);
|
|
1299
|
+
} catch {
|
|
1300
|
+
// Nothing to drop, or tracking table predates the feature
|
|
1301
|
+
}
|
|
1302
|
+
|
|
1291
1303
|
await stateRepo.delete(pluginId);
|
|
1292
1304
|
|
|
1293
1305
|
return { success: true, data: { pluginId, dataDeleted } };
|
|
@@ -1646,6 +1658,8 @@ export async function handleRegistryUpdate(
|
|
|
1646
1658
|
mcpToolsConsent: null,
|
|
1647
1659
|
});
|
|
1648
1660
|
|
|
1661
|
+
await syncDeclaredStorageIndexes(db, [bundle.manifest]);
|
|
1662
|
+
|
|
1649
1663
|
// Best-effort cleanup of the old bundle. Failures here don't roll
|
|
1650
1664
|
// back the upgrade (the new bundle is already stored and committed
|
|
1651
1665
|
// in the state row); the orphan is just storage we'll pay for.
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import type { Kysely } from "kysely";
|
|
6
6
|
|
|
7
|
+
import { after } from "../../after.js";
|
|
7
8
|
import { ContentRepository } from "../../database/repositories/content.js";
|
|
8
9
|
import { RevisionRepository, type Revision } from "../../database/repositories/revision.js";
|
|
9
10
|
import { withTransaction } from "../../database/transaction.js";
|
|
@@ -115,7 +116,7 @@ export async function handleRevisionRestore(
|
|
|
115
116
|
// Atomically update content and create a new revision to record the restore.
|
|
116
117
|
// If either operation fails, neither is committed (on engines that support
|
|
117
118
|
// transactions; on D1, withTransaction falls back to sequential execution).
|
|
118
|
-
const item = await withTransaction(db, async (trx) => {
|
|
119
|
+
const { item, queuedRevisionId } = await withTransaction(db, async (trx) => {
|
|
119
120
|
const trxContentRepo = new ContentRepository(trx);
|
|
120
121
|
const trxRevisionRepo = new RevisionRepository(trx);
|
|
121
122
|
|
|
@@ -124,19 +125,32 @@ export async function handleRevisionRestore(
|
|
|
124
125
|
slug: typeof _slug === "string" ? _slug : undefined,
|
|
125
126
|
});
|
|
126
127
|
|
|
127
|
-
await trxRevisionRepo.create({
|
|
128
|
+
const queuedRevision = await trxRevisionRepo.create({
|
|
128
129
|
collection: revision.collection,
|
|
129
130
|
entryId: revision.entryId,
|
|
130
131
|
data: revision.data,
|
|
131
132
|
authorId: callerUserId,
|
|
132
133
|
});
|
|
133
134
|
|
|
134
|
-
return updated;
|
|
135
|
+
return { item: updated, queuedRevisionId: queuedRevision.id };
|
|
135
136
|
});
|
|
136
137
|
|
|
137
|
-
// Fire-and-forget: prune old revisions to prevent unbounded growth
|
|
138
138
|
const pruneRepo = new RevisionRepository(db);
|
|
139
|
-
|
|
139
|
+
after(async () => {
|
|
140
|
+
try {
|
|
141
|
+
await pruneRepo.pruneQueuedEntry(
|
|
142
|
+
revision.collection,
|
|
143
|
+
revision.entryId,
|
|
144
|
+
queuedRevisionId,
|
|
145
|
+
50,
|
|
146
|
+
);
|
|
147
|
+
} catch (error) {
|
|
148
|
+
console.error(
|
|
149
|
+
`[revisions] Failed to prune revisions for ${revision.collection}/${revision.entryId}:`,
|
|
150
|
+
error,
|
|
151
|
+
);
|
|
152
|
+
}
|
|
153
|
+
});
|
|
140
154
|
|
|
141
155
|
return {
|
|
142
156
|
success: true,
|
|
@@ -423,6 +423,43 @@ export async function handleSchemaFieldDelete(
|
|
|
423
423
|
}
|
|
424
424
|
}
|
|
425
425
|
|
|
426
|
+
/**
|
|
427
|
+
* Reorder collections in the admin sidebar
|
|
428
|
+
*/
|
|
429
|
+
export async function handleSchemaCollectionReorder(
|
|
430
|
+
db: Kysely<Database>,
|
|
431
|
+
slugs: string[],
|
|
432
|
+
): Promise<ApiResult<{ success: boolean }>> {
|
|
433
|
+
try {
|
|
434
|
+
const registry = new SchemaRegistry(db);
|
|
435
|
+
await registry.reorderCollections(slugs);
|
|
436
|
+
|
|
437
|
+
return {
|
|
438
|
+
success: true,
|
|
439
|
+
data: { success: true },
|
|
440
|
+
};
|
|
441
|
+
} catch (error) {
|
|
442
|
+
if (error instanceof SchemaError) {
|
|
443
|
+
return {
|
|
444
|
+
success: false,
|
|
445
|
+
error: {
|
|
446
|
+
code: error.code,
|
|
447
|
+
message: error.message,
|
|
448
|
+
details: error.details,
|
|
449
|
+
},
|
|
450
|
+
};
|
|
451
|
+
}
|
|
452
|
+
console.error("[emdash] Failed to reorder collections:", error);
|
|
453
|
+
return {
|
|
454
|
+
success: false,
|
|
455
|
+
error: {
|
|
456
|
+
code: "SCHEMA_COLLECTION_REORDER_ERROR",
|
|
457
|
+
message: "Failed to reorder collections",
|
|
458
|
+
},
|
|
459
|
+
};
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
|
|
426
463
|
/**
|
|
427
464
|
* Reorder fields
|
|
428
465
|
*/
|
|
@@ -312,7 +312,7 @@ export async function generateSnapshot(
|
|
|
312
312
|
await sql<Record<string, unknown>>`
|
|
313
313
|
SELECT * FROM ${sql.raw(`"${tableName}"`)}
|
|
314
314
|
WHERE deleted_at IS NULL
|
|
315
|
-
AND
|
|
315
|
+
AND status = 'published'
|
|
316
316
|
`.execute(db)
|
|
317
317
|
).rows;
|
|
318
318
|
}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
import type { Kysely, Selectable } from "kysely";
|
|
11
11
|
import { ulid } from "ulidx";
|
|
12
12
|
|
|
13
|
-
import { TaxonomyRepository } from "../../database/repositories/taxonomy.js";
|
|
13
|
+
import { TaxonomyRepository, type SiblingPosition } from "../../database/repositories/taxonomy.js";
|
|
14
14
|
import type { Database, TaxonomyDefTable } from "../../database/types.js";
|
|
15
15
|
import { resolveConfiguredLocale } from "../../i18n/config.js";
|
|
16
16
|
import { invalidateTaxonomyDefsCache, invalidateTermCache } from "../../taxonomies/index.js";
|
|
@@ -50,7 +50,8 @@ export interface TermData {
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
export interface TermWithCount extends TermData {
|
|
53
|
-
|
|
53
|
+
/** Absent when the caller opted out of counts (`includeCounts: false`). */
|
|
54
|
+
count?: number;
|
|
54
55
|
children: TermWithCount[];
|
|
55
56
|
}
|
|
56
57
|
|
|
@@ -58,6 +59,10 @@ export interface TermListResponse {
|
|
|
58
59
|
terms: TermWithCount[];
|
|
59
60
|
}
|
|
60
61
|
|
|
62
|
+
export interface TermReorderResponse {
|
|
63
|
+
reordered: true;
|
|
64
|
+
}
|
|
65
|
+
|
|
61
66
|
export interface TermResponse {
|
|
62
67
|
term: TermData;
|
|
63
68
|
}
|
|
@@ -384,7 +389,7 @@ export async function handleTaxonomyDefTranslations(
|
|
|
384
389
|
export async function handleTermList(
|
|
385
390
|
db: Kysely<Database>,
|
|
386
391
|
taxonomyName: string,
|
|
387
|
-
options: { locale?: string } = {},
|
|
392
|
+
options: { locale?: string; includeCounts?: boolean } = {},
|
|
388
393
|
): Promise<ApiResult<TermListResponse>> {
|
|
389
394
|
try {
|
|
390
395
|
// Definitions are per-locale but terms aren't bound to the def's locale —
|
|
@@ -401,11 +406,10 @@ export async function handleTermList(
|
|
|
401
406
|
// taxonomy's declared collections — one query for the whole list.
|
|
402
407
|
// content_taxonomies.taxonomy_id stores the translation_group, so we
|
|
403
408
|
// look up by group and map back to each term's id.
|
|
404
|
-
const
|
|
405
|
-
|
|
406
|
-
taxonomyName,
|
|
407
|
-
|
|
408
|
-
);
|
|
409
|
+
const includeCounts = options.includeCounts ?? true;
|
|
410
|
+
const countsByGroup = includeCounts
|
|
411
|
+
? await fetchVisibleTermCounts(db, taxonomyName, defCollections(lookup.def))
|
|
412
|
+
: undefined;
|
|
409
413
|
|
|
410
414
|
const termData: TermWithCount[] = terms.map((term) => ({
|
|
411
415
|
id: term.id,
|
|
@@ -415,7 +419,7 @@ export async function handleTermList(
|
|
|
415
419
|
parentId: term.parentId,
|
|
416
420
|
description: typeof term.data?.description === "string" ? term.data.description : undefined,
|
|
417
421
|
children: [],
|
|
418
|
-
count: countsByGroup.get(term.translationGroup ?? term.id) ?? 0,
|
|
422
|
+
...(countsByGroup && { count: countsByGroup.get(term.translationGroup ?? term.id) ?? 0 }),
|
|
419
423
|
locale: term.locale,
|
|
420
424
|
translationGroup: term.translationGroup,
|
|
421
425
|
}));
|
|
@@ -423,7 +427,8 @@ export async function handleTermList(
|
|
|
423
427
|
const isHierarchical = lookup.def.hierarchical === 1;
|
|
424
428
|
const result = isHierarchical ? buildTree(termData) : termData;
|
|
425
429
|
return { success: true, data: { terms: result } };
|
|
426
|
-
} catch {
|
|
430
|
+
} catch (error) {
|
|
431
|
+
console.error("[taxonomies] term list failed:", error);
|
|
427
432
|
return {
|
|
428
433
|
success: false,
|
|
429
434
|
error: { code: "TERM_LIST_ERROR", message: "Failed to list terms" },
|
|
@@ -431,6 +436,102 @@ export async function handleTermList(
|
|
|
431
436
|
}
|
|
432
437
|
}
|
|
433
438
|
|
|
439
|
+
/**
|
|
440
|
+
* Set the manual order of one sibling group.
|
|
441
|
+
*
|
|
442
|
+
* `ids` names the terms to move, in the desired order; each is a row id or a
|
|
443
|
+
* translation_group and resolves to the latter, because a position belongs to a
|
|
444
|
+
* term rather than to one of its locales. Reordering never reparents — moving a
|
|
445
|
+
* term under a different parent is a term update.
|
|
446
|
+
*
|
|
447
|
+
* The group is `(taxonomy, parentId)` and has no locale: `parentId` is the
|
|
448
|
+
* parent's translation_group (a row id is accepted and resolved), and `null`
|
|
449
|
+
* selects the top level — which for a flat taxonomy is every term.
|
|
450
|
+
*
|
|
451
|
+
* `ids` may be a *subset* of the group, and the listed terms are permuted
|
|
452
|
+
* within the positions they already occupy. A locale only renders the terms
|
|
453
|
+
* translated into it, so a caller often cannot name every member; a member left
|
|
454
|
+
* out keeps its place, which is also what makes a stale list harmless.
|
|
455
|
+
*/
|
|
456
|
+
export async function handleTermReorder(
|
|
457
|
+
db: Kysely<Database>,
|
|
458
|
+
taxonomyName: string,
|
|
459
|
+
input: { parentId?: string | null; ids: string[] },
|
|
460
|
+
): Promise<ApiResult<TermReorderResponse>> {
|
|
461
|
+
try {
|
|
462
|
+
const lookup = await requireTaxonomyDef(db, taxonomyName);
|
|
463
|
+
if (!lookup.success) return lookup;
|
|
464
|
+
|
|
465
|
+
const repo = new TaxonomyRepository(db);
|
|
466
|
+
|
|
467
|
+
let parentId = input.parentId ?? null;
|
|
468
|
+
if (parentId !== null) {
|
|
469
|
+
// Children store the parent's translation_group, so a caller passing a
|
|
470
|
+
// row id still addresses the right group. A parent whose anchor row is
|
|
471
|
+
// gone keeps the value as given (see TaxonomyRepository.resolveParentRef).
|
|
472
|
+
const parent = await repo.findById(parentId);
|
|
473
|
+
if (parent) parentId = parent.translationGroup ?? parent.id;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
// Every locale's rows: membership is locale-agnostic, and a term the
|
|
477
|
+
// caller can't see still holds its slot.
|
|
478
|
+
// The order carries into how ties are resolved, so it must be stable
|
|
479
|
+
// across calls; with locales interleaved a tie falls to whichever
|
|
480
|
+
// locale's label sorts first, not to the order the caller rendered.
|
|
481
|
+
const members = await repo.findByName(taxonomyName, { parentId });
|
|
482
|
+
const siblings: SiblingPosition[] = [];
|
|
483
|
+
const seen = new Set<string>();
|
|
484
|
+
const resolve = new Map<string, string>();
|
|
485
|
+
for (const term of members) {
|
|
486
|
+
const group = term.translationGroup ?? term.id;
|
|
487
|
+
if (!seen.has(group)) {
|
|
488
|
+
seen.add(group);
|
|
489
|
+
siblings.push({ group, position: term.sortOrder });
|
|
490
|
+
}
|
|
491
|
+
// Both spellings resolve to the group: a row id, and the group itself for
|
|
492
|
+
// a caller that already holds one — including when its anchor row is gone
|
|
493
|
+
// and no member's id matches it.
|
|
494
|
+
resolve.set(group, group);
|
|
495
|
+
resolve.set(term.id, group);
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
const groups: string[] = [];
|
|
499
|
+
for (const id of input.ids) {
|
|
500
|
+
const group = resolve.get(id);
|
|
501
|
+
if (!group) {
|
|
502
|
+
return {
|
|
503
|
+
success: false,
|
|
504
|
+
error: {
|
|
505
|
+
code: "REORDER_MISMATCH",
|
|
506
|
+
message: `Term "${id}" is not in the sibling group being reordered`,
|
|
507
|
+
},
|
|
508
|
+
};
|
|
509
|
+
}
|
|
510
|
+
if (groups.includes(group)) {
|
|
511
|
+
return {
|
|
512
|
+
success: false,
|
|
513
|
+
error: {
|
|
514
|
+
code: "REORDER_MISMATCH",
|
|
515
|
+
message: `Term "${id}" is listed more than once`,
|
|
516
|
+
},
|
|
517
|
+
};
|
|
518
|
+
}
|
|
519
|
+
groups.push(group);
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
await repo.reorder(groups, siblings);
|
|
523
|
+
invalidateTermCache();
|
|
524
|
+
|
|
525
|
+
return { success: true, data: { reordered: true } };
|
|
526
|
+
} catch (error) {
|
|
527
|
+
console.error("[taxonomies] term reorder failed:", error);
|
|
528
|
+
return {
|
|
529
|
+
success: false,
|
|
530
|
+
error: { code: "TERM_REORDER_ERROR", message: "Failed to reorder terms" },
|
|
531
|
+
};
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
|
|
434
535
|
/**
|
|
435
536
|
* Validate a parent term reference for create/update.
|
|
436
537
|
*
|
|
@@ -54,6 +54,7 @@ import {
|
|
|
54
54
|
mediaListResponseSchema,
|
|
55
55
|
mediaReadResponseSchema,
|
|
56
56
|
mediaResponseSchema,
|
|
57
|
+
mediaStreamUploadResponseSchema,
|
|
57
58
|
mediaUpdateBody,
|
|
58
59
|
mediaUploadUrlBody,
|
|
59
60
|
mediaUploadUrlResponseSchema,
|
|
@@ -87,6 +88,7 @@ import {
|
|
|
87
88
|
createCollectionBody,
|
|
88
89
|
createFieldBody,
|
|
89
90
|
fieldListResponseSchema,
|
|
91
|
+
collectionReorderBody,
|
|
90
92
|
fieldReorderBody,
|
|
91
93
|
fieldResponseSchema,
|
|
92
94
|
orphanedTableListResponseSchema,
|
|
@@ -111,9 +113,12 @@ import {
|
|
|
111
113
|
import { settingsUpdateBody, siteSettingsSchema } from "../schemas/settings.js";
|
|
112
114
|
import {
|
|
113
115
|
createTermBody,
|
|
116
|
+
reorderTermsBody,
|
|
114
117
|
taxonomyListResponseSchema,
|
|
115
118
|
termGetResponseSchema,
|
|
119
|
+
termListQuery,
|
|
116
120
|
termListResponseSchema,
|
|
121
|
+
termReorderResponseSchema,
|
|
117
122
|
termResponseSchema,
|
|
118
123
|
updateTermBody,
|
|
119
124
|
} from "../schemas/taxonomies.js";
|
|
@@ -788,9 +793,9 @@ function buildMediaPaths(maxUploadSize: number) {
|
|
|
788
793
|
"/_emdash/api/media/upload-url": {
|
|
789
794
|
post: {
|
|
790
795
|
operationId: "getMediaUploadUrl",
|
|
791
|
-
summary: "Get a
|
|
796
|
+
summary: "Get a media upload target",
|
|
792
797
|
description:
|
|
793
|
-
"Returns a signed
|
|
798
|
+
"Returns either a signed direct-to-storage URL or a same-origin streaming target. Creates a pending media record.",
|
|
794
799
|
tags: ["Media"],
|
|
795
800
|
requestBody: { content: { [JSON_CONTENT]: { schema: mediaUploadUrlBody(maxUploadSize) } } },
|
|
796
801
|
responses: {
|
|
@@ -827,7 +832,37 @@ function buildMediaPaths(maxUploadSize: number) {
|
|
|
827
832
|
},
|
|
828
833
|
},
|
|
829
834
|
...authErrors,
|
|
830
|
-
...standardErrors(400, 404, 500),
|
|
835
|
+
...standardErrors(400, 404, 409, 500),
|
|
836
|
+
},
|
|
837
|
+
},
|
|
838
|
+
},
|
|
839
|
+
"/_emdash/api/media/{id}/upload": {
|
|
840
|
+
put: {
|
|
841
|
+
operationId: "uploadPendingMedia",
|
|
842
|
+
summary: "Upload a pending media file through EmDash",
|
|
843
|
+
description:
|
|
844
|
+
"Streams a file to storage when the configured adapter cannot provide a signed upload URL. The Content-Type and byte count must match the pending media item.",
|
|
845
|
+
tags: ["Media"],
|
|
846
|
+
requestParams: {
|
|
847
|
+
path: z.object({ id: z.string().meta({ description: "Media ID" }) }),
|
|
848
|
+
},
|
|
849
|
+
requestBody: {
|
|
850
|
+
required: true,
|
|
851
|
+
content: {
|
|
852
|
+
"*/*": {
|
|
853
|
+
schema: z.string().meta({ format: "binary" }),
|
|
854
|
+
},
|
|
855
|
+
},
|
|
856
|
+
},
|
|
857
|
+
responses: {
|
|
858
|
+
"200": {
|
|
859
|
+
description: "File uploaded and ready for confirmation",
|
|
860
|
+
content: {
|
|
861
|
+
[JSON_CONTENT]: { schema: successEnvelope(mediaStreamUploadResponseSchema) },
|
|
862
|
+
},
|
|
863
|
+
},
|
|
864
|
+
...authErrors,
|
|
865
|
+
...standardErrors(400, 404, 413, 500),
|
|
831
866
|
},
|
|
832
867
|
},
|
|
833
868
|
},
|
|
@@ -1030,6 +1065,28 @@ const schemaPaths = {
|
|
|
1030
1065
|
},
|
|
1031
1066
|
},
|
|
1032
1067
|
},
|
|
1068
|
+
"/_emdash/api/schema/collections/reorder": {
|
|
1069
|
+
post: {
|
|
1070
|
+
operationId: "reorderCollections",
|
|
1071
|
+
summary: "Reorder collections in the admin sidebar",
|
|
1072
|
+
description:
|
|
1073
|
+
"Sets the sidebar order. Collections omitted from the list lose their explicit position and fall back to alphabetical order after the ordered ones.",
|
|
1074
|
+
tags: ["Schema"],
|
|
1075
|
+
requestBody: { content: { [JSON_CONTENT]: { schema: collectionReorderBody } } },
|
|
1076
|
+
responses: {
|
|
1077
|
+
"200": {
|
|
1078
|
+
description: "Reordered",
|
|
1079
|
+
content: {
|
|
1080
|
+
[JSON_CONTENT]: {
|
|
1081
|
+
schema: successEnvelope(z.object({ success: z.literal(true) })),
|
|
1082
|
+
},
|
|
1083
|
+
},
|
|
1084
|
+
},
|
|
1085
|
+
...authErrors,
|
|
1086
|
+
...standardErrors(400, 404, 500),
|
|
1087
|
+
},
|
|
1088
|
+
},
|
|
1089
|
+
},
|
|
1033
1090
|
"/_emdash/api/schema/collections/{slug}/fields/reorder": {
|
|
1034
1091
|
post: {
|
|
1035
1092
|
operationId: "reorderFields",
|
|
@@ -1288,6 +1345,29 @@ const taxonomyPaths = {
|
|
|
1288
1345
|
},
|
|
1289
1346
|
},
|
|
1290
1347
|
},
|
|
1348
|
+
"/_emdash/api/taxonomies/{name}/reorder": {
|
|
1349
|
+
post: {
|
|
1350
|
+
operationId: "reorderTerms",
|
|
1351
|
+
summary: "Set the manual order of one sibling group of terms",
|
|
1352
|
+
description:
|
|
1353
|
+
"`ids` names the terms to move, in the desired order, and may be a subset of the group — the listed terms are permuted within the positions they already occupy. A position belongs to a term across every locale, so there is no `locale` parameter. Ordering never reparents — use the term update endpoint to change a parent.",
|
|
1354
|
+
tags: ["Taxonomies"],
|
|
1355
|
+
requestParams: {
|
|
1356
|
+
path: z.object({ name: z.string().meta({ description: "Taxonomy name" }) }),
|
|
1357
|
+
},
|
|
1358
|
+
requestBody: { content: { [JSON_CONTENT]: { schema: reorderTermsBody } } },
|
|
1359
|
+
responses: {
|
|
1360
|
+
"200": {
|
|
1361
|
+
description: "The group in its new order",
|
|
1362
|
+
content: {
|
|
1363
|
+
[JSON_CONTENT]: { schema: successEnvelope(termReorderResponseSchema) },
|
|
1364
|
+
},
|
|
1365
|
+
},
|
|
1366
|
+
...authErrors,
|
|
1367
|
+
...standardErrors(400, 404, 500),
|
|
1368
|
+
},
|
|
1369
|
+
},
|
|
1370
|
+
},
|
|
1291
1371
|
"/_emdash/api/taxonomies/{name}/terms": {
|
|
1292
1372
|
get: {
|
|
1293
1373
|
operationId: "listTerms",
|
|
@@ -1296,6 +1376,7 @@ const taxonomyPaths = {
|
|
|
1296
1376
|
tags: ["Taxonomies"],
|
|
1297
1377
|
requestParams: {
|
|
1298
1378
|
path: z.object({ name: z.string().meta({ description: "Taxonomy name" }) }),
|
|
1379
|
+
query: termListQuery,
|
|
1299
1380
|
},
|
|
1300
1381
|
responses: {
|
|
1301
1382
|
"200": {
|
package/src/api/public-url.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
/** Minimal config shape — avoids importing the full EmDashConfig type tree. */
|
|
13
|
-
interface SiteUrlConfig {
|
|
13
|
+
export interface SiteUrlConfig {
|
|
14
14
|
siteUrl?: string;
|
|
15
15
|
}
|
|
16
16
|
|
|
@@ -74,7 +74,19 @@ function getEnvSiteUrl(): string | undefined {
|
|
|
74
74
|
* @returns Origin string, e.g. `"https://mysite.example.com"`
|
|
75
75
|
*/
|
|
76
76
|
export function getPublicOrigin(url: URL, config?: SiteUrlConfig): string {
|
|
77
|
-
return config
|
|
77
|
+
return getConfiguredOrigin(config) || url.origin;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Return the operator-configured public origin, if any.
|
|
82
|
+
*
|
|
83
|
+
* The first two steps of {@link getPublicOrigin}'s resolution —
|
|
84
|
+
* `config.siteUrl`, then the `EMDASH_SITE_URL`/`SITE_URL` env vars — without
|
|
85
|
+
* the request-URL fallback. For callers that have a more trustworthy fallback
|
|
86
|
+
* than the request (e.g. the stored setup origin used for outbound emails).
|
|
87
|
+
*/
|
|
88
|
+
export function getConfiguredOrigin(config?: SiteUrlConfig): string | undefined {
|
|
89
|
+
return config?.siteUrl || getEnvSiteUrl() || undefined;
|
|
78
90
|
}
|
|
79
91
|
|
|
80
92
|
/**
|
package/src/api/schemas/media.ts
CHANGED
|
@@ -74,7 +74,7 @@ export function mediaUploadUrlBody(maxSize: number) {
|
|
|
74
74
|
size: z
|
|
75
75
|
.number()
|
|
76
76
|
.int()
|
|
77
|
-
.
|
|
77
|
+
.nonnegative()
|
|
78
78
|
.max(maxSize, `File size must not exceed ${formatFileSize(maxSize)}`),
|
|
79
79
|
contentHash: z.string().optional(),
|
|
80
80
|
fieldId: z.string().optional(),
|
|
@@ -84,7 +84,7 @@ export function mediaUploadUrlBody(maxSize: number) {
|
|
|
84
84
|
|
|
85
85
|
export const mediaConfirmBody = z
|
|
86
86
|
.object({
|
|
87
|
-
size: z.number().int().
|
|
87
|
+
size: z.number().int().nonnegative().optional(),
|
|
88
88
|
width: z.number().int().positive().optional(),
|
|
89
89
|
height: z.number().int().positive().optional(),
|
|
90
90
|
})
|
|
@@ -178,3 +178,10 @@ export const mediaConfirmResponseSchema = z
|
|
|
178
178
|
item: mediaItemSchema.extend({ url: z.string() }),
|
|
179
179
|
})
|
|
180
180
|
.meta({ id: "MediaConfirmResponse" });
|
|
181
|
+
|
|
182
|
+
export const mediaStreamUploadResponseSchema = z
|
|
183
|
+
.object({
|
|
184
|
+
uploaded: z.literal(true),
|
|
185
|
+
size: z.number().int().nonnegative(),
|
|
186
|
+
})
|
|
187
|
+
.meta({ id: "MediaStreamUploadResponse" });
|