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
|
@@ -2,6 +2,10 @@ import { sql, type Kysely, type Selectable } from "kysely";
|
|
|
2
2
|
import { ulid } from "ulidx";
|
|
3
3
|
|
|
4
4
|
import { getBylineFieldDefs } from "../../bylines/field-defs-cache.js";
|
|
5
|
+
import {
|
|
6
|
+
invalidateBylineObjectCache,
|
|
7
|
+
invalidateCollectionCache,
|
|
8
|
+
} from "../../object-cache/index.js";
|
|
5
9
|
import {
|
|
6
10
|
clearRequestCacheEntry,
|
|
7
11
|
peekRequestCache,
|
|
@@ -33,6 +37,8 @@ type BylineRow = Selectable<BylineTable>;
|
|
|
33
37
|
type BylineRowWithAvatar = BylineRow & {
|
|
34
38
|
avatar_storage_key?: string | null;
|
|
35
39
|
avatar_alt?: string | null;
|
|
40
|
+
avatar_blurhash?: string | null;
|
|
41
|
+
avatar_dominant_color?: string | null;
|
|
36
42
|
};
|
|
37
43
|
|
|
38
44
|
export interface CreateBylineInput {
|
|
@@ -109,6 +115,8 @@ function rowToByline(row: BylineRowWithAvatar): BylineSummary {
|
|
|
109
115
|
avatarMediaId: row.avatar_media_id,
|
|
110
116
|
avatarStorageKey: row.avatar_storage_key ?? null,
|
|
111
117
|
avatarAlt: row.avatar_alt ?? null,
|
|
118
|
+
avatarBlurhash: row.avatar_blurhash ?? null,
|
|
119
|
+
avatarDominantColor: row.avatar_dominant_color ?? null,
|
|
112
120
|
websiteUrl: row.website_url,
|
|
113
121
|
userId: row.user_id,
|
|
114
122
|
isGuest: row.is_guest === 1,
|
|
@@ -773,6 +781,7 @@ export class BylineRepository {
|
|
|
773
781
|
if (touchedGroupShared) {
|
|
774
782
|
clearRequestCacheEntry(`byline-field-group-values:${translationGroup}`);
|
|
775
783
|
}
|
|
784
|
+
invalidateBylineObjectCache();
|
|
776
785
|
|
|
777
786
|
const byline = await this.findById(id);
|
|
778
787
|
if (!byline) {
|
|
@@ -820,6 +829,7 @@ export class BylineRepository {
|
|
|
820
829
|
if (touchedGroupShared) {
|
|
821
830
|
clearRequestCacheEntry(`byline-field-group-values:${group}`);
|
|
822
831
|
}
|
|
832
|
+
invalidateBylineObjectCache();
|
|
823
833
|
|
|
824
834
|
return await this.findById(id);
|
|
825
835
|
}
|
|
@@ -908,6 +918,7 @@ export class BylineRepository {
|
|
|
908
918
|
}
|
|
909
919
|
});
|
|
910
920
|
|
|
921
|
+
invalidateBylineObjectCache();
|
|
911
922
|
return true;
|
|
912
923
|
}
|
|
913
924
|
|
|
@@ -937,6 +948,8 @@ export class BylineRepository {
|
|
|
937
948
|
"b.avatar_media_id as avatar_media_id",
|
|
938
949
|
"m.storage_key as avatar_storage_key",
|
|
939
950
|
"m.alt as avatar_alt",
|
|
951
|
+
"m.blurhash as avatar_blurhash",
|
|
952
|
+
"m.dominant_color as avatar_dominant_color",
|
|
940
953
|
"b.website_url as website_url",
|
|
941
954
|
"b.user_id as user_id",
|
|
942
955
|
"b.is_guest as is_guest",
|
|
@@ -964,6 +977,8 @@ export class BylineRepository {
|
|
|
964
977
|
avatar_media_id: row.avatar_media_id,
|
|
965
978
|
avatar_storage_key: row.avatar_storage_key,
|
|
966
979
|
avatar_alt: row.avatar_alt,
|
|
980
|
+
avatar_blurhash: row.avatar_blurhash,
|
|
981
|
+
avatar_dominant_color: row.avatar_dominant_color,
|
|
967
982
|
website_url: row.website_url,
|
|
968
983
|
user_id: row.user_id,
|
|
969
984
|
is_guest: row.is_guest,
|
|
@@ -1073,6 +1088,8 @@ export class BylineRepository {
|
|
|
1073
1088
|
"b.avatar_media_id as avatar_media_id",
|
|
1074
1089
|
"m.storage_key as avatar_storage_key",
|
|
1075
1090
|
"m.alt as avatar_alt",
|
|
1091
|
+
"m.blurhash as avatar_blurhash",
|
|
1092
|
+
"m.dominant_color as avatar_dominant_color",
|
|
1076
1093
|
"b.website_url as website_url",
|
|
1077
1094
|
"b.user_id as user_id",
|
|
1078
1095
|
"b.is_guest as is_guest",
|
|
@@ -1097,6 +1114,8 @@ export class BylineRepository {
|
|
|
1097
1114
|
avatar_media_id: row.avatar_media_id,
|
|
1098
1115
|
avatar_storage_key: row.avatar_storage_key,
|
|
1099
1116
|
avatar_alt: row.avatar_alt,
|
|
1117
|
+
avatar_blurhash: row.avatar_blurhash,
|
|
1118
|
+
avatar_dominant_color: row.avatar_dominant_color,
|
|
1100
1119
|
website_url: row.website_url,
|
|
1101
1120
|
user_id: row.user_id,
|
|
1102
1121
|
is_guest: row.is_guest,
|
|
@@ -1175,6 +1194,8 @@ export class BylineRepository {
|
|
|
1175
1194
|
"b.avatar_media_id as avatar_media_id",
|
|
1176
1195
|
"m.storage_key as avatar_storage_key",
|
|
1177
1196
|
"m.alt as avatar_alt",
|
|
1197
|
+
"m.blurhash as avatar_blurhash",
|
|
1198
|
+
"m.dominant_color as avatar_dominant_color",
|
|
1178
1199
|
"b.website_url as website_url",
|
|
1179
1200
|
"b.user_id as user_id",
|
|
1180
1201
|
"b.is_guest as is_guest",
|
|
@@ -1271,6 +1292,9 @@ export class BylineRepository {
|
|
|
1271
1292
|
SET primary_byline_id = ${firstByline}
|
|
1272
1293
|
WHERE id = ${targetContentId}
|
|
1273
1294
|
`.execute(this.db);
|
|
1295
|
+
|
|
1296
|
+
// Byline credits are folded into the target entry's cached payload.
|
|
1297
|
+
invalidateCollectionCache(collection);
|
|
1274
1298
|
}
|
|
1275
1299
|
|
|
1276
1300
|
/**
|
|
@@ -1365,6 +1389,9 @@ export class BylineRepository {
|
|
|
1365
1389
|
WHERE id = ${contentId}
|
|
1366
1390
|
`.execute(this.db);
|
|
1367
1391
|
|
|
1392
|
+
// Byline credits are folded into this entry's cached payload.
|
|
1393
|
+
invalidateCollectionCache(collectionSlug);
|
|
1394
|
+
|
|
1368
1395
|
return await this.getContentBylines(collectionSlug, contentId);
|
|
1369
1396
|
}
|
|
1370
1397
|
}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import type { Kysely } from "kysely";
|
|
2
|
+
import { ulid } from "ulidx";
|
|
3
|
+
|
|
4
|
+
import { SQL_BATCH_SIZE, chunks } from "../../utils/chunks.js";
|
|
5
|
+
import type { Database } from "../types.js";
|
|
6
|
+
|
|
7
|
+
/** Per-comment reaction counts: `{ like: 12, love: 3 }`. */
|
|
8
|
+
export type ReactionCounts = Record<string, number>;
|
|
9
|
+
|
|
10
|
+
export interface ToggleReactionInput {
|
|
11
|
+
commentId: string;
|
|
12
|
+
reaction: string;
|
|
13
|
+
voterHash: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Repository for comment reactions (likes / emoji).
|
|
18
|
+
*
|
|
19
|
+
* Reactions are deduped per (comment, voter, reaction) by a unique index, so
|
|
20
|
+
* a second toggle of the same reaction by the same voter removes it.
|
|
21
|
+
*/
|
|
22
|
+
export class CommentReactionRepository {
|
|
23
|
+
constructor(private db: Kysely<Database>) {}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Toggle a reaction for a voter on a comment.
|
|
27
|
+
*
|
|
28
|
+
* @returns `{ reacted: true }` if the reaction was added, `{ reacted: false }`
|
|
29
|
+
* if an existing reaction was removed.
|
|
30
|
+
*/
|
|
31
|
+
async toggle(input: ToggleReactionInput): Promise<{ reacted: boolean }> {
|
|
32
|
+
// Idempotent add: insert, or no-op if this voter already has this
|
|
33
|
+
// reaction. Using ON CONFLICT (rather than read-then-write) avoids a
|
|
34
|
+
// TOCTOU race where two concurrent toggles both see "no row" and the
|
|
35
|
+
// second INSERT violates the unique index — the old path surfaced that
|
|
36
|
+
// as a 500. The unique index doubles as the conflict target.
|
|
37
|
+
const inserted = await this.db
|
|
38
|
+
.insertInto("_emdash_comment_reactions")
|
|
39
|
+
.values({
|
|
40
|
+
id: ulid(),
|
|
41
|
+
comment_id: input.commentId,
|
|
42
|
+
reaction: input.reaction,
|
|
43
|
+
voter_hash: input.voterHash,
|
|
44
|
+
created_at: new Date().toISOString(),
|
|
45
|
+
})
|
|
46
|
+
.onConflict((oc) => oc.columns(["comment_id", "voter_hash", "reaction"]).doNothing())
|
|
47
|
+
.executeTakeFirst();
|
|
48
|
+
|
|
49
|
+
if ((inserted.numInsertedOrUpdatedRows ?? 0n) > 0n) {
|
|
50
|
+
return { reacted: true };
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// The reaction already existed → toggle it off.
|
|
54
|
+
await this.db
|
|
55
|
+
.deleteFrom("_emdash_comment_reactions")
|
|
56
|
+
.where("comment_id", "=", input.commentId)
|
|
57
|
+
.where("voter_hash", "=", input.voterHash)
|
|
58
|
+
.where("reaction", "=", input.reaction)
|
|
59
|
+
.execute();
|
|
60
|
+
return { reacted: false };
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Aggregate reaction counts for a set of comments.
|
|
65
|
+
*
|
|
66
|
+
* @returns a Map keyed by comment id; comments with no reactions are absent.
|
|
67
|
+
*/
|
|
68
|
+
async countsForComments(commentIds: string[]): Promise<Map<string, ReactionCounts>> {
|
|
69
|
+
const result = new Map<string, ReactionCounts>();
|
|
70
|
+
if (commentIds.length === 0) return result;
|
|
71
|
+
|
|
72
|
+
for (const batch of chunks(commentIds, SQL_BATCH_SIZE)) {
|
|
73
|
+
const rows = await this.db
|
|
74
|
+
.selectFrom("_emdash_comment_reactions")
|
|
75
|
+
.select(["comment_id", "reaction"])
|
|
76
|
+
.select((eb) => eb.fn.count<number>("id").as("count"))
|
|
77
|
+
.where("comment_id", "in", batch)
|
|
78
|
+
.groupBy(["comment_id", "reaction"])
|
|
79
|
+
.execute();
|
|
80
|
+
|
|
81
|
+
for (const row of rows) {
|
|
82
|
+
const counts = result.get(row.comment_id) ?? {};
|
|
83
|
+
counts[row.reaction] = Number(row.count);
|
|
84
|
+
result.set(row.comment_id, counts);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
return result;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Which reactions a given voter has set, per comment.
|
|
93
|
+
*
|
|
94
|
+
* @returns a Map keyed by comment id whose values are the reaction names the
|
|
95
|
+
* voter has active on that comment.
|
|
96
|
+
*/
|
|
97
|
+
async viewerReactions(commentIds: string[], voterHash: string): Promise<Map<string, string[]>> {
|
|
98
|
+
const result = new Map<string, string[]>();
|
|
99
|
+
if (commentIds.length === 0) return result;
|
|
100
|
+
|
|
101
|
+
for (const batch of chunks(commentIds, SQL_BATCH_SIZE)) {
|
|
102
|
+
const rows = await this.db
|
|
103
|
+
.selectFrom("_emdash_comment_reactions")
|
|
104
|
+
.select(["comment_id", "reaction"])
|
|
105
|
+
.where("comment_id", "in", batch)
|
|
106
|
+
.where("voter_hash", "=", voterHash)
|
|
107
|
+
.execute();
|
|
108
|
+
|
|
109
|
+
for (const row of rows) {
|
|
110
|
+
const list = result.get(row.comment_id) ?? [];
|
|
111
|
+
list.push(row.reaction);
|
|
112
|
+
result.set(row.comment_id, list);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
return result;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Count a voter's reactions within a recent time window (for rate limiting).
|
|
121
|
+
*/
|
|
122
|
+
async countRecentByVoter(voterHash: string, windowMinutes = 10): Promise<number> {
|
|
123
|
+
const cutoff = new Date(Date.now() - windowMinutes * 60 * 1000).toISOString();
|
|
124
|
+
const result = await this.db
|
|
125
|
+
.selectFrom("_emdash_comment_reactions")
|
|
126
|
+
.select((eb) => eb.fn.count<number>("id").as("count"))
|
|
127
|
+
.where("voter_hash", "=", voterHash)
|
|
128
|
+
.where("created_at", ">", cutoff)
|
|
129
|
+
.executeTakeFirst();
|
|
130
|
+
return Number(result?.count ?? 0);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { sql, type ExpressionBuilder, type Kysely } from "kysely";
|
|
2
2
|
import { ulid } from "ulidx";
|
|
3
3
|
|
|
4
|
+
import { invalidateCommentObjectCache } from "../../object-cache/index.js";
|
|
4
5
|
import type { Database } from "../types.js";
|
|
5
6
|
import { encodeCursor, decodeCursor, type FindManyResult } from "./types.js";
|
|
6
7
|
|
|
@@ -39,6 +40,8 @@ export interface PublicComment {
|
|
|
39
40
|
body: string;
|
|
40
41
|
createdAt: string;
|
|
41
42
|
replies?: PublicComment[];
|
|
43
|
+
/** Aggregate reaction counts (`{ like: 12 }`), attached when requested. */
|
|
44
|
+
reactions?: Record<string, number>;
|
|
42
45
|
}
|
|
43
46
|
|
|
44
47
|
export interface CreateCommentInput {
|
|
@@ -99,6 +102,8 @@ export class CommentRepository {
|
|
|
99
102
|
})
|
|
100
103
|
.execute();
|
|
101
104
|
|
|
105
|
+
invalidateCommentObjectCache();
|
|
106
|
+
|
|
102
107
|
const comment = await this.findById(id);
|
|
103
108
|
if (!comment) {
|
|
104
109
|
throw new Error("Failed to create comment");
|
|
@@ -237,6 +242,7 @@ export class CommentRepository {
|
|
|
237
242
|
.where("id", "=", id)
|
|
238
243
|
.execute();
|
|
239
244
|
|
|
245
|
+
invalidateCommentObjectCache();
|
|
240
246
|
return this.findById(id);
|
|
241
247
|
}
|
|
242
248
|
|
|
@@ -254,6 +260,7 @@ export class CommentRepository {
|
|
|
254
260
|
.where("id", "in", ids)
|
|
255
261
|
.executeTakeFirst();
|
|
256
262
|
|
|
263
|
+
invalidateCommentObjectCache();
|
|
257
264
|
return Number(result.numUpdatedRows ?? 0);
|
|
258
265
|
}
|
|
259
266
|
|
|
@@ -266,6 +273,7 @@ export class CommentRepository {
|
|
|
266
273
|
.where("id", "=", id)
|
|
267
274
|
.executeTakeFirst();
|
|
268
275
|
|
|
276
|
+
invalidateCommentObjectCache();
|
|
269
277
|
return (result.numDeletedRows ?? 0) > 0;
|
|
270
278
|
}
|
|
271
279
|
|
|
@@ -280,6 +288,7 @@ export class CommentRepository {
|
|
|
280
288
|
.where("id", "in", ids)
|
|
281
289
|
.executeTakeFirst();
|
|
282
290
|
|
|
291
|
+
invalidateCommentObjectCache();
|
|
283
292
|
return Number(result.numDeletedRows ?? 0);
|
|
284
293
|
}
|
|
285
294
|
|
|
@@ -293,6 +302,7 @@ export class CommentRepository {
|
|
|
293
302
|
.where("content_id", "=", contentId)
|
|
294
303
|
.executeTakeFirst();
|
|
295
304
|
|
|
305
|
+
invalidateCommentObjectCache();
|
|
296
306
|
return Number(result.numDeletedRows ?? 0);
|
|
297
307
|
}
|
|
298
308
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { sql, type Kysely } from "kysely";
|
|
2
2
|
import { ulid } from "ulidx";
|
|
3
3
|
|
|
4
|
+
import { invalidateCollectionCache } from "../../object-cache/index.js";
|
|
4
5
|
import { slugify } from "../../utils/slugify.js";
|
|
5
6
|
import type { Database } from "../types.js";
|
|
6
7
|
import { validateIdentifier } from "../validate.js";
|
|
@@ -207,6 +208,8 @@ export class ContentRepository {
|
|
|
207
208
|
VALUES (${sql.join(valuePlaceholders, sql`, `)})
|
|
208
209
|
`.execute(this.db);
|
|
209
210
|
|
|
211
|
+
invalidateCollectionCache(type);
|
|
212
|
+
|
|
210
213
|
// Fetch and return the created item
|
|
211
214
|
const item = await this.findById(type, id);
|
|
212
215
|
if (!item) {
|
|
@@ -621,6 +624,8 @@ export class ContentRepository {
|
|
|
621
624
|
.where("deleted_at" as never, "is", null)
|
|
622
625
|
.execute();
|
|
623
626
|
|
|
627
|
+
invalidateCollectionCache(type);
|
|
628
|
+
|
|
624
629
|
const updated = await this.findById(type, id);
|
|
625
630
|
if (!updated) {
|
|
626
631
|
throw new Error("Content not found");
|
|
@@ -643,7 +648,9 @@ export class ContentRepository {
|
|
|
643
648
|
AND deleted_at IS NULL
|
|
644
649
|
`.execute(this.db);
|
|
645
650
|
|
|
646
|
-
|
|
651
|
+
const changed = (result.numAffectedRows ?? 0n) > 0n;
|
|
652
|
+
if (changed) invalidateCollectionCache(type);
|
|
653
|
+
return changed;
|
|
647
654
|
}
|
|
648
655
|
|
|
649
656
|
/**
|
|
@@ -659,7 +666,9 @@ export class ContentRepository {
|
|
|
659
666
|
AND deleted_at IS NOT NULL
|
|
660
667
|
`.execute(this.db);
|
|
661
668
|
|
|
662
|
-
|
|
669
|
+
const changed = (result.numAffectedRows ?? 0n) > 0n;
|
|
670
|
+
if (changed) invalidateCollectionCache(type);
|
|
671
|
+
return changed;
|
|
663
672
|
}
|
|
664
673
|
|
|
665
674
|
/**
|
|
@@ -684,7 +693,9 @@ export class ContentRepository {
|
|
|
684
693
|
AND deleted_at IS NOT NULL
|
|
685
694
|
`.execute(this.db);
|
|
686
695
|
|
|
687
|
-
|
|
696
|
+
const changed = (result.numAffectedRows ?? 0n) > 0n;
|
|
697
|
+
if (changed) invalidateCollectionCache(type);
|
|
698
|
+
return changed;
|
|
688
699
|
}
|
|
689
700
|
|
|
690
701
|
/**
|
|
@@ -940,6 +951,8 @@ export class ContentRepository {
|
|
|
940
951
|
AND deleted_at IS NULL
|
|
941
952
|
`.execute(this.db);
|
|
942
953
|
|
|
954
|
+
invalidateCollectionCache(type);
|
|
955
|
+
|
|
943
956
|
const updated = await this.findById(type, id);
|
|
944
957
|
if (!updated) {
|
|
945
958
|
throw new Error("Content not found");
|
|
@@ -977,6 +990,8 @@ export class ContentRepository {
|
|
|
977
990
|
AND deleted_at IS NULL
|
|
978
991
|
`.execute(this.db);
|
|
979
992
|
|
|
993
|
+
invalidateCollectionCache(type);
|
|
994
|
+
|
|
980
995
|
const updated = await this.findById(type, id);
|
|
981
996
|
if (!updated) {
|
|
982
997
|
throw new Error("Content not found");
|
|
@@ -1175,6 +1190,7 @@ export class ContentRepository {
|
|
|
1175
1190
|
throw new Error("Content not found");
|
|
1176
1191
|
}
|
|
1177
1192
|
|
|
1193
|
+
invalidateCollectionCache(type);
|
|
1178
1194
|
return updated;
|
|
1179
1195
|
} catch (error) {
|
|
1180
1196
|
// Best-effort schedule restore for the no-transaction (D1) case so a
|
|
@@ -1257,6 +1273,8 @@ export class ContentRepository {
|
|
|
1257
1273
|
AND deleted_at IS NULL
|
|
1258
1274
|
`.execute(this.db);
|
|
1259
1275
|
|
|
1276
|
+
invalidateCollectionCache(type);
|
|
1277
|
+
|
|
1260
1278
|
const updated = await this.findById(type, id);
|
|
1261
1279
|
if (!updated) {
|
|
1262
1280
|
throw new Error("Content not found");
|
|
@@ -1302,6 +1320,8 @@ export class ContentRepository {
|
|
|
1302
1320
|
WHERE id = ${id}
|
|
1303
1321
|
AND deleted_at IS NULL
|
|
1304
1322
|
`.execute(this.db);
|
|
1323
|
+
|
|
1324
|
+
invalidateCollectionCache(type);
|
|
1305
1325
|
}
|
|
1306
1326
|
|
|
1307
1327
|
/**
|
|
@@ -1332,6 +1352,8 @@ export class ContentRepository {
|
|
|
1332
1352
|
AND deleted_at IS NULL
|
|
1333
1353
|
`.execute(this.db);
|
|
1334
1354
|
|
|
1355
|
+
invalidateCollectionCache(type);
|
|
1356
|
+
|
|
1335
1357
|
const updated = await this.findById(type, id);
|
|
1336
1358
|
if (!updated) {
|
|
1337
1359
|
throw new Error("Content not found");
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
import type { Kysely, Selectable } from "kysely";
|
|
17
17
|
import { ulid } from "ulidx";
|
|
18
18
|
|
|
19
|
+
import { invalidateMenuObjectCache } from "../../object-cache/index.js";
|
|
19
20
|
import { withTransaction } from "../transaction.js";
|
|
20
21
|
import type { Database, MenuItemTable, MenuTable } from "../types.js";
|
|
21
22
|
|
|
@@ -369,6 +370,8 @@ export class MenuRepository {
|
|
|
369
370
|
}
|
|
370
371
|
});
|
|
371
372
|
|
|
373
|
+
invalidateMenuObjectCache();
|
|
374
|
+
|
|
372
375
|
const created = await this.findById(id);
|
|
373
376
|
if (!created) throw new Error("Failed to create menu");
|
|
374
377
|
return created;
|
|
@@ -383,6 +386,7 @@ export class MenuRepository {
|
|
|
383
386
|
|
|
384
387
|
if (Object.keys(values).length > 0) {
|
|
385
388
|
await this.db.updateTable("_emdash_menus").set(values).where("id", "=", id).execute();
|
|
389
|
+
invalidateMenuObjectCache();
|
|
386
390
|
}
|
|
387
391
|
|
|
388
392
|
return (await this.findById(id))!;
|
|
@@ -404,6 +408,7 @@ export class MenuRepository {
|
|
|
404
408
|
await trx.deleteFrom("_emdash_menu_items").where("menu_id", "=", id).execute();
|
|
405
409
|
await trx.deleteFrom("_emdash_menus").where("id", "=", id).execute();
|
|
406
410
|
});
|
|
411
|
+
invalidateMenuObjectCache();
|
|
407
412
|
return true;
|
|
408
413
|
}
|
|
409
414
|
|
|
@@ -488,6 +493,8 @@ export class MenuRepository {
|
|
|
488
493
|
})
|
|
489
494
|
.execute();
|
|
490
495
|
|
|
496
|
+
invalidateMenuObjectCache();
|
|
497
|
+
|
|
491
498
|
const row = await this.db
|
|
492
499
|
.selectFrom("_emdash_menu_items")
|
|
493
500
|
.selectAll()
|
|
@@ -529,6 +536,7 @@ export class MenuRepository {
|
|
|
529
536
|
.set(values)
|
|
530
537
|
.where("id", "=", itemId)
|
|
531
538
|
.execute();
|
|
539
|
+
invalidateMenuObjectCache();
|
|
532
540
|
}
|
|
533
541
|
|
|
534
542
|
const row = await this.db
|
|
@@ -546,7 +554,9 @@ export class MenuRepository {
|
|
|
546
554
|
.where("id", "=", itemId)
|
|
547
555
|
.where("menu_id", "=", menuId)
|
|
548
556
|
.execute();
|
|
549
|
-
|
|
557
|
+
const deleted = result[0]?.numDeletedRows !== 0n;
|
|
558
|
+
if (deleted) invalidateMenuObjectCache();
|
|
559
|
+
return deleted;
|
|
550
560
|
}
|
|
551
561
|
|
|
552
562
|
/**
|
|
@@ -614,6 +624,7 @@ export class MenuRepository {
|
|
|
614
624
|
.execute();
|
|
615
625
|
});
|
|
616
626
|
|
|
627
|
+
invalidateMenuObjectCache();
|
|
617
628
|
return { itemCount: items.length };
|
|
618
629
|
}
|
|
619
630
|
|
|
@@ -622,6 +633,7 @@ export class MenuRepository {
|
|
|
622
633
|
* malicious payload cannot move foreign items into this menu's siblings.
|
|
623
634
|
*/
|
|
624
635
|
async reorderItems(menuId: string, items: ReorderItem[]): Promise<MenuItem[]> {
|
|
636
|
+
invalidateMenuObjectCache();
|
|
625
637
|
return withTransaction(this.db, async (trx) => {
|
|
626
638
|
for (const item of items) {
|
|
627
639
|
await trx
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { sql, type Kysely } from "kysely";
|
|
2
2
|
|
|
3
|
+
import { invalidateCollectionCache } from "../../object-cache/index.js";
|
|
3
4
|
import { chunks, SQL_BATCH_SIZE } from "../../utils/chunks.js";
|
|
4
5
|
import type { Database } from "../types.js";
|
|
5
6
|
import type { ContentSeo, ContentSeoInput } from "./types.js";
|
|
@@ -153,6 +154,7 @@ export class SeoRepository {
|
|
|
153
154
|
updated_at = ${now}
|
|
154
155
|
`.execute(this.db);
|
|
155
156
|
|
|
157
|
+
invalidateCollectionCache(collection);
|
|
156
158
|
return this.get(collection, contentId);
|
|
157
159
|
}
|
|
158
160
|
|
|
@@ -165,6 +167,7 @@ export class SeoRepository {
|
|
|
165
167
|
.where("collection", "=", collection)
|
|
166
168
|
.where("content_id", "=", contentId)
|
|
167
169
|
.execute();
|
|
170
|
+
invalidateCollectionCache(collection);
|
|
168
171
|
}
|
|
169
172
|
|
|
170
173
|
/**
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Kysely, Selectable } from "kysely";
|
|
2
2
|
import { ulid } from "ulidx";
|
|
3
3
|
|
|
4
|
+
import { invalidateTaxonomyObjectCache } from "../../object-cache/index.js";
|
|
4
5
|
import type { Database, TaxonomyTable, ContentTaxonomyTable } from "../types.js";
|
|
5
6
|
|
|
6
7
|
export interface Taxonomy {
|
|
@@ -88,6 +89,8 @@ export class TaxonomyRepository {
|
|
|
88
89
|
})
|
|
89
90
|
.execute();
|
|
90
91
|
|
|
92
|
+
invalidateTaxonomyObjectCache();
|
|
93
|
+
|
|
91
94
|
const taxonomy = await this.findById(id);
|
|
92
95
|
if (!taxonomy) throw new Error("Failed to create taxonomy");
|
|
93
96
|
return taxonomy;
|
|
@@ -187,6 +190,7 @@ export class TaxonomyRepository {
|
|
|
187
190
|
|
|
188
191
|
if (Object.keys(updates).length > 0) {
|
|
189
192
|
await this.db.updateTable("taxonomies").set(updates).where("id", "=", id).execute();
|
|
193
|
+
invalidateTaxonomyObjectCache();
|
|
190
194
|
}
|
|
191
195
|
|
|
192
196
|
return this.findById(id);
|
|
@@ -214,6 +218,7 @@ export class TaxonomyRepository {
|
|
|
214
218
|
}
|
|
215
219
|
|
|
216
220
|
const result = await this.db.deleteFrom("taxonomies").where("id", "=", id).executeTakeFirst();
|
|
221
|
+
invalidateTaxonomyObjectCache();
|
|
217
222
|
return (result.numDeletedRows ?? 0n) > 0n;
|
|
218
223
|
}
|
|
219
224
|
|
|
@@ -233,6 +238,7 @@ export class TaxonomyRepository {
|
|
|
233
238
|
.values(row)
|
|
234
239
|
.onConflict((oc) => oc.doNothing())
|
|
235
240
|
.execute();
|
|
241
|
+
invalidateTaxonomyObjectCache();
|
|
236
242
|
}
|
|
237
243
|
|
|
238
244
|
async detachFromEntry(collection: string, entryId: string, taxonomyId: string): Promise<void> {
|
|
@@ -245,6 +251,7 @@ export class TaxonomyRepository {
|
|
|
245
251
|
.where("entry_id", "=", entryId)
|
|
246
252
|
.where("taxonomy_id", "=", group)
|
|
247
253
|
.execute();
|
|
254
|
+
invalidateTaxonomyObjectCache();
|
|
248
255
|
}
|
|
249
256
|
|
|
250
257
|
/**
|
|
@@ -324,6 +331,8 @@ export class TaxonomyRepository {
|
|
|
324
331
|
.onConflict((oc) => oc.doNothing())
|
|
325
332
|
.execute();
|
|
326
333
|
}
|
|
334
|
+
|
|
335
|
+
if (toRemove.length > 0 || toAdd.length > 0) invalidateTaxonomyObjectCache();
|
|
327
336
|
}
|
|
328
337
|
|
|
329
338
|
async clearEntryTerms(collection: string, entryId: string): Promise<number> {
|
|
@@ -332,7 +341,9 @@ export class TaxonomyRepository {
|
|
|
332
341
|
.where("collection", "=", collection)
|
|
333
342
|
.where("entry_id", "=", entryId)
|
|
334
343
|
.executeTakeFirst();
|
|
335
|
-
|
|
344
|
+
const removed = Number(result.numDeletedRows ?? 0);
|
|
345
|
+
if (removed > 0) invalidateTaxonomyObjectCache();
|
|
346
|
+
return removed;
|
|
336
347
|
}
|
|
337
348
|
|
|
338
349
|
/**
|
|
@@ -364,6 +375,7 @@ export class TaxonomyRepository {
|
|
|
364
375
|
)
|
|
365
376
|
.onConflict((oc) => oc.doNothing())
|
|
366
377
|
.execute();
|
|
378
|
+
invalidateTaxonomyObjectCache();
|
|
367
379
|
}
|
|
368
380
|
|
|
369
381
|
/**
|
|
@@ -78,6 +78,19 @@ export interface BylineSummary {
|
|
|
78
78
|
avatarStorageKey?: string | null;
|
|
79
79
|
/** Avatar media alt text, from the same media join. Null when not joined. */
|
|
80
80
|
avatarAlt?: string | null;
|
|
81
|
+
/**
|
|
82
|
+
* Avatar media blurhash (LQIP placeholder, migration 024), folded in by the
|
|
83
|
+
* same media join as `avatarStorageKey`. Lets a renderer paint a blurred
|
|
84
|
+
* placeholder while the full avatar loads, with no extra media lookup.
|
|
85
|
+
* Null when the byline has no avatar, the media row has no blurhash, or the
|
|
86
|
+
* byline was loaded through a finder that doesn't join media.
|
|
87
|
+
*/
|
|
88
|
+
avatarBlurhash?: string | null;
|
|
89
|
+
/**
|
|
90
|
+
* Avatar media dominant colour (LQIP placeholder, migration 024), from the
|
|
91
|
+
* same media join. Null under the same conditions as `avatarBlurhash`.
|
|
92
|
+
*/
|
|
93
|
+
avatarDominantColor?: string | null;
|
|
81
94
|
websiteUrl: string | null;
|
|
82
95
|
userId: string | null;
|
|
83
96
|
isGuest: boolean;
|
package/src/database/types.ts
CHANGED
|
@@ -382,6 +382,14 @@ export interface CommentTable {
|
|
|
382
382
|
updated_at: Generated<string>;
|
|
383
383
|
}
|
|
384
384
|
|
|
385
|
+
export interface CommentReactionTable {
|
|
386
|
+
id: string;
|
|
387
|
+
comment_id: string;
|
|
388
|
+
reaction: string;
|
|
389
|
+
voter_hash: string;
|
|
390
|
+
created_at: Generated<string>;
|
|
391
|
+
}
|
|
392
|
+
|
|
385
393
|
// Sections
|
|
386
394
|
|
|
387
395
|
export interface SectionTable {
|
|
@@ -433,6 +441,7 @@ export interface Database {
|
|
|
433
441
|
_emdash_seo: SeoTable;
|
|
434
442
|
_emdash_cron_tasks: CronTaskTable;
|
|
435
443
|
_emdash_comments: CommentTable;
|
|
444
|
+
_emdash_comment_reactions: CommentReactionTable;
|
|
436
445
|
_emdash_redirects: RedirectTable;
|
|
437
446
|
_emdash_404_log: NotFoundLogTable;
|
|
438
447
|
_emdash_bylines: BylineTable;
|