emdash 0.32.0 → 0.34.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-34EN2eXO.d.mts} +34 -2
- package/dist/adapters-34EN2eXO.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-DW7sYyqg.mjs} +2 -2
- package/dist/{allowed-origins-CCEi9bPI.mjs.map → allowed-origins-DW7sYyqg.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 +26 -25
- package/dist/api/route-utils.mjs.map +1 -1
- package/dist/api/schemas/index.d.mts +2 -2
- package/dist/api/schemas/index.mjs +6 -5
- package/dist/{api-DgPbMlng.mjs → api-DdAsirBe.mjs} +321 -428
- package/dist/api-DdAsirBe.mjs.map +1 -0
- package/dist/{api-tokens-p-iMzvXR.mjs → api-tokens-CFXu8F_2.mjs} +2 -2
- package/dist/{api-tokens-p-iMzvXR.mjs.map → api-tokens-CFXu8F_2.mjs.map} +1 -1
- package/dist/{apply-1_6ra7NP.mjs → apply-D5zfeD09.mjs} +139 -102
- package/dist/apply-D5zfeD09.mjs.map +1 -0
- package/dist/astro/index.d.mts +12 -12
- package/dist/astro/index.d.mts.map +1 -1
- package/dist/astro/index.mjs +103 -35
- package/dist/astro/index.mjs.map +1 -1
- package/dist/astro/middleware/auth.d.mts +10 -10
- package/dist/astro/middleware/auth.mjs +9 -9
- package/dist/astro/middleware/media-usage-write-fence.d.mts +7 -0
- package/dist/astro/middleware/media-usage-write-fence.d.mts.map +1 -0
- package/dist/astro/middleware/media-usage-write-fence.mjs +35 -0
- package/dist/astro/middleware/media-usage-write-fence.mjs.map +1 -0
- package/dist/astro/middleware/redirect.d.mts.map +1 -1
- package/dist/astro/middleware/redirect.mjs +13 -10
- package/dist/astro/middleware/redirect.mjs.map +1 -1
- package/dist/astro/middleware/request-context.mjs +5 -5
- package/dist/astro/middleware/setup.mjs +1 -1
- package/dist/astro/middleware.d.mts +12 -11
- package/dist/astro/middleware.d.mts.map +1 -1
- package/dist/astro/middleware.mjs +1915 -223
- package/dist/astro/middleware.mjs.map +1 -1
- package/dist/astro/routes/api/admin/allowed-domains/_domain_.mjs +9 -8
- package/dist/astro/routes/api/admin/allowed-domains/_domain_.mjs.map +1 -1
- package/dist/astro/routes/api/admin/allowed-domains/index.mjs +9 -8
- package/dist/astro/routes/api/admin/allowed-domains/index.mjs.map +1 -1
- 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 +12 -11
- package/dist/astro/routes/api/admin/byline-fields/_slug_.mjs.map +1 -1
- package/dist/astro/routes/api/admin/byline-fields/index.mjs +12 -11
- package/dist/astro/routes/api/admin/byline-fields/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/byline-fields/reorder.mjs +12 -11
- package/dist/astro/routes/api/admin/byline-fields/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/admin/bylines/_id_/index.mjs +20 -20
- package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs +20 -20
- package/dist/astro/routes/api/admin/bylines/index.mjs +20 -20
- package/dist/astro/routes/api/admin/comments/_id_/status.mjs +18 -17
- package/dist/astro/routes/api/admin/comments/_id_/status.mjs.map +1 -1
- package/dist/astro/routes/api/admin/comments/_id_.mjs +8 -8
- package/dist/astro/routes/api/admin/comments/bulk.mjs +14 -13
- package/dist/astro/routes/api/admin/comments/bulk.mjs.map +1 -1
- package/dist/astro/routes/api/admin/comments/counts.mjs +8 -8
- package/dist/astro/routes/api/admin/comments/index.mjs +14 -13
- package/dist/astro/routes/api/admin/comments/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/hooks/exclusive/_hookName_.mjs +6 -6
- package/dist/astro/routes/api/admin/hooks/exclusive/index.mjs +5 -5
- package/dist/astro/routes/api/admin/media-usage/collection-deletions/index.d.mts +8 -0
- package/dist/astro/routes/api/admin/media-usage/collection-deletions/index.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/media-usage/collection-deletions/index.mjs +36 -0
- package/dist/astro/routes/api/admin/media-usage/collection-deletions/index.mjs.map +1 -0
- package/dist/astro/routes/api/admin/media-usage/collection-deletions/retry.d.mts +8 -0
- package/dist/astro/routes/api/admin/media-usage/collection-deletions/retry.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/media-usage/collection-deletions/retry.mjs +36 -0
- package/dist/astro/routes/api/admin/media-usage/collection-deletions/retry.mjs.map +1 -0
- package/dist/astro/routes/api/admin/media-usage/repair.mjs +15 -14
- package/dist/astro/routes/api/admin/media-usage/repair.mjs.map +1 -1
- package/dist/astro/routes/api/admin/media-usage/work/index.d.mts +8 -0
- package/dist/astro/routes/api/admin/media-usage/work/index.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/media-usage/work/index.mjs +37 -0
- package/dist/astro/routes/api/admin/media-usage/work/index.mjs.map +1 -0
- package/dist/astro/routes/api/admin/media-usage/work/retry.d.mts +8 -0
- package/dist/astro/routes/api/admin/media-usage/work/retry.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/media-usage/work/retry.mjs +37 -0
- package/dist/astro/routes/api/admin/media-usage/work/retry.mjs.map +1 -0
- package/dist/astro/routes/api/admin/oauth-clients/_id_.mjs +5 -5
- package/dist/astro/routes/api/admin/oauth-clients/index.mjs +5 -5
- package/dist/astro/routes/api/admin/plugins/_id_/disable.d.mts.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs +56 -47
- package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/enable.d.mts.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +56 -47
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +52 -46
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/mcp.mjs +6 -6
- package/dist/astro/routes/api/admin/plugins/_id_/settings.mjs +52 -46
- package/dist/astro/routes/api/admin/plugins/_id_/settings.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.d.mts.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +55 -46
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/update.d.mts.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs +55 -46
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/index.mjs +52 -46
- 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 +52 -46
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.d.mts.map +1 -1
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs +55 -46
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +52 -46
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.d.mts.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.mjs +55 -46
- package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/_id_/update.d.mts.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/_id_/update.mjs +56 -47
- package/dist/astro/routes/api/admin/plugins/registry/_id_/update.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/artifact.mjs +52 -46
- package/dist/astro/routes/api/admin/plugins/registry/artifact.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/install.d.mts.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/install.mjs +56 -47
- package/dist/astro/routes/api/admin/plugins/registry/install.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/updates.mjs +52 -46
- package/dist/astro/routes/api/admin/plugins/updates.mjs.map +1 -1
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +52 -46
- 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 +52 -46
- 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 +10 -9
- package/dist/astro/routes/api/admin/users/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs +6 -6
- package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs.map +1 -1
- package/dist/astro/routes/api/admin/users/index.mjs +9 -8
- package/dist/astro/routes/api/admin/users/index.mjs.map +1 -1
- package/dist/astro/routes/api/auth/dev-bypass.mjs +8 -8
- package/dist/astro/routes/api/auth/invite/accept.mjs +3 -3
- package/dist/astro/routes/api/auth/invite/complete.mjs +14 -13
- package/dist/astro/routes/api/auth/invite/complete.mjs.map +1 -1
- package/dist/astro/routes/api/auth/invite/index.mjs +12 -11
- package/dist/astro/routes/api/auth/invite/index.mjs.map +1 -1
- package/dist/astro/routes/api/auth/invite/register-options.mjs +13 -12
- package/dist/astro/routes/api/auth/invite/register-options.mjs.map +1 -1
- package/dist/astro/routes/api/auth/logout.mjs +4 -4
- package/dist/astro/routes/api/auth/magic-link/send.mjs +14 -13
- package/dist/astro/routes/api/auth/magic-link/send.mjs.map +1 -1
- package/dist/astro/routes/api/auth/magic-link/verify.mjs +4 -4
- package/dist/astro/routes/api/auth/me.mjs +10 -9
- package/dist/astro/routes/api/auth/me.mjs.map +1 -1
- package/dist/astro/routes/api/auth/mode.mjs +4 -4
- 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 +9 -8
- package/dist/astro/routes/api/auth/passkey/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/auth/passkey/index.mjs +3 -3
- package/dist/astro/routes/api/auth/passkey/options.mjs +15 -14
- package/dist/astro/routes/api/auth/passkey/options.mjs.map +1 -1
- package/dist/astro/routes/api/auth/passkey/register/options.mjs +13 -12
- package/dist/astro/routes/api/auth/passkey/register/options.mjs.map +1 -1
- package/dist/astro/routes/api/auth/passkey/register/verify.mjs +14 -13
- package/dist/astro/routes/api/auth/passkey/register/verify.mjs.map +1 -1
- package/dist/astro/routes/api/auth/passkey/verify.mjs +14 -13
- package/dist/astro/routes/api/auth/passkey/verify.mjs.map +1 -1
- package/dist/astro/routes/api/auth/signup/complete.mjs +14 -13
- package/dist/astro/routes/api/auth/signup/complete.mjs.map +1 -1
- package/dist/astro/routes/api/auth/signup/request.mjs +14 -13
- package/dist/astro/routes/api/auth/signup/request.mjs.map +1 -1
- package/dist/astro/routes/api/auth/signup/verify.mjs +3 -3
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs +20 -19
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs.map +1 -1
- package/dist/astro/routes/api/comments/_collection_/_contentId_/reactions.mjs +17 -16
- package/dist/astro/routes/api/comments/_collection_/_contentId_/reactions.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/compare.mjs +4 -4
- package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs +5 -5
- package/dist/astro/routes/api/content/_collection_/_id_/duplicate.mjs +5 -5
- package/dist/astro/routes/api/content/_collection_/_id_/permanent.mjs +4 -4
- package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs +15 -15
- package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs +11 -10
- package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/children.mjs +21 -20
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/children.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/parents.mjs +21 -20
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/parents.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/restore.mjs +5 -5
- package/dist/astro/routes/api/content/_collection_/_id_/revisions.mjs +4 -4
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs +11 -10
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.d.mts.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs +47 -34
- 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 +5 -5
- package/dist/astro/routes/api/content/_collection_/_id_.mjs +11 -10
- package/dist/astro/routes/api/content/_collection_/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/authors.mjs +4 -4
- package/dist/astro/routes/api/content/_collection_/index.mjs +11 -10
- package/dist/astro/routes/api/content/_collection_/index.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/trash.mjs +10 -9
- package/dist/astro/routes/api/content/_collection_/trash.mjs.map +1 -1
- package/dist/astro/routes/api/dashboard.mjs +12 -10
- 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 +22 -20
- package/dist/astro/routes/api/import/probe.mjs.map +1 -1
- package/dist/astro/routes/api/import/wordpress/analyze.mjs +5 -5
- package/dist/astro/routes/api/import/wordpress/execute.d.mts +11 -11
- package/dist/astro/routes/api/import/wordpress/execute.mjs +18 -18
- package/dist/astro/routes/api/import/wordpress/execute.mjs.map +1 -1
- package/dist/astro/routes/api/import/wordpress/media.d.mts +10 -10
- package/dist/astro/routes/api/import/wordpress/media.mjs +14 -12
- package/dist/astro/routes/api/import/wordpress/media.mjs.map +1 -1
- package/dist/astro/routes/api/import/wordpress/prepare.mjs +13 -12
- package/dist/astro/routes/api/import/wordpress/prepare.mjs.map +1 -1
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.d.mts +11 -11
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs +15 -15
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.d.mts +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs +22 -20
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs.map +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/callback.mjs +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/execute.d.mts +11 -11
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs +32 -31
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs.map +1 -1
- package/dist/astro/routes/api/manifest.mjs +6 -6
- package/dist/astro/routes/api/mcp.d.mts.map +1 -1
- package/dist/astro/routes/api/mcp.mjs +174 -72
- package/dist/astro/routes/api/mcp.mjs.map +1 -1
- package/dist/astro/routes/api/media/_id_/confirm.mjs +14 -12
- package/dist/astro/routes/api/media/_id_/confirm.mjs.map +1 -1
- package/dist/astro/routes/api/media/_id_/upload.mjs +7 -7
- package/dist/astro/routes/api/media/_id_/usage.mjs +17 -16
- package/dist/astro/routes/api/media/_id_/usage.mjs.map +1 -1
- package/dist/astro/routes/api/media/_id_.mjs +16 -15
- package/dist/astro/routes/api/media/_id_.mjs.map +1 -1
- 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 +11 -10
- package/dist/astro/routes/api/media/upload-url.mjs.map +1 -1
- package/dist/astro/routes/api/media.mjs +19 -16
- package/dist/astro/routes/api/media.mjs.map +1 -1
- package/dist/astro/routes/api/menus/_name_/items/_id_.mjs +13 -13
- package/dist/astro/routes/api/menus/_name_/items.mjs +13 -13
- package/dist/astro/routes/api/menus/_name_/reorder.mjs +13 -13
- package/dist/astro/routes/api/menus/_name_/translations.mjs +13 -13
- package/dist/astro/routes/api/menus/_name_.mjs +13 -13
- package/dist/astro/routes/api/menus/index.mjs +13 -13
- 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 +183 -6
- package/dist/astro/routes/api/openapi.json.mjs.map +1 -1
- package/dist/astro/routes/api/plugins/_pluginId_/_...path_.d.mts.map +1 -1
- package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs +8 -7
- package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs.map +1 -1
- package/dist/astro/routes/api/redirects/404s/index.mjs +14 -13
- package/dist/astro/routes/api/redirects/404s/index.mjs.map +1 -1
- package/dist/astro/routes/api/redirects/404s/summary.mjs +14 -13
- package/dist/astro/routes/api/redirects/404s/summary.mjs.map +1 -1
- package/dist/astro/routes/api/redirects/_id_.mjs +16 -14
- package/dist/astro/routes/api/redirects/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/redirects/index.mjs +16 -14
- package/dist/astro/routes/api/redirects/index.mjs.map +1 -1
- package/dist/astro/routes/api/relations/_id_/index.mjs +21 -20
- package/dist/astro/routes/api/relations/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/relations/_id_/translations.mjs +16 -15
- package/dist/astro/routes/api/relations/_id_/translations.mjs.map +1 -1
- package/dist/astro/routes/api/relations/index.mjs +21 -20
- package/dist/astro/routes/api/relations/index.mjs.map +1 -1
- package/dist/astro/routes/api/revisions/_revisionId_/index.mjs +4 -4
- package/dist/astro/routes/api/revisions/_revisionId_/restore.mjs +5 -5
- package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs +52 -46
- 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 +52 -46
- 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 +52 -46
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/index.d.mts.map +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +52 -46
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/index.mjs +52 -46
- 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 +71 -0
- package/dist/astro/routes/api/schema/collections/reorder.mjs.map +1 -0
- package/dist/astro/routes/api/schema/index.mjs +14 -11
- package/dist/astro/routes/api/schema/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs +52 -46
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs.map +1 -1
- package/dist/astro/routes/api/schema/orphans/index.mjs +52 -46
- 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 +19 -15
- package/dist/astro/routes/api/search/enable.mjs.map +1 -1
- package/dist/astro/routes/api/search/index.mjs +13 -13
- package/dist/astro/routes/api/search/rebuild.mjs +15 -15
- package/dist/astro/routes/api/search/rebuild.mjs.map +1 -1
- package/dist/astro/routes/api/search/stats.mjs +9 -9
- package/dist/astro/routes/api/search/suggest.mjs +13 -13
- package/dist/astro/routes/api/sections/_slug_.mjs +13 -12
- package/dist/astro/routes/api/sections/_slug_.mjs.map +1 -1
- package/dist/astro/routes/api/sections/index.mjs +13 -12
- package/dist/astro/routes/api/sections/index.mjs.map +1 -1
- package/dist/astro/routes/api/settings/backups/archives/_name_.mjs +8 -8
- package/dist/astro/routes/api/settings/backups/archives/index.mjs +7 -7
- package/dist/astro/routes/api/settings/backups/export.mjs +8 -8
- package/dist/astro/routes/api/settings/backups/index.mjs +9 -9
- package/dist/astro/routes/api/settings/email.mjs +6 -6
- package/dist/astro/routes/api/settings.mjs +18 -17
- package/dist/astro/routes/api/settings.mjs.map +1 -1
- package/dist/astro/routes/api/setup/admin-verify.mjs +15 -14
- package/dist/astro/routes/api/setup/admin-verify.mjs.map +1 -1
- package/dist/astro/routes/api/setup/admin.mjs +14 -13
- package/dist/astro/routes/api/setup/admin.mjs.map +1 -1
- package/dist/astro/routes/api/setup/dev-bypass.mjs +34 -32
- 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 +36 -34
- 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.mjs +10 -10
- 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 +44 -0
- package/dist/astro/routes/api/taxonomies/_name_/reorder.mjs.map +1 -0
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs +19 -18
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs +19 -18
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.d.mts.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs +21 -19
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/translations.d.mts +8 -0
- package/dist/astro/routes/api/taxonomies/_name_/translations.d.mts.map +1 -0
- package/dist/astro/routes/api/taxonomies/_name_/translations.mjs +46 -0
- package/dist/astro/routes/api/taxonomies/_name_/translations.mjs.map +1 -0
- package/dist/astro/routes/api/taxonomies/_name_.d.mts +19 -0
- package/dist/astro/routes/api/taxonomies/_name_.d.mts.map +1 -0
- package/dist/astro/routes/api/taxonomies/_name_.mjs +88 -0
- package/dist/astro/routes/api/taxonomies/_name_.mjs.map +1 -0
- package/dist/astro/routes/api/taxonomies/index.mjs +19 -18
- 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 +10 -9
- package/dist/astro/routes/api/widget-areas/_name_/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs +13 -12
- package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs +13 -12
- package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs.map +1 -1
- package/dist/astro/routes/api/widget-areas/_name_.mjs +8 -7
- package/dist/astro/routes/api/widget-areas/_name_.mjs.map +1 -1
- package/dist/astro/routes/api/widget-areas/index.mjs +13 -12
- package/dist/astro/routes/api/widget-areas/index.mjs.map +1 -1
- package/dist/astro/routes/api/widget-components.mjs +4 -4
- package/dist/astro/routes/robots.txt.mjs +11 -10
- package/dist/astro/routes/robots.txt.mjs.map +1 -1
- package/dist/astro/routes/sitemap-_collection_.xml.mjs +14 -14
- package/dist/astro/routes/sitemap.xml.mjs +12 -11
- package/dist/astro/routes/sitemap.xml.mjs.map +1 -1
- package/dist/astro/types.d.mts +41 -17
- 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-1iFJzPaZ.mjs} +2 -2
- package/dist/{authorize-R5iYYrpa.mjs.map → authorize-1iFJzPaZ.mjs.map} +1 -1
- package/dist/{backup-LpQ1V_sR.mjs → backup-LHjIAVNP.mjs} +5 -5
- package/dist/{backup-LpQ1V_sR.mjs.map → backup-LHjIAVNP.mjs.map} +1 -1
- package/dist/{base64-B-PsqheR.mjs → base64-CvLhUKQv.mjs} +1 -1
- package/dist/{base64-B-PsqheR.mjs.map → base64-CvLhUKQv.mjs.map} +1 -1
- package/dist/bundle-CBEXrBnb.mjs +663 -0
- package/dist/bundle-CBEXrBnb.mjs.map +1 -0
- package/dist/{byline-fields-T9ZLZMxJ.mjs → byline-fields-C5S8wygO.mjs} +2 -2
- package/dist/{byline-fields-T9ZLZMxJ.mjs.map → byline-fields-C5S8wygO.mjs.map} +1 -1
- package/dist/{byline-C5TAqs8N.mjs → byline-pEcoDps8.mjs} +9 -9
- package/dist/{byline-C5TAqs8N.mjs.map → byline-pEcoDps8.mjs.map} +1 -1
- package/dist/{byline-registry-BCuOp4UF.mjs → byline-registry-DDun8sxh.mjs} +4 -4
- package/dist/{byline-registry-BCuOp4UF.mjs.map → byline-registry-DDun8sxh.mjs.map} +1 -1
- package/dist/{bylines-B8-WGdja.mjs → bylines-BWemdX2k.mjs} +8 -8
- package/dist/{bylines-B8-WGdja.mjs.map → bylines-BWemdX2k.mjs.map} +1 -1
- package/dist/{bylines-DGuqBLjV.mjs → bylines-DJfSfXCL.mjs} +5 -5
- package/dist/{bylines-DGuqBLjV.mjs.map → bylines-DJfSfXCL.mjs.map} +1 -1
- package/dist/cache-CBJaDy_E.mjs +108 -0
- package/dist/cache-CBJaDy_E.mjs.map +1 -0
- package/dist/{challenge-store-BFzgFRog.mjs → challenge-store-CZyFVaad.mjs} +1 -1
- package/dist/{challenge-store-BFzgFRog.mjs.map → challenge-store-CZyFVaad.mjs.map} +1 -1
- package/dist/{chunks-D5dlPeRb.mjs → chunks-DfPax1I0.mjs} +2 -2
- package/dist/{chunks-D5dlPeRb.mjs.map → chunks-DfPax1I0.mjs.map} +1 -1
- package/dist/cli/index.mjs +193 -707
- package/dist/cli/index.mjs.map +1 -1
- package/dist/client/cf-access.d.mts +1 -1
- package/dist/client/index.d.mts +74 -4
- package/dist/client/index.d.mts.map +1 -1
- package/dist/client/index.mjs +25 -2
- package/dist/client/index.mjs.map +1 -1
- package/dist/collection-deletion-C8BugSGz.mjs +779 -0
- package/dist/collection-deletion-C8BugSGz.mjs.map +1 -0
- package/dist/{comment-DnTxxVHv.mjs → comment-Dxlep6cE.mjs} +3 -3
- package/dist/{comment-DnTxxVHv.mjs.map → comment-Dxlep6cE.mjs.map} +1 -1
- package/dist/{comment-reaction-BUlUz2bh.mjs → comment-reaction-D6qfHKBc.mjs} +2 -2
- package/dist/{comment-reaction-BUlUz2bh.mjs.map → comment-reaction-D6qfHKBc.mjs.map} +1 -1
- package/dist/{comments-QPKgK3nk.mjs → comments-CTOuhTSX.mjs} +3 -3
- package/dist/{comments-QPKgK3nk.mjs.map → comments-CTOuhTSX.mjs.map} +1 -1
- package/dist/{components-DZkL4Fx0.mjs → components-CQy3lh9x.mjs} +1 -1
- package/dist/{components-DZkL4Fx0.mjs.map → components-CQy3lh9x.mjs.map} +1 -1
- package/dist/{config-DyF3OKg_.mjs → config-C3EBstHi.mjs} +18 -2
- package/dist/config-C3EBstHi.mjs.map +1 -0
- package/dist/{content-CpfKV9QE.mjs → content-BNfwh7xX.mjs} +667 -183
- package/dist/content-BNfwh7xX.mjs.map +1 -0
- package/dist/content-list-query-DhQ84eVV.d.mts +26 -0
- package/dist/content-list-query-DhQ84eVV.d.mts.map +1 -0
- package/dist/content-refresh-DNERP4-f.mjs +2560 -0
- package/dist/content-refresh-DNERP4-f.mjs.map +1 -0
- package/dist/{context-kO4YZB03.mjs → context-DRgOvSnW.mjs} +28 -20
- package/dist/context-DRgOvSnW.mjs.map +1 -0
- package/dist/{cron-BlKIMD_e.mjs → cron-Y9aLtgrA.mjs} +1 -1
- package/dist/{cron-BlKIMD_e.mjs.map → cron-Y9aLtgrA.mjs.map} +1 -1
- package/dist/{dashboard-DoBwPnON.mjs → dashboard-CB8J89rJ.mjs} +45 -11
- package/dist/dashboard-CB8J89rJ.mjs.map +1 -0
- package/dist/db/index.d.mts +4 -4
- package/dist/db/index.mjs +3 -3
- 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/{db-errors-CcWLaRiR.mjs → db-errors-Cl-sKYTm.mjs} +1 -1
- package/dist/{db-errors-CcWLaRiR.mjs.map → db-errors-Cl-sKYTm.mjs.map} +1 -1
- package/dist/{default-C4v9KP56.mjs → default-DdDl3fxv.mjs} +1 -1
- package/dist/{default-C4v9KP56.mjs.map → default-DdDl3fxv.mjs.map} +1 -1
- package/dist/deferred-tasks-BMsa9F64.d.mts +9 -0
- package/dist/deferred-tasks-BMsa9F64.d.mts.map +1 -0
- package/dist/{device-flow-DhUsyJU6.mjs → device-flow-CaioYGK3.mjs} +5 -5
- package/dist/{device-flow-DhUsyJU6.mjs.map → device-flow-CaioYGK3.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/dist-D_6CKR8z.mjs +810 -0
- package/dist/dist-D_6CKR8z.mjs.map +1 -0
- package/dist/{email-console-C-9Ng8DM.mjs → email-console-BHNjIwiB.mjs} +1 -1
- package/dist/{email-console-C-9Ng8DM.mjs.map → email-console-BHNjIwiB.mjs.map} +1 -1
- package/dist/{enrich-CFJJgxs_.mjs → enrich-_ySMEvEE.mjs} +2 -2
- package/dist/{enrich-CFJJgxs_.mjs.map → enrich-_ySMEvEE.mjs.map} +1 -1
- package/dist/{error-DmmN74gW.mjs → error-DupyJZE2.mjs} +3 -3
- package/dist/{error-DmmN74gW.mjs.map → error-DupyJZE2.mjs.map} +1 -1
- package/dist/{errors-DtEXIQQV.mjs → errors-CLUPm7aD.mjs} +15 -2
- package/dist/errors-CLUPm7aD.mjs.map +1 -0
- package/dist/{escape-CdW31WsG.mjs → escape-C_aLKP3H.mjs} +1 -1
- package/dist/{escape-CdW31WsG.mjs.map → escape-C_aLKP3H.mjs.map} +1 -1
- package/dist/{field-defs-cache-QMVnzTH6.mjs → field-defs-cache-hg6QkjV9.mjs} +5 -5
- package/dist/{field-defs-cache-QMVnzTH6.mjs.map → field-defs-cache-hg6QkjV9.mjs.map} +1 -1
- package/dist/{fts-manager-vncsZIJm.mjs → fts-manager-CZ-5dVwJ.mjs} +111 -61
- package/dist/fts-manager-CZ-5dVwJ.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-D3Uehfv2.d.mts} +2 -2
- package/dist/{hreflang-CZbSx6Bg.d.mts.map → hreflang-D3Uehfv2.d.mts.map} +1 -1
- package/dist/{hreflang-Bg-zMpkr.mjs → hreflang-DNswoYsi.mjs} +7 -7
- package/dist/{hreflang-Bg-zMpkr.mjs.map → hreflang-DNswoYsi.mjs.map} +1 -1
- package/dist/{import-PKhLeXvn.mjs → import-B41u8Rot.mjs} +7 -7
- package/dist/{import-PKhLeXvn.mjs.map → import-B41u8Rot.mjs.map} +1 -1
- package/dist/{index-j9rTh3cp.d.mts → index-C3Y-rsyN.d.mts} +286 -93
- package/dist/index-C3Y-rsyN.d.mts.map +1 -0
- package/dist/{index-BeNto_Vs.d.mts → index-Cof4-Fab.d.mts} +5 -10
- package/dist/index-Cof4-Fab.d.mts.map +1 -0
- package/dist/index.d.mts +20 -19
- package/dist/index.mjs +79 -71
- package/dist/{init-lock-DJkX6Hto.mjs → init-lock-6b309ZrF.mjs} +1 -1
- package/dist/{init-lock-DJkX6Hto.mjs.map → init-lock-6b309ZrF.mjs.map} +1 -1
- package/dist/{load-BwTdWE8B.mjs → load-DmvJrtxS.mjs} +2 -2
- package/dist/{load-BwTdWE8B.mjs.map → load-DmvJrtxS.mjs.map} +1 -1
- package/dist/{loader-C1XOLV5b.mjs → loader-DLBqRiGP.mjs} +120 -64
- package/dist/loader-DLBqRiGP.mjs.map +1 -0
- package/dist/{manifest-schema-bCq54i7F.mjs → manifest-schema-BXbUAHod.mjs} +1 -1
- package/dist/{manifest-schema-bCq54i7F.mjs.map → manifest-schema-BXbUAHod.mjs.map} +1 -1
- package/dist/media/image-endpoint.mjs +1 -1
- package/dist/media/index.d.mts +1 -1
- package/dist/media/index.mjs +3 -2
- package/dist/media/index.mjs.map +1 -1
- package/dist/media/local-runtime.d.mts +12 -12
- package/dist/media/local-runtime.mjs +10 -9
- package/dist/media/local-runtime.mjs.map +1 -1
- package/dist/{media-DWIzoVFL.mjs → media-BWWWb8kg.mjs} +92 -3
- package/dist/media-BWWWb8kg.mjs.map +1 -0
- package/dist/{media-tQDZEdu7.mjs → media-CzhAn2--.mjs} +2 -2
- package/dist/{media-tQDZEdu7.mjs.map → media-CzhAn2--.mjs.map} +1 -1
- package/dist/{media-allowlist-B7TPD6aq.mjs → media-allowlist-BD6HhgXA.mjs} +14 -3
- package/dist/media-allowlist-BD6HhgXA.mjs.map +1 -0
- package/dist/{media-upload-Bc9Nc5Zf.mjs → media-upload-9yas9zGH.mjs} +11 -9
- package/dist/{media-upload-Bc9Nc5Zf.mjs.map → media-upload-9yas9zGH.mjs.map} +1 -1
- package/dist/{media-url-BCm5vBn6.mjs → media-url-BvoX88FA.mjs} +1 -1
- package/dist/{media-url-BCm5vBn6.mjs.map → media-url-BvoX88FA.mjs.map} +1 -1
- package/dist/{media-usage-DPJcNaAq.mjs → media-usage-De3qvwjc.mjs} +138 -61
- package/dist/media-usage-De3qvwjc.mjs.map +1 -0
- package/dist/media-usage-work-B9Bksh_b.mjs +152 -0
- package/dist/media-usage-work-B9Bksh_b.mjs.map +1 -0
- package/dist/media-usage-work-DrCbqBcl.mjs +424 -0
- package/dist/media-usage-work-DrCbqBcl.mjs.map +1 -0
- package/dist/media-usage-write-fence-aHEgN1zB.mjs +42 -0
- package/dist/media-usage-write-fence-aHEgN1zB.mjs.map +1 -0
- package/dist/{menus-C6qhqP4X.mjs → menus-CC-yn1F9.mjs} +554 -121
- package/dist/menus-CC-yn1F9.mjs.map +1 -0
- package/dist/{menus-BxPLFfIc.mjs → menus-fxvEDYE6.mjs} +5 -5
- package/dist/{menus-BxPLFfIc.mjs.map → menus-fxvEDYE6.mjs.map} +1 -1
- package/dist/{mode-fiXRMfeA.mjs → mode-Bpe-tNNy.mjs} +1 -1
- package/dist/{mode-fiXRMfeA.mjs.map → mode-Bpe-tNNy.mjs.map} +1 -1
- package/dist/{normalize-C-SHXmra.mjs → normalize-Bc-s_r-a.mjs} +1 -1
- package/dist/{normalize-C-SHXmra.mjs.map → normalize-Bc-s_r-a.mjs.map} +1 -1
- package/dist/{oauth-authorization-C9tFinly.mjs → oauth-authorization-BXO1MKej.mjs} +5 -5
- package/dist/{oauth-authorization-C9tFinly.mjs.map → oauth-authorization-BXO1MKej.mjs.map} +1 -1
- package/dist/{oauth-clients-BwTxE1aE.mjs → oauth-clients-C_DNqtRu.mjs} +1 -1
- package/dist/{oauth-clients-BwTxE1aE.mjs.map → oauth-clients-C_DNqtRu.mjs.map} +1 -1
- package/dist/{oauth-state-store-DaRUwPWO.mjs → oauth-state-store-DwAxMtk4.mjs} +1 -1
- package/dist/{oauth-state-store-DaRUwPWO.mjs.map → oauth-state-store-DwAxMtk4.mjs.map} +1 -1
- package/dist/{oauth-user-lookup-CzuzOSlF.mjs → oauth-user-lookup-BxfZizdk.mjs} +1 -1
- package/dist/{oauth-user-lookup-CzuzOSlF.mjs.map → oauth-user-lookup-BxfZizdk.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-BlmBHTvX.mjs → options-CBXIHUoT.mjs} +1 -1
- package/dist/{options-BlmBHTvX.mjs.map → options-CBXIHUoT.mjs.map} +1 -1
- package/dist/{options-aeIs8WFu.d.mts → options-DRe1pIBL.d.mts} +4 -3
- package/dist/options-DRe1pIBL.d.mts.map +1 -0
- package/dist/page/index.d.mts +2 -2
- package/dist/{parse-BL49yb9D.mjs → parse-DFbuc-Fh.mjs} +2 -2
- package/dist/{parse-BL49yb9D.mjs.map → parse-DFbuc-Fh.mjs.map} +1 -1
- package/dist/{passkey-config-KMhgFjdQ.mjs → passkey-config-_2GOwwK8.mjs} +1 -1
- package/dist/{passkey-config-KMhgFjdQ.mjs.map → passkey-config-_2GOwwK8.mjs.map} +1 -1
- package/dist/{placeholder-Dxo5Zt58.d.mts → placeholder-CzW7Lshs.d.mts} +1 -1
- package/dist/{placeholder-Dxo5Zt58.d.mts.map → placeholder-CzW7Lshs.d.mts.map} +1 -1
- package/dist/plugin-types.d.mts +8 -1
- package/dist/plugin-types.d.mts.map +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 +7 -4
- package/dist/plugins/adapt-sandbox-entry.mjs.map +1 -1
- package/dist/{portable-text-CNahFfj6.mjs → portable-text-DhKbDAGr.mjs} +1 -1
- package/dist/{portable-text-CNahFfj6.mjs.map → portable-text-DhKbDAGr.mjs.map} +1 -1
- package/dist/{preview-D4Jnbfx7.mjs → preview-PW-nOnq4.mjs} +2 -2
- package/dist/{preview-D4Jnbfx7.mjs.map → preview-PW-nOnq4.mjs.map} +1 -1
- package/dist/{public-url-DSGTnJFw.mjs → public-url-CWoFhQT8.mjs} +14 -3
- package/dist/public-url-CWoFhQT8.mjs.map +1 -0
- package/dist/{query-DCiXI7OZ.mjs → query-BgjfiLUQ.mjs} +38 -77
- package/dist/query-BgjfiLUQ.mjs.map +1 -0
- package/dist/{query-1xOcEy18.mjs → query-vgZNwIhh.mjs} +4 -4
- package/dist/{query-1xOcEy18.mjs.map → query-vgZNwIhh.mjs.map} +1 -1
- package/dist/{rate-limit-Vkp9gQ1Y.mjs → rate-limit-L5anykgo.mjs} +2 -2
- package/dist/{rate-limit-Vkp9gQ1Y.mjs.map → rate-limit-L5anykgo.mjs.map} +1 -1
- package/dist/{redirect-BJ6d1yHh.mjs → redirect-COsS6SWJ.mjs} +3 -3
- package/dist/{redirect-BJ6d1yHh.mjs.map → redirect-COsS6SWJ.mjs.map} +1 -1
- package/dist/{redirect-CDgfv9vh.mjs → redirect-KBNE3UEs.mjs} +1 -1
- package/dist/{redirect-CDgfv9vh.mjs.map → redirect-KBNE3UEs.mjs.map} +1 -1
- package/dist/{redirects-Cwkq2H-G.mjs → redirects-CufRQt0Q.mjs} +5 -5
- package/dist/{redirects-Cwkq2H-G.mjs.map → redirects-CufRQt0Q.mjs.map} +1 -1
- package/dist/{redirects-BOn2DIUs.mjs → redirects-cV9g7V-0.mjs} +149 -16
- package/dist/redirects-cV9g7V-0.mjs.map +1 -0
- package/dist/registry-C581V4TP.mjs +1275 -0
- package/dist/registry-C581V4TP.mjs.map +1 -0
- package/dist/{relation-DJ5DZh7B.mjs → relation-DtmAQH7s.mjs} +3 -3
- package/dist/{relation-DJ5DZh7B.mjs.map → relation-DtmAQH7s.mjs.map} +1 -1
- package/dist/{relations-C4duJnwI.mjs → relations-BBApI4e2.mjs} +3 -3
- package/dist/{relations-C4duJnwI.mjs.map → relations-BBApI4e2.mjs.map} +1 -1
- package/dist/{relations-DpTjftCl.mjs → relations-DICSyfsh.mjs} +6 -6
- package/dist/{relations-DpTjftCl.mjs.map → relations-DICSyfsh.mjs.map} +1 -1
- package/dist/{relations-DHFQGX0h.d.mts → relations-DItI3MN9.d.mts} +401 -40
- package/dist/relations-DItI3MN9.d.mts.map +1 -0
- 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-DgZJh3zG.mjs} +2 -2
- package/dist/{request-meta-DzXYYI-n.mjs.map → request-meta-DgZJh3zG.mjs.map} +1 -1
- package/dist/{resolve-BUvFE0Lr.mjs → resolve-DOhVEvty.mjs} +2 -2
- package/dist/{resolve-BUvFE0Lr.mjs.map → resolve-DOhVEvty.mjs.map} +1 -1
- package/dist/{runner-BsI18UgP.mjs → runner-BiDvq5dv.mjs} +1404 -235
- package/dist/runner-BiDvq5dv.mjs.map +1 -0
- package/dist/{runner-CHdkERbt.d.mts → runner-CgQbELYC.d.mts} +2 -2
- package/dist/{runner-CHdkERbt.d.mts.map → runner-CgQbELYC.d.mts.map} +1 -1
- package/dist/runtime.d.mts +11 -11
- package/dist/runtime.mjs +5 -4
- package/dist/runtime.mjs.map +1 -1
- package/dist/{schema-eqZhkR0S.mjs → schema-BFyTg38T.mjs} +3 -3
- package/dist/{schema-eqZhkR0S.mjs.map → schema-BFyTg38T.mjs.map} +1 -1
- package/dist/schema-CeQSNwB3.mjs +390 -0
- package/dist/schema-CeQSNwB3.mjs.map +1 -0
- package/dist/{scopes-Be2d8bSb.mjs → scopes-BVeuhGBE.mjs} +3 -3
- package/dist/{scopes-Be2d8bSb.mjs.map → scopes-BVeuhGBE.mjs.map} +1 -1
- package/dist/{search-CeO678cp.mjs → search-BpuPKZb0.mjs} +26 -16
- package/dist/search-BpuPKZb0.mjs.map +1 -0
- package/dist/{secrets-870d-7yA.mjs → secrets-dtYs2hDo.mjs} +5 -5
- package/dist/{secrets-870d-7yA.mjs.map → secrets-dtYs2hDo.mjs.map} +1 -1
- package/dist/{sections-DSuEfirn.mjs → sections-COctk6hf.mjs} +3 -3
- package/dist/{sections-DSuEfirn.mjs.map → sections-COctk6hf.mjs.map} +1 -1
- package/dist/seed/index.d.mts +2 -2
- package/dist/seed/index.mjs +28 -26
- package/dist/seo/index.d.mts +3 -3
- package/dist/seo/index.mjs +20 -19
- package/dist/seo/index.mjs.map +1 -1
- package/dist/{seo-C3GDfT0V.mjs → seo-AFpVvTqr.mjs} +6 -4
- package/dist/seo-AFpVvTqr.mjs.map +1 -0
- package/dist/{seo-BAPKiED8.mjs → seo-CvDxfvFb.mjs} +3 -3
- package/dist/{seo-BAPKiED8.mjs.map → seo-CvDxfvFb.mjs.map} +1 -1
- package/dist/{service-DyFT-k-R.mjs → service-xMiMSTsR.mjs} +4 -4
- package/dist/{service-DyFT-k-R.mjs.map → service-xMiMSTsR.mjs.map} +1 -1
- package/dist/{session-user-BrK2zz7S.mjs → session-user-BzVemLkw.mjs} +2 -2
- package/dist/{session-user-BrK2zz7S.mjs.map → session-user-BzVemLkw.mjs.map} +1 -1
- package/dist/{settings-DgKouY2S.mjs → settings-B372MV0p.mjs} +7 -7
- package/dist/{settings-DgKouY2S.mjs.map → settings-B372MV0p.mjs.map} +1 -1
- package/dist/{settings-CREKyj8I.mjs → settings-BE9aqn_9.mjs} +3 -3
- package/dist/{settings-CREKyj8I.mjs.map → settings-BE9aqn_9.mjs.map} +1 -1
- package/dist/{setup-complete-L7bMK2VI.mjs → setup-complete-DF7TAfD5.mjs} +2 -2
- package/dist/{setup-complete-L7bMK2VI.mjs.map → setup-complete-DF7TAfD5.mjs.map} +1 -1
- package/dist/{setup-nonce-Ct5tjWcq.mjs → setup-nonce-Do-U_cg9.mjs} +1 -1
- package/dist/{setup-nonce-Ct5tjWcq.mjs.map → setup-nonce-Do-U_cg9.mjs.map} +1 -1
- package/dist/{single-flight-cache-C2exrGAi.mjs → single-flight-cache-B0eLKS6K.mjs} +2 -2
- package/dist/{single-flight-cache-C2exrGAi.mjs.map → single-flight-cache-B0eLKS6K.mjs.map} +1 -1
- package/dist/site-url-Bowsi9T-.mjs +16 -0
- package/dist/site-url-Bowsi9T-.mjs.map +1 -0
- package/dist/slugify-B994zkXC.mjs +17 -0
- package/dist/slugify-B994zkXC.mjs.map +1 -0
- package/dist/{snapshot-BdpUJKD-.mjs → snapshot-B5h6aPMh.mjs} +2 -2
- package/dist/{snapshot-BdpUJKD-.mjs.map → snapshot-B5h6aPMh.mjs.map} +1 -1
- package/dist/{ssrf-CviKqWmq.mjs → ssrf-Cpvg_n3A.mjs} +1 -1
- package/dist/{ssrf-CviKqWmq.mjs.map → ssrf-Cpvg_n3A.mjs.map} +1 -1
- package/dist/{state-xxv6ZTMv.mjs → state-DYwPue40.mjs} +1 -1
- package/dist/{state-xxv6ZTMv.mjs.map → state-DYwPue40.mjs.map} +1 -1
- package/dist/{status-COfycGIU.mjs → status-CWVYpbD8.mjs} +1 -1
- package/dist/{status-COfycGIU.mjs.map → status-CWVYpbD8.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-B61CRSha.mjs → taxonomies-B0o9ExNV.mjs} +85 -75
- package/dist/taxonomies-B0o9ExNV.mjs.map +1 -0
- package/dist/{taxonomies-Dbdki3Un.mjs → taxonomies-Dk3MAklL.mjs} +360 -56
- package/dist/taxonomies-Dk3MAklL.mjs.map +1 -0
- package/dist/taxonomy-CPeM8d2o.mjs +484 -0
- package/dist/taxonomy-CPeM8d2o.mjs.map +1 -0
- package/dist/{tokens-DVltpO2D.mjs → tokens-C39klX8R.mjs} +2 -2
- package/dist/{tokens-DVltpO2D.mjs.map → tokens-C39klX8R.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-BWQo0Foy.mjs → transport--CfOflrp.mjs} +1 -1
- package/dist/{transport-BWQo0Foy.mjs.map → transport--CfOflrp.mjs.map} +1 -1
- package/dist/{transport-DokJOScS.d.mts → transport-B_rfeU-a.d.mts} +1 -1
- package/dist/{transport-DokJOScS.d.mts.map → transport-B_rfeU-a.d.mts.map} +1 -1
- package/dist/{trusted-proxy-CwjQj0YG.mjs → trusted-proxy-CEVekpby.mjs} +1 -1
- package/dist/{trusted-proxy-CwjQj0YG.mjs.map → trusted-proxy-CEVekpby.mjs.map} +1 -1
- package/dist/{types-o7xo7VgH.mjs → types-75KIqzL9.mjs} +20 -3
- package/dist/types-75KIqzL9.mjs.map +1 -0
- package/dist/{types-C9P3ysxq.d.mts → types-BPuloofb.d.mts} +1 -1
- package/dist/{types-C9P3ysxq.d.mts.map → types-BPuloofb.d.mts.map} +1 -1
- package/dist/{types-BD40g7zz.mjs → types-BW1syrlw.mjs} +1 -1
- package/dist/{types-BD40g7zz.mjs.map → types-BW1syrlw.mjs.map} +1 -1
- package/dist/{types-jISEalTX.d.mts → types-C3_AbkDP.d.mts} +53 -10
- package/dist/types-C3_AbkDP.d.mts.map +1 -0
- package/dist/{types-84Bque3-.d.mts → types-CAGdePf3.d.mts} +133 -1
- package/dist/types-CAGdePf3.d.mts.map +1 -0
- package/dist/{types-CcSZCcF1.d.mts → types-CFUfyt1s.d.mts} +1 -1
- package/dist/{types-CcSZCcF1.d.mts.map → types-CFUfyt1s.d.mts.map} +1 -1
- package/dist/{types-DQLZ58GV.d.mts → types-CPx2lIGo.d.mts} +1 -1
- package/dist/{types-DQLZ58GV.d.mts.map → types-CPx2lIGo.d.mts.map} +1 -1
- package/dist/{types-XrQQ-Aex.mjs → types-CQPWhPxE.mjs} +15 -11
- package/dist/types-CQPWhPxE.mjs.map +1 -0
- package/dist/{types-BQY7VYw6.d.mts → types-Cs-TFLNf.d.mts} +28 -8
- package/dist/types-Cs-TFLNf.d.mts.map +1 -0
- package/dist/types-CtzytVXn.mjs +18 -0
- package/dist/types-CtzytVXn.mjs.map +1 -0
- package/dist/{types-DqZVPILm.d.mts → types-D4_1Ga4L.d.mts} +44 -5
- package/dist/types-D4_1Ga4L.d.mts.map +1 -0
- package/dist/{types-Dr2GLlwu.d.mts → types-DefV3OiO.d.mts} +1 -1
- package/dist/{types-Dr2GLlwu.d.mts.map → types-DefV3OiO.d.mts.map} +1 -1
- package/dist/{types-DsAMyD_o.d.mts → types-X0MThr7x.d.mts} +1 -1
- package/dist/{types-DsAMyD_o.d.mts.map → types-X0MThr7x.d.mts.map} +1 -1
- package/dist/{upload-attempts-C5yd6Gae.mjs → upload-attempts-hlne3iA1.mjs} +1 -1
- package/dist/{upload-attempts-C5yd6Gae.mjs.map → upload-attempts-hlne3iA1.mjs.map} +1 -1
- package/dist/url-pattern-BHS0V5Ng.mjs +33 -0
- package/dist/url-pattern-BHS0V5Ng.mjs.map +1 -0
- package/dist/{user-BAumEmpA.mjs → user-sHgJ62SP.mjs} +3 -3
- package/dist/{user-BAumEmpA.mjs.map → user-sHgJ62SP.mjs.map} +1 -1
- package/dist/{utils-BbUgmeZG.mjs → utils-D4vD_Y98.mjs} +3 -3
- package/dist/{utils-BbUgmeZG.mjs.map → utils-D4vD_Y98.mjs.map} +1 -1
- package/dist/{validate-Bs_wT2ul.mjs → validate-BkqIG_Uj.mjs} +24 -5
- package/dist/validate-BkqIG_Uj.mjs.map +1 -0
- 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-DeGtBN84.d.mts} +25 -7
- package/dist/validate-DeGtBN84.d.mts.map +1 -0
- package/dist/{validation-BngR0nit.mjs → validation-CiJb_X5o.mjs} +14 -13
- package/dist/{validation-BngR0nit.mjs.map → validation-CiJb_X5o.mjs.map} +1 -1
- package/dist/version-x0NjTScG.mjs +7 -0
- package/dist/{version-Bdfb34kk.mjs.map → version-x0NjTScG.mjs.map} +1 -1
- package/dist/{widgets-L-VndTKD.mjs → widgets-Cwzvww0W.mjs} +3 -3
- package/dist/{widgets-L-VndTKD.mjs.map → widgets-Cwzvww0W.mjs.map} +1 -1
- package/dist/{wxr-taxonomies-DueaLFd9.d.mts → wxr-taxonomies-CmC0ZsDr.d.mts} +1 -1
- package/dist/{wxr-taxonomies-DueaLFd9.d.mts.map → wxr-taxonomies-CmC0ZsDr.d.mts.map} +1 -1
- package/dist/{wxr-taxonomies-BexjtNid.mjs → wxr-taxonomies-QZjWxjyk.mjs} +13 -32
- package/dist/{wxr-taxonomies-BexjtNid.mjs.map → wxr-taxonomies-QZjWxjyk.mjs.map} +1 -1
- package/dist/{zod-generator-DMzfga3g.mjs → zod-generator-D11MhxG4.mjs} +53 -6
- package/dist/zod-generator-D11MhxG4.mjs.map +1 -0
- package/package.json +18 -7
- package/src/after.ts +6 -1
- package/src/api/errors.ts +13 -0
- package/src/api/handlers/content.ts +172 -33
- package/src/api/handlers/dashboard.ts +12 -2
- package/src/api/handlers/index.ts +16 -0
- package/src/api/handlers/manifest.ts +2 -0
- package/src/api/handlers/marketplace.ts +14 -0
- package/src/api/handlers/media-allowlist.ts +13 -2
- package/src/api/handlers/media-usage-work.ts +188 -0
- package/src/api/handlers/media-usage.ts +5 -3
- package/src/api/handlers/registry.ts +14 -0
- package/src/api/handlers/revision.ts +19 -5
- package/src/api/handlers/schema.ts +46 -3
- package/src/api/handlers/seo.ts +5 -2
- package/src/api/handlers/snapshot.ts +1 -1
- package/src/api/handlers/taxonomies.ts +446 -83
- package/src/api/media-usage-write-fence.ts +64 -0
- package/src/api/openapi/document.ts +247 -0
- package/src/api/public-url.ts +14 -2
- package/src/api/schemas/common.ts +3 -1
- package/src/api/schemas/content.ts +122 -1
- package/src/api/schemas/media-usage.ts +133 -0
- package/src/api/schemas/schema.ts +91 -3
- package/src/api/schemas/search.ts +2 -0
- package/src/api/schemas/taxonomies.ts +58 -8
- package/src/api/site-url.ts +16 -6
- package/src/api/types.ts +1 -0
- package/src/astro/integration/index.ts +55 -42
- package/src/astro/integration/routes.ts +48 -4
- package/src/astro/integration/runtime.ts +28 -0
- package/src/astro/integration/virtual-modules.ts +27 -1
- package/src/astro/integration/vite-config.ts +16 -1
- package/src/astro/middleware/media-usage-write-fence.ts +30 -0
- package/src/astro/middleware/redirect.ts +14 -12
- package/src/astro/middleware/scoped-db.ts +35 -4
- package/src/astro/middleware.ts +131 -30
- package/src/astro/routes/api/admin/comments/[id]/status.ts +1 -1
- package/src/astro/routes/api/admin/media-usage/collection-deletions/index.ts +22 -0
- package/src/astro/routes/api/admin/media-usage/collection-deletions/retry.ts +22 -0
- package/src/astro/routes/api/admin/media-usage/work/index.ts +26 -0
- package/src/astro/routes/api/admin/media-usage/work/retry.ts +26 -0
- package/src/astro/routes/api/admin/plugins/[id]/disable.ts +4 -0
- package/src/astro/routes/api/admin/plugins/[id]/enable.ts +4 -0
- package/src/astro/routes/api/admin/plugins/[id]/uninstall.ts +4 -0
- package/src/astro/routes/api/admin/plugins/[id]/update.ts +4 -0
- package/src/astro/routes/api/admin/plugins/marketplace/[id]/install.ts +4 -0
- package/src/astro/routes/api/admin/plugins/registry/[id]/uninstall.ts +4 -0
- package/src/astro/routes/api/admin/plugins/registry/[id]/update.ts +4 -0
- package/src/astro/routes/api/admin/plugins/registry/install.ts +4 -0
- 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/content/[collection]/[id]/terms/[taxonomy].ts +67 -31
- package/src/astro/routes/api/import/wordpress/execute.ts +3 -10
- package/src/astro/routes/api/mcp.ts +1 -0
- package/src/astro/routes/api/plugins/[pluginId]/[...path].ts +7 -1
- package/src/astro/routes/api/schema/collections/[slug]/index.ts +1 -7
- 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/routes/api/taxonomies/[name]/terms/index.ts +1 -0
- package/src/astro/routes/api/taxonomies/[name]/translations.ts +48 -0
- package/src/astro/routes/api/taxonomies/[name].ts +102 -0
- package/src/astro/types.ts +31 -4
- package/src/cleanup.ts +25 -26
- package/src/cli/commands/dev.ts +13 -3
- package/src/cli/commands/doctor.ts +193 -6
- package/src/cli/commands/export-seed.ts +6 -1
- package/src/cli/index.ts +1 -1
- package/src/client/index.ts +119 -0
- package/src/components/Block.astro +12 -0
- package/src/components/CommentForm.astro +1 -1
- package/src/components/Comments.astro +1 -1
- package/src/components/InlinePortableTextEditor.tsx +260 -32
- 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/mark-safety.ts +120 -0
- package/src/content/converters/numbered-list.ts +148 -0
- package/src/content/converters/portable-text-to-prosemirror.ts +84 -25
- package/src/content/converters/prosemirror-to-portable-text.ts +35 -14
- package/src/content/converters/types.ts +2 -0
- package/src/content/portable-text-lists.ts +205 -0
- package/src/content-list-query.ts +29 -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/060_collection_admin_config.ts +16 -0
- package/src/database/migrations/061_media_usage_cleanup.ts +77 -0
- package/src/database/migrations/062_media_usage_cleanup_fence.ts +295 -0
- package/src/database/migrations/063_media_usage_incremental_work.ts +397 -0
- package/src/database/migrations/064_fts_plain_text.ts +253 -0
- package/src/database/migrations/065_media_usage_collection_deletion.ts +85 -0
- package/src/database/migrations/066_media_usage_reconciliation.ts +115 -0
- package/src/database/migrations/067_indexed_content_fields.ts +39 -0
- package/src/database/migrations/068_content_taxonomy_entry_groups.ts +61 -0
- package/src/database/migrations/069_collection_title_date_fields.ts +45 -0
- package/src/database/migrations/070_collection_routable.ts +18 -0
- package/src/database/migrations/runner.ts +32 -0
- package/src/database/repositories/content.ts +1051 -273
- package/src/database/repositories/media-usage-work.ts +848 -0
- package/src/database/repositories/media-usage.ts +1502 -138
- package/src/database/repositories/revision.ts +98 -22
- package/src/database/repositories/taxonomy.ts +429 -103
- package/src/database/repositories/types.ts +58 -2
- package/src/database/types.ts +147 -17
- package/src/database/validate.ts +39 -0
- package/src/db/adapters.ts +36 -0
- package/src/db/index.ts +3 -0
- package/src/deferred-tasks.ts +71 -0
- package/src/emdash-runtime.ts +493 -110
- package/src/fields/file.ts +7 -4
- package/src/fields/image.ts +8 -1
- package/src/fields/types.ts +18 -5
- package/src/i18n/config.ts +32 -0
- package/src/i18n/repair-locale-casing.ts +0 -14
- package/src/i18n/taxonomy-locale-diagnostic.ts +47 -0
- package/src/import/wxr-taxonomies.ts +7 -47
- package/src/index.ts +27 -2
- package/src/loader.ts +165 -89
- package/src/mcp/server.ts +242 -34
- package/src/media/usage/activation.ts +626 -0
- package/src/media/usage/capture-triggers.ts +543 -0
- package/src/media/usage/cleanup.ts +305 -0
- package/src/media/usage/collection-deletion-processor.ts +356 -0
- package/src/media/usage/collection-deletion.ts +836 -0
- package/src/media/usage/content-fields.ts +40 -3
- package/src/media/usage/content-refresh.ts +356 -47
- package/src/media/usage/content-repair.ts +180 -61
- package/src/media/usage/content-snapshots.ts +85 -105
- package/src/media/usage/gc.ts +50 -0
- package/src/media/usage/projection-fingerprint.ts +129 -0
- package/src/media/usage/reconciliation-processor.ts +372 -0
- package/src/media/usage/reconciliation.ts +1117 -0
- package/src/media/usage/source-key.ts +4 -0
- package/src/media/usage/types.ts +2 -0
- package/src/media/usage/work-processor.ts +248 -0
- package/src/menus/index.ts +246 -141
- package/src/object-cache/index.ts +160 -3
- package/src/plugin-types.ts +8 -0
- package/src/plugins/adapt-sandbox-entry.ts +24 -5
- package/src/plugins/context.ts +24 -7
- package/src/plugins/index.ts +9 -0
- package/src/plugins/routes.ts +77 -1
- package/src/plugins/sandbox/index.ts +10 -1
- package/src/plugins/sandbox/types.ts +78 -1
- package/src/plugins/scheduler/node.ts +13 -1
- package/src/plugins/scheduler/types.ts +2 -0
- package/src/plugins/storage-indexes.ts +50 -11
- package/src/plugins/types.ts +39 -2
- package/src/query.ts +50 -79
- package/src/redirects/cache.ts +79 -19
- package/src/request-context.ts +3 -0
- package/src/scheduled-publish.ts +6 -1
- package/src/scheduler-health.ts +46 -0
- package/src/schema/registry.ts +863 -249
- package/src/schema/types.ts +74 -8
- package/src/schema/url-pattern.ts +33 -0
- package/src/schema/zod-generator.ts +77 -5
- package/src/search/fts-manager.ts +167 -86
- package/src/search/index.ts +2 -0
- package/src/search/query.ts +32 -11
- package/src/search/types.ts +8 -0
- package/src/seed/apply.ts +89 -16
- package/src/seed/types.ts +21 -3
- package/src/seed/validate.ts +52 -2
- package/src/taxonomies/index.ts +88 -82
- package/src/taxonomies/term-counts.ts +23 -12
- package/src/ui-comments.ts +19 -0
- package/src/ui.ts +11 -3
- package/src/utils/slugify.ts +1 -29
- package/src/virtual-modules.d.ts +24 -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/config-DyF3OKg_.mjs.map +0 -1
- package/dist/content-CpfKV9QE.mjs.map +0 -1
- package/dist/content-refresh-DgqUBeTv.mjs +0 -1629
- package/dist/content-refresh-DgqUBeTv.mjs.map +0 -1
- package/dist/context-kO4YZB03.mjs.map +0 -1
- package/dist/dashboard-DoBwPnON.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-BeNto_Vs.d.mts.map +0 -1
- package/dist/index-j9rTh3cp.d.mts.map +0 -1
- package/dist/loader-C1XOLV5b.mjs.map +0 -1
- package/dist/media-DWIzoVFL.mjs.map +0 -1
- package/dist/media-allowlist-B7TPD6aq.mjs.map +0 -1
- package/dist/media-usage-DPJcNaAq.mjs.map +0 -1
- package/dist/menus-C6qhqP4X.mjs.map +0 -1
- package/dist/object-cache-Bok5j2ae.mjs.map +0 -1
- package/dist/options-aeIs8WFu.d.mts.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 +0 -795
- 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/search-CeO678cp.mjs.map +0 -1
- package/dist/seo-C3GDfT0V.mjs.map +0 -1
- package/dist/site-url-8N3kSyVZ.mjs +0 -13
- package/dist/site-url-8N3kSyVZ.mjs.map +0 -1
- package/dist/slugify-C_tqlU4G.mjs +0 -30
- package/dist/slugify-C_tqlU4G.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 +0 -304
- package/dist/taxonomy-DvwWAPvA.mjs.map +0 -1
- package/dist/types-84Bque3-.d.mts.map +0 -1
- package/dist/types-BQY7VYw6.d.mts.map +0 -1
- package/dist/types-DqZVPILm.d.mts.map +0 -1
- package/dist/types-XrQQ-Aex.mjs.map +0 -1
- package/dist/types-jISEalTX.d.mts.map +0 -1
- package/dist/types-o7xo7VgH.mjs.map +0 -1
- package/dist/validate-Bs_wT2ul.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/zod-generator-DMzfga3g.mjs.map +0 -1
- /package/dist/{api-tokens-CEsW_jCg.mjs → api-tokens-CyTsLszZ.mjs} +0 -0
- /package/dist/{ssrf-BB__xfNM.mjs → ssrf-DpXgKsna.mjs} +0 -0
- /package/dist/{types-CK0LxPUQ.mjs → types-CP1CflWf.mjs} +0 -0
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
import { t as validateIdentifier } from "./validate-
|
|
2
|
-
import { n as cachedQuery, t as CacheNamespace } from "./object-cache-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { t as
|
|
6
|
-
import { t as
|
|
1
|
+
import { t as validateIdentifier } from "./validate-BpwoDOgt.mjs";
|
|
2
|
+
import { n as cachedQuery, t as CacheNamespace } from "./object-cache-71tPfV4A.mjs";
|
|
3
|
+
import { n as chunks, t as SQL_BATCH_SIZE } from "./chunks-DfPax1I0.mjs";
|
|
4
|
+
import { o as decodeCursor, s as encodeCursor } from "./types-CQPWhPxE.mjs";
|
|
5
|
+
import { t as CommentRepository } from "./comment-Dxlep6cE.mjs";
|
|
6
|
+
import { t as OptionsRepository } from "./options-CBXIHUoT.mjs";
|
|
7
|
+
import { t as PluginContextFactory } from "./context-DRgOvSnW.mjs";
|
|
7
8
|
import { r as requestCached } from "./request-cache-BSUptuJR.mjs";
|
|
8
|
-
import { i as resolveLocaleChain, r as resolveLocale } from "./resolve-
|
|
9
|
-
import {
|
|
10
|
-
import { a as normalizeCapabilities } from "./types-
|
|
11
|
-
import {
|
|
12
|
-
import { t as extractRequestMeta } from "./request-meta-
|
|
13
|
-
import { r as setCronTasksEnabled } from "./cron-
|
|
14
|
-
import { t as
|
|
9
|
+
import { i as resolveLocaleChain, r as resolveLocale } from "./resolve-DOhVEvty.mjs";
|
|
10
|
+
import { s as getDb } from "./loader-DLBqRiGP.mjs";
|
|
11
|
+
import { a as normalizeCapabilities } from "./types-CP1CflWf.mjs";
|
|
12
|
+
import { gt as sanitizeHref } from "./redirects-cV9g7V-0.mjs";
|
|
13
|
+
import { t as extractRequestMeta } from "./request-meta-DgZJh3zG.mjs";
|
|
14
|
+
import { r as setCronTasksEnabled } from "./cron-Y9aLtgrA.mjs";
|
|
15
|
+
import { t as MediaUsageActivationWriteBlockedError } from "./media-usage-write-fence-aHEgN1zB.mjs";
|
|
16
|
+
import { t as CommentReactionRepository } from "./comment-reaction-D6qfHKBc.mjs";
|
|
15
17
|
import { sql } from "kysely";
|
|
16
18
|
import { ulid } from "ulidx";
|
|
17
19
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
@@ -142,10 +144,17 @@ var AuditRepository = class {
|
|
|
142
144
|
//#region src/fields/image.ts
|
|
143
145
|
const imageSchema = z.object({
|
|
144
146
|
id: z.string(),
|
|
145
|
-
src: z.string(),
|
|
147
|
+
src: z.string().optional(),
|
|
146
148
|
alt: z.string().optional(),
|
|
147
149
|
width: z.number().optional(),
|
|
148
|
-
height: z.number().optional()
|
|
150
|
+
height: z.number().optional(),
|
|
151
|
+
filename: z.string().optional(),
|
|
152
|
+
mimeType: z.string().optional(),
|
|
153
|
+
blurhash: z.string().optional(),
|
|
154
|
+
dominantColor: z.string().optional(),
|
|
155
|
+
provider: z.string().optional(),
|
|
156
|
+
previewUrl: z.string().optional(),
|
|
157
|
+
meta: z.record(z.string(), z.unknown()).optional()
|
|
149
158
|
});
|
|
150
159
|
function image(options = {}) {
|
|
151
160
|
const validation = options.allowedTypes && options.allowedTypes.length > 0 ? { allowedMimeTypes: [...options.allowedTypes] } : void 0;
|
|
@@ -164,10 +173,13 @@ function image(options = {}) {
|
|
|
164
173
|
function file(options = {}) {
|
|
165
174
|
const fileObjSchema = z.object({
|
|
166
175
|
id: z.string(),
|
|
167
|
-
url: z.string(),
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
176
|
+
url: z.string().optional(),
|
|
177
|
+
src: z.string().optional(),
|
|
178
|
+
filename: z.string().optional(),
|
|
179
|
+
mimeType: z.string().optional(),
|
|
180
|
+
size: z.number().optional(),
|
|
181
|
+
provider: z.string().optional(),
|
|
182
|
+
meta: z.record(z.string(), z.unknown()).optional()
|
|
171
183
|
});
|
|
172
184
|
return {
|
|
173
185
|
type: "file",
|
|
@@ -239,10 +251,10 @@ function sanitizeGalleryImages(value, generateKey) {
|
|
|
239
251
|
if (!Array.isArray(value)) return [];
|
|
240
252
|
const images = [];
|
|
241
253
|
for (const entry of value) {
|
|
242
|
-
if (!isRecord(entry)) continue;
|
|
254
|
+
if (!isRecord$2(entry)) continue;
|
|
243
255
|
const record = entry;
|
|
244
256
|
const asset = record.asset;
|
|
245
|
-
if (!isRecord(asset)) continue;
|
|
257
|
+
if (!isRecord$2(asset)) continue;
|
|
246
258
|
const assetRecord = asset;
|
|
247
259
|
const image = {
|
|
248
260
|
_type: "image",
|
|
@@ -264,9 +276,200 @@ function sanitizeGalleryImages(value, generateKey) {
|
|
|
264
276
|
}
|
|
265
277
|
return images;
|
|
266
278
|
}
|
|
267
|
-
function isRecord(value) {
|
|
279
|
+
function isRecord$2(value) {
|
|
280
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
//#endregion
|
|
284
|
+
//#region src/content/converters/mark-safety.ts
|
|
285
|
+
const SUPPORTED_PORTABLE_TEXT_DECORATORS = new Set([
|
|
286
|
+
"strong",
|
|
287
|
+
"em",
|
|
288
|
+
"underline",
|
|
289
|
+
"strike-through",
|
|
290
|
+
"subscript",
|
|
291
|
+
"superscript",
|
|
292
|
+
"code"
|
|
293
|
+
]);
|
|
294
|
+
const SUPPORTED_PROSEMIRROR_MARKS = new Set([
|
|
295
|
+
"bold",
|
|
296
|
+
"strong",
|
|
297
|
+
"italic",
|
|
298
|
+
"em",
|
|
299
|
+
"underline",
|
|
300
|
+
"strike",
|
|
301
|
+
"strikethrough",
|
|
302
|
+
"subscript",
|
|
303
|
+
"superscript",
|
|
304
|
+
"code",
|
|
305
|
+
"link"
|
|
306
|
+
]);
|
|
307
|
+
function isRecord$1(value) {
|
|
268
308
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
269
309
|
}
|
|
310
|
+
function collectPortableTextMarks(value, inheritedMarkDefs, unsupported) {
|
|
311
|
+
if (Array.isArray(value)) {
|
|
312
|
+
for (const item of value) collectPortableTextMarks(item, inheritedMarkDefs, unsupported);
|
|
313
|
+
return;
|
|
314
|
+
}
|
|
315
|
+
if (!isRecord$1(value)) return;
|
|
316
|
+
let markDefs = inheritedMarkDefs;
|
|
317
|
+
if (Array.isArray(value.markDefs)) {
|
|
318
|
+
const localMarkDefs = new Map(inheritedMarkDefs);
|
|
319
|
+
for (const markDef of value.markDefs) if (isRecord$1(markDef) && typeof markDef._key === "string") localMarkDefs.set(markDef._key, markDef);
|
|
320
|
+
markDefs = localMarkDefs;
|
|
321
|
+
}
|
|
322
|
+
if (value._type === "span" && Array.isArray(value.marks)) for (const mark of value.marks) {
|
|
323
|
+
if (typeof mark !== "string" || SUPPORTED_PORTABLE_TEXT_DECORATORS.has(mark)) continue;
|
|
324
|
+
const markDef = markDefs.get(mark);
|
|
325
|
+
if (markDef?._type === "link") continue;
|
|
326
|
+
unsupported.add(typeof markDef?._type === "string" ? markDef._type : mark);
|
|
327
|
+
}
|
|
328
|
+
for (const [key, child] of Object.entries(value)) if (key !== "markDefs") collectPortableTextMarks(child, markDefs, unsupported);
|
|
329
|
+
}
|
|
330
|
+
function collectProseMirrorMarks(node, unsupported) {
|
|
331
|
+
for (const mark of node.marks ?? []) if (!SUPPORTED_PROSEMIRROR_MARKS.has(mark.type)) unsupported.add(mark.type);
|
|
332
|
+
for (const child of node.content ?? []) collectProseMirrorMarks(child, unsupported);
|
|
333
|
+
}
|
|
334
|
+
var UnsupportedPortableTextMarksError = class extends Error {
|
|
335
|
+
marks;
|
|
336
|
+
constructor(marks) {
|
|
337
|
+
const sortedMarks = [...new Set(marks)].toSorted();
|
|
338
|
+
super(`Unsupported Portable Text marks: ${sortedMarks.join(", ")}`);
|
|
339
|
+
this.name = "UnsupportedPortableTextMarksError";
|
|
340
|
+
this.marks = sortedMarks;
|
|
341
|
+
}
|
|
342
|
+
};
|
|
343
|
+
function findUnsupportedPortableTextMarks(blocks) {
|
|
344
|
+
const unsupported = /* @__PURE__ */ new Set();
|
|
345
|
+
for (const block of blocks) if (block._type === "block" || block._type === "table") collectPortableTextMarks(block, /* @__PURE__ */ new Map(), unsupported);
|
|
346
|
+
return [...unsupported].toSorted();
|
|
347
|
+
}
|
|
348
|
+
function assertPortableTextMarksSupported(blocks) {
|
|
349
|
+
const unsupported = findUnsupportedPortableTextMarks(blocks);
|
|
350
|
+
if (unsupported.length > 0) throw new UnsupportedPortableTextMarksError(unsupported);
|
|
351
|
+
}
|
|
352
|
+
function assertProseMirrorMarksSupported(document) {
|
|
353
|
+
const unsupported = /* @__PURE__ */ new Set();
|
|
354
|
+
for (const node of document.content) collectProseMirrorMarks(node, unsupported);
|
|
355
|
+
if (unsupported.size > 0) throw new UnsupportedPortableTextMarksError(unsupported);
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
//#endregion
|
|
359
|
+
//#region src/content/converters/numbered-list.ts
|
|
360
|
+
const MAX_ORDERED_LIST_START = 2147483647;
|
|
361
|
+
function normalizeListId(value) {
|
|
362
|
+
if (typeof value !== "string") return void 0;
|
|
363
|
+
const normalized = value.trim();
|
|
364
|
+
return normalized.length > 0 && normalized.length <= 128 ? normalized : void 0;
|
|
365
|
+
}
|
|
366
|
+
function normalizeListStart(value) {
|
|
367
|
+
return typeof value === "number" && Number.isInteger(value) && value >= 1 && value <= MAX_ORDERED_LIST_START ? value : void 0;
|
|
368
|
+
}
|
|
369
|
+
function deriveLegacyListId(seed) {
|
|
370
|
+
const readable = `legacy:${seed}`;
|
|
371
|
+
if (readable.length <= 128) return readable;
|
|
372
|
+
let hash = 2166136261;
|
|
373
|
+
for (let i = 0; i < seed.length; i++) {
|
|
374
|
+
hash ^= seed.charCodeAt(i);
|
|
375
|
+
hash = Math.imul(hash, 16777619);
|
|
376
|
+
}
|
|
377
|
+
return `legacy:${seed.slice(0, 96)}:${(hash >>> 0).toString(36)}:${seed.length.toString(36)}`;
|
|
378
|
+
}
|
|
379
|
+
function readOrderedListMetadata(attrs, fallbackId) {
|
|
380
|
+
return {
|
|
381
|
+
listId: normalizeListId(attrs?.listId) ?? deriveLegacyListId(fallbackId),
|
|
382
|
+
listStart: normalizeListStart(attrs?.listStart) ?? normalizeListStart(attrs?.start) ?? 1
|
|
383
|
+
};
|
|
384
|
+
}
|
|
385
|
+
function collectProseMirrorOrderedLists(doc) {
|
|
386
|
+
const lists = [];
|
|
387
|
+
const visit = (node, path, depth, context) => {
|
|
388
|
+
if (node.type === "orderedList") lists.push({
|
|
389
|
+
node,
|
|
390
|
+
path,
|
|
391
|
+
depth,
|
|
392
|
+
context
|
|
393
|
+
});
|
|
394
|
+
for (const [index, child] of (node.content ?? []).entries()) {
|
|
395
|
+
const childPath = `${path}:${index}`;
|
|
396
|
+
visit(child, childPath, depth + 1, child.type === "listItem" ? `listItem:${childPath}` : context);
|
|
397
|
+
}
|
|
398
|
+
};
|
|
399
|
+
for (const [index, node] of doc.content.entries()) visit(node, `root:${index}`, 0, "root");
|
|
400
|
+
return lists;
|
|
401
|
+
}
|
|
402
|
+
function cloneProseMirrorNode(node) {
|
|
403
|
+
return {
|
|
404
|
+
...node,
|
|
405
|
+
attrs: node.attrs ? { ...node.attrs } : void 0,
|
|
406
|
+
content: node.content?.map(cloneProseMirrorNode),
|
|
407
|
+
marks: node.marks?.map((mark) => ({
|
|
408
|
+
...mark,
|
|
409
|
+
attrs: mark.attrs ? { ...mark.attrs } : void 0
|
|
410
|
+
}))
|
|
411
|
+
};
|
|
412
|
+
}
|
|
413
|
+
function createRepairId(sourceId, scope, attempt) {
|
|
414
|
+
const base = deriveLegacyListId(`repair:${sourceId}:${scope}`);
|
|
415
|
+
const suffix = `:${attempt.toString(36)}`;
|
|
416
|
+
return `${base.slice(0, 128 - suffix.length)}${suffix}`;
|
|
417
|
+
}
|
|
418
|
+
function normalizeProseMirrorOrderedListJson(doc) {
|
|
419
|
+
const normalized = {
|
|
420
|
+
...doc,
|
|
421
|
+
content: doc.content.map(cloneProseMirrorNode)
|
|
422
|
+
};
|
|
423
|
+
const canonicalBySourceScope = /* @__PURE__ */ new Map();
|
|
424
|
+
const assignedCanonicalIds = /* @__PURE__ */ new Set();
|
|
425
|
+
const lists = collectProseMirrorOrderedLists(normalized).map((list) => {
|
|
426
|
+
const sourceId = normalizeListId(list.node.attrs?.listId) ?? deriveLegacyListId(`pm-json:${list.path}:${list.depth}:${list.context}`);
|
|
427
|
+
const scope = JSON.stringify([list.depth, list.context]);
|
|
428
|
+
const sourceScope = JSON.stringify([sourceId, scope]);
|
|
429
|
+
let listId = canonicalBySourceScope.get(sourceScope);
|
|
430
|
+
if (!listId) {
|
|
431
|
+
if (!assignedCanonicalIds.has(sourceId)) listId = sourceId;
|
|
432
|
+
else {
|
|
433
|
+
let attempt = 0;
|
|
434
|
+
do
|
|
435
|
+
listId = createRepairId(sourceId, scope, attempt++);
|
|
436
|
+
while (assignedCanonicalIds.has(listId));
|
|
437
|
+
}
|
|
438
|
+
canonicalBySourceScope.set(sourceScope, listId);
|
|
439
|
+
assignedCanonicalIds.add(listId);
|
|
440
|
+
}
|
|
441
|
+
return {
|
|
442
|
+
...list,
|
|
443
|
+
listId,
|
|
444
|
+
scopeKey: JSON.stringify([
|
|
445
|
+
listId,
|
|
446
|
+
list.depth,
|
|
447
|
+
list.context
|
|
448
|
+
])
|
|
449
|
+
};
|
|
450
|
+
});
|
|
451
|
+
const bases = /* @__PURE__ */ new Map();
|
|
452
|
+
for (const list of lists) {
|
|
453
|
+
const listStart = normalizeListStart(list.node.attrs?.listStart);
|
|
454
|
+
if (listStart !== void 0 && !bases.has(list.scopeKey)) bases.set(list.scopeKey, listStart);
|
|
455
|
+
}
|
|
456
|
+
for (const list of lists) if (!bases.has(list.scopeKey)) bases.set(list.scopeKey, normalizeListStart(list.node.attrs?.start) ?? 1);
|
|
457
|
+
const counts = /* @__PURE__ */ new Map();
|
|
458
|
+
for (const list of lists) {
|
|
459
|
+
const listStart = bases.get(list.scopeKey);
|
|
460
|
+
const count = counts.get(list.scopeKey) ?? 0;
|
|
461
|
+
const start = normalizeListStart(listStart + count) ?? 1;
|
|
462
|
+
const directItemCount = list.node.content?.filter((node) => node.type === "listItem").length ?? 0;
|
|
463
|
+
counts.set(list.scopeKey, count + directItemCount);
|
|
464
|
+
list.node.attrs = {
|
|
465
|
+
...list.node.attrs,
|
|
466
|
+
listId: list.listId,
|
|
467
|
+
listStart,
|
|
468
|
+
start
|
|
469
|
+
};
|
|
470
|
+
}
|
|
471
|
+
return normalized;
|
|
472
|
+
}
|
|
270
473
|
|
|
271
474
|
//#endregion
|
|
272
475
|
//#region src/content/converters/prosemirror-to-portable-text.ts
|
|
@@ -286,9 +489,10 @@ function generateKey() {
|
|
|
286
489
|
*/
|
|
287
490
|
function prosemirrorToPortableText(doc) {
|
|
288
491
|
if (!doc || doc.type !== "doc" || !doc.content) return [];
|
|
492
|
+
assertProseMirrorMarksSupported(doc);
|
|
289
493
|
const blocks = [];
|
|
290
|
-
for (const node of doc.content) {
|
|
291
|
-
const converted = convertNode(node);
|
|
494
|
+
for (const [i, node] of doc.content.entries()) {
|
|
495
|
+
const converted = convertNode(node, `root:${i}`);
|
|
292
496
|
if (converted) if (Array.isArray(converted)) blocks.push(...converted);
|
|
293
497
|
else blocks.push(converted);
|
|
294
498
|
}
|
|
@@ -297,12 +501,12 @@ function prosemirrorToPortableText(doc) {
|
|
|
297
501
|
/**
|
|
298
502
|
* Convert a single ProseMirror node to Portable Text block(s)
|
|
299
503
|
*/
|
|
300
|
-
function convertNode(node) {
|
|
504
|
+
function convertNode(node, path) {
|
|
301
505
|
switch (node.type) {
|
|
302
506
|
case "paragraph": return convertParagraph(node);
|
|
303
507
|
case "heading": return convertHeading(node);
|
|
304
|
-
case "bulletList": return convertList$1(node, "bullet");
|
|
305
|
-
case "orderedList": return convertList$1(node, "number");
|
|
508
|
+
case "bulletList": return convertList$1(node, "bullet", path);
|
|
509
|
+
case "orderedList": return convertList$1(node, "number", path);
|
|
306
510
|
case "blockquote": return convertBlockquote(node);
|
|
307
511
|
case "codeBlock": return convertCodeBlock$1(node);
|
|
308
512
|
case "htmlBlock": return convertHtmlBlock(node);
|
|
@@ -371,10 +575,11 @@ function convertHeading(node) {
|
|
|
371
575
|
/**
|
|
372
576
|
* Convert list to Portable Text blocks
|
|
373
577
|
*/
|
|
374
|
-
function convertList$1(node, listItem) {
|
|
578
|
+
function convertList$1(node, listItem, path) {
|
|
375
579
|
const blocks = [];
|
|
376
|
-
|
|
377
|
-
|
|
580
|
+
const metadata = listItem === "number" ? readOrderedListMetadata(node.attrs, path) : void 0;
|
|
581
|
+
for (const [i, item] of (node.content ?? []).entries()) if (item.type === "listItem") {
|
|
582
|
+
const itemBlocks = convertListItem$1(item, listItem, 1, `${path}:${i}`, metadata);
|
|
378
583
|
blocks.push(...itemBlocks);
|
|
379
584
|
}
|
|
380
585
|
return blocks;
|
|
@@ -382,9 +587,9 @@ function convertList$1(node, listItem) {
|
|
|
382
587
|
/**
|
|
383
588
|
* Convert list item to Portable Text blocks
|
|
384
589
|
*/
|
|
385
|
-
function convertListItem$1(item, listItem, level) {
|
|
590
|
+
function convertListItem$1(item, listItem, level, path, metadata) {
|
|
386
591
|
const blocks = [];
|
|
387
|
-
for (const child of item.content
|
|
592
|
+
for (const [i, child] of (item.content ?? []).entries()) if (child.type === "paragraph") {
|
|
388
593
|
const { children, markDefs } = convertInlineContent(child.content || []);
|
|
389
594
|
if (children.length > 0) blocks.push({
|
|
390
595
|
_type: "block",
|
|
@@ -392,19 +597,21 @@ function convertListItem$1(item, listItem, level) {
|
|
|
392
597
|
style: "normal",
|
|
393
598
|
listItem,
|
|
394
599
|
level,
|
|
600
|
+
...metadata,
|
|
395
601
|
children,
|
|
396
602
|
markDefs: markDefs.length > 0 ? markDefs : void 0
|
|
397
603
|
});
|
|
398
|
-
} else if (child.type === "bulletList") blocks.push(...convertListItemNested(child, "bullet", level + 1));
|
|
399
|
-
else if (child.type === "orderedList") blocks.push(...convertListItemNested(child, "number", level + 1));
|
|
604
|
+
} else if (child.type === "bulletList") blocks.push(...convertListItemNested(child, "bullet", level + 1, `${path}:${i}`));
|
|
605
|
+
else if (child.type === "orderedList") blocks.push(...convertListItemNested(child, "number", level + 1, `${path}:${i}`));
|
|
400
606
|
return blocks;
|
|
401
607
|
}
|
|
402
608
|
/**
|
|
403
609
|
* Convert nested list
|
|
404
610
|
*/
|
|
405
|
-
function convertListItemNested(node, listItem, level) {
|
|
611
|
+
function convertListItemNested(node, listItem, level, path) {
|
|
406
612
|
const blocks = [];
|
|
407
|
-
|
|
613
|
+
const metadata = listItem === "number" ? readOrderedListMetadata(node.attrs, path) : void 0;
|
|
614
|
+
for (const [i, item] of (node.content ?? []).entries()) if (item.type === "listItem") blocks.push(...convertListItem$1(item, listItem, level, `${path}:${i}`, metadata));
|
|
408
615
|
return blocks;
|
|
409
616
|
}
|
|
410
617
|
/**
|
|
@@ -539,6 +746,8 @@ function convertMark(mark, markDefs, markDefMap) {
|
|
|
539
746
|
case "underline": return "underline";
|
|
540
747
|
case "strike":
|
|
541
748
|
case "strikethrough": return "strike-through";
|
|
749
|
+
case "subscript": return "subscript";
|
|
750
|
+
case "superscript": return "superscript";
|
|
542
751
|
case "code": return "code";
|
|
543
752
|
case "link": {
|
|
544
753
|
const href = (typeof mark.attrs?.href === "string" ? mark.attrs.href : "") || "";
|
|
@@ -553,7 +762,7 @@ function convertMark(mark, markDefs, markDefMap) {
|
|
|
553
762
|
markDefMap.set(href, key);
|
|
554
763
|
return key;
|
|
555
764
|
}
|
|
556
|
-
default:
|
|
765
|
+
default: throw new UnsupportedPortableTextMarksError([mark.type]);
|
|
557
766
|
}
|
|
558
767
|
}
|
|
559
768
|
|
|
@@ -572,6 +781,7 @@ function portableTextToProsemirror(blocks) {
|
|
|
572
781
|
type: "doc",
|
|
573
782
|
content: [{ type: "paragraph" }]
|
|
574
783
|
};
|
|
784
|
+
assertPortableTextMarksSupported(blocks);
|
|
575
785
|
const content = [];
|
|
576
786
|
let i = 0;
|
|
577
787
|
while (i < blocks.length) {
|
|
@@ -579,15 +789,20 @@ function portableTextToProsemirror(blocks) {
|
|
|
579
789
|
if (isTextBlock(block) && block.listItem) {
|
|
580
790
|
const listBlocks = [];
|
|
581
791
|
const listType = block.listItem;
|
|
792
|
+
const runStart = i;
|
|
793
|
+
const rootId = listType === "number" ? normalizeListId(block.listId) : void 0;
|
|
582
794
|
while (i < blocks.length) {
|
|
583
795
|
const current = blocks[i];
|
|
584
796
|
if (!isTextBlock(current) || !current.listItem) break;
|
|
585
|
-
|
|
797
|
+
const level = current.level || 1;
|
|
798
|
+
const currentId = current.listItem === "number" ? normalizeListId(current.listId) : void 0;
|
|
799
|
+
const sameRootIdentity = listType !== "number" || level > 1 || (rootId ? currentId === rootId : currentId === void 0);
|
|
800
|
+
if (level > 1 || current.listItem === listType && sameRootIdentity) {
|
|
586
801
|
listBlocks.push(current);
|
|
587
802
|
i++;
|
|
588
803
|
} else break;
|
|
589
804
|
}
|
|
590
|
-
content.push(convertList(listBlocks, listType));
|
|
805
|
+
content.push(convertList(listBlocks, listType, `root:${runStart}`));
|
|
591
806
|
} else if (isTextBlock(block) && block.style === "blockquote") {
|
|
592
807
|
const quoteBlocks = [];
|
|
593
808
|
while (i < blocks.length) {
|
|
@@ -612,11 +827,26 @@ function portableTextToProsemirror(blocks) {
|
|
|
612
827
|
i++;
|
|
613
828
|
}
|
|
614
829
|
}
|
|
615
|
-
return {
|
|
830
|
+
return normalizeProseMirrorOrderedListJson({
|
|
616
831
|
type: "doc",
|
|
617
832
|
content: content.length > 0 ? content : [{ type: "paragraph" }]
|
|
833
|
+
});
|
|
834
|
+
}
|
|
835
|
+
function getListMetadata(item, fallbackSeed) {
|
|
836
|
+
const listId = normalizeListId(item.listId) ?? deriveLegacyListId(fallbackSeed);
|
|
837
|
+
const listStart = normalizeListStart(item.listStart);
|
|
838
|
+
return {
|
|
839
|
+
listId,
|
|
840
|
+
...listStart === void 0 ? {} : { listStart }
|
|
618
841
|
};
|
|
619
842
|
}
|
|
843
|
+
function belongsToNestedGroup(item, minLevel, parentListType, anchorType, anchorId) {
|
|
844
|
+
if ((item.level || 2) > minLevel) return true;
|
|
845
|
+
if ((item.listItem || parentListType) !== anchorType) return false;
|
|
846
|
+
if (anchorType !== "number") return true;
|
|
847
|
+
const itemId = normalizeListId(item.listId);
|
|
848
|
+
return anchorId ? itemId === anchorId : itemId === void 0;
|
|
849
|
+
}
|
|
620
850
|
/**
|
|
621
851
|
* Type guard for text blocks
|
|
622
852
|
*/
|
|
@@ -711,7 +941,7 @@ function convertTextBlock(block) {
|
|
|
711
941
|
/**
|
|
712
942
|
* Convert list items to ProseMirror list
|
|
713
943
|
*/
|
|
714
|
-
function convertList(items, listType) {
|
|
944
|
+
function convertList(items, listType, context) {
|
|
715
945
|
const rootItems = [];
|
|
716
946
|
let i = 0;
|
|
717
947
|
while (i < items.length) {
|
|
@@ -723,21 +953,26 @@ function convertList(items, listType) {
|
|
|
723
953
|
nestedItems.push(items[i]);
|
|
724
954
|
i++;
|
|
725
955
|
}
|
|
726
|
-
rootItems.push(convertListItem(item, nestedItems, listType));
|
|
956
|
+
rootItems.push(convertListItem(item, nestedItems, listType, `${context}:${rootItems.length}`));
|
|
727
957
|
} else {
|
|
728
|
-
rootItems.push(convertListItem(item, [], listType));
|
|
958
|
+
rootItems.push(convertListItem(item, [], listType, `${context}:${rootItems.length}`));
|
|
729
959
|
i++;
|
|
730
960
|
}
|
|
731
961
|
}
|
|
962
|
+
const metadata = listType === "number" ? getListMetadata(items[0], `${context}:${items[0]._key}`) : void 0;
|
|
732
963
|
return {
|
|
733
964
|
type: listType === "bullet" ? "bulletList" : "orderedList",
|
|
965
|
+
attrs: metadata ? {
|
|
966
|
+
...metadata,
|
|
967
|
+
start: metadata.listStart ?? 1
|
|
968
|
+
} : void 0,
|
|
734
969
|
content: rootItems
|
|
735
970
|
};
|
|
736
971
|
}
|
|
737
972
|
/**
|
|
738
973
|
* Convert a single list item to ProseMirror
|
|
739
974
|
*/
|
|
740
|
-
function convertListItem(item, nestedItems, parentListType) {
|
|
975
|
+
function convertListItem(item, nestedItems, parentListType, context) {
|
|
741
976
|
const content = [];
|
|
742
977
|
const spans = convertSpans(item.children, item.markDefs || []);
|
|
743
978
|
content.push({
|
|
@@ -753,17 +988,18 @@ function convertListItem(item, nestedItems, parentListType) {
|
|
|
753
988
|
let j = 0;
|
|
754
989
|
while (j < nestedItems.length) {
|
|
755
990
|
const anchorType = nestedItems[j].listItem || parentListType;
|
|
991
|
+
const anchorId = anchorType === "number" ? normalizeListId(nestedItems[j].listId) : void 0;
|
|
756
992
|
const nestedGroup = [];
|
|
757
993
|
do {
|
|
758
994
|
nestedGroup.push(nestedItems[j]);
|
|
759
995
|
j++;
|
|
760
|
-
} while (j < nestedItems.length && (
|
|
996
|
+
} while (j < nestedItems.length && belongsToNestedGroup(nestedItems[j], minLevel, parentListType, anchorType, anchorId));
|
|
761
997
|
if (nestedGroup.length > 0) {
|
|
762
998
|
const adjustedGroup = nestedGroup.map((ni) => ({
|
|
763
999
|
...ni,
|
|
764
1000
|
level: (ni.level || 2) - 1
|
|
765
1001
|
}));
|
|
766
|
-
content.push(convertList(adjustedGroup, anchorType));
|
|
1002
|
+
content.push(convertList(adjustedGroup, anchorType, `${context}:nested:${j - nestedGroup.length}`));
|
|
767
1003
|
}
|
|
768
1004
|
}
|
|
769
1005
|
}
|
|
@@ -815,22 +1051,25 @@ function convertMarks(marks, markDefs) {
|
|
|
815
1051
|
case "strike-through":
|
|
816
1052
|
pmMarks.push({ type: "strike" });
|
|
817
1053
|
break;
|
|
1054
|
+
case "subscript":
|
|
1055
|
+
pmMarks.push({ type: "subscript" });
|
|
1056
|
+
break;
|
|
1057
|
+
case "superscript":
|
|
1058
|
+
pmMarks.push({ type: "superscript" });
|
|
1059
|
+
break;
|
|
818
1060
|
case "code":
|
|
819
1061
|
pmMarks.push({ type: "code" });
|
|
820
1062
|
break;
|
|
821
1063
|
default: {
|
|
822
1064
|
const markDef = markDefs.get(mark);
|
|
823
|
-
if (markDef
|
|
1065
|
+
if (markDef?._type === "link") pmMarks.push({
|
|
824
1066
|
type: "link",
|
|
825
1067
|
attrs: {
|
|
826
1068
|
href: markDef.href,
|
|
827
1069
|
target: markDef.blank ? "_blank" : null
|
|
828
1070
|
}
|
|
829
1071
|
});
|
|
830
|
-
else
|
|
831
|
-
type: markDef._type,
|
|
832
|
-
attrs: markDef
|
|
833
|
-
});
|
|
1072
|
+
else throw new UnsupportedPortableTextMarksError([typeof markDef?._type === "string" ? markDef._type : mark]);
|
|
834
1073
|
break;
|
|
835
1074
|
}
|
|
836
1075
|
}
|
|
@@ -2197,6 +2436,52 @@ function buildRouteMeta(route) {
|
|
|
2197
2436
|
return meta;
|
|
2198
2437
|
}
|
|
2199
2438
|
/**
|
|
2439
|
+
* HTTP methods that carry a request body. Everything else (GET, HEAD, DELETE)
|
|
2440
|
+
* takes its route input from the URL query string.
|
|
2441
|
+
*/
|
|
2442
|
+
const BODY_METHODS = new Set([
|
|
2443
|
+
"POST",
|
|
2444
|
+
"PUT",
|
|
2445
|
+
"PATCH"
|
|
2446
|
+
]);
|
|
2447
|
+
/**
|
|
2448
|
+
* Parse a plugin route's input from the request, by method.
|
|
2449
|
+
*
|
|
2450
|
+
* Body methods (POST/PUT/PATCH) parse the JSON body as before. Bodyless
|
|
2451
|
+
* methods (GET/HEAD/DELETE) have no body, so `request.json()` resolves to
|
|
2452
|
+
* undefined and fails schema validation (#2146) — parse the query string into
|
|
2453
|
+
* an object instead. Repeated keys (`?tag=a&tag=b`) become an array so array
|
|
2454
|
+
* schemas work; a single key stays a scalar.
|
|
2455
|
+
*/
|
|
2456
|
+
async function parseRouteInput(request) {
|
|
2457
|
+
if (BODY_METHODS.has(request.method.toUpperCase())) try {
|
|
2458
|
+
return await request.json();
|
|
2459
|
+
} catch {
|
|
2460
|
+
return;
|
|
2461
|
+
}
|
|
2462
|
+
const params = new URL(request.url).searchParams;
|
|
2463
|
+
const input = {};
|
|
2464
|
+
for (const key of new Set(params.keys())) {
|
|
2465
|
+
const values = params.getAll(key);
|
|
2466
|
+
input[key] = values.length > 1 ? values : values[0];
|
|
2467
|
+
}
|
|
2468
|
+
return input;
|
|
2469
|
+
}
|
|
2470
|
+
/**
|
|
2471
|
+
* Convert the host's authenticated user into the read-only `UserInfo` shape
|
|
2472
|
+
* exposed to plugins as `ctx.user`. Strips sensitive/irrelevant fields and
|
|
2473
|
+
* keeps the value structured-clone-safe for sandboxed plugins.
|
|
2474
|
+
*/
|
|
2475
|
+
function toRouteCallerInfo(user) {
|
|
2476
|
+
return {
|
|
2477
|
+
id: user.id,
|
|
2478
|
+
email: user.email,
|
|
2479
|
+
name: user.name,
|
|
2480
|
+
role: user.role,
|
|
2481
|
+
createdAt: typeof user.createdAt === "string" ? user.createdAt : user.createdAt.toISOString()
|
|
2482
|
+
};
|
|
2483
|
+
}
|
|
2484
|
+
/**
|
|
2200
2485
|
* Route handler for a plugin
|
|
2201
2486
|
*/
|
|
2202
2487
|
var PluginRouteHandler = class {
|
|
@@ -2239,7 +2524,8 @@ var PluginRouteHandler = class {
|
|
|
2239
2524
|
...this.contextFactory.createContext(this.plugin),
|
|
2240
2525
|
input: validatedInput,
|
|
2241
2526
|
request: guardConsumedRequestBody(options.request),
|
|
2242
|
-
requestMeta: extractRequestMeta(options.request, this.trustedProxyHeaders)
|
|
2527
|
+
requestMeta: extractRequestMeta(options.request, this.trustedProxyHeaders),
|
|
2528
|
+
user: options.user
|
|
2243
2529
|
};
|
|
2244
2530
|
try {
|
|
2245
2531
|
return {
|
|
@@ -2248,6 +2534,14 @@ var PluginRouteHandler = class {
|
|
|
2248
2534
|
status: 200
|
|
2249
2535
|
};
|
|
2250
2536
|
} catch (error) {
|
|
2537
|
+
if (error instanceof MediaUsageActivationWriteBlockedError) return {
|
|
2538
|
+
success: false,
|
|
2539
|
+
error: {
|
|
2540
|
+
code: error.code,
|
|
2541
|
+
message: error.message
|
|
2542
|
+
},
|
|
2543
|
+
status: error.status
|
|
2544
|
+
};
|
|
2251
2545
|
if (error instanceof PluginRouteError) return {
|
|
2252
2546
|
success: false,
|
|
2253
2547
|
error: {
|
|
@@ -2795,12 +3089,16 @@ var NodeCronScheduler = class {
|
|
|
2795
3089
|
timer = null;
|
|
2796
3090
|
running = false;
|
|
2797
3091
|
systemCleanup = null;
|
|
3092
|
+
mediaUsageMaintenance = null;
|
|
2798
3093
|
constructor(executor) {
|
|
2799
3094
|
this.executor = executor;
|
|
2800
3095
|
}
|
|
2801
3096
|
setSystemCleanup(fn) {
|
|
2802
3097
|
this.systemCleanup = fn;
|
|
2803
3098
|
}
|
|
3099
|
+
setMediaUsageMaintenance(fn) {
|
|
3100
|
+
this.mediaUsageMaintenance = fn;
|
|
3101
|
+
}
|
|
2804
3102
|
start() {
|
|
2805
3103
|
this.running = true;
|
|
2806
3104
|
this.arm();
|
|
@@ -2847,8 +3145,13 @@ var NodeCronScheduler = class {
|
|
|
2847
3145
|
if (!this.running) return;
|
|
2848
3146
|
const tasks = [this.executor.tick(), this.executor.recoverStaleLocks()];
|
|
2849
3147
|
if (this.systemCleanup) tasks.push(this.systemCleanup());
|
|
2850
|
-
Promise.allSettled(tasks).then((results) => {
|
|
3148
|
+
Promise.allSettled(tasks).then(async (results) => {
|
|
2851
3149
|
for (const r of results) if (r.status === "rejected") console.error("[cron:node] Tick task failed:", r.reason);
|
|
3150
|
+
if (this.mediaUsageMaintenance) try {
|
|
3151
|
+
await this.mediaUsageMaintenance();
|
|
3152
|
+
} catch (error) {
|
|
3153
|
+
console.error("[cron:node] Media Usage maintenance failed:", error);
|
|
3154
|
+
}
|
|
2852
3155
|
}).finally(() => {
|
|
2853
3156
|
if (this.running) this.arm();
|
|
2854
3157
|
});
|
|
@@ -2913,6 +3216,56 @@ function createNoopSandboxRunner(_options) {
|
|
|
2913
3216
|
|
|
2914
3217
|
//#endregion
|
|
2915
3218
|
//#region src/plugins/sandbox/types.ts
|
|
3219
|
+
const SANDBOX_ROUTE_ERROR_DEFINITIONS = {
|
|
3220
|
+
MEDIA_USAGE_ACTIVATION_IN_PROGRESS: {
|
|
3221
|
+
message: "Media usage activation is in progress",
|
|
3222
|
+
status: 503
|
|
3223
|
+
},
|
|
3224
|
+
MEDIA_USAGE_ACTIVATION_CHECK_FAILED: {
|
|
3225
|
+
message: "Unable to verify media usage activation state",
|
|
3226
|
+
status: 503
|
|
3227
|
+
}
|
|
3228
|
+
};
|
|
3229
|
+
function isRecord(value) {
|
|
3230
|
+
return typeof value === "object" && value !== null;
|
|
3231
|
+
}
|
|
3232
|
+
function isSandboxRouteErrorCode(value) {
|
|
3233
|
+
return typeof value === "string" && value in SANDBOX_ROUTE_ERROR_DEFINITIONS;
|
|
3234
|
+
}
|
|
3235
|
+
function getSandboxRouteErrorDetails(error) {
|
|
3236
|
+
if (!isRecord(error)) return null;
|
|
3237
|
+
const propertyCode = isSandboxRouteErrorCode(error.code) ? error.code : null;
|
|
3238
|
+
const nameCode = error instanceof Error && isSandboxRouteErrorCode(error.name) ? error.name : null;
|
|
3239
|
+
if (propertyCode && nameCode && propertyCode !== nameCode) return null;
|
|
3240
|
+
const code = propertyCode ?? nameCode;
|
|
3241
|
+
if (!code || error.status !== void 0 && error.status !== 503) return null;
|
|
3242
|
+
return {
|
|
3243
|
+
code,
|
|
3244
|
+
...SANDBOX_ROUTE_ERROR_DEFINITIONS[code]
|
|
3245
|
+
};
|
|
3246
|
+
}
|
|
3247
|
+
function createSandboxRouteError(code) {
|
|
3248
|
+
const details = {
|
|
3249
|
+
code,
|
|
3250
|
+
...SANDBOX_ROUTE_ERROR_DEFINITIONS[code]
|
|
3251
|
+
};
|
|
3252
|
+
return Object.assign(new Error(details.message), details, { name: code });
|
|
3253
|
+
}
|
|
3254
|
+
function createSandboxRouteErrorEnvelope(error) {
|
|
3255
|
+
const details = getSandboxRouteErrorDetails(error);
|
|
3256
|
+
return details ? {
|
|
3257
|
+
__emdashSandboxRouteError: true,
|
|
3258
|
+
error: details
|
|
3259
|
+
} : null;
|
|
3260
|
+
}
|
|
3261
|
+
function getSandboxRouteErrorEnvelope(value) {
|
|
3262
|
+
if (!isRecord(value) || value.__emdashSandboxRouteError !== true) return null;
|
|
3263
|
+
const details = getSandboxRouteErrorDetails(value.error);
|
|
3264
|
+
return details ? {
|
|
3265
|
+
__emdashSandboxRouteError: true,
|
|
3266
|
+
error: details
|
|
3267
|
+
} : null;
|
|
3268
|
+
}
|
|
2916
3269
|
/**
|
|
2917
3270
|
* Error thrown when the sandbox runtime is unavailable.
|
|
2918
3271
|
* This happens when the sidecar process has crashed or hasn't started.
|
|
@@ -3159,13 +3512,14 @@ async function getMenusWithDb(db, options = {}) {
|
|
|
3159
3512
|
* per-locale content rows.
|
|
3160
3513
|
*/
|
|
3161
3514
|
async function buildMenuTree(items, db, locale) {
|
|
3162
|
-
const
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3515
|
+
const contentReferences = collectContentReferences(items);
|
|
3516
|
+
const taxonomyReferences = new Set(items.flatMap((item) => item.type === "taxonomy" && item.reference_id ? [item.reference_id] : []));
|
|
3517
|
+
const [urlPatterns, contentLookup, taxonomyLookup] = await Promise.all([
|
|
3518
|
+
contentReferences.size > 0 ? getCollectionUrlPatterns(db, new Set(contentReferences.keys())) : /* @__PURE__ */ new Map(),
|
|
3519
|
+
resolveContentReferences(db, contentReferences, locale),
|
|
3520
|
+
resolveTaxonomyReferences(db, taxonomyReferences, locale)
|
|
3521
|
+
]);
|
|
3522
|
+
const validItems = items.map((item) => resolveMenuItem(item, urlPatterns, contentLookup, taxonomyLookup)).filter((item) => item !== null);
|
|
3169
3523
|
const itemMap = /* @__PURE__ */ new Map();
|
|
3170
3524
|
const rootItems = [];
|
|
3171
3525
|
for (const item of validItems) itemMap.set(item.id, {
|
|
@@ -3183,6 +3537,41 @@ async function buildMenuTree(items, db, locale) {
|
|
|
3183
3537
|
}
|
|
3184
3538
|
return rootItems;
|
|
3185
3539
|
}
|
|
3540
|
+
function collectContentReferences(items) {
|
|
3541
|
+
const references = /* @__PURE__ */ new Map();
|
|
3542
|
+
for (const item of items) {
|
|
3543
|
+
const reference = getContentReference(item);
|
|
3544
|
+
if (!reference) continue;
|
|
3545
|
+
let ids = references.get(reference.collection);
|
|
3546
|
+
if (!ids) {
|
|
3547
|
+
ids = /* @__PURE__ */ new Set();
|
|
3548
|
+
references.set(reference.collection, ids);
|
|
3549
|
+
}
|
|
3550
|
+
ids.add(reference.id);
|
|
3551
|
+
}
|
|
3552
|
+
return references;
|
|
3553
|
+
}
|
|
3554
|
+
function getContentReference(item) {
|
|
3555
|
+
if (item.type === "page" || item.type === "post") {
|
|
3556
|
+
if (!item.reference_id) return null;
|
|
3557
|
+
return {
|
|
3558
|
+
collection: item.reference_collection || `${item.type}s`,
|
|
3559
|
+
id: item.reference_id
|
|
3560
|
+
};
|
|
3561
|
+
}
|
|
3562
|
+
if (item.type === "collection") {
|
|
3563
|
+
if (!item.reference_collection || !item.reference_id) return null;
|
|
3564
|
+
return {
|
|
3565
|
+
collection: item.reference_collection,
|
|
3566
|
+
id: item.reference_id
|
|
3567
|
+
};
|
|
3568
|
+
}
|
|
3569
|
+
if (item.type !== "custom" && item.type !== "taxonomy" && item.reference_collection && item.reference_id) return {
|
|
3570
|
+
collection: item.reference_collection,
|
|
3571
|
+
id: item.reference_id
|
|
3572
|
+
};
|
|
3573
|
+
return null;
|
|
3574
|
+
}
|
|
3186
3575
|
/**
|
|
3187
3576
|
* Look up the `url_pattern` for a set of collection slugs, request-cached so
|
|
3188
3577
|
* a page rendering several menus (header, footer, ...) only pays for the
|
|
@@ -3199,40 +3588,35 @@ function getCollectionUrlPatterns(db, collectionSlugs) {
|
|
|
3199
3588
|
}
|
|
3200
3589
|
/**
|
|
3201
3590
|
* Resolve a single menu item's URL. `reference_id` is a translation_group
|
|
3202
|
-
* (migration 036 remapped all existing references); we
|
|
3591
|
+
* (migration 036 remapped all existing references); we look it up against
|
|
3203
3592
|
* the per-locale ec_* row or per-locale taxonomy row.
|
|
3204
3593
|
*/
|
|
3205
|
-
|
|
3594
|
+
function resolveMenuItem(item, urlPatterns, contentLookup, taxonomyLookup) {
|
|
3206
3595
|
let url;
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
url = await resolveContentUrl(item.reference_collection, item.reference_id, db, urlPatterns, locale);
|
|
3225
|
-
if (url === null) return null;
|
|
3226
|
-
} else url = `/${item.reference_collection}/`;
|
|
3227
|
-
break;
|
|
3228
|
-
default: if (item.reference_collection && item.reference_id) {
|
|
3229
|
-
url = await resolveContentUrl(item.reference_collection, item.reference_id, db, urlPatterns, locale);
|
|
3596
|
+
switch (item.type) {
|
|
3597
|
+
case "custom":
|
|
3598
|
+
url = item.custom_url || "#";
|
|
3599
|
+
break;
|
|
3600
|
+
case "page":
|
|
3601
|
+
case "post":
|
|
3602
|
+
url = resolveContentUrl(item.reference_collection || `${item.type}s`, item.reference_id, urlPatterns, contentLookup);
|
|
3603
|
+
if (url === null) return null;
|
|
3604
|
+
break;
|
|
3605
|
+
case "taxonomy":
|
|
3606
|
+
url = resolveTaxonomyUrl(item.reference_id, taxonomyLookup);
|
|
3607
|
+
if (url === null) return null;
|
|
3608
|
+
break;
|
|
3609
|
+
case "collection":
|
|
3610
|
+
if (!item.reference_collection) return null;
|
|
3611
|
+
if (item.reference_id) {
|
|
3612
|
+
url = resolveContentUrl(item.reference_collection, item.reference_id, urlPatterns, contentLookup);
|
|
3230
3613
|
if (url === null) return null;
|
|
3231
|
-
} else url =
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3614
|
+
} else url = `/${item.reference_collection}/`;
|
|
3615
|
+
break;
|
|
3616
|
+
default: if (item.reference_collection && item.reference_id) {
|
|
3617
|
+
url = resolveContentUrl(item.reference_collection, item.reference_id, urlPatterns, contentLookup);
|
|
3618
|
+
if (url === null) return null;
|
|
3619
|
+
} else url = "#";
|
|
3236
3620
|
}
|
|
3237
3621
|
return {
|
|
3238
3622
|
id: item.id,
|
|
@@ -3254,56 +3638,105 @@ const ID_PLACEHOLDER = /\{id\}/g;
|
|
|
3254
3638
|
function interpolateUrlPattern(pattern, slug, id) {
|
|
3255
3639
|
return pattern.replace(SLUG_PLACEHOLDER, slug).replace(ID_PLACEHOLDER, id);
|
|
3256
3640
|
}
|
|
3641
|
+
async function resolveContentReferences(db, references, locale) {
|
|
3642
|
+
const entries = await Promise.all(Array.from(references, async ([collection, referenceGroups]) => {
|
|
3643
|
+
const lookup = /* @__PURE__ */ new Map();
|
|
3644
|
+
const localized = /* @__PURE__ */ new Map();
|
|
3645
|
+
try {
|
|
3646
|
+
validateIdentifier(collection, "menu item collection");
|
|
3647
|
+
for (const batch of chunks([...referenceGroups], SQL_BATCH_SIZE)) {
|
|
3648
|
+
const result = await sql`
|
|
3649
|
+
SELECT id, slug, locale, translation_group
|
|
3650
|
+
FROM ${sql.ref(`ec_${collection}`)}
|
|
3651
|
+
WHERE translation_group IN (${sql.join(batch)})
|
|
3652
|
+
`.execute(db);
|
|
3653
|
+
for (const row of result.rows) if (shouldPreferLocalizedRow(row, localized.get(row.translation_group), locale)) localized.set(row.translation_group, row);
|
|
3654
|
+
}
|
|
3655
|
+
for (const [referenceGroup, row] of localized) lookup.set(referenceGroup, {
|
|
3656
|
+
id: row.id,
|
|
3657
|
+
slug: row.slug
|
|
3658
|
+
});
|
|
3659
|
+
const unresolved = [...referenceGroups].filter((id) => !lookup.has(id));
|
|
3660
|
+
for (const batch of chunks(unresolved, SQL_BATCH_SIZE)) {
|
|
3661
|
+
const result = await sql`
|
|
3662
|
+
SELECT id, slug FROM ${sql.ref(`ec_${collection}`)}
|
|
3663
|
+
WHERE id IN (${sql.join(batch)})
|
|
3664
|
+
`.execute(db);
|
|
3665
|
+
for (const row of result.rows) lookup.set(row.id, row);
|
|
3666
|
+
}
|
|
3667
|
+
} catch (error) {
|
|
3668
|
+
console.error(`Failed to resolve content URLs for ${collection}:`, error);
|
|
3669
|
+
}
|
|
3670
|
+
return [collection, lookup];
|
|
3671
|
+
}));
|
|
3672
|
+
return new Map(entries);
|
|
3673
|
+
}
|
|
3674
|
+
function shouldPreferLocalizedRow(candidate, existing, locale) {
|
|
3675
|
+
if (!existing) return true;
|
|
3676
|
+
if (candidate.locale === locale) return existing.locale !== locale || candidate.id < existing.id;
|
|
3677
|
+
if (existing.locale === locale) return false;
|
|
3678
|
+
return candidate.locale < existing.locale || candidate.locale === existing.locale && candidate.id < existing.id;
|
|
3679
|
+
}
|
|
3257
3680
|
/**
|
|
3258
3681
|
* Resolve the URL for a content reference. `referenceGroup` is the content
|
|
3259
3682
|
* row's translation_group; we look up the row in the requested locale
|
|
3260
3683
|
* (falling back to the source if no translation exists so the menu link is
|
|
3261
3684
|
* still clickable).
|
|
3262
3685
|
*/
|
|
3263
|
-
|
|
3686
|
+
function resolveContentUrl(collection, referenceGroup, urlPatterns, contentLookup) {
|
|
3264
3687
|
if (!referenceGroup) return null;
|
|
3688
|
+
const row = contentLookup.get(collection)?.get(referenceGroup);
|
|
3689
|
+
if (!row) return null;
|
|
3690
|
+
const pattern = urlPatterns.get(collection);
|
|
3691
|
+
if (pattern) return interpolateUrlPattern(pattern, row.slug, row.id);
|
|
3692
|
+
return `/${collection}/${row.slug}`;
|
|
3693
|
+
}
|
|
3694
|
+
async function resolveTaxonomyReferences(db, referenceGroups, locale) {
|
|
3695
|
+
const lookup = /* @__PURE__ */ new Map();
|
|
3696
|
+
const localized = /* @__PURE__ */ new Map();
|
|
3265
3697
|
try {
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3698
|
+
for (const batch of chunks([...referenceGroups], SQL_BATCH_SIZE)) {
|
|
3699
|
+
const rows = await db.selectFrom("taxonomies").select([
|
|
3700
|
+
"id",
|
|
3701
|
+
"name",
|
|
3702
|
+
"slug",
|
|
3703
|
+
"locale",
|
|
3704
|
+
"translation_group"
|
|
3705
|
+
]).where("translation_group", "in", batch).$narrowType().execute();
|
|
3706
|
+
for (const row of rows) if (shouldPreferLocalizedRow(row, localized.get(row.translation_group), locale)) localized.set(row.translation_group, row);
|
|
3707
|
+
}
|
|
3708
|
+
for (const [referenceGroup, row] of localized) lookup.set(referenceGroup, {
|
|
3709
|
+
name: row.name,
|
|
3710
|
+
slug: row.slug
|
|
3711
|
+
});
|
|
3712
|
+
const unresolved = [...referenceGroups].filter((id) => !lookup.has(id));
|
|
3713
|
+
for (const batch of chunks(unresolved, SQL_BATCH_SIZE)) {
|
|
3714
|
+
const rows = await db.selectFrom("taxonomies").select([
|
|
3715
|
+
"id",
|
|
3716
|
+
"name",
|
|
3717
|
+
"slug"
|
|
3718
|
+
]).where("id", "in", batch).execute();
|
|
3719
|
+
for (const row of rows) lookup.set(row.id, {
|
|
3720
|
+
name: row.name,
|
|
3721
|
+
slug: row.slug
|
|
3722
|
+
});
|
|
3280
3723
|
}
|
|
3281
|
-
if (!row) row = (await sql`
|
|
3282
|
-
SELECT id, slug FROM ${sql.ref(`ec_${collection}`)}
|
|
3283
|
-
WHERE id = ${referenceGroup} LIMIT 1
|
|
3284
|
-
`.execute(db)).rows[0];
|
|
3285
|
-
if (!row) return null;
|
|
3286
|
-
const pattern = urlPatterns.get(collection);
|
|
3287
|
-
if (pattern) return interpolateUrlPattern(pattern, row.slug, row.id);
|
|
3288
|
-
return `/${collection}/${row.slug}`;
|
|
3289
3724
|
} catch (error) {
|
|
3290
|
-
console.error(
|
|
3291
|
-
return null;
|
|
3725
|
+
console.error("Failed to resolve taxonomy URLs:", error);
|
|
3292
3726
|
}
|
|
3727
|
+
return lookup;
|
|
3293
3728
|
}
|
|
3294
3729
|
/**
|
|
3295
3730
|
* Resolve URL for a taxonomy term reference. `referenceGroup` is the term's
|
|
3296
3731
|
* translation_group; we pick the row in the active locale (or fall back).
|
|
3297
3732
|
*/
|
|
3298
|
-
|
|
3733
|
+
function resolveTaxonomyUrl(referenceGroup, taxonomyLookup) {
|
|
3299
3734
|
if (!referenceGroup) return null;
|
|
3300
|
-
|
|
3301
|
-
if (!taxonomy) taxonomy = await db.selectFrom("taxonomies").select(["name", "slug"]).where("translation_group", "=", referenceGroup).orderBy("locale", "asc").executeTakeFirst();
|
|
3302
|
-
if (!taxonomy) taxonomy = await db.selectFrom("taxonomies").select(["name", "slug"]).where("id", "=", referenceGroup).executeTakeFirst();
|
|
3735
|
+
const taxonomy = taxonomyLookup.get(referenceGroup);
|
|
3303
3736
|
if (!taxonomy) return null;
|
|
3304
3737
|
return `/${taxonomy.name}/${taxonomy.slug}`;
|
|
3305
3738
|
}
|
|
3306
3739
|
|
|
3307
3740
|
//#endregion
|
|
3308
|
-
export {
|
|
3309
|
-
//# sourceMappingURL=menus-
|
|
3741
|
+
export { file as A, createHookPipeline as C, prosemirrorToPortableText as D, portableTextToProsemirror as E, AuditRepository as M, portableText as O, HookPipeline as S, definePlugin as T, PluginRouteRegistry as _, SandboxUnavailableError as a, toRouteCallerInfo as b, getSandboxRouteErrorDetails as c, SandboxNotAvailableError as d, createNoopSandboxRunner as f, PluginRouteError as g, createPluginManager as h, getComments as i, image as j, reference as k, getSandboxRouteErrorEnvelope as l, PluginManager as m, getMenus as n, createSandboxRouteError as o, NodeCronScheduler as p, getCommentCount as r, createSandboxRouteErrorEnvelope as s, getMenu as t, NoopSandboxRunner as u, buildRouteMeta as v, resolveExclusiveHooks as w, EmailPipeline as x, parseRouteInput as y };
|
|
3742
|
+
//# sourceMappingURL=menus-CC-yn1F9.mjs.map
|