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
package/src/query.ts
CHANGED
|
@@ -26,9 +26,21 @@
|
|
|
26
26
|
|
|
27
27
|
import { encodeCursor } from "./database/repositories/types.js";
|
|
28
28
|
import { getFallbackChain, getI18nConfig, isI18nEnabled } from "./i18n/config.js";
|
|
29
|
-
import {
|
|
29
|
+
import {
|
|
30
|
+
CURSOR_RAW_VALUES,
|
|
31
|
+
FOLDED_BYLINES,
|
|
32
|
+
FOLDED_TERMS,
|
|
33
|
+
type WhereRange,
|
|
34
|
+
type WhereValue,
|
|
35
|
+
} from "./loader.js";
|
|
36
|
+
import {
|
|
37
|
+
cachedQuery,
|
|
38
|
+
contentNamespaces,
|
|
39
|
+
invalidateSchemaObjectCache,
|
|
40
|
+
} from "./object-cache/index.js";
|
|
30
41
|
import { requestCached } from "./request-cache.js";
|
|
31
42
|
import { getRequestContext } from "./request-context.js";
|
|
43
|
+
import type { TaxonomyTerm } from "./taxonomies/types.js";
|
|
32
44
|
import { isMissingTableError } from "./utils/db-errors.js";
|
|
33
45
|
import {
|
|
34
46
|
createEditable,
|
|
@@ -327,13 +339,61 @@ export async function getEmDashCollection<T extends string, D = InferCollectionD
|
|
|
327
339
|
// pagination contract.
|
|
328
340
|
const bucketed = bucketFilter(filter);
|
|
329
341
|
const cached = await requestCached(collectionCacheKey(type, bucketed.fetchFilter), () =>
|
|
330
|
-
|
|
342
|
+
loadCollectionCached<T, D>(type, bucketed.fetchFilter),
|
|
331
343
|
);
|
|
332
344
|
return bucketed.requestedLimit === undefined
|
|
333
345
|
? cached
|
|
334
346
|
: sliceCollectionResult(cached, bucketed.requestedLimit, filter?.orderBy);
|
|
335
347
|
}
|
|
336
348
|
|
|
349
|
+
/** Shape of a cached collection snapshot (entries reduced to JSON-safe form). */
|
|
350
|
+
interface CachedCollectionValue {
|
|
351
|
+
entries: unknown[];
|
|
352
|
+
nextCursor?: string;
|
|
353
|
+
cacheHint: CacheHint;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* Distributed (L2) read-through around {@link getEmDashCollectionUncached}.
|
|
358
|
+
*
|
|
359
|
+
* Caches a JSON-safe snapshot keyed by collection + filter + effective locale,
|
|
360
|
+
* folding the shared `bylines`/`taxonomies` epochs into the key so renaming an
|
|
361
|
+
* author or term invalidates affected lists. Errors are never cached.
|
|
362
|
+
*/
|
|
363
|
+
async function loadCollectionCached<T extends string, D = InferCollectionData<T>>(
|
|
364
|
+
type: T,
|
|
365
|
+
filter?: CollectionFilter,
|
|
366
|
+
): Promise<CollectionResult<D>> {
|
|
367
|
+
const snapshot = await cachedQuery<ContentSnapshot<CachedCollectionValue>>({
|
|
368
|
+
namespace: contentNamespaces(type),
|
|
369
|
+
key: `collection:${collectionCacheKey(type, filter)}|loc=${effectiveLocaleKey(filter)}`,
|
|
370
|
+
load: async () => {
|
|
371
|
+
const result = await getEmDashCollectionUncached<T, D>(type, filter);
|
|
372
|
+
if (result.error) {
|
|
373
|
+
return { ok: false, error: result.error, cacheHint: result.cacheHint };
|
|
374
|
+
}
|
|
375
|
+
return {
|
|
376
|
+
ok: true,
|
|
377
|
+
value: {
|
|
378
|
+
entries: result.entries.map(entrySnapshot),
|
|
379
|
+
nextCursor: result.nextCursor,
|
|
380
|
+
cacheHint: result.cacheHint,
|
|
381
|
+
},
|
|
382
|
+
};
|
|
383
|
+
},
|
|
384
|
+
cacheable: (snap) => snap.ok,
|
|
385
|
+
});
|
|
386
|
+
|
|
387
|
+
if (!snapshot.ok) {
|
|
388
|
+
return { entries: [], error: snapshot.error, cacheHint: snapshot.cacheHint };
|
|
389
|
+
}
|
|
390
|
+
return {
|
|
391
|
+
entries: snapshot.value.entries.map((entry) => reviveEntry<D>(entry)),
|
|
392
|
+
nextCursor: snapshot.value.nextCursor,
|
|
393
|
+
cacheHint: snapshot.value.cacheHint,
|
|
394
|
+
};
|
|
395
|
+
}
|
|
396
|
+
|
|
337
397
|
/**
|
|
338
398
|
* Threshold for limit bucketing. Page templates routinely render small
|
|
339
399
|
* "recent posts" widgets at limits 3-8; rounding those up to a single
|
|
@@ -498,6 +558,66 @@ function stableOrder(value: Record<string, unknown>): Record<string, unknown> {
|
|
|
498
558
|
return ordered;
|
|
499
559
|
}
|
|
500
560
|
|
|
561
|
+
// ── Object-cache (L2) serialization for content reads ───────────────────────
|
|
562
|
+
//
|
|
563
|
+
// Content entries can't be stored verbatim: each carries a non-serializable
|
|
564
|
+
// `edit` proxy (a function) and a non-enumerable `CURSOR_RAW_VALUES` symbol on
|
|
565
|
+
// `data` (raw date strings used to reproduce the loader's pagination cursor).
|
|
566
|
+
// We reduce each entry to a JSON-safe snapshot before caching — copying the
|
|
567
|
+
// cursor-raw values into an enumerable field and dropping `edit` — then rebuild
|
|
568
|
+
// the symbol and re-attach a no-op `edit` on the way out. The object cache's
|
|
569
|
+
// codec preserves `Date` instances, so timestamps survive the round-trip.
|
|
570
|
+
//
|
|
571
|
+
// L2 is only consulted for anonymous, non-preview, non-edit requests (see
|
|
572
|
+
// `shouldBypass` in object-cache), where `edit` is always the no-op variant —
|
|
573
|
+
// so dropping and recreating it is lossless.
|
|
574
|
+
|
|
575
|
+
/** Enumerable field carrying the {@link CURSOR_RAW_VALUES} payload in snapshots. */
|
|
576
|
+
const CURSOR_RAW_FIELD = "__emdashCursorRaw";
|
|
577
|
+
|
|
578
|
+
/** Result wrapper distinguishing a cached error from a cacheable success. */
|
|
579
|
+
type ContentSnapshot<S> =
|
|
580
|
+
| { ok: true; value: S }
|
|
581
|
+
| { ok: false; error?: Error; cacheHint: CacheHint };
|
|
582
|
+
|
|
583
|
+
function entrySnapshot<D>(entry: ContentEntry<D>): Record<string, unknown> {
|
|
584
|
+
const data = entryData(entry);
|
|
585
|
+
const rawCursor = Reflect.get(data, CURSOR_RAW_VALUES);
|
|
586
|
+
// Drop the `edit` function; copy enumerable data + the cursor-raw values.
|
|
587
|
+
const { edit: _edit, ...rest } = entry as ContentEntry<D> & { edit?: unknown };
|
|
588
|
+
return {
|
|
589
|
+
...rest,
|
|
590
|
+
data: { ...data, [CURSOR_RAW_FIELD]: rawCursor ?? {} },
|
|
591
|
+
};
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
function reviveEntry<D>(raw: unknown): ContentEntry<D> {
|
|
595
|
+
// eslint-disable-next-line typescript/no-unsafe-type-assertion -- snapshot shape produced by entrySnapshot
|
|
596
|
+
const entry = raw as Record<string, unknown>;
|
|
597
|
+
// eslint-disable-next-line typescript/no-unsafe-type-assertion -- snapshot `data` is always a record
|
|
598
|
+
const data: Record<string, unknown> = { ...(entry.data as Record<string, unknown>) };
|
|
599
|
+
// eslint-disable-next-line typescript/no-unsafe-type-assertion -- snapshot field written by entrySnapshot
|
|
600
|
+
const rawCursor = (data[CURSOR_RAW_FIELD] as Record<string, string> | undefined) ?? {};
|
|
601
|
+
delete data[CURSOR_RAW_FIELD];
|
|
602
|
+
Object.defineProperty(data, CURSOR_RAW_VALUES, {
|
|
603
|
+
value: rawCursor,
|
|
604
|
+
enumerable: false,
|
|
605
|
+
configurable: false,
|
|
606
|
+
writable: false,
|
|
607
|
+
});
|
|
608
|
+
// eslint-disable-next-line typescript/no-unsafe-type-assertion -- rebuilt to the ContentEntry shape with a no-op edit proxy
|
|
609
|
+
return { ...entry, data, edit: createNoop() } as ContentEntry<D>;
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
/** Resolve the effective locale used by content reads, for the L2 cache key. */
|
|
613
|
+
function effectiveLocaleKey(filter?: { locale?: string }): string {
|
|
614
|
+
const ctx = getRequestContext();
|
|
615
|
+
const i18nConfig = getI18nConfig();
|
|
616
|
+
return (
|
|
617
|
+
filter?.locale ?? ctx?.locale ?? (isI18nEnabled() ? i18nConfig!.defaultLocale : undefined) ?? ""
|
|
618
|
+
);
|
|
619
|
+
}
|
|
620
|
+
|
|
501
621
|
async function getEmDashCollectionUncached<T extends string, D = InferCollectionData<T>>(
|
|
502
622
|
type: T,
|
|
503
623
|
filter?: CollectionFilter,
|
|
@@ -620,6 +740,14 @@ export async function getEmDashEntry<T extends string, D = InferCollectionData<T
|
|
|
620
740
|
return isPublished || !!isScheduledAndReady;
|
|
621
741
|
}
|
|
622
742
|
|
|
743
|
+
/** True when an entry is scheduled to become visible at a future time. */
|
|
744
|
+
function isPendingScheduled(entry: ContentEntry<D>): boolean {
|
|
745
|
+
const data = entryData(entry);
|
|
746
|
+
if (dataStr(data, "status") !== "scheduled") return false;
|
|
747
|
+
const scheduledAt = dataDate(data, "scheduledAt");
|
|
748
|
+
return scheduledAt !== undefined && scheduledAt.getTime() > Date.now();
|
|
749
|
+
}
|
|
750
|
+
|
|
623
751
|
// Build the fallback chain: [requestedLocale, fallback1, ..., defaultLocale]
|
|
624
752
|
// When i18n is disabled or no locale requested, just use a single-element chain
|
|
625
753
|
const localeChain =
|
|
@@ -721,27 +849,80 @@ export async function getEmDashEntry<T extends string, D = InferCollectionData<T
|
|
|
721
849
|
return { entry: null, isPreview: serveDrafts, cacheHint: {} };
|
|
722
850
|
}
|
|
723
851
|
|
|
724
|
-
// Normal mode: try each locale in the fallback chain, only return published
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
852
|
+
// Normal mode: try each locale in the fallback chain, only return published
|
|
853
|
+
// content. The full resolution (fallback chain + visibility + byline/term
|
|
854
|
+
// hydration) is wrapped in the distributed L2 cache, keyed by the requested
|
|
855
|
+
// locale. Preview/edit requests took the `serveDrafts` branch above and
|
|
856
|
+
// never reach here; the object cache additionally bypasses them.
|
|
857
|
+
// A scheduled entry becomes visible on a future clock tick, not on a write,
|
|
858
|
+
// so an L2 snapshot taken before its time would keep it hidden past go-live
|
|
859
|
+
// (until the publish sweep bumps the epoch or the TTL lapses). Mark such a
|
|
860
|
+
// resolution time-sensitive and skip caching it.
|
|
861
|
+
let timeSensitive = false;
|
|
862
|
+
|
|
863
|
+
const resolveNormal = async (): Promise<EntryResult<D>> => {
|
|
864
|
+
for (let i = 0; i < localeChain.length; i++) {
|
|
865
|
+
const locale = localeChain[i];
|
|
866
|
+
const fallbackLocale = i > 0 ? locale : undefined;
|
|
867
|
+
|
|
868
|
+
const { entry, error, cacheHint } = await getLiveEntry(COLLECTION_NAME, { type, id, locale });
|
|
869
|
+
if (error) {
|
|
870
|
+
return { entry: null, error, isPreview: false, cacheHint: {} };
|
|
871
|
+
}
|
|
728
872
|
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
873
|
+
if (entry && isVisible(entry)) {
|
|
874
|
+
return successResult(wrapEntry(entry), {
|
|
875
|
+
isPreview: false,
|
|
876
|
+
fallbackLocale,
|
|
877
|
+
cacheHint: cacheHint ?? {},
|
|
878
|
+
});
|
|
879
|
+
}
|
|
880
|
+
if (entry && isPendingScheduled(entry)) {
|
|
881
|
+
timeSensitive = true;
|
|
882
|
+
}
|
|
883
|
+
// Entry not found or not visible in this locale — try next
|
|
732
884
|
}
|
|
885
|
+
return { entry: null, isPreview: false, cacheHint: {} };
|
|
886
|
+
};
|
|
733
887
|
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
888
|
+
const snapshot = await cachedQuery<ContentSnapshot<CachedEntryValue>>({
|
|
889
|
+
namespace: contentNamespaces(type),
|
|
890
|
+
key: `entry:${id}|loc=${requestedLocale ?? ""}`,
|
|
891
|
+
load: async () => {
|
|
892
|
+
const result = await resolveNormal();
|
|
893
|
+
if (result.error) {
|
|
894
|
+
return { ok: false, error: result.error, cacheHint: result.cacheHint };
|
|
895
|
+
}
|
|
896
|
+
return {
|
|
897
|
+
ok: true,
|
|
898
|
+
value: {
|
|
899
|
+
entry: result.entry ? entrySnapshot(result.entry) : null,
|
|
900
|
+
isPreview: result.isPreview,
|
|
901
|
+
fallbackLocale: result.fallbackLocale,
|
|
902
|
+
cacheHint: result.cacheHint,
|
|
903
|
+
},
|
|
904
|
+
};
|
|
905
|
+
},
|
|
906
|
+
cacheable: (snap) => snap.ok && !timeSensitive,
|
|
907
|
+
});
|
|
908
|
+
|
|
909
|
+
if (!snapshot.ok) {
|
|
910
|
+
return { entry: null, error: snapshot.error, isPreview: false, cacheHint: snapshot.cacheHint };
|
|
742
911
|
}
|
|
912
|
+
return {
|
|
913
|
+
entry: snapshot.value.entry ? reviveEntry<D>(snapshot.value.entry) : null,
|
|
914
|
+
isPreview: snapshot.value.isPreview,
|
|
915
|
+
fallbackLocale: snapshot.value.fallbackLocale,
|
|
916
|
+
cacheHint: snapshot.value.cacheHint,
|
|
917
|
+
};
|
|
918
|
+
}
|
|
743
919
|
|
|
744
|
-
|
|
920
|
+
/** Shape of a cached single-entry snapshot. */
|
|
921
|
+
interface CachedEntryValue {
|
|
922
|
+
entry: Record<string, unknown> | null;
|
|
923
|
+
isPreview: boolean;
|
|
924
|
+
fallbackLocale?: string;
|
|
925
|
+
cacheHint: CacheHint;
|
|
745
926
|
}
|
|
746
927
|
|
|
747
928
|
/**
|
|
@@ -756,6 +937,67 @@ export async function getEmDashEntry<T extends string, D = InferCollectionData<T
|
|
|
756
937
|
async function hydrateEntryBylines<D>(type: string, entries: ContentEntry<D>[]): Promise<void> {
|
|
757
938
|
if (entries.length === 0) return;
|
|
758
939
|
|
|
940
|
+
// Fast path: bylines were folded into the content query. Parse the JSON
|
|
941
|
+
// (no extra round trip) for the common case — explicit credits, no byline
|
|
942
|
+
// custom fields, no author fallback. The query path below handles the rest:
|
|
943
|
+
// - author fallback (entry has authorId but no explicit credit), and
|
|
944
|
+
// - custom byline fields (can't be expressed in the folded subquery).
|
|
945
|
+
if (entries.every((e) => FOLDED_BYLINES in entryData(e))) {
|
|
946
|
+
const parsed = entries.map((entry) => {
|
|
947
|
+
const data = entryData(entry);
|
|
948
|
+
const folded = Reflect.get(data, FOLDED_BYLINES);
|
|
949
|
+
const rows = Array.isArray(folded) ? folded : [];
|
|
950
|
+
const credits = rows
|
|
951
|
+
.map((raw) => {
|
|
952
|
+
const b = raw?.byline ?? {};
|
|
953
|
+
return {
|
|
954
|
+
roleLabel: raw?.roleLabel ?? null,
|
|
955
|
+
sortOrder: Number(raw?.sortOrder ?? 0),
|
|
956
|
+
source: "explicit" as const,
|
|
957
|
+
byline: { ...b, isGuest: Boolean(b.isGuest), customFields: {} },
|
|
958
|
+
};
|
|
959
|
+
})
|
|
960
|
+
.toSorted((a, b) => a.sortOrder - b.sortOrder);
|
|
961
|
+
return { data, credits };
|
|
962
|
+
});
|
|
963
|
+
|
|
964
|
+
// Fall back to the full query path when the fold can't be trusted to be
|
|
965
|
+
// complete: an entry with a byline reference (explicit primary, or an
|
|
966
|
+
// author for the author-fallback) but no folded credits — e.g. a credit
|
|
967
|
+
// in a different locale than the row, which the locale-correlated subquery
|
|
968
|
+
// skips, or the author-fallback path which the fold doesn't express.
|
|
969
|
+
let needsQueryPath = parsed.some(
|
|
970
|
+
(p) =>
|
|
971
|
+
p.credits.length === 0 &&
|
|
972
|
+
(dataStr(p.data, "authorId") !== "" || dataStr(p.data, "primaryBylineId") !== ""),
|
|
973
|
+
);
|
|
974
|
+
let hasCustomFields = false;
|
|
975
|
+
if (!needsQueryPath) {
|
|
976
|
+
try {
|
|
977
|
+
const { getDb } = await import("./loader.js");
|
|
978
|
+
const db = await getDb();
|
|
979
|
+
const { getBylineFieldDefs } = await import("./bylines/field-defs-cache.js");
|
|
980
|
+
hasCustomFields = (await getBylineFieldDefs(db)).length > 0;
|
|
981
|
+
} catch (error) {
|
|
982
|
+
// A missing table is expected pre-migration and means there are no
|
|
983
|
+
// custom fields — the fold's values are complete. Any other error
|
|
984
|
+
// (lock-init failure, dialect error) means the probe can't be
|
|
985
|
+
// trusted, so fall back to the query path rather than risk serving
|
|
986
|
+
// folded bylines with empty customFields.
|
|
987
|
+
if (!isMissingTableError(error)) needsQueryPath = true;
|
|
988
|
+
}
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
if (!needsQueryPath && !hasCustomFields) {
|
|
992
|
+
for (const p of parsed) {
|
|
993
|
+
p.data.bylines = p.credits;
|
|
994
|
+
p.data.byline = p.credits[0]?.byline ?? null;
|
|
995
|
+
}
|
|
996
|
+
return;
|
|
997
|
+
}
|
|
998
|
+
// Fall through to the full query path for fallback / custom-field cases.
|
|
999
|
+
}
|
|
1000
|
+
|
|
759
1001
|
try {
|
|
760
1002
|
const { getBylinesForEntries } = await import("./bylines/index.js");
|
|
761
1003
|
|
|
@@ -831,6 +1073,45 @@ async function hydrateEntryTerms<D>(
|
|
|
831
1073
|
): Promise<void> {
|
|
832
1074
|
if (entries.length === 0) return;
|
|
833
1075
|
|
|
1076
|
+
// Fast path: terms were folded into the content query. Group the JSON and
|
|
1077
|
+
// skip the separate content_taxonomies query.
|
|
1078
|
+
if (entries.every((e) => FOLDED_TERMS in entryData(e))) {
|
|
1079
|
+
const perEntry: Array<{ entryId: string; byTaxonomy: Record<string, TaxonomyTerm[]> }> = [];
|
|
1080
|
+
for (const entry of entries) {
|
|
1081
|
+
const data = entryData(entry);
|
|
1082
|
+
const folded = Reflect.get(data, FOLDED_TERMS);
|
|
1083
|
+
const rows = Array.isArray(folded) ? folded : [];
|
|
1084
|
+
const grouped: Record<string, TaxonomyTerm[]> = {};
|
|
1085
|
+
for (const r of rows) {
|
|
1086
|
+
const name = String(r?.name);
|
|
1087
|
+
(grouped[name] ??= []).push({
|
|
1088
|
+
id: r?.id,
|
|
1089
|
+
name,
|
|
1090
|
+
slug: r?.slug,
|
|
1091
|
+
label: r?.label,
|
|
1092
|
+
parentId: r?.parent_id ?? undefined,
|
|
1093
|
+
children: [],
|
|
1094
|
+
locale: r?.locale,
|
|
1095
|
+
translationGroup: r?.translation_group,
|
|
1096
|
+
});
|
|
1097
|
+
}
|
|
1098
|
+
// Match getAllTermsForEntries' ORDER BY label (dropped from the
|
|
1099
|
+
// aggregate since SQLite and Postgres order it differently).
|
|
1100
|
+
for (const [name, arr] of Object.entries(grouped)) {
|
|
1101
|
+
grouped[name] = arr.toSorted((a, b) => String(a.label).localeCompare(String(b.label)));
|
|
1102
|
+
}
|
|
1103
|
+
data.terms = grouped;
|
|
1104
|
+
const entryId = dataStr(data, "id");
|
|
1105
|
+
if (entryId) perEntry.push({ entryId, byTaxonomy: grouped });
|
|
1106
|
+
}
|
|
1107
|
+
// Prime the per-entry request cache (wildcard + present taxonomies) so
|
|
1108
|
+
// subsequent getEntryTerms(...) calls in this render hit the cache instead
|
|
1109
|
+
// of issuing an N+1 query. No DB lookup — purely from the folded data.
|
|
1110
|
+
const { primeFoldedEntryTerms } = await import("./taxonomies/index.js");
|
|
1111
|
+
primeFoldedEntryTerms(type, perEntry, { locale });
|
|
1112
|
+
return;
|
|
1113
|
+
}
|
|
1114
|
+
|
|
834
1115
|
try {
|
|
835
1116
|
const { getAllTermsForEntries } = await import("./taxonomies/index.js");
|
|
836
1117
|
|
|
@@ -972,9 +1253,14 @@ let cachedUrlPatterns: CachedPattern[] | null = null;
|
|
|
972
1253
|
/**
|
|
973
1254
|
* Invalidate the cached URL patterns used by resolveEmDashPath.
|
|
974
1255
|
* Call when collection URL patterns change (schema updates).
|
|
1256
|
+
*
|
|
1257
|
+
* Also busts the distributed schema cache (collection metadata such as
|
|
1258
|
+
* `commentsEnabled`, `supports`, fields read by `getCollectionInfo`), since
|
|
1259
|
+
* every schema-mutation path already routes through here.
|
|
975
1260
|
*/
|
|
976
1261
|
export function invalidateUrlPatternCache(): void {
|
|
977
1262
|
cachedUrlPatterns = null;
|
|
1263
|
+
invalidateSchemaObjectCache();
|
|
978
1264
|
}
|
|
979
1265
|
|
|
980
1266
|
/**
|
package/src/schema/query.ts
CHANGED
|
@@ -8,6 +8,7 @@ import type { Kysely } from "kysely";
|
|
|
8
8
|
|
|
9
9
|
import type { Database } from "../database/types.js";
|
|
10
10
|
import { getDb } from "../loader.js";
|
|
11
|
+
import { cachedQuery, CacheNamespace } from "../object-cache/index.js";
|
|
11
12
|
import { requestCached } from "../request-cache.js";
|
|
12
13
|
import { SchemaRegistry } from "./registry.js";
|
|
13
14
|
import type { Collection } from "./types.js";
|
|
@@ -26,10 +27,16 @@ import type { Collection } from "./types.js";
|
|
|
26
27
|
* ```
|
|
27
28
|
*/
|
|
28
29
|
export async function getCollectionInfo(slug: string): Promise<Collection | null> {
|
|
29
|
-
return requestCached(`collection-info:${slug}`,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
return requestCached(`collection-info:${slug}`, () =>
|
|
31
|
+
cachedQuery({
|
|
32
|
+
namespace: CacheNamespace.SCHEMA,
|
|
33
|
+
key: `collection-info:${slug}`,
|
|
34
|
+
load: async () => {
|
|
35
|
+
const db = await getDb();
|
|
36
|
+
return getCollectionInfoWithDb(db, slug);
|
|
37
|
+
},
|
|
38
|
+
}),
|
|
39
|
+
);
|
|
33
40
|
}
|
|
34
41
|
|
|
35
42
|
/**
|
|
@@ -268,8 +268,10 @@ export function validateContent(
|
|
|
268
268
|
* Generate TypeScript interface from field definitions
|
|
269
269
|
* Used by CLI `emdash types` to generate types
|
|
270
270
|
*/
|
|
271
|
-
export function generateTypeScript(
|
|
272
|
-
|
|
271
|
+
export function generateTypeScript(
|
|
272
|
+
collection: CollectionWithFields,
|
|
273
|
+
interfaceName: string = getInterfaceName(collection),
|
|
274
|
+
): string {
|
|
273
275
|
const lines: string[] = [];
|
|
274
276
|
|
|
275
277
|
lines.push(`export interface ${interfaceName} {`);
|
|
@@ -324,9 +326,14 @@ export function generateTypesFile(collections: CollectionWithFields[]): string {
|
|
|
324
326
|
lines.push(`import type { ${imports.join(", ")} } from "emdash";`);
|
|
325
327
|
lines.push(``);
|
|
326
328
|
|
|
329
|
+
// Singularizing the slug can map two distinct slugs to the same name
|
|
330
|
+
// (e.g. `book` and `books` both -> `Book`), so resolve collisions up front
|
|
331
|
+
// to keep every interface identifier unique within the file.
|
|
332
|
+
const interfaceNames = uniqueInterfaceNames(collections);
|
|
333
|
+
|
|
327
334
|
// Generate individual interfaces
|
|
328
335
|
for (const collection of collections) {
|
|
329
|
-
lines.push(generateTypeScript(collection));
|
|
336
|
+
lines.push(generateTypeScript(collection, interfaceNames.get(collection.slug)));
|
|
330
337
|
lines.push(``);
|
|
331
338
|
}
|
|
332
339
|
|
|
@@ -334,8 +341,7 @@ export function generateTypesFile(collections: CollectionWithFields[]): string {
|
|
|
334
341
|
lines.push(`declare module "emdash" {`);
|
|
335
342
|
lines.push(` interface EmDashCollections {`);
|
|
336
343
|
for (const collection of collections) {
|
|
337
|
-
|
|
338
|
-
lines.push(` ${collection.slug}: ${interfaceName};`);
|
|
344
|
+
lines.push(` ${collection.slug}: ${interfaceNames.get(collection.slug)};`);
|
|
339
345
|
}
|
|
340
346
|
lines.push(` }`);
|
|
341
347
|
lines.push(`}`);
|
|
@@ -427,7 +433,8 @@ function pascalCase(str: string): string {
|
|
|
427
433
|
}
|
|
428
434
|
|
|
429
435
|
/**
|
|
430
|
-
*
|
|
436
|
+
* Naive singularization for slug-derived interface names. Handles the common
|
|
437
|
+
* English plural endings; intentionally simple, not a full inflector.
|
|
431
438
|
*/
|
|
432
439
|
function singularize(str: string): string {
|
|
433
440
|
if (str.endsWith("ies")) {
|
|
@@ -446,8 +453,46 @@ function singularize(str: string): string {
|
|
|
446
453
|
}
|
|
447
454
|
|
|
448
455
|
/**
|
|
449
|
-
* Get the interface name for a collection
|
|
456
|
+
* Get the interface name for a collection.
|
|
457
|
+
*
|
|
458
|
+
* Derived from the slug, not the human label. Slugs are constrained to
|
|
459
|
+
* `/^[a-z][a-z0-9_]*$/`, so PascalCasing one always yields a valid TS
|
|
460
|
+
* identifier; labels are arbitrary and user-controlled (punctuation, spaces,
|
|
461
|
+
* duplicates across collections), which produced syntactically invalid or
|
|
462
|
+
* duplicate interface names. The slug is singularized first because the
|
|
463
|
+
* interface describes a single entry, not the collection (`posts` -> `Post`).
|
|
464
|
+
*
|
|
465
|
+
* Singularization can map two distinct slugs onto the same name, so callers
|
|
466
|
+
* generating more than one interface must dedupe -- see `uniqueInterfaceNames`.
|
|
450
467
|
*/
|
|
451
468
|
function getInterfaceName(collection: CollectionWithFields): string {
|
|
452
|
-
return pascalCase(
|
|
469
|
+
return pascalCase(singularize(collection.slug));
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
/**
|
|
473
|
+
* Resolve interface names for a set of collections, guaranteeing each is
|
|
474
|
+
* unique within the file. Collisions (from singularization or PascalCasing
|
|
475
|
+
* collapsing distinct slugs) get a numeric suffix in collection order, so the
|
|
476
|
+
* generated `.d.ts` never declares two interfaces with the same identifier.
|
|
477
|
+
*
|
|
478
|
+
* The suffix is chosen against the set of names already emitted, not a
|
|
479
|
+
* per-base counter, so a generated name can't collide with another slug's
|
|
480
|
+
* base name (e.g. slugs `book`, `books`, `book2`: `books` -> `Book2` would
|
|
481
|
+
* clash with `book2`, so it advances to `Book3`).
|
|
482
|
+
*/
|
|
483
|
+
export function uniqueInterfaceNames(collections: CollectionWithFields[]): Map<string, string> {
|
|
484
|
+
const used = new Set<string>();
|
|
485
|
+
const names = new Map<string, string>();
|
|
486
|
+
for (const collection of collections) {
|
|
487
|
+
const base = getInterfaceName(collection);
|
|
488
|
+
let name = base;
|
|
489
|
+
let suffix = 2;
|
|
490
|
+
while (used.has(name)) {
|
|
491
|
+
name = `${base}${suffix}`;
|
|
492
|
+
suffix++;
|
|
493
|
+
}
|
|
494
|
+
used.add(name);
|
|
495
|
+
names.set(collection.slug, name);
|
|
496
|
+
}
|
|
497
|
+
return names;
|
|
453
498
|
}
|
package/src/settings/index.ts
CHANGED
|
@@ -12,7 +12,11 @@ import { MediaRepository } from "../database/repositories/media.js";
|
|
|
12
12
|
import { OptionsRepository } from "../database/repositories/options.js";
|
|
13
13
|
import type { Database } from "../database/types.js";
|
|
14
14
|
import { getDb } from "../loader.js";
|
|
15
|
+
import { cachedQuery, invalidateObjectCache } from "../object-cache/index.js";
|
|
15
16
|
import { peekRequestCache, requestCached } from "../request-cache.js";
|
|
17
|
+
|
|
18
|
+
/** Object-cache namespace for site settings. */
|
|
19
|
+
const SETTINGS_CACHE_NAMESPACE = "settings";
|
|
16
20
|
import type { Storage } from "../storage/types.js";
|
|
17
21
|
import {
|
|
18
22
|
createSingleFlightCache,
|
|
@@ -61,6 +65,8 @@ const settingsCache: SingleFlightCache<Partial<SiteSettings>> =
|
|
|
61
65
|
*/
|
|
62
66
|
export function invalidateSiteSettingsCache(): void {
|
|
63
67
|
invalidateSingleFlightCache(settingsCache);
|
|
68
|
+
// Cross-isolate invalidation for the optional distributed object cache.
|
|
69
|
+
invalidateObjectCache(SETTINGS_CACHE_NAMESPACE);
|
|
64
70
|
}
|
|
65
71
|
|
|
66
72
|
/**
|
|
@@ -210,14 +216,21 @@ export async function getSiteSettingWithDb<K extends SiteSettingKey>(
|
|
|
210
216
|
export function getSiteSettings(): Promise<Partial<SiteSettings>> {
|
|
211
217
|
// requestCached dedupes within a single request; singleFlightCached
|
|
212
218
|
// coalesces across requests and caches the resolved value for the
|
|
213
|
-
// global scope's lifetime without ever sharing an awaitable promise.
|
|
219
|
+
// global scope's lifetime without ever sharing an awaitable promise. The
|
|
220
|
+
// distributed object cache (cachedQuery) sits beneath both, backing cold
|
|
221
|
+
// isolates without a database round-trip.
|
|
214
222
|
return requestCached("siteSettings", () =>
|
|
215
223
|
singleFlightCached(
|
|
216
224
|
settingsCache,
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
225
|
+
() =>
|
|
226
|
+
cachedQuery({
|
|
227
|
+
namespace: SETTINGS_CACHE_NAMESPACE,
|
|
228
|
+
key: "all",
|
|
229
|
+
load: async () => {
|
|
230
|
+
const db = await getDb();
|
|
231
|
+
return getSiteSettingsWithDb(db);
|
|
232
|
+
},
|
|
233
|
+
}),
|
|
221
234
|
{ anchor: (promise) => after(() => promise), ownerTimeoutMs: 30_000 },
|
|
222
235
|
),
|
|
223
236
|
);
|