emdash 0.28.1 → 0.30.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-hUy8vOB-.d.mts → adapters-C0ONzkUP.d.mts} +10 -1
- package/dist/adapters-C0ONzkUP.d.mts.map +1 -0
- package/dist/{allowed-origins-CRsJ6BPM.mjs → allowed-origins-CCEi9bPI.mjs} +2 -2
- package/dist/{allowed-origins-CRsJ6BPM.mjs.map → allowed-origins-CCEi9bPI.mjs.map} +1 -1
- package/dist/api/route-utils.d.mts +3 -3
- package/dist/api/route-utils.d.mts.map +1 -1
- package/dist/api/route-utils.mjs +22 -21
- package/dist/api/route-utils.mjs.map +1 -1
- package/dist/api/schemas/index.d.mts +2 -2
- package/dist/api/schemas/index.mjs +5 -4
- package/dist/{api-DxFSorgk.mjs → api-b8WIiGU4.mjs} +306 -154
- package/dist/api-b8WIiGU4.mjs.map +1 -0
- package/dist/api-tokens-Cvmixds7.mjs +3 -0
- package/dist/{api-tokens-DvqeZmVq.mjs → api-tokens-uPt8UDpx.mjs} +2 -2
- package/dist/{api-tokens-DvqeZmVq.mjs.map → api-tokens-uPt8UDpx.mjs.map} +1 -1
- package/dist/{apply-CDJqIjPU.mjs → apply-CmIJK9j8.mjs} +35 -38
- package/dist/apply-CmIJK9j8.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 +97 -13
- package/dist/astro/index.mjs.map +1 -1
- package/dist/astro/middleware/auth.d.mts +10 -10
- package/dist/astro/middleware/auth.d.mts.map +1 -1
- package/dist/astro/middleware/auth.mjs +56 -107
- package/dist/astro/middleware/auth.mjs.map +1 -1
- package/dist/astro/middleware/redirect.mjs +7 -7
- package/dist/astro/middleware/request-context.d.mts +3 -0
- package/dist/astro/middleware/request-context.d.mts.map +1 -1
- package/dist/astro/middleware/request-context.mjs +258 -31
- package/dist/astro/middleware/request-context.mjs.map +1 -1
- package/dist/astro/middleware/setup.mjs +1 -1
- package/dist/astro/middleware.d.mts +47 -3
- package/dist/astro/middleware.d.mts.map +1 -1
- package/dist/astro/middleware.mjs +379 -117
- package/dist/astro/middleware.mjs.map +1 -1
- package/dist/astro/routes/PluginRegistry.d.mts +5 -1
- package/dist/astro/routes/PluginRegistry.d.mts.map +1 -1
- package/dist/astro/routes/PluginRegistry.mjs +2 -1
- package/dist/astro/routes/PluginRegistry.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 +7 -7
- package/dist/astro/routes/api/admin/api-tokens/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/byline-fields/_slug_/usage.mjs +6 -6
- package/dist/astro/routes/api/admin/byline-fields/_slug_.mjs +11 -10
- package/dist/astro/routes/api/admin/byline-fields/_slug_.mjs.map +1 -1
- package/dist/astro/routes/api/admin/byline-fields/index.mjs +11 -10
- package/dist/astro/routes/api/admin/byline-fields/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/byline-fields/reorder.mjs +11 -10
- package/dist/astro/routes/api/admin/byline-fields/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/admin/bylines/_id_/index.mjs +18 -17
- package/dist/astro/routes/api/admin/bylines/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs +19 -24
- package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs.map +1 -1
- package/dist/astro/routes/api/admin/bylines/index.mjs +18 -17
- package/dist/astro/routes/api/admin/bylines/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/comments/_id_/status.d.mts.map +1 -1
- package/dist/astro/routes/api/admin/comments/_id_/status.mjs +14 -13
- package/dist/astro/routes/api/admin/comments/_id_/status.mjs.map +1 -1
- package/dist/astro/routes/api/admin/comments/_id_.mjs +6 -6
- package/dist/astro/routes/api/admin/comments/bulk.mjs +11 -10
- package/dist/astro/routes/api/admin/comments/bulk.mjs.map +1 -1
- package/dist/astro/routes/api/admin/comments/counts.mjs +6 -6
- package/dist/astro/routes/api/admin/comments/index.d.mts.map +1 -1
- package/dist/astro/routes/api/admin/comments/index.mjs +11 -10
- package/dist/astro/routes/api/admin/comments/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/hooks/exclusive/_hookName_.mjs +6 -6
- package/dist/astro/routes/api/admin/hooks/exclusive/index.mjs +5 -5
- package/dist/astro/routes/api/admin/media-usage/repair.d.mts +8 -0
- package/dist/astro/routes/api/admin/media-usage/repair.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/media-usage/repair.mjs +30 -0
- package/dist/astro/routes/api/admin/media-usage/repair.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.mjs +44 -41
- package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +44 -41
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +49 -41
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/mcp.d.mts +8 -0
- package/dist/astro/routes/api/admin/plugins/_id_/mcp.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/plugins/_id_/mcp.mjs +39 -0
- package/dist/astro/routes/api/admin/plugins/_id_/mcp.mjs.map +1 -0
- package/dist/astro/routes/api/admin/plugins/_id_/settings.d.mts +9 -0
- package/dist/astro/routes/api/admin/plugins/_id_/settings.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/plugins/_id_/settings.mjs +78 -0
- package/dist/astro/routes/api/admin/plugins/_id_/settings.mjs.map +1 -0
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +43 -40
- 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 +46 -41
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/index.mjs +49 -41
- 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 +43 -40
- 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 +49 -42
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +43 -40
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.mjs +43 -40
- 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 +47 -42
- package/dist/astro/routes/api/admin/plugins/registry/_id_/update.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/artifact.mjs +43 -40
- 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 +48 -43
- package/dist/astro/routes/api/admin/plugins/registry/install.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/updates.mjs +44 -41
- package/dist/astro/routes/api/admin/plugins/updates.mjs.map +1 -1
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +43 -40
- 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 +43 -40
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/users/_id_/disable.mjs +5 -5
- package/dist/astro/routes/api/admin/users/_id_/enable.mjs +4 -4
- 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/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 +7 -7
- package/dist/astro/routes/api/auth/invite/accept.mjs +4 -4
- 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 +11 -10
- 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 +13 -12
- package/dist/astro/routes/api/auth/magic-link/send.mjs.map +1 -1
- package/dist/astro/routes/api/auth/magic-link/verify.mjs +5 -5
- package/dist/astro/routes/api/auth/me.mjs +9 -8
- package/dist/astro/routes/api/auth/me.mjs.map +1 -1
- package/dist/astro/routes/api/auth/mode.d.mts.map +1 -1
- package/dist/astro/routes/api/auth/mode.mjs +6 -3
- package/dist/astro/routes/api/auth/mode.mjs.map +1 -1
- package/dist/astro/routes/api/auth/oauth/_provider_/callback.mjs +16 -6
- package/dist/astro/routes/api/auth/oauth/_provider_/callback.mjs.map +1 -1
- package/dist/astro/routes/api/auth/oauth/_provider_.d.mts.map +1 -1
- package/dist/astro/routes/api/auth/oauth/_provider_.mjs +11 -5
- package/dist/astro/routes/api/auth/oauth/_provider_.mjs.map +1 -1
- package/dist/astro/routes/api/auth/passkey/_id_.mjs +8 -7
- 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 +14 -13
- package/dist/astro/routes/api/auth/passkey/options.mjs.map +1 -1
- package/dist/astro/routes/api/auth/passkey/register/options.mjs +12 -11
- package/dist/astro/routes/api/auth/passkey/register/options.mjs.map +1 -1
- package/dist/astro/routes/api/auth/passkey/register/verify.mjs +13 -12
- package/dist/astro/routes/api/auth/passkey/register/verify.mjs.map +1 -1
- package/dist/astro/routes/api/auth/passkey/verify.mjs +13 -12
- 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 +13 -12
- package/dist/astro/routes/api/auth/signup/request.mjs.map +1 -1
- package/dist/astro/routes/api/auth/signup/verify.mjs +4 -4
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.d.mts.map +1 -1
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs +70 -14
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs.map +1 -1
- package/dist/astro/routes/api/comments/_collection_/_contentId_/reactions.mjs +14 -13
- package/dist/astro/routes/api/comments/_collection_/_contentId_/reactions.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/compare.mjs +5 -5
- package/dist/astro/routes/api/content/_collection_/_id_/compare.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs +5 -4
- package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/duplicate.mjs +6 -5
- package/dist/astro/routes/api/content/_collection_/_id_/duplicate.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/permanent.mjs +5 -5
- package/dist/astro/routes/api/content/_collection_/_id_/permanent.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs +14 -13
- package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs +10 -8
- package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/children.d.mts +9 -0
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/children.d.mts.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/children.mjs +72 -0
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/children.mjs.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/parents.d.mts +8 -0
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/parents.d.mts.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/parents.mjs +51 -0
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/parents.mjs.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/restore.mjs +5 -4
- package/dist/astro/routes/api/content/_collection_/_id_/restore.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/revisions.mjs +5 -5
- package/dist/astro/routes/api/content/_collection_/_id_/revisions.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs +10 -8
- 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 +20 -19
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/translations.mjs +5 -5
- package/dist/astro/routes/api/content/_collection_/_id_/translations.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs +5 -4
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_.d.mts.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_.mjs +11 -9
- package/dist/astro/routes/api/content/_collection_/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/authors.mjs +5 -5
- package/dist/astro/routes/api/content/_collection_/authors.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/index.d.mts.map +1 -1
- package/dist/astro/routes/api/content/_collection_/index.mjs +12 -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 +8 -8
- 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 +19 -18
- 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 +16 -16
- package/dist/astro/routes/api/import/wordpress/media.d.mts +10 -10
- package/dist/astro/routes/api/import/wordpress/media.mjs +12 -11
- package/dist/astro/routes/api/import/wordpress/media.mjs.map +1 -1
- package/dist/astro/routes/api/import/wordpress/prepare.mjs +12 -11
- package/dist/astro/routes/api/import/wordpress/prepare.mjs.map +1 -1
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.d.mts +11 -16
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.d.mts.map +1 -1
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs +12 -11
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs.map +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.d.mts +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs +19 -18
- 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 +29 -28
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs.map +1 -1
- package/dist/astro/routes/api/manifest.mjs +8 -9
- package/dist/astro/routes/api/manifest.mjs.map +1 -1
- package/dist/astro/routes/api/mcp.d.mts.map +1 -1
- package/dist/astro/routes/api/mcp.mjs +165 -52
- package/dist/astro/routes/api/mcp.mjs.map +1 -1
- package/dist/astro/routes/api/media/_id_/confirm.mjs +10 -9
- package/dist/astro/routes/api/media/_id_/confirm.mjs.map +1 -1
- package/dist/astro/routes/api/media/_id_/usage.d.mts +8 -0
- package/dist/astro/routes/api/media/_id_/usage.d.mts.map +1 -0
- package/dist/astro/routes/api/media/_id_/usage.mjs +37 -0
- package/dist/astro/routes/api/media/_id_/usage.mjs.map +1 -0
- package/dist/astro/routes/api/media/_id_.d.mts.map +1 -1
- package/dist/astro/routes/api/media/_id_.mjs +26 -10
- package/dist/astro/routes/api/media/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/media/file/_...key_.mjs +4 -3
- package/dist/astro/routes/api/media/file/_...key_.mjs.map +1 -1
- 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.d.mts.map +1 -1
- package/dist/astro/routes/api/media.mjs +34 -14
- package/dist/astro/routes/api/media.mjs.map +1 -1
- package/dist/astro/routes/api/menus/_name_/items/_id_.mjs +10 -9
- package/dist/astro/routes/api/menus/_name_/items/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/menus/_name_/items.mjs +10 -9
- package/dist/astro/routes/api/menus/_name_/items.mjs.map +1 -1
- package/dist/astro/routes/api/menus/_name_/reorder.mjs +10 -9
- package/dist/astro/routes/api/menus/_name_/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/menus/_name_/translations.mjs +10 -9
- package/dist/astro/routes/api/menus/_name_/translations.mjs.map +1 -1
- package/dist/astro/routes/api/menus/_name_.mjs +10 -9
- package/dist/astro/routes/api/menus/_name_.mjs.map +1 -1
- package/dist/astro/routes/api/menus/index.mjs +10 -9
- package/dist/astro/routes/api/menus/index.mjs.map +1 -1
- package/dist/astro/routes/api/oauth/authorize.d.mts.map +1 -1
- package/dist/astro/routes/api/oauth/authorize.mjs +7 -8
- package/dist/astro/routes/api/oauth/authorize.mjs.map +1 -1
- 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 +71 -24
- 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 +20 -32
- package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs.map +1 -1
- package/dist/astro/routes/api/redirects/404s/index.mjs +13 -12
- package/dist/astro/routes/api/redirects/404s/index.mjs.map +1 -1
- package/dist/astro/routes/api/redirects/404s/summary.mjs +13 -12
- package/dist/astro/routes/api/redirects/404s/summary.mjs.map +1 -1
- package/dist/astro/routes/api/redirects/_id_.mjs +14 -13
- package/dist/astro/routes/api/redirects/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/redirects/index.mjs +14 -13
- package/dist/astro/routes/api/redirects/index.mjs.map +1 -1
- package/dist/astro/routes/api/relations/_id_/index.d.mts +10 -0
- package/dist/astro/routes/api/relations/_id_/index.d.mts.map +1 -0
- package/dist/astro/routes/api/relations/_id_/index.mjs +70 -0
- package/dist/astro/routes/api/relations/_id_/index.mjs.map +1 -0
- package/dist/astro/routes/api/relations/_id_/translations.d.mts +8 -0
- package/dist/astro/routes/api/relations/_id_/translations.d.mts.map +1 -0
- package/dist/astro/routes/api/relations/_id_/translations.mjs +34 -0
- package/dist/astro/routes/api/relations/_id_/translations.mjs.map +1 -0
- package/dist/astro/routes/api/relations/index.d.mts +9 -0
- package/dist/astro/routes/api/relations/index.d.mts.map +1 -0
- package/dist/astro/routes/api/relations/index.mjs +54 -0
- package/dist/astro/routes/api/relations/index.mjs.map +1 -0
- package/dist/astro/routes/api/revisions/_revisionId_/index.mjs +4 -4
- package/dist/astro/routes/api/revisions/_revisionId_/restore.mjs +5 -4
- package/dist/astro/routes/api/revisions/_revisionId_/restore.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.d.mts.map +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs +43 -40
- package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/fields/index.d.mts.map +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs +43 -40
- 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 +43 -40
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +43 -40
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/index.mjs +43 -40
- package/dist/astro/routes/api/schema/collections/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/index.mjs +9 -9
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs +43 -40
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs.map +1 -1
- package/dist/astro/routes/api/schema/orphans/index.mjs +43 -40
- package/dist/astro/routes/api/schema/orphans/index.mjs.map +1 -1
- package/dist/astro/routes/api/search/enable.mjs +13 -12
- package/dist/astro/routes/api/search/enable.mjs.map +1 -1
- package/dist/astro/routes/api/search/index.mjs +14 -12
- package/dist/astro/routes/api/search/index.mjs.map +1 -1
- package/dist/astro/routes/api/search/rebuild.mjs +13 -12
- package/dist/astro/routes/api/search/rebuild.mjs.map +1 -1
- package/dist/astro/routes/api/search/stats.mjs +8 -8
- package/dist/astro/routes/api/search/suggest.mjs +12 -11
- package/dist/astro/routes/api/search/suggest.mjs.map +1 -1
- package/dist/astro/routes/api/sections/_slug_.mjs +12 -11
- package/dist/astro/routes/api/sections/_slug_.mjs.map +1 -1
- package/dist/astro/routes/api/sections/index.mjs +12 -11
- package/dist/astro/routes/api/sections/index.mjs.map +1 -1
- package/dist/astro/routes/api/settings/backups/archives/_name_.d.mts +9 -0
- package/dist/astro/routes/api/settings/backups/archives/_name_.d.mts.map +1 -0
- package/dist/astro/routes/api/settings/backups/archives/_name_.mjs +48 -0
- package/dist/astro/routes/api/settings/backups/archives/_name_.mjs.map +1 -0
- package/dist/astro/routes/api/settings/backups/archives/index.d.mts +8 -0
- package/dist/astro/routes/api/settings/backups/archives/index.d.mts.map +1 -0
- package/dist/astro/routes/api/settings/backups/archives/index.mjs +23 -0
- package/dist/astro/routes/api/settings/backups/archives/index.mjs.map +1 -0
- package/dist/astro/routes/api/settings/backups/export.d.mts +8 -0
- package/dist/astro/routes/api/settings/backups/export.d.mts.map +1 -0
- package/dist/astro/routes/api/settings/backups/export.mjs +35 -0
- package/dist/astro/routes/api/settings/backups/export.mjs.map +1 -0
- package/dist/astro/routes/api/settings/backups/index.d.mts +9 -0
- package/dist/astro/routes/api/settings/backups/index.d.mts.map +1 -0
- package/dist/astro/routes/api/settings/backups/index.mjs +52 -0
- package/dist/astro/routes/api/settings/backups/index.mjs.map +1 -0
- package/dist/astro/routes/api/settings/email.mjs +6 -6
- package/dist/astro/routes/api/settings.mjs +16 -15
- package/dist/astro/routes/api/settings.mjs.map +1 -1
- package/dist/astro/routes/api/setup/admin-verify.mjs +20 -16
- package/dist/astro/routes/api/setup/admin-verify.mjs.map +1 -1
- package/dist/astro/routes/api/setup/admin.mjs +19 -15
- package/dist/astro/routes/api/setup/admin.mjs.map +1 -1
- package/dist/astro/routes/api/setup/dev-bypass.mjs +29 -29
- package/dist/astro/routes/api/setup/dev-reset.mjs +4 -4
- package/dist/astro/routes/api/setup/index.mjs +31 -30
- 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 +9 -216
- package/dist/astro/routes/api/snapshot.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs +16 -15
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs +16 -15
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs +16 -15
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/index.mjs +16 -15
- package/dist/astro/routes/api/taxonomies/index.mjs.map +1 -1
- package/dist/astro/routes/api/themes/preview.mjs +7 -7
- 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.d.mts.map +1 -1
- package/dist/astro/routes/api/well-known/oauth-authorization-server.mjs +4 -3
- package/dist/astro/routes/api/well-known/oauth-authorization-server.mjs.map +1 -1
- package/dist/astro/routes/api/well-known/oauth-protected-resource.d.mts.map +1 -1
- package/dist/astro/routes/api/well-known/oauth-protected-resource.mjs +4 -3
- package/dist/astro/routes/api/well-known/oauth-protected-resource.mjs.map +1 -1
- package/dist/astro/routes/api/widget-areas/_name_/reorder.mjs +9 -8
- 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 -8
- 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 +9 -9
- package/dist/astro/routes/sitemap-_collection_.xml.mjs +12 -12
- package/dist/astro/routes/sitemap.xml.mjs +10 -10
- package/dist/astro/types.d.mts +40 -16
- 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-Dz88F_Fw.mjs → authorize-WxsiePzy.mjs} +7 -4
- package/dist/authorize-WxsiePzy.mjs.map +1 -0
- package/dist/backup-S8kFWtwD.mjs +241 -0
- package/dist/backup-S8kFWtwD.mjs.map +1 -0
- package/dist/{base64-CmWvODNW.mjs → base64-B-PsqheR.mjs} +8 -4
- package/dist/base64-B-PsqheR.mjs.map +1 -0
- package/dist/{byline-Bm8ZgUP9.mjs → byline-XEjchwzZ.mjs} +8 -8
- package/dist/{byline-Bm8ZgUP9.mjs.map → byline-XEjchwzZ.mjs.map} +1 -1
- package/dist/{byline-fields-CIx_GuN4.mjs → byline-fields-CdU_LTF1.mjs} +2 -2
- package/dist/{byline-fields-CIx_GuN4.mjs.map → byline-fields-CdU_LTF1.mjs.map} +1 -1
- package/dist/{byline-registry-BOjqDOim.mjs → byline-registry-BCuOp4UF.mjs} +3 -3
- package/dist/{byline-registry-BOjqDOim.mjs.map → byline-registry-BCuOp4UF.mjs.map} +1 -1
- package/dist/{bylines-6tm9mgQb.mjs → bylines-BJbT4gKS.mjs} +4 -4
- package/dist/{bylines-6tm9mgQb.mjs.map → bylines-BJbT4gKS.mjs.map} +1 -1
- package/dist/{bylines-CAZxGSrm.mjs → bylines-czseViYo.mjs} +8 -8
- package/dist/{bylines-CAZxGSrm.mjs.map → bylines-czseViYo.mjs.map} +1 -1
- package/dist/{cache-CEBAZjir.mjs → cache-CGCd6AVM.mjs} +3 -3
- package/dist/{cache-CEBAZjir.mjs.map → cache-CGCd6AVM.mjs.map} +1 -1
- package/dist/{challenge-store-anhwVER0.mjs → challenge-store-BFzgFRog.mjs} +1 -1
- package/dist/{challenge-store-anhwVER0.mjs.map → challenge-store-BFzgFRog.mjs.map} +1 -1
- package/dist/{chunks-B2isWQhr.mjs → chunks-BxXyunY-.mjs} +2 -2
- package/dist/{chunks-B2isWQhr.mjs.map → chunks-BxXyunY-.mjs.map} +1 -1
- package/dist/cli/index.mjs +142 -35
- package/dist/cli/index.mjs.map +1 -1
- package/dist/client/cf-access.d.mts +1 -1
- package/dist/client/index.d.mts +86 -3
- package/dist/client/index.d.mts.map +1 -1
- package/dist/client/index.mjs +20 -4
- package/dist/client/index.mjs.map +1 -1
- package/dist/{comment-CzeatwBV.mjs → comment-DPT0WKyd.mjs} +2 -2
- package/dist/{comment-CzeatwBV.mjs.map → comment-DPT0WKyd.mjs.map} +1 -1
- package/dist/{comment-reaction-Cj9QJY7I.mjs → comment-reaction-C65MldIB.mjs} +2 -2
- package/dist/{comment-reaction-Cj9QJY7I.mjs.map → comment-reaction-C65MldIB.mjs.map} +1 -1
- package/dist/{comments-BLE-jv5k.mjs → comments-Bz6sCbgD.mjs} +3 -3
- package/dist/{comments-BLE-jv5k.mjs.map → comments-Bz6sCbgD.mjs.map} +1 -1
- package/dist/{components-B_sATNUc.mjs → components-DZkL4Fx0.mjs} +1 -1
- package/dist/{components-B_sATNUc.mjs.map → components-DZkL4Fx0.mjs.map} +1 -1
- package/dist/{content-DhgEth4k.mjs → content-Ci04z2z-.mjs} +227 -34
- package/dist/content-Ci04z2z-.mjs.map +1 -0
- package/dist/{content-refresh-Br4gMzh8.mjs → content-refresh-D4khvC0R.mjs} +100 -8
- package/dist/content-refresh-D4khvC0R.mjs.map +1 -0
- package/dist/{context-BRIpHARC.mjs → context-B6hc7zJL.mjs} +156 -76
- package/dist/context-B6hc7zJL.mjs.map +1 -0
- package/dist/{cron-v4FTEFR_.mjs → cron-BlKIMD_e.mjs} +1 -1
- package/dist/{cron-v4FTEFR_.mjs.map → cron-BlKIMD_e.mjs.map} +1 -1
- package/dist/{dashboard-EvEKF5en.mjs → dashboard-C5NkXFbi.mjs} +6 -5
- package/dist/dashboard-C5NkXFbi.mjs.map +1 -0
- package/dist/database/pg-migration-lock.d.mts +21 -0
- package/dist/database/pg-migration-lock.d.mts.map +1 -0
- package/dist/database/pg-migration-lock.mjs +45 -0
- package/dist/database/pg-migration-lock.mjs.map +1 -0
- package/dist/db/index.d.mts +3 -3
- package/dist/db/index.mjs +2 -2
- package/dist/db/index.mjs.map +1 -1
- package/dist/db/libsql.d.mts +1 -1
- package/dist/db/postgres.d.mts +1 -1
- package/dist/db/postgres.d.mts.map +1 -1
- package/dist/db/postgres.mjs +2 -8
- package/dist/db/postgres.mjs.map +1 -1
- package/dist/db/sqlite.d.mts +1 -1
- package/dist/{db-errors-CK46D-ly.mjs → db-errors-CcWLaRiR.mjs} +4 -2
- package/dist/db-errors-CcWLaRiR.mjs.map +1 -0
- package/dist/{default-CM_D83Mg.mjs → default-C4v9KP56.mjs} +1 -1
- package/dist/{default-CM_D83Mg.mjs.map → default-C4v9KP56.mjs.map} +1 -1
- package/dist/{device-flow-CfGP18Uw.mjs → device-flow-BeA6lUS1.mjs} +6 -7
- package/dist/device-flow-BeA6lUS1.mjs.map +1 -0
- package/dist/dialect-helpers-HxEQGl_1.mjs +175 -0
- package/dist/dialect-helpers-HxEQGl_1.mjs.map +1 -0
- package/dist/{email-console-CIf4Lfvv.mjs → email-console-C-9Ng8DM.mjs} +1 -1
- package/dist/{email-console-CIf4Lfvv.mjs.map → email-console-C-9Ng8DM.mjs.map} +1 -1
- package/dist/{enrich-BQ0mxJRs.mjs → enrich-CFJJgxs_.mjs} +2 -2
- package/dist/{enrich-BQ0mxJRs.mjs.map → enrich-CFJJgxs_.mjs.map} +1 -1
- package/dist/error-CEGF6UZb.mjs +90 -0
- package/dist/error-CEGF6UZb.mjs.map +1 -0
- package/dist/{error-CkAseSqZ.mjs → errors-DtEXIQQV.mjs} +24 -84
- package/dist/errors-DtEXIQQV.mjs.map +1 -0
- package/dist/{escape-DqD0aCKu.mjs → escape-CFedIB1C.mjs} +1 -1
- package/dist/{escape-DqD0aCKu.mjs.map → escape-CFedIB1C.mjs.map} +1 -1
- package/dist/{field-defs-cache-WUI88LX5.mjs → field-defs-cache-DvmlgP-D.mjs} +5 -5
- package/dist/{field-defs-cache-WUI88LX5.mjs.map → field-defs-cache-DvmlgP-D.mjs.map} +1 -1
- package/dist/{fts-manager-BbFaF_V8.mjs → fts-manager-DzqIBrrW.mjs} +27 -3
- package/dist/{fts-manager-BbFaF_V8.mjs.map → fts-manager-DzqIBrrW.mjs.map} +1 -1
- package/dist/{hash-DrvzIXcz.mjs → hash-DFFrkivP.mjs} +1 -1
- package/dist/{hash-DrvzIXcz.mjs.map → hash-DFFrkivP.mjs.map} +1 -1
- package/dist/hreflang-CIxH_LKz.d.mts +48 -0
- package/dist/hreflang-CIxH_LKz.d.mts.map +1 -0
- package/dist/hreflang-db2Tpb2o.mjs +102 -0
- package/dist/hreflang-db2Tpb2o.mjs.map +1 -0
- package/dist/{import-fYLf14Co.mjs → import-Dmkm8S1W.mjs} +6 -6
- package/dist/{import-fYLf14Co.mjs.map → import-Dmkm8S1W.mjs.map} +1 -1
- package/dist/{index-Bm-Gy8Mh.d.mts → index-BEui-cRd.d.mts} +3 -3
- package/dist/{index-Bm-Gy8Mh.d.mts.map → index-BEui-cRd.d.mts.map} +1 -1
- package/dist/{index-B9sIxwe4.d.mts → index-wYnC6u4o.d.mts} +881 -22
- package/dist/index-wYnC6u4o.d.mts.map +1 -0
- package/dist/index.d.mts +19 -19
- package/dist/index.mjs +69 -64
- package/dist/{init-lock-6b309ZrF.mjs → init-lock-DJkX6Hto.mjs} +1 -1
- package/dist/{init-lock-6b309ZrF.mjs.map → init-lock-DJkX6Hto.mjs.map} +1 -1
- package/dist/{load-Djn3HWQS.mjs → load-Cx27ki1l.mjs} +2 -2
- package/dist/{load-Djn3HWQS.mjs.map → load-Cx27ki1l.mjs.map} +1 -1
- package/dist/{loader-CB6YHeul.mjs → loader-Be3ouI5L.mjs} +170 -21
- package/dist/loader-Be3ouI5L.mjs.map +1 -0
- package/dist/{manifest-schema-BHlgZM1W.mjs → manifest-schema-bCq54i7F.mjs} +18 -2
- package/dist/manifest-schema-bCq54i7F.mjs.map +1 -0
- package/dist/media/image-endpoint.d.mts +30 -2
- package/dist/media/image-endpoint.d.mts.map +1 -1
- package/dist/media/image-endpoint.mjs +30 -4
- package/dist/media/image-endpoint.mjs.map +1 -1
- package/dist/media/index.d.mts +1 -1
- package/dist/media/index.mjs +2 -2
- package/dist/media/local-runtime.d.mts +12 -12
- package/dist/media/local-runtime.mjs +8 -8
- package/dist/{media-BrXIaMFN.mjs → media-BjhhENaJ.mjs} +2 -2
- package/dist/media-BjhhENaJ.mjs.map +1 -0
- package/dist/{media-allowlist-CRHEeJ_i.mjs → media-allowlist-jUppPWFy.mjs} +2 -2
- package/dist/{media-allowlist-CRHEeJ_i.mjs.map → media-allowlist-jUppPWFy.mjs.map} +1 -1
- package/dist/media-kIV1IxFf.mjs +243 -0
- package/dist/media-kIV1IxFf.mjs.map +1 -0
- package/dist/media-upload-D2wk3EIt.mjs +145 -0
- package/dist/media-upload-D2wk3EIt.mjs.map +1 -0
- package/dist/{media-url-CKi5XSw4.mjs → media-url-BCm5vBn6.mjs} +1 -1
- package/dist/{media-url-CKi5XSw4.mjs.map → media-url-BCm5vBn6.mjs.map} +1 -1
- package/dist/media-usage-CljdO1mc.mjs +554 -0
- package/dist/media-usage-CljdO1mc.mjs.map +1 -0
- package/dist/{menus-b2T4clbO.mjs → menus-BcyElFtI.mjs} +177 -15
- package/dist/menus-BcyElFtI.mjs.map +1 -0
- package/dist/{menus-Cfivc2Ad.mjs → menus-CZyG6rvx.mjs} +3 -3
- package/dist/{menus-Cfivc2Ad.mjs.map → menus-CZyG6rvx.mjs.map} +1 -1
- package/dist/{mime-CCEzze7W.mjs → mime-DfIVjNkr.mjs} +1 -1
- package/dist/{mime-CCEzze7W.mjs.map → mime-DfIVjNkr.mjs.map} +1 -1
- package/dist/{mode-BM9QgEmt.mjs → mode-fiXRMfeA.mjs} +1 -1
- package/dist/{mode-BM9QgEmt.mjs.map → mode-fiXRMfeA.mjs.map} +1 -1
- package/dist/{normalize-CeglrBT9.mjs → normalize-C-SHXmra.mjs} +1 -1
- package/dist/{normalize-CeglrBT9.mjs.map → normalize-C-SHXmra.mjs.map} +1 -1
- package/dist/{oauth-authorization-CXWkIGT4.mjs → oauth-authorization-oqfbBuMH.mjs} +6 -7
- package/dist/oauth-authorization-oqfbBuMH.mjs.map +1 -0
- package/dist/{oauth-clients-BmTI5rsl.mjs → oauth-clients-BlrUHAsf.mjs} +1 -1
- package/dist/{oauth-clients-BmTI5rsl.mjs.map → oauth-clients-BlrUHAsf.mjs.map} +1 -1
- package/dist/{oauth-state-store-YLFLcH5F.mjs → oauth-state-store-DnvjRMy6.mjs} +2 -1
- package/dist/{oauth-state-store-YLFLcH5F.mjs.map → oauth-state-store-DnvjRMy6.mjs.map} +1 -1
- package/dist/{oauth-user-lookup-Bsc_GsX-.mjs → oauth-user-lookup-oUllxvAv.mjs} +1 -1
- package/dist/{oauth-user-lookup-Bsc_GsX-.mjs.map → oauth-user-lookup-oUllxvAv.mjs.map} +1 -1
- package/dist/object-cache/memory.d.mts +1 -1
- package/dist/{options-DTTML-Tx.mjs → options-BlmBHTvX.mjs} +1 -1
- package/dist/{options-DTTML-Tx.mjs.map → options-BlmBHTvX.mjs.map} +1 -1
- package/dist/{options-iMpRRxIe.d.mts → options-BqMkWfYa.d.mts} +6 -6
- package/dist/{options-iMpRRxIe.d.mts.map → options-BqMkWfYa.d.mts.map} +1 -1
- package/dist/page/index.d.mts +2 -2
- package/dist/page/index.d.mts.map +1 -1
- package/dist/page/index.mjs.map +1 -1
- package/dist/{parse-GmjecGct.mjs → parse-C_-6klII.mjs} +4 -12
- package/dist/{parse-GmjecGct.mjs.map → parse-C_-6klII.mjs.map} +1 -1
- package/dist/{passkey-config-De0ahnRg.mjs → passkey-config-C-SKpc0-.mjs} +1 -1
- package/dist/{passkey-config-De0ahnRg.mjs.map → passkey-config-C-SKpc0-.mjs.map} +1 -1
- package/dist/{patterns-BKmjvM7K.mjs → patterns-CiyXeDgr.mjs} +1 -1
- package/dist/{patterns-BKmjvM7K.mjs.map → patterns-CiyXeDgr.mjs.map} +1 -1
- package/dist/{placeholder-BSKwzRe4.d.mts → placeholder-Dop47JMM.d.mts} +1 -1
- package/dist/{placeholder-BSKwzRe4.d.mts.map → placeholder-Dop47JMM.d.mts.map} +1 -1
- package/dist/plugin-types.d.mts +21 -2
- package/dist/plugin-types.d.mts.map +1 -1
- package/dist/plugin-utils.d.mts +18 -16
- package/dist/plugin-utils.d.mts.map +1 -1
- package/dist/plugin-utils.mjs +8 -6
- package/dist/plugin-utils.mjs.map +1 -1
- package/dist/plugins/adapt-sandbox-entry.d.mts +10 -10
- package/dist/plugins/adapt-sandbox-entry.d.mts.map +1 -1
- package/dist/plugins/adapt-sandbox-entry.mjs +15 -3
- package/dist/plugins/adapt-sandbox-entry.mjs.map +1 -1
- package/dist/{portable-text-cCa0cGV6.mjs → portable-text-sDj92Kxv.mjs} +1 -1
- package/dist/{portable-text-cCa0cGV6.mjs.map → portable-text-sDj92Kxv.mjs.map} +1 -1
- package/dist/{preview-SSXNVPAC.mjs → preview-D4Jnbfx7.mjs} +2 -2
- package/dist/{preview-SSXNVPAC.mjs.map → preview-D4Jnbfx7.mjs.map} +1 -1
- package/dist/{public-url-Danv47cS.mjs → public-url-DSGTnJFw.mjs} +5 -3
- package/dist/public-url-DSGTnJFw.mjs.map +1 -0
- package/dist/{query-1Cp6U9oo.mjs → query-DR73ZNfm.mjs} +15 -15
- package/dist/query-DR73ZNfm.mjs.map +1 -0
- package/dist/{schema-CX9cfNkZ.mjs → query-Di7DOmPV.mjs} +5 -10
- package/dist/query-Di7DOmPV.mjs.map +1 -0
- package/dist/{rate-limit-C_Lf63Dd.mjs → rate-limit-CMj83JNW.mjs} +2 -2
- package/dist/{rate-limit-C_Lf63Dd.mjs.map → rate-limit-CMj83JNW.mjs.map} +1 -1
- package/dist/{redirect-CoW3G-0U.mjs → redirect-Botom7X6.mjs} +1 -1
- package/dist/{redirect-CoW3G-0U.mjs.map → redirect-Botom7X6.mjs.map} +1 -1
- package/dist/{redirect-IyfNirgS.mjs → redirect-CgLPYflR.mjs} +11 -5
- package/dist/redirect-CgLPYflR.mjs.map +1 -0
- package/dist/{redirects-Bs1g42Ri.mjs → redirects-B7t9bKsL.mjs} +6 -6
- package/dist/{redirects-Bs1g42Ri.mjs.map → redirects-B7t9bKsL.mjs.map} +1 -1
- package/dist/{redirects-DXEXBAII.mjs → redirects-BBq3n2Rj.mjs} +10 -143
- package/dist/redirects-BBq3n2Rj.mjs.map +1 -0
- package/dist/{registry-B57vp_X9.mjs → registry-FV15nLge.mjs} +99 -10
- package/dist/registry-FV15nLge.mjs.map +1 -0
- package/dist/relation-9M9j_UWo.mjs +334 -0
- package/dist/relation-9M9j_UWo.mjs.map +1 -0
- package/dist/{byline-fields-2Lp5Hbgf.mjs → relations-5_avdrN_.mjs} +60 -4
- package/dist/relations-5_avdrN_.mjs.map +1 -0
- package/dist/relations-BKvO39-9.mjs +397 -0
- package/dist/relations-BKvO39-9.mjs.map +1 -0
- package/dist/{byline-fields-CHE8UStY.d.mts → relations-Bh8jlFsU.d.mts} +486 -31
- package/dist/relations-Bh8jlFsU.d.mts.map +1 -0
- package/dist/{request-cache-KCNHp_RJ.mjs → request-cache-BSUptuJR.mjs} +1 -1
- package/dist/{request-cache-KCNHp_RJ.mjs.map → request-cache-BSUptuJR.mjs.map} +1 -1
- package/dist/{request-meta-DbvXaAvU.mjs → request-meta-DzXYYI-n.mjs} +2 -2
- package/dist/{request-meta-DbvXaAvU.mjs.map → request-meta-DzXYYI-n.mjs.map} +1 -1
- package/dist/{resolve-DR3wqMTy.mjs → resolve-Cd9dzclN.mjs} +1 -1
- package/dist/{resolve-DR3wqMTy.mjs.map → resolve-Cd9dzclN.mjs.map} +1 -1
- package/dist/{runner-DvFWoz8-.d.mts → runner-Dd8m8k9F.d.mts} +8 -2
- package/dist/runner-Dd8m8k9F.d.mts.map +1 -0
- package/dist/{runner-K8XK101B.mjs → runner-DfnZ5eUr.mjs} +355 -204
- package/dist/runner-DfnZ5eUr.mjs.map +1 -0
- package/dist/runtime.d.mts +11 -11
- package/dist/runtime.mjs +4 -4
- package/dist/schema-BXxlHeAf.mjs +9 -0
- package/dist/schema-BXxlHeAf.mjs.map +1 -0
- package/dist/scopes-Bl4IwHA-.mjs +27 -0
- package/dist/scopes-Bl4IwHA-.mjs.map +1 -0
- package/dist/{search-DZN2HZ-V.mjs → search-Bff-7jFt.mjs} +62 -12
- package/dist/search-Bff-7jFt.mjs.map +1 -0
- package/dist/{secrets-kp760LlD.mjs → secrets-CSwQIl4q.mjs} +4 -4
- package/dist/{secrets-kp760LlD.mjs.map → secrets-CSwQIl4q.mjs.map} +1 -1
- package/dist/{sections-CpF5SaGr.mjs → sections-CwW4s1al.mjs} +3 -3
- package/dist/{sections-CpF5SaGr.mjs.map → sections-CwW4s1al.mjs.map} +1 -1
- package/dist/seed/index.d.mts +2 -2
- package/dist/seed/index.mjs +23 -23
- package/dist/seo/index.d.mts +15 -2
- package/dist/seo/index.d.mts.map +1 -1
- package/dist/seo/index.mjs +22 -5
- package/dist/seo/index.mjs.map +1 -1
- package/dist/{seo-DXu2UQnC.mjs → seo-2cmFHZns.mjs} +2 -2
- package/dist/{seo-DXu2UQnC.mjs.map → seo-2cmFHZns.mjs.map} +1 -1
- package/dist/{seo-89-53DDs.mjs → seo-C3GDfT0V.mjs} +1 -1
- package/dist/{seo-89-53DDs.mjs.map → seo-C3GDfT0V.mjs.map} +1 -1
- package/dist/{service-DQmiBMzt.mjs → service-DkGTWGIi.mjs} +3 -3
- package/dist/{service-DQmiBMzt.mjs.map → service-DkGTWGIi.mjs.map} +1 -1
- package/dist/{session-user-Cascbax7.mjs → session-user-DbHqKDKe.mjs} +1 -1
- package/dist/{session-user-Cascbax7.mjs.map → session-user-DbHqKDKe.mjs.map} +1 -1
- package/dist/{settings-rZyHEcNT.mjs → settings-C4s8hFQm.mjs} +3 -3
- package/dist/{settings-rZyHEcNT.mjs.map → settings-C4s8hFQm.mjs.map} +1 -1
- package/dist/{settings-zhmdKyJQ.mjs → settings-CpA4lQFt.mjs} +6 -6
- package/dist/{settings-zhmdKyJQ.mjs.map → settings-CpA4lQFt.mjs.map} +1 -1
- package/dist/{setup-complete-Cb3LRyzy.mjs → setup-complete-CdIlqloh.mjs} +2 -2
- package/dist/{setup-complete-Cb3LRyzy.mjs.map → setup-complete-CdIlqloh.mjs.map} +1 -1
- package/dist/{setup-nonce-Z8x0tHf8.mjs → setup-nonce-DqiIPr-J.mjs} +1 -1
- package/dist/{setup-nonce-Z8x0tHf8.mjs.map → setup-nonce-DqiIPr-J.mjs.map} +1 -1
- package/dist/{single-flight-cache-BG3B_GhN.mjs → single-flight-cache-C2exrGAi.mjs} +2 -2
- package/dist/{single-flight-cache-BG3B_GhN.mjs.map → single-flight-cache-C2exrGAi.mjs.map} +1 -1
- package/dist/{site-url-BBfDTgZB.mjs → site-url-NGJT6NTU.mjs} +2 -2
- package/dist/{site-url-BBfDTgZB.mjs.map → site-url-NGJT6NTU.mjs.map} +1 -1
- package/dist/{slugify-Cce3dTdg.mjs → slugify-C_tqlU4G.mjs} +1 -1
- package/dist/{slugify-Cce3dTdg.mjs.map → slugify-C_tqlU4G.mjs.map} +1 -1
- package/dist/snapshot-BdpUJKD-.mjs +216 -0
- package/dist/snapshot-BdpUJKD-.mjs.map +1 -0
- package/dist/{ssrf-1g7usGBg.mjs → ssrf-CviKqWmq.mjs} +1 -1
- package/dist/{ssrf-1g7usGBg.mjs.map → ssrf-CviKqWmq.mjs.map} +1 -1
- package/dist/state-xxv6ZTMv.mjs +128 -0
- package/dist/state-xxv6ZTMv.mjs.map +1 -0
- package/dist/{status-CqJQX1QN.mjs → status-COfycGIU.mjs} +1 -1
- package/dist/{status-CqJQX1QN.mjs.map → status-COfycGIU.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-Bs13SN-F.mjs → taxonomies-Ce49uIzY.mjs} +13 -9
- package/dist/taxonomies-Ce49uIzY.mjs.map +1 -0
- package/dist/{taxonomies-kH9ABDUF.mjs → taxonomies-DjSKBZpq.mjs} +115 -36
- package/dist/taxonomies-DjSKBZpq.mjs.map +1 -0
- package/dist/{taxonomy-BxGxZZdu.mjs → taxonomy-DfVooU4W.mjs} +60 -13
- package/dist/taxonomy-DfVooU4W.mjs.map +1 -0
- package/dist/{tokens-BGT0TUUo.mjs → tokens-DVltpO2D.mjs} +2 -2
- package/dist/{tokens-BGT0TUUo.mjs.map → tokens-DVltpO2D.mjs.map} +1 -1
- package/dist/{transaction-qfqpPVpu.mjs → transaction-D0FOsb3X.mjs} +1 -1
- package/dist/{transaction-qfqpPVpu.mjs.map → transaction-D0FOsb3X.mjs.map} +1 -1
- package/dist/{transport-DPefPMcz.mjs → transport-CKrlqSpD.mjs} +1 -1
- package/dist/{transport-DPefPMcz.mjs.map → transport-CKrlqSpD.mjs.map} +1 -1
- package/dist/{transport-BMDWHSgZ.d.mts → transport-Vd7VdqHv.d.mts} +1 -1
- package/dist/{transport-BMDWHSgZ.d.mts.map → transport-Vd7VdqHv.d.mts.map} +1 -1
- package/dist/{trusted-proxy-VTPRiX2s.mjs → trusted-proxy-CwjQj0YG.mjs} +1 -1
- package/dist/{trusted-proxy-VTPRiX2s.mjs.map → trusted-proxy-CwjQj0YG.mjs.map} +1 -1
- package/dist/{types-CgvhU-hF.d.mts → types-B4vm81VH.d.mts} +1 -1
- package/dist/{types-CgvhU-hF.d.mts.map → types-B4vm81VH.d.mts.map} +1 -1
- package/dist/{types-ea9sAPck.d.mts → types-B97jg3aW.d.mts} +6 -1
- package/dist/{types-ea9sAPck.d.mts.map → types-B97jg3aW.d.mts.map} +1 -1
- package/dist/{types-Jo3UYd6b.mjs → types-BD40g7zz.mjs} +1 -1
- package/dist/{types-Jo3UYd6b.mjs.map → types-BD40g7zz.mjs.map} +1 -1
- package/dist/{types-DmHk7vAt.d.mts → types-BNfPHfay.d.mts} +1 -1
- package/dist/{types-DmHk7vAt.d.mts.map → types-BNfPHfay.d.mts.map} +1 -1
- package/dist/{types-BcLUUbbR.d.mts → types-BfYUPJdP.d.mts} +11 -3
- package/dist/{types-BcLUUbbR.d.mts.map → types-BfYUPJdP.d.mts.map} +1 -1
- package/dist/{types-CGbYowGQ.d.mts → types-BvB7gDOD.d.mts} +90 -4
- package/dist/types-BvB7gDOD.d.mts.map +1 -0
- package/dist/{types-vgEWF18A.d.mts → types-C7U0HlEr.d.mts} +1 -1
- package/dist/{types-vgEWF18A.d.mts.map → types-C7U0HlEr.d.mts.map} +1 -1
- package/dist/{types-CuW0zWDA.mjs → types-D1iJ3DpO.mjs} +3 -3
- package/dist/{types-CuW0zWDA.mjs.map → types-D1iJ3DpO.mjs.map} +1 -1
- package/dist/{types-_HFLRzTn.d.mts → types-DPKhI5ib.d.mts} +9 -1
- package/dist/types-DPKhI5ib.d.mts.map +1 -0
- package/dist/{types-g_aFIdW0.d.mts → types-Kmaxdarz.d.mts} +1 -1
- package/dist/{types-g_aFIdW0.d.mts.map → types-Kmaxdarz.d.mts.map} +1 -1
- package/dist/{types-ClUkdbWb.d.mts → types-iVeZ5g6N.d.mts} +1 -1
- package/dist/{types-ClUkdbWb.d.mts.map → types-iVeZ5g6N.d.mts.map} +1 -1
- package/dist/{types-tM44hEcf.mjs → types-o7xo7VgH.mjs} +1 -1
- package/dist/{types-tM44hEcf.mjs.map → types-o7xo7VgH.mjs.map} +1 -1
- package/dist/{user-BjAOvU3Z.mjs → user-Bh-L1qo6.mjs} +3 -3
- package/dist/{user-BjAOvU3Z.mjs.map → user-Bh-L1qo6.mjs.map} +1 -1
- package/dist/{utils-BJXElxdw.mjs → utils-BbUgmeZG.mjs} +3 -3
- package/dist/{utils-BJXElxdw.mjs.map → utils-BbUgmeZG.mjs.map} +1 -1
- package/dist/{validate-Z1b86_3B.d.mts → validate-DULfgpJP.d.mts} +5 -5
- package/dist/{validate-Z1b86_3B.d.mts.map → validate-DULfgpJP.d.mts.map} +1 -1
- package/dist/{validate-CWSnKVIJ.mjs → validate-V9nCwq_-.mjs} +3 -3
- package/dist/{validate-CWSnKVIJ.mjs.map → validate-V9nCwq_-.mjs.map} +1 -1
- package/dist/{validation-0l8-RYj4.mjs → validation-BsVUJfsP.mjs} +10 -10
- package/dist/{validation-0l8-RYj4.mjs.map → validation-BsVUJfsP.mjs.map} +1 -1
- package/dist/version-907opKac.mjs +7 -0
- package/dist/{version-qmeO1XZY.mjs.map → version-907opKac.mjs.map} +1 -1
- package/dist/{widgets-hWcIicX8.mjs → widgets-DGv1Z04V.mjs} +4 -4
- package/dist/{widgets-hWcIicX8.mjs.map → widgets-DGv1Z04V.mjs.map} +1 -1
- package/dist/{wxr-taxonomies-0_uxSrmf.d.mts → wxr-taxonomies-B4tMuN5T.d.mts} +1 -1
- package/dist/{wxr-taxonomies-0_uxSrmf.d.mts.map → wxr-taxonomies-B4tMuN5T.d.mts.map} +1 -1
- package/dist/{wxr-taxonomies-CNFcsNCr.mjs → wxr-taxonomies-Cs1N6O8z.mjs} +4 -4
- package/dist/{wxr-taxonomies-CNFcsNCr.mjs.map → wxr-taxonomies-Cs1N6O8z.mjs.map} +1 -1
- package/dist/{zod-generator-CacrR-i8.mjs → zod-generator-B5prQ5M4.mjs} +3 -3
- package/dist/{zod-generator-CacrR-i8.mjs.map → zod-generator-B5prQ5M4.mjs.map} +1 -1
- package/package.json +12 -8
- package/src/api/authorize.ts +10 -1
- package/src/api/error.ts +5 -5
- package/src/api/errors.ts +25 -0
- package/src/api/handlers/backup.ts +312 -0
- package/src/api/handlers/content.ts +147 -3
- package/src/api/handlers/dashboard.ts +2 -0
- package/src/api/handlers/device-flow.ts +2 -3
- package/src/api/handlers/index.ts +22 -0
- package/src/api/handlers/marketplace.ts +38 -0
- package/src/api/handlers/media-upload.ts +210 -0
- package/src/api/handlers/media-usage.ts +289 -0
- package/src/api/handlers/oauth-authorization.ts +2 -6
- package/src/api/handlers/plugin-settings.ts +218 -0
- package/src/api/handlers/plugins.ts +41 -0
- package/src/api/handlers/registry.ts +39 -0
- package/src/api/handlers/relations.ts +474 -0
- package/src/api/handlers/snapshot.ts +21 -3
- package/src/api/handlers/taxonomies.ts +26 -4
- package/src/api/handlers/validate-media-fields.ts +1 -1
- package/src/api/openapi/document.ts +72 -5
- package/src/api/parse.ts +2 -16
- package/src/api/public-url.ts +4 -2
- package/src/api/schemas/comments.ts +6 -0
- package/src/api/schemas/common.ts +6 -2
- package/src/api/schemas/content.ts +8 -0
- package/src/api/schemas/index.ts +2 -0
- package/src/api/schemas/media-usage.ts +120 -0
- package/src/api/schemas/media.ts +32 -1
- package/src/api/schemas/relations.ts +109 -0
- package/src/api/schemas/search.ts +1 -0
- package/src/astro/integration/index.ts +39 -0
- package/src/astro/integration/routes.ts +40 -0
- package/src/astro/integration/runtime.ts +30 -0
- package/src/astro/integration/virtual-modules.ts +41 -7
- package/src/astro/integration/vite-config.ts +17 -1
- package/src/astro/middleware/auth.ts +70 -78
- package/src/astro/middleware/csp.ts +5 -2
- package/src/astro/middleware/request-context.ts +162 -20
- package/src/astro/middleware.ts +108 -40
- package/src/astro/public-plugin-api-routes.ts +2 -1
- package/src/astro/routes/PluginRegistry.tsx +5 -2
- package/src/astro/routes/admin.astro +56 -16
- package/src/astro/routes/api/admin/api-tokens/index.ts +2 -2
- package/src/astro/routes/api/admin/bylines/[id]/translations.ts +2 -5
- package/src/astro/routes/api/admin/comments/[id]/status.ts +1 -2
- package/src/astro/routes/api/admin/comments/index.ts +1 -2
- package/src/astro/routes/api/admin/media-usage/repair.ts +24 -0
- package/src/astro/routes/api/admin/plugins/[id]/index.ts +6 -0
- package/src/astro/routes/api/admin/plugins/[id]/mcp.ts +42 -0
- package/src/astro/routes/api/admin/plugins/[id]/settings.ts +80 -0
- package/src/astro/routes/api/admin/plugins/[id]/update.ts +2 -0
- package/src/astro/routes/api/admin/plugins/index.ts +9 -0
- package/src/astro/routes/api/admin/plugins/marketplace/[id]/install.ts +2 -0
- package/src/astro/routes/api/admin/plugins/registry/[id]/update.ts +2 -0
- package/src/astro/routes/api/admin/plugins/registry/install.ts +2 -0
- package/src/astro/routes/api/admin/plugins/updates.ts +2 -4
- package/src/astro/routes/api/auth/mode.ts +6 -14
- package/src/astro/routes/api/auth/oauth/[provider]/callback.ts +21 -5
- package/src/astro/routes/api/auth/oauth/[provider].ts +24 -7
- package/src/astro/routes/api/comments/[collection]/[contentId]/index.ts +13 -0
- package/src/astro/routes/api/content/[collection]/[id]/compare.ts +3 -4
- package/src/astro/routes/api/content/[collection]/[id]/duplicate.ts +2 -3
- package/src/astro/routes/api/content/[collection]/[id]/permanent.ts +2 -3
- package/src/astro/routes/api/content/[collection]/[id]/preview-url.ts +3 -4
- package/src/astro/routes/api/content/[collection]/[id]/references/[relation]/children.ts +95 -0
- package/src/astro/routes/api/content/[collection]/[id]/references/[relation]/parents.ts +47 -0
- package/src/astro/routes/api/content/[collection]/[id]/revisions.ts +3 -4
- package/src/astro/routes/api/content/[collection]/[id]/terms/[taxonomy].ts +4 -6
- package/src/astro/routes/api/content/[collection]/[id]/translations.ts +3 -4
- package/src/astro/routes/api/content/[collection]/[id].ts +3 -4
- package/src/astro/routes/api/content/[collection]/authors.ts +2 -3
- package/src/astro/routes/api/content/[collection]/index.ts +6 -8
- package/src/astro/routes/api/content/[collection]/trash.ts +2 -3
- package/src/astro/routes/api/manifest.ts +2 -9
- package/src/astro/routes/api/mcp.ts +2 -1
- package/src/astro/routes/api/media/[id]/usage.ts +30 -0
- package/src/astro/routes/api/media/[id].ts +17 -6
- package/src/astro/routes/api/media/file/[...key].ts +8 -0
- package/src/astro/routes/api/media.ts +21 -2
- package/src/astro/routes/api/oauth/authorize.ts +2 -6
- package/src/astro/routes/api/plugins/[pluginId]/[...path].ts +17 -3
- package/src/astro/routes/api/relations/[id]/index.ts +84 -0
- package/src/astro/routes/api/relations/[id]/translations.ts +33 -0
- package/src/astro/routes/api/relations/index.ts +56 -0
- package/src/astro/routes/api/schema/collections/[slug]/fields/[fieldSlug].ts +1 -7
- package/src/astro/routes/api/schema/collections/[slug]/fields/index.ts +1 -2
- package/src/astro/routes/api/search/index.ts +2 -0
- package/src/astro/routes/api/settings/backups/archives/[name].ts +78 -0
- package/src/astro/routes/api/settings/backups/archives/index.ts +33 -0
- package/src/astro/routes/api/settings/backups/export.ts +43 -0
- package/src/astro/routes/api/settings/backups/index.ts +76 -0
- package/src/astro/routes/api/setup/admin-verify.ts +8 -4
- package/src/astro/routes/api/setup/admin.ts +11 -4
- package/src/astro/routes/api/well-known/oauth-authorization-server.ts +4 -1
- package/src/astro/routes/api/well-known/oauth-protected-resource.ts +5 -1
- package/src/astro/types.ts +50 -2
- package/src/auth/api-tokens.ts +1 -0
- package/src/auth/oauth-state-store.ts +3 -0
- package/src/auth/providers/github-admin.tsx +5 -6
- package/src/auth/providers/google-admin.tsx +5 -6
- package/src/auth/scopes.ts +3 -9
- package/src/cli/client-factory.ts +0 -1
- package/src/cli/commands/bundle-utils.ts +50 -1
- package/src/cli/commands/bundle.ts +9 -2
- package/src/cli/commands/export-seed.ts +1 -10
- package/src/cli/commands/media.ts +127 -0
- package/src/client/index.ts +123 -2
- package/src/client/transport.ts +1 -1
- package/src/comments/service.ts +1 -1
- package/src/comments/turnstile.ts +64 -0
- package/src/components/BlockquoteGroup.astro +34 -0
- package/src/components/CommentForm.astro +12 -5
- package/src/components/EmDashHead.astro +31 -9
- package/src/components/InlinePortableTextEditor.tsx +88 -33
- package/src/components/PortableText.astro +7 -1
- package/src/components/index.ts +2 -0
- package/src/components/marks/Link.astro +5 -1
- package/src/components/portable-text-blockquote-group.ts +68 -0
- package/src/content/converters/portable-text-to-prosemirror.ts +32 -1
- package/src/database/dialect-helpers.ts +111 -3
- package/src/database/migrations/039_fix_fts5_triggers.ts +1 -1
- package/src/database/migrations/051_content_taxonomies_denorm.ts +120 -0
- package/src/database/migrations/052_media_usage_read_index.ts +26 -0
- package/src/database/migrations/053_plugin_mcp_tools.ts +21 -0
- package/src/database/migrations/runner.ts +52 -6
- package/src/database/pg-migration-lock.ts +72 -0
- package/src/database/repositories/audit.ts +2 -1
- package/src/database/repositories/comment.ts +1 -1
- package/src/database/repositories/content.ts +270 -37
- package/src/database/repositories/media-usage.ts +250 -1
- package/src/database/repositories/media.ts +1 -1
- package/src/database/repositories/plugin-storage.ts +29 -32
- package/src/database/repositories/redirect.ts +14 -2
- package/src/database/repositories/relation.ts +130 -5
- package/src/database/repositories/taxonomy.ts +66 -8
- package/src/database/repositories/types.ts +8 -0
- package/src/database/types.ts +23 -0
- package/src/db/adapters.ts +9 -0
- package/src/db/postgres.ts +5 -2
- package/src/emdash-runtime.ts +382 -70
- package/src/index.ts +6 -2
- package/src/loader.ts +293 -32
- package/src/mcp/server.ts +251 -8
- package/src/media/image-endpoint.ts +38 -2
- package/src/page/metadata.ts +27 -0
- package/src/plugin-types.ts +19 -0
- package/src/plugin-utils.ts +8 -6
- package/src/plugins/adapt-sandbox-entry.ts +30 -1
- package/src/plugins/context.ts +92 -0
- package/src/plugins/define-plugin.ts +17 -0
- package/src/plugins/index.ts +4 -0
- package/src/plugins/manifest-schema.ts +30 -1
- package/src/plugins/routes.ts +27 -1
- package/src/plugins/sandbox/runner-options.ts +16 -0
- package/src/plugins/sandbox/types.ts +6 -1
- package/src/plugins/state.ts +17 -1
- package/src/plugins/storage-query.ts +67 -33
- package/src/plugins/types.ts +100 -0
- package/src/schema/byline-registry.ts +1 -1
- package/src/schema/registry.ts +141 -5
- package/src/search/fts-manager.ts +34 -0
- package/src/search/match.ts +50 -0
- package/src/search/query.ts +94 -9
- package/src/seed/apply.ts +28 -29
- package/src/seo/hreflang.ts +192 -0
- package/src/seo/index.ts +22 -4
- package/src/storage/types.ts +6 -0
- package/src/taxonomies/index.ts +62 -45
- package/src/taxonomies/term-counts.ts +117 -0
- package/src/utils/base64.ts +7 -2
- package/src/utils/db-errors.ts +3 -1
- package/src/virtual-modules.d.ts +14 -0
- package/src/visual-editing/editable.ts +41 -35
- package/src/visual-editing/toolbar-bootstrap.ts +120 -0
- package/src/visual-editing/toolbar.ts +47 -1
- package/dist/adapters-hUy8vOB-.d.mts.map +0 -1
- package/dist/api-DxFSorgk.mjs.map +0 -1
- package/dist/api-tokens-DsvvCtdh.mjs +0 -3
- package/dist/apply-CDJqIjPU.mjs.map +0 -1
- package/dist/authorize-Dz88F_Fw.mjs.map +0 -1
- package/dist/base64-CmWvODNW.mjs.map +0 -1
- package/dist/byline-fields-2Lp5Hbgf.mjs.map +0 -1
- package/dist/byline-fields-CHE8UStY.d.mts.map +0 -1
- package/dist/content-DhgEth4k.mjs.map +0 -1
- package/dist/content-refresh-Br4gMzh8.mjs.map +0 -1
- package/dist/context-BRIpHARC.mjs.map +0 -1
- package/dist/dashboard-EvEKF5en.mjs.map +0 -1
- package/dist/db-errors-CK46D-ly.mjs.map +0 -1
- package/dist/device-flow-CfGP18Uw.mjs.map +0 -1
- package/dist/dialect-helpers-DRI5pyY3.mjs +0 -110
- package/dist/dialect-helpers-DRI5pyY3.mjs.map +0 -1
- package/dist/error-CkAseSqZ.mjs.map +0 -1
- package/dist/index-B9sIxwe4.d.mts.map +0 -1
- package/dist/loader-CB6YHeul.mjs.map +0 -1
- package/dist/manifest-schema-BHlgZM1W.mjs.map +0 -1
- package/dist/media-BrXIaMFN.mjs.map +0 -1
- package/dist/menus-b2T4clbO.mjs.map +0 -1
- package/dist/oauth-authorization-CXWkIGT4.mjs.map +0 -1
- package/dist/public-url-Danv47cS.mjs.map +0 -1
- package/dist/query-1Cp6U9oo.mjs.map +0 -1
- package/dist/redirect-IyfNirgS.mjs.map +0 -1
- package/dist/redirects-DXEXBAII.mjs.map +0 -1
- package/dist/registry-B57vp_X9.mjs.map +0 -1
- package/dist/runner-DvFWoz8-.d.mts.map +0 -1
- package/dist/runner-K8XK101B.mjs.map +0 -1
- package/dist/scheduled-publish-Drffrf2a.d.mts +0 -11
- package/dist/scheduled-publish-Drffrf2a.d.mts.map +0 -1
- package/dist/schema-CX9cfNkZ.mjs.map +0 -1
- package/dist/search-DZN2HZ-V.mjs.map +0 -1
- package/dist/taxonomies-Bs13SN-F.mjs.map +0 -1
- package/dist/taxonomies-kH9ABDUF.mjs.map +0 -1
- package/dist/taxonomy-BxGxZZdu.mjs.map +0 -1
- package/dist/types-CGbYowGQ.d.mts.map +0 -1
- package/dist/types-_HFLRzTn.d.mts.map +0 -1
- package/dist/version-qmeO1XZY.mjs +0 -7
- /package/dist/{ssrf-CmuGgCq3.mjs → ssrf-BB__xfNM.mjs} +0 -0
- /package/dist/{types-DROWRxYV.mjs → types-CK0LxPUQ.mjs} +0 -0
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { _ as UpdateFieldInput, f as FieldValidation, g as UpdateCollectionInput, i as CollectionWithFields, o as CreateCollectionInput, s as CreateFieldInput, t as Collection, u as Field } from "./types-
|
|
2
|
-
import { f as UpdateContentInput, i as ContentItem, l as FindManyOptions, o as ContentSeoInput, r as ContentDateField, s as CreateContentInput, t as BylineSummary, u as FindManyResult } from "./types-
|
|
3
|
-
import { d as ContentListResponse, f as ContentResponse, h as ManifestResponse, u as ApiResult } from "./options-
|
|
4
|
-
import { t as Database } from "./types-
|
|
5
|
-
import {
|
|
6
|
-
import { _ as MediaValue, m as MediaProviderDescriptor } from "./placeholder-
|
|
7
|
-
import { w as ContentBylineInput } from "./index-
|
|
8
|
-
import { r as AuthProviderDescriptor, t as AuthDescriptor } from "./types-
|
|
9
|
-
import { t as DatabaseDescriptor } from "./adapters-
|
|
10
|
-
import { r as ObjectCacheDescriptor } from "./types-
|
|
11
|
-
import { d as Storage } from "./types-
|
|
12
|
-
import { i as SiteSettings, r as SiteSettingKey } from "./types-
|
|
13
|
-
import {
|
|
1
|
+
import { _ as UpdateFieldInput, f as FieldValidation, g as UpdateCollectionInput, i as CollectionWithFields, o as CreateCollectionInput, s as CreateFieldInput, t as Collection, u as Field } from "./types-Kmaxdarz.mjs";
|
|
2
|
+
import { f as UpdateContentInput, i as ContentItem, l as FindManyOptions, o as ContentSeoInput, r as ContentDateField, s as CreateContentInput, t as BylineSummary, u as FindManyResult } from "./types-BfYUPJdP.mjs";
|
|
3
|
+
import { d as ContentListResponse, f as ContentResponse, h as ManifestResponse, u as ApiResult } from "./options-BqMkWfYa.mjs";
|
|
4
|
+
import { t as Database } from "./types-DPKhI5ib.mjs";
|
|
5
|
+
import { At as StorageCollection, Ct as QueryOptions, Et as ResolvedPlugin, H as HttpAccess, O as CronEvent, R as EmailMessage, St as PublicPageContext, Z as MediaItem$1, _t as PluginMcpManifestConfig, bt as PortableTextBlockConfig, c as CommentBeforeCreateEvent, ct as PaginatedResult, et as PageFragmentContribution, ft as PluginCapability, gt as PluginManifest, i as CommentAfterCreateEvent, it as PageMetadataEvent, kt as SettingField, mt as PluginDefinition, o as CommentAfterModerateEvent, rt as PageMetadataContribution, tt as PageFragmentEvent, wt as RequestMeta, yt as PluginStorageConfig, z as FieldWidgetConfig, zt as WhereClause } from "./types-BvB7gDOD.mjs";
|
|
6
|
+
import { _ as MediaValue, f as MediaProvider, m as MediaProviderDescriptor, p as MediaProviderCapabilities } from "./placeholder-Dop47JMM.mjs";
|
|
7
|
+
import { w as ContentBylineInput } from "./index-BEui-cRd.mjs";
|
|
8
|
+
import { r as AuthProviderDescriptor, t as AuthDescriptor } from "./types-B4vm81VH.mjs";
|
|
9
|
+
import { t as DatabaseDescriptor } from "./adapters-C0ONzkUP.mjs";
|
|
10
|
+
import { r as ObjectCacheDescriptor } from "./types-iVeZ5g6N.mjs";
|
|
11
|
+
import { d as Storage } from "./types-B97jg3aW.mjs";
|
|
12
|
+
import { i as SiteSettings, r as SiteSettingKey } from "./types-BNfPHfay.mjs";
|
|
13
|
+
import { EmDashManifest } from "./astro/types.mjs";
|
|
14
|
+
import { Dialect, Kysely, sql } from "kysely";
|
|
14
15
|
import { z } from "astro/zod";
|
|
15
16
|
import { z as z$1 } from "zod";
|
|
16
17
|
import "@emdash-cms/registry-client/env";
|
|
@@ -108,6 +109,19 @@ declare class ContentRepository {
|
|
|
108
109
|
* Restore content from trash
|
|
109
110
|
*/
|
|
110
111
|
restore(type: string, id: string): Promise<ContentItem | null>;
|
|
112
|
+
/**
|
|
113
|
+
* Re-stamp the denormalized filter + sort columns on every
|
|
114
|
+
* `content_taxonomies` pivot row for an entry from its authoritative `ec_*`
|
|
115
|
+
* row (migration 051). Called after any mutation that moves one of those
|
|
116
|
+
* columns so a taxonomy-filtered listing can seek the entry directly.
|
|
117
|
+
*
|
|
118
|
+
* A single correlated `UPDATE` reads the post-mutation values from `ec_*`, so
|
|
119
|
+
* the pivot converges to the authoritative row. This is NOT atomic with the
|
|
120
|
+
* `ec_*` mutation on D1 (no transactions), which is why the read path
|
|
121
|
+
* re-checks the real predicates on the joined `ec_*` row. Untagged entries
|
|
122
|
+
* have no pivot rows, so the statement is a cheap no-op for them.
|
|
123
|
+
*/
|
|
124
|
+
private restampEntryPivot;
|
|
111
125
|
/**
|
|
112
126
|
* Permanently delete content (cannot be undone)
|
|
113
127
|
*/
|
|
@@ -133,10 +147,20 @@ declare class ContentRepository {
|
|
|
133
147
|
*/
|
|
134
148
|
countTrashed(type: string): Promise<number>;
|
|
135
149
|
/**
|
|
136
|
-
* Apply the optional
|
|
137
|
-
*
|
|
138
|
-
*
|
|
139
|
-
* SQLite
|
|
150
|
+
* Apply the optional `q` filter.
|
|
151
|
+
*
|
|
152
|
+
* When the handler sets `useFts` (collection has a healthy FTS5 index
|
|
153
|
+
* covering the display columns; SQLite only), the filter is served from
|
|
154
|
+
* the index: a token-prefix MATCH against `_emdash_fts_<slug>` OR'd with
|
|
155
|
+
* an index-served `slug GLOB 'term*'` prefix (the slug is not in the FTS
|
|
156
|
+
* index). Both sides are index-backed, so SQLite's OR optimization avoids
|
|
157
|
+
* the full-table scan the LIKE fallback needs (#1517). The trade-off is
|
|
158
|
+
* search semantics: token-prefix matching instead of arbitrary substring.
|
|
159
|
+
*
|
|
160
|
+
* Fallback (Postgres, search disabled, or no usable terms): case-
|
|
161
|
+
* insensitive substring LIKE across the handler-resolved `searchColumns`
|
|
162
|
+
* (OR'd). User input is treated literally (LIKE wildcards escaped) and
|
|
163
|
+
* `lower()` is applied on both sides for SQLite/Postgres parity.
|
|
140
164
|
*/
|
|
141
165
|
private applySearchFilter;
|
|
142
166
|
/**
|
|
@@ -161,6 +185,7 @@ declare class ContentRepository {
|
|
|
161
185
|
total: number;
|
|
162
186
|
published: number;
|
|
163
187
|
draft: number;
|
|
188
|
+
scheduled: number;
|
|
164
189
|
}>;
|
|
165
190
|
/**
|
|
166
191
|
* Schedule content for future publishing
|
|
@@ -193,6 +218,39 @@ declare class ContentRepository {
|
|
|
193
218
|
* Find all translations in a translation group
|
|
194
219
|
*/
|
|
195
220
|
findTranslations(type: string, translationGroup: string): Promise<ContentItem[]>;
|
|
221
|
+
/**
|
|
222
|
+
* Batch variant of {@link findTranslations}: every (non-deleted) locale
|
|
223
|
+
* variant for any of `translationGroups`, in one `WHERE translation_group IN
|
|
224
|
+
* (...)` query chunked at `SQL_BATCH_SIZE` for D1's bind-parameter limit.
|
|
225
|
+
* Lets callers resolve many edge groups without an N+1 per group. The caller
|
|
226
|
+
* groups the flat result by `translationGroup` itself.
|
|
227
|
+
*
|
|
228
|
+
* `publishedOnly` restricts the result to `status = 'published'` — reference
|
|
229
|
+
* reads pass this for callers without `content:read_drafts` so draft/scheduled
|
|
230
|
+
* entries never leak through an edge traversal.
|
|
231
|
+
*
|
|
232
|
+
* A reference edge stores only a collection slug (no SQL FK), so the table may
|
|
233
|
+
* have been dropped since the edge was written. That is a tolerated dangling
|
|
234
|
+
* state, not an error: a missing table resolves to no rows, mirroring how the
|
|
235
|
+
* content read handlers treat `isMissingTableError`.
|
|
236
|
+
*/
|
|
237
|
+
findTranslationsForGroups(type: string, translationGroups: string[], options?: {
|
|
238
|
+
publishedOnly?: boolean;
|
|
239
|
+
}): Promise<ContentItem[]>;
|
|
240
|
+
/**
|
|
241
|
+
* Batch variant of {@link findByIdOrSlug}: resolve many identifiers (each an
|
|
242
|
+
* id OR a slug) within `type` in a constant number of queries — one `WHERE id
|
|
243
|
+
* IN (...)` and one `WHERE slug IN (...)`, each chunked at `SQL_BATCH_SIZE`.
|
|
244
|
+
* Returns a map from the input identifier to its resolved item; identifiers
|
|
245
|
+
* that match nothing are absent. Used on write paths that accept a list of
|
|
246
|
+
* references, so a single request doesn't fan out to an N+1 of point lookups.
|
|
247
|
+
*
|
|
248
|
+
* Resolution mirrors {@link findByIdOrSlug}: a ULID-shaped identifier prefers
|
|
249
|
+
* the id match and falls back to slug; anything else prefers the slug match
|
|
250
|
+
* and falls back to id. Slug matches collapse to the lowest-locale variant
|
|
251
|
+
* (`ORDER BY locale ASC`), matching the slug-without-locale lookup.
|
|
252
|
+
*/
|
|
253
|
+
findManyByIdOrSlug(type: string, identifiers: string[]): Promise<Map<string, ContentItem>>;
|
|
196
254
|
/**
|
|
197
255
|
* Publish the current draft
|
|
198
256
|
*
|
|
@@ -737,6 +795,7 @@ declare function handleContentCreate(db: Kysely<Database>, collection: string, b
|
|
|
737
795
|
locale?: string;
|
|
738
796
|
translationOf?: string;
|
|
739
797
|
seo?: ContentSeoInput;
|
|
798
|
+
taxonomies?: Record<string, string[]>;
|
|
740
799
|
createdAt?: string | null;
|
|
741
800
|
publishedAt?: string | null;
|
|
742
801
|
}): Promise<ApiResult<ContentResponse>>;
|
|
@@ -756,6 +815,7 @@ declare function handleContentUpdate(db: Kysely<Database>, collection: string, i
|
|
|
756
815
|
locale?: string;
|
|
757
816
|
_rev?: string;
|
|
758
817
|
seo?: ContentSeoInput;
|
|
818
|
+
taxonomies?: Record<string, string[]>;
|
|
759
819
|
publishedAt?: string | null;
|
|
760
820
|
}): Promise<ApiResult<ContentResponse>>;
|
|
761
821
|
/**
|
|
@@ -966,6 +1026,10 @@ declare function handleMediaDelete(db: Kysely<Database>, id: string): Promise<Ap
|
|
|
966
1026
|
deleted: true;
|
|
967
1027
|
}>>;
|
|
968
1028
|
//#endregion
|
|
1029
|
+
//#region src/media/usage/content-refresh.d.ts
|
|
1030
|
+
type ContentMediaUsageRefreshErrorCode = "CONTENT_NOT_FOUND" | "DRAFT_REVISION_NOT_FOUND" | "DRAFT_REVISION_MISMATCH" | "DRAFT_REVISION_INVALID" | "CONTENT_USAGE_REFRESH_ERROR" | "CONTENT_USAGE_DELETE_ERROR" | "CONTENT_USAGE_GENERATION_CONFLICT" | "CONTENT_USAGE_STALE";
|
|
1031
|
+
declare function markContentMediaUsageCollectionStaleSafely(db: Kysely<Database>, collectionSlug: string, lastErrorCode: ContentMediaUsageRefreshErrorCode): Promise<boolean>;
|
|
1032
|
+
//#endregion
|
|
969
1033
|
//#region src/schema/registry.d.ts
|
|
970
1034
|
/**
|
|
971
1035
|
* Error thrown when a schema operation fails
|
|
@@ -1017,6 +1081,17 @@ declare class SchemaRegistry {
|
|
|
1017
1081
|
* Create a new collection
|
|
1018
1082
|
*/
|
|
1019
1083
|
createCollection(input: CreateCollectionInput): Promise<Collection>;
|
|
1084
|
+
/**
|
|
1085
|
+
* Create a seed-owned collection and all of its fields in bulk.
|
|
1086
|
+
*
|
|
1087
|
+
* Fresh seeds can define dozens of fields. Creating them through
|
|
1088
|
+
* `createField` performs multiple reads, one ALTER TABLE, and one media
|
|
1089
|
+
* usage invalidation per field, which can exhaust D1's per-request query
|
|
1090
|
+
* budget. This path validates the full schema before mutating it, creates
|
|
1091
|
+
* the complete content table in one statement, and inserts field metadata
|
|
1092
|
+
* in parameter-safe batches.
|
|
1093
|
+
*/
|
|
1094
|
+
createSeedCollection(input: Omit<CreateCollectionInput, "source">, fields: readonly CreateFieldInput[]): Promise<void>;
|
|
1020
1095
|
/**
|
|
1021
1096
|
* Update a collection
|
|
1022
1097
|
*/
|
|
@@ -1485,6 +1560,8 @@ interface PluginDescriptor<TOptions = Record<string, unknown>> {
|
|
|
1485
1560
|
adminPages?: PluginAdminPage[];
|
|
1486
1561
|
/** Dashboard widgets */
|
|
1487
1562
|
adminWidgets?: PluginDashboardWidget[];
|
|
1563
|
+
/** Settings schema for the auto-generated admin settings form */
|
|
1564
|
+
settingsSchema?: Record<string, SettingField>;
|
|
1488
1565
|
/**
|
|
1489
1566
|
* Portable Text block types this plugin contributes to the editor.
|
|
1490
1567
|
* Declarative (Block Kit) — surfaced in the admin slash menu and consumed
|
|
@@ -1510,6 +1587,8 @@ interface PluginDescriptor<TOptions = Record<string, unknown>> {
|
|
|
1510
1587
|
* Sandboxed plugins can only access declared collections.
|
|
1511
1588
|
*/
|
|
1512
1589
|
storage?: Record<string, StorageCollectionDeclaration>;
|
|
1590
|
+
/** Serialized MCP declarations emitted by the plugin build. */
|
|
1591
|
+
mcp?: PluginMcpManifestConfig;
|
|
1513
1592
|
}
|
|
1514
1593
|
/**
|
|
1515
1594
|
* Sandboxed plugin descriptor - same format as PluginDescriptor
|
|
@@ -1920,6 +1999,29 @@ interface EmDashConfig {
|
|
|
1920
1999
|
siteName?: string; /** URL or path to a custom favicon for the admin panel. */
|
|
1921
2000
|
favicon?: string;
|
|
1922
2001
|
};
|
|
2002
|
+
/**
|
|
2003
|
+
* Editor toolbar delivery on public pages.
|
|
2004
|
+
*
|
|
2005
|
+
* - `"server"` (default): the toolbar is injected server-side into every
|
|
2006
|
+
* HTML response rendered for an authenticated editor. Simple and
|
|
2007
|
+
* zero-config, but behind a shared cache (Cloudflare Cache Everything /
|
|
2008
|
+
* Workers Cache, Fastly, Varnish, …) editors often receive the cached
|
|
2009
|
+
* anonymous variant — without the toolbar — whenever an anonymous visitor
|
|
2010
|
+
* primed the cache first, so the toolbar appears and disappears with
|
|
2011
|
+
* cache state.
|
|
2012
|
+
* - `"client"`: public HTML is identical for everyone (nothing
|
|
2013
|
+
* session-specific is injected server-side, so shared caches stay fully
|
|
2014
|
+
* effective). A tiny bootstrap script shows an "Edit" pill for browsers
|
|
2015
|
+
* that have logged into the admin (non-secret localStorage flag). Clicking
|
|
2016
|
+
* it verifies the session and reloads the page with an `_edit` query
|
|
2017
|
+
* param, which is always rendered fresh (never cached) with the full
|
|
2018
|
+
* toolbar. Logged-out visitors opening an `_edit` URL are redirected to
|
|
2019
|
+
* the canonical URL.
|
|
2020
|
+
* - `false`: never render the toolbar or bootstrap script.
|
|
2021
|
+
*
|
|
2022
|
+
* See the visual-editing docs for the cache-behavior details.
|
|
2023
|
+
*/
|
|
2024
|
+
toolbar?: "server" | "client" | false;
|
|
1923
2025
|
/**
|
|
1924
2026
|
* Version of Astro the host project is building with. Populated by the
|
|
1925
2027
|
* integration's `astro:config:setup` hook (not authored by the user) and
|
|
@@ -1992,6 +2094,7 @@ interface SandboxOptions {
|
|
|
1992
2094
|
name: string;
|
|
1993
2095
|
url: string;
|
|
1994
2096
|
locale: string;
|
|
2097
|
+
trailingSlash?: "always" | "never" | "ignore";
|
|
1995
2098
|
};
|
|
1996
2099
|
/** Email send callback, wired from the EmailPipeline by the runtime */
|
|
1997
2100
|
emailSend?: SandboxEmailSendCallback;
|
|
@@ -2183,6 +2286,8 @@ interface SiteInfoOptions {
|
|
|
2183
2286
|
siteUrl?: string;
|
|
2184
2287
|
/** Site locale from options table */
|
|
2185
2288
|
locale?: string;
|
|
2289
|
+
/** Astro's `trailingSlash` config (from `virtual:emdash/config`). */
|
|
2290
|
+
trailingSlash?: "always" | "never" | "ignore";
|
|
2186
2291
|
}
|
|
2187
2292
|
interface PluginContextFactoryOptions {
|
|
2188
2293
|
db: Kysely<Database>;
|
|
@@ -2590,6 +2695,19 @@ declare class EmailPipeline {
|
|
|
2590
2695
|
}
|
|
2591
2696
|
//#endregion
|
|
2592
2697
|
//#region src/plugins/routes.d.ts
|
|
2698
|
+
/**
|
|
2699
|
+
* Route metadata (public flag) without the handler.
|
|
2700
|
+
* Used by the catch-all route to decide auth before dispatch.
|
|
2701
|
+
*/
|
|
2702
|
+
interface RouteMeta {
|
|
2703
|
+
public: boolean;
|
|
2704
|
+
permission?: string;
|
|
2705
|
+
/**
|
|
2706
|
+
* Cache-Control value for successful GET responses. Only ever set for
|
|
2707
|
+
* public routes — authenticated responses must stay `private, no-store`.
|
|
2708
|
+
*/
|
|
2709
|
+
cacheControl?: string;
|
|
2710
|
+
}
|
|
2593
2711
|
/**
|
|
2594
2712
|
* Result from a route invocation
|
|
2595
2713
|
*/
|
|
@@ -2674,7 +2792,19 @@ interface CronScheduler {
|
|
|
2674
2792
|
*/
|
|
2675
2793
|
type SystemCleanupFn = () => Promise<void>;
|
|
2676
2794
|
//#endregion
|
|
2795
|
+
//#region src/scheduled-publish.d.ts
|
|
2796
|
+
/** A content item that was promoted to published by a sweep. */
|
|
2797
|
+
interface PublishedRef {
|
|
2798
|
+
collection: string;
|
|
2799
|
+
id: string;
|
|
2800
|
+
}
|
|
2801
|
+
//#endregion
|
|
2677
2802
|
//#region src/emdash-runtime.d.ts
|
|
2803
|
+
/** Combined result from a single-pass page contribution collection */
|
|
2804
|
+
interface PageContributions {
|
|
2805
|
+
metadata: PageMetadataContribution[];
|
|
2806
|
+
fragments: PageFragmentContribution[];
|
|
2807
|
+
}
|
|
2678
2808
|
/**
|
|
2679
2809
|
* Sandboxed plugin entry from virtual module
|
|
2680
2810
|
*/
|
|
@@ -2689,6 +2819,8 @@ interface SandboxedPluginEntry {
|
|
|
2689
2819
|
allowedHosts: string[];
|
|
2690
2820
|
/** Declared storage collections */
|
|
2691
2821
|
storage: PluginStorageConfig;
|
|
2822
|
+
/** Serialized MCP declarations emitted at plugin build time. */
|
|
2823
|
+
mcp?: PluginMcpManifestConfig;
|
|
2692
2824
|
/** Admin pages */
|
|
2693
2825
|
adminPages?: Array<{
|
|
2694
2826
|
path: string;
|
|
@@ -2701,6 +2833,8 @@ interface SandboxedPluginEntry {
|
|
|
2701
2833
|
title?: string;
|
|
2702
2834
|
size?: string;
|
|
2703
2835
|
}>;
|
|
2836
|
+
/** Settings schema for the auto-generated admin settings form */
|
|
2837
|
+
settingsSchema?: Record<string, SettingField>;
|
|
2704
2838
|
/** Portable Text block types contributed to the editor (declarative Block Kit) */
|
|
2705
2839
|
portableTextBlocks?: PortableTextBlockConfig[];
|
|
2706
2840
|
/** Field widget types contributed for schema-field editing UIs */
|
|
@@ -2713,6 +2847,697 @@ interface SandboxedPluginEntry {
|
|
|
2713
2847
|
*/
|
|
2714
2848
|
preferred?: string[];
|
|
2715
2849
|
}
|
|
2850
|
+
/**
|
|
2851
|
+
* Media provider entry from virtual module
|
|
2852
|
+
*/
|
|
2853
|
+
interface MediaProviderEntry {
|
|
2854
|
+
id: string;
|
|
2855
|
+
name: string;
|
|
2856
|
+
icon?: string;
|
|
2857
|
+
capabilities: MediaProviderCapabilities;
|
|
2858
|
+
/** Factory function to create the provider instance */
|
|
2859
|
+
createProvider: (ctx: MediaProviderContext) => MediaProvider;
|
|
2860
|
+
}
|
|
2861
|
+
/**
|
|
2862
|
+
* Context passed to media provider factory functions
|
|
2863
|
+
*/
|
|
2864
|
+
interface MediaProviderContext {
|
|
2865
|
+
db: Kysely<Database>;
|
|
2866
|
+
/**
|
|
2867
|
+
* Resolver for the live connection, preferred over `db` by providers that
|
|
2868
|
+
* query EmDash's database. Resolves the current request/event-scoped
|
|
2869
|
+
* connection from ALS so connection-backed adapters (Postgres over
|
|
2870
|
+
* Hyperdrive) don't reuse the per-isolate singleton's socket across events.
|
|
2871
|
+
* Providers should resolve per operation rather than capturing `db` once.
|
|
2872
|
+
* Omitted-safe: falls back to `db` for stateless adapters (D1, Node SQLite).
|
|
2873
|
+
*/
|
|
2874
|
+
getDb?: () => Kysely<Database>;
|
|
2875
|
+
storage: Storage | null;
|
|
2876
|
+
}
|
|
2877
|
+
/**
|
|
2878
|
+
* Builds the timer-based scheduler that drives cron ticks and maintenance.
|
|
2879
|
+
* Injected via `virtual:emdash/scheduler` so the platform — not core — decides
|
|
2880
|
+
* whether a long-lived heartbeat exists.
|
|
2881
|
+
*/
|
|
2882
|
+
type CreateSchedulerFn = (executor: CronExecutor) => CronScheduler;
|
|
2883
|
+
/**
|
|
2884
|
+
* Dependencies injected from virtual modules (middleware reads these)
|
|
2885
|
+
*/
|
|
2886
|
+
interface RuntimeDependencies {
|
|
2887
|
+
config: EmDashConfig;
|
|
2888
|
+
plugins: ResolvedPlugin[];
|
|
2889
|
+
createDialect: (config: any) => Dialect;
|
|
2890
|
+
/**
|
|
2891
|
+
* Factory for a dialect that batches same-turn reads into one round trip
|
|
2892
|
+
* ({@link EmDashRuntime.create} uses it for the cold-start read phase).
|
|
2893
|
+
* Present only on batching backends (D1, DO); absent backends fall back to
|
|
2894
|
+
* the singleton. Returns a fresh connection each call — it must never be the
|
|
2895
|
+
* long-lived singleton, whose coalescing buffer would be shared across
|
|
2896
|
+
* requests.
|
|
2897
|
+
*/
|
|
2898
|
+
createCoalescingDialect?: (config: any) => Dialect | null;
|
|
2899
|
+
createStorage: ((config: any) => Storage) | null;
|
|
2900
|
+
sandboxEnabled: boolean;
|
|
2901
|
+
/** sandbox: false escape hatch - load sandboxed plugins in-process */
|
|
2902
|
+
sandboxBypassed?: boolean;
|
|
2903
|
+
/**
|
|
2904
|
+
* Factory for the timer-based cron/maintenance heartbeat. Supplied by the
|
|
2905
|
+
* generated `virtual:emdash/scheduler` module: a `NodeCronScheduler` factory
|
|
2906
|
+
* on long-lived runtimes (Node/Bun), or `null` on serverless adapters where
|
|
2907
|
+
* an external driver (e.g. the Cloudflare Worker's `scheduled()` Cron
|
|
2908
|
+
* Trigger) calls `runScheduledTasks()` instead. When absent or null, the
|
|
2909
|
+
* runtime starts no scheduler. Keeping the platform decision in the
|
|
2910
|
+
* integration means core has no adapter-specific runtime checks.
|
|
2911
|
+
*/
|
|
2912
|
+
createScheduler?: CreateSchedulerFn | null;
|
|
2913
|
+
/** Media provider entries from virtual module */
|
|
2914
|
+
mediaProviderEntries?: MediaProviderEntry[];
|
|
2915
|
+
sandboxedPluginEntries: SandboxedPluginEntry[];
|
|
2916
|
+
/** Factory function supplied by the active platform adapter. */
|
|
2917
|
+
createSandboxRunner: SandboxRunnerFactory | null;
|
|
2918
|
+
}
|
|
2919
|
+
/**
|
|
2920
|
+
* Constructor parameters for `EmDashRuntime`.
|
|
2921
|
+
*
|
|
2922
|
+
* Production code should use `EmDashRuntime.create()` which discovers and
|
|
2923
|
+
* loads all parts (database, plugins, hooks, cron, etc.) and then calls the
|
|
2924
|
+
* constructor. Direct construction is supported for callers that already
|
|
2925
|
+
* have all the dependencies in hand — for example, integration tests that
|
|
2926
|
+
* supply a pre-migrated database and an empty plugin set.
|
|
2927
|
+
*
|
|
2928
|
+
* Every field corresponds 1:1 to internal state set on the runtime — none of
|
|
2929
|
+
* these are derived. If you don't have a value for one, see what `create()`
|
|
2930
|
+
* passes for that field as the canonical default.
|
|
2931
|
+
*/
|
|
2932
|
+
interface EmDashRuntimeParts {
|
|
2933
|
+
db: Kysely<Database>;
|
|
2934
|
+
storage: Storage | null;
|
|
2935
|
+
configuredPlugins: ResolvedPlugin[];
|
|
2936
|
+
sandboxedPlugins: Map<string, SandboxedPluginInstance>;
|
|
2937
|
+
sandboxedPluginEntries: SandboxedPluginEntry[];
|
|
2938
|
+
hooks: HookPipeline;
|
|
2939
|
+
enabledPlugins: Set<string>;
|
|
2940
|
+
pluginStates: Map<string, string>;
|
|
2941
|
+
config: EmDashConfig;
|
|
2942
|
+
mediaProviders: Map<string, MediaProvider>;
|
|
2943
|
+
mediaProviderEntries: MediaProviderEntry[];
|
|
2944
|
+
cronExecutor: CronExecutor | null;
|
|
2945
|
+
cronScheduler: CronScheduler | null;
|
|
2946
|
+
emailPipeline: EmailPipeline | null;
|
|
2947
|
+
allPipelinePlugins: ResolvedPlugin[];
|
|
2948
|
+
pipelineFactoryOptions: {
|
|
2949
|
+
db: Kysely<Database>;
|
|
2950
|
+
getDb?: () => Kysely<Database>;
|
|
2951
|
+
storage?: Storage;
|
|
2952
|
+
siteInfo?: {
|
|
2953
|
+
siteName?: string;
|
|
2954
|
+
siteUrl?: string;
|
|
2955
|
+
locale?: string;
|
|
2956
|
+
trailingSlash?: "always" | "never" | "ignore";
|
|
2957
|
+
};
|
|
2958
|
+
};
|
|
2959
|
+
runtimeDeps: RuntimeDependencies;
|
|
2960
|
+
pipelineRef: {
|
|
2961
|
+
current: HookPipeline;
|
|
2962
|
+
};
|
|
2963
|
+
}
|
|
2964
|
+
/**
|
|
2965
|
+
* EmDashRuntime - singleton per worker
|
|
2966
|
+
*/
|
|
2967
|
+
declare class EmDashRuntime {
|
|
2968
|
+
/**
|
|
2969
|
+
* The singleton database instance (worker-lifetime cached).
|
|
2970
|
+
* Use the `db` getter instead — it checks the request context first
|
|
2971
|
+
* for per-request overrides (D1 read replica sessions, DO multi-site).
|
|
2972
|
+
*/
|
|
2973
|
+
private readonly _db;
|
|
2974
|
+
readonly storage: Storage | null;
|
|
2975
|
+
readonly configuredPlugins: ResolvedPlugin[];
|
|
2976
|
+
readonly sandboxedPlugins: Map<string, SandboxedPluginInstance>;
|
|
2977
|
+
readonly sandboxedPluginEntries: SandboxedPluginEntry[];
|
|
2978
|
+
/**
|
|
2979
|
+
* Schema registry bound to the current request/event-scoped connection.
|
|
2980
|
+
* Built per access (SchemaRegistry just wraps a db) against `this.db`, the
|
|
2981
|
+
* ALS-aware getter — never a captured snapshot of the singleton. On a
|
|
2982
|
+
* connection-backed adapter (Postgres over Hyperdrive) a captured singleton
|
|
2983
|
+
* would query a socket opened by an earlier event and trip workerd's
|
|
2984
|
+
* cross-request I/O guard; the catch in handlers like handleContentUpdate
|
|
2985
|
+
* would then silently treat a revision-enabled collection as non-revisioned
|
|
2986
|
+
* and write draft edits to live columns. Same reasoning as the per-call
|
|
2987
|
+
* registry in _buildManifest().
|
|
2988
|
+
*/
|
|
2989
|
+
get schemaRegistry(): SchemaRegistry;
|
|
2990
|
+
private _hooks;
|
|
2991
|
+
readonly config: EmDashConfig;
|
|
2992
|
+
readonly mediaProviders: Map<string, MediaProvider>;
|
|
2993
|
+
readonly mediaProviderEntries: MediaProviderEntry[];
|
|
2994
|
+
readonly cronExecutor: CronExecutor | null;
|
|
2995
|
+
readonly email: EmailPipeline | null;
|
|
2996
|
+
private cronScheduler;
|
|
2997
|
+
private enabledPlugins;
|
|
2998
|
+
private pluginStates;
|
|
2999
|
+
/**
|
|
3000
|
+
* Isolate-lifetime guard so FTS indexes are verified at most once per
|
|
3001
|
+
* worker rather than on every admin request. See ensureSearchHealthy().
|
|
3002
|
+
* Uses the poison-immune single-flight cache (never a shared awaitable
|
|
3003
|
+
* promise) so a cancelled first caller can't wedge later ones.
|
|
3004
|
+
*/
|
|
3005
|
+
private readonly _searchHealthCache;
|
|
3006
|
+
/** Current hook pipeline. Use the `hooks` getter for external access. */
|
|
3007
|
+
get hooks(): HookPipeline;
|
|
3008
|
+
/** All plugins eligible for the hook pipeline (includes built-in plugins).
|
|
3009
|
+
* Stored so we can rebuild the pipeline when plugins are enabled/disabled. */
|
|
3010
|
+
private allPipelinePlugins;
|
|
3011
|
+
/** Factory options for the hook pipeline context factory */
|
|
3012
|
+
private pipelineFactoryOptions;
|
|
3013
|
+
/** Dependencies needed for exclusive hook resolution */
|
|
3014
|
+
private runtimeDeps;
|
|
3015
|
+
/** Mutable ref for the cron invokeCronHook closure to read the current pipeline */
|
|
3016
|
+
private pipelineRef;
|
|
3017
|
+
/**
|
|
3018
|
+
* Get the database instance for the current request.
|
|
3019
|
+
*
|
|
3020
|
+
* Checks the ALS-based request context first — middleware sets a
|
|
3021
|
+
* per-request Kysely instance there for D1 read replica sessions
|
|
3022
|
+
* or DO preview databases. Falls back to the singleton instance.
|
|
3023
|
+
*/
|
|
3024
|
+
get db(): Kysely<Database>;
|
|
3025
|
+
constructor(parts: EmDashRuntimeParts);
|
|
3026
|
+
/**
|
|
3027
|
+
* Get the sandbox runner instance (for marketplace install/update)
|
|
3028
|
+
*/
|
|
3029
|
+
getSandboxRunner(): SandboxRunner | null;
|
|
3030
|
+
/**
|
|
3031
|
+
* Whether the sandbox bypass mode (sandbox: false) is active.
|
|
3032
|
+
* Marketplace install/update handlers use this to skip the
|
|
3033
|
+
* SANDBOX_NOT_AVAILABLE gate, since the bypass path loads
|
|
3034
|
+
* marketplace plugins in-process via syncMarketplacePlugins().
|
|
3035
|
+
*/
|
|
3036
|
+
isSandboxBypassed(): boolean;
|
|
3037
|
+
/**
|
|
3038
|
+
* Publish any content whose scheduled time has passed.
|
|
3039
|
+
* Returns the items promoted so callers can invalidate their cache tags.
|
|
3040
|
+
*/
|
|
3041
|
+
publishScheduled(): Promise<PublishedRef[]>;
|
|
3042
|
+
/**
|
|
3043
|
+
* Run the full scheduled-maintenance batch: cron tasks, scheduled
|
|
3044
|
+
* publishing, and system cleanup. For request-less drivers — the
|
|
3045
|
+
* Cloudflare `scheduled()` handler invokes this from a Cron Trigger.
|
|
3046
|
+
* (On Node the timer-based scheduler drives the same work itself.)
|
|
3047
|
+
*
|
|
3048
|
+
* Each step is independent and non-fatal. Returns the content promoted
|
|
3049
|
+
* by the publishing sweep so the caller can purge edge-cache tags.
|
|
3050
|
+
*
|
|
3051
|
+
* `onPublished` (optional) is awaited after each collection's batch so a
|
|
3052
|
+
* request-less driver can invalidate edge-cache tags incrementally rather
|
|
3053
|
+
* than only after the whole sweep — bounding stale-cache exposure if the
|
|
3054
|
+
* runtime is killed mid-sweep.
|
|
3055
|
+
*/
|
|
3056
|
+
runScheduledTasks(options?: {
|
|
3057
|
+
onPublished?: (refs: PublishedRef[]) => Promise<void>;
|
|
3058
|
+
}): Promise<{
|
|
3059
|
+
published: PublishedRef[];
|
|
3060
|
+
}>;
|
|
3061
|
+
/**
|
|
3062
|
+
* Stop the cron scheduler gracefully.
|
|
3063
|
+
* Call during worker shutdown or hot-reload.
|
|
3064
|
+
*/
|
|
3065
|
+
stopCron(): Promise<void>;
|
|
3066
|
+
/**
|
|
3067
|
+
* Update in-memory plugin status and rebuild the hook pipeline.
|
|
3068
|
+
*
|
|
3069
|
+
* Rebuilding the pipeline ensures disabled plugins' hooks stop firing
|
|
3070
|
+
* and re-enabled plugins' hooks start firing again without a restart.
|
|
3071
|
+
* Exclusive hook selections are re-resolved after each rebuild.
|
|
3072
|
+
*/
|
|
3073
|
+
setPluginStatus(pluginId: string, status: "active" | "inactive"): Promise<void>;
|
|
3074
|
+
/**
|
|
3075
|
+
* Rebuild the hook pipeline from the current set of enabled plugins.
|
|
3076
|
+
*
|
|
3077
|
+
* Filters `allPipelinePlugins` to only those in `enabledPlugins`,
|
|
3078
|
+
* creates a fresh HookPipeline, re-resolves exclusive hook selections,
|
|
3079
|
+
* and re-wires the context factory so existing references (cron
|
|
3080
|
+
* callbacks, email pipeline) use the new pipeline.
|
|
3081
|
+
*/
|
|
3082
|
+
private rebuildHookPipeline;
|
|
3083
|
+
/**
|
|
3084
|
+
* Synchronize marketplace plugin runtime state with DB + storage.
|
|
3085
|
+
*
|
|
3086
|
+
* Ensures install/update/uninstall changes take effect immediately in the
|
|
3087
|
+
* current worker: loads newly active plugins and removes uninstalled ones.
|
|
3088
|
+
*/
|
|
3089
|
+
syncMarketplacePlugins(): Promise<void>;
|
|
3090
|
+
/**
|
|
3091
|
+
* Synchronize registry plugin runtime state with DB + storage.
|
|
3092
|
+
*
|
|
3093
|
+
* Mirrors {@link syncMarketplacePlugins} for plugins installed via the
|
|
3094
|
+
* experimental decentralized plugin registry. Called after install,
|
|
3095
|
+
* update, and uninstall handlers complete.
|
|
3096
|
+
*/
|
|
3097
|
+
syncRegistryPlugins(): Promise<void>;
|
|
3098
|
+
/**
|
|
3099
|
+
* Internal: reconcile in-memory sandboxed-plugin state with the
|
|
3100
|
+
* `_plugin_state` table for the given source tier. Shared
|
|
3101
|
+
* implementation behind {@link syncMarketplacePlugins} and
|
|
3102
|
+
* {@link syncRegistryPlugins}.
|
|
3103
|
+
*
|
|
3104
|
+
* Each source tier has its own key set in `${source}PluginKeys` so a
|
|
3105
|
+
* sync for one tier doesn't invalidate the other.
|
|
3106
|
+
*/
|
|
3107
|
+
private syncSandboxedSourcePlugins;
|
|
3108
|
+
/**
|
|
3109
|
+
* Remove a plugin from the in-memory pipeline lists by ID.
|
|
3110
|
+
* Mutates allPipelinePlugins and configuredPlugins in place.
|
|
3111
|
+
*/
|
|
3112
|
+
private removePluginFromLists;
|
|
3113
|
+
/**
|
|
3114
|
+
* Sync marketplace plugin metadata in sandbox: false bypass mode.
|
|
3115
|
+
*
|
|
3116
|
+
* In bypass mode the noop runner can't load plugins, but admin pages,
|
|
3117
|
+
* widgets, and route metadata still need to refresh in-process when an
|
|
3118
|
+
* admin installs/updates/uninstalls a marketplace plugin. Otherwise the
|
|
3119
|
+
* admin UI shows stale data until the server restarts.
|
|
3120
|
+
*
|
|
3121
|
+
* Hooks and routes still won't execute under bypass (matches the
|
|
3122
|
+
* cold-start bypass behavior in loadMarketplacePluginsBypassed).
|
|
3123
|
+
*
|
|
3124
|
+
* Known limitation: bypass plugins are loaded via `import(dataUrl)`,
|
|
3125
|
+
* which Node's ESM cache keys on the full URL. Updates create fresh
|
|
3126
|
+
* module objects, but old ones remain cached for the worker's lifetime.
|
|
3127
|
+
* In practice this is a few KB per update — only matters for sites with
|
|
3128
|
+
* very frequent marketplace updates running long-lived processes. The
|
|
3129
|
+
* fix would be vm.SourceTextModule for explicit lifecycle management.
|
|
3130
|
+
*/
|
|
3131
|
+
private syncMarketplacePluginsBypassed;
|
|
3132
|
+
/**
|
|
3133
|
+
* Create and initialize the runtime
|
|
3134
|
+
*/
|
|
3135
|
+
static create(deps: RuntimeDependencies, timings?: Array<{
|
|
3136
|
+
name: string;
|
|
3137
|
+
dur: number;
|
|
3138
|
+
desc?: string;
|
|
3139
|
+
}>): Promise<EmDashRuntime>;
|
|
3140
|
+
/**
|
|
3141
|
+
* Get a media provider by ID
|
|
3142
|
+
*/
|
|
3143
|
+
getMediaProvider(providerId: string): MediaProvider | undefined;
|
|
3144
|
+
/**
|
|
3145
|
+
* Get all media provider entries (for admin UI)
|
|
3146
|
+
*/
|
|
3147
|
+
getMediaProviderList(): Array<{
|
|
3148
|
+
id: string;
|
|
3149
|
+
name: string;
|
|
3150
|
+
icon?: string;
|
|
3151
|
+
capabilities: MediaProviderCapabilities;
|
|
3152
|
+
}>;
|
|
3153
|
+
/**
|
|
3154
|
+
* Get or create database instance
|
|
3155
|
+
*/
|
|
3156
|
+
private static getDatabase;
|
|
3157
|
+
/**
|
|
3158
|
+
* Get or create storage instance
|
|
3159
|
+
*/
|
|
3160
|
+
private static getStorage;
|
|
3161
|
+
/**
|
|
3162
|
+
* Load sandboxed plugin entries as trusted in-process plugins.
|
|
3163
|
+
* Used by the sandbox: false debugging escape hatch.
|
|
3164
|
+
*
|
|
3165
|
+
* Imports each plugin's bundled ESM code via a data URL, adapts it
|
|
3166
|
+
* with adaptSandboxEntry, and returns ResolvedPlugin objects ready
|
|
3167
|
+
* to be merged into the pipeline plugin list.
|
|
3168
|
+
*/
|
|
3169
|
+
private static loadBypassedPlugins;
|
|
3170
|
+
/**
|
|
3171
|
+
* Load sandboxed plugins using SandboxRunner
|
|
3172
|
+
*/
|
|
3173
|
+
private static loadSandboxedPlugins;
|
|
3174
|
+
/**
|
|
3175
|
+
* Cold-start: load marketplace-installed plugins from site-local R2 storage
|
|
3176
|
+
*
|
|
3177
|
+
* Queries _plugin_state for source='marketplace' rows, fetches each bundle
|
|
3178
|
+
* from R2, and loads via SandboxRunner.
|
|
3179
|
+
*/
|
|
3180
|
+
/**
|
|
3181
|
+
* Cold-start load of all active sandboxed plugins for one install
|
|
3182
|
+
* tier (marketplace or registry) from site-local R2.
|
|
3183
|
+
*
|
|
3184
|
+
* Mirrors {@link syncSandboxedSourcePlugins} but runs once at runtime
|
|
3185
|
+
* creation, before request traffic arrives; the sync method runs on
|
|
3186
|
+
* demand after install / update / uninstall handlers.
|
|
3187
|
+
*/
|
|
3188
|
+
private static loadInstalledSandboxedPlugins;
|
|
3189
|
+
/**
|
|
3190
|
+
* Cold-start: load marketplace plugins in bypass mode (sandbox: false).
|
|
3191
|
+
*
|
|
3192
|
+
* Each active marketplace bundle is read, evaluated via data URL, adapted
|
|
3193
|
+
* with adaptSandboxEntry, and returned as a ResolvedPlugin. The caller is
|
|
3194
|
+
* responsible for merging these into allPipelinePlugins / configuredPlugins
|
|
3195
|
+
* BEFORE the hook pipeline is created, so hooks and routes register in
|
|
3196
|
+
* the trusted pipeline.
|
|
3197
|
+
*
|
|
3198
|
+
* Also caches manifest and route metadata so admin UI / getManifest() work.
|
|
3199
|
+
*
|
|
3200
|
+
* Returns ResolvedPlugins to be merged into the pipeline.
|
|
3201
|
+
*/
|
|
3202
|
+
private static loadMarketplacePluginsBypassed;
|
|
3203
|
+
/**
|
|
3204
|
+
* Resolve exclusive hook selections on startup.
|
|
3205
|
+
*
|
|
3206
|
+
* Delegates to the shared resolveExclusiveHooks() in hooks.ts.
|
|
3207
|
+
* The runtime version considers all pipeline providers as "active" since
|
|
3208
|
+
* the pipeline was already built from only active/enabled plugins.
|
|
3209
|
+
*/
|
|
3210
|
+
private static resolveExclusiveHooks;
|
|
3211
|
+
/**
|
|
3212
|
+
* Build the admin manifest from the live database.
|
|
3213
|
+
*
|
|
3214
|
+
* Used by the admin UI (sidebar collections, content editor field
|
|
3215
|
+
* dispatch, manifest endpoint) and by WordPress import — it's never
|
|
3216
|
+
* read on a public request, so this isn't on any anonymous hot path.
|
|
3217
|
+
*
|
|
3218
|
+
* No cross-request cache. The previous worker-isolate cache produced
|
|
3219
|
+
* a class of cross-isolate staleness bugs (#776, #873, #876, #877)
|
|
3220
|
+
* because Cloudflare Workers keeps multiple warm isolates per region
|
|
3221
|
+
* and there's no fan-out primitive to invalidate them in step. The
|
|
3222
|
+
* cache existed to amortize an N+1 schema query pattern; now that
|
|
3223
|
+
* `listCollectionsWithFields()` does the same work in two queries,
|
|
3224
|
+
* the rebuild is fast enough to pay on every admin request.
|
|
3225
|
+
*
|
|
3226
|
+
* Within a single request, `requestCached` deduplicates concurrent
|
|
3227
|
+
* callers (the manifest endpoint and an admin SSR template, say).
|
|
3228
|
+
*/
|
|
3229
|
+
getManifest(): Promise<EmDashManifest>;
|
|
3230
|
+
/**
|
|
3231
|
+
* Build the manifest from the database.
|
|
3232
|
+
*
|
|
3233
|
+
* Constant query shapes via `listCollectionsWithFields()` — one query
|
|
3234
|
+
* for collections, one batched query for fields (chunked at
|
|
3235
|
+
* `SQL_BATCH_SIZE` collection IDs to stay under D1's bound-parameter
|
|
3236
|
+
* limit). Typical sites stay well under the chunk threshold, so this
|
|
3237
|
+
* is two queries in practice; never N+1.
|
|
3238
|
+
*/
|
|
3239
|
+
private _buildManifest;
|
|
3240
|
+
/**
|
|
3241
|
+
* Verify and repair FTS indexes on demand. Runs at most once per worker
|
|
3242
|
+
* lifetime.
|
|
3243
|
+
*
|
|
3244
|
+
* Originally called from `EmDashRuntime.create()`, but on a busy D1 link
|
|
3245
|
+
* (e.g. SIN replica ~80-150ms per query) it added ~1.5s to every cold
|
|
3246
|
+
* start for a modest-sized site — more than every other init phase
|
|
3247
|
+
* combined. Anonymous public reads never touch the search write path,
|
|
3248
|
+
* so the cost isn't paid back for the vast majority of requests.
|
|
3249
|
+
*
|
|
3250
|
+
* Instead, search endpoints call this lazily: the first request that
|
|
3251
|
+
* actually needs the index pays the verify cost (usually fast — no
|
|
3252
|
+
* rebuild needed), everyone else runs cold-free.
|
|
3253
|
+
*
|
|
3254
|
+
* Uses the runtime's singleton database (`this._db`) rather than the
|
|
3255
|
+
* request-scoped DB. Verify reads only, but `rebuildIndex` writes, and
|
|
3256
|
+
* a GET search request on D1 carries a `first-unconstrained` session
|
|
3257
|
+
* that's free to route at a read replica — unsafe for writes. The
|
|
3258
|
+
* singleton always goes through the default binding, which the D1
|
|
3259
|
+
* adapter will promote to `first-primary` for write statements.
|
|
3260
|
+
*
|
|
3261
|
+
* Safe to call concurrently: repeated callers share the same in-flight
|
|
3262
|
+
* promise. Errors are swallowed internally so callers don't need to
|
|
3263
|
+
* defend against FTS not existing yet (pre-setup).
|
|
3264
|
+
*/
|
|
3265
|
+
ensureSearchHealthy(): Promise<void>;
|
|
3266
|
+
handleContentList(collection: string, params: {
|
|
3267
|
+
cursor?: string;
|
|
3268
|
+
limit?: number;
|
|
3269
|
+
status?: string;
|
|
3270
|
+
orderBy?: string;
|
|
3271
|
+
order?: "asc" | "desc";
|
|
3272
|
+
locale?: string;
|
|
3273
|
+
q?: string;
|
|
3274
|
+
authorId?: string;
|
|
3275
|
+
dateField?: ContentDateField;
|
|
3276
|
+
dateFrom?: string;
|
|
3277
|
+
dateTo?: string;
|
|
3278
|
+
}): Promise<ApiResult<ContentListResponse>>;
|
|
3279
|
+
handleContentAuthors(collection: string): Promise<ApiResult<{
|
|
3280
|
+
items: ContentAuthor[];
|
|
3281
|
+
}>>;
|
|
3282
|
+
handleContentGet(collection: string, id: string, locale?: string): Promise<ApiResult<ContentResponse>>;
|
|
3283
|
+
handleContentGetIncludingTrashed(collection: string, id: string, locale?: string): Promise<ApiResult<ContentResponse>>;
|
|
3284
|
+
/**
|
|
3285
|
+
* If the response item has a `draftRevisionId`, replace `item.data` with
|
|
3286
|
+
* the draft revision's data and expose the original published values as
|
|
3287
|
+
* `liveData`. This makes the content_get / content_update round-trip
|
|
3288
|
+
* intuitive — read returns the latest content the caller has saved
|
|
3289
|
+
* (their pending draft), with the previously-published values still
|
|
3290
|
+
* accessible for compare-style flows.
|
|
3291
|
+
*
|
|
3292
|
+
* No-op when no draft exists or the response is an error.
|
|
3293
|
+
*/
|
|
3294
|
+
private hydrateDraftData;
|
|
3295
|
+
handleContentCreate(collection: string, body: {
|
|
3296
|
+
data: Record<string, unknown>;
|
|
3297
|
+
slug?: string;
|
|
3298
|
+
status?: string;
|
|
3299
|
+
authorId?: string;
|
|
3300
|
+
bylines?: Array<{
|
|
3301
|
+
bylineId: string;
|
|
3302
|
+
roleLabel?: string | null;
|
|
3303
|
+
}>;
|
|
3304
|
+
locale?: string;
|
|
3305
|
+
translationOf?: string;
|
|
3306
|
+
taxonomies?: Record<string, string[]>;
|
|
3307
|
+
}): Promise<{
|
|
3308
|
+
success: false;
|
|
3309
|
+
error: {
|
|
3310
|
+
code: string;
|
|
3311
|
+
message: string;
|
|
3312
|
+
details?: Record<string, unknown>;
|
|
3313
|
+
};
|
|
3314
|
+
} | {
|
|
3315
|
+
success: true;
|
|
3316
|
+
data: ContentResponse;
|
|
3317
|
+
} | {
|
|
3318
|
+
success: false;
|
|
3319
|
+
error: {
|
|
3320
|
+
code: "VALIDATION_ERROR" | "COLLECTION_NOT_FOUND";
|
|
3321
|
+
message: string;
|
|
3322
|
+
};
|
|
3323
|
+
}>;
|
|
3324
|
+
handleContentUpdate(collection: string, id: string, body: {
|
|
3325
|
+
data?: Record<string, unknown>;
|
|
3326
|
+
slug?: string;
|
|
3327
|
+
status?: string;
|
|
3328
|
+
authorId?: string | null;
|
|
3329
|
+
bylines?: Array<{
|
|
3330
|
+
bylineId: string;
|
|
3331
|
+
roleLabel?: string | null;
|
|
3332
|
+
}>;
|
|
3333
|
+
seo?: {
|
|
3334
|
+
title?: string | null;
|
|
3335
|
+
description?: string | null;
|
|
3336
|
+
image?: string | null;
|
|
3337
|
+
canonical?: string | null;
|
|
3338
|
+
noIndex?: boolean;
|
|
3339
|
+
};
|
|
3340
|
+
taxonomies?: Record<string, string[]>;
|
|
3341
|
+
publishedAt?: string | null;
|
|
3342
|
+
locale?: string; /** Skip revision creation (used by autosave) */
|
|
3343
|
+
skipRevision?: boolean;
|
|
3344
|
+
_rev?: string;
|
|
3345
|
+
}): Promise<ApiResult<ContentResponse>>;
|
|
3346
|
+
handleContentDelete(collection: string, id: string): Promise<{
|
|
3347
|
+
success: false;
|
|
3348
|
+
error: {
|
|
3349
|
+
code: string;
|
|
3350
|
+
message: string;
|
|
3351
|
+
details?: Record<string, unknown>;
|
|
3352
|
+
};
|
|
3353
|
+
} | {
|
|
3354
|
+
success: true;
|
|
3355
|
+
data: {
|
|
3356
|
+
deleted: true;
|
|
3357
|
+
id: string;
|
|
3358
|
+
};
|
|
3359
|
+
} | {
|
|
3360
|
+
success: boolean;
|
|
3361
|
+
error: {
|
|
3362
|
+
code: string;
|
|
3363
|
+
message: string;
|
|
3364
|
+
};
|
|
3365
|
+
}>;
|
|
3366
|
+
handleContentListTrashed(collection: string, params?: {
|
|
3367
|
+
cursor?: string;
|
|
3368
|
+
limit?: number;
|
|
3369
|
+
}): Promise<ApiResult<{
|
|
3370
|
+
items: TrashedContentItem[];
|
|
3371
|
+
nextCursor?: string;
|
|
3372
|
+
}>>;
|
|
3373
|
+
handleContentRestore(collection: string, id: string): Promise<ApiResult<{
|
|
3374
|
+
restored: true;
|
|
3375
|
+
item: ContentItem;
|
|
3376
|
+
}>>;
|
|
3377
|
+
handleContentPermanentDelete(collection: string, id: string): Promise<ApiResult<{
|
|
3378
|
+
deleted: true;
|
|
3379
|
+
id: string;
|
|
3380
|
+
}>>;
|
|
3381
|
+
handleContentCountTrashed(collection: string): Promise<ApiResult<{
|
|
3382
|
+
count: number;
|
|
3383
|
+
}>>;
|
|
3384
|
+
handleContentDuplicate(collection: string, id: string, authorId?: string): Promise<ApiResult<{
|
|
3385
|
+
item: ContentItem;
|
|
3386
|
+
}>>;
|
|
3387
|
+
handleContentPublish(collection: string, id: string, options?: {
|
|
3388
|
+
publishedAt?: string;
|
|
3389
|
+
requireScheduledDue?: boolean;
|
|
3390
|
+
}): Promise<ApiResult<ContentResponse>>;
|
|
3391
|
+
handleContentUnpublish(collection: string, id: string): Promise<ApiResult<ContentResponse>>;
|
|
3392
|
+
handleContentSchedule(collection: string, id: string, scheduledAt: string): Promise<ApiResult<ContentResponse>>;
|
|
3393
|
+
handleContentUnschedule(collection: string, id: string): Promise<ApiResult<ContentResponse>>;
|
|
3394
|
+
handleContentCountScheduled(collection: string): Promise<ApiResult<{
|
|
3395
|
+
count: number;
|
|
3396
|
+
}>>;
|
|
3397
|
+
handleContentDiscardDraft(collection: string, id: string): Promise<ApiResult<ContentResponse>>;
|
|
3398
|
+
handleContentCompare(collection: string, id: string): Promise<ApiResult<{
|
|
3399
|
+
hasChanges: boolean;
|
|
3400
|
+
live: Record<string, unknown> | null;
|
|
3401
|
+
draft: Record<string, unknown> | null;
|
|
3402
|
+
}>>;
|
|
3403
|
+
handleContentTranslations(collection: string, id: string): Promise<ApiResult<{
|
|
3404
|
+
translationGroup: string;
|
|
3405
|
+
translations: Array<{
|
|
3406
|
+
id: string;
|
|
3407
|
+
locale: string | null;
|
|
3408
|
+
slug: string | null;
|
|
3409
|
+
status: string;
|
|
3410
|
+
updatedAt: string;
|
|
3411
|
+
}>;
|
|
3412
|
+
}>>;
|
|
3413
|
+
handleMediaList(params: {
|
|
3414
|
+
cursor?: string;
|
|
3415
|
+
limit?: number;
|
|
3416
|
+
mimeType?: string | readonly string[];
|
|
3417
|
+
q?: string;
|
|
3418
|
+
}): Promise<ApiResult<MediaListResponse>>;
|
|
3419
|
+
handleMediaGet(id: string): Promise<ApiResult<MediaResponse>>;
|
|
3420
|
+
handleMediaCreate(input: {
|
|
3421
|
+
filename: string;
|
|
3422
|
+
mimeType: string;
|
|
3423
|
+
size?: number;
|
|
3424
|
+
width?: number;
|
|
3425
|
+
height?: number;
|
|
3426
|
+
storageKey: string;
|
|
3427
|
+
contentHash?: string;
|
|
3428
|
+
blurhash?: string;
|
|
3429
|
+
dominantColor?: string;
|
|
3430
|
+
authorId?: string;
|
|
3431
|
+
}): Promise<ApiResult<MediaResponse>>;
|
|
3432
|
+
handleMediaUpdate(id: string, input: {
|
|
3433
|
+
alt?: string;
|
|
3434
|
+
caption?: string;
|
|
3435
|
+
width?: number;
|
|
3436
|
+
height?: number;
|
|
3437
|
+
}): Promise<ApiResult<MediaResponse>>;
|
|
3438
|
+
handleMediaDelete(id: string): Promise<ApiResult<{
|
|
3439
|
+
deleted: true;
|
|
3440
|
+
}>>;
|
|
3441
|
+
handleRevisionList(collection: string, entryId: string, params?: {
|
|
3442
|
+
limit?: number;
|
|
3443
|
+
}): Promise<ApiResult<RevisionListResponse>>;
|
|
3444
|
+
handleRevisionGet(revisionId: string): Promise<ApiResult<RevisionResponse>>;
|
|
3445
|
+
handleRevisionRestore(revisionId: string, callerUserId: string): Promise<ApiResult<ContentResponse>>;
|
|
3446
|
+
private refreshContentUsageAfterSuccessfulWrite;
|
|
3447
|
+
private deleteContentUsageAfterSuccessfulPermanentDelete;
|
|
3448
|
+
/**
|
|
3449
|
+
* Get route metadata for a plugin route without invoking the handler.
|
|
3450
|
+
* Used by the catch-all route to decide auth before dispatch.
|
|
3451
|
+
* Returns null if the plugin or route doesn't exist.
|
|
3452
|
+
*/
|
|
3453
|
+
getPluginRouteMeta(pluginId: string, path: string): RouteMeta | null;
|
|
3454
|
+
/**
|
|
3455
|
+
* Resolve the settings schema for a runtime-installed (marketplace or
|
|
3456
|
+
* registry) plugin from its cached manifest. Returns `{}` for a known
|
|
3457
|
+
* plugin without a schema and `null` for unknown plugins, matching the
|
|
3458
|
+
* contract of `getPluginSettingsSchema` for build-time plugins.
|
|
3459
|
+
*/
|
|
3460
|
+
getRuntimePluginSettingsSchema(pluginId: string): Record<string, SettingField> | null;
|
|
3461
|
+
handlePluginApiRoute(pluginId: string, _method: string, path: string, request: Request): Promise<{
|
|
3462
|
+
success: boolean;
|
|
3463
|
+
data?: unknown;
|
|
3464
|
+
error?: {
|
|
3465
|
+
code: string;
|
|
3466
|
+
message: string;
|
|
3467
|
+
};
|
|
3468
|
+
}>;
|
|
3469
|
+
getPluginMcpTools(pluginId?: string): Promise<{
|
|
3470
|
+
pluginId: string;
|
|
3471
|
+
name: string;
|
|
3472
|
+
description: string;
|
|
3473
|
+
route: string;
|
|
3474
|
+
permission: string;
|
|
3475
|
+
destructive: boolean;
|
|
3476
|
+
inputSchema: z$1.ZodType;
|
|
3477
|
+
outputSchema?: z$1.ZodType;
|
|
3478
|
+
}[]>;
|
|
3479
|
+
getEnabledPluginMcpTools(): Promise<{
|
|
3480
|
+
pluginId: string;
|
|
3481
|
+
name: string;
|
|
3482
|
+
description: string;
|
|
3483
|
+
route: string;
|
|
3484
|
+
permission: string;
|
|
3485
|
+
destructive: boolean;
|
|
3486
|
+
inputSchema: z$1.ZodType;
|
|
3487
|
+
outputSchema?: z$1.ZodType;
|
|
3488
|
+
}[]>;
|
|
3489
|
+
serializePluginMcpConsent(tools: Awaited<ReturnType<EmDashRuntime["getPluginMcpTools"]>>, pluginId: string): string;
|
|
3490
|
+
handlePluginMcpTool(pluginId: string, toolName: string, route: string, input: unknown, actorId: string, request: Request): Promise<{
|
|
3491
|
+
success: boolean;
|
|
3492
|
+
data?: unknown;
|
|
3493
|
+
error?: {
|
|
3494
|
+
code: string;
|
|
3495
|
+
message: string;
|
|
3496
|
+
};
|
|
3497
|
+
}>;
|
|
3498
|
+
handlePluginMcpDenied(pluginId: string, toolName: string, route: string, actorId: string, request: Request, reason: string): Promise<void>;
|
|
3499
|
+
private findSandboxedPlugin;
|
|
3500
|
+
/**
|
|
3501
|
+
* Normalize image/file fields in content data.
|
|
3502
|
+
* Fills missing dimensions, storageKey, mimeType, and filename from providers.
|
|
3503
|
+
*/
|
|
3504
|
+
private normalizeMediaFields;
|
|
3505
|
+
private runSandboxedBeforeSave;
|
|
3506
|
+
private runSandboxedBeforeDelete;
|
|
3507
|
+
private runAfterSaveHooks;
|
|
3508
|
+
private runAfterDeleteHooks;
|
|
3509
|
+
private runDeferredContentHook;
|
|
3510
|
+
private runAfterPublishHooks;
|
|
3511
|
+
private runAfterUnpublishHooks;
|
|
3512
|
+
private runAfterRestoreHooks;
|
|
3513
|
+
private runAfterScheduleHooks;
|
|
3514
|
+
private runAfterUnscheduleHooks;
|
|
3515
|
+
private handleSandboxedRoute;
|
|
3516
|
+
/**
|
|
3517
|
+
* Cache for page contributions. Uses a WeakMap keyed on the PublicPageContext
|
|
3518
|
+
* object so results are collected once per page context per request, even when
|
|
3519
|
+
* multiple render components (EmDashHead, EmDashBodyStart, EmDashBodyEnd)
|
|
3520
|
+
* request contributions from the same page.
|
|
3521
|
+
*/
|
|
3522
|
+
private pageContributionCache;
|
|
3523
|
+
/**
|
|
3524
|
+
* Collect all page contributions (metadata + fragments) in a single pass.
|
|
3525
|
+
* Results are cached by page context object identity.
|
|
3526
|
+
*/
|
|
3527
|
+
collectPageContributions(page: PublicPageContext): Promise<PageContributions>;
|
|
3528
|
+
private doCollectPageContributions;
|
|
3529
|
+
/**
|
|
3530
|
+
* Collect page metadata contributions from trusted and sandboxed plugins.
|
|
3531
|
+
* Delegates to the single-pass collector and returns the metadata portion.
|
|
3532
|
+
*/
|
|
3533
|
+
collectPageMetadata(page: PublicPageContext): Promise<PageMetadataContribution[]>;
|
|
3534
|
+
/**
|
|
3535
|
+
* Collect page fragment contributions from trusted plugins only.
|
|
3536
|
+
* Delegates to the single-pass collector and returns the fragments portion.
|
|
3537
|
+
*/
|
|
3538
|
+
collectPageFragments(page: PublicPageContext): Promise<PageFragmentContribution[]>;
|
|
3539
|
+
private isPluginEnabled;
|
|
3540
|
+
}
|
|
2716
3541
|
//#endregion
|
|
2717
3542
|
//#region src/sections/types.d.ts
|
|
2718
3543
|
/**
|
|
@@ -3693,6 +4518,9 @@ declare const pluginManifestSchema: z$1.ZodObject<{
|
|
|
3693
4518
|
read: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>>;
|
|
3694
4519
|
write: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>>;
|
|
3695
4520
|
}, z$1.core.$strip>>;
|
|
4521
|
+
taxonomies: z$1.ZodOptional<z$1.ZodObject<{
|
|
4522
|
+
read: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>>;
|
|
4523
|
+
}, z$1.core.$strip>>;
|
|
3696
4524
|
media: z$1.ZodOptional<z$1.ZodObject<{
|
|
3697
4525
|
read: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>>;
|
|
3698
4526
|
write: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>>;
|
|
@@ -3719,6 +4547,7 @@ declare const pluginManifestSchema: z$1.ZodObject<{
|
|
|
3719
4547
|
"network:request:unrestricted": "network:request:unrestricted";
|
|
3720
4548
|
"content:read": "content:read";
|
|
3721
4549
|
"content:write": "content:write";
|
|
4550
|
+
"taxonomies:read": "taxonomies:read";
|
|
3722
4551
|
"media:read": "media:read";
|
|
3723
4552
|
"media:write": "media:write";
|
|
3724
4553
|
"users:read": "users:read";
|
|
@@ -3803,7 +4632,20 @@ declare const pluginManifestSchema: z$1.ZodObject<{
|
|
|
3803
4632
|
routes: z$1.ZodArray<z$1.ZodUnion<readonly [z$1.ZodString, z$1.ZodObject<{
|
|
3804
4633
|
name: z$1.ZodString;
|
|
3805
4634
|
public: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
4635
|
+
permission: z$1.ZodOptional<z$1.ZodString>;
|
|
4636
|
+
cacheControl: z$1.ZodOptional<z$1.ZodString>;
|
|
3806
4637
|
}, z$1.core.$strip>]>>;
|
|
4638
|
+
mcp: z$1.ZodOptional<z$1.ZodObject<{
|
|
4639
|
+
tools: z$1.ZodArray<z$1.ZodObject<{
|
|
4640
|
+
name: z$1.ZodString;
|
|
4641
|
+
description: z$1.ZodString;
|
|
4642
|
+
route: z$1.ZodString;
|
|
4643
|
+
permission: z$1.ZodString;
|
|
4644
|
+
destructive: z$1.ZodBoolean;
|
|
4645
|
+
inputSchema: z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>;
|
|
4646
|
+
outputSchema: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>>;
|
|
4647
|
+
}, z$1.core.$strip>>;
|
|
4648
|
+
}, z$1.core.$strip>>;
|
|
3807
4649
|
admin: z$1.ZodObject<{
|
|
3808
4650
|
entry: z$1.ZodOptional<z$1.ZodString>;
|
|
3809
4651
|
settingsSchema: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
@@ -3871,13 +4713,13 @@ declare const pluginManifestSchema: z$1.ZodObject<{
|
|
|
3871
4713
|
string: "string";
|
|
3872
4714
|
number: "number";
|
|
3873
4715
|
boolean: "boolean";
|
|
3874
|
-
slug: "slug";
|
|
3875
|
-
text: "text";
|
|
3876
|
-
select: "select";
|
|
3877
4716
|
file: "file";
|
|
4717
|
+
slug: "slug";
|
|
3878
4718
|
image: "image";
|
|
3879
4719
|
datetime: "datetime";
|
|
4720
|
+
text: "text";
|
|
3880
4721
|
integer: "integer";
|
|
4722
|
+
select: "select";
|
|
3881
4723
|
multiSelect: "multiSelect";
|
|
3882
4724
|
portableText: "portableText";
|
|
3883
4725
|
reference: "reference";
|
|
@@ -5116,6 +5958,23 @@ declare class FTSManager {
|
|
|
5116
5958
|
* Get searchable fields for a collection
|
|
5117
5959
|
*/
|
|
5118
5960
|
getSearchableFields(collectionSlug: string): Promise<string[]>;
|
|
5961
|
+
/**
|
|
5962
|
+
* Whether a collection has a user-defined `title` field.
|
|
5963
|
+
*
|
|
5964
|
+
* `title` is not a system column on `ec_*` tables -- it exists only when a
|
|
5965
|
+
* collection defines a field with slug `title`. Search and suggestion SQL
|
|
5966
|
+
* that selects `c.title` must check this first; otherwise collections
|
|
5967
|
+
* without a title field raise "no such column: c.title" (#1178).
|
|
5968
|
+
*/
|
|
5969
|
+
hasTitleColumn(collectionSlug: string): Promise<boolean>;
|
|
5970
|
+
/**
|
|
5971
|
+
* Bulk variant of `hasTitleColumn()`: which of the given collections have
|
|
5972
|
+
* a user-defined `title` field. One query instead of one `hasTitleColumn`
|
|
5973
|
+
* round-trip pair per collection -- callers that check this once per
|
|
5974
|
+
* collection in a loop (multi-collection search, suggestions) should use
|
|
5975
|
+
* this instead (AGENTS.md: "one query beats two").
|
|
5976
|
+
*/
|
|
5977
|
+
getCollectionsWithTitleColumn(collectionSlugs: string[]): Promise<Set<string>>;
|
|
5119
5978
|
/**
|
|
5120
5979
|
* Enable search for a collection.
|
|
5121
5980
|
*
|
|
@@ -5261,5 +6120,5 @@ declare function extractPlainText(blocks: PortableTextBlock[] | string | null |
|
|
|
5261
6120
|
*/
|
|
5262
6121
|
declare function extractSearchableFields(entry: Record<string, unknown>, fields: string[]): Record<string, string>;
|
|
5263
6122
|
//#endregion
|
|
5264
|
-
export { ReorderMenuItemsInput as $,
|
|
5265
|
-
//# sourceMappingURL=index-
|
|
6123
|
+
export { ReorderMenuItemsInput as $, PluginRouteError as $n, handleContentSchedule as $r, ContentEntry as $t, getEntriesByTerm as A, PortableTextCodeBlock as An, handleMediaList as Ar, pluginManifestSchema as At, TaxonomyTerm as B, ProseMirrorNode as Bn, handleContentCountScheduled as Br, invalidateMenuObjectCache as Bt, ReorderWidgetsInput as C, getDb as Cn, SchemaRegistry as Cr, NoopSandboxRunner as Ct, WidgetComponentDef as D, hashString as Dn, handleMediaCreate as Dr, PluginManager as Dt, WidgetArea as E, computeContentHash as En, MediaResponse as Er, NodeCronScheduler as Et, getTerm as F, PortableTextSpan as Fn, handleRevisionList as Fr, contentNamespace as Ft, getEntriesByByline as G, Section as Gn, handleContentDuplicate as Gr, getFallbackChain as Gt, UpdateTermInput as H, getSections as Hn, handleContentCreate as Hr, invalidateSchemaObjectCache as Ht, getTermsForEntries as I, PortableTextTextBlock as In, handleRevisionRestore as Ir, contentNamespaces as It, CreateMenuInput as J, EmDashRuntime as Jn, handleContentList as Jr, WaitUntilFn as Jt, getMenu as K, SectionSource as Kn, handleContentGet as Kr, getI18nConfig as Kt, invalidateTermCache as L, PortableTextUnknownBlock as Ln, generateManifest as Lr, invalidateBylineObjectCache as Lt, getTaxonomyDef as M, PortableTextImageBlock as Mn, RevisionListResponse as Mr, CacheNamespace as Mt, getTaxonomyDefs as N, PortableTextLinkMark as Nn, RevisionResponse as Nr, CachedQueryOptions as Nt, WidgetType as O, portableTextToProsemirror as On, handleMediaDelete as Or, createPluginManager as Ot, getTaxonomyTerms as P, PortableTextMarkDef as Pn, handleRevisionGet as Pr, cachedQuery as Pt, MenuItemType as Q, SystemCleanupFn as Qn, handleContentRestore as Qr, CollectionResult as Qt, CreateTermInput as R, ProseMirrorDocument as Rn, handleContentAuthors as Rr, invalidateCollectionCache as Rt, PropDef as S, emdashLoader as Sn, SchemaError as Sr, verifyPreviewToken as St, Widget as T, sanitizeHref as Tn, MediaListResponse as Tr, createNoopSandboxRunner as Tt, getByline as U, CreateSectionInput as Un, handleContentDelete as Ur, invalidateTaxonomyObjectCache as Ut, TaxonomyTermRow as V, getSection as Vn, handleContentCountTrashed as Vr, invalidateObjectCache as Vt, getBylineBySlug as W, GetSectionsOptions as Wn, handleContentDiscardDraft as Wr, I18nConfig as Wt, Menu as X, PublishedRef as Xn, handleContentPermanentDelete as Xr, CacheHint as Xt, CreateMenuItemInput as Y, SandboxedPluginEntry as Yn, handleContentListTrashed as Yr, after as Yt, MenuItem as Z, CronScheduler as Zn, handleContentPublish as Zr, CollectionFilter as Zt, getWidgetArea as _, MediaRepository as _i, CollectionFilter$1 as _n, getStoredConfig as _r, PreviewTokenPayload as _t, search as a, reference as ai, TranslationSummary as an, createHttpAccess as ar, getComments as at, CreateWidgetAreaInput as b, EmDashDatabaseError as bi, WhereRange as bn, StorageDescriptor as br, generatePreviewToken as bt, FTSManager as c, FieldDefinition as ci, getEmDashCollection as cn, SandboxEmailSendCallback as cr, getSiteSetting as ct, SearchOptions as d, ImageValue as di, resolveEmDashPath as dn, SandboxRunnerFactory as dr, getPreviewToken as dt, handleContentTranslations as ei, EditFieldMeta as en, RouteMeta as er, UpdateMenuInput as et, SearchResponse as f, PortableTextBlock$1 as fi, CMSAnnotation as fn, SandboxUnavailableError as fr, isPreviewRequest as ft, Suggestion as g, MediaItem as gi, createNoop as gn, PluginDescriptor as gr, GeneratePreviewTokenOptions as gt, SuggestOptions as h, CreateMediaInput as hi, createEditable as hn, EmDashConfig as hr, getPreviewUrl as ht, getSuggestions as i, portableText as ii, ResolvePathResult as in, createHookPipeline as ir, getCommentCount as it, getEntryTerms as j, PortableTextHtmlBlock as jn, handleMediaUpdate as jr, definePlugin as jt, getAllTermsForEntries as k, prosemirrorToPortableText as kn, handleMediaGet as kr, ValidatedPluginManifest as kt, CollectionSearchOptions as l, FieldUIHints as li, getEmDashEntry as ln, SandboxOptions as lr, getSiteSettings as lt, SearchStats as m, UserRepository as mi, FieldAnnotation as mn, SerializedRequest as mr, buildPreviewUrl as mt, extractSearchableFields as n, handleContentUnschedule as ni, EntryResult as nn, HookPipeline as nr, GetCommentsOptions as nt, searchCollection as o, file as oi, TranslationsResult as on, createUnrestrictedHttpAccess as or, getPluginSetting as ot, SearchResult as p, PluginStorageRepository as pi, EditProxy as pn, SandboxedPluginInstance as pr, GetPreviewUrlOptions as pt, getMenus as q, UpdateSectionInput as qn, handleContentGetIncludingTrashed as qr, isI18nEnabled as qt, getSearchStats as r, handleContentUpdate as ri, InferCollectionData as rn, HookResult as rr, GetCommentsResult as rt, searchWithDb as s, image as si, getEditMeta as sn, SandboxEmailMessage as sr, getPluginSettings as st, extractPlainText as t, handleContentUnpublish as ti, EmDashCollections as tn, EmailPipeline as tr, UpdateMenuItemInput as tt, SearchConfig as u, FileValue as ui, getTranslations as un, SandboxRunner as ur, setSiteSettings as ut, getWidgetAreas as v, ContentRepository as vi, EntryData as vn, LocalStorageConfig as vr, VerifyPreviewTokenOptions as vt, UpdateWidgetInput as w, isSafeHref as wn, markContentMediaUsageCollectionStaleSafely as wr, SandboxNotAvailableError as wt, CreateWidgetInput as x, WhereValue as xn, getCollectionInfo as xr, parseContentId as xt, getWidgetComponents as y, DatabaseConfig as yi, EntryFilter as yn, S3StorageConfig as yr, VerifyPreviewTokenResult as yt, TaxonomyDef as z, ProseMirrorMark as zn, handleContentCompare as zr, invalidateCommentObjectCache as zt };
|
|
6124
|
+
//# sourceMappingURL=index-wYnC6u4o.d.mts.map
|