emdash 0.28.0 → 0.29.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-hUy8vOB-.d.mts → adapters-DPAkL6QF.d.mts} +1 -1
- package/dist/{adapters-hUy8vOB-.d.mts.map → adapters-DPAkL6QF.d.mts.map} +1 -1
- package/dist/{allowed-origins-CRsJ6BPM.mjs → allowed-origins-FXB-FplB.mjs} +2 -2
- package/dist/{allowed-origins-CRsJ6BPM.mjs.map → allowed-origins-FXB-FplB.mjs.map} +1 -1
- package/dist/api/route-utils.d.mts +3 -3
- package/dist/api/route-utils.mjs +22 -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 +4 -4
- package/dist/{api-BFURZn1i.mjs → api-DVbHNApo.mjs} +75 -23
- package/dist/api-DVbHNApo.mjs.map +1 -0
- package/dist/{api-tokens-DvqeZmVq.mjs → api-tokens-UYBkl17d.mjs} +2 -2
- package/dist/{api-tokens-DvqeZmVq.mjs.map → api-tokens-UYBkl17d.mjs.map} +1 -1
- package/dist/{apply-Bu-8nYHL.mjs → apply-D23iUV4q.mjs} +20 -20
- package/dist/{apply-Bu-8nYHL.mjs.map → apply-D23iUV4q.mjs.map} +1 -1
- package/dist/astro/index.d.mts +13 -12
- package/dist/astro/index.d.mts.map +1 -1
- package/dist/astro/index.mjs +10 -5
- package/dist/astro/index.mjs.map +1 -1
- package/dist/astro/middleware/auth.d.mts +11 -10
- package/dist/astro/middleware/auth.d.mts.map +1 -1
- package/dist/astro/middleware/auth.mjs +8 -8
- package/dist/astro/middleware/redirect.mjs +7 -7
- package/dist/astro/middleware/request-context.d.mts +3 -0
- package/dist/astro/middleware/request-context.d.mts.map +1 -1
- package/dist/astro/middleware/request-context.mjs +257 -30
- package/dist/astro/middleware/request-context.mjs.map +1 -1
- package/dist/astro/middleware/setup.mjs +1 -1
- package/dist/astro/middleware.d.mts +2 -2
- package/dist/astro/middleware.d.mts.map +1 -1
- package/dist/astro/middleware.mjs +125 -79
- 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 +5 -5
- package/dist/astro/routes/api/admin/api-tokens/index.mjs +6 -6
- package/dist/astro/routes/api/admin/byline-fields/_slug_/usage.mjs +6 -6
- 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 +17 -17
- package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs +17 -17
- package/dist/astro/routes/api/admin/bylines/index.mjs +17 -17
- package/dist/astro/routes/api/admin/comments/_id_/status.d.mts.map +1 -1
- package/dist/astro/routes/api/admin/comments/_id_/status.mjs +13 -13
- package/dist/astro/routes/api/admin/comments/_id_/status.mjs.map +1 -1
- package/dist/astro/routes/api/admin/comments/_id_.mjs +6 -6
- package/dist/astro/routes/api/admin/comments/bulk.mjs +10 -10
- package/dist/astro/routes/api/admin/comments/counts.mjs +6 -6
- package/dist/astro/routes/api/admin/comments/index.d.mts.map +1 -1
- package/dist/astro/routes/api/admin/comments/index.mjs +10 -10
- package/dist/astro/routes/api/admin/comments/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/hooks/exclusive/_hookName_.mjs +6 -6
- package/dist/astro/routes/api/admin/hooks/exclusive/index.mjs +5 -5
- package/dist/astro/routes/api/admin/media-usage/repair.d.mts +8 -0
- package/dist/astro/routes/api/admin/media-usage/repair.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/media-usage/repair.mjs +28 -0
- package/dist/astro/routes/api/admin/media-usage/repair.mjs.map +1 -0
- package/dist/astro/routes/api/admin/oauth-clients/_id_.mjs +5 -5
- package/dist/astro/routes/api/admin/oauth-clients/index.mjs +5 -5
- package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs +43 -41
- package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +43 -41
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +42 -40
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +42 -40
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs +42 -40
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/index.mjs +42 -40
- package/dist/astro/routes/api/admin/plugins/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/icon.mjs +4 -4
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs +42 -40
- 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 +42 -40
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +42 -40
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.mjs +42 -40
- 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 +43 -41
- package/dist/astro/routes/api/admin/plugins/registry/_id_/update.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/artifact.mjs +42 -40
- package/dist/astro/routes/api/admin/plugins/registry/artifact.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/install.mjs +43 -41
- package/dist/astro/routes/api/admin/plugins/registry/install.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/updates.mjs +42 -40
- package/dist/astro/routes/api/admin/plugins/updates.mjs.map +1 -1
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +42 -40
- 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 +4 -4
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs +42 -40
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/users/_id_/disable.mjs +4 -4
- package/dist/astro/routes/api/admin/users/_id_/enable.mjs +3 -3
- 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/index.mjs +7 -7
- package/dist/astro/routes/api/auth/dev-bypass.mjs +7 -7
- package/dist/astro/routes/api/auth/invite/accept.mjs +3 -3
- package/dist/astro/routes/api/auth/invite/complete.mjs +12 -12
- package/dist/astro/routes/api/auth/invite/index.mjs +9 -9
- package/dist/astro/routes/api/auth/invite/register-options.mjs +11 -11
- package/dist/astro/routes/api/auth/logout.mjs +4 -4
- package/dist/astro/routes/api/auth/magic-link/send.mjs +11 -11
- package/dist/astro/routes/api/auth/magic-link/verify.mjs +4 -4
- package/dist/astro/routes/api/auth/me.mjs +8 -8
- package/dist/astro/routes/api/auth/mode.mjs +1 -1
- package/dist/astro/routes/api/auth/oauth/_provider_/callback.mjs +4 -4
- package/dist/astro/routes/api/auth/oauth/_provider_/callback.mjs.map +1 -1
- package/dist/astro/routes/api/auth/oauth/_provider_.mjs +2 -2
- package/dist/astro/routes/api/auth/oauth/_provider_.mjs.map +1 -1
- package/dist/astro/routes/api/auth/passkey/_id_.mjs +7 -7
- package/dist/astro/routes/api/auth/passkey/index.mjs +3 -3
- 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 +11 -11
- package/dist/astro/routes/api/auth/signup/verify.mjs +3 -3
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.d.mts.map +1 -1
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs +69 -14
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs.map +1 -1
- package/dist/astro/routes/api/comments/_collection_/_contentId_/reactions.mjs +13 -13
- package/dist/astro/routes/api/content/_collection_/_id_/compare.mjs +4 -4
- 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 +4 -4
- package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs +12 -12
- package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs +8 -8
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/children.d.mts +9 -0
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/children.d.mts.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/children.mjs +71 -0
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/children.mjs.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/parents.d.mts +8 -0
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/parents.d.mts.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/parents.mjs +50 -0
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/parents.mjs.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/restore.mjs +4 -4
- package/dist/astro/routes/api/content/_collection_/_id_/revisions.mjs +4 -4
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs +8 -8
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs +15 -15
- package/dist/astro/routes/api/content/_collection_/_id_/translations.mjs +4 -4
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs +4 -4
- package/dist/astro/routes/api/content/_collection_/_id_.mjs +8 -8
- package/dist/astro/routes/api/content/_collection_/authors.mjs +4 -4
- package/dist/astro/routes/api/content/_collection_/index.mjs +8 -8
- package/dist/astro/routes/api/content/_collection_/trash.mjs +8 -8
- package/dist/astro/routes/api/dashboard.mjs +8 -8
- package/dist/astro/routes/api/dev/emails.mjs +4 -4
- package/dist/astro/routes/api/import/probe.d.mts +3 -3
- package/dist/astro/routes/api/import/probe.mjs +18 -18
- package/dist/astro/routes/api/import/wordpress/analyze.mjs +5 -5
- package/dist/astro/routes/api/import/wordpress/execute.d.mts +12 -11
- package/dist/astro/routes/api/import/wordpress/execute.d.mts.map +1 -1
- package/dist/astro/routes/api/import/wordpress/execute.mjs +16 -16
- package/dist/astro/routes/api/import/wordpress/media.d.mts +11 -10
- package/dist/astro/routes/api/import/wordpress/media.d.mts.map +1 -1
- package/dist/astro/routes/api/import/wordpress/media.mjs +11 -11
- package/dist/astro/routes/api/import/wordpress/prepare.mjs +11 -11
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.d.mts +12 -16
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.d.mts.map +1 -1
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs +11 -11
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.d.mts +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs +18 -18
- package/dist/astro/routes/api/import/wordpress-plugin/callback.mjs +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/execute.d.mts +12 -11
- package/dist/astro/routes/api/import/wordpress-plugin/execute.d.mts.map +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs +28 -28
- package/dist/astro/routes/api/manifest.mjs +6 -6
- package/dist/astro/routes/api/mcp.mjs +56 -47
- package/dist/astro/routes/api/mcp.mjs.map +1 -1
- package/dist/astro/routes/api/media/_id_/confirm.mjs +9 -9
- package/dist/astro/routes/api/media/_id_.mjs +8 -8
- package/dist/astro/routes/api/media/file/_...key_.mjs +3 -3
- package/dist/astro/routes/api/media/providers/_providerId_/_itemId_.mjs +4 -4
- package/dist/astro/routes/api/media/providers/_providerId_/index.mjs +4 -4
- package/dist/astro/routes/api/media/providers/index.mjs +4 -4
- package/dist/astro/routes/api/media/upload-url.mjs +10 -10
- package/dist/astro/routes/api/media.mjs +13 -13
- package/dist/astro/routes/api/menus/_name_/items/_id_.mjs +9 -9
- package/dist/astro/routes/api/menus/_name_/items.mjs +9 -9
- package/dist/astro/routes/api/menus/_name_/reorder.mjs +9 -9
- package/dist/astro/routes/api/menus/_name_/translations.mjs +9 -9
- package/dist/astro/routes/api/menus/_name_.mjs +9 -9
- package/dist/astro/routes/api/menus/index.mjs +9 -9
- package/dist/astro/routes/api/oauth/authorize.mjs +6 -6
- package/dist/astro/routes/api/oauth/device/authorize.mjs +7 -7
- package/dist/astro/routes/api/oauth/device/code.mjs +10 -10
- package/dist/astro/routes/api/oauth/device/token.mjs +9 -9
- package/dist/astro/routes/api/oauth/register.mjs +4 -4
- package/dist/astro/routes/api/oauth/token/refresh.mjs +7 -7
- package/dist/astro/routes/api/oauth/token/revoke.mjs +7 -7
- package/dist/astro/routes/api/oauth/token.mjs +7 -7
- package/dist/astro/routes/api/openapi.json.mjs +24 -5
- package/dist/astro/routes/api/openapi.json.mjs.map +1 -1
- package/dist/astro/routes/api/plugins/_pluginId_/_...path_.d.mts.map +1 -1
- package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs +7 -15
- package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs.map +1 -1
- 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 +13 -13
- package/dist/astro/routes/api/redirects/index.mjs +13 -13
- package/dist/astro/routes/api/relations/_id_/index.d.mts +10 -0
- package/dist/astro/routes/api/relations/_id_/index.d.mts.map +1 -0
- package/dist/astro/routes/api/relations/_id_/index.mjs +69 -0
- package/dist/astro/routes/api/relations/_id_/index.mjs.map +1 -0
- package/dist/astro/routes/api/relations/_id_/translations.d.mts +8 -0
- package/dist/astro/routes/api/relations/_id_/translations.d.mts.map +1 -0
- package/dist/astro/routes/api/relations/_id_/translations.mjs +34 -0
- package/dist/astro/routes/api/relations/_id_/translations.mjs.map +1 -0
- package/dist/astro/routes/api/relations/index.d.mts +9 -0
- package/dist/astro/routes/api/relations/index.d.mts.map +1 -0
- package/dist/astro/routes/api/relations/index.mjs +53 -0
- package/dist/astro/routes/api/relations/index.mjs.map +1 -0
- package/dist/astro/routes/api/revisions/_revisionId_/index.mjs +4 -4
- package/dist/astro/routes/api/revisions/_revisionId_/restore.mjs +4 -4
- package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.d.mts.map +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs +42 -40
- package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/fields/index.d.mts.map +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs +42 -40
- 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 +42 -40
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +42 -40
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/index.mjs +42 -40
- package/dist/astro/routes/api/schema/collections/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/index.mjs +9 -9
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs +42 -40
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs.map +1 -1
- package/dist/astro/routes/api/schema/orphans/index.mjs +42 -40
- package/dist/astro/routes/api/schema/orphans/index.mjs.map +1 -1
- package/dist/astro/routes/api/search/enable.mjs +12 -12
- package/dist/astro/routes/api/search/index.mjs +13 -12
- package/dist/astro/routes/api/search/index.mjs.map +1 -1
- package/dist/astro/routes/api/search/rebuild.mjs +12 -12
- package/dist/astro/routes/api/search/stats.mjs +8 -8
- package/dist/astro/routes/api/search/suggest.mjs +11 -11
- 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/email.mjs +6 -6
- package/dist/astro/routes/api/settings.mjs +15 -15
- 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 +29 -29
- package/dist/astro/routes/api/setup/dev-reset.mjs +4 -4
- package/dist/astro/routes/api/setup/index.mjs +30 -30
- package/dist/astro/routes/api/setup/status.mjs +5 -5
- package/dist/astro/routes/api/snapshot.mjs +8 -8
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs +15 -15
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs +15 -15
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs +15 -15
- package/dist/astro/routes/api/taxonomies/index.mjs +15 -15
- package/dist/astro/routes/api/themes/preview.mjs +7 -7
- package/dist/astro/routes/api/typegen.mjs +6 -6
- 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 +12 -12
- package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs +12 -12
- package/dist/astro/routes/api/widget-areas/_name_.mjs +8 -8
- package/dist/astro/routes/api/widget-areas/index.mjs +12 -12
- package/dist/astro/routes/api/widget-components.mjs +4 -4
- package/dist/astro/routes/robots.txt.mjs +9 -9
- package/dist/astro/routes/sitemap-_collection_.xml.mjs +12 -12
- package/dist/astro/routes/sitemap.xml.mjs +10 -10
- package/dist/astro/types.d.mts +16 -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-Dz88F_Fw.mjs → authorize-BmCwQCib.mjs} +2 -2
- package/dist/{authorize-Dz88F_Fw.mjs.map → authorize-BmCwQCib.mjs.map} +1 -1
- package/dist/{base64-CmWvODNW.mjs → base64-C74Msx8h.mjs} +1 -1
- package/dist/{base64-CmWvODNW.mjs.map → base64-C74Msx8h.mjs.map} +1 -1
- package/dist/{byline-Bm8ZgUP9.mjs → byline-BWb5H-65.mjs} +8 -8
- package/dist/{byline-Bm8ZgUP9.mjs.map → byline-BWb5H-65.mjs.map} +1 -1
- package/dist/{byline-fields-CIx_GuN4.mjs → byline-fields-DO6bAYK8.mjs} +2 -2
- package/dist/{byline-fields-CIx_GuN4.mjs.map → byline-fields-DO6bAYK8.mjs.map} +1 -1
- package/dist/{byline-registry-BOjqDOim.mjs → byline-registry-BCuOp4UF.mjs} +3 -3
- package/dist/{byline-registry-BOjqDOim.mjs.map → byline-registry-BCuOp4UF.mjs.map} +1 -1
- package/dist/{bylines-6tm9mgQb.mjs → bylines-BGuKFaBy.mjs} +4 -4
- package/dist/{bylines-6tm9mgQb.mjs.map → bylines-BGuKFaBy.mjs.map} +1 -1
- package/dist/{bylines-Woq87129.mjs → bylines-CHojDMpj.mjs} +8 -8
- package/dist/{bylines-Woq87129.mjs.map → bylines-CHojDMpj.mjs.map} +1 -1
- package/dist/{cache-CEBAZjir.mjs → cache-BeR7RfN8.mjs} +3 -3
- package/dist/{cache-CEBAZjir.mjs.map → cache-BeR7RfN8.mjs.map} +1 -1
- package/dist/{challenge-store-anhwVER0.mjs → challenge-store-B426wQ6O.mjs} +1 -1
- package/dist/{challenge-store-anhwVER0.mjs.map → challenge-store-B426wQ6O.mjs.map} +1 -1
- package/dist/{chunks-B2isWQhr.mjs → chunks-BU5_nrAC.mjs} +2 -2
- package/dist/{chunks-B2isWQhr.mjs.map → chunks-BU5_nrAC.mjs.map} +1 -1
- package/dist/cli/index.mjs +28 -28
- package/dist/cli/index.mjs.map +1 -1
- package/dist/client/cf-access.d.mts +1 -1
- package/dist/client/index.d.mts +34 -2
- package/dist/client/index.d.mts.map +1 -1
- package/dist/client/index.mjs +6 -2
- package/dist/client/index.mjs.map +1 -1
- package/dist/{comment-CzeatwBV.mjs → comment-SWh31kS0.mjs} +2 -2
- package/dist/{comment-CzeatwBV.mjs.map → comment-SWh31kS0.mjs.map} +1 -1
- package/dist/{comment-reaction-Cj9QJY7I.mjs → comment-reaction-DgcpziXI.mjs} +2 -2
- package/dist/{comment-reaction-Cj9QJY7I.mjs.map → comment-reaction-DgcpziXI.mjs.map} +1 -1
- package/dist/{comments-BLE-jv5k.mjs → comments-kZYGppMS.mjs} +3 -3
- package/dist/{comments-BLE-jv5k.mjs.map → comments-kZYGppMS.mjs.map} +1 -1
- package/dist/{components-B_sATNUc.mjs → components-CliOkZAs.mjs} +1 -1
- package/dist/{components-B_sATNUc.mjs.map → components-CliOkZAs.mjs.map} +1 -1
- package/dist/{content-DhgEth4k.mjs → content-BO61Sx4j.mjs} +179 -20
- package/dist/content-BO61Sx4j.mjs.map +1 -0
- package/dist/{content-refresh-CA4uKwzH.mjs → content-refresh-BkkApzeS.mjs} +20 -14
- package/dist/content-refresh-BkkApzeS.mjs.map +1 -0
- package/dist/{context-CUsR9dXL.mjs → context-DtSFYFuS.mjs} +71 -14
- package/dist/context-DtSFYFuS.mjs.map +1 -0
- package/dist/{cron-v4FTEFR_.mjs → cron-YFJ7uNVA.mjs} +1 -1
- package/dist/{cron-v4FTEFR_.mjs.map → cron-YFJ7uNVA.mjs.map} +1 -1
- package/dist/{dashboard-EvEKF5en.mjs → dashboard-xo_gPs_D.mjs} +6 -5
- package/dist/dashboard-xo_gPs_D.mjs.map +1 -0
- package/dist/database/pg-migration-lock.d.mts +21 -0
- package/dist/database/pg-migration-lock.d.mts.map +1 -0
- package/dist/database/pg-migration-lock.mjs +45 -0
- package/dist/database/pg-migration-lock.mjs.map +1 -0
- package/dist/db/index.d.mts +3 -3
- package/dist/db/index.mjs +2 -2
- package/dist/db/libsql.d.mts +1 -1
- package/dist/db/postgres.d.mts +1 -1
- package/dist/db/postgres.d.mts.map +1 -1
- package/dist/db/postgres.mjs +2 -8
- package/dist/db/postgres.mjs.map +1 -1
- package/dist/db/sqlite.d.mts +1 -1
- package/dist/{db-errors-CK46D-ly.mjs → db-errors-BKuXh_fi.mjs} +1 -1
- package/dist/{db-errors-CK46D-ly.mjs.map → db-errors-BKuXh_fi.mjs.map} +1 -1
- package/dist/{default-CM_D83Mg.mjs → default-DY5ovGUG.mjs} +1 -1
- package/dist/{default-CM_D83Mg.mjs.map → default-DY5ovGUG.mjs.map} +1 -1
- package/dist/{device-flow-CfGP18Uw.mjs → device-flow-CPXQ_QfW.mjs} +5 -5
- package/dist/{device-flow-CfGP18Uw.mjs.map → device-flow-CPXQ_QfW.mjs.map} +1 -1
- package/dist/{dialect-helpers-DRI5pyY3.mjs → dialect-helpers-Cue7QQOR.mjs} +21 -2
- package/dist/dialect-helpers-Cue7QQOR.mjs.map +1 -0
- package/dist/{email-console-CIf4Lfvv.mjs → email-console-CjkQc7oY.mjs} +1 -1
- package/dist/{email-console-CIf4Lfvv.mjs.map → email-console-CjkQc7oY.mjs.map} +1 -1
- package/dist/{enrich-BQ0mxJRs.mjs → enrich-CFJJgxs_.mjs} +2 -2
- package/dist/{enrich-BQ0mxJRs.mjs.map → enrich-CFJJgxs_.mjs.map} +1 -1
- package/dist/{error-CkAseSqZ.mjs → error-CfJMLSkd.mjs} +12 -3
- package/dist/error-CfJMLSkd.mjs.map +1 -0
- package/dist/{escape-DqD0aCKu.mjs → escape-r8_GbEU2.mjs} +1 -1
- package/dist/{escape-DqD0aCKu.mjs.map → escape-r8_GbEU2.mjs.map} +1 -1
- package/dist/{field-defs-cache-WUI88LX5.mjs → field-defs-cache-BVrNCgSj.mjs} +5 -5
- package/dist/{field-defs-cache-WUI88LX5.mjs.map → field-defs-cache-BVrNCgSj.mjs.map} +1 -1
- package/dist/{fts-manager-BbFaF_V8.mjs → fts-manager-BD9s77qh.mjs} +27 -3
- package/dist/{fts-manager-BbFaF_V8.mjs.map → fts-manager-BD9s77qh.mjs.map} +1 -1
- package/dist/{hash-DrvzIXcz.mjs → hash-DFFrkivP.mjs} +1 -1
- package/dist/{hash-DrvzIXcz.mjs.map → hash-DFFrkivP.mjs.map} +1 -1
- package/dist/hreflang-CgIxhH4k.d.mts +48 -0
- package/dist/hreflang-CgIxhH4k.d.mts.map +1 -0
- package/dist/hreflang-pAWUiPd_.mjs +102 -0
- package/dist/hreflang-pAWUiPd_.mjs.map +1 -0
- package/dist/{import-fYLf14Co.mjs → import-2jHtLzsO.mjs} +6 -6
- package/dist/{import-fYLf14Co.mjs.map → import-2jHtLzsO.mjs.map} +1 -1
- package/dist/{index-B9sIxwe4.d.mts → index-BXOCyLj0.d.mts} +115 -21
- package/dist/index-BXOCyLj0.d.mts.map +1 -0
- package/dist/{index-Bm-Gy8Mh.d.mts → index-DxjWLKGT.d.mts} +3 -3
- package/dist/{index-Bm-Gy8Mh.d.mts.map → index-DxjWLKGT.d.mts.map} +1 -1
- package/dist/index.d.mts +20 -19
- package/dist/index.mjs +68 -64
- package/dist/{init-lock-6b309ZrF.mjs → init-lock-DJkX6Hto.mjs} +1 -1
- package/dist/{init-lock-6b309ZrF.mjs.map → init-lock-DJkX6Hto.mjs.map} +1 -1
- package/dist/{load-Djn3HWQS.mjs → load-DgoWMdRX.mjs} +2 -2
- package/dist/{load-Djn3HWQS.mjs.map → load-DgoWMdRX.mjs.map} +1 -1
- package/dist/{loader-CB6YHeul.mjs → loader-Rb8QlGZp.mjs} +5 -20
- package/dist/loader-Rb8QlGZp.mjs.map +1 -0
- package/dist/{manifest-schema-BHlgZM1W.mjs → manifest-schema-DeGNma2O.mjs} +3 -1
- package/dist/manifest-schema-DeGNma2O.mjs.map +1 -0
- package/dist/media/image-endpoint.mjs +1 -1
- package/dist/media/index.d.mts +1 -1
- package/dist/media/index.mjs +2 -2
- package/dist/media/local-runtime.d.mts +13 -12
- package/dist/media/local-runtime.d.mts.map +1 -1
- package/dist/media/local-runtime.mjs +8 -8
- package/dist/{media-BrXIaMFN.mjs → media-D2ZFowpn.mjs} +2 -2
- package/dist/media-D2ZFowpn.mjs.map +1 -0
- package/dist/{media-allowlist-CRHEeJ_i.mjs → media-allowlist-Dc05vKtt.mjs} +2 -2
- package/dist/{media-allowlist-CRHEeJ_i.mjs.map → media-allowlist-Dc05vKtt.mjs.map} +1 -1
- package/dist/{media-url-CKi5XSw4.mjs → media-url-DgIEYZr4.mjs} +1 -1
- package/dist/{media-url-CKi5XSw4.mjs.map → media-url-DgIEYZr4.mjs.map} +1 -1
- package/dist/media-usage-B__v9NMm.mjs +421 -0
- package/dist/media-usage-B__v9NMm.mjs.map +1 -0
- package/dist/{menus-Cfivc2Ad.mjs → menus-BpfevlJD.mjs} +3 -3
- package/dist/{menus-Cfivc2Ad.mjs.map → menus-BpfevlJD.mjs.map} +1 -1
- package/dist/{menus-CsZ2ZEK2.mjs → menus-BtvH7Z7t.mjs} +31 -12
- package/dist/menus-BtvH7Z7t.mjs.map +1 -0
- package/dist/{mime-CCEzze7W.mjs → mime-DfIVjNkr.mjs} +1 -1
- package/dist/{mime-CCEzze7W.mjs.map → mime-DfIVjNkr.mjs.map} +1 -1
- package/dist/{mode-BM9QgEmt.mjs → mode-BVnhGZ2o.mjs} +1 -1
- package/dist/{mode-BM9QgEmt.mjs.map → mode-BVnhGZ2o.mjs.map} +1 -1
- package/dist/{normalize-CeglrBT9.mjs → normalize-C-SHXmra.mjs} +1 -1
- package/dist/{normalize-CeglrBT9.mjs.map → normalize-C-SHXmra.mjs.map} +1 -1
- package/dist/{oauth-authorization-CXWkIGT4.mjs → oauth-authorization-BWqWTHBK.mjs} +5 -5
- package/dist/{oauth-authorization-CXWkIGT4.mjs.map → oauth-authorization-BWqWTHBK.mjs.map} +1 -1
- package/dist/{oauth-clients-BmTI5rsl.mjs → oauth-clients-43_XADoa.mjs} +1 -1
- package/dist/{oauth-clients-BmTI5rsl.mjs.map → oauth-clients-43_XADoa.mjs.map} +1 -1
- package/dist/{oauth-state-store-YLFLcH5F.mjs → oauth-state-store-BRSUEkmx.mjs} +1 -1
- package/dist/{oauth-state-store-YLFLcH5F.mjs.map → oauth-state-store-BRSUEkmx.mjs.map} +1 -1
- package/dist/{oauth-user-lookup-Bsc_GsX-.mjs → oauth-user-lookup-Ctgemb0k.mjs} +1 -1
- package/dist/{oauth-user-lookup-Bsc_GsX-.mjs.map → oauth-user-lookup-Ctgemb0k.mjs.map} +1 -1
- package/dist/object-cache/memory.d.mts +1 -1
- package/dist/{options-DTTML-Tx.mjs → options-BlmBHTvX.mjs} +1 -1
- package/dist/{options-DTTML-Tx.mjs.map → options-BlmBHTvX.mjs.map} +1 -1
- package/dist/{options-iMpRRxIe.d.mts → options-COXGTtqd.d.mts} +3 -3
- package/dist/{options-iMpRRxIe.d.mts.map → options-COXGTtqd.d.mts.map} +1 -1
- package/dist/page/index.d.mts +2 -2
- package/dist/{parse-GmjecGct.mjs → parse-GLksnn-B.mjs} +2 -2
- package/dist/{parse-GmjecGct.mjs.map → parse-GLksnn-B.mjs.map} +1 -1
- package/dist/{passkey-config-De0ahnRg.mjs → passkey-config-CjA1UbDj.mjs} +1 -1
- package/dist/{passkey-config-De0ahnRg.mjs.map → passkey-config-CjA1UbDj.mjs.map} +1 -1
- package/dist/{patterns-BKmjvM7K.mjs → patterns-CiyXeDgr.mjs} +1 -1
- package/dist/{patterns-BKmjvM7K.mjs.map → patterns-CiyXeDgr.mjs.map} +1 -1
- package/dist/{placeholder-BSKwzRe4.d.mts → placeholder-DR-eeZr-.d.mts} +1 -1
- package/dist/{placeholder-BSKwzRe4.d.mts.map → placeholder-DR-eeZr-.d.mts.map} +1 -1
- package/dist/plugin-types.d.mts +1 -1
- package/dist/plugin-utils.d.mts +11 -10
- package/dist/plugin-utils.d.mts.map +1 -1
- package/dist/plugins/adapt-sandbox-entry.d.mts +11 -10
- package/dist/plugins/adapt-sandbox-entry.d.mts.map +1 -1
- package/dist/plugins/adapt-sandbox-entry.mjs +2 -2
- package/dist/{portable-text-cCa0cGV6.mjs → portable-text-BAkgEKcv.mjs} +1 -1
- package/dist/{portable-text-cCa0cGV6.mjs.map → portable-text-BAkgEKcv.mjs.map} +1 -1
- package/dist/{preview-SSXNVPAC.mjs → preview-Rloa09Wp.mjs} +2 -2
- package/dist/{preview-SSXNVPAC.mjs.map → preview-Rloa09Wp.mjs.map} +1 -1
- package/dist/{public-url-Danv47cS.mjs → public-url-C0cEvrRu.mjs} +1 -1
- package/dist/{public-url-Danv47cS.mjs.map → public-url-C0cEvrRu.mjs.map} +1 -1
- package/dist/{schema-Blhoxp3P.mjs → query-BxT95opY.mjs} +5 -10
- package/dist/query-BxT95opY.mjs.map +1 -0
- package/dist/{query-ByGq6ver.mjs → query-ZzvXyxWq.mjs} +15 -15
- package/dist/query-ZzvXyxWq.mjs.map +1 -0
- package/dist/{rate-limit-C_Lf63Dd.mjs → rate-limit-Cg4Rvc_-.mjs} +2 -2
- package/dist/{rate-limit-C_Lf63Dd.mjs.map → rate-limit-Cg4Rvc_-.mjs.map} +1 -1
- package/dist/{redirect-CoW3G-0U.mjs → redirect-Ce_6Yb6z.mjs} +1 -1
- package/dist/{redirect-CoW3G-0U.mjs.map → redirect-Ce_6Yb6z.mjs.map} +1 -1
- package/dist/{redirect-IyfNirgS.mjs → redirect-Ch3E98qZ.mjs} +4 -4
- package/dist/{redirect-IyfNirgS.mjs.map → redirect-Ch3E98qZ.mjs.map} +1 -1
- package/dist/{redirects-Bs1g42Ri.mjs → redirects-CXmVGRNZ.mjs} +6 -6
- package/dist/{redirects-Bs1g42Ri.mjs.map → redirects-CXmVGRNZ.mjs.map} +1 -1
- package/dist/{redirects-DXEXBAII.mjs → redirects-CeD7K7EX.mjs} +43 -5
- package/dist/redirects-CeD7K7EX.mjs.map +1 -0
- package/dist/{registry-B65mUtPa.mjs → registry-CyIXPi4E.mjs} +8 -8
- package/dist/{registry-B65mUtPa.mjs.map → registry-CyIXPi4E.mjs.map} +1 -1
- package/dist/relation-Ba68Tm4Z.mjs +334 -0
- package/dist/relation-Ba68Tm4Z.mjs.map +1 -0
- package/dist/{byline-fields-2Lp5Hbgf.mjs → relations-BmBmX4Eb.mjs} +60 -4
- package/dist/relations-BmBmX4Eb.mjs.map +1 -0
- package/dist/relations-C8hVyEy0.mjs +397 -0
- package/dist/relations-C8hVyEy0.mjs.map +1 -0
- package/dist/{byline-fields-Cgrt9-aL.d.mts → relations-CbBpoOys.d.mts} +180 -27
- package/dist/relations-CbBpoOys.d.mts.map +1 -0
- package/dist/{request-cache-KCNHp_RJ.mjs → request-cache-BSUptuJR.mjs} +1 -1
- package/dist/{request-cache-KCNHp_RJ.mjs.map → request-cache-BSUptuJR.mjs.map} +1 -1
- package/dist/{request-meta-DbvXaAvU.mjs → request-meta-DCwktC5P.mjs} +2 -2
- package/dist/{request-meta-DbvXaAvU.mjs.map → request-meta-DCwktC5P.mjs.map} +1 -1
- package/dist/{resolve-DR3wqMTy.mjs → resolve-Cd9dzclN.mjs} +1 -1
- package/dist/{resolve-DR3wqMTy.mjs.map → resolve-Cd9dzclN.mjs.map} +1 -1
- package/dist/{runner-DvFWoz8-.d.mts → runner-CiNdIk3y.d.mts} +8 -2
- package/dist/runner-CiNdIk3y.d.mts.map +1 -0
- package/dist/{runner-K8XK101B.mjs → runner-jt65bF7F.mjs} +24 -7
- package/dist/{runner-K8XK101B.mjs.map → runner-jt65bF7F.mjs.map} +1 -1
- package/dist/runtime.d.mts +12 -11
- package/dist/runtime.d.mts.map +1 -1
- package/dist/runtime.mjs +4 -4
- package/dist/{scheduled-publish-Drffrf2a.d.mts → scheduled-publish-DlJHGcuL.d.mts} +1 -1
- package/dist/scheduled-publish-DlJHGcuL.d.mts.map +1 -0
- package/dist/schema-DwjufZ1S.mjs +9 -0
- package/dist/schema-DwjufZ1S.mjs.map +1 -0
- package/dist/{search-DZN2HZ-V.mjs → search-Cl875CVE.mjs} +62 -12
- package/dist/search-Cl875CVE.mjs.map +1 -0
- package/dist/{secrets-kp760LlD.mjs → secrets-CO_bEmII.mjs} +4 -4
- package/dist/{secrets-kp760LlD.mjs.map → secrets-CO_bEmII.mjs.map} +1 -1
- package/dist/{sections-CpF5SaGr.mjs → sections-DTKzgoiS.mjs} +3 -3
- package/dist/{sections-CpF5SaGr.mjs.map → sections-DTKzgoiS.mjs.map} +1 -1
- package/dist/seed/index.d.mts +2 -2
- package/dist/seed/index.mjs +23 -23
- package/dist/seo/index.d.mts +4 -2
- package/dist/seo/index.d.mts.map +1 -1
- package/dist/seo/index.mjs +19 -2
- package/dist/seo/index.mjs.map +1 -1
- package/dist/{seo-DXu2UQnC.mjs → seo-BLm6SXzS.mjs} +2 -2
- package/dist/{seo-DXu2UQnC.mjs.map → seo-BLm6SXzS.mjs.map} +1 -1
- package/dist/{seo-89-53DDs.mjs → seo-BjrbXAd_.mjs} +1 -1
- package/dist/{seo-89-53DDs.mjs.map → seo-BjrbXAd_.mjs.map} +1 -1
- package/dist/{service-DQmiBMzt.mjs → service-D6zDmKXy.mjs} +3 -3
- package/dist/{service-DQmiBMzt.mjs.map → service-D6zDmKXy.mjs.map} +1 -1
- package/dist/{session-user-Cascbax7.mjs → session-user-DoSs6YM8.mjs} +1 -1
- package/dist/{session-user-Cascbax7.mjs.map → session-user-DoSs6YM8.mjs.map} +1 -1
- package/dist/{settings-zhmdKyJQ.mjs → settings-BuQYvLfy.mjs} +6 -6
- package/dist/{settings-zhmdKyJQ.mjs.map → settings-BuQYvLfy.mjs.map} +1 -1
- package/dist/{settings-rZyHEcNT.mjs → settings-CmS3TwXf.mjs} +3 -3
- package/dist/{settings-rZyHEcNT.mjs.map → settings-CmS3TwXf.mjs.map} +1 -1
- package/dist/{setup-complete-Cb3LRyzy.mjs → setup-complete-BPNgLHlU.mjs} +2 -2
- package/dist/{setup-complete-Cb3LRyzy.mjs.map → setup-complete-BPNgLHlU.mjs.map} +1 -1
- package/dist/{setup-nonce-Z8x0tHf8.mjs → setup-nonce-DEPZX96T.mjs} +1 -1
- package/dist/{setup-nonce-Z8x0tHf8.mjs.map → setup-nonce-DEPZX96T.mjs.map} +1 -1
- package/dist/{single-flight-cache-BG3B_GhN.mjs → single-flight-cache-DEtW-OEG.mjs} +2 -2
- package/dist/{single-flight-cache-BG3B_GhN.mjs.map → single-flight-cache-DEtW-OEG.mjs.map} +1 -1
- package/dist/{site-url-BBfDTgZB.mjs → site-url-CcLy5D5s.mjs} +2 -2
- package/dist/{site-url-BBfDTgZB.mjs.map → site-url-CcLy5D5s.mjs.map} +1 -1
- package/dist/{slugify-Cce3dTdg.mjs → slugify-C_tqlU4G.mjs} +1 -1
- package/dist/{slugify-Cce3dTdg.mjs.map → slugify-C_tqlU4G.mjs.map} +1 -1
- package/dist/{ssrf-1g7usGBg.mjs → ssrf-TrKYJAy0.mjs} +1 -1
- package/dist/{ssrf-1g7usGBg.mjs.map → ssrf-TrKYJAy0.mjs.map} +1 -1
- package/dist/{status-CqJQX1QN.mjs → status-D3Gy1Zc6.mjs} +1 -1
- package/dist/{status-CqJQX1QN.mjs.map → status-D3Gy1Zc6.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 +1 -1
- package/dist/{taxonomies-BGBd16Eu.mjs → taxonomies-ClS4RKaZ.mjs} +13 -9
- package/dist/taxonomies-ClS4RKaZ.mjs.map +1 -0
- package/dist/{taxonomies-Cnb4F-Pb.mjs → taxonomies-pUkuD6nj.mjs} +115 -36
- package/dist/taxonomies-pUkuD6nj.mjs.map +1 -0
- package/dist/{taxonomy-BxGxZZdu.mjs → taxonomy-BkxbUMSw.mjs} +12 -3
- package/dist/{taxonomy-BxGxZZdu.mjs.map → taxonomy-BkxbUMSw.mjs.map} +1 -1
- package/dist/{tokens-BGT0TUUo.mjs → tokens-BV6fgl5A.mjs} +2 -2
- package/dist/{tokens-BGT0TUUo.mjs.map → tokens-BV6fgl5A.mjs.map} +1 -1
- package/dist/{transaction-qfqpPVpu.mjs → transaction-D0FOsb3X.mjs} +1 -1
- package/dist/{transaction-qfqpPVpu.mjs.map → transaction-D0FOsb3X.mjs.map} +1 -1
- package/dist/{transport-DPefPMcz.mjs → transport-DTFhhPOg.mjs} +1 -1
- package/dist/{transport-DPefPMcz.mjs.map → transport-DTFhhPOg.mjs.map} +1 -1
- package/dist/{transport-BMDWHSgZ.d.mts → transport-DmlmzD2U.d.mts} +1 -1
- package/dist/{transport-BMDWHSgZ.d.mts.map → transport-DmlmzD2U.d.mts.map} +1 -1
- package/dist/{trusted-proxy-VTPRiX2s.mjs → trusted-proxy-CSgZVESw.mjs} +1 -1
- package/dist/{trusted-proxy-VTPRiX2s.mjs.map → trusted-proxy-CSgZVESw.mjs.map} +1 -1
- package/dist/{types-CgvhU-hF.d.mts → types-B6-N9cBB.d.mts} +1 -1
- package/dist/{types-CgvhU-hF.d.mts.map → types-B6-N9cBB.d.mts.map} +1 -1
- package/dist/{types-g_aFIdW0.d.mts → types-BCVuUPrL.d.mts} +1 -1
- package/dist/{types-g_aFIdW0.d.mts.map → types-BCVuUPrL.d.mts.map} +1 -1
- package/dist/{types-Jo3UYd6b.mjs → types-BNZsPL9z.mjs} +1 -1
- package/dist/{types-Jo3UYd6b.mjs.map → types-BNZsPL9z.mjs.map} +1 -1
- package/dist/{types-vgEWF18A.d.mts → types-B_pmP7Yq.d.mts} +1 -1
- package/dist/{types-vgEWF18A.d.mts.map → types-B_pmP7Yq.d.mts.map} +1 -1
- package/dist/{types-CuW0zWDA.mjs → types-Ch8pFMEm.mjs} +3 -3
- package/dist/{types-CuW0zWDA.mjs.map → types-Ch8pFMEm.mjs.map} +1 -1
- package/dist/{types-ea9sAPck.d.mts → types-Cm4Cz-8M.d.mts} +1 -1
- package/dist/{types-ea9sAPck.d.mts.map → types-Cm4Cz-8M.d.mts.map} +1 -1
- package/dist/{types-CGbYowGQ.d.mts → types-CtDVagM4.d.mts} +55 -3
- package/dist/types-CtDVagM4.d.mts.map +1 -0
- package/dist/{types-BcLUUbbR.d.mts → types-DLIrNtv5.d.mts} +11 -3
- package/dist/{types-BcLUUbbR.d.mts.map → types-DLIrNtv5.d.mts.map} +1 -1
- package/dist/{types-DmHk7vAt.d.mts → types-QnlQIyPE.d.mts} +1 -1
- package/dist/{types-DmHk7vAt.d.mts.map → types-QnlQIyPE.d.mts.map} +1 -1
- package/dist/{types-_HFLRzTn.d.mts → types-momGysZk.d.mts} +1 -1
- package/dist/{types-_HFLRzTn.d.mts.map → types-momGysZk.d.mts.map} +1 -1
- package/dist/{types-tM44hEcf.mjs → types-o7xo7VgH.mjs} +1 -1
- package/dist/{types-tM44hEcf.mjs.map → types-o7xo7VgH.mjs.map} +1 -1
- package/dist/{types-ClUkdbWb.d.mts → types-qljd1hsL.d.mts} +1 -1
- package/dist/{types-ClUkdbWb.d.mts.map → types-qljd1hsL.d.mts.map} +1 -1
- package/dist/{user-BjAOvU3Z.mjs → user-DTxX_Fha.mjs} +3 -3
- package/dist/{user-BjAOvU3Z.mjs.map → user-DTxX_Fha.mjs.map} +1 -1
- package/dist/{utils-BJXElxdw.mjs → utils-Cz8PVrl4.mjs} +3 -3
- package/dist/{utils-BJXElxdw.mjs.map → utils-Cz8PVrl4.mjs.map} +1 -1
- package/dist/{validate-Z1b86_3B.d.mts → validate-9jLuE301.d.mts} +5 -5
- package/dist/{validate-Z1b86_3B.d.mts.map → validate-9jLuE301.d.mts.map} +1 -1
- package/dist/{validate-CWSnKVIJ.mjs → validate-C3CpWlNt.mjs} +3 -3
- package/dist/{validate-CWSnKVIJ.mjs.map → validate-C3CpWlNt.mjs.map} +1 -1
- package/dist/{validation-c8WjhH8z.mjs → validation-DM2K_NJC.mjs} +10 -10
- package/dist/{validation-c8WjhH8z.mjs.map → validation-DM2K_NJC.mjs.map} +1 -1
- package/dist/version-BlIJvNAZ.mjs +7 -0
- package/dist/{version-CaccU7DM.mjs.map → version-BlIJvNAZ.mjs.map} +1 -1
- package/dist/{widgets-hWcIicX8.mjs → widgets-B_X6_UXJ.mjs} +4 -4
- package/dist/{widgets-hWcIicX8.mjs.map → widgets-B_X6_UXJ.mjs.map} +1 -1
- package/dist/{wxr-taxonomies-BC3OYpvx.mjs → wxr-taxonomies-oNJB2S81.mjs} +4 -4
- package/dist/{wxr-taxonomies-BC3OYpvx.mjs.map → wxr-taxonomies-oNJB2S81.mjs.map} +1 -1
- package/dist/{wxr-taxonomies-0_uxSrmf.d.mts → wxr-taxonomies-tADW4KTa.d.mts} +1 -1
- package/dist/{wxr-taxonomies-0_uxSrmf.d.mts.map → wxr-taxonomies-tADW4KTa.d.mts.map} +1 -1
- package/dist/{zod-generator-CacrR-i8.mjs → zod-generator-CrfV79De.mjs} +3 -3
- package/dist/{zod-generator-CacrR-i8.mjs.map → zod-generator-CrfV79De.mjs.map} +1 -1
- package/package.json +11 -7
- package/src/api/errors.ts +11 -0
- package/src/api/handlers/content.ts +111 -1
- package/src/api/handlers/dashboard.ts +2 -0
- package/src/api/handlers/index.ts +6 -0
- package/src/api/handlers/media-usage.ts +80 -0
- package/src/api/handlers/relations.ts +474 -0
- package/src/api/handlers/taxonomies.ts +26 -4
- package/src/api/handlers/validate-media-fields.ts +1 -1
- package/src/api/openapi/document.ts +25 -0
- package/src/api/parse.ts +1 -1
- package/src/api/schemas/comments.ts +6 -0
- package/src/api/schemas/content.ts +8 -0
- package/src/api/schemas/index.ts +2 -0
- package/src/api/schemas/media-usage.ts +48 -0
- package/src/api/schemas/relations.ts +109 -0
- package/src/api/schemas/search.ts +1 -0
- package/src/astro/integration/index.ts +1 -0
- package/src/astro/integration/routes.ts +5 -0
- package/src/astro/integration/runtime.ts +24 -0
- package/src/astro/middleware/request-context.ts +162 -20
- package/src/astro/middleware.ts +22 -9
- package/src/astro/routes/api/admin/comments/[id]/status.ts +1 -2
- package/src/astro/routes/api/admin/comments/index.ts +1 -2
- package/src/astro/routes/api/admin/media-usage/repair.ts +24 -0
- package/src/astro/routes/api/auth/oauth/[provider]/callback.ts +1 -2
- package/src/astro/routes/api/auth/oauth/[provider].ts +1 -2
- package/src/astro/routes/api/comments/[collection]/[contentId]/index.ts +13 -0
- package/src/astro/routes/api/content/[collection]/[id]/references/[relation]/children.ts +97 -0
- package/src/astro/routes/api/content/[collection]/[id]/references/[relation]/parents.ts +48 -0
- package/src/astro/routes/api/plugins/[pluginId]/[...path].ts +17 -15
- package/src/astro/routes/api/relations/[id]/index.ts +84 -0
- package/src/astro/routes/api/relations/[id]/translations.ts +33 -0
- package/src/astro/routes/api/relations/index.ts +56 -0
- package/src/astro/routes/api/schema/collections/[slug]/fields/[fieldSlug].ts +1 -7
- package/src/astro/routes/api/schema/collections/[slug]/fields/index.ts +1 -2
- package/src/astro/routes/api/search/index.ts +2 -0
- package/src/astro/types.ts +2 -0
- package/src/cli/commands/export-seed.ts +1 -10
- package/src/client/index.ts +39 -0
- package/src/comments/service.ts +1 -1
- package/src/comments/turnstile.ts +64 -0
- package/src/components/BlockquoteGroup.astro +34 -0
- package/src/components/CommentForm.astro +12 -5
- package/src/components/EmDashHead.astro +27 -1
- package/src/components/InlinePortableTextEditor.tsx +34 -0
- package/src/components/PortableText.astro +7 -1
- package/src/components/index.ts +2 -0
- package/src/components/portable-text-blockquote-group.ts +68 -0
- package/src/content/converters/portable-text-to-prosemirror.ts +32 -1
- package/src/database/dialect-helpers.ts +34 -0
- package/src/database/migrations/039_fix_fts5_triggers.ts +1 -1
- package/src/database/migrations/runner.ts +46 -6
- package/src/database/pg-migration-lock.ts +72 -0
- package/src/database/repositories/comment.ts +1 -1
- package/src/database/repositories/content.ts +172 -21
- package/src/database/repositories/media-usage.ts +25 -3
- package/src/database/repositories/media.ts +1 -1
- package/src/database/repositories/relation.ts +130 -5
- package/src/database/repositories/taxonomy.ts +9 -0
- package/src/database/repositories/types.ts +8 -0
- package/src/db/postgres.ts +5 -2
- package/src/emdash-runtime.ts +72 -4
- package/src/index.ts +6 -2
- package/src/loader.ts +1 -31
- package/src/mcp/server.ts +29 -3
- package/src/media/usage/content-repair.ts +206 -22
- package/src/media/usage/content-snapshots.ts +4 -0
- package/src/plugins/context.ts +85 -0
- package/src/plugins/define-plugin.ts +1 -0
- package/src/plugins/index.ts +4 -0
- package/src/plugins/manifest-schema.ts +2 -0
- package/src/plugins/types.ts +59 -0
- package/src/schema/byline-registry.ts +1 -1
- package/src/search/fts-manager.ts +34 -0
- package/src/search/match.ts +50 -0
- package/src/search/query.ts +94 -9
- package/src/seo/hreflang.ts +192 -0
- package/src/seo/index.ts +3 -0
- package/src/taxonomies/index.ts +62 -45
- package/src/taxonomies/term-counts.ts +117 -0
- package/src/virtual-modules.d.ts +1 -0
- package/src/visual-editing/editable.ts +41 -35
- package/src/visual-editing/toolbar-bootstrap.ts +120 -0
- package/src/visual-editing/toolbar.ts +46 -0
- package/dist/api-BFURZn1i.mjs.map +0 -1
- package/dist/byline-fields-2Lp5Hbgf.mjs.map +0 -1
- package/dist/byline-fields-Cgrt9-aL.d.mts.map +0 -1
- package/dist/content-DhgEth4k.mjs.map +0 -1
- package/dist/content-refresh-CA4uKwzH.mjs.map +0 -1
- package/dist/context-CUsR9dXL.mjs.map +0 -1
- package/dist/dashboard-EvEKF5en.mjs.map +0 -1
- package/dist/dialect-helpers-DRI5pyY3.mjs.map +0 -1
- package/dist/error-CkAseSqZ.mjs.map +0 -1
- package/dist/index-B9sIxwe4.d.mts.map +0 -1
- package/dist/loader-CB6YHeul.mjs.map +0 -1
- package/dist/manifest-schema-BHlgZM1W.mjs.map +0 -1
- package/dist/media-BrXIaMFN.mjs.map +0 -1
- package/dist/menus-CsZ2ZEK2.mjs.map +0 -1
- package/dist/query-ByGq6ver.mjs.map +0 -1
- package/dist/redirects-DXEXBAII.mjs.map +0 -1
- package/dist/runner-DvFWoz8-.d.mts.map +0 -1
- package/dist/scheduled-publish-Drffrf2a.d.mts.map +0 -1
- package/dist/schema-Blhoxp3P.mjs.map +0 -1
- package/dist/search-DZN2HZ-V.mjs.map +0 -1
- package/dist/taxonomies-BGBd16Eu.mjs.map +0 -1
- package/dist/taxonomies-Cnb4F-Pb.mjs.map +0 -1
- package/dist/types-CGbYowGQ.d.mts.map +0 -1
- package/dist/version-CaccU7DM.mjs +0 -7
- /package/dist/{api-tokens-DsvvCtdh.mjs → api-tokens-Dk2GrJMY.mjs} +0 -0
- /package/dist/{ssrf-CmuGgCq3.mjs → ssrf-B5DOv5E5.mjs} +0 -0
- /package/dist/{types-DROWRxYV.mjs → types-DeCZBZxn.mjs} +0 -0
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Content-entry reference children endpoint (parent side)
|
|
3
|
+
*
|
|
4
|
+
* GET /_emdash/api/content/:collection/:id/references/:relation/children
|
|
5
|
+
* POST /_emdash/api/content/:collection/:id/references/:relation/children
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { hasPermission } from "@emdash-cms/auth";
|
|
9
|
+
import type { APIRoute } from "astro";
|
|
10
|
+
|
|
11
|
+
import { requireOwnerPerm, requirePerm } from "#api/authorize.js";
|
|
12
|
+
import { apiError, handleError, requireDb, unwrapResult } from "#api/error.js";
|
|
13
|
+
import { handleReferenceChildrenGet, handleReferenceChildrenSet } from "#api/handlers/relations.js";
|
|
14
|
+
import { isParseError, parseBody, parseQuery } from "#api/parse.js";
|
|
15
|
+
import { cursorPaginationQuery, setReferenceChildrenBody } from "#api/schemas.js";
|
|
16
|
+
import { ContentRepository } from "#db/repositories/content.js";
|
|
17
|
+
|
|
18
|
+
export const prerender = false;
|
|
19
|
+
|
|
20
|
+
export const GET: APIRoute = async ({ params, request, locals }) => {
|
|
21
|
+
const { emdash, user } = locals;
|
|
22
|
+
const { collection, id, relation } = params;
|
|
23
|
+
|
|
24
|
+
const denied = requirePerm(user, "content:read");
|
|
25
|
+
if (denied) return denied;
|
|
26
|
+
|
|
27
|
+
if (!collection || !id || !relation) {
|
|
28
|
+
return apiError("VALIDATION_ERROR", "Collection, id, and relation required", 400);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const dbErr = requireDb(emdash?.db);
|
|
32
|
+
if (dbErr) return dbErr;
|
|
33
|
+
|
|
34
|
+
const query = parseQuery(new URL(request.url), cursorPaginationQuery);
|
|
35
|
+
if (isParseError(query)) return query;
|
|
36
|
+
|
|
37
|
+
try {
|
|
38
|
+
const result = await handleReferenceChildrenGet(
|
|
39
|
+
emdash.db,
|
|
40
|
+
collection,
|
|
41
|
+
id,
|
|
42
|
+
relation,
|
|
43
|
+
{ limit: query.limit, cursor: query.cursor },
|
|
44
|
+
hasPermission(user, "content:read_drafts"),
|
|
45
|
+
);
|
|
46
|
+
return unwrapResult(result);
|
|
47
|
+
} catch (error) {
|
|
48
|
+
return handleError(error, "Failed to get references", "REFERENCES_GET_ERROR");
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export const POST: APIRoute = async ({ params, request, locals }) => {
|
|
53
|
+
const { emdash, user } = locals;
|
|
54
|
+
const { collection, id, relation } = params;
|
|
55
|
+
|
|
56
|
+
if (!collection || !id || !relation) {
|
|
57
|
+
return apiError("VALIDATION_ERROR", "Collection, id, and relation required", 400);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Gate on the base edit capability BEFORE the existence lookup. Resolving the
|
|
61
|
+
// entry first would let a user with no edit permission distinguish real ids
|
|
62
|
+
// (403) from missing ids (404) — an existence oracle. Mirrors the taxonomy
|
|
63
|
+
// edge POST, which checks `content:edit_own` before fetching the entry.
|
|
64
|
+
const denied = requirePerm(user, "content:edit_own");
|
|
65
|
+
if (denied) return denied;
|
|
66
|
+
|
|
67
|
+
const dbErr = requireDb(emdash?.db);
|
|
68
|
+
if (dbErr) return dbErr;
|
|
69
|
+
|
|
70
|
+
// Resolve the parent entry to gate on its author (ownership-aware write).
|
|
71
|
+
const parent = await new ContentRepository(emdash.db).findByIdOrSlug(collection, id);
|
|
72
|
+
if (!parent) return apiError("NOT_FOUND", "Content not found", 404);
|
|
73
|
+
|
|
74
|
+
const editDenied = requireOwnerPerm(
|
|
75
|
+
user,
|
|
76
|
+
parent.authorId ?? "",
|
|
77
|
+
"content:edit_own",
|
|
78
|
+
"content:edit_any",
|
|
79
|
+
);
|
|
80
|
+
if (editDenied) return editDenied;
|
|
81
|
+
|
|
82
|
+
try {
|
|
83
|
+
const body = await parseBody(request, setReferenceChildrenBody);
|
|
84
|
+
if (isParseError(body)) return body;
|
|
85
|
+
|
|
86
|
+
const result = await handleReferenceChildrenSet(
|
|
87
|
+
emdash.db,
|
|
88
|
+
collection,
|
|
89
|
+
id,
|
|
90
|
+
relation,
|
|
91
|
+
body.childIds,
|
|
92
|
+
);
|
|
93
|
+
return unwrapResult(result);
|
|
94
|
+
} catch (error) {
|
|
95
|
+
return handleError(error, "Failed to set references", "REFERENCES_SET_ERROR");
|
|
96
|
+
}
|
|
97
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Content-entry reference parents endpoint (child side, read-only backlink)
|
|
3
|
+
*
|
|
4
|
+
* GET /_emdash/api/content/:collection/:id/references/:relation/parents
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { hasPermission } from "@emdash-cms/auth";
|
|
8
|
+
import type { APIRoute } from "astro";
|
|
9
|
+
|
|
10
|
+
import { requirePerm } from "#api/authorize.js";
|
|
11
|
+
import { apiError, handleError, requireDb, unwrapResult } from "#api/error.js";
|
|
12
|
+
import { handleReferenceParentsGet } from "#api/handlers/relations.js";
|
|
13
|
+
import { isParseError, parseQuery } from "#api/parse.js";
|
|
14
|
+
import { cursorPaginationQuery } from "#api/schemas.js";
|
|
15
|
+
|
|
16
|
+
export const prerender = false;
|
|
17
|
+
|
|
18
|
+
export const GET: APIRoute = async ({ params, request, locals }) => {
|
|
19
|
+
const { emdash, user } = locals;
|
|
20
|
+
const { collection, id, relation } = params;
|
|
21
|
+
|
|
22
|
+
const denied = requirePerm(user, "content:read");
|
|
23
|
+
if (denied) return denied;
|
|
24
|
+
|
|
25
|
+
if (!collection || !id || !relation) {
|
|
26
|
+
return apiError("VALIDATION_ERROR", "Collection, id, and relation required", 400);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const dbErr = requireDb(emdash?.db);
|
|
30
|
+
if (dbErr) return dbErr;
|
|
31
|
+
|
|
32
|
+
const query = parseQuery(new URL(request.url), cursorPaginationQuery);
|
|
33
|
+
if (isParseError(query)) return query;
|
|
34
|
+
|
|
35
|
+
try {
|
|
36
|
+
const result = await handleReferenceParentsGet(
|
|
37
|
+
emdash.db,
|
|
38
|
+
collection,
|
|
39
|
+
id,
|
|
40
|
+
relation,
|
|
41
|
+
{ limit: query.limit, cursor: query.cursor },
|
|
42
|
+
hasPermission(user, "content:read_drafts"),
|
|
43
|
+
);
|
|
44
|
+
return unwrapResult(result);
|
|
45
|
+
} catch (error) {
|
|
46
|
+
return handleError(error, "Failed to get references", "REFERENCES_GET_ERROR");
|
|
47
|
+
}
|
|
48
|
+
};
|
|
@@ -39,11 +39,16 @@ const handleRequest: APIRoute = async ({ params, request, locals }) => {
|
|
|
39
39
|
|
|
40
40
|
// Public routes skip auth, CSRF, and scope checks entirely
|
|
41
41
|
if (!routeMeta.public) {
|
|
42
|
-
//
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
42
|
+
// Plugin routes are dispatched by name only — the HTTP method never
|
|
43
|
+
// selects a different handler, so a route reached via GET or HEAD runs
|
|
44
|
+
// exactly the same code (and side effects) as one reached via POST.
|
|
45
|
+
// Method-based tiering is therefore unsafe: gating GET/HEAD/OPTIONS on
|
|
46
|
+
// `plugins:read` with no CSRF let an editor (or a cross-origin page,
|
|
47
|
+
// since HEAD is CORS-safe) invoke a mutating admin route by choosing the
|
|
48
|
+
// method (#1853). Astro also dispatches HEAD to the GET export, so no
|
|
49
|
+
// explicit HEAD handler is needed to reach a "GET" route. Gate every
|
|
50
|
+
// private invocation on `plugins:manage` + CSRF regardless of method.
|
|
51
|
+
const denied = requirePerm(user, "plugins:manage");
|
|
47
52
|
if (denied) return denied;
|
|
48
53
|
|
|
49
54
|
// Token scope enforcement — plugin routes require "admin" scope.
|
|
@@ -51,16 +56,13 @@ const handleRequest: APIRoute = async ({ params, request, locals }) => {
|
|
|
51
56
|
const scopeError = requireScope(locals, "admin");
|
|
52
57
|
if (scopeError) return scopeError;
|
|
53
58
|
|
|
54
|
-
// CSRF protection
|
|
55
|
-
//
|
|
56
|
-
//
|
|
57
|
-
//
|
|
58
|
-
//
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
!locals.tokenScopes &&
|
|
62
|
-
request.headers.get("X-EmDash-Request") !== "1"
|
|
63
|
-
) {
|
|
59
|
+
// CSRF protection on private routes. Plugin routes use soft auth in the
|
|
60
|
+
// middleware (user resolved but not required), so the middleware's CSRF
|
|
61
|
+
// check doesn't run — enforce it here. Applied to every method because
|
|
62
|
+
// any method can trigger a state change (see above). Token-authed
|
|
63
|
+
// requests (which set tokenScopes) are exempt — tokens aren't ambient
|
|
64
|
+
// credentials like cookies.
|
|
65
|
+
if (!locals.tokenScopes && request.headers.get("X-EmDash-Request") !== "1") {
|
|
64
66
|
return apiError("CSRF_REJECTED", "Missing required header", 403);
|
|
65
67
|
}
|
|
66
68
|
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Single relation definition endpoint
|
|
3
|
+
*
|
|
4
|
+
* GET /_emdash/api/relations/:id - Get a relation
|
|
5
|
+
* PATCH /_emdash/api/relations/:id - Update a relation's labels
|
|
6
|
+
* DELETE /_emdash/api/relations/:id - Delete a relation
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import type { APIRoute } from "astro";
|
|
10
|
+
|
|
11
|
+
import { requirePerm } from "#api/authorize.js";
|
|
12
|
+
import { apiError, handleError, requireDb, unwrapResult } from "#api/error.js";
|
|
13
|
+
import {
|
|
14
|
+
handleRelationDelete,
|
|
15
|
+
handleRelationGet,
|
|
16
|
+
handleRelationUpdate,
|
|
17
|
+
} from "#api/handlers/relations.js";
|
|
18
|
+
import { isParseError, parseBody } from "#api/parse.js";
|
|
19
|
+
import { updateRelationBody } from "#api/schemas.js";
|
|
20
|
+
|
|
21
|
+
export const prerender = false;
|
|
22
|
+
|
|
23
|
+
export const GET: APIRoute = async ({ params, locals }) => {
|
|
24
|
+
const { emdash, user } = locals;
|
|
25
|
+
const { id } = params;
|
|
26
|
+
|
|
27
|
+
const dbErr = requireDb(emdash?.db);
|
|
28
|
+
if (dbErr) return dbErr;
|
|
29
|
+
|
|
30
|
+
const denied = requirePerm(user, "schema:read");
|
|
31
|
+
if (denied) return denied;
|
|
32
|
+
|
|
33
|
+
if (!id) return apiError("VALIDATION_ERROR", "Relation id required", 400);
|
|
34
|
+
|
|
35
|
+
try {
|
|
36
|
+
const result = await handleRelationGet(emdash.db, id);
|
|
37
|
+
return unwrapResult(result);
|
|
38
|
+
} catch (error) {
|
|
39
|
+
return handleError(error, "Failed to get relation", "RELATION_GET_ERROR");
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export const PATCH: APIRoute = async ({ params, request, locals }) => {
|
|
44
|
+
const { emdash, user } = locals;
|
|
45
|
+
const { id } = params;
|
|
46
|
+
|
|
47
|
+
const dbErr = requireDb(emdash?.db);
|
|
48
|
+
if (dbErr) return dbErr;
|
|
49
|
+
|
|
50
|
+
const denied = requirePerm(user, "schema:manage");
|
|
51
|
+
if (denied) return denied;
|
|
52
|
+
|
|
53
|
+
if (!id) return apiError("VALIDATION_ERROR", "Relation id required", 400);
|
|
54
|
+
|
|
55
|
+
try {
|
|
56
|
+
const body = await parseBody(request, updateRelationBody);
|
|
57
|
+
if (isParseError(body)) return body;
|
|
58
|
+
|
|
59
|
+
const result = await handleRelationUpdate(emdash.db, id, body);
|
|
60
|
+
return unwrapResult(result);
|
|
61
|
+
} catch (error) {
|
|
62
|
+
return handleError(error, "Failed to update relation", "RELATION_UPDATE_ERROR");
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export const DELETE: APIRoute = async ({ params, locals }) => {
|
|
67
|
+
const { emdash, user } = locals;
|
|
68
|
+
const { id } = params;
|
|
69
|
+
|
|
70
|
+
const dbErr = requireDb(emdash?.db);
|
|
71
|
+
if (dbErr) return dbErr;
|
|
72
|
+
|
|
73
|
+
const denied = requirePerm(user, "schema:manage");
|
|
74
|
+
if (denied) return denied;
|
|
75
|
+
|
|
76
|
+
if (!id) return apiError("VALIDATION_ERROR", "Relation id required", 400);
|
|
77
|
+
|
|
78
|
+
try {
|
|
79
|
+
const result = await handleRelationDelete(emdash.db, id);
|
|
80
|
+
return unwrapResult(result);
|
|
81
|
+
} catch (error) {
|
|
82
|
+
return handleError(error, "Failed to delete relation", "RELATION_DELETE_ERROR");
|
|
83
|
+
}
|
|
84
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Relation translations endpoint
|
|
3
|
+
*
|
|
4
|
+
* GET /_emdash/api/relations/:id/translations - List locale siblings of a relation
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import type { APIRoute } from "astro";
|
|
8
|
+
|
|
9
|
+
import { requirePerm } from "#api/authorize.js";
|
|
10
|
+
import { apiError, handleError, requireDb, unwrapResult } from "#api/error.js";
|
|
11
|
+
import { handleRelationTranslations } from "#api/handlers/relations.js";
|
|
12
|
+
|
|
13
|
+
export const prerender = false;
|
|
14
|
+
|
|
15
|
+
export const GET: APIRoute = async ({ params, locals }) => {
|
|
16
|
+
const { emdash, user } = locals;
|
|
17
|
+
const { id } = params;
|
|
18
|
+
|
|
19
|
+
const dbErr = requireDb(emdash?.db);
|
|
20
|
+
if (dbErr) return dbErr;
|
|
21
|
+
|
|
22
|
+
const denied = requirePerm(user, "schema:read");
|
|
23
|
+
if (denied) return denied;
|
|
24
|
+
|
|
25
|
+
if (!id) return apiError("VALIDATION_ERROR", "Relation id required", 400);
|
|
26
|
+
|
|
27
|
+
try {
|
|
28
|
+
const result = await handleRelationTranslations(emdash.db, id);
|
|
29
|
+
return unwrapResult(result);
|
|
30
|
+
} catch (error) {
|
|
31
|
+
return handleError(error, "Failed to get translations", "RELATION_TRANSLATIONS_ERROR");
|
|
32
|
+
}
|
|
33
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Relation definitions endpoint
|
|
3
|
+
*
|
|
4
|
+
* GET /_emdash/api/relations[?locale=xx] - List relation definitions
|
|
5
|
+
* POST /_emdash/api/relations - Create a relation definition
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import type { APIRoute } from "astro";
|
|
9
|
+
|
|
10
|
+
import { requirePerm } from "#api/authorize.js";
|
|
11
|
+
import { handleError, requireDb, unwrapResult } from "#api/error.js";
|
|
12
|
+
import { handleRelationCreate, handleRelationList } from "#api/handlers/relations.js";
|
|
13
|
+
import { isParseError, parseBody, parseQuery } from "#api/parse.js";
|
|
14
|
+
import { createRelationBody, localeFilterQuery } from "#api/schemas.js";
|
|
15
|
+
|
|
16
|
+
export const prerender = false;
|
|
17
|
+
|
|
18
|
+
export const GET: APIRoute = async ({ request, locals }) => {
|
|
19
|
+
const { emdash, user } = locals;
|
|
20
|
+
|
|
21
|
+
const dbErr = requireDb(emdash?.db);
|
|
22
|
+
if (dbErr) return dbErr;
|
|
23
|
+
|
|
24
|
+
const denied = requirePerm(user, "schema:read");
|
|
25
|
+
if (denied) return denied;
|
|
26
|
+
|
|
27
|
+
const query = parseQuery(new URL(request.url), localeFilterQuery);
|
|
28
|
+
if (isParseError(query)) return query;
|
|
29
|
+
|
|
30
|
+
try {
|
|
31
|
+
const result = await handleRelationList(emdash.db, { locale: query.locale });
|
|
32
|
+
return unwrapResult(result);
|
|
33
|
+
} catch (error) {
|
|
34
|
+
return handleError(error, "Failed to list relations", "RELATION_LIST_ERROR");
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export const POST: APIRoute = async ({ request, locals }) => {
|
|
39
|
+
const { emdash, user } = locals;
|
|
40
|
+
|
|
41
|
+
const dbErr = requireDb(emdash?.db);
|
|
42
|
+
if (dbErr) return dbErr;
|
|
43
|
+
|
|
44
|
+
const denied = requirePerm(user, "schema:manage");
|
|
45
|
+
if (denied) return denied;
|
|
46
|
+
|
|
47
|
+
try {
|
|
48
|
+
const body = await parseBody(request, createRelationBody);
|
|
49
|
+
if (isParseError(body)) return body;
|
|
50
|
+
|
|
51
|
+
const result = await handleRelationCreate(emdash.db, body);
|
|
52
|
+
return unwrapResult(result, 201);
|
|
53
|
+
} catch (error) {
|
|
54
|
+
return handleError(error, "Failed to create relation", "RELATION_CREATE_ERROR");
|
|
55
|
+
}
|
|
56
|
+
};
|
|
@@ -17,7 +17,6 @@ import {
|
|
|
17
17
|
} from "#api/index.js";
|
|
18
18
|
import { parseBody, isParseError } from "#api/parse.js";
|
|
19
19
|
import { updateFieldBody } from "#api/schemas.js";
|
|
20
|
-
import type { UpdateFieldInput } from "#schema/types.js";
|
|
21
20
|
|
|
22
21
|
export const prerender = false;
|
|
23
22
|
|
|
@@ -51,12 +50,7 @@ export const PUT: APIRoute = async ({ params, request, locals }) => {
|
|
|
51
50
|
if (isParseError(body)) return body;
|
|
52
51
|
|
|
53
52
|
// eslint-disable-next-line typescript/no-unsafe-type-assertion -- body is Zod-validated via parseBody(request, updateFieldBody) above
|
|
54
|
-
const result = await handleSchemaFieldUpdate(
|
|
55
|
-
emdash.db,
|
|
56
|
-
collectionSlug,
|
|
57
|
-
fieldSlug,
|
|
58
|
-
body as UpdateFieldInput,
|
|
59
|
-
);
|
|
53
|
+
const result = await handleSchemaFieldUpdate(emdash.db, collectionSlug, fieldSlug, body);
|
|
60
54
|
return unwrapResult(result);
|
|
61
55
|
};
|
|
62
56
|
|
|
@@ -12,7 +12,6 @@ import { requireDb, unwrapResult } from "#api/error.js";
|
|
|
12
12
|
import { handleSchemaFieldList, handleSchemaFieldCreate } from "#api/index.js";
|
|
13
13
|
import { parseBody, isParseError } from "#api/parse.js";
|
|
14
14
|
import { createFieldBody } from "#api/schemas.js";
|
|
15
|
-
import type { CreateFieldInput } from "#schema/types.js";
|
|
16
15
|
|
|
17
16
|
export const prerender = false;
|
|
18
17
|
|
|
@@ -43,6 +42,6 @@ export const POST: APIRoute = async ({ params, request, locals }) => {
|
|
|
43
42
|
const body = await parseBody(request, createFieldBody);
|
|
44
43
|
if (isParseError(body)) return body;
|
|
45
44
|
|
|
46
|
-
const result = await handleSchemaFieldCreate(emdash.db, collectionSlug, body
|
|
45
|
+
const result = await handleSchemaFieldCreate(emdash.db, collectionSlug, body);
|
|
47
46
|
return unwrapResult(result, 201);
|
|
48
47
|
};
|
|
@@ -55,10 +55,12 @@ export const GET: APIRoute = async ({ url, locals }) => {
|
|
|
55
55
|
status,
|
|
56
56
|
locale: query.locale,
|
|
57
57
|
limit: query.limit,
|
|
58
|
+
cursor: query.cursor,
|
|
58
59
|
});
|
|
59
60
|
|
|
60
61
|
return apiSuccess(result);
|
|
61
62
|
} catch (error) {
|
|
63
|
+
// handleError maps a malformed pagination cursor to a 400 INVALID_CURSOR.
|
|
62
64
|
return handleError(error, "Search failed", "SEARCH_ERROR");
|
|
63
65
|
}
|
|
64
66
|
};
|
package/src/astro/types.ts
CHANGED
|
@@ -268,6 +268,7 @@ export interface EmDashHandlers {
|
|
|
268
268
|
bylines?: Array<{ bylineId: string; roleLabel?: string | null }>;
|
|
269
269
|
locale?: string;
|
|
270
270
|
translationOf?: string;
|
|
271
|
+
taxonomies?: Record<string, string[]>;
|
|
271
272
|
createdAt?: string | null;
|
|
272
273
|
publishedAt?: string | null;
|
|
273
274
|
},
|
|
@@ -290,6 +291,7 @@ export interface EmDashHandlers {
|
|
|
290
291
|
canonical?: string | null;
|
|
291
292
|
noIndex?: boolean;
|
|
292
293
|
};
|
|
294
|
+
taxonomies?: Record<string, string[]>;
|
|
293
295
|
publishedAt?: string | null;
|
|
294
296
|
_rev?: string;
|
|
295
297
|
},
|
|
@@ -314,16 +314,7 @@ async function exportCollections(db: Kysely<Database>): Promise<SeedCollection[]
|
|
|
314
314
|
labelSingular: collection.labelSingular || undefined,
|
|
315
315
|
description: collection.description || undefined,
|
|
316
316
|
icon: collection.icon || undefined,
|
|
317
|
-
supports:
|
|
318
|
-
collection.supports.length > 0
|
|
319
|
-
? (collection.supports as (
|
|
320
|
-
| "drafts"
|
|
321
|
-
| "revisions"
|
|
322
|
-
| "preview"
|
|
323
|
-
| "scheduling"
|
|
324
|
-
| "search"
|
|
325
|
-
)[])
|
|
326
|
-
: undefined,
|
|
317
|
+
supports: collection.supports.length > 0 ? collection.supports : undefined,
|
|
327
318
|
urlPattern: collection.urlPattern || undefined,
|
|
328
319
|
fields: fields.map(
|
|
329
320
|
(field): SeedField => ({
|
package/src/client/index.ts
CHANGED
|
@@ -142,6 +142,35 @@ export interface MediaItem {
|
|
|
142
142
|
updatedAt: string;
|
|
143
143
|
}
|
|
144
144
|
|
|
145
|
+
/** Media usage repair request */
|
|
146
|
+
export type MediaUsageRepairInput = { scope: "collection"; collection: string } | { scope: "all" };
|
|
147
|
+
|
|
148
|
+
/** Media usage repair status */
|
|
149
|
+
export type MediaUsageRepairStatus = "complete" | "partial" | "failed" | "stale";
|
|
150
|
+
|
|
151
|
+
/** Per-collection media usage repair summary */
|
|
152
|
+
export interface MediaUsageRepairCollectionSummary {
|
|
153
|
+
collection: string;
|
|
154
|
+
status: MediaUsageRepairStatus;
|
|
155
|
+
indexedSourceCount: number;
|
|
156
|
+
failedSourceCount: number;
|
|
157
|
+
skippedSourceCount: number;
|
|
158
|
+
deletedSourceCount: number;
|
|
159
|
+
lastErrorCode: string | null;
|
|
160
|
+
startedAt: string;
|
|
161
|
+
completedAt: string | null;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/** Media usage repair response */
|
|
165
|
+
export interface MediaUsageRepairResponse {
|
|
166
|
+
status: MediaUsageRepairStatus;
|
|
167
|
+
indexedSourceCount: number;
|
|
168
|
+
failedSourceCount: number;
|
|
169
|
+
skippedSourceCount: number;
|
|
170
|
+
deletedSourceCount: number;
|
|
171
|
+
collections: MediaUsageRepairCollectionSummary[];
|
|
172
|
+
}
|
|
173
|
+
|
|
145
174
|
/** Search result */
|
|
146
175
|
export interface SearchResult {
|
|
147
176
|
id: string;
|
|
@@ -702,6 +731,11 @@ export class EmDashClient {
|
|
|
702
731
|
await this.request<unknown>("DELETE", `/media/${encodeURIComponent(id)}`);
|
|
703
732
|
}
|
|
704
733
|
|
|
734
|
+
/** Repair content media usage indexes for one collection or all collections */
|
|
735
|
+
async mediaRepairUsage(input: MediaUsageRepairInput): Promise<MediaUsageRepairResponse> {
|
|
736
|
+
return this.request<MediaUsageRepairResponse>("POST", "/admin/media-usage/repair", input);
|
|
737
|
+
}
|
|
738
|
+
|
|
705
739
|
// -----------------------------------------------------------------------
|
|
706
740
|
// Search
|
|
707
741
|
// -----------------------------------------------------------------------
|
|
@@ -846,6 +880,11 @@ export class EmDashClient {
|
|
|
846
880
|
}
|
|
847
881
|
}
|
|
848
882
|
|
|
883
|
+
type _AssertTrue<T extends true> = T;
|
|
884
|
+
type _MediaRepairUsageRequiresExplicitInput = _AssertTrue<
|
|
885
|
+
Parameters<EmDashClient["mediaRepairUsage"]> extends [MediaUsageRepairInput] ? true : false
|
|
886
|
+
>;
|
|
887
|
+
|
|
849
888
|
// Re-export transport types for interceptor authors
|
|
850
889
|
export type { Interceptor } from "./transport.js";
|
|
851
890
|
export {
|
package/src/comments/service.ts
CHANGED
|
@@ -135,7 +135,7 @@ export async function createComment(
|
|
|
135
135
|
authorEmail: event.comment.authorEmail,
|
|
136
136
|
authorUserId: event.comment.authorUserId,
|
|
137
137
|
body: event.comment.body,
|
|
138
|
-
status: decision.status
|
|
138
|
+
status: decision.status,
|
|
139
139
|
ipHash: event.comment.ipHash,
|
|
140
140
|
userAgent: event.comment.userAgent,
|
|
141
141
|
moderationMetadata: Object.keys(event.metadata).length > 0 ? event.metadata : null,
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Server-side Turnstile verification for public comment submissions.
|
|
3
|
+
*
|
|
4
|
+
* The comment form widget (`CommentForm.astro`) submits a `turnstileToken`;
|
|
5
|
+
* this verifies it against Cloudflare's siteverify API. Enforcement is
|
|
6
|
+
* opt-in: it only runs when the operator configures the Turnstile secret
|
|
7
|
+
* key (`EMDASH_TURNSTILE_SECRET_KEY` or `TURNSTILE_SECRET_KEY`), so
|
|
8
|
+
* existing non-Turnstile sites are unaffected.
|
|
9
|
+
*
|
|
10
|
+
* Mirrors `verifyTurnstile` in `@emdash-cms/plugin-forms` (not imported —
|
|
11
|
+
* core doesn't depend on plugin packages).
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
const SITEVERIFY_URL = "https://challenges.cloudflare.com/turnstile/v0/siteverify";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Resolve the configured Turnstile secret key, or `""` when Turnstile
|
|
18
|
+
* enforcement is not configured.
|
|
19
|
+
*/
|
|
20
|
+
export function getTurnstileSecretKey(): string {
|
|
21
|
+
return import.meta.env.EMDASH_TURNSTILE_SECRET_KEY || import.meta.env.TURNSTILE_SECRET_KEY || "";
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Verify a Turnstile response token via siteverify.
|
|
26
|
+
*
|
|
27
|
+
* Fails closed: a missing token, a failed verification, and a siteverify
|
|
28
|
+
* transport error all return `false` — when the operator has configured a
|
|
29
|
+
* secret, an unverifiable submission must not be persisted.
|
|
30
|
+
*/
|
|
31
|
+
export async function verifyTurnstileToken(
|
|
32
|
+
token: string | undefined,
|
|
33
|
+
secretKey: string,
|
|
34
|
+
remoteIp?: string | null,
|
|
35
|
+
): Promise<boolean> {
|
|
36
|
+
if (!token) return false;
|
|
37
|
+
|
|
38
|
+
const body: Record<string, string> = { secret: secretKey, response: token };
|
|
39
|
+
if (remoteIp) {
|
|
40
|
+
body.remoteip = remoteIp;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
try {
|
|
44
|
+
const res = await fetch(SITEVERIFY_URL, {
|
|
45
|
+
method: "POST",
|
|
46
|
+
headers: { "Content-Type": "application/json" },
|
|
47
|
+
body: JSON.stringify(body),
|
|
48
|
+
// Fail closed *quickly* if siteverify is slow — without a timeout
|
|
49
|
+
// the comment POST would hang until the runtime kills it
|
|
50
|
+
signal: AbortSignal.timeout(10_000),
|
|
51
|
+
});
|
|
52
|
+
const data: { success?: boolean; "error-codes"?: string[] } = await res.json();
|
|
53
|
+
if (!data.success) {
|
|
54
|
+
console.warn("[comments] Turnstile verification failed:", data["error-codes"] ?? []);
|
|
55
|
+
}
|
|
56
|
+
return data.success === true;
|
|
57
|
+
} catch (error) {
|
|
58
|
+
console.error(
|
|
59
|
+
"[comments] Turnstile siteverify request failed:",
|
|
60
|
+
error instanceof Error ? error.message : error,
|
|
61
|
+
);
|
|
62
|
+
return false;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
/**
|
|
3
|
+
* Renders a run of consecutive `style: "blockquote"` Portable Text blocks
|
|
4
|
+
* as ONE `<blockquote>` with a paragraph per block.
|
|
5
|
+
*
|
|
6
|
+
* Portable Text is flat, so a multi-paragraph quote is stored as
|
|
7
|
+
* consecutive blockquote-styled blocks; rendering each as its own
|
|
8
|
+
* `<blockquote>` split single quotes into disconnected fragments (#1884).
|
|
9
|
+
* The grouping itself happens in `portable-text-blockquote-group.ts`,
|
|
10
|
+
* applied by the `PortableText` wrapper.
|
|
11
|
+
*/
|
|
12
|
+
import { PortableText } from "astro-portabletext";
|
|
13
|
+
|
|
14
|
+
import type { BlockquoteGroupNode } from "./portable-text-blockquote-group.js";
|
|
15
|
+
import Block from "./Block.astro";
|
|
16
|
+
import { emdashMarkComponents } from "./marks.js";
|
|
17
|
+
|
|
18
|
+
export interface Props {
|
|
19
|
+
node: BlockquoteGroupNode;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const { node } = Astro.props;
|
|
23
|
+
|
|
24
|
+
// Restyle the quoted blocks as "normal" so each renders as a <p> inside
|
|
25
|
+
// the shared <blockquote> (and doesn't re-trigger blockquote handling).
|
|
26
|
+
const paragraphs = (node?.blocks ?? []).map((block) => ({ ...block, style: "normal" }));
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
<blockquote>
|
|
30
|
+
<PortableText
|
|
31
|
+
value={paragraphs}
|
|
32
|
+
components={{ block: Block, mark: emdashMarkComponents }}
|
|
33
|
+
/>
|
|
34
|
+
</blockquote>
|
|
@@ -22,7 +22,12 @@ interface Props {
|
|
|
22
22
|
contentId: string;
|
|
23
23
|
parentId?: string | null;
|
|
24
24
|
class?: string;
|
|
25
|
-
/**
|
|
25
|
+
/**
|
|
26
|
+
* Turnstile site key. If provided, the widget is rendered and its
|
|
27
|
+
* token is submitted. Set the matching secret key on the server
|
|
28
|
+
* (EMDASH_TURNSTILE_SECRET_KEY) so submissions are actually verified —
|
|
29
|
+
* without it the token is ignored.
|
|
30
|
+
*/
|
|
26
31
|
turnstileSiteKey?: string;
|
|
27
32
|
}
|
|
28
33
|
|
|
@@ -182,10 +187,6 @@ const endpoint = `/_emdash/api/comments/${encodeURIComponent(collection)}/${enco
|
|
|
182
187
|
"textarea[name='body']"
|
|
183
188
|
);
|
|
184
189
|
if (textarea) textarea.value = "";
|
|
185
|
-
// Reset Turnstile if present
|
|
186
|
-
if (typeof window.turnstile !== "undefined") {
|
|
187
|
-
window.turnstile.reset();
|
|
188
|
-
}
|
|
189
190
|
} else {
|
|
190
191
|
statusEl.textContent =
|
|
191
192
|
result.error?.message ||
|
|
@@ -197,6 +198,12 @@ const endpoint = `/_emdash/api/comments/${encodeURIComponent(collection)}/${enco
|
|
|
197
198
|
statusEl.textContent = "Network error. Please try again.";
|
|
198
199
|
statusEl.classList.add("ec-comment-form-error");
|
|
199
200
|
} finally {
|
|
201
|
+
// Reset Turnstile on success and failure alike (incl. network
|
|
202
|
+
// errors) — tokens are single-use, so any retry needs a fresh
|
|
203
|
+
// challenge
|
|
204
|
+
if (typeof window.turnstile !== "undefined") {
|
|
205
|
+
window.turnstile.reset();
|
|
206
|
+
}
|
|
200
207
|
submitBtn.disabled = false;
|
|
201
208
|
submitBtn.textContent = "Post Comment";
|
|
202
209
|
}
|