emdash 0.21.0 → 0.23.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-BxSmgtbF.d.mts → adapters-DAAjOID4.d.mts} +1 -1
- package/dist/{adapters-BxSmgtbF.d.mts.map → adapters-DAAjOID4.d.mts.map} +1 -1
- package/dist/after-B1IIdH3Y.mjs +29 -0
- package/dist/after-B1IIdH3Y.mjs.map +1 -0
- package/dist/{allowed-origins-BqC8cul8.mjs → allowed-origins-D5FxMUo8.mjs} +2 -2
- package/dist/{allowed-origins-BqC8cul8.mjs.map → allowed-origins-D5FxMUo8.mjs.map} +1 -1
- package/dist/api/route-utils.d.mts +3 -3
- package/dist/api/route-utils.mjs +20 -19
- 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-DxjIV2o8.mjs → api-BQ_yKRdG.mjs} +31 -25
- package/dist/api-BQ_yKRdG.mjs.map +1 -0
- package/dist/{api-tokens-BFFkB0jB.mjs → api-tokens-D6ppjIVi.mjs} +13 -3
- package/dist/api-tokens-D6ppjIVi.mjs.map +1 -0
- package/dist/{apply-CLjxheyb.mjs → apply-CWRyxIoO.mjs} +18 -18
- package/dist/{apply-CLjxheyb.mjs.map → apply-CWRyxIoO.mjs.map} +1 -1
- package/dist/astro/image-endpoint.d.mts +8 -0
- package/dist/astro/image-endpoint.d.mts.map +1 -0
- package/dist/astro/image-endpoint.mjs +55 -0
- package/dist/astro/image-endpoint.mjs.map +1 -0
- package/dist/astro/index.d.mts +36 -11
- package/dist/astro/index.d.mts.map +1 -1
- package/dist/astro/index.mjs +122 -26
- package/dist/astro/index.mjs.map +1 -1
- package/dist/astro/middleware/auth.d.mts +9 -9
- package/dist/astro/middleware/auth.d.mts.map +1 -1
- package/dist/astro/middleware/auth.mjs +12 -10
- package/dist/astro/middleware/auth.mjs.map +1 -1
- package/dist/astro/middleware/redirect.mjs +6 -6
- package/dist/astro/middleware/request-context.d.mts.map +1 -1
- package/dist/astro/middleware/request-context.mjs +8 -6
- package/dist/astro/middleware/request-context.mjs.map +1 -1
- package/dist/astro/middleware/setup.mjs +1 -1
- package/dist/astro/middleware.d.mts +1 -1
- package/dist/astro/middleware.d.mts.map +1 -1
- package/dist/astro/middleware.mjs +444 -149
- 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 +18 -16
- package/dist/astro/routes/api/admin/bylines/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs +18 -16
- package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs.map +1 -1
- package/dist/astro/routes/api/admin/bylines/index.mjs +18 -16
- package/dist/astro/routes/api/admin/bylines/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/comments/_id_/status.mjs +15 -13
- package/dist/astro/routes/api/admin/comments/_id_/status.mjs.map +1 -1
- package/dist/astro/routes/api/admin/comments/_id_.mjs +8 -6
- package/dist/astro/routes/api/admin/comments/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/admin/comments/bulk.mjs +12 -10
- package/dist/astro/routes/api/admin/comments/bulk.mjs.map +1 -1
- package/dist/astro/routes/api/admin/comments/counts.mjs +8 -6
- package/dist/astro/routes/api/admin/comments/counts.mjs.map +1 -1
- package/dist/astro/routes/api/admin/comments/index.mjs +12 -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/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 +41 -39
- package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +41 -39
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +40 -38
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +40 -38
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs +40 -38
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/index.mjs +40 -38
- 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 +40 -38
- 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 +40 -38
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +40 -38
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.mjs +40 -38
- 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 +41 -39
- package/dist/astro/routes/api/admin/plugins/registry/_id_/update.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/artifact.mjs +40 -38
- package/dist/astro/routes/api/admin/plugins/registry/artifact.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/install.mjs +41 -39
- package/dist/astro/routes/api/admin/plugins/registry/install.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/updates.mjs +40 -38
- package/dist/astro/routes/api/admin/plugins/updates.mjs.map +1 -1
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +40 -38
- 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 +40 -38
- 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 +6 -6
- 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_.mjs +2 -2
- 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.mjs +16 -15
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs.map +1 -1
- package/dist/astro/routes/api/comments/_collection_/_contentId_/reactions.d.mts +9 -0
- package/dist/astro/routes/api/comments/_collection_/_contentId_/reactions.d.mts.map +1 -0
- package/dist/astro/routes/api/comments/_collection_/_contentId_/reactions.mjs +179 -0
- package/dist/astro/routes/api/comments/_collection_/_contentId_/reactions.mjs.map +1 -0
- 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 +13 -13
- package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs +8 -8
- 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 +17 -15
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs.map +1 -1
- 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 +10 -8
- package/dist/astro/routes/api/dashboard.mjs.map +1 -1
- 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 +12 -12
- package/dist/astro/routes/api/import/wordpress/analyze.mjs +5 -5
- package/dist/astro/routes/api/import/wordpress/execute.d.mts +9 -9
- package/dist/astro/routes/api/import/wordpress/execute.mjs +17 -15
- package/dist/astro/routes/api/import/wordpress/execute.mjs.map +1 -1
- 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.mjs +10 -10
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.d.mts +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs +12 -12
- package/dist/astro/routes/api/import/wordpress-plugin/callback.mjs +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/execute.d.mts +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs +19 -17
- 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 +213 -46
- package/dist/astro/routes/api/mcp.mjs.map +1 -1
- package/dist/astro/routes/api/media/_id_/confirm.mjs +8 -8
- 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 +11 -9
- package/dist/astro/routes/api/menus/_name_/items/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/menus/_name_/items.mjs +11 -9
- package/dist/astro/routes/api/menus/_name_/items.mjs.map +1 -1
- package/dist/astro/routes/api/menus/_name_/reorder.mjs +11 -9
- package/dist/astro/routes/api/menus/_name_/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/menus/_name_/translations.mjs +11 -9
- package/dist/astro/routes/api/menus/_name_/translations.mjs.map +1 -1
- package/dist/astro/routes/api/menus/_name_.mjs +11 -9
- package/dist/astro/routes/api/menus/_name_.mjs.map +1 -1
- package/dist/astro/routes/api/menus/index.mjs +11 -9
- 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 +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 +5 -5
- package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs +5 -5
- package/dist/astro/routes/api/redirects/404s/index.mjs +11 -11
- package/dist/astro/routes/api/redirects/404s/summary.mjs +11 -11
- package/dist/astro/routes/api/redirects/_id_.mjs +12 -12
- package/dist/astro/routes/api/redirects/index.mjs +12 -12
- 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_.mjs +40 -38
- 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 +40 -38
- 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 +40 -38
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +40 -38
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/index.mjs +40 -38
- package/dist/astro/routes/api/schema/collections/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/index.mjs +9 -8
- package/dist/astro/routes/api/schema/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs +40 -38
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs.map +1 -1
- package/dist/astro/routes/api/schema/orphans/index.mjs +40 -38
- package/dist/astro/routes/api/schema/orphans/index.mjs.map +1 -1
- package/dist/astro/routes/api/search/enable.mjs +11 -11
- package/dist/astro/routes/api/search/index.mjs +10 -10
- package/dist/astro/routes/api/search/rebuild.mjs +11 -11
- package/dist/astro/routes/api/search/stats.mjs +7 -7
- package/dist/astro/routes/api/search/suggest.mjs +10 -10
- package/dist/astro/routes/api/sections/_slug_.mjs +10 -10
- package/dist/astro/routes/api/sections/index.mjs +10 -10
- package/dist/astro/routes/api/settings/email.mjs +6 -6
- package/dist/astro/routes/api/settings.mjs +16 -15
- package/dist/astro/routes/api/settings.mjs.map +1 -1
- 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.d.mts.map +1 -1
- package/dist/astro/routes/api/setup/dev-bypass.mjs +30 -27
- package/dist/astro/routes/api/setup/dev-bypass.mjs.map +1 -1
- package/dist/astro/routes/api/setup/dev-reset.mjs +4 -4
- package/dist/astro/routes/api/setup/index.mjs +30 -28
- package/dist/astro/routes/api/setup/index.mjs.map +1 -1
- package/dist/astro/routes/api/setup/status.mjs +5 -5
- package/dist/astro/routes/api/snapshot.d.mts.map +1 -1
- package/dist/astro/routes/api/snapshot.mjs +10 -9
- package/dist/astro/routes/api/snapshot.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs +16 -14
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs +16 -14
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs +16 -14
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/index.mjs +16 -14
- package/dist/astro/routes/api/taxonomies/index.mjs.map +1 -1
- package/dist/astro/routes/api/themes/preview.mjs +8 -8
- 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 +11 -11
- package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs +11 -11
- package/dist/astro/routes/api/widget-areas/_name_.mjs +7 -7
- package/dist/astro/routes/api/widget-areas/index.mjs +11 -11
- package/dist/astro/routes/api/widget-components.mjs +4 -4
- package/dist/astro/routes/robots.txt.mjs +10 -9
- package/dist/astro/routes/robots.txt.mjs.map +1 -1
- package/dist/astro/routes/sitemap-_collection_.xml.mjs +13 -12
- package/dist/astro/routes/sitemap-_collection_.xml.mjs.map +1 -1
- package/dist/astro/routes/sitemap.xml.mjs +11 -10
- package/dist/astro/routes/sitemap.xml.mjs.map +1 -1
- package/dist/astro/types.d.mts +16 -12
- 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-D5gfBVU5.mjs → authorize-Cse0k7B0.mjs} +2 -2
- package/dist/{authorize-D5gfBVU5.mjs.map → authorize-Cse0k7B0.mjs.map} +1 -1
- package/dist/{base64-CqR-7kqF.mjs → base64-CmWvODNW.mjs} +1 -1
- package/dist/{base64-CqR-7kqF.mjs.map → base64-CmWvODNW.mjs.map} +1 -1
- package/dist/{byline-V_Qp1Ziw.mjs → byline-DVo-liaP.mjs} +27 -76
- package/dist/byline-DVo-liaP.mjs.map +1 -0
- package/dist/{byline-fields-B0NO1yUB.mjs → byline-fields-B-KXkg5R.mjs} +3 -3
- package/dist/{byline-fields-B0NO1yUB.mjs.map → byline-fields-B-KXkg5R.mjs.map} +1 -1
- package/dist/{byline-fields-nBVqK_Ff.mjs → byline-fields-DaMKzkhO.mjs} +2 -2
- package/dist/{byline-fields-nBVqK_Ff.mjs.map → byline-fields-DaMKzkhO.mjs.map} +1 -1
- package/dist/{byline-fields-CQJRIQkn.d.mts → byline-fields-RFPkDLRw.d.mts} +56 -31
- package/dist/byline-fields-RFPkDLRw.d.mts.map +1 -0
- package/dist/{byline-registry-DedidtqC.mjs → byline-registry-BOjqDOim.mjs} +3 -3
- package/dist/{byline-registry-DedidtqC.mjs.map → byline-registry-BOjqDOim.mjs.map} +1 -1
- package/dist/{bylines-DfGDnred.mjs → bylines-f5ppBpD5.mjs} +8 -8
- package/dist/{bylines-DfGDnred.mjs.map → bylines-f5ppBpD5.mjs.map} +1 -1
- package/dist/{bylines-B2NWnIwS.mjs → bylines-pIKgc_TL.mjs} +10 -4
- package/dist/{bylines-B2NWnIwS.mjs.map → bylines-pIKgc_TL.mjs.map} +1 -1
- package/dist/{cache-DTTHWD8n.mjs → cache-Q6V4U-Xz.mjs} +3 -3
- package/dist/{cache-DTTHWD8n.mjs.map → cache-Q6V4U-Xz.mjs.map} +1 -1
- package/dist/{challenge-store-woE0bbCf.mjs → challenge-store-LhiqMccz.mjs} +1 -1
- package/dist/{challenge-store-woE0bbCf.mjs.map → challenge-store-LhiqMccz.mjs.map} +1 -1
- package/dist/{chunks-BerYVuve.mjs → chunks-SyjZaYwV.mjs} +2 -2
- package/dist/{chunks-BerYVuve.mjs.map → chunks-SyjZaYwV.mjs.map} +1 -1
- package/dist/cli/index.mjs +29 -27
- 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 -1
- package/dist/client/index.mjs.map +1 -1
- package/dist/{comment-sqQxNpN3.mjs → comment-80UyJJUR.mjs} +11 -3
- package/dist/comment-80UyJJUR.mjs.map +1 -0
- package/dist/comment-reaction-Dyb-AutY.mjs +85 -0
- package/dist/comment-reaction-Dyb-AutY.mjs.map +1 -0
- package/dist/{comments-D2hNuxNa.mjs → comments-Cczx7AvD.mjs} +3 -3
- package/dist/{comments-D2hNuxNa.mjs.map → comments-Cczx7AvD.mjs.map} +1 -1
- package/dist/{components-DYKp2gmo.mjs → components-CYt4uVK9.mjs} +1 -1
- package/dist/{components-DYKp2gmo.mjs.map → components-CYt4uVK9.mjs.map} +1 -1
- package/dist/{content-BIlVx-RX.mjs → content-2PTDNnoh.mjs} +22 -7
- package/dist/content-2PTDNnoh.mjs.map +1 -0
- package/dist/{context-Cm4pt1Ws.mjs → context-B1W8soLv.mjs} +64 -26
- package/dist/context-B1W8soLv.mjs.map +1 -0
- package/dist/{cron-DdEVrQ2Y.mjs → cron-C5LVoNmP.mjs} +14 -2
- package/dist/cron-C5LVoNmP.mjs.map +1 -0
- package/dist/{dashboard-C-UYpps0.mjs → dashboard-CYjpQZ6-.mjs} +4 -4
- package/dist/{dashboard-C-UYpps0.mjs.map → dashboard-CYjpQZ6-.mjs.map} +1 -1
- package/dist/database/instrumentation.d.mts +19 -0
- package/dist/database/instrumentation.d.mts.map +1 -1
- package/dist/database/instrumentation.mjs +8 -1
- package/dist/database/instrumentation.mjs.map +1 -1
- package/dist/db/index.d.mts +3 -3
- package/dist/db/index.mjs +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/{db-errors-BluWkwGI.mjs → db-errors-UXB1CK42.mjs} +1 -1
- package/dist/{db-errors-BluWkwGI.mjs.map → db-errors-UXB1CK42.mjs.map} +1 -1
- package/dist/{default-NHGuJzQ3.mjs → default-CeRG-Ot4.mjs} +1 -1
- package/dist/{default-NHGuJzQ3.mjs.map → default-CeRG-Ot4.mjs.map} +1 -1
- package/dist/{device-flow-BQApWgnW.mjs → device-flow-DENDCQ9F.mjs} +5 -5
- package/dist/{device-flow-BQApWgnW.mjs.map → device-flow-DENDCQ9F.mjs.map} +1 -1
- package/dist/{email-console-BbU3RbWv.mjs → email-console-DJP32ucW.mjs} +1 -1
- package/dist/{email-console-BbU3RbWv.mjs.map → email-console-DJP32ucW.mjs.map} +1 -1
- package/dist/{error-CNn_w7jf.mjs → error-Bl6kZgtt.mjs} +2 -2
- package/dist/{error-CNn_w7jf.mjs.map → error-Bl6kZgtt.mjs.map} +1 -1
- package/dist/{escape-DPgcxcpL.mjs → escape-Bjio4ZsM.mjs} +1 -1
- package/dist/{escape-DPgcxcpL.mjs.map → escape-Bjio4ZsM.mjs.map} +1 -1
- package/dist/field-defs-cache-ztrdzUGb.mjs +77 -0
- package/dist/field-defs-cache-ztrdzUGb.mjs.map +1 -0
- package/dist/{fts-manager-Cx5z8jdA.mjs → fts-manager-CQuHt-vS.mjs} +2 -2
- package/dist/{fts-manager-Cx5z8jdA.mjs.map → fts-manager-CQuHt-vS.mjs.map} +1 -1
- package/dist/{hash-DlvIFn0b.mjs → hash-DrvzIXcz.mjs} +1 -1
- package/dist/{hash-DlvIFn0b.mjs.map → hash-DrvzIXcz.mjs.map} +1 -1
- package/dist/{import-KyxT1Mbs.mjs → import-Bb1T9WJS.mjs} +4 -4
- package/dist/{import-KyxT1Mbs.mjs.map → import-Bb1T9WJS.mjs.map} +1 -1
- package/dist/{index-D2VAiumu.d.mts → index-BaIj5hIq.d.mts} +198 -21
- package/dist/index-BaIj5hIq.d.mts.map +1 -0
- package/dist/{index-uT2yR66F.d.mts → index-qbL02uhs.d.mts} +3 -3
- package/dist/{index-uT2yR66F.d.mts.map → index-qbL02uhs.d.mts.map} +1 -1
- package/dist/index.d.mts +18 -17
- package/dist/index.mjs +64 -61
- package/dist/{init-lock-DlBHjf9-.mjs → init-lock-6b309ZrF.mjs} +2 -29
- package/dist/init-lock-6b309ZrF.mjs.map +1 -0
- package/dist/{load-Dq91b_DK.mjs → load-BNo-ER8C.mjs} +2 -2
- package/dist/{load-Dq91b_DK.mjs.map → load-BNo-ER8C.mjs.map} +1 -1
- package/dist/{loader-BqWjcH3h.mjs → loader-Dn74CG1b.mjs} +70 -11
- package/dist/loader-Dn74CG1b.mjs.map +1 -0
- package/dist/{manifest-schema-DFPeqMAn.mjs → manifest-schema-BWKnQYQF.mjs} +1 -1
- package/dist/{manifest-schema-DFPeqMAn.mjs.map → manifest-schema-BWKnQYQF.mjs.map} +1 -1
- package/dist/media/image-endpoint.d.mts +74 -0
- package/dist/media/image-endpoint.d.mts.map +1 -0
- package/dist/media/image-endpoint.mjs +162 -0
- package/dist/media/image-endpoint.mjs.map +1 -0
- package/dist/media/index.d.mts +1 -1
- package/dist/media/index.mjs +2 -2
- package/dist/media/local-runtime.d.mts +19 -11
- package/dist/media/local-runtime.d.mts.map +1 -1
- package/dist/media/local-runtime.mjs +16 -13
- package/dist/media/local-runtime.mjs.map +1 -1
- package/dist/{media-JOf3pNkw.mjs → media-Bw0sA6rb.mjs} +2 -2
- package/dist/{media-JOf3pNkw.mjs.map → media-Bw0sA6rb.mjs.map} +1 -1
- package/dist/{media-allowlist-_A0SuDn4.mjs → media-allowlist-B77I5_bw.mjs} +2 -2
- package/dist/{media-allowlist-_A0SuDn4.mjs.map → media-allowlist-B77I5_bw.mjs.map} +1 -1
- package/dist/{media-url-CqLd69IO.mjs → media-url-O4rm9-SQ.mjs} +1 -1
- package/dist/{media-url-CqLd69IO.mjs.map → media-url-O4rm9-SQ.mjs.map} +1 -1
- package/dist/{menus-DX4_E01q.mjs → menus-CYs0WZoL.mjs} +20 -6
- package/dist/menus-CYs0WZoL.mjs.map +1 -0
- package/dist/{menus-Ryk9L7fT.mjs → menus-DS8VTZgo.mjs} +167 -24
- package/dist/menus-DS8VTZgo.mjs.map +1 -0
- package/dist/{mime-YbtlEtvS.mjs → mime-BTzvzJ8M.mjs} +1 -1
- package/dist/{mime-YbtlEtvS.mjs.map → mime-BTzvzJ8M.mjs.map} +1 -1
- package/dist/{mode-CGXzIbD8.mjs → mode-BB0F8xTC.mjs} +1 -1
- package/dist/{mode-CGXzIbD8.mjs.map → mode-BB0F8xTC.mjs.map} +1 -1
- package/dist/{normalize-DKsg36ty.mjs → normalize-ClbNIenm.mjs} +1 -1
- package/dist/{normalize-DKsg36ty.mjs.map → normalize-ClbNIenm.mjs.map} +1 -1
- package/dist/{oauth-authorization-C2kVyjXI.mjs → oauth-authorization-CsvzIp_F.mjs} +5 -5
- package/dist/{oauth-authorization-C2kVyjXI.mjs.map → oauth-authorization-CsvzIp_F.mjs.map} +1 -1
- package/dist/{oauth-clients-BC873NCV.mjs → oauth-clients-C9SYwEbZ.mjs} +1 -1
- package/dist/{oauth-clients-BC873NCV.mjs.map → oauth-clients-C9SYwEbZ.mjs.map} +1 -1
- package/dist/{oauth-state-store-Cd--TUaq.mjs → oauth-state-store---zrApfB.mjs} +1 -1
- package/dist/{oauth-state-store-Cd--TUaq.mjs.map → oauth-state-store---zrApfB.mjs.map} +1 -1
- package/dist/{oauth-user-lookup-e4wOvDud.mjs → oauth-user-lookup-SHsWRlG9.mjs} +1 -1
- package/dist/{oauth-user-lookup-e4wOvDud.mjs.map → oauth-user-lookup-SHsWRlG9.mjs.map} +1 -1
- package/dist/object-cache/memory.d.mts +15 -0
- package/dist/object-cache/memory.d.mts.map +1 -0
- package/dist/object-cache/memory.mjs +56 -0
- package/dist/object-cache/memory.mjs.map +1 -0
- package/dist/object-cache-SEb2IM4Z.mjs +373 -0
- package/dist/object-cache-SEb2IM4Z.mjs.map +1 -0
- package/dist/{options-9kLgkE8m.d.mts → options-CqECG0gM.d.mts} +3 -3
- package/dist/{options-9kLgkE8m.d.mts.map → options-CqECG0gM.d.mts.map} +1 -1
- package/dist/{options-BPCVnesz.mjs → options-DTTML-Tx.mjs} +1 -1
- package/dist/{options-BPCVnesz.mjs.map → options-DTTML-Tx.mjs.map} +1 -1
- package/dist/page/index.d.mts +2 -2
- package/dist/{parse-DzSrk1t8.mjs → parse-C9hpjUyY.mjs} +2 -2
- package/dist/{parse-DzSrk1t8.mjs.map → parse-C9hpjUyY.mjs.map} +1 -1
- package/dist/{passkey-config-BpjbE_Uv.mjs → passkey-config-C0YfSBko.mjs} +1 -1
- package/dist/{passkey-config-BpjbE_Uv.mjs.map → passkey-config-C0YfSBko.mjs.map} +1 -1
- package/dist/{patterns-p-RBdTbM.mjs → patterns-BKmjvM7K.mjs} +1 -1
- package/dist/{patterns-p-RBdTbM.mjs.map → patterns-BKmjvM7K.mjs.map} +1 -1
- package/dist/{placeholder-2xumZh4g.mjs → placeholder-B0s2mWu5.mjs} +1 -1
- package/dist/{placeholder-2xumZh4g.mjs.map → placeholder-B0s2mWu5.mjs.map} +1 -1
- package/dist/{placeholder-BevVKfay.d.mts → placeholder-QoI4gEzP.d.mts} +1 -1
- package/dist/{placeholder-BevVKfay.d.mts.map → placeholder-QoI4gEzP.d.mts.map} +1 -1
- package/dist/plugin-types.d.mts +1 -1
- package/dist/plugin-utils.d.mts +9 -9
- package/dist/plugins/adapt-sandbox-entry.d.mts +9 -9
- package/dist/plugins/adapt-sandbox-entry.mjs +4 -2
- package/dist/plugins/adapt-sandbox-entry.mjs.map +1 -1
- package/dist/{transport-1cIrOb1Y.mjs → portable-text-BICg8bTk.mjs} +2 -135
- package/dist/portable-text-BICg8bTk.mjs.map +1 -0
- package/dist/{preview-Dqv2hwXr.mjs → preview-DKGCt2_p.mjs} +2 -2
- package/dist/{preview-Dqv2hwXr.mjs.map → preview-DKGCt2_p.mjs.map} +1 -1
- package/dist/{public-url-D_zARuvZ.mjs → public-url-CTVqgMmg.mjs} +1 -1
- package/dist/{public-url-D_zARuvZ.mjs.map → public-url-CTVqgMmg.mjs.map} +1 -1
- package/dist/{query-Crm038Mc.mjs → query-DgUHZLWB.mjs} +230 -31
- package/dist/query-DgUHZLWB.mjs.map +1 -0
- package/dist/{rate-limit-hRTBqmw1.mjs → rate-limit-BuQ5d4X_.mjs} +2 -2
- package/dist/{rate-limit-hRTBqmw1.mjs.map → rate-limit-BuQ5d4X_.mjs.map} +1 -1
- package/dist/{redirect-CRWIt8Zj.mjs → redirect-Bifv_yHv.mjs} +3 -3
- package/dist/{redirect-CRWIt8Zj.mjs.map → redirect-Bifv_yHv.mjs.map} +1 -1
- package/dist/{redirect-C-OOkyku.mjs → redirect-CS-PHtNh.mjs} +1 -1
- package/dist/{redirect-C-OOkyku.mjs.map → redirect-CS-PHtNh.mjs.map} +1 -1
- package/dist/{redirects-CP3TnTLO.mjs → redirects-BZ8Mxn8H.mjs} +6 -6
- package/dist/{redirects-CP3TnTLO.mjs.map → redirects-BZ8Mxn8H.mjs.map} +1 -1
- package/dist/{redirects-6Zg2SoYo.mjs → redirects-x9eFPeyi.mjs} +10 -3
- package/dist/redirects-x9eFPeyi.mjs.map +1 -0
- package/dist/{registry-diMzD1Wf.mjs → registry-CK1SS6pi.mjs} +6 -6
- package/dist/{registry-diMzD1Wf.mjs.map → registry-CK1SS6pi.mjs.map} +1 -1
- package/dist/{request-cache-UwmBAiUK.mjs → request-cache-KCNHp_RJ.mjs} +1 -1
- package/dist/{request-cache-UwmBAiUK.mjs.map → request-cache-KCNHp_RJ.mjs.map} +1 -1
- package/dist/{request-meta-DPechd0W.mjs → request-meta-CmS1tDFf.mjs} +2 -2
- package/dist/{request-meta-DPechd0W.mjs.map → request-meta-CmS1tDFf.mjs.map} +1 -1
- package/dist/{resolve-B3NUUtVY.mjs → resolve-C7I0qiR0.mjs} +1 -1
- package/dist/{resolve-B3NUUtVY.mjs.map → resolve-C7I0qiR0.mjs.map} +1 -1
- package/dist/{runner-C8vcbvCe.d.mts → runner-CEtq-6Sm.d.mts} +2 -2
- package/dist/{runner-C8vcbvCe.d.mts.map → runner-CEtq-6Sm.d.mts.map} +1 -1
- package/dist/{runner--4wMWwKM.mjs → runner-DYYnW530.mjs} +201 -170
- package/dist/runner-DYYnW530.mjs.map +1 -0
- package/dist/runtime.d.mts +10 -10
- package/dist/runtime.mjs +3 -3
- package/dist/{schema-BDOkd3OU.mjs → schema-CbFRFoM7.mjs} +13 -8
- package/dist/schema-CbFRFoM7.mjs.map +1 -0
- package/dist/{search-Bs_J_EW-.mjs → search-C-waE_YW.mjs} +4 -4
- package/dist/{search-Bs_J_EW-.mjs.map → search-C-waE_YW.mjs.map} +1 -1
- package/dist/{secrets-C8xmE6mR.mjs → secrets-BSf9pRRY.mjs} +5 -5
- package/dist/{secrets-C8xmE6mR.mjs.map → secrets-BSf9pRRY.mjs.map} +1 -1
- package/dist/{sections-P0zuBlyz.mjs → sections-osX9U-YJ.mjs} +3 -3
- package/dist/{sections-P0zuBlyz.mjs.map → sections-osX9U-YJ.mjs.map} +1 -1
- package/dist/seed/index.d.mts +2 -2
- package/dist/seed/index.mjs +23 -21
- package/dist/seo/index.d.mts +1 -1
- package/dist/seo/index.mjs +1 -1
- package/dist/{seo-DpNgGQjF.mjs → seo-4FovMwNS.mjs} +5 -2
- package/dist/seo-4FovMwNS.mjs.map +1 -0
- package/dist/{seo-CLhm-Fmb.mjs → seo-DCEF-AVr.mjs} +1 -1
- package/dist/{seo-CLhm-Fmb.mjs.map → seo-DCEF-AVr.mjs.map} +1 -1
- package/dist/{service-CDQQnT8W.mjs → service-jby1RRmU.mjs} +3 -3
- package/dist/{service-CDQQnT8W.mjs.map → service-jby1RRmU.mjs.map} +1 -1
- package/dist/session-user-B8aLtKAH.mjs +51 -0
- package/dist/session-user-B8aLtKAH.mjs.map +1 -0
- package/dist/{settings-sO0Fif4p.mjs → settings-4bRT2NIf.mjs} +3 -3
- package/dist/{settings-sO0Fif4p.mjs.map → settings-4bRT2NIf.mjs.map} +1 -1
- package/dist/{settings-BjBsmVAo.mjs → settings-t-H2jPuJ.mjs} +18 -10
- package/dist/settings-t-H2jPuJ.mjs.map +1 -0
- package/dist/{setup-complete-CMMr-oZU.mjs → setup-complete-gEiySUc-.mjs} +2 -2
- package/dist/{setup-complete-CMMr-oZU.mjs.map → setup-complete-gEiySUc-.mjs.map} +1 -1
- package/dist/{setup-nonce-169xl4fV.mjs → setup-nonce-DzS50zme.mjs} +1 -1
- package/dist/{setup-nonce-169xl4fV.mjs.map → setup-nonce-DzS50zme.mjs.map} +1 -1
- package/dist/{single-flight-cache-C0UV1Npg.mjs → single-flight-cache-Cdfkic3t.mjs} +2 -2
- package/dist/{single-flight-cache-C0UV1Npg.mjs.map → single-flight-cache-Cdfkic3t.mjs.map} +1 -1
- package/dist/{site-url-vtsuOvSD.mjs → site-url-BLebyON8.mjs} +2 -2
- package/dist/{site-url-vtsuOvSD.mjs.map → site-url-BLebyON8.mjs.map} +1 -1
- package/dist/{slugify-Cjh1ssOZ.mjs → slugify-Cce3dTdg.mjs} +1 -1
- package/dist/{slugify-Cjh1ssOZ.mjs.map → slugify-Cce3dTdg.mjs.map} +1 -1
- package/dist/{ssrf-XO05Voq6.mjs → ssrf-BRKb343l.mjs} +1 -1
- package/dist/{ssrf-XO05Voq6.mjs.map → ssrf-BRKb343l.mjs.map} +1 -1
- package/dist/{status-2gZklYuj.mjs → status-vUK0SA17.mjs} +1 -1
- package/dist/{status-2gZklYuj.mjs.map → status-vUK0SA17.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-DuESHWKI.mjs → taxonomies-BBB8O-CU.mjs} +7 -7
- package/dist/{taxonomies-DuESHWKI.mjs.map → taxonomies-BBB8O-CU.mjs.map} +1 -1
- package/dist/{taxonomies-BBxYA38v.mjs → taxonomies-Dxrc_szG.mjs} +177 -123
- package/dist/taxonomies-Dxrc_szG.mjs.map +1 -0
- package/dist/{taxonomy-CdllE4oq.mjs → taxonomy-B2HQuVf5.mjs} +19 -6
- package/dist/taxonomy-B2HQuVf5.mjs.map +1 -0
- package/dist/{tokens-DMkVjxrx.mjs → tokens-LeuXF9gG.mjs} +2 -2
- package/dist/{tokens-DMkVjxrx.mjs.map → tokens-LeuXF9gG.mjs.map} +1 -1
- package/dist/{transaction-x2tJQ-A1.mjs → transaction-qfqpPVpu.mjs} +1 -1
- package/dist/{transaction-x2tJQ-A1.mjs.map → transaction-qfqpPVpu.mjs.map} +1 -1
- package/dist/{transport-jdvsZEIt.d.mts → transport-BZ-03aFT.d.mts} +1 -1
- package/dist/{transport-jdvsZEIt.d.mts.map → transport-BZ-03aFT.d.mts.map} +1 -1
- package/dist/transport-_2nBz7e9.mjs +135 -0
- package/dist/transport-_2nBz7e9.mjs.map +1 -0
- package/dist/{trusted-proxy-CHp41Fjj.mjs → trusted-proxy-DZY5WCn2.mjs} +1 -1
- package/dist/{trusted-proxy-CHp41Fjj.mjs.map → trusted-proxy-DZY5WCn2.mjs.map} +1 -1
- package/dist/{types-Del0VMij.d.mts → types-B-gIxFCE.d.mts} +9 -1
- package/dist/{types-Del0VMij.d.mts.map → types-B-gIxFCE.d.mts.map} +1 -1
- package/dist/{types-DdkL6fyv.d.mts → types-BG8_XTLj.d.mts} +1 -1
- package/dist/{types-DdkL6fyv.d.mts.map → types-BG8_XTLj.d.mts.map} +1 -1
- package/dist/{types-BTnnBYVX.d.mts → types-BWh2MjmA.d.mts} +15 -2
- package/dist/types-BWh2MjmA.d.mts.map +1 -0
- package/dist/{types-CkEuk-Zr.d.mts → types-BWqGVhFn.d.mts} +1 -1
- package/dist/{types-CkEuk-Zr.d.mts.map → types-BWqGVhFn.d.mts.map} +1 -1
- package/dist/{types-DejCHqWT.mjs → types-CQAugunJ.mjs} +1 -1
- package/dist/{types-DejCHqWT.mjs.map → types-CQAugunJ.mjs.map} +1 -1
- package/dist/{types-Bzfk2yC8.d.mts → types-CTLJYMhN.d.mts} +1 -1
- package/dist/{types-Bzfk2yC8.d.mts.map → types-CTLJYMhN.d.mts.map} +1 -1
- package/dist/{types-BFgYtuKd.d.mts → types-CUsXGRVj.d.mts} +1 -1
- package/dist/{types-BFgYtuKd.d.mts.map → types-CUsXGRVj.d.mts.map} +1 -1
- package/dist/{types-BXSUSAjt.mjs → types-DXOIbece.mjs} +3 -3
- package/dist/types-DXOIbece.mjs.map +1 -0
- package/dist/{types-u_XxjbS8.d.mts → types-DrYMm9s5.d.mts} +1 -1
- package/dist/{types-u_XxjbS8.d.mts.map → types-DrYMm9s5.d.mts.map} +1 -1
- package/dist/{types-DO7whVYU.d.mts → types-TTx8uP7V.d.mts} +2 -2
- package/dist/{types-DO7whVYU.d.mts.map → types-TTx8uP7V.d.mts.map} +1 -1
- package/dist/types-fS7-VTdR.d.mts +124 -0
- package/dist/types-fS7-VTdR.d.mts.map +1 -0
- package/dist/{types-BIduXPJk.mjs → types-tM44hEcf.mjs} +1 -1
- package/dist/{types-BIduXPJk.mjs.map → types-tM44hEcf.mjs.map} +1 -1
- package/dist/{user-C0um7wrg.mjs → user-Db-Rti_z.mjs} +3 -3
- package/dist/{user-C0um7wrg.mjs.map → user-Db-Rti_z.mjs.map} +1 -1
- package/dist/{utils-C4M981Br.mjs → utils-B7A57fm9.mjs} +2 -2
- package/dist/{utils-C4M981Br.mjs.map → utils-B7A57fm9.mjs.map} +1 -1
- package/dist/{validate-DGhQPXzI.mjs → validate-0Utjspbs.mjs} +3 -3
- package/dist/{validate-DGhQPXzI.mjs.map → validate-0Utjspbs.mjs.map} +1 -1
- package/dist/{validate-cJOiOvT2.d.mts → validate-DOFrIb-c.d.mts} +5 -5
- package/dist/{validate-cJOiOvT2.d.mts.map → validate-DOFrIb-c.d.mts.map} +1 -1
- package/dist/{validation-DVHjPM1M.mjs → validation-D9EnzH1T.mjs} +6 -6
- package/dist/{validation-DVHjPM1M.mjs.map → validation-D9EnzH1T.mjs.map} +1 -1
- package/dist/version-BgVM_1MU.mjs +7 -0
- package/dist/{version-BOjj_cfz.mjs.map → version-BgVM_1MU.mjs.map} +1 -1
- package/dist/{widgets-Ci6hLwfO.mjs → widgets-BSTzPUYa.mjs} +4 -4
- package/dist/{widgets-Ci6hLwfO.mjs.map → widgets-BSTzPUYa.mjs.map} +1 -1
- package/dist/{zod-generator-CarzgPAu.mjs → zod-generator-ElVQOav7.mjs} +51 -15
- package/dist/zod-generator-ElVQOav7.mjs.map +1 -0
- package/package.json +19 -6
- package/src/api/handlers/api-tokens.ts +19 -0
- package/src/api/handlers/comment-reactions.ts +165 -0
- package/src/api/handlers/schema.ts +8 -0
- package/src/api/schemas/bylines.ts +8 -0
- package/src/api/schemas/comments.ts +10 -0
- package/src/astro/image-endpoint.ts +84 -0
- package/src/astro/index.ts +6 -0
- package/src/astro/integration/index.ts +83 -22
- package/src/astro/integration/routes.ts +5 -0
- package/src/astro/integration/runtime.ts +65 -1
- package/src/astro/integration/virtual-modules.ts +40 -0
- package/src/astro/integration/vite-config.ts +25 -1
- package/src/astro/middleware/auth.ts +4 -3
- package/src/astro/middleware/request-context.ts +6 -1
- package/src/astro/middleware/scoped-db.ts +131 -0
- package/src/astro/middleware/stream-end-metrics.ts +15 -9
- package/src/astro/middleware.ts +131 -31
- package/src/astro/object-cache/adapters.ts +50 -0
- package/src/astro/prefetch.ts +77 -0
- package/src/astro/routes/admin.astro +5 -1
- package/src/astro/routes/api/comments/[collection]/[contentId]/reactions.ts +97 -0
- package/src/astro/routes/api/schema/index.ts +9 -3
- package/src/astro/routes/api/setup/dev-bypass.ts +5 -1
- package/src/astro/routes/api/snapshot.ts +3 -1
- package/src/astro/session-user.ts +57 -0
- package/src/astro/types.ts +1 -0
- package/src/cli/commands/export-seed.ts +10 -7
- package/src/comments/query.ts +78 -7
- package/src/comments/ranking.ts +58 -0
- package/src/components/Block.astro +71 -0
- package/src/components/Comments.astro +136 -1
- package/src/components/EmDashMedia.astro +1 -2
- package/src/components/Image.astro +36 -2
- package/src/components/InlinePortableTextEditor.tsx +10 -2
- package/src/components/index.ts +5 -0
- package/src/components/portable-text-text-align.ts +38 -0
- package/src/content/converters/portable-text-to-prosemirror.ts +5 -1
- package/src/content/converters/prosemirror-to-portable-text.ts +8 -0
- package/src/content/converters/types.ts +1 -0
- package/src/database/instrumentation.ts +21 -1
- package/src/database/migrations/044_comment_reactions.ts +56 -0
- package/src/database/migrations/runner.ts +2 -0
- package/src/database/repositories/byline.ts +27 -0
- package/src/database/repositories/comment-reaction.ts +132 -0
- package/src/database/repositories/comment.ts +10 -0
- package/src/database/repositories/content.ts +25 -3
- package/src/database/repositories/menu.ts +13 -1
- package/src/database/repositories/seo.ts +3 -0
- package/src/database/repositories/taxonomy.ts +13 -1
- package/src/database/repositories/types.ts +13 -0
- package/src/database/types.ts +9 -0
- package/src/emdash-runtime.ts +244 -75
- package/src/index.ts +22 -0
- package/src/loader.ts +97 -5
- package/src/mcp/server.ts +307 -20
- package/src/media/image-endpoint.ts +167 -0
- package/src/media/local-runtime.ts +18 -5
- package/src/menus/index.ts +11 -4
- package/src/object-cache/codec.ts +73 -0
- package/src/object-cache/index.ts +495 -0
- package/src/object-cache/memory.ts +91 -0
- package/src/object-cache/types.ts +124 -0
- package/src/plugins/adapt-sandbox-entry.ts +11 -1
- package/src/plugins/context.ts +94 -22
- package/src/plugins/cron.ts +18 -2
- package/src/plugins/routes.ts +40 -1
- package/src/query.ts +304 -18
- package/src/schema/query.ts +11 -4
- package/src/schema/zod-generator.ts +53 -8
- package/src/settings/index.ts +18 -5
- package/src/taxonomies/index.ts +263 -165
- package/src/ui.ts +5 -0
- package/src/virtual-modules.d.ts +24 -0
- package/dist/api-DxjIV2o8.mjs.map +0 -1
- package/dist/api-tokens-BFFkB0jB.mjs.map +0 -1
- package/dist/byline-V_Qp1Ziw.mjs.map +0 -1
- package/dist/byline-fields-CQJRIQkn.d.mts.map +0 -1
- package/dist/comment-sqQxNpN3.mjs.map +0 -1
- package/dist/content-BIlVx-RX.mjs.map +0 -1
- package/dist/context-Cm4pt1Ws.mjs.map +0 -1
- package/dist/cron-DdEVrQ2Y.mjs.map +0 -1
- package/dist/index-D2VAiumu.d.mts.map +0 -1
- package/dist/init-lock-DlBHjf9-.mjs.map +0 -1
- package/dist/loader-BqWjcH3h.mjs.map +0 -1
- package/dist/menus-DX4_E01q.mjs.map +0 -1
- package/dist/menus-Ryk9L7fT.mjs.map +0 -1
- package/dist/query-Crm038Mc.mjs.map +0 -1
- package/dist/redirects-6Zg2SoYo.mjs.map +0 -1
- package/dist/runner--4wMWwKM.mjs.map +0 -1
- package/dist/schema-BDOkd3OU.mjs.map +0 -1
- package/dist/seo-DpNgGQjF.mjs.map +0 -1
- package/dist/settings-BjBsmVAo.mjs.map +0 -1
- package/dist/taxonomies-BBxYA38v.mjs.map +0 -1
- package/dist/taxonomy-CdllE4oq.mjs.map +0 -1
- package/dist/transport-1cIrOb1Y.mjs.map +0 -1
- package/dist/types-BTnnBYVX.d.mts.map +0 -1
- package/dist/types-BXSUSAjt.mjs.map +0 -1
- package/dist/version-BOjj_cfz.mjs +0 -7
- package/dist/zod-generator-CarzgPAu.mjs.map +0 -1
- /package/dist/{api-tokens-C7ywRx7l.mjs → api-tokens-B4BQybOp.mjs} +0 -0
- /package/dist/{ssrf-CRZGzjdL.mjs → ssrf-CcX9zvMK.mjs} +0 -0
- /package/dist/{types-BoRm8-pp.mjs → types-BvbeGEtr.mjs} +0 -0
|
@@ -172,6 +172,25 @@ export async function handleApiTokenRevoke(
|
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
174
|
|
|
175
|
+
/**
|
|
176
|
+
* Delete every token with the given name for a user, returning how many were
|
|
177
|
+
* removed. Token names aren't unique, so this is a bulk delete — used by the
|
|
178
|
+
* dev-bypass flow to keep a single `dev-bypass-token` instead of minting a new
|
|
179
|
+
* one on every reset.
|
|
180
|
+
*/
|
|
181
|
+
export async function deleteApiTokensByName(
|
|
182
|
+
db: Kysely<Database>,
|
|
183
|
+
userId: string,
|
|
184
|
+
name: string,
|
|
185
|
+
): Promise<number> {
|
|
186
|
+
const result = await db
|
|
187
|
+
.deleteFrom("_emdash_api_tokens")
|
|
188
|
+
.where("user_id", "=", userId)
|
|
189
|
+
.where("name", "=", name)
|
|
190
|
+
.executeTakeFirst();
|
|
191
|
+
return Number(result.numDeletedRows ?? 0n);
|
|
192
|
+
}
|
|
193
|
+
|
|
175
194
|
/**
|
|
176
195
|
* Resolve a raw API token (ec_pat_...) to a user ID and scopes.
|
|
177
196
|
* Updates last_used_at on successful lookup.
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Comment reaction handlers (Tier 1 of the best-in-class comments RFC).
|
|
3
|
+
*
|
|
4
|
+
* Business logic for toggling reactions and reading aggregate counts. Route
|
|
5
|
+
* files stay thin wrappers; these return `ApiResult<T>`.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import type { Kysely } from "kysely";
|
|
9
|
+
|
|
10
|
+
import {
|
|
11
|
+
CommentReactionRepository,
|
|
12
|
+
type ReactionCounts,
|
|
13
|
+
} from "#db/repositories/comment-reaction.js";
|
|
14
|
+
import type { Database } from "#db/types.js";
|
|
15
|
+
|
|
16
|
+
import { invalidateCommentObjectCache } from "../../object-cache/index.js";
|
|
17
|
+
import type { ApiResult } from "../types.js";
|
|
18
|
+
|
|
19
|
+
/** Max reactions a single voter may register per window before throttling. */
|
|
20
|
+
const REACTION_RATE_LIMIT = 30;
|
|
21
|
+
const REACTION_RATE_WINDOW_MINUTES = 10;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Reactions the system accepts. Positive-only for now (matches the shipped
|
|
25
|
+
* widget); kept as an allowlist so a voter can't spam arbitrary reaction
|
|
26
|
+
* strings and bloat a comment's count map. Extend (or make configurable) as
|
|
27
|
+
* the UI grows.
|
|
28
|
+
*/
|
|
29
|
+
const ALLOWED_REACTIONS: ReadonlySet<string> = new Set(["like"]);
|
|
30
|
+
|
|
31
|
+
export interface ReactionToggleResult {
|
|
32
|
+
commentId: string;
|
|
33
|
+
reaction: string;
|
|
34
|
+
/** true if the reaction was added, false if an existing one was removed */
|
|
35
|
+
reacted: boolean;
|
|
36
|
+
/** updated counts for this comment after the toggle */
|
|
37
|
+
counts: ReactionCounts;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface ReactionCountsResult {
|
|
41
|
+
/** comment id -> reaction counts */
|
|
42
|
+
reactions: Record<string, ReactionCounts>;
|
|
43
|
+
/** comment id -> reactions the current voter has active (omitted if anonymous) */
|
|
44
|
+
viewer?: Record<string, string[]>;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Toggle a reaction for a voter on an approved comment belonging to the given
|
|
49
|
+
* content item. Rate-limited per voter.
|
|
50
|
+
*/
|
|
51
|
+
export async function handleReactionToggle(
|
|
52
|
+
db: Kysely<Database>,
|
|
53
|
+
params: {
|
|
54
|
+
collection: string;
|
|
55
|
+
contentId: string;
|
|
56
|
+
commentId: string;
|
|
57
|
+
reaction: string;
|
|
58
|
+
voterHash: string;
|
|
59
|
+
},
|
|
60
|
+
): Promise<ApiResult<ReactionToggleResult>> {
|
|
61
|
+
try {
|
|
62
|
+
const { collection, contentId, commentId, reaction, voterHash } = params;
|
|
63
|
+
|
|
64
|
+
if (!ALLOWED_REACTIONS.has(reaction)) {
|
|
65
|
+
return {
|
|
66
|
+
success: false,
|
|
67
|
+
error: { code: "VALIDATION_ERROR", message: "Unsupported reaction" },
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// The comment must exist, be approved, and belong to this content item.
|
|
72
|
+
const comment = await db
|
|
73
|
+
.selectFrom("_emdash_comments")
|
|
74
|
+
.select(["id", "status"])
|
|
75
|
+
.where("id", "=", commentId)
|
|
76
|
+
.where("collection", "=", collection)
|
|
77
|
+
.where("content_id", "=", contentId)
|
|
78
|
+
.executeTakeFirst();
|
|
79
|
+
|
|
80
|
+
if (!comment) {
|
|
81
|
+
return { success: false, error: { code: "NOT_FOUND", message: "Comment not found" } };
|
|
82
|
+
}
|
|
83
|
+
if (comment.status !== "approved") {
|
|
84
|
+
return {
|
|
85
|
+
success: false,
|
|
86
|
+
error: { code: "COMMENT_NOT_APPROVED", message: "Cannot react to this comment" },
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
const repo = new CommentReactionRepository(db);
|
|
91
|
+
|
|
92
|
+
const recent = await repo.countRecentByVoter(voterHash, REACTION_RATE_WINDOW_MINUTES);
|
|
93
|
+
if (recent >= REACTION_RATE_LIMIT) {
|
|
94
|
+
return {
|
|
95
|
+
success: false,
|
|
96
|
+
error: { code: "RATE_LIMITED", message: "Too many reactions. Please try again later." },
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
const { reacted } = await repo.toggle({ commentId, reaction, voterHash });
|
|
101
|
+
const countsMap = await repo.countsForComments([commentId]);
|
|
102
|
+
|
|
103
|
+
// Reaction counts (and `best` ordering) are folded into cached getComments
|
|
104
|
+
// reads, so a toggle must orphan them.
|
|
105
|
+
invalidateCommentObjectCache();
|
|
106
|
+
|
|
107
|
+
return {
|
|
108
|
+
success: true,
|
|
109
|
+
data: { commentId, reaction, reacted, counts: countsMap.get(commentId) ?? {} },
|
|
110
|
+
};
|
|
111
|
+
} catch {
|
|
112
|
+
return {
|
|
113
|
+
success: false,
|
|
114
|
+
error: { code: "REACTION_TOGGLE_ERROR", message: "Failed to toggle reaction" },
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Read aggregate reaction counts for every approved comment on a content item,
|
|
121
|
+
* plus (optionally) which reactions the current voter has active.
|
|
122
|
+
*/
|
|
123
|
+
export async function handleReactionCounts(
|
|
124
|
+
db: Kysely<Database>,
|
|
125
|
+
collection: string,
|
|
126
|
+
contentId: string,
|
|
127
|
+
voterHash?: string,
|
|
128
|
+
): Promise<ApiResult<ReactionCountsResult>> {
|
|
129
|
+
try {
|
|
130
|
+
const comments = await db
|
|
131
|
+
.selectFrom("_emdash_comments")
|
|
132
|
+
.select("id")
|
|
133
|
+
.where("collection", "=", collection)
|
|
134
|
+
.where("content_id", "=", contentId)
|
|
135
|
+
.where("status", "=", "approved")
|
|
136
|
+
.execute();
|
|
137
|
+
|
|
138
|
+
const ids = comments.map((c) => c.id);
|
|
139
|
+
const repo = new CommentReactionRepository(db);
|
|
140
|
+
|
|
141
|
+
const countsMap = await repo.countsForComments(ids);
|
|
142
|
+
const reactions: Record<string, ReactionCounts> = {};
|
|
143
|
+
for (const [id, counts] of countsMap) {
|
|
144
|
+
reactions[id] = counts;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
const data: ReactionCountsResult = { reactions };
|
|
148
|
+
|
|
149
|
+
if (voterHash) {
|
|
150
|
+
const viewerMap = await repo.viewerReactions(ids, voterHash);
|
|
151
|
+
const viewer: Record<string, string[]> = {};
|
|
152
|
+
for (const [id, list] of viewerMap) {
|
|
153
|
+
viewer[id] = list;
|
|
154
|
+
}
|
|
155
|
+
data.viewer = viewer;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
return { success: true, data };
|
|
159
|
+
} catch {
|
|
160
|
+
return {
|
|
161
|
+
success: false,
|
|
162
|
+
error: { code: "REACTION_COUNTS_ERROR", message: "Failed to read reactions" },
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import type { Kysely } from "kysely";
|
|
6
6
|
|
|
7
7
|
import type { Database } from "../../database/types.js";
|
|
8
|
+
import { invalidateCollectionCache } from "../../object-cache/index.js";
|
|
8
9
|
import {
|
|
9
10
|
SchemaRegistry,
|
|
10
11
|
SchemaError,
|
|
@@ -315,6 +316,9 @@ export async function handleSchemaFieldCreate(
|
|
|
315
316
|
const registry = new SchemaRegistry(db);
|
|
316
317
|
const item = await registry.createField(collectionSlug, input);
|
|
317
318
|
|
|
319
|
+
// Content snapshots embed field values; a column change invalidates them.
|
|
320
|
+
invalidateCollectionCache(collectionSlug);
|
|
321
|
+
|
|
318
322
|
return {
|
|
319
323
|
success: true,
|
|
320
324
|
data: { item },
|
|
@@ -353,6 +357,8 @@ export async function handleSchemaFieldUpdate(
|
|
|
353
357
|
const registry = new SchemaRegistry(db);
|
|
354
358
|
const item = await registry.updateField(collectionSlug, fieldSlug, input);
|
|
355
359
|
|
|
360
|
+
invalidateCollectionCache(collectionSlug);
|
|
361
|
+
|
|
356
362
|
return {
|
|
357
363
|
success: true,
|
|
358
364
|
data: { item },
|
|
@@ -390,6 +396,8 @@ export async function handleSchemaFieldDelete(
|
|
|
390
396
|
const registry = new SchemaRegistry(db);
|
|
391
397
|
await registry.deleteField(collectionSlug, fieldSlug);
|
|
392
398
|
|
|
399
|
+
invalidateCollectionCache(collectionSlug);
|
|
400
|
+
|
|
393
401
|
return {
|
|
394
402
|
success: true,
|
|
395
403
|
data: { success: true },
|
|
@@ -19,6 +19,14 @@ export const bylineSummarySchema = z
|
|
|
19
19
|
*/
|
|
20
20
|
avatarStorageKey: z.string().nullish(),
|
|
21
21
|
avatarAlt: z.string().nullish(),
|
|
22
|
+
/**
|
|
23
|
+
* Avatar media LQIP placeholder (blurhash + dominant colour, migration
|
|
24
|
+
* 024), from the same media join. Lets clients render a placeholder
|
|
25
|
+
* while the avatar loads. Null under the same conditions as
|
|
26
|
+
* `avatarStorageKey`.
|
|
27
|
+
*/
|
|
28
|
+
avatarBlurhash: z.string().nullish(),
|
|
29
|
+
avatarDominantColor: z.string().nullish(),
|
|
22
30
|
websiteUrl: z.string().nullable(),
|
|
23
31
|
userId: z.string().nullable(),
|
|
24
32
|
isGuest: z.boolean(),
|
|
@@ -15,6 +15,16 @@ export const createCommentBody = z
|
|
|
15
15
|
})
|
|
16
16
|
.meta({ id: "CreateCommentBody" });
|
|
17
17
|
|
|
18
|
+
export const createReactionBody = z
|
|
19
|
+
.object({
|
|
20
|
+
commentId: z.string().min(1),
|
|
21
|
+
/** Reaction name. Positive-only ("like") by default; extensible. */
|
|
22
|
+
reaction: z.string().min(1).max(20).default("like"),
|
|
23
|
+
/** Honeypot field — hidden in the form, filled only by bots */
|
|
24
|
+
website_url: z.string().optional(),
|
|
25
|
+
})
|
|
26
|
+
.meta({ id: "CreateReactionBody" });
|
|
27
|
+
|
|
18
28
|
export const commentStatusBody = z
|
|
19
29
|
.object({
|
|
20
30
|
status: z.enum(["approved", "pending", "spam", "trash"]),
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Node image endpoint -- the `image.endpoint` EmDash installs on non-Cloudflare
|
|
3
|
+
* platforms whose image service is local (sharp).
|
|
4
|
+
*
|
|
5
|
+
* It wraps Astro's generic endpoint: for an EmDash media URL it loads the source
|
|
6
|
+
* bytes straight from the storage adapter (no HTTP, so it works behind any auth
|
|
7
|
+
* gate) and runs the configured image service's `transform`; every other image
|
|
8
|
+
* is delegated to the stock endpoint unchanged.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import type { APIRoute } from "astro";
|
|
12
|
+
// @ts-ignore - astro/assets internal endpoint, resolved by the consumer's Astro build
|
|
13
|
+
import { GET as genericGET } from "astro/assets/endpoint/generic";
|
|
14
|
+
// @ts-ignore - astro:assets is resolved by the consumer's Astro build
|
|
15
|
+
import { getConfiguredImageService, imageConfig } from "astro:assets";
|
|
16
|
+
|
|
17
|
+
import {
|
|
18
|
+
IMMUTABLE_IMAGE_CACHE,
|
|
19
|
+
matchInternalMediaKey,
|
|
20
|
+
originalMediaHeaders,
|
|
21
|
+
} from "../media/image-endpoint.js";
|
|
22
|
+
|
|
23
|
+
export const prerender = false;
|
|
24
|
+
|
|
25
|
+
const FORMAT_MIME: Record<string, string> = {
|
|
26
|
+
webp: "image/webp",
|
|
27
|
+
avif: "image/avif",
|
|
28
|
+
png: "image/png",
|
|
29
|
+
jpeg: "image/jpeg",
|
|
30
|
+
jpg: "image/jpeg",
|
|
31
|
+
gif: "image/gif",
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
function isNotFound(error: unknown): boolean {
|
|
35
|
+
return (
|
|
36
|
+
error instanceof Error &&
|
|
37
|
+
(error.message.includes("not found") || error.message.includes("NOT_FOUND"))
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function streamOriginal(body: ReadableStream<Uint8Array>, contentType: string): Response {
|
|
42
|
+
return new Response(body, { status: 200, headers: originalMediaHeaders(contentType) });
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export const GET: APIRoute = async (ctx) => {
|
|
46
|
+
const url = new URL(ctx.request.url);
|
|
47
|
+
const key = matchInternalMediaKey(url.searchParams.get("href"));
|
|
48
|
+
const storage = ctx.locals.emdash?.storage;
|
|
49
|
+
|
|
50
|
+
// Not EmDash media, or storage unavailable: let the stock endpoint handle it
|
|
51
|
+
// (bundled assets, allowed remote, `publicUrl` media).
|
|
52
|
+
if (!key || !storage) return genericGET(ctx);
|
|
53
|
+
|
|
54
|
+
const service = await getConfiguredImageService();
|
|
55
|
+
if (!("transform" in service)) return genericGET(ctx);
|
|
56
|
+
|
|
57
|
+
try {
|
|
58
|
+
const source = await storage.download(key);
|
|
59
|
+
|
|
60
|
+
// Only raster images are transformable; serve anything else unchanged.
|
|
61
|
+
if (!source.contentType.startsWith("image/")) {
|
|
62
|
+
return streamOriginal(source.body, source.contentType);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
const transform = await service.parseURL(url, imageConfig);
|
|
66
|
+
if (!transform) return streamOriginal(source.body, source.contentType);
|
|
67
|
+
|
|
68
|
+
const inputBuffer = new Uint8Array(await new Response(source.body).arrayBuffer());
|
|
69
|
+
const { data, format } = await service.transform(inputBuffer, transform, imageConfig);
|
|
70
|
+
|
|
71
|
+
return new Response(data, {
|
|
72
|
+
status: 200,
|
|
73
|
+
headers: {
|
|
74
|
+
"Content-Type": FORMAT_MIME[format] ?? source.contentType,
|
|
75
|
+
"Cache-Control": IMMUTABLE_IMAGE_CACHE,
|
|
76
|
+
"X-Content-Type-Options": "nosniff",
|
|
77
|
+
},
|
|
78
|
+
});
|
|
79
|
+
} catch (error) {
|
|
80
|
+
if (isNotFound(error)) return new Response("Not Found", { status: 404 });
|
|
81
|
+
console.error("[emdash] image transform failed:", error);
|
|
82
|
+
return new Response("Internal Server Error", { status: 500 });
|
|
83
|
+
}
|
|
84
|
+
};
|
package/src/astro/index.ts
CHANGED
|
@@ -21,6 +21,12 @@ export type {
|
|
|
21
21
|
export { local, s3 } from "./storage/index.js";
|
|
22
22
|
export type { StorageDescriptor, LocalStorageConfig, S3StorageConfig } from "./storage/index.js";
|
|
23
23
|
|
|
24
|
+
// Object cache adapters (for integration config)
|
|
25
|
+
// Note: For Cloudflare KV, use `kvCache()` from `@emdash-cms/cloudflare`
|
|
26
|
+
export { memoryCache } from "./object-cache/adapters.js";
|
|
27
|
+
export type { MemoryCacheOptions } from "./object-cache/adapters.js";
|
|
28
|
+
export type { ObjectCacheDescriptor, ObjectCacheRuntimeConfig } from "../object-cache/types.js";
|
|
29
|
+
|
|
24
30
|
// Integration (build-time only - the emdash() function uses Node.js APIs)
|
|
25
31
|
export { default } from "./integration/index.js";
|
|
26
32
|
export { getStoredConfig } from "./integration/runtime.js";
|
|
@@ -70,26 +70,21 @@ interface ImageRemotePattern {
|
|
|
70
70
|
/**
|
|
71
71
|
* Build `image.remotePatterns` entries so Astro will optimize EmDash media.
|
|
72
72
|
*
|
|
73
|
-
* Astro's image services only transform
|
|
74
|
-
*
|
|
75
|
-
* media sources automatically:
|
|
73
|
+
* Astro's image services only build a transform URL for sources allowed via
|
|
74
|
+
* `image.domains` / `image.remotePatterns` (relative URLs are never optimized —
|
|
75
|
+
* see `isRemoteAllowed`). We authorize the media sources automatically:
|
|
76
76
|
*
|
|
77
|
-
* 1. The storage adapter's public URL host (R2 custom domain, S3/CDN)
|
|
78
|
-
* media served directly from a public bucket is optimized.
|
|
77
|
+
* 1. The storage adapter's public URL host (R2 custom domain, S3/CDN).
|
|
79
78
|
* 2. The site's own origin, scoped to the media proxy route
|
|
80
|
-
* (`/_emdash/api/media/file/**`), so same-origin proxied media
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
* build time, so we register a host-agnostic pattern scoped to the media
|
|
87
|
-
* route. This is dev-only — it never ships in a production build — so the
|
|
88
|
-
* missing host check can't be abused on a deployed site.
|
|
79
|
+
* (`/_emdash/api/media/file/**`), so same-origin proxied media is optimized.
|
|
80
|
+
* The components absolutize the media URL against this origin; EmDash's
|
|
81
|
+
* wrapped image endpoint then serves the bytes from storage (so the absolute
|
|
82
|
+
* URL is never fetched). Only registered when `siteUrl` is known at build.
|
|
83
|
+
* 3. In `astro dev` the dev-server origin isn't known at build time, so we
|
|
84
|
+
* register a host-agnostic pattern scoped to the media route. Dev-only.
|
|
89
85
|
*
|
|
90
|
-
* Returns an empty array when no source is statically known (
|
|
91
|
-
*
|
|
92
|
-
* a plain `<img>`.
|
|
86
|
+
* Returns an empty array when no source is statically known (production build,
|
|
87
|
+
* local storage, no `siteUrl`), in which case media renders as a plain `<img>`.
|
|
93
88
|
*
|
|
94
89
|
* @internal Exported for unit testing.
|
|
95
90
|
*/
|
|
@@ -147,6 +142,59 @@ export function buildImageRemotePatterns(
|
|
|
147
142
|
return patterns;
|
|
148
143
|
}
|
|
149
144
|
|
|
145
|
+
/**
|
|
146
|
+
* Stock image endpoints EmDash may safely replace with its storage-backed
|
|
147
|
+
* wrapper. Our wrapper delegates non-EmDash images to the platform's transform
|
|
148
|
+
* endpoint, so we only override endpoints whose transform we can delegate to.
|
|
149
|
+
*/
|
|
150
|
+
const OVERRIDABLE_IMAGE_ENDPOINTS = new Set([
|
|
151
|
+
"astro/assets/endpoint/generic",
|
|
152
|
+
"astro/assets/endpoint/node",
|
|
153
|
+
"astro/assets/endpoint/dev",
|
|
154
|
+
"@astrojs/cloudflare/image-transform-endpoint",
|
|
155
|
+
]);
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Stock endpoints that deliberately don't transform (the user opted into
|
|
159
|
+
* passthrough). We leave these untouched -- and without a warning, since it's a
|
|
160
|
+
* supported choice, not a custom endpoint. Overriding would route non-EmDash
|
|
161
|
+
* images through a transformer the passthrough setup doesn't provide.
|
|
162
|
+
*/
|
|
163
|
+
const PASSTHROUGH_IMAGE_ENDPOINTS = new Set(["@astrojs/cloudflare/image-passthrough-endpoint"]);
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Decide which image endpoint to install (if any). EmDash wraps Astro's image
|
|
167
|
+
* endpoint so EmDash media bytes load from storage; the wrapper delegates other
|
|
168
|
+
* images back to the platform's stock endpoint.
|
|
169
|
+
*
|
|
170
|
+
* Returns `{ entrypoint }` to install, `{ warn }` to skip with a warning (a
|
|
171
|
+
* custom endpoint we can't delegate to), or `{}` to skip silently (opted out).
|
|
172
|
+
*
|
|
173
|
+
* @internal Exported for unit testing.
|
|
174
|
+
*/
|
|
175
|
+
export function resolveImageEndpoint(opts: {
|
|
176
|
+
imagesDisabled: boolean;
|
|
177
|
+
currentEntrypoint: string | undefined;
|
|
178
|
+
isCloudflare: boolean;
|
|
179
|
+
}): { entrypoint?: string; warn?: string } {
|
|
180
|
+
if (opts.imagesDisabled) return {};
|
|
181
|
+
const current = opts.currentEntrypoint;
|
|
182
|
+
if (current === undefined || OVERRIDABLE_IMAGE_ENDPOINTS.has(current)) {
|
|
183
|
+
return {
|
|
184
|
+
entrypoint: opts.isCloudflare
|
|
185
|
+
? "@emdash-cms/cloudflare/image-endpoint"
|
|
186
|
+
: "emdash/image-endpoint",
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
// A deliberate passthrough setup: leave it alone, no warning.
|
|
190
|
+
if (PASSTHROUGH_IMAGE_ENDPOINTS.has(current)) return {};
|
|
191
|
+
return {
|
|
192
|
+
warn:
|
|
193
|
+
`A custom image.endpoint (${current}) is configured; EmDash will not wrap ` +
|
|
194
|
+
`it, so storage-backed media may render unoptimized.`,
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
|
|
150
198
|
// Terminal formatting
|
|
151
199
|
const dim = (s: string) => `\x1b[2m${s}\x1b[22m`;
|
|
152
200
|
const bold = (s: string) => `\x1b[1m${s}\x1b[22m`;
|
|
@@ -402,19 +450,32 @@ export function emdash(config: EmDashConfig = {}): AstroIntegration {
|
|
|
402
450
|
},
|
|
403
451
|
];
|
|
404
452
|
|
|
405
|
-
// Authorize media sources
|
|
406
|
-
//
|
|
407
|
-
//
|
|
408
|
-
// user-configured remotePatterns are preserved.
|
|
453
|
+
// Authorize media sources so Astro's image service builds transform
|
|
454
|
+
// URLs for them (it won't optimize an un-allowed source). `updateConfig`
|
|
455
|
+
// merges arrays, so user-configured remotePatterns are preserved.
|
|
409
456
|
const imageRemotePatterns = buildImageRemotePatterns(
|
|
410
457
|
resolvedConfig.storage,
|
|
411
458
|
resolvedConfig.siteUrl,
|
|
412
459
|
command,
|
|
413
460
|
);
|
|
414
461
|
|
|
462
|
+
// Wrap Astro's image endpoint so EmDash media bytes load straight from
|
|
463
|
+
// storage (Access-safe) instead of over HTTP. Skip when the user opts
|
|
464
|
+
// out or has a custom endpoint we can't delegate back to.
|
|
465
|
+
const { entrypoint: imageEndpoint, warn: imageEndpointWarning } = resolveImageEndpoint({
|
|
466
|
+
imagesDisabled: resolvedConfig.images === false,
|
|
467
|
+
currentEntrypoint: astroConfig.image?.endpoint?.entrypoint,
|
|
468
|
+
isCloudflare: astroConfig.adapter?.name === "@astrojs/cloudflare",
|
|
469
|
+
});
|
|
470
|
+
if (imageEndpointWarning) logger.warn(imageEndpointWarning);
|
|
471
|
+
|
|
472
|
+
const imageConfig: Record<string, unknown> = {};
|
|
473
|
+
if (imageRemotePatterns.length) imageConfig.remotePatterns = imageRemotePatterns;
|
|
474
|
+
if (imageEndpoint) imageConfig.endpoint = { entrypoint: imageEndpoint };
|
|
475
|
+
|
|
415
476
|
updateConfig({
|
|
416
477
|
security: securityConfig,
|
|
417
|
-
...(
|
|
478
|
+
...(Object.keys(imageConfig).length ? { image: imageConfig } : {}),
|
|
418
479
|
// fonts is a valid AstroConfig key but may not be in the
|
|
419
480
|
// type definition for the minimum supported Astro version
|
|
420
481
|
...({ fonts: emdashFonts } as Record<string, unknown>),
|
|
@@ -758,6 +758,11 @@ export function injectCoreRoutes(
|
|
|
758
758
|
entrypoint: resolveRoute("api/comments/[collection]/[contentId]/index.ts"),
|
|
759
759
|
});
|
|
760
760
|
|
|
761
|
+
injectRoute({
|
|
762
|
+
pattern: "/_emdash/api/comments/[collection]/[contentId]/reactions",
|
|
763
|
+
entrypoint: resolveRoute("api/comments/[collection]/[contentId]/reactions.ts"),
|
|
764
|
+
});
|
|
765
|
+
|
|
761
766
|
// Comment routes (admin)
|
|
762
767
|
injectRoute({
|
|
763
768
|
pattern: "/_emdash/api/admin/comments",
|
|
@@ -10,7 +10,12 @@
|
|
|
10
10
|
import type { AuthDescriptor, AuthProviderDescriptor } from "../../auth/types.js";
|
|
11
11
|
import type { DatabaseDescriptor } from "../../db/adapters.js";
|
|
12
12
|
import type { MediaProviderDescriptor } from "../../media/types.js";
|
|
13
|
-
import type {
|
|
13
|
+
import type { ObjectCacheDescriptor } from "../../object-cache/types.js";
|
|
14
|
+
import type {
|
|
15
|
+
FieldWidgetConfig,
|
|
16
|
+
PortableTextBlockConfig,
|
|
17
|
+
ResolvedPlugin,
|
|
18
|
+
} from "../../plugins/types.js";
|
|
14
19
|
import type { ExperimentalConfig } from "../../registry/types.js";
|
|
15
20
|
import type { StorageDescriptor } from "../storage/types.js";
|
|
16
21
|
|
|
@@ -98,6 +103,15 @@ export interface PluginDescriptor<TOptions = Record<string, unknown>> {
|
|
|
98
103
|
adminPages?: PluginAdminPage[];
|
|
99
104
|
/** Dashboard widgets */
|
|
100
105
|
adminWidgets?: PluginDashboardWidget[];
|
|
106
|
+
/**
|
|
107
|
+
* Portable Text block types this plugin contributes to the editor.
|
|
108
|
+
* Declarative (Block Kit) — surfaced in the admin slash menu and consumed
|
|
109
|
+
* from the manifest, so standard/sandboxed plugins can contribute blocks
|
|
110
|
+
* without a native render component.
|
|
111
|
+
*/
|
|
112
|
+
portableTextBlocks?: PortableTextBlockConfig[];
|
|
113
|
+
/** Field widget types this plugin contributes for schema-field editing UIs. */
|
|
114
|
+
fieldWidgets?: FieldWidgetConfig[];
|
|
101
115
|
|
|
102
116
|
// === Sandbox-specific fields (for sandboxed plugins) ===
|
|
103
117
|
|
|
@@ -151,6 +165,56 @@ export interface EmDashConfig {
|
|
|
151
165
|
* Storage configuration (for media)
|
|
152
166
|
*/
|
|
153
167
|
storage?: StorageDescriptor;
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Optional distributed object cache for query results.
|
|
171
|
+
*
|
|
172
|
+
* Off by default. When configured, content and chrome (settings, menus,
|
|
173
|
+
* taxonomies) reads are cached in a fast key/value store and served without
|
|
174
|
+
* touching the database on repeat requests across isolates. This offloads
|
|
175
|
+
* read pressure from D1/SQLite, which is especially valuable on Cloudflare
|
|
176
|
+
* where D1 has far lower request capacity than KV.
|
|
177
|
+
*
|
|
178
|
+
* Use a backend adapter:
|
|
179
|
+
* - `memoryCache()` from `emdash/astro` — in-isolate (Node / local dev)
|
|
180
|
+
* - `kvCache({ binding: "CACHE" })` from `@emdash-cms/cloudflare` — KV
|
|
181
|
+
*
|
|
182
|
+
* Preview and visual-edit requests bypass the cache, so editors previewing
|
|
183
|
+
* see live content. All other reads — including authenticated browsing outside
|
|
184
|
+
* edit mode — are served from the cache, which only ever stores published
|
|
185
|
+
* content. After an edit, anonymous visitors may see stale content until other
|
|
186
|
+
* isolates pick up the bumped epoch: immediate with the memory backend, and on
|
|
187
|
+
* KV bounded by KV's edge-cache propagation (eventual consistency, up to ~60s)
|
|
188
|
+
* plus the isolate-local `revalidate` window (default 1s).
|
|
189
|
+
*
|
|
190
|
+
* Scheduled content becomes visible at query time (no write event fires when
|
|
191
|
+
* its publish time passes), so a cached list/entry won't surface a newly-due
|
|
192
|
+
* scheduled item until the next write to that collection or until the
|
|
193
|
+
* entry's TTL lapses (`defaultTtl`, default 1h). Sites that rely on precise
|
|
194
|
+
* scheduled publishing should lower `defaultTtl` accordingly.
|
|
195
|
+
*
|
|
196
|
+
* @example
|
|
197
|
+
* ```ts
|
|
198
|
+
* import { kvCache } from "@emdash-cms/cloudflare";
|
|
199
|
+
*
|
|
200
|
+
* emdash({
|
|
201
|
+
* database: d1({ binding: "DB" }),
|
|
202
|
+
* objectCache: kvCache({ binding: "CACHE" }),
|
|
203
|
+
* })
|
|
204
|
+
* ```
|
|
205
|
+
*/
|
|
206
|
+
objectCache?: ObjectCacheDescriptor;
|
|
207
|
+
/**
|
|
208
|
+
* Image optimization.
|
|
209
|
+
*
|
|
210
|
+
* By default EmDash wraps Astro's image endpoint so media served from
|
|
211
|
+
* storage is optimized through the normal `<Image>` / `getImage` pipeline,
|
|
212
|
+
* loading source bytes directly from the storage adapter (works behind
|
|
213
|
+
* Cloudflare Access). Set to `false` to leave Astro's image endpoint
|
|
214
|
+
* untouched -- media then renders as a plain `<img>` unless your image
|
|
215
|
+
* service can fetch it over HTTP.
|
|
216
|
+
*/
|
|
217
|
+
images?: boolean;
|
|
154
218
|
/**
|
|
155
219
|
* Trusted plugins to load (run in main isolate)
|
|
156
220
|
*
|