emdash 0.32.0 → 0.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{adapters-C0ONzkUP.d.mts → adapters-BMyNSSZi.d.mts} +9 -1
- package/dist/adapters-BMyNSSZi.d.mts.map +1 -0
- package/dist/after-CBU2vkoO.mjs +96 -0
- package/dist/after-CBU2vkoO.mjs.map +1 -0
- package/dist/{allowed-origins-CCEi9bPI.mjs → allowed-origins-CG1pACtS.mjs} +2 -2
- package/dist/{allowed-origins-CCEi9bPI.mjs.map → allowed-origins-CG1pACtS.mjs.map} +1 -1
- package/dist/api/route-utils.d.mts +3 -4
- package/dist/api/route-utils.d.mts.map +1 -1
- package/dist/api/route-utils.mjs +22 -22
- package/dist/api/schemas/index.d.mts +2 -2
- package/dist/api/schemas/index.mjs +5 -5
- package/dist/{api-DgPbMlng.mjs → api-D2hunekQ.mjs} +247 -45
- package/dist/api-D2hunekQ.mjs.map +1 -0
- package/dist/{api-tokens-p-iMzvXR.mjs → api-tokens-CSND0i1z.mjs} +2 -2
- package/dist/{api-tokens-p-iMzvXR.mjs.map → api-tokens-CSND0i1z.mjs.map} +1 -1
- package/dist/{apply-1_6ra7NP.mjs → apply-kwNEJW2l.mjs} +35 -22
- package/dist/apply-kwNEJW2l.mjs.map +1 -0
- package/dist/astro/index.d.mts +12 -12
- package/dist/astro/index.mjs +13 -3
- package/dist/astro/index.mjs.map +1 -1
- package/dist/astro/middleware/auth.d.mts +10 -10
- package/dist/astro/middleware/auth.mjs +8 -8
- package/dist/astro/middleware/redirect.d.mts.map +1 -1
- package/dist/astro/middleware/redirect.mjs +8 -8
- package/dist/astro/middleware/redirect.mjs.map +1 -1
- package/dist/astro/middleware/request-context.mjs +4 -4
- package/dist/astro/middleware/setup.mjs +1 -1
- package/dist/astro/middleware.d.mts +10 -10
- package/dist/astro/middleware.d.mts.map +1 -1
- package/dist/astro/middleware.mjs +344 -173
- package/dist/astro/middleware.mjs.map +1 -1
- package/dist/astro/routes/api/admin/allowed-domains/_domain_.mjs +7 -7
- package/dist/astro/routes/api/admin/allowed-domains/index.mjs +7 -7
- package/dist/astro/routes/api/admin/api-tokens/_id_.mjs +4 -4
- package/dist/astro/routes/api/admin/api-tokens/index.mjs +5 -5
- package/dist/astro/routes/api/admin/byline-fields/_slug_/usage.mjs +5 -5
- package/dist/astro/routes/api/admin/byline-fields/_slug_.mjs +10 -10
- package/dist/astro/routes/api/admin/byline-fields/index.mjs +10 -10
- package/dist/astro/routes/api/admin/byline-fields/reorder.mjs +10 -10
- package/dist/astro/routes/api/admin/bylines/_id_/index.mjs +18 -18
- package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs +18 -18
- package/dist/astro/routes/api/admin/bylines/index.mjs +18 -18
- package/dist/astro/routes/api/admin/comments/_id_/status.mjs +16 -16
- package/dist/astro/routes/api/admin/comments/_id_/status.mjs.map +1 -1
- package/dist/astro/routes/api/admin/comments/_id_.mjs +7 -7
- package/dist/astro/routes/api/admin/comments/bulk.mjs +12 -12
- package/dist/astro/routes/api/admin/comments/counts.mjs +7 -7
- package/dist/astro/routes/api/admin/comments/index.mjs +12 -12
- package/dist/astro/routes/api/admin/hooks/exclusive/_hookName_.mjs +5 -5
- package/dist/astro/routes/api/admin/hooks/exclusive/index.mjs +4 -4
- package/dist/astro/routes/api/admin/media-usage/repair.mjs +12 -12
- package/dist/astro/routes/api/admin/oauth-clients/_id_.mjs +4 -4
- package/dist/astro/routes/api/admin/oauth-clients/index.mjs +4 -4
- package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs +46 -45
- package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +46 -45
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +45 -44
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/mcp.mjs +5 -5
- package/dist/astro/routes/api/admin/plugins/_id_/settings.mjs +45 -44
- package/dist/astro/routes/api/admin/plugins/_id_/settings.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +45 -44
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs +45 -44
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/index.mjs +45 -44
- package/dist/astro/routes/api/admin/plugins/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/icon.mjs +3 -3
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs +45 -44
- 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 +45 -44
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +45 -44
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.mjs +45 -44
- 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 +46 -45
- package/dist/astro/routes/api/admin/plugins/registry/_id_/update.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/artifact.mjs +45 -44
- package/dist/astro/routes/api/admin/plugins/registry/artifact.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/install.mjs +46 -45
- package/dist/astro/routes/api/admin/plugins/registry/install.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/updates.mjs +45 -44
- package/dist/astro/routes/api/admin/plugins/updates.mjs.map +1 -1
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +45 -44
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/thumbnail.mjs +3 -3
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs +45 -44
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/users/_id_/disable.mjs +3 -3
- package/dist/astro/routes/api/admin/users/_id_/enable.mjs +2 -2
- package/dist/astro/routes/api/admin/users/_id_/index.mjs +8 -8
- package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs +5 -5
- package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs.map +1 -1
- package/dist/astro/routes/api/admin/users/index.mjs +7 -7
- package/dist/astro/routes/api/auth/dev-bypass.mjs +6 -6
- package/dist/astro/routes/api/auth/invite/accept.mjs +2 -2
- package/dist/astro/routes/api/auth/invite/complete.mjs +12 -12
- package/dist/astro/routes/api/auth/invite/index.mjs +10 -10
- package/dist/astro/routes/api/auth/invite/index.mjs.map +1 -1
- package/dist/astro/routes/api/auth/invite/register-options.mjs +11 -11
- package/dist/astro/routes/api/auth/logout.mjs +3 -3
- package/dist/astro/routes/api/auth/magic-link/send.mjs +12 -12
- package/dist/astro/routes/api/auth/magic-link/send.mjs.map +1 -1
- package/dist/astro/routes/api/auth/magic-link/verify.mjs +3 -3
- package/dist/astro/routes/api/auth/me.mjs +8 -8
- package/dist/astro/routes/api/auth/mode.mjs +3 -3
- package/dist/astro/routes/api/auth/oauth/_provider_/callback.mjs +4 -4
- package/dist/astro/routes/api/auth/oauth/_provider_.mjs +2 -2
- package/dist/astro/routes/api/auth/passkey/_id_.mjs +7 -7
- package/dist/astro/routes/api/auth/passkey/index.mjs +2 -2
- package/dist/astro/routes/api/auth/passkey/options.mjs +13 -13
- package/dist/astro/routes/api/auth/passkey/register/options.mjs +11 -11
- package/dist/astro/routes/api/auth/passkey/register/verify.mjs +12 -12
- package/dist/astro/routes/api/auth/passkey/verify.mjs +12 -12
- package/dist/astro/routes/api/auth/signup/complete.mjs +12 -12
- package/dist/astro/routes/api/auth/signup/request.mjs +12 -12
- package/dist/astro/routes/api/auth/signup/request.mjs.map +1 -1
- package/dist/astro/routes/api/auth/signup/verify.mjs +2 -2
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs +18 -18
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs.map +1 -1
- package/dist/astro/routes/api/comments/_collection_/_contentId_/reactions.mjs +15 -15
- package/dist/astro/routes/api/content/_collection_/_id_/compare.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs +4 -4
- package/dist/astro/routes/api/content/_collection_/_id_/duplicate.mjs +4 -4
- package/dist/astro/routes/api/content/_collection_/_id_/permanent.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs +13 -13
- package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs +9 -9
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/children.mjs +18 -18
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/parents.mjs +18 -18
- package/dist/astro/routes/api/content/_collection_/_id_/restore.mjs +4 -4
- package/dist/astro/routes/api/content/_collection_/_id_/revisions.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs +9 -9
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs +16 -16
- package/dist/astro/routes/api/content/_collection_/_id_/translations.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs +4 -4
- package/dist/astro/routes/api/content/_collection_/_id_.mjs +9 -9
- package/dist/astro/routes/api/content/_collection_/authors.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/index.mjs +9 -9
- package/dist/astro/routes/api/content/_collection_/trash.mjs +8 -8
- package/dist/astro/routes/api/dashboard.mjs +9 -9
- package/dist/astro/routes/api/dev/emails.mjs +3 -3
- package/dist/astro/routes/api/import/probe.d.mts +3 -3
- package/dist/astro/routes/api/import/probe.mjs +19 -19
- package/dist/astro/routes/api/import/wordpress/analyze.mjs +4 -4
- package/dist/astro/routes/api/import/wordpress/execute.d.mts +11 -11
- package/dist/astro/routes/api/import/wordpress/execute.mjs +15 -15
- package/dist/astro/routes/api/import/wordpress/media.d.mts +10 -10
- package/dist/astro/routes/api/import/wordpress/media.mjs +10 -10
- package/dist/astro/routes/api/import/wordpress/prepare.mjs +11 -11
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.d.mts +11 -11
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs +12 -12
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.d.mts +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs +19 -19
- package/dist/astro/routes/api/import/wordpress-plugin/execute.d.mts +11 -11
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs +27 -27
- package/dist/astro/routes/api/manifest.mjs +5 -5
- package/dist/astro/routes/api/mcp.mjs +42 -42
- package/dist/astro/routes/api/media/_id_/confirm.mjs +10 -10
- package/dist/astro/routes/api/media/_id_/upload.mjs +6 -6
- package/dist/astro/routes/api/media/_id_/usage.mjs +14 -14
- package/dist/astro/routes/api/media/_id_.mjs +13 -13
- package/dist/astro/routes/api/media/file/_...key_.mjs +2 -2
- package/dist/astro/routes/api/media/providers/_providerId_/_itemId_.mjs +3 -3
- package/dist/astro/routes/api/media/providers/_providerId_/index.mjs +3 -3
- package/dist/astro/routes/api/media/providers/index.mjs +3 -3
- package/dist/astro/routes/api/media/upload-url.mjs +9 -9
- package/dist/astro/routes/api/media.mjs +13 -13
- package/dist/astro/routes/api/menus/_name_/items/_id_.mjs +11 -11
- package/dist/astro/routes/api/menus/_name_/items.mjs +11 -11
- package/dist/astro/routes/api/menus/_name_/reorder.mjs +11 -11
- package/dist/astro/routes/api/menus/_name_/translations.mjs +11 -11
- package/dist/astro/routes/api/menus/_name_.mjs +11 -11
- package/dist/astro/routes/api/menus/index.mjs +11 -11
- package/dist/astro/routes/api/oauth/authorize.mjs +6 -6
- package/dist/astro/routes/api/oauth/device/authorize.mjs +6 -6
- package/dist/astro/routes/api/oauth/device/code.mjs +9 -9
- package/dist/astro/routes/api/oauth/device/token.mjs +8 -8
- package/dist/astro/routes/api/oauth/register.mjs +3 -3
- package/dist/astro/routes/api/oauth/token/refresh.mjs +6 -6
- package/dist/astro/routes/api/oauth/token/revoke.mjs +6 -6
- package/dist/astro/routes/api/oauth/token.mjs +6 -6
- package/dist/astro/routes/api/openapi.json.mjs +36 -5
- package/dist/astro/routes/api/openapi.json.mjs.map +1 -1
- package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs +5 -5
- package/dist/astro/routes/api/redirects/404s/index.mjs +12 -12
- package/dist/astro/routes/api/redirects/404s/summary.mjs +12 -12
- package/dist/astro/routes/api/redirects/_id_.mjs +14 -13
- package/dist/astro/routes/api/redirects/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/redirects/index.mjs +14 -13
- package/dist/astro/routes/api/redirects/index.mjs.map +1 -1
- package/dist/astro/routes/api/relations/_id_/index.mjs +18 -18
- package/dist/astro/routes/api/relations/_id_/translations.mjs +13 -13
- package/dist/astro/routes/api/relations/index.mjs +18 -18
- package/dist/astro/routes/api/revisions/_revisionId_/index.mjs +3 -3
- package/dist/astro/routes/api/revisions/_revisionId_/restore.mjs +4 -4
- package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs +45 -44
- 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 +45 -44
- 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 +45 -44
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +45 -44
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/index.mjs +45 -44
- package/dist/astro/routes/api/schema/collections/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/reorder.d.mts +8 -0
- package/dist/astro/routes/api/schema/collections/reorder.d.mts.map +1 -0
- package/dist/astro/routes/api/schema/collections/reorder.mjs +66 -0
- package/dist/astro/routes/api/schema/collections/reorder.mjs.map +1 -0
- package/dist/astro/routes/api/schema/index.mjs +11 -9
- package/dist/astro/routes/api/schema/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs +45 -44
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs.map +1 -1
- package/dist/astro/routes/api/schema/orphans/index.mjs +45 -44
- package/dist/astro/routes/api/schema/orphans/index.mjs.map +1 -1
- package/dist/astro/routes/api/search/enable.d.mts +1 -0
- package/dist/astro/routes/api/search/enable.d.mts.map +1 -1
- package/dist/astro/routes/api/search/enable.mjs +17 -13
- package/dist/astro/routes/api/search/enable.mjs.map +1 -1
- package/dist/astro/routes/api/search/index.mjs +11 -11
- package/dist/astro/routes/api/search/rebuild.mjs +13 -13
- package/dist/astro/routes/api/search/rebuild.mjs.map +1 -1
- package/dist/astro/routes/api/search/stats.mjs +7 -7
- package/dist/astro/routes/api/search/suggest.mjs +11 -11
- package/dist/astro/routes/api/sections/_slug_.mjs +11 -11
- package/dist/astro/routes/api/sections/index.mjs +11 -11
- package/dist/astro/routes/api/settings/backups/archives/_name_.mjs +7 -7
- package/dist/astro/routes/api/settings/backups/archives/index.mjs +6 -6
- package/dist/astro/routes/api/settings/backups/export.mjs +7 -7
- package/dist/astro/routes/api/settings/backups/index.mjs +8 -8
- package/dist/astro/routes/api/settings/email.mjs +5 -5
- package/dist/astro/routes/api/settings.mjs +16 -16
- package/dist/astro/routes/api/setup/admin-verify.mjs +13 -13
- package/dist/astro/routes/api/setup/admin.mjs +12 -12
- package/dist/astro/routes/api/setup/dev-bypass.mjs +30 -30
- package/dist/astro/routes/api/setup/dev-reset.mjs +3 -3
- package/dist/astro/routes/api/setup/index.mjs +32 -32
- package/dist/astro/routes/api/setup/status.mjs +4 -4
- package/dist/astro/routes/api/snapshot.mjs +9 -9
- package/dist/astro/routes/api/taxonomies/_name_/reorder.d.mts +8 -0
- package/dist/astro/routes/api/taxonomies/_name_/reorder.d.mts.map +1 -0
- package/dist/astro/routes/api/taxonomies/_name_/reorder.mjs +43 -0
- package/dist/astro/routes/api/taxonomies/_name_/reorder.mjs.map +1 -0
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs +16 -16
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs +16 -16
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs +16 -16
- package/dist/astro/routes/api/taxonomies/index.mjs +16 -16
- package/dist/astro/routes/api/themes/preview.mjs +7 -7
- package/dist/astro/routes/api/typegen.mjs +5 -5
- package/dist/astro/routes/api/well-known/auth.mjs +2 -2
- package/dist/astro/routes/api/well-known/oauth-authorization-server.mjs +2 -2
- package/dist/astro/routes/api/well-known/oauth-protected-resource.mjs +2 -2
- package/dist/astro/routes/api/widget-areas/_name_/reorder.mjs +8 -8
- package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs +11 -11
- package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs +11 -11
- package/dist/astro/routes/api/widget-areas/_name_.mjs +6 -6
- package/dist/astro/routes/api/widget-areas/index.mjs +11 -11
- package/dist/astro/routes/api/widget-components.mjs +3 -3
- package/dist/astro/routes/robots.txt.mjs +9 -9
- package/dist/astro/routes/sitemap-_collection_.xml.mjs +12 -12
- package/dist/astro/routes/sitemap.xml.mjs +10 -10
- package/dist/astro/types.d.mts +19 -13
- package/dist/astro/types.d.mts.map +1 -1
- package/dist/auth/providers/github.d.mts +1 -1
- package/dist/auth/providers/google.d.mts +1 -1
- package/dist/{authorize-R5iYYrpa.mjs → authorize-qRhWQnel.mjs} +2 -2
- package/dist/{authorize-R5iYYrpa.mjs.map → authorize-qRhWQnel.mjs.map} +1 -1
- package/dist/{backup-LpQ1V_sR.mjs → backup-CtA6LDNw.mjs} +5 -5
- package/dist/{backup-LpQ1V_sR.mjs.map → backup-CtA6LDNw.mjs.map} +1 -1
- package/dist/{byline-C5TAqs8N.mjs → byline-Cp6csL84.mjs} +9 -9
- package/dist/{byline-C5TAqs8N.mjs.map → byline-Cp6csL84.mjs.map} +1 -1
- package/dist/{byline-fields-T9ZLZMxJ.mjs → byline-fields-CNc0Yq5i.mjs} +2 -2
- package/dist/{byline-fields-T9ZLZMxJ.mjs.map → byline-fields-CNc0Yq5i.mjs.map} +1 -1
- package/dist/{byline-registry-BCuOp4UF.mjs → byline-registry-ZkPKqEwC.mjs} +4 -4
- package/dist/{byline-registry-BCuOp4UF.mjs.map → byline-registry-ZkPKqEwC.mjs.map} +1 -1
- package/dist/{bylines-B8-WGdja.mjs → bylines-CEj5CdT4.mjs} +7 -7
- package/dist/{bylines-B8-WGdja.mjs.map → bylines-CEj5CdT4.mjs.map} +1 -1
- package/dist/{bylines-DGuqBLjV.mjs → bylines-cf-C9lmF.mjs} +4 -4
- package/dist/{bylines-DGuqBLjV.mjs.map → bylines-cf-C9lmF.mjs.map} +1 -1
- package/dist/cache-C9FptTFR.mjs +108 -0
- package/dist/cache-C9FptTFR.mjs.map +1 -0
- package/dist/{challenge-store-BFzgFRog.mjs → challenge-store-D9VNKELo.mjs} +1 -1
- package/dist/{challenge-store-BFzgFRog.mjs.map → challenge-store-D9VNKELo.mjs.map} +1 -1
- package/dist/{chunks-D5dlPeRb.mjs → chunks-DbYzib_k.mjs} +2 -2
- package/dist/{chunks-D5dlPeRb.mjs.map → chunks-DbYzib_k.mjs.map} +1 -1
- package/dist/cli/index.mjs +40 -32
- package/dist/cli/index.mjs.map +1 -1
- package/dist/client/cf-access.d.mts +1 -1
- package/dist/client/index.d.mts +1 -1
- package/dist/client/index.mjs +2 -2
- package/dist/{comment-DnTxxVHv.mjs → comment-BIkJ6Fil.mjs} +3 -3
- package/dist/{comment-DnTxxVHv.mjs.map → comment-BIkJ6Fil.mjs.map} +1 -1
- package/dist/{comment-reaction-BUlUz2bh.mjs → comment-reaction-D-laEceb.mjs} +2 -2
- package/dist/{comment-reaction-BUlUz2bh.mjs.map → comment-reaction-D-laEceb.mjs.map} +1 -1
- package/dist/{comments-QPKgK3nk.mjs → comments-0_w6KChA.mjs} +3 -3
- package/dist/{comments-QPKgK3nk.mjs.map → comments-0_w6KChA.mjs.map} +1 -1
- package/dist/{components-DZkL4Fx0.mjs → components-BPxrRjpE.mjs} +1 -1
- package/dist/{components-DZkL4Fx0.mjs.map → components-BPxrRjpE.mjs.map} +1 -1
- package/dist/{content-CpfKV9QE.mjs → content-CJ94NEx5.mjs} +165 -112
- package/dist/content-CJ94NEx5.mjs.map +1 -0
- package/dist/{content-refresh-DgqUBeTv.mjs → content-refresh-Xw7aKmou.mjs} +6 -6
- package/dist/{content-refresh-DgqUBeTv.mjs.map → content-refresh-Xw7aKmou.mjs.map} +1 -1
- package/dist/{context-kO4YZB03.mjs → context-C_1nrqnW.mjs} +14 -14
- package/dist/{context-kO4YZB03.mjs.map → context-C_1nrqnW.mjs.map} +1 -1
- package/dist/{cron-BlKIMD_e.mjs → cron-DRV-UC4K.mjs} +1 -1
- package/dist/{cron-BlKIMD_e.mjs.map → cron-DRV-UC4K.mjs.map} +1 -1
- package/dist/{dashboard-DoBwPnON.mjs → dashboard-DINnNVVU.mjs} +5 -5
- package/dist/{dashboard-DoBwPnON.mjs.map → dashboard-DINnNVVU.mjs.map} +1 -1
- package/dist/db/index.d.mts +3 -3
- package/dist/db/index.mjs +2 -2
- package/dist/db/index.mjs.map +1 -1
- package/dist/db/libsql.d.mts +1 -1
- package/dist/db/postgres.d.mts +1 -1
- package/dist/db/sqlite.d.mts +1 -1
- package/dist/{default-C4v9KP56.mjs → default-BD2FG0xV.mjs} +1 -1
- package/dist/{default-C4v9KP56.mjs.map → default-BD2FG0xV.mjs.map} +1 -1
- package/dist/deferred-tasks-C-WRCcKo.d.mts +9 -0
- package/dist/deferred-tasks-C-WRCcKo.d.mts.map +1 -0
- package/dist/{device-flow-DhUsyJU6.mjs → device-flow-CTqd8mud.mjs} +5 -5
- package/dist/{device-flow-DhUsyJU6.mjs.map → device-flow-CTqd8mud.mjs.map} +1 -1
- package/dist/{dialect-helpers-DFwyWjTM.mjs → dialect-helpers-BSbfaO3F.mjs} +24 -16
- package/dist/dialect-helpers-BSbfaO3F.mjs.map +1 -0
- package/dist/{email-console-C-9Ng8DM.mjs → email-console-C6WdcWbL.mjs} +1 -1
- package/dist/{email-console-C-9Ng8DM.mjs.map → email-console-C6WdcWbL.mjs.map} +1 -1
- package/dist/{error-DmmN74gW.mjs → error-oh_9i6bR.mjs} +3 -3
- package/dist/{error-DmmN74gW.mjs.map → error-oh_9i6bR.mjs.map} +1 -1
- package/dist/{errors-DtEXIQQV.mjs → errors-BucQ8VYz.mjs} +2 -1
- package/dist/errors-BucQ8VYz.mjs.map +1 -0
- package/dist/{escape-CdW31WsG.mjs → escape-CXps5F_v.mjs} +1 -1
- package/dist/{escape-CdW31WsG.mjs.map → escape-CXps5F_v.mjs.map} +1 -1
- package/dist/{field-defs-cache-QMVnzTH6.mjs → field-defs-cache-WD82dMQq.mjs} +4 -4
- package/dist/{field-defs-cache-QMVnzTH6.mjs.map → field-defs-cache-WD82dMQq.mjs.map} +1 -1
- package/dist/{fts-manager-vncsZIJm.mjs → fts-manager-BITakW_R.mjs} +37 -13
- package/dist/fts-manager-BITakW_R.mjs.map +1 -0
- package/dist/{hash-Cb7U1b5M.mjs → hash-Cg0TXJPV.mjs} +1 -1
- package/dist/{hash-Cb7U1b5M.mjs.map → hash-Cg0TXJPV.mjs.map} +1 -1
- package/dist/{hreflang-CZbSx6Bg.d.mts → hreflang-BaLCNcDx.d.mts} +2 -2
- package/dist/{hreflang-CZbSx6Bg.d.mts.map → hreflang-BaLCNcDx.d.mts.map} +1 -1
- package/dist/{hreflang-Bg-zMpkr.mjs → hreflang-BdZuVBhL.mjs} +6 -6
- package/dist/{hreflang-Bg-zMpkr.mjs.map → hreflang-BdZuVBhL.mjs.map} +1 -1
- package/dist/{import-PKhLeXvn.mjs → import-C-9uqyT3.mjs} +6 -6
- package/dist/{import-PKhLeXvn.mjs.map → import-C-9uqyT3.mjs.map} +1 -1
- package/dist/{index-j9rTh3cp.d.mts → index-M37iz29I.d.mts} +75 -35
- package/dist/index-M37iz29I.d.mts.map +1 -0
- package/dist/{index-BeNto_Vs.d.mts → index-MGw47uWq.d.mts} +3 -3
- package/dist/{index-BeNto_Vs.d.mts.map → index-MGw47uWq.d.mts.map} +1 -1
- package/dist/index.d.mts +19 -19
- package/dist/index.mjs +68 -66
- package/dist/{load-BwTdWE8B.mjs → load-DV1DZuUJ.mjs} +2 -2
- package/dist/{load-BwTdWE8B.mjs.map → load-DV1DZuUJ.mjs.map} +1 -1
- package/dist/{loader-C1XOLV5b.mjs → loader-CGugY7Zl.mjs} +29 -15
- package/dist/loader-CGugY7Zl.mjs.map +1 -0
- package/dist/{manifest-schema-bCq54i7F.mjs → manifest-schema-Da7kj23y.mjs} +1 -1
- package/dist/{manifest-schema-bCq54i7F.mjs.map → manifest-schema-Da7kj23y.mjs.map} +1 -1
- package/dist/media/index.d.mts +1 -1
- package/dist/media/local-runtime.d.mts +12 -12
- package/dist/media/local-runtime.mjs +8 -8
- package/dist/{media-tQDZEdu7.mjs → media-BP7S-nHT.mjs} +2 -2
- package/dist/{media-tQDZEdu7.mjs.map → media-BP7S-nHT.mjs.map} +1 -1
- package/dist/{media-DWIzoVFL.mjs → media-OhYL-7Io.mjs} +1 -1
- package/dist/{media-DWIzoVFL.mjs.map → media-OhYL-7Io.mjs.map} +1 -1
- package/dist/{media-allowlist-B7TPD6aq.mjs → media-allowlist-D-peH1H5.mjs} +1 -1
- package/dist/{media-allowlist-B7TPD6aq.mjs.map → media-allowlist-D-peH1H5.mjs.map} +1 -1
- package/dist/{media-upload-Bc9Nc5Zf.mjs → media-upload-DtrwU2B0.mjs} +7 -7
- package/dist/{media-upload-Bc9Nc5Zf.mjs.map → media-upload-DtrwU2B0.mjs.map} +1 -1
- package/dist/{media-url-BCm5vBn6.mjs → media-url-DYs_YLOx.mjs} +1 -1
- package/dist/{media-url-BCm5vBn6.mjs.map → media-url-DYs_YLOx.mjs.map} +1 -1
- package/dist/{media-usage-DPJcNaAq.mjs → media-usage-BlxfTkN0.mjs} +8 -8
- package/dist/{media-usage-DPJcNaAq.mjs.map → media-usage-BlxfTkN0.mjs.map} +1 -1
- package/dist/{menus-BxPLFfIc.mjs → menus-BcQWxeXu.mjs} +4 -4
- package/dist/{menus-BxPLFfIc.mjs.map → menus-BcQWxeXu.mjs.map} +1 -1
- package/dist/{menus-C6qhqP4X.mjs → menus-Y54RDPIN.mjs} +215 -38
- package/dist/menus-Y54RDPIN.mjs.map +1 -0
- package/dist/{mode-fiXRMfeA.mjs → mode-BWyTBe3I.mjs} +1 -1
- package/dist/{mode-fiXRMfeA.mjs.map → mode-BWyTBe3I.mjs.map} +1 -1
- package/dist/{oauth-authorization-C9tFinly.mjs → oauth-authorization-ClvktmrL.mjs} +5 -5
- package/dist/{oauth-authorization-C9tFinly.mjs.map → oauth-authorization-ClvktmrL.mjs.map} +1 -1
- package/dist/{oauth-clients-BwTxE1aE.mjs → oauth-clients-8ao-U66l.mjs} +1 -1
- package/dist/{oauth-clients-BwTxE1aE.mjs.map → oauth-clients-8ao-U66l.mjs.map} +1 -1
- package/dist/{oauth-state-store-DaRUwPWO.mjs → oauth-state-store-B1ofdTiQ.mjs} +1 -1
- package/dist/{oauth-state-store-DaRUwPWO.mjs.map → oauth-state-store-B1ofdTiQ.mjs.map} +1 -1
- package/dist/{oauth-user-lookup-CzuzOSlF.mjs → oauth-user-lookup-CscEuIiR.mjs} +1 -1
- package/dist/{oauth-user-lookup-CzuzOSlF.mjs.map → oauth-user-lookup-CscEuIiR.mjs.map} +1 -1
- package/dist/object-cache/memory.d.mts +1 -1
- package/dist/{object-cache-Bok5j2ae.mjs → object-cache-71tPfV4A.mjs} +106 -5
- package/dist/object-cache-71tPfV4A.mjs.map +1 -0
- package/dist/{options-aeIs8WFu.d.mts → options-CA4eVX6P.d.mts} +3 -3
- package/dist/{options-aeIs8WFu.d.mts.map → options-CA4eVX6P.d.mts.map} +1 -1
- package/dist/{options-BlmBHTvX.mjs → options-CBXIHUoT.mjs} +1 -1
- package/dist/{options-BlmBHTvX.mjs.map → options-CBXIHUoT.mjs.map} +1 -1
- package/dist/page/index.d.mts +2 -2
- package/dist/{parse-BL49yb9D.mjs → parse-CJKNuewM.mjs} +2 -2
- package/dist/{parse-BL49yb9D.mjs.map → parse-CJKNuewM.mjs.map} +1 -1
- package/dist/{passkey-config-KMhgFjdQ.mjs → passkey-config-D-zrzMJI.mjs} +1 -1
- package/dist/{passkey-config-KMhgFjdQ.mjs.map → passkey-config-D-zrzMJI.mjs.map} +1 -1
- package/dist/{placeholder-Dxo5Zt58.d.mts → placeholder-DaeNS-VG.d.mts} +1 -1
- package/dist/{placeholder-Dxo5Zt58.d.mts.map → placeholder-DaeNS-VG.d.mts.map} +1 -1
- package/dist/plugin-types.d.mts +1 -1
- package/dist/plugin-utils.d.mts +10 -10
- package/dist/plugins/adapt-sandbox-entry.d.mts +10 -10
- package/dist/plugins/adapt-sandbox-entry.mjs +2 -2
- package/dist/{portable-text-CNahFfj6.mjs → portable-text-B_kqBmXB.mjs} +1 -1
- package/dist/{portable-text-CNahFfj6.mjs.map → portable-text-B_kqBmXB.mjs.map} +1 -1
- package/dist/{preview-D4Jnbfx7.mjs → preview-BU6PaLpM.mjs} +2 -2
- package/dist/{preview-D4Jnbfx7.mjs.map → preview-BU6PaLpM.mjs.map} +1 -1
- package/dist/{public-url-DSGTnJFw.mjs → public-url-Ox9oOlgp.mjs} +14 -3
- package/dist/public-url-Ox9oOlgp.mjs.map +1 -0
- package/dist/{query-DCiXI7OZ.mjs → query-C5w7PsRQ.mjs} +20 -41
- package/dist/query-C5w7PsRQ.mjs.map +1 -0
- package/dist/{query-1xOcEy18.mjs → query-rC9HKv1N.mjs} +4 -4
- package/dist/{query-1xOcEy18.mjs.map → query-rC9HKv1N.mjs.map} +1 -1
- package/dist/{rate-limit-Vkp9gQ1Y.mjs → rate-limit-kug6q99V.mjs} +2 -2
- package/dist/{rate-limit-Vkp9gQ1Y.mjs.map → rate-limit-kug6q99V.mjs.map} +1 -1
- package/dist/{redirect-BJ6d1yHh.mjs → redirect-DIJxXKOG.mjs} +3 -3
- package/dist/{redirect-BJ6d1yHh.mjs.map → redirect-DIJxXKOG.mjs.map} +1 -1
- package/dist/{redirect-CDgfv9vh.mjs → redirect-Egf2R9yP.mjs} +1 -1
- package/dist/{redirect-CDgfv9vh.mjs.map → redirect-Egf2R9yP.mjs.map} +1 -1
- package/dist/{redirects-Cwkq2H-G.mjs → redirects-Bzm812bY.mjs} +5 -5
- package/dist/{redirects-Cwkq2H-G.mjs.map → redirects-Bzm812bY.mjs.map} +1 -1
- package/dist/{redirects-BOn2DIUs.mjs → redirects-G8wAhWAf.mjs} +20 -6
- package/dist/redirects-G8wAhWAf.mjs.map +1 -0
- package/dist/{registry-BP1JK2xh.mjs → registry-Dbodb4Uo.mjs} +59 -14
- package/dist/registry-Dbodb4Uo.mjs.map +1 -0
- package/dist/{relation-DJ5DZh7B.mjs → relation-Cbe3Sd3m.mjs} +3 -3
- package/dist/{relation-DJ5DZh7B.mjs.map → relation-Cbe3Sd3m.mjs.map} +1 -1
- package/dist/{relations-C4duJnwI.mjs → relations-Bw_E1TXo.mjs} +3 -3
- package/dist/{relations-C4duJnwI.mjs.map → relations-Bw_E1TXo.mjs.map} +1 -1
- package/dist/{relations-DHFQGX0h.d.mts → relations-G2ta7GIl.d.mts} +36 -9
- package/dist/relations-G2ta7GIl.d.mts.map +1 -0
- package/dist/{relations-DpTjftCl.mjs → relations-qHwpUe66.mjs} +5 -5
- package/dist/{relations-DpTjftCl.mjs.map → relations-qHwpUe66.mjs.map} +1 -1
- package/dist/request-context.d.mts +3 -0
- package/dist/request-context.d.mts.map +1 -1
- package/dist/request-context.mjs.map +1 -1
- package/dist/{request-meta-DzXYYI-n.mjs → request-meta-Df-jFbAd.mjs} +2 -2
- package/dist/{request-meta-DzXYYI-n.mjs.map → request-meta-Df-jFbAd.mjs.map} +1 -1
- package/dist/{resolve-BUvFE0Lr.mjs → resolve-DZzG4HqM.mjs} +1 -1
- package/dist/{resolve-BUvFE0Lr.mjs.map → resolve-DZzG4HqM.mjs.map} +1 -1
- package/dist/{runner-BsI18UgP.mjs → runner-BFTrkYhu.mjs} +482 -216
- package/dist/runner-BFTrkYhu.mjs.map +1 -0
- package/dist/{runner-CHdkERbt.d.mts → runner-BaADli8l.d.mts} +2 -2
- package/dist/{runner-CHdkERbt.d.mts.map → runner-BaADli8l.d.mts.map} +1 -1
- package/dist/runtime.d.mts +11 -11
- package/dist/runtime.mjs +3 -3
- package/dist/{schema-eqZhkR0S.mjs → schema-CiQXr6_F.mjs} +3 -3
- package/dist/{schema-eqZhkR0S.mjs.map → schema-CiQXr6_F.mjs.map} +1 -1
- package/dist/{scopes-Be2d8bSb.mjs → scopes-CNJVT5i5.mjs} +3 -3
- package/dist/{scopes-Be2d8bSb.mjs.map → scopes-CNJVT5i5.mjs.map} +1 -1
- package/dist/{search-CeO678cp.mjs → search-FZhx5dDU.mjs} +6 -6
- package/dist/{search-CeO678cp.mjs.map → search-FZhx5dDU.mjs.map} +1 -1
- package/dist/{secrets-870d-7yA.mjs → secrets-DLd8RXee.mjs} +4 -4
- package/dist/{secrets-870d-7yA.mjs.map → secrets-DLd8RXee.mjs.map} +1 -1
- package/dist/{sections-DSuEfirn.mjs → sections-BrIrMUCn.mjs} +3 -3
- package/dist/{sections-DSuEfirn.mjs.map → sections-BrIrMUCn.mjs.map} +1 -1
- package/dist/seed/index.d.mts +2 -2
- package/dist/seed/index.mjs +24 -24
- package/dist/seo/index.d.mts +3 -3
- package/dist/seo/index.mjs +17 -17
- package/dist/{seo-C3GDfT0V.mjs → seo-CobNfOvb.mjs} +2 -2
- package/dist/{seo-C3GDfT0V.mjs.map → seo-CobNfOvb.mjs.map} +1 -1
- package/dist/{seo-BAPKiED8.mjs → seo-DTHRntNC.mjs} +3 -3
- package/dist/{seo-BAPKiED8.mjs.map → seo-DTHRntNC.mjs.map} +1 -1
- package/dist/{service-DyFT-k-R.mjs → service-B-pYGPgR.mjs} +4 -4
- package/dist/{service-DyFT-k-R.mjs.map → service-B-pYGPgR.mjs.map} +1 -1
- package/dist/{session-user-BrK2zz7S.mjs → session-user-BvM9-zNl.mjs} +2 -2
- package/dist/{session-user-BrK2zz7S.mjs.map → session-user-BvM9-zNl.mjs.map} +1 -1
- package/dist/{settings-CREKyj8I.mjs → settings-DPHau-WH.mjs} +3 -3
- package/dist/{settings-CREKyj8I.mjs.map → settings-DPHau-WH.mjs.map} +1 -1
- package/dist/{settings-DgKouY2S.mjs → settings-kJhGiQ4z.mjs} +7 -7
- package/dist/{settings-DgKouY2S.mjs.map → settings-kJhGiQ4z.mjs.map} +1 -1
- package/dist/{setup-complete-L7bMK2VI.mjs → setup-complete-u50Qm8rY.mjs} +2 -2
- package/dist/{setup-complete-L7bMK2VI.mjs.map → setup-complete-u50Qm8rY.mjs.map} +1 -1
- package/dist/{setup-nonce-Ct5tjWcq.mjs → setup-nonce-DCjiiOD2.mjs} +1 -1
- package/dist/{setup-nonce-Ct5tjWcq.mjs.map → setup-nonce-DCjiiOD2.mjs.map} +1 -1
- package/dist/{single-flight-cache-C2exrGAi.mjs → single-flight-cache-DW3w11Pu.mjs} +1 -1
- package/dist/{single-flight-cache-C2exrGAi.mjs.map → single-flight-cache-DW3w11Pu.mjs.map} +1 -1
- package/dist/site-url-I-lJ5kma.mjs +16 -0
- package/dist/site-url-I-lJ5kma.mjs.map +1 -0
- package/dist/{snapshot-BdpUJKD-.mjs → snapshot-I_fjLDaD.mjs} +2 -2
- package/dist/{snapshot-BdpUJKD-.mjs.map → snapshot-I_fjLDaD.mjs.map} +1 -1
- package/dist/{ssrf-CviKqWmq.mjs → ssrf-CTa6v21i.mjs} +1 -1
- package/dist/{ssrf-CviKqWmq.mjs.map → ssrf-CTa6v21i.mjs.map} +1 -1
- package/dist/{state-xxv6ZTMv.mjs → state-CQvoefYP.mjs} +1 -1
- package/dist/{state-xxv6ZTMv.mjs.map → state-CQvoefYP.mjs.map} +1 -1
- package/dist/{status-COfycGIU.mjs → status-CIsmlC1E.mjs} +1 -1
- package/dist/{status-COfycGIU.mjs.map → status-CIsmlC1E.mjs.map} +1 -1
- package/dist/storage/local.d.mts +1 -1
- package/dist/storage/local.mjs +1 -1
- package/dist/storage/s3.d.mts +1 -1
- package/dist/storage/s3.mjs +1 -1
- package/dist/{taxonomies-Dbdki3Un.mjs → taxonomies-CKuaZER5.mjs} +85 -5
- package/dist/taxonomies-CKuaZER5.mjs.map +1 -0
- package/dist/{taxonomies-B61CRSha.mjs → taxonomies-CLN1N92E.mjs} +16 -17
- package/dist/taxonomies-CLN1N92E.mjs.map +1 -0
- package/dist/{taxonomy-DvwWAPvA.mjs → taxonomy-pOrB2kZe.mjs} +142 -15
- package/dist/taxonomy-pOrB2kZe.mjs.map +1 -0
- package/dist/{tokens-DVltpO2D.mjs → tokens-DagaJGK8.mjs} +1 -1
- package/dist/{tokens-DVltpO2D.mjs.map → tokens-DagaJGK8.mjs.map} +1 -1
- package/dist/{transaction-D0FOsb3X.mjs → transaction-NQj4VJ7Z.mjs} +1 -1
- package/dist/{transaction-D0FOsb3X.mjs.map → transaction-NQj4VJ7Z.mjs.map} +1 -1
- package/dist/{transport-DokJOScS.d.mts → transport-CAwTaTp_.d.mts} +1 -1
- package/dist/{transport-DokJOScS.d.mts.map → transport-CAwTaTp_.d.mts.map} +1 -1
- package/dist/{transport-BWQo0Foy.mjs → transport-DVsa5YYo.mjs} +1 -1
- package/dist/{transport-BWQo0Foy.mjs.map → transport-DVsa5YYo.mjs.map} +1 -1
- package/dist/{trusted-proxy-CwjQj0YG.mjs → trusted-proxy-D20_7fyX.mjs} +1 -1
- package/dist/{trusted-proxy-CwjQj0YG.mjs.map → trusted-proxy-D20_7fyX.mjs.map} +1 -1
- package/dist/{types-DqZVPILm.d.mts → types-BGWPMiBO.d.mts} +2 -2
- package/dist/{types-DqZVPILm.d.mts.map → types-BGWPMiBO.d.mts.map} +1 -1
- package/dist/{types-DsAMyD_o.d.mts → types-BK6U01Ro.d.mts} +1 -1
- package/dist/{types-DsAMyD_o.d.mts.map → types-BK6U01Ro.d.mts.map} +1 -1
- package/dist/{types-BD40g7zz.mjs → types-BjxTKxrZ.mjs} +1 -1
- package/dist/{types-BD40g7zz.mjs.map → types-BjxTKxrZ.mjs.map} +1 -1
- package/dist/{types-jISEalTX.d.mts → types-BnFP1M3J.d.mts} +22 -1
- package/dist/types-BnFP1M3J.d.mts.map +1 -0
- package/dist/{types-Dr2GLlwu.d.mts → types-C8oz_ayJ.d.mts} +1 -1
- package/dist/{types-Dr2GLlwu.d.mts.map → types-C8oz_ayJ.d.mts.map} +1 -1
- package/dist/{types-C9P3ysxq.d.mts → types-CbUcuxxc.d.mts} +1 -1
- package/dist/{types-C9P3ysxq.d.mts.map → types-CbUcuxxc.d.mts.map} +1 -1
- package/dist/{types-XrQQ-Aex.mjs → types-Cd8iuS1J.mjs} +10 -3
- package/dist/{types-XrQQ-Aex.mjs.map → types-Cd8iuS1J.mjs.map} +1 -1
- package/dist/types-CtzytVXn.mjs +18 -0
- package/dist/types-CtzytVXn.mjs.map +1 -0
- package/dist/{types-BQY7VYw6.d.mts → types-Cz8hNch2.d.mts} +5 -5
- package/dist/{types-BQY7VYw6.d.mts.map → types-Cz8hNch2.d.mts.map} +1 -1
- package/dist/{types-CcSZCcF1.d.mts → types-DLG4IFEQ.d.mts} +1 -1
- package/dist/{types-CcSZCcF1.d.mts.map → types-DLG4IFEQ.d.mts.map} +1 -1
- package/dist/{types-84Bque3-.d.mts → types-Dc4ntQjQ.d.mts} +10 -1
- package/dist/types-Dc4ntQjQ.d.mts.map +1 -0
- package/dist/{types-DQLZ58GV.d.mts → types-LoagAGzH.d.mts} +1 -1
- package/dist/{types-DQLZ58GV.d.mts.map → types-LoagAGzH.d.mts.map} +1 -1
- package/dist/{types-o7xo7VgH.mjs → types-NBI3rF-_.mjs} +3 -2
- package/dist/types-NBI3rF-_.mjs.map +1 -0
- package/dist/{upload-attempts-C5yd6Gae.mjs → upload-attempts-D8QAFLUJ.mjs} +1 -1
- package/dist/{upload-attempts-C5yd6Gae.mjs.map → upload-attempts-D8QAFLUJ.mjs.map} +1 -1
- package/dist/{user-BAumEmpA.mjs → user-DBrq4UVq.mjs} +3 -3
- package/dist/{user-BAumEmpA.mjs.map → user-DBrq4UVq.mjs.map} +1 -1
- package/dist/{utils-BbUgmeZG.mjs → utils-hLzi_2Fn.mjs} +2 -2
- package/dist/{utils-BbUgmeZG.mjs.map → utils-hLzi_2Fn.mjs.map} +1 -1
- package/dist/{validate-VPnKoIzW.mjs → validate-BpwoDOgt.mjs} +25 -2
- package/dist/validate-BpwoDOgt.mjs.map +1 -0
- package/dist/{validate-CdYcY-Ln.d.mts → validate-C3oSmA7F.d.mts} +15 -5
- package/dist/validate-C3oSmA7F.d.mts.map +1 -0
- package/dist/{validate-Bs_wT2ul.mjs → validate-mKo3RxBM.mjs} +3 -3
- package/dist/{validate-Bs_wT2ul.mjs.map → validate-mKo3RxBM.mjs.map} +1 -1
- package/dist/{validation-BngR0nit.mjs → validation-BgpucsvF.mjs} +10 -10
- package/dist/{validation-BngR0nit.mjs.map → validation-BgpucsvF.mjs.map} +1 -1
- package/dist/version-C4PnpmoV.mjs +7 -0
- package/dist/{version-Bdfb34kk.mjs.map → version-C4PnpmoV.mjs.map} +1 -1
- package/dist/{widgets-L-VndTKD.mjs → widgets-CJJtkiKh.mjs} +3 -3
- package/dist/{widgets-L-VndTKD.mjs.map → widgets-CJJtkiKh.mjs.map} +1 -1
- package/dist/{wxr-taxonomies-BexjtNid.mjs → wxr-taxonomies-9PPSy8X6.mjs} +4 -4
- package/dist/{wxr-taxonomies-BexjtNid.mjs.map → wxr-taxonomies-9PPSy8X6.mjs.map} +1 -1
- package/dist/{wxr-taxonomies-DueaLFd9.d.mts → wxr-taxonomies-Bkpp_2tK.d.mts} +1 -1
- package/dist/{wxr-taxonomies-DueaLFd9.d.mts.map → wxr-taxonomies-Bkpp_2tK.d.mts.map} +1 -1
- package/dist/{zod-generator-DMzfga3g.mjs → zod-generator-CG64Hnbh.mjs} +3 -3
- package/dist/{zod-generator-DMzfga3g.mjs.map → zod-generator-CG64Hnbh.mjs.map} +1 -1
- package/package.json +11 -8
- package/src/after.ts +6 -1
- package/src/api/errors.ts +1 -0
- package/src/api/handlers/content.ts +45 -4
- package/src/api/handlers/marketplace.ts +14 -0
- package/src/api/handlers/registry.ts +14 -0
- package/src/api/handlers/revision.ts +19 -5
- package/src/api/handlers/schema.ts +37 -0
- package/src/api/handlers/snapshot.ts +1 -1
- package/src/api/handlers/taxonomies.ts +101 -1
- package/src/api/openapi/document.ts +48 -0
- package/src/api/public-url.ts +14 -2
- package/src/api/schemas/schema.ts +13 -0
- package/src/api/schemas/search.ts +2 -0
- package/src/api/schemas/taxonomies.ts +18 -0
- package/src/api/site-url.ts +16 -6
- package/src/astro/integration/routes.ts +14 -0
- package/src/astro/integration/runtime.ts +13 -0
- package/src/astro/integration/virtual-modules.ts +2 -0
- package/src/astro/middleware/redirect.ts +2 -10
- package/src/astro/middleware/scoped-db.ts +35 -4
- package/src/astro/middleware.ts +56 -22
- package/src/astro/routes/api/admin/comments/[id]/status.ts +1 -1
- package/src/astro/routes/api/admin/users/[id]/send-recovery.ts +2 -2
- package/src/astro/routes/api/auth/invite/index.ts +2 -2
- package/src/astro/routes/api/auth/magic-link/send.ts +2 -2
- package/src/astro/routes/api/auth/signup/request.ts +2 -2
- package/src/astro/routes/api/comments/[collection]/[contentId]/index.ts +1 -1
- package/src/astro/routes/api/schema/collections/reorder.ts +31 -0
- package/src/astro/routes/api/schema/index.ts +2 -0
- package/src/astro/routes/api/search/enable.ts +5 -1
- package/src/astro/routes/api/search/rebuild.ts +6 -1
- package/src/astro/routes/api/taxonomies/[name]/reorder.ts +41 -0
- package/src/astro/types.ts +6 -0
- package/src/cleanup.ts +31 -26
- package/src/cli/commands/dev.ts +13 -3
- package/src/cli/commands/export-seed.ts +2 -0
- package/src/cli/index.ts +1 -1
- package/src/components/CommentForm.astro +1 -1
- package/src/components/Comments.astro +1 -1
- package/src/components/InlinePortableTextEditor.tsx +171 -31
- package/src/components/OrderedList.astro +14 -0
- package/src/components/PortableText.astro +26 -4
- package/src/components/index.ts +12 -1
- package/src/components/ordered-list.ts +549 -0
- package/src/content/converters/numbered-list.ts +148 -0
- package/src/content/converters/portable-text-to-prosemirror.ts +59 -9
- package/src/content/converters/prosemirror-to-portable-text.ts +23 -12
- package/src/content/converters/types.ts +2 -0
- package/src/content/portable-text-lists.ts +205 -0
- package/src/database/dialect-helpers.ts +3 -22
- package/src/database/migrations/055_content_translation_group_locale_index.ts +67 -0
- package/src/database/migrations/056_taxonomy_term_sort_order.ts +189 -0
- package/src/database/migrations/057_collection_hidden.ts +24 -0
- package/src/database/migrations/058_collection_sort_order.ts +20 -0
- package/src/database/migrations/059_revision_prune_queue.ts +36 -0
- package/src/database/migrations/runner.ts +10 -0
- package/src/database/repositories/content.ts +191 -178
- package/src/database/repositories/revision.ts +82 -17
- package/src/database/repositories/taxonomy.ts +202 -7
- package/src/database/repositories/types.ts +7 -0
- package/src/database/types.ts +13 -1
- package/src/database/validate.ts +39 -0
- package/src/db/adapters.ts +8 -0
- package/src/deferred-tasks.ts +71 -0
- package/src/emdash-runtime.ts +268 -92
- package/src/index.ts +2 -0
- package/src/loader.ts +46 -24
- package/src/media/usage/gc.ts +50 -0
- package/src/object-cache/index.ts +160 -3
- package/src/plugins/routes.ts +34 -0
- package/src/plugins/storage-indexes.ts +50 -11
- package/src/query.ts +21 -42
- package/src/redirects/cache.ts +79 -19
- package/src/request-context.ts +3 -0
- package/src/scheduled-publish.ts +6 -1
- package/src/schema/registry.ts +95 -3
- package/src/schema/types.ts +24 -0
- package/src/search/fts-manager.ts +50 -10
- package/src/search/index.ts +2 -0
- package/src/search/types.ts +6 -0
- package/src/seed/apply.ts +22 -2
- package/src/seed/types.ts +10 -0
- package/src/taxonomies/index.ts +11 -7
- package/src/taxonomies/term-counts.ts +2 -4
- package/src/ui-comments.ts +19 -0
- package/src/ui.ts +11 -3
- package/src/virtual-modules.d.ts +8 -0
- package/dist/adapters-C0ONzkUP.d.mts.map +0 -1
- package/dist/after-B1IIdH3Y.mjs +0 -29
- package/dist/after-B1IIdH3Y.mjs.map +0 -1
- package/dist/api-DgPbMlng.mjs.map +0 -1
- package/dist/apply-1_6ra7NP.mjs.map +0 -1
- package/dist/cache-B26cufFd.mjs +0 -65
- package/dist/cache-B26cufFd.mjs.map +0 -1
- package/dist/content-CpfKV9QE.mjs.map +0 -1
- package/dist/dialect-helpers-DFwyWjTM.mjs.map +0 -1
- package/dist/errors-DtEXIQQV.mjs.map +0 -1
- package/dist/fts-manager-vncsZIJm.mjs.map +0 -1
- package/dist/index-j9rTh3cp.d.mts.map +0 -1
- package/dist/loader-C1XOLV5b.mjs.map +0 -1
- package/dist/menus-C6qhqP4X.mjs.map +0 -1
- package/dist/object-cache-Bok5j2ae.mjs.map +0 -1
- package/dist/public-url-DSGTnJFw.mjs.map +0 -1
- package/dist/query-DCiXI7OZ.mjs.map +0 -1
- package/dist/redirects-BOn2DIUs.mjs.map +0 -1
- package/dist/registry-BP1JK2xh.mjs.map +0 -1
- package/dist/relations-DHFQGX0h.d.mts.map +0 -1
- package/dist/runner-BsI18UgP.mjs.map +0 -1
- package/dist/site-url-8N3kSyVZ.mjs +0 -13
- package/dist/site-url-8N3kSyVZ.mjs.map +0 -1
- package/dist/taxonomies-B61CRSha.mjs.map +0 -1
- package/dist/taxonomies-Dbdki3Un.mjs.map +0 -1
- package/dist/taxonomy-DvwWAPvA.mjs.map +0 -1
- package/dist/types-84Bque3-.d.mts.map +0 -1
- package/dist/types-jISEalTX.d.mts.map +0 -1
- package/dist/types-o7xo7VgH.mjs.map +0 -1
- package/dist/validate-CdYcY-Ln.d.mts.map +0 -1
- package/dist/validate-VPnKoIzW.mjs.map +0 -1
- package/dist/version-Bdfb34kk.mjs +0 -7
- /package/dist/{api-tokens-CEsW_jCg.mjs → api-tokens-Dai9dND0.mjs} +0 -0
- /package/dist/{ssrf-BB__xfNM.mjs → ssrf-Cj568Dgs.mjs} +0 -0
- /package/dist/{types-CK0LxPUQ.mjs → types-DKuWPYV5.mjs} +0 -0
|
@@ -3,6 +3,7 @@ import { ulid } from "ulidx";
|
|
|
3
3
|
|
|
4
4
|
import { invalidateTaxonomyObjectCache } from "../../object-cache/index.js";
|
|
5
5
|
import { isMissingTableError } from "../../utils/db-errors.js";
|
|
6
|
+
import { withTransaction } from "../transaction.js";
|
|
6
7
|
import type { Database, TaxonomyTable } from "../types.js";
|
|
7
8
|
import { validateIdentifier } from "../validate.js";
|
|
8
9
|
|
|
@@ -29,6 +30,58 @@ const EMPTY_DENORM: PivotDenorm = {
|
|
|
29
30
|
created_at: null,
|
|
30
31
|
};
|
|
31
32
|
|
|
33
|
+
/** A member of one sibling group and the position it currently holds. */
|
|
34
|
+
export interface SiblingPosition {
|
|
35
|
+
group: string;
|
|
36
|
+
position: number;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Translation groups per reorder `UPDATE`. Each costs three bound parameters —
|
|
41
|
+
* a CASE `WHEN`/`THEN` pair plus one slot in the `IN` list — which keeps a
|
|
42
|
+
* statement inside D1's 100-parameter ceiling.
|
|
43
|
+
*/
|
|
44
|
+
const GROUPS_PER_UPDATE = 32;
|
|
45
|
+
|
|
46
|
+
/** Deal the listed groups back out over the slots they hold, in the order given. */
|
|
47
|
+
function permuteWithinSlots(
|
|
48
|
+
listed: readonly string[],
|
|
49
|
+
occupied: readonly number[],
|
|
50
|
+
): Map<string, number> {
|
|
51
|
+
const slots = occupied.toSorted((a, b) => a - b);
|
|
52
|
+
const target = new Map<string, number>();
|
|
53
|
+
listed.forEach((group, index) => {
|
|
54
|
+
const position = slots[index];
|
|
55
|
+
if (position !== undefined) target.set(group, position);
|
|
56
|
+
});
|
|
57
|
+
return target;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Renumber a whole sibling group 0..n-1, with the listed groups in the order
|
|
62
|
+
* given and every other member left in the place it already held.
|
|
63
|
+
*
|
|
64
|
+
* Works off each member's index in the sequence rather than its stored value,
|
|
65
|
+
* which is what lets it resolve positions that tie. The sort is stable, so
|
|
66
|
+
* tied members keep the order `siblings` arrives in — deterministic, but a
|
|
67
|
+
* listing that mixes locales breaks a tie on whichever locale's label sorts
|
|
68
|
+
* first, not on the order any one caller rendered.
|
|
69
|
+
*/
|
|
70
|
+
function renumberSiblings(
|
|
71
|
+
listed: readonly string[],
|
|
72
|
+
siblings: readonly SiblingPosition[],
|
|
73
|
+
): Map<string, number> {
|
|
74
|
+
const sequence = siblings.toSorted((a, b) => a.position - b.position);
|
|
75
|
+
const wanted = new Set(listed);
|
|
76
|
+
const target = new Map<string, number>();
|
|
77
|
+
let next = 0;
|
|
78
|
+
sequence.forEach(({ group }, index) => {
|
|
79
|
+
const replacement = wanted.has(group) ? listed[next++] : undefined;
|
|
80
|
+
target.set(replacement ?? group, index);
|
|
81
|
+
});
|
|
82
|
+
return target;
|
|
83
|
+
}
|
|
84
|
+
|
|
32
85
|
export interface Taxonomy {
|
|
33
86
|
id: string;
|
|
34
87
|
name: string;
|
|
@@ -38,6 +91,11 @@ export interface Taxonomy {
|
|
|
38
91
|
data: Record<string, unknown> | null;
|
|
39
92
|
locale: string;
|
|
40
93
|
translationGroup: string | null;
|
|
94
|
+
/**
|
|
95
|
+
* Position among siblings. Shared by every row of a `translation_group` —
|
|
96
|
+
* a term sits in the same place in every locale it is translated into.
|
|
97
|
+
*/
|
|
98
|
+
sortOrder: number;
|
|
41
99
|
}
|
|
42
100
|
|
|
43
101
|
export interface CreateTaxonomyInput {
|
|
@@ -75,6 +133,12 @@ export interface FindOptions {
|
|
|
75
133
|
* The repository does not resolve locale fallbacks on its own — callers supply
|
|
76
134
|
* the locale they want. Runtime helpers and handlers use `getFallbackChain()`
|
|
77
135
|
* from `i18n/config` when they need fallback behaviour.
|
|
136
|
+
*
|
|
137
|
+
* `sort_order` is per translation_group, not per row: every row sharing a
|
|
138
|
+
* translation_group carries the same value, so a term holds one position across
|
|
139
|
+
* all its locales. Sibling groups are keyed on the raw `parent_id` column, which
|
|
140
|
+
* is locale-agnostic for the same reason (it stores the parent's
|
|
141
|
+
* translation_group). Writes must preserve both invariants.
|
|
78
142
|
*/
|
|
79
143
|
export class TaxonomyRepository {
|
|
80
144
|
constructor(private db: Kysely<Database>) {}
|
|
@@ -98,10 +162,17 @@ export class TaxonomyRepository {
|
|
|
98
162
|
const parentId = parentInput ? await this.resolveParentRef(parentInput) : null;
|
|
99
163
|
|
|
100
164
|
let translationGroup = id;
|
|
165
|
+
let sortOrder: number | null = null;
|
|
101
166
|
if (input.translationOf) {
|
|
102
167
|
const source = await this.findById(input.translationOf);
|
|
103
168
|
if (source?.translationGroup) translationGroup = source.translationGroup;
|
|
169
|
+
// A translation is the same term in another locale, so it takes the
|
|
170
|
+
// group's position — but only while it stays in the group that position
|
|
171
|
+
// belongs to. Landing under a different parent makes it a new member of
|
|
172
|
+
// that sibling group, and the source's position means nothing there.
|
|
173
|
+
if (source && source.parentId === parentId) sortOrder = source.sortOrder;
|
|
104
174
|
}
|
|
175
|
+
sortOrder ??= await this.nextSortOrder(input.name, parentId);
|
|
105
176
|
|
|
106
177
|
await this.db
|
|
107
178
|
.insertInto("taxonomies")
|
|
@@ -112,6 +183,7 @@ export class TaxonomyRepository {
|
|
|
112
183
|
label: input.label,
|
|
113
184
|
parent_id: parentId,
|
|
114
185
|
data: input.data ? JSON.stringify(input.data) : null,
|
|
186
|
+
sort_order: sortOrder,
|
|
115
187
|
// When omitted, the DB DEFAULT 'en' is used — keeps behaviour
|
|
116
188
|
// consistent with ContentRepository and lets higher layers
|
|
117
189
|
// supply an explicit locale from request context.
|
|
@@ -155,15 +227,18 @@ export class TaxonomyRepository {
|
|
|
155
227
|
/**
|
|
156
228
|
* Get all terms for a taxonomy (e.g., all categories).
|
|
157
229
|
*
|
|
158
|
-
* `
|
|
159
|
-
*
|
|
160
|
-
*
|
|
230
|
+
* `sort_order` carries the manual order set from the admin; it is 0 for
|
|
231
|
+
* terms nobody has reordered, so an untouched taxonomy still comes back
|
|
232
|
+
* alphabetically. `id asc` is a stable tiebreaker for terms that share both
|
|
233
|
+
* — without it the SQL ordering is implementation-defined when they match,
|
|
234
|
+
* which breaks keyset pagination over `(label, id)`.
|
|
161
235
|
*/
|
|
162
236
|
async findByName(name: string, options: FindOptions = {}): Promise<Taxonomy[]> {
|
|
163
237
|
let query = this.db
|
|
164
238
|
.selectFrom("taxonomies")
|
|
165
239
|
.selectAll()
|
|
166
240
|
.where("name", "=", name)
|
|
241
|
+
.orderBy("sort_order", "asc")
|
|
167
242
|
.orderBy("label", "asc")
|
|
168
243
|
.orderBy("id", "asc");
|
|
169
244
|
|
|
@@ -196,6 +271,7 @@ export class TaxonomyRepository {
|
|
|
196
271
|
.selectFrom("taxonomies")
|
|
197
272
|
.selectAll()
|
|
198
273
|
.where("parent_id", "=", group)
|
|
274
|
+
.orderBy("sort_order", "asc")
|
|
199
275
|
.orderBy("label", "asc")
|
|
200
276
|
.orderBy("id", "asc");
|
|
201
277
|
if (locale !== undefined) query = query.where("locale", "=", locale);
|
|
@@ -222,28 +298,146 @@ export class TaxonomyRepository {
|
|
|
222
298
|
const existing = await this.findById(id);
|
|
223
299
|
if (!existing) return null;
|
|
224
300
|
|
|
301
|
+
// Per-row display fields. `parent_id` and `sort_order` are not here: both
|
|
302
|
+
// belong to the translation_group and are written across it below.
|
|
225
303
|
const updates: Record<string, unknown> = {};
|
|
226
304
|
if (input.slug !== undefined) updates.slug = input.slug;
|
|
227
305
|
if (input.label !== undefined) updates.label = input.label;
|
|
306
|
+
if (input.data !== undefined) updates.data = JSON.stringify(input.data);
|
|
307
|
+
|
|
308
|
+
const group: { parent_id?: string | null; sort_order?: number } = {};
|
|
228
309
|
if (input.parentId !== undefined) {
|
|
229
310
|
// Defense in depth: empty-string parentId means null (no parent).
|
|
230
311
|
// Otherwise persist the parent's translation_group (locale-agnostic),
|
|
231
312
|
// matching create() — see the note there.
|
|
232
|
-
|
|
313
|
+
const parentId =
|
|
233
314
|
input.parentId === "" || input.parentId === null
|
|
234
315
|
? null
|
|
235
316
|
: await this.resolveParentRef(input.parentId);
|
|
317
|
+
|
|
318
|
+
if (parentId !== existing.parentId) {
|
|
319
|
+
group.parent_id = parentId;
|
|
320
|
+
// A position only means anything within one sibling group, so a term
|
|
321
|
+
// that changes parent is appended to the group it lands in.
|
|
322
|
+
group.sort_order = await this.nextSortOrder(existing.name, parentId);
|
|
323
|
+
}
|
|
236
324
|
}
|
|
237
|
-
if (input.data !== undefined) updates.data = JSON.stringify(input.data);
|
|
238
325
|
|
|
239
|
-
|
|
240
|
-
|
|
326
|
+
const hasRowUpdates = Object.keys(updates).length > 0;
|
|
327
|
+
const hasGroupUpdates = Object.keys(group).length > 0;
|
|
328
|
+
if (hasRowUpdates || hasGroupUpdates) {
|
|
329
|
+
await withTransaction(this.db, async (trx) => {
|
|
330
|
+
if (hasRowUpdates) {
|
|
331
|
+
await trx.updateTable("taxonomies").set(updates).where("id", "=", id).execute();
|
|
332
|
+
}
|
|
333
|
+
if (hasGroupUpdates) {
|
|
334
|
+
await trx
|
|
335
|
+
.updateTable("taxonomies")
|
|
336
|
+
.set(group)
|
|
337
|
+
.where("translation_group", "=", existing.translationGroup ?? existing.id)
|
|
338
|
+
.execute();
|
|
339
|
+
}
|
|
340
|
+
});
|
|
241
341
|
invalidateTaxonomyObjectCache();
|
|
242
342
|
}
|
|
243
343
|
|
|
244
344
|
return this.findById(id);
|
|
245
345
|
}
|
|
246
346
|
|
|
347
|
+
/**
|
|
348
|
+
* Move `groups` (translation_groups, in the desired order) into the positions
|
|
349
|
+
* those same groups already occupy, leaving every other member of the sibling
|
|
350
|
+
* group where it is.
|
|
351
|
+
*
|
|
352
|
+
* `groups` may be a subset: a locale renders only the terms translated into
|
|
353
|
+
* it, so an admin in `fr` often cannot name every member. A group left out
|
|
354
|
+
* keeps its place, which is also what makes a stale list harmless.
|
|
355
|
+
*
|
|
356
|
+
* `siblings` is every member of the group with the position it holds, in a
|
|
357
|
+
* listing's order — tied positions are resolved by that order, so pass it as
|
|
358
|
+
* read. Groups already at their target are skipped, so one swap rewrites two
|
|
359
|
+
* groups rather than the whole list.
|
|
360
|
+
*/
|
|
361
|
+
async reorder(groups: string[], siblings: readonly SiblingPosition[]): Promise<void> {
|
|
362
|
+
const current = new Map(siblings.map(({ group, position }) => [group, position]));
|
|
363
|
+
|
|
364
|
+
const listed: string[] = [];
|
|
365
|
+
const occupied: number[] = [];
|
|
366
|
+
for (const group of groups) {
|
|
367
|
+
const position = current.get(group);
|
|
368
|
+
if (position === undefined) continue;
|
|
369
|
+
listed.push(group);
|
|
370
|
+
occupied.push(position);
|
|
371
|
+
}
|
|
372
|
+
if (listed.length === 0) return;
|
|
373
|
+
|
|
374
|
+
// Tied positions have no distinct order to permute into, so the requested
|
|
375
|
+
// one would be dropped without a word. Renumbering is the only way to
|
|
376
|
+
// honour it, and it repairs the tie on the way through.
|
|
377
|
+
const target =
|
|
378
|
+
new Set(occupied).size === occupied.length
|
|
379
|
+
? permuteWithinSlots(listed, occupied)
|
|
380
|
+
: renumberSiblings(listed, siblings);
|
|
381
|
+
|
|
382
|
+
const changed = [...target].filter(([group, position]) => current.get(group) !== position);
|
|
383
|
+
if (changed.length === 0) return;
|
|
384
|
+
|
|
385
|
+
await this.applyPositions(changed);
|
|
386
|
+
|
|
387
|
+
invalidateTaxonomyObjectCache();
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
/**
|
|
391
|
+
* Write one position per translation_group, GROUPS_PER_UPDATE at a time so
|
|
392
|
+
* each statement stays inside D1's parameter ceiling.
|
|
393
|
+
*
|
|
394
|
+
* D1 has no transactions — `withTransaction` runs its callback bare there —
|
|
395
|
+
* so a chunk is the unit that can't tear. A reorder spanning several chunks
|
|
396
|
+
* can, and leaves ties, which the next reorder renumbers away.
|
|
397
|
+
*/
|
|
398
|
+
private async applyPositions(positions: readonly (readonly [string, number])[]): Promise<void> {
|
|
399
|
+
for (let index = 0; index < positions.length; index += GROUPS_PER_UPDATE) {
|
|
400
|
+
const chunk = positions.slice(index, index + GROUPS_PER_UPDATE);
|
|
401
|
+
// The CAST types the bound position. Postgres resolves a CASE whose THEN
|
|
402
|
+
// arms are all untyped parameters to text, then refuses to assign text to
|
|
403
|
+
// an integer column.
|
|
404
|
+
const arms = sql.join(
|
|
405
|
+
chunk.map(([group, position]) => sql`WHEN ${group} THEN CAST(${position} AS INTEGER)`),
|
|
406
|
+
sql` `,
|
|
407
|
+
);
|
|
408
|
+
const keys = sql.join(chunk.map(([group]) => sql`${group}`));
|
|
409
|
+
await sql`
|
|
410
|
+
UPDATE taxonomies
|
|
411
|
+
SET sort_order = CASE translation_group ${arms} END
|
|
412
|
+
WHERE translation_group IN (${keys})
|
|
413
|
+
`.execute(this.db);
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
/**
|
|
418
|
+
* Position for a term joining a sibling group: one past the last member, or
|
|
419
|
+
* 0 when the group is empty.
|
|
420
|
+
*
|
|
421
|
+
* Bounds are taken across every locale because a position belongs to the
|
|
422
|
+
* translation_group, not to a row — a term translated into only one locale
|
|
423
|
+
* still occupies its slot for all of them.
|
|
424
|
+
*/
|
|
425
|
+
private async nextSortOrder(name: string, parentId: string | null): Promise<number> {
|
|
426
|
+
let query = this.db
|
|
427
|
+
.selectFrom("taxonomies")
|
|
428
|
+
.select((eb) => eb.fn.max("sort_order").as("max"))
|
|
429
|
+
.where("name", "=", name);
|
|
430
|
+
query =
|
|
431
|
+
parentId === null
|
|
432
|
+
? query.where("parent_id", "is", null)
|
|
433
|
+
: query.where("parent_id", "=", parentId);
|
|
434
|
+
|
|
435
|
+
const bounds = await query.executeTakeFirst();
|
|
436
|
+
// Null only when the group is empty.
|
|
437
|
+
if (!bounds || bounds.max === null) return 0;
|
|
438
|
+
return bounds.max + 1;
|
|
439
|
+
}
|
|
440
|
+
|
|
247
441
|
async delete(id: string): Promise<boolean> {
|
|
248
442
|
const term = await this.findById(id);
|
|
249
443
|
if (!term) return false;
|
|
@@ -543,6 +737,7 @@ export class TaxonomyRepository {
|
|
|
543
737
|
data: row.data ? JSON.parse(row.data) : null,
|
|
544
738
|
locale: row.locale,
|
|
545
739
|
translationGroup: row.translation_group,
|
|
740
|
+
sortOrder: row.sort_order,
|
|
546
741
|
};
|
|
547
742
|
}
|
|
548
743
|
}
|
|
@@ -290,3 +290,10 @@ export class ScheduledNotDueError extends Error {
|
|
|
290
290
|
this.name = "ScheduledNotDueError";
|
|
291
291
|
}
|
|
292
292
|
}
|
|
293
|
+
|
|
294
|
+
export class ContentMutationConflictError extends Error {
|
|
295
|
+
constructor(message = "Content changed while the operation was in progress") {
|
|
296
|
+
super(message);
|
|
297
|
+
this.name = "ContentMutationConflictError";
|
|
298
|
+
}
|
|
299
|
+
}
|
package/src/database/types.ts
CHANGED
|
@@ -13,6 +13,12 @@ export interface RevisionTable {
|
|
|
13
13
|
created_at: Generated<string>;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
export interface RevisionPruneQueueTable {
|
|
17
|
+
collection: string;
|
|
18
|
+
entry_id: string;
|
|
19
|
+
revision_id: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
16
22
|
export interface TaxonomyTable {
|
|
17
23
|
id: string;
|
|
18
24
|
name: string;
|
|
@@ -22,6 +28,9 @@ export interface TaxonomyTable {
|
|
|
22
28
|
data: string | null; // JSON
|
|
23
29
|
locale: Generated<string>; // e.g. 'en', 'es', 'fr'
|
|
24
30
|
translation_group: string | null; // shared across translations of the same term
|
|
31
|
+
// Manual order within a sibling group. 0 for terms that were never
|
|
32
|
+
// explicitly reordered, so listings fall back to alphabetical.
|
|
33
|
+
sort_order: Generated<number>;
|
|
25
34
|
}
|
|
26
35
|
|
|
27
36
|
export interface ContentTaxonomyTable {
|
|
@@ -302,9 +311,11 @@ export interface CollectionTable {
|
|
|
302
311
|
icon: string | null;
|
|
303
312
|
supports: string | null; // JSON array
|
|
304
313
|
source: string | null;
|
|
305
|
-
search_config: string | null; // JSON:
|
|
314
|
+
search_config: string | null; // JSON: SearchConfig
|
|
306
315
|
has_seo: number; // 0 or 1 — opt-in SEO fields for this collection
|
|
307
316
|
url_pattern: string | null; // URL pattern with {slug} placeholder (e.g. "/blog/{slug}")
|
|
317
|
+
hidden: Generated<number>; // 0 or 1 — omit the auto-generated admin sidebar entry
|
|
318
|
+
sort_order: number | null; // explicit admin sidebar position; NULL = alphabetical fallback
|
|
308
319
|
comments_enabled: Generated<number>; // 0 or 1
|
|
309
320
|
comments_moderation: Generated<string>; // 'all' | 'first_time' | 'none'
|
|
310
321
|
comments_closed_after_days: Generated<number>; // 0 = never close
|
|
@@ -500,6 +511,7 @@ export interface SectionTable {
|
|
|
500
511
|
// Note: ec_* content tables are dynamic and not part of this type
|
|
501
512
|
export interface Database {
|
|
502
513
|
revisions: RevisionTable;
|
|
514
|
+
_emdash_revision_prune_queue: RevisionPruneQueueTable;
|
|
503
515
|
taxonomies: TaxonomyTable;
|
|
504
516
|
content_taxonomies: ContentTaxonomyTable;
|
|
505
517
|
_emdash_taxonomy_defs: TaxonomyDefTable;
|
package/src/database/validate.ts
CHANGED
|
@@ -26,6 +26,13 @@ const GENERIC_IDENTIFIER_PATTERN = /^[a-zA-Z][a-zA-Z0-9_]*$/;
|
|
|
26
26
|
*/
|
|
27
27
|
const PLUGIN_IDENTIFIER_PATTERN = /^[a-z][a-z0-9_-]*$/;
|
|
28
28
|
|
|
29
|
+
/**
|
|
30
|
+
* Pattern for plugin storage collection names.
|
|
31
|
+
* Manifests declare these as free-form keys, so both cases and hyphens are
|
|
32
|
+
* allowed; the charset still excludes quotes, whitespace, and punctuation.
|
|
33
|
+
*/
|
|
34
|
+
const STORAGE_COLLECTION_PATTERN = /^[a-zA-Z][a-zA-Z0-9_-]*$/;
|
|
35
|
+
|
|
29
36
|
/**
|
|
30
37
|
* Maximum length for SQL identifiers.
|
|
31
38
|
* SQLite has no formal limit, but we cap at 128 for sanity.
|
|
@@ -136,3 +143,35 @@ export function validatePluginIdentifier(value: string, label = "plugin identifi
|
|
|
136
143
|
throw new IdentifierError(`${label} must match /^[a-z][a-z0-9_-]*$/ (got "${value}")`, value);
|
|
137
144
|
}
|
|
138
145
|
}
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Validate a plugin storage collection name.
|
|
149
|
+
*
|
|
150
|
+
* Collections are declared as free-form manifest keys and stored as opaque
|
|
151
|
+
* text, so this is deliberately more permissive than `validateIdentifier`:
|
|
152
|
+
* `form-submissions` and `formSubmissions` are legitimate. The charset still
|
|
153
|
+
* rejects quotes and punctuation, keeping generated index names inert.
|
|
154
|
+
*
|
|
155
|
+
* @param value - The string to validate
|
|
156
|
+
* @param label - Human-readable label for error messages
|
|
157
|
+
* @throws {IdentifierError} If the value is not valid
|
|
158
|
+
*/
|
|
159
|
+
export function validateStorageCollectionName(value: string, label = "collection name"): void {
|
|
160
|
+
if (!value || typeof value !== "string") {
|
|
161
|
+
throw new IdentifierError(`${label} must be a non-empty string`, String(value));
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
if (value.length > MAX_IDENTIFIER_LENGTH) {
|
|
165
|
+
throw new IdentifierError(
|
|
166
|
+
`${label} must be ${MAX_IDENTIFIER_LENGTH} characters or less, got ${value.length}`,
|
|
167
|
+
value,
|
|
168
|
+
);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
if (!STORAGE_COLLECTION_PATTERN.test(value)) {
|
|
172
|
+
throw new IdentifierError(
|
|
173
|
+
`${label} must match /^[a-zA-Z][a-zA-Z0-9_-]*$/ (got "${value}")`,
|
|
174
|
+
value,
|
|
175
|
+
);
|
|
176
|
+
}
|
|
177
|
+
}
|
package/src/db/adapters.ts
CHANGED
|
@@ -48,6 +48,14 @@ export interface DatabaseDescriptor {
|
|
|
48
48
|
* the middleware takes its default (singleton) path.
|
|
49
49
|
*/
|
|
50
50
|
supportsRequestScope?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* When true, request middleware resolves the last content-namespace
|
|
53
|
+
* invalidation timestamp and passes it to `createRequestScopedDb`.
|
|
54
|
+
*
|
|
55
|
+
* Keep this unset unless request routing depends on that timestamp: reading
|
|
56
|
+
* it may require an object-cache backend round trip.
|
|
57
|
+
*/
|
|
58
|
+
needsLastContentWriteAt?: boolean;
|
|
51
59
|
/**
|
|
52
60
|
* When true, the adapter's runtime entrypoint MUST export a named
|
|
53
61
|
* `createCoalescingDialect` function. The runtime uses this fresh dialect
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
export interface DeferredTaskTracker {
|
|
2
|
+
settled: Promise<void>;
|
|
3
|
+
track<T>(promise: Promise<T>): Promise<T>;
|
|
4
|
+
settle(): void;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
// Test database teardown uses this process-local registry to drain tasks that
|
|
8
|
+
// run without request middleware. Keep it on globalThis so duplicated SSR
|
|
9
|
+
// chunks and their test helpers observe the same task set.
|
|
10
|
+
const DEFERRED_TASKS_KEY = Symbol.for("emdash:deferred-tasks");
|
|
11
|
+
|
|
12
|
+
const deferredTasks: Set<Promise<unknown>> =
|
|
13
|
+
// eslint-disable-next-line typescript/no-unsafe-type-assertion -- globalThis singleton pattern
|
|
14
|
+
((globalThis as Record<symbol, unknown>)[DEFERRED_TASKS_KEY] as
|
|
15
|
+
| Set<Promise<unknown>>
|
|
16
|
+
| undefined) ??
|
|
17
|
+
(() => {
|
|
18
|
+
const tasks = new Set<Promise<unknown>>();
|
|
19
|
+
(globalThis as Record<symbol, unknown>)[DEFERRED_TASKS_KEY] = tasks;
|
|
20
|
+
return tasks;
|
|
21
|
+
})();
|
|
22
|
+
|
|
23
|
+
export function trackDeferredTask<T>(promise: Promise<T>): Promise<T> {
|
|
24
|
+
let tracked!: Promise<T>;
|
|
25
|
+
tracked = promise.finally(() => deferredTasks.delete(tracked));
|
|
26
|
+
deferredTasks.add(tracked);
|
|
27
|
+
return tracked;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export async function waitForDeferredTasks(): Promise<void> {
|
|
31
|
+
while (deferredTasks.size > 0) {
|
|
32
|
+
await Promise.allSettled(deferredTasks);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export function createDeferredTaskTracker(onSettled: () => void): DeferredTaskTracker {
|
|
37
|
+
let pending = 0;
|
|
38
|
+
let responseSettled = false;
|
|
39
|
+
let completed = false;
|
|
40
|
+
let resolveSettled!: () => void;
|
|
41
|
+
const settled = new Promise<void>((resolve) => {
|
|
42
|
+
resolveSettled = resolve;
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
const completeIfSettled = () => {
|
|
46
|
+
if (completed || !responseSettled || pending > 0) return;
|
|
47
|
+
completed = true;
|
|
48
|
+
try {
|
|
49
|
+
onSettled();
|
|
50
|
+
} finally {
|
|
51
|
+
resolveSettled();
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
return {
|
|
56
|
+
settled,
|
|
57
|
+
track<T>(promise: Promise<T>): Promise<T> {
|
|
58
|
+
pending++;
|
|
59
|
+
return promise.finally(() => {
|
|
60
|
+
// A task may register another after() call before it settles. The
|
|
61
|
+
// counter therefore reaches zero only after the full task chain ends.
|
|
62
|
+
pending--;
|
|
63
|
+
completeIfSettled();
|
|
64
|
+
});
|
|
65
|
+
},
|
|
66
|
+
settle(): void {
|
|
67
|
+
responseSettled = true;
|
|
68
|
+
completeIfSettled();
|
|
69
|
+
},
|
|
70
|
+
};
|
|
71
|
+
}
|