emdash 1.1.0 → 1.3.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/action-token-SK8zyN7w.mjs +26 -0
- package/dist/action-token-SK8zyN7w.mjs.map +1 -0
- package/dist/activation-Dim4YMM7.mjs +387 -0
- package/dist/activation-Dim4YMM7.mjs.map +1 -0
- package/dist/adapters-F_xorvWv.d.mts +173 -0
- package/dist/adapters-F_xorvWv.d.mts.map +1 -0
- package/dist/allowed-origins-CEug-p0t.mjs +116 -0
- package/dist/allowed-origins-CEug-p0t.mjs.map +1 -0
- package/dist/api/route-utils.d.mts +4 -4
- package/dist/api/route-utils.d.mts.map +1 -1
- package/dist/api/route-utils.mjs +48 -46
- package/dist/api/route-utils.mjs.map +1 -1
- package/dist/api/schemas/index.d.mts +2 -2
- package/dist/api/schemas/index.mjs +10 -10
- package/dist/api-D-7BNHoz.mjs +5025 -0
- package/dist/api-D-7BNHoz.mjs.map +1 -0
- package/dist/api-tokens-Bx38ZCQp.mjs +173 -0
- package/dist/api-tokens-Bx38ZCQp.mjs.map +1 -0
- package/dist/apply-T7ATgzCh.mjs +1702 -0
- package/dist/apply-T7ATgzCh.mjs.map +1 -0
- package/dist/approvals-D-m6wvGl.mjs +460 -0
- package/dist/approvals-D-m6wvGl.mjs.map +1 -0
- package/dist/artifact-fetch-DIh7iyOV.mjs +659 -0
- package/dist/artifact-fetch-DIh7iyOV.mjs.map +1 -0
- package/dist/artifacts-htGyfCSt.mjs +307 -0
- package/dist/artifacts-htGyfCSt.mjs.map +1 -0
- package/dist/astro/image-endpoint.d.mts.map +1 -1
- package/dist/astro/image-endpoint.mjs +26 -6
- package/dist/astro/image-endpoint.mjs.map +1 -1
- package/dist/astro/index.d.mts +14 -14
- package/dist/astro/index.d.mts.map +1 -1
- package/dist/astro/index.mjs +324 -23
- package/dist/astro/index.mjs.map +1 -1
- package/dist/astro/middleware/auth.d.mts +12 -12
- package/dist/astro/middleware/auth.d.mts.map +1 -1
- package/dist/astro/middleware/auth.mjs +18 -13
- package/dist/astro/middleware/auth.mjs.map +1 -1
- package/dist/astro/middleware/media-usage-write-fence.mjs +5 -5
- package/dist/astro/middleware/redirect.d.mts.map +1 -1
- package/dist/astro/middleware/redirect.mjs +81 -46
- package/dist/astro/middleware/redirect.mjs.map +1 -1
- package/dist/astro/middleware/request-context.d.mts.map +1 -1
- package/dist/astro/middleware/request-context.mjs +117 -56
- package/dist/astro/middleware/request-context.mjs.map +1 -1
- package/dist/astro/middleware/setup.mjs +1 -1
- package/dist/astro/middleware.d.mts +12 -12
- package/dist/astro/middleware.d.mts.map +1 -1
- package/dist/astro/middleware.mjs +145 -415
- package/dist/astro/middleware.mjs.map +1 -1
- package/dist/astro/routes/api/admin/allowed-domains/_domain_.mjs +14 -14
- package/dist/astro/routes/api/admin/allowed-domains/index.mjs +14 -14
- package/dist/astro/routes/api/admin/api-tokens/_id_.mjs +7 -6
- package/dist/astro/routes/api/admin/api-tokens/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/admin/api-tokens/index.mjs +8 -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 +16 -16
- package/dist/astro/routes/api/admin/byline-fields/index.mjs +16 -16
- package/dist/astro/routes/api/admin/byline-fields/reorder.mjs +16 -16
- package/dist/astro/routes/api/admin/bylines/_id_/index.mjs +22 -21
- package/dist/astro/routes/api/admin/bylines/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs +22 -21
- package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs.map +1 -1
- package/dist/astro/routes/api/admin/bylines/index.mjs +22 -21
- package/dist/astro/routes/api/admin/bylines/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/comments/_id_/status.mjs +18 -18
- package/dist/astro/routes/api/admin/comments/_id_.mjs +7 -7
- package/dist/astro/routes/api/admin/comments/bulk.mjs +17 -17
- package/dist/astro/routes/api/admin/comments/counts.mjs +7 -7
- package/dist/astro/routes/api/admin/comments/index.mjs +17 -17
- package/dist/astro/routes/api/admin/core-update.mjs +7 -7
- 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/activation.mjs +20 -20
- package/dist/astro/routes/api/admin/media-usage/collection-deletions/index.mjs +21 -21
- package/dist/astro/routes/api/admin/media-usage/collection-deletions/retry.mjs +21 -21
- package/dist/astro/routes/api/admin/media-usage/progress.mjs +23 -22
- package/dist/astro/routes/api/admin/media-usage/progress.mjs.map +1 -1
- package/dist/astro/routes/api/admin/media-usage/repair.mjs +29 -28
- package/dist/astro/routes/api/admin/media-usage/repair.mjs.map +1 -1
- package/dist/astro/routes/api/admin/media-usage/work/index.mjs +21 -21
- package/dist/astro/routes/api/admin/media-usage/work/retry.mjs +21 -21
- package/dist/astro/routes/api/admin/oauth-clients/_id_.mjs +6 -6
- package/dist/astro/routes/api/admin/oauth-clients/index.mjs +6 -6
- package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs +8 -8
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +8 -8
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +72 -70
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/mcp.mjs +7 -7
- package/dist/astro/routes/api/admin/plugins/_id_/settings.mjs +71 -69
- package/dist/astro/routes/api/admin/plugins/_id_/settings.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +71 -70
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs +80 -79
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/index.mjs +72 -70
- package/dist/astro/routes/api/admin/plugins/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/icon.mjs +7 -7
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs +71 -69
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs +79 -78
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +71 -69
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.mjs +71 -70
- package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/_id_/update.mjs +81 -80
- package/dist/astro/routes/api/admin/plugins/registry/_id_/update.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/artifact.mjs +10 -10
- package/dist/astro/routes/api/admin/plugins/registry/artifact.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/install.mjs +73 -72
- package/dist/astro/routes/api/admin/plugins/registry/install.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/publisher-handle.mjs +7 -7
- package/dist/astro/routes/api/admin/plugins/registry/verify.mjs +72 -70
- package/dist/astro/routes/api/admin/plugins/registry/verify.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/updates.mjs +71 -69
- package/dist/astro/routes/api/admin/plugins/updates.mjs.map +1 -1
- package/dist/astro/routes/api/admin/scheduled-policy-rejections/_collection_/_id_.mjs +5 -5
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +71 -69
- 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 +7 -7
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs +71 -69
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/_...path_.mjs +4 -4
- package/dist/astro/routes/api/admin/transfer/approvals/_id_/approve.mjs +38 -37
- package/dist/astro/routes/api/admin/transfer/approvals/_id_/approve.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/approvals/_id_/deny.mjs +38 -37
- package/dist/astro/routes/api/admin/transfer/approvals/_id_/deny.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/approvals/index.mjs +40 -39
- package/dist/astro/routes/api/admin/transfer/approvals/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/capabilities.mjs +40 -39
- package/dist/astro/routes/api/admin/transfer/capabilities.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/exports/_id_/advance.mjs +40 -39
- package/dist/astro/routes/api/admin/transfer/exports/_id_/advance.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/exports/_id_/archive.mjs +41 -40
- package/dist/astro/routes/api/admin/transfer/exports/_id_/archive.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/exports/_id_/files/_...path_.mjs +41 -40
- package/dist/astro/routes/api/admin/transfer/exports/_id_/files/_...path_.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/exports/_id_/index.mjs +40 -39
- package/dist/astro/routes/api/admin/transfer/exports/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/exports/_id_/manifest.mjs +41 -40
- package/dist/astro/routes/api/admin/transfer/exports/_id_/manifest.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/exports/index.mjs +42 -41
- package/dist/astro/routes/api/admin/transfer/exports/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/imports/_id_/abandon.mjs +40 -39
- package/dist/astro/routes/api/admin/transfer/imports/_id_/abandon.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/imports/_id_/advance.mjs +40 -39
- package/dist/astro/routes/api/admin/transfer/imports/_id_/advance.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/imports/_id_/analyze.mjs +42 -41
- package/dist/astro/routes/api/admin/transfer/imports/_id_/analyze.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/imports/_id_/cancel.mjs +40 -39
- package/dist/astro/routes/api/admin/transfer/imports/_id_/cancel.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/imports/_id_/execute.mjs +42 -41
- package/dist/astro/routes/api/admin/transfer/imports/_id_/execute.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/imports/_id_/files/_...path_.mjs +40 -39
- package/dist/astro/routes/api/admin/transfer/imports/_id_/files/_...path_.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/imports/_id_/index.mjs +40 -39
- package/dist/astro/routes/api/admin/transfer/imports/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/imports/_id_/missing.mjs +42 -41
- package/dist/astro/routes/api/admin/transfer/imports/_id_/missing.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/imports/_id_/plan.mjs +40 -39
- package/dist/astro/routes/api/admin/transfer/imports/_id_/plan.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/imports/_id_/receipt.mjs +40 -39
- package/dist/astro/routes/api/admin/transfer/imports/_id_/receipt.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/imports/index.mjs +42 -41
- package/dist/astro/routes/api/admin/transfer/imports/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/users/_id_/disable.mjs +4 -4
- package/dist/astro/routes/api/admin/users/_id_/enable.mjs +4 -4
- package/dist/astro/routes/api/admin/users/_id_/index.mjs +14 -14
- package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs +6 -6
- package/dist/astro/routes/api/admin/users/index.mjs +14 -14
- package/dist/astro/routes/api/auth/dev-bypass.mjs +6 -6
- package/dist/astro/routes/api/auth/handover.d.mts +8 -0
- package/dist/astro/routes/api/auth/handover.d.mts.map +1 -0
- package/dist/astro/routes/api/auth/handover.mjs +49 -0
- package/dist/astro/routes/api/auth/handover.mjs.map +1 -0
- package/dist/astro/routes/api/auth/invite/accept.mjs +4 -4
- package/dist/astro/routes/api/auth/invite/complete.mjs +19 -19
- package/dist/astro/routes/api/auth/invite/index.mjs +16 -16
- package/dist/astro/routes/api/auth/invite/register-options.mjs +17 -17
- package/dist/astro/routes/api/auth/logout.mjs +5 -5
- package/dist/astro/routes/api/auth/magic-link/send.mjs +19 -18
- package/dist/astro/routes/api/auth/magic-link/send.mjs.map +1 -1
- package/dist/astro/routes/api/auth/magic-link/verify.d.mts.map +1 -1
- package/dist/astro/routes/api/auth/magic-link/verify.mjs +23 -17
- package/dist/astro/routes/api/auth/magic-link/verify.mjs.map +1 -1
- package/dist/astro/routes/api/auth/me.mjs +15 -15
- package/dist/astro/routes/api/auth/mode.mjs +5 -5
- package/dist/astro/routes/api/auth/oauth/_provider_/callback.mjs +8 -8
- package/dist/astro/routes/api/auth/oauth/_provider_.mjs +2 -2
- package/dist/astro/routes/api/auth/passkey/_id_.mjs +14 -14
- package/dist/astro/routes/api/auth/passkey/index.mjs +4 -4
- package/dist/astro/routes/api/auth/passkey/options.d.mts.map +1 -1
- package/dist/astro/routes/api/auth/passkey/options.mjs +27 -20
- package/dist/astro/routes/api/auth/passkey/options.mjs.map +1 -1
- package/dist/astro/routes/api/auth/passkey/register/options.mjs +17 -17
- package/dist/astro/routes/api/auth/passkey/register/verify.mjs +18 -18
- package/dist/astro/routes/api/auth/passkey/verify.mjs +19 -19
- package/dist/astro/routes/api/auth/signup/complete.mjs +19 -19
- package/dist/astro/routes/api/auth/signup/request.mjs +18 -17
- 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/calendar.mjs +15 -15
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs +12 -12
- package/dist/astro/routes/api/comments/_collection_/_contentId_/reactions.mjs +18 -18
- package/dist/astro/routes/api/content/_collection_/_id_/compare.mjs +5 -5
- package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.d.mts.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs +18 -17
- package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/duplicate.mjs +7 -10
- package/dist/astro/routes/api/content/_collection_/_id_/duplicate.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/lock.mjs +20 -17
- package/dist/astro/routes/api/content/_collection_/_id_/lock.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/permanent.d.mts.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/permanent.mjs +7 -6
- package/dist/astro/routes/api/content/_collection_/_id_/permanent.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/plugin-extensions/_pluginId_/_kind_/_extensionId_.mjs +11 -11
- package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs +30 -29
- package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/publish.d.mts.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs +18 -17
- package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/children.mjs +35 -34
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/children.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/parents.mjs +35 -34
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/parents.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/restore.d.mts.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/restore.mjs +7 -6
- 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_/schedule.d.mts.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs +19 -18
- 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 +31 -26
- 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_/unpublish.d.mts.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs +18 -17
- 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 +27 -20
- 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_/index.mjs +18 -21
- package/dist/astro/routes/api/content/_collection_/index.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/trash.mjs +15 -15
- package/dist/astro/routes/api/dashboard.d.mts.map +1 -1
- package/dist/astro/routes/api/dashboard.mjs +18 -12
- package/dist/astro/routes/api/dashboard.mjs.map +1 -1
- package/dist/astro/routes/api/dev/emails.mjs +5 -5
- package/dist/astro/routes/api/dev/scheduled-tasks.d.mts +12 -0
- package/dist/astro/routes/api/dev/scheduled-tasks.d.mts.map +1 -0
- package/dist/astro/routes/api/dev/scheduled-tasks.mjs +140 -0
- package/dist/astro/routes/api/dev/scheduled-tasks.mjs.map +1 -0
- package/dist/astro/routes/api/health.mjs +6 -6
- package/dist/astro/routes/api/import/probe.d.mts +3 -3
- package/dist/astro/routes/api/import/probe.mjs +25 -23
- package/dist/astro/routes/api/import/probe.mjs.map +1 -1
- package/dist/astro/routes/api/import/wordpress/analyze.d.mts.map +1 -1
- package/dist/astro/routes/api/import/wordpress/analyze.mjs +7 -20
- package/dist/astro/routes/api/import/wordpress/analyze.mjs.map +1 -1
- package/dist/astro/routes/api/import/wordpress/execute.d.mts +15 -14
- package/dist/astro/routes/api/import/wordpress/execute.d.mts.map +1 -1
- package/dist/astro/routes/api/import/wordpress/execute.mjs +36 -30
- package/dist/astro/routes/api/import/wordpress/execute.mjs.map +1 -1
- package/dist/astro/routes/api/import/wordpress/media.d.mts +12 -12
- package/dist/astro/routes/api/import/wordpress/media.mjs +17 -17
- package/dist/astro/routes/api/import/wordpress/prepare.mjs +19 -17
- package/dist/astro/routes/api/import/wordpress/prepare.mjs.map +1 -1
- package/dist/astro/routes/api/import/wordpress/rewrite-url-helpers.d.mts +8 -0
- package/dist/astro/routes/api/import/wordpress/rewrite-url-helpers.d.mts.map +1 -1
- package/dist/astro/routes/api/import/wordpress/rewrite-url-helpers.mjs +67 -31
- package/dist/astro/routes/api/import/wordpress/rewrite-url-helpers.mjs.map +1 -1
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.d.mts +13 -13
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs +27 -26
- 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 +26 -23
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs.map +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/execute.d.mts +13 -13
- package/dist/astro/routes/api/import/wordpress-plugin/execute.d.mts.map +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs +63 -35
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs.map +1 -1
- package/dist/astro/routes/api/manifest.mjs +9 -6
- package/dist/astro/routes/api/manifest.mjs.map +1 -1
- package/dist/astro/routes/api/mcp.mjs +135 -101
- package/dist/astro/routes/api/mcp.mjs.map +1 -1
- package/dist/astro/routes/api/media/_id_/confirm.d.mts.map +1 -1
- package/dist/astro/routes/api/media/_id_/confirm.mjs +34 -18
- package/dist/astro/routes/api/media/_id_/confirm.mjs.map +1 -1
- package/dist/astro/routes/api/media/_id_/replace.mjs +15 -15
- package/dist/astro/routes/api/media/_id_/upload.mjs +8 -8
- package/dist/astro/routes/api/media/_id_/usage.mjs +31 -30
- package/dist/astro/routes/api/media/_id_/usage.mjs.map +1 -1
- package/dist/astro/routes/api/media/_id_.mjs +29 -28
- package/dist/astro/routes/api/media/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/media/asset/_id_/_filename_.mjs +6 -6
- package/dist/astro/routes/api/media/file/_...key_.d.mts.map +1 -1
- package/dist/astro/routes/api/media/file/_...key_.mjs +45 -15
- package/dist/astro/routes/api/media/file/_...key_.mjs.map +1 -1
- package/dist/astro/routes/api/media/folders/_id_.mjs +16 -16
- package/dist/astro/routes/api/media/folders/index.mjs +16 -16
- package/dist/astro/routes/api/media/providers/_providerId_/_itemId_.mjs +5 -5
- package/dist/astro/routes/api/media/providers/_providerId_/index.mjs +5 -5
- package/dist/astro/routes/api/media/providers/index.mjs +5 -5
- package/dist/astro/routes/api/media/upload-url.mjs +40 -20
- 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 +40 -29
- package/dist/astro/routes/api/media.mjs.map +1 -1
- package/dist/astro/routes/api/menus/_name_/items/_id_.d.mts.map +1 -1
- package/dist/astro/routes/api/menus/_name_/items/_id_.mjs +19 -18
- package/dist/astro/routes/api/menus/_name_/items/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/menus/_name_/items.d.mts.map +1 -1
- package/dist/astro/routes/api/menus/_name_/items.mjs +18 -17
- package/dist/astro/routes/api/menus/_name_/items.mjs.map +1 -1
- package/dist/astro/routes/api/menus/_name_/reorder.d.mts.map +1 -1
- package/dist/astro/routes/api/menus/_name_/reorder.mjs +18 -17
- package/dist/astro/routes/api/menus/_name_/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/menus/_name_/translations.d.mts.map +1 -1
- package/dist/astro/routes/api/menus/_name_/translations.mjs +18 -17
- package/dist/astro/routes/api/menus/_name_/translations.mjs.map +1 -1
- package/dist/astro/routes/api/menus/_name_.d.mts.map +1 -1
- package/dist/astro/routes/api/menus/_name_.mjs +19 -18
- package/dist/astro/routes/api/menus/_name_.mjs.map +1 -1
- package/dist/astro/routes/api/menus/index.d.mts.map +1 -1
- package/dist/astro/routes/api/menus/index.mjs +18 -17
- package/dist/astro/routes/api/menus/index.mjs.map +1 -1
- package/dist/astro/routes/api/oauth/authorize.mjs +6 -6
- package/dist/astro/routes/api/oauth/device/authorize.mjs +8 -8
- package/dist/astro/routes/api/oauth/device/code.mjs +12 -11
- package/dist/astro/routes/api/oauth/device/code.mjs.map +1 -1
- package/dist/astro/routes/api/oauth/device/token.mjs +11 -10
- package/dist/astro/routes/api/oauth/device/token.mjs.map +1 -1
- package/dist/astro/routes/api/oauth/register.mjs +8 -7
- package/dist/astro/routes/api/oauth/register.mjs.map +1 -1
- package/dist/astro/routes/api/oauth/token/refresh.mjs +8 -8
- package/dist/astro/routes/api/oauth/token/revoke.mjs +8 -8
- package/dist/astro/routes/api/oauth/token.mjs +8 -8
- package/dist/astro/routes/api/openapi.json.mjs +22 -22
- package/dist/astro/routes/api/openapi.json.mjs.map +1 -1
- package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs +11 -11
- package/dist/astro/routes/api/redirects/404s/index.mjs +19 -19
- package/dist/astro/routes/api/redirects/404s/summary.mjs +19 -19
- package/dist/astro/routes/api/redirects/_id_.d.mts.map +1 -1
- package/dist/astro/routes/api/redirects/_id_.mjs +32 -23
- package/dist/astro/routes/api/redirects/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/redirects/index.d.mts.map +1 -1
- package/dist/astro/routes/api/redirects/index.mjs +24 -21
- package/dist/astro/routes/api/redirects/index.mjs.map +1 -1
- package/dist/astro/routes/api/relations/_id_/index.mjs +35 -34
- package/dist/astro/routes/api/relations/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/relations/index.mjs +35 -34
- package/dist/astro/routes/api/relations/index.mjs.map +1 -1
- package/dist/astro/routes/api/revisions/_revisionId_/index.mjs +5 -5
- package/dist/astro/routes/api/revisions/_revisionId_/restore.mjs +16 -16
- package/dist/astro/routes/api/schema/block-types/_slug_/index.mjs +71 -69
- package/dist/astro/routes/api/schema/block-types/_slug_/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/block-types/_slug_/versions/_version_/activate.mjs +71 -69
- package/dist/astro/routes/api/schema/block-types/_slug_/versions/_version_/activate.mjs.map +1 -1
- package/dist/astro/routes/api/schema/block-types/index.mjs +71 -69
- package/dist/astro/routes/api/schema/block-types/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs +71 -69
- package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs +71 -69
- 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 +71 -69
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +71 -69
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/index.mjs +71 -69
- package/dist/astro/routes/api/schema/collections/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/reorder.mjs +71 -69
- package/dist/astro/routes/api/schema/collections/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/schema/index.mjs +17 -16
- package/dist/astro/routes/api/schema/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs +71 -69
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs.map +1 -1
- package/dist/astro/routes/api/schema/orphans/index.mjs +71 -69
- package/dist/astro/routes/api/schema/orphans/index.mjs.map +1 -1
- package/dist/astro/routes/api/search/enable.mjs +19 -18
- package/dist/astro/routes/api/search/enable.mjs.map +1 -1
- package/dist/astro/routes/api/search/index.mjs +18 -17
- package/dist/astro/routes/api/search/index.mjs.map +1 -1
- package/dist/astro/routes/api/search/rebuild.mjs +19 -18
- package/dist/astro/routes/api/search/rebuild.mjs.map +1 -1
- package/dist/astro/routes/api/search/stats.mjs +9 -8
- package/dist/astro/routes/api/search/stats.mjs.map +1 -1
- package/dist/astro/routes/api/search/suggest.mjs +18 -17
- package/dist/astro/routes/api/search/suggest.mjs.map +1 -1
- package/dist/astro/routes/api/sections/_slug_.mjs +18 -17
- package/dist/astro/routes/api/sections/_slug_.mjs.map +1 -1
- package/dist/astro/routes/api/sections/index.mjs +18 -17
- package/dist/astro/routes/api/sections/index.mjs.map +1 -1
- package/dist/astro/routes/api/settings/backups/archives/_name_.mjs +7 -7
- package/dist/astro/routes/api/settings/backups/archives/index.mjs +7 -7
- package/dist/astro/routes/api/settings/backups/export.mjs +7 -7
- package/dist/astro/routes/api/settings/backups/index.mjs +8 -8
- package/dist/astro/routes/api/settings/domain-notify.d.mts +8 -0
- package/dist/astro/routes/api/settings/domain-notify.d.mts.map +1 -0
- package/dist/astro/routes/api/settings/domain-notify.mjs +125 -0
- package/dist/astro/routes/api/settings/domain-notify.mjs.map +1 -0
- package/dist/astro/routes/api/settings/domain.d.mts +9 -0
- package/dist/astro/routes/api/settings/domain.d.mts.map +1 -0
- package/dist/astro/routes/api/settings/domain.mjs +64 -0
- package/dist/astro/routes/api/settings/domain.mjs.map +1 -0
- package/dist/astro/routes/api/settings/email.mjs +6 -6
- package/dist/astro/routes/api/settings.d.mts.map +1 -1
- package/dist/astro/routes/api/settings.mjs +23 -20
- package/dist/astro/routes/api/settings.mjs.map +1 -1
- package/dist/astro/routes/api/setup/admin-verify.d.mts.map +1 -1
- package/dist/astro/routes/api/setup/admin-verify.mjs +25 -21
- package/dist/astro/routes/api/setup/admin-verify.mjs.map +1 -1
- package/dist/astro/routes/api/setup/admin.mjs +18 -18
- package/dist/astro/routes/api/setup/dev-bypass.mjs +43 -41
- package/dist/astro/routes/api/setup/dev-bypass.mjs.map +1 -1
- package/dist/astro/routes/api/setup/dev-reset.mjs +4 -4
- package/dist/astro/routes/api/setup/index.d.mts.map +1 -1
- package/dist/astro/routes/api/setup/index.mjs +53 -47
- package/dist/astro/routes/api/setup/index.mjs.map +1 -1
- package/dist/astro/routes/api/setup/status.mjs +6 -6
- package/dist/astro/routes/api/site/domain-proof.d.mts +8 -0
- package/dist/astro/routes/api/site/domain-proof.d.mts.map +1 -0
- package/dist/astro/routes/api/site/domain-proof.mjs +35 -0
- package/dist/astro/routes/api/site/domain-proof.mjs.map +1 -0
- package/dist/astro/routes/api/snapshot.mjs +8 -8
- package/dist/astro/routes/api/taxonomies/_name_/reorder.d.mts.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/reorder.mjs +24 -22
- package/dist/astro/routes/api/taxonomies/_name_/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.d.mts.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs +24 -22
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.d.mts.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs +25 -23
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.d.mts.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs +24 -22
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/translations.mjs +22 -21
- package/dist/astro/routes/api/taxonomies/_name_/translations.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_.d.mts.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_.mjs +25 -23
- package/dist/astro/routes/api/taxonomies/_name_.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/bulk-tag.mjs +35 -34
- package/dist/astro/routes/api/taxonomies/bulk-tag.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/index.d.mts.map +1 -1
- package/dist/astro/routes/api/taxonomies/index.mjs +24 -22
- package/dist/astro/routes/api/taxonomies/index.mjs.map +1 -1
- package/dist/astro/routes/api/themes/preview.mjs +6 -6
- package/dist/astro/routes/api/typegen.mjs +6 -6
- package/dist/astro/routes/api/visual-editing/action-token.mjs +6 -6
- package/dist/astro/routes/api/visual-editing/content/_collection_/_id_/publish.mjs +18 -18
- package/dist/astro/routes/api/visual-editing/toolbar-labels.mjs +4 -4
- package/dist/astro/routes/api/well-known/auth.mjs +1 -1
- package/dist/astro/routes/api/well-known/oauth-authorization-server.mjs +2 -2
- package/dist/astro/routes/api/well-known/oauth-protected-resource.mjs +2 -2
- package/dist/astro/routes/api/widget-areas/_name_/reorder.d.mts.map +1 -1
- package/dist/astro/routes/api/widget-areas/_name_/reorder.mjs +17 -16
- package/dist/astro/routes/api/widget-areas/_name_/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.d.mts.map +1 -1
- package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs +21 -19
- package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/widget-areas/_name_/widgets.d.mts.map +1 -1
- package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs +20 -18
- package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs.map +1 -1
- package/dist/astro/routes/api/widget-areas/_name_.d.mts.map +1 -1
- package/dist/astro/routes/api/widget-areas/_name_.mjs +10 -8
- package/dist/astro/routes/api/widget-areas/_name_.mjs.map +1 -1
- package/dist/astro/routes/api/widget-areas/index.d.mts.map +1 -1
- package/dist/astro/routes/api/widget-areas/index.mjs +20 -18
- package/dist/astro/routes/api/widget-areas/index.mjs.map +1 -1
- package/dist/astro/routes/api/widget-components.mjs +5 -5
- package/dist/astro/routes/robots.txt.d.mts.map +1 -1
- package/dist/astro/routes/robots.txt.mjs +38 -5
- package/dist/astro/routes/robots.txt.mjs.map +1 -1
- package/dist/astro/routes/sitemap-_collection_.xml.d.mts.map +1 -1
- package/dist/astro/routes/sitemap-_collection_.xml.mjs +33 -11
- package/dist/astro/routes/sitemap-_collection_.xml.mjs.map +1 -1
- package/dist/astro/routes/sitemap.xml.d.mts.map +1 -1
- package/dist/astro/routes/sitemap.xml.mjs +17 -11
- package/dist/astro/routes/sitemap.xml.mjs.map +1 -1
- package/dist/astro/types.d.mts +32 -18
- package/dist/astro/types.d.mts.map +1 -1
- package/dist/audit-_gieLVGU.mjs +127 -0
- package/dist/audit-_gieLVGU.mjs.map +1 -0
- package/dist/auth/providers/github.d.mts +1 -1
- package/dist/auth/providers/google.d.mts +1 -1
- package/dist/auth/providers/microsoft.d.mts +1 -1
- package/dist/authoritative-records-CQlB3JzE.mjs +5183 -0
- package/dist/authoritative-records-CQlB3JzE.mjs.map +1 -0
- package/dist/authorize-DPFBGbE6.mjs +74 -0
- package/dist/authorize-DPFBGbE6.mjs.map +1 -0
- package/dist/backup-3FgVxiDJ.mjs +246 -0
- package/dist/backup-3FgVxiDJ.mjs.map +1 -0
- package/dist/block-types-CYcG56JB.mjs +132 -0
- package/dist/block-types-CYcG56JB.mjs.map +1 -0
- package/dist/block-values-gCX4HBSl.mjs +215 -0
- package/dist/block-values-gCX4HBSl.mjs.map +1 -0
- package/dist/byline-BR1qhyiw.mjs +909 -0
- package/dist/byline-BR1qhyiw.mjs.map +1 -0
- package/dist/byline-fields-4ClDC88c.mjs +123 -0
- package/dist/byline-fields-4ClDC88c.mjs.map +1 -0
- package/dist/byline-fields-BLXZnX7N.mjs +280 -0
- package/dist/byline-fields-BLXZnX7N.mjs.map +1 -0
- package/dist/bylines-CVOvRUL7.mjs +234 -0
- package/dist/bylines-CVOvRUL7.mjs.map +1 -0
- package/dist/bylines-DxOs9B7z.mjs +150 -0
- package/dist/bylines-DxOs9B7z.mjs.map +1 -0
- package/dist/cache-CEU9wo_h.mjs +151 -0
- package/dist/cache-CEU9wo_h.mjs.map +1 -0
- package/dist/canonical-BudtH-Fx.mjs +174 -0
- package/dist/canonical-BudtH-Fx.mjs.map +1 -0
- package/dist/capture-triggers-CT6dK9zd.mjs +362 -0
- package/dist/capture-triggers-CT6dK9zd.mjs.map +1 -0
- package/dist/challenge-store-C17BYx2-.mjs +51 -0
- package/dist/challenge-store-C17BYx2-.mjs.map +1 -0
- package/dist/checksum-CEqvfxGX.mjs +162 -0
- package/dist/checksum-CEqvfxGX.mjs.map +1 -0
- package/dist/chunks-xC4UD5-S.mjs +25 -0
- package/dist/chunks-xC4UD5-S.mjs.map +1 -0
- package/dist/cli/index.mjs +134 -118
- package/dist/cli/index.mjs.map +1 -1
- package/dist/client/cf-access.d.mts +1 -1
- package/dist/client/index.d.mts +122 -122
- package/dist/client/index.d.mts.map +1 -1
- package/dist/client/index.mjs +12 -10
- package/dist/client/index.mjs.map +1 -1
- package/dist/collection-slugs-cache-e09QeJQt.mjs +85 -0
- package/dist/collection-slugs-cache-e09QeJQt.mjs.map +1 -0
- package/dist/comment-UvIWDKcW.mjs +325 -0
- package/dist/comment-UvIWDKcW.mjs.map +1 -0
- package/dist/comment-reaction-dGp6_FRo.mjs +85 -0
- package/dist/comment-reaction-dGp6_FRo.mjs.map +1 -0
- package/dist/comments-pej-_BUO.mjs +195 -0
- package/dist/comments-pej-_BUO.mjs.map +1 -0
- package/dist/comments-yiRFx3w5.mjs +99 -0
- package/dist/comments-yiRFx3w5.mjs.map +1 -0
- package/dist/components-Brp__9xo.mjs +112 -0
- package/dist/components-Brp__9xo.mjs.map +1 -0
- package/dist/config-Bsm_u_oE.d.mts +6799 -0
- package/dist/config-Bsm_u_oE.d.mts.map +1 -0
- package/dist/config-CFMojMFK.d.mts +39 -0
- package/dist/config-CFMojMFK.d.mts.map +1 -0
- package/dist/config-DBU6iUQB.mjs +228 -0
- package/dist/config-DBU6iUQB.mjs.map +1 -0
- package/dist/connection-BtEN_lP9.mjs +36 -0
- package/dist/connection-BtEN_lP9.mjs.map +1 -0
- package/dist/content-DQSRZTVw.mjs +2075 -0
- package/dist/content-DQSRZTVw.mjs.map +1 -0
- package/dist/content-list-query-CYKcY6Vi.d.mts +26 -0
- package/dist/content-list-query-CYKcY6Vi.d.mts.map +1 -0
- package/dist/content-repair-DNh5--x5.mjs +442 -0
- package/dist/content-repair-DNh5--x5.mjs.map +1 -0
- package/dist/context-BYptmCN0.mjs +2090 -0
- package/dist/context-BYptmCN0.mjs.map +1 -0
- package/dist/credits-B9iORdWB.mjs +110 -0
- package/dist/credits-B9iORdWB.mjs.map +1 -0
- package/dist/cron-D7obTIfk.mjs +306 -0
- package/dist/cron-D7obTIfk.mjs.map +1 -0
- package/dist/dashboard-D0jcgBD7.mjs +167 -0
- package/dist/dashboard-D0jcgBD7.mjs.map +1 -0
- package/dist/database/migration-lock.d.mts +17 -4
- package/dist/database/migration-lock.d.mts.map +1 -1
- package/dist/database/migration-lock.mjs +32 -5
- package/dist/database/migration-lock.mjs.map +1 -1
- package/dist/db/index.d.mts +3 -3
- package/dist/db/index.mjs +1 -1
- package/dist/db/libsql-migrations.d.mts +1 -1
- package/dist/db/libsql-migrations.mjs +4 -4
- package/dist/db/libsql.d.mts +1 -1
- package/dist/db/postgres-migrations.d.mts +1 -1
- package/dist/db/postgres-migrations.mjs +4 -4
- package/dist/db/postgres.d.mts +1 -1
- package/dist/db/sqlite-migrations.d.mts +1 -1
- package/dist/db/sqlite-migrations.mjs +4 -4
- package/dist/db/sqlite.d.mts +1 -1
- package/dist/db/sqlite.mjs +1 -1
- package/dist/default-C0W-PhAp.mjs +81 -0
- package/dist/default-C0W-PhAp.mjs.map +1 -0
- package/dist/deferred-tasks-ZvUECSzI.d.mts +9 -0
- package/dist/deferred-tasks-ZvUECSzI.d.mts.map +1 -0
- package/dist/dev-typegen-EBni_pOQ.mjs +29 -0
- package/dist/dev-typegen-EBni_pOQ.mjs.map +1 -0
- package/dist/device-flow-BkFKBoAn.mjs +521 -0
- package/dist/device-flow-BkFKBoAn.mjs.map +1 -0
- package/dist/digest-DJ1tHCgy.mjs +194 -0
- package/dist/digest-DJ1tHCgy.mjs.map +1 -0
- package/dist/direct-executor-Cbxzg4qe.mjs +117 -0
- package/dist/direct-executor-Cbxzg4qe.mjs.map +1 -0
- package/dist/email-console-FFVJWb9N.mjs +50 -0
- package/dist/email-console-FFVJWb9N.mjs.map +1 -0
- package/dist/email-locale-BJ8DjTzZ.mjs +25 -0
- package/dist/email-locale-BJ8DjTzZ.mjs.map +1 -0
- package/dist/emdash-runtime-DVi7vtXC.mjs +4379 -0
- package/dist/emdash-runtime-DVi7vtXC.mjs.map +1 -0
- package/dist/entry-lock-C7VX0NGK.d.mts +4568 -0
- package/dist/entry-lock-C7VX0NGK.d.mts.map +1 -0
- package/dist/entry-lock-DLxCffFW.mjs +163 -0
- package/dist/entry-lock-DLxCffFW.mjs.map +1 -0
- package/dist/entry-lock-Df6-XhIu.mjs +1211 -0
- package/dist/entry-lock-Df6-XhIu.mjs.map +1 -0
- package/dist/env-types-C3FCVBWe.mjs +38 -0
- package/dist/env-types-C3FCVBWe.mjs.map +1 -0
- package/dist/error-CVWeIOku.mjs +90 -0
- package/dist/error-CVWeIOku.mjs.map +1 -0
- package/dist/errors-B4f4It-2.mjs +120 -0
- package/dist/errors-B4f4It-2.mjs.map +1 -0
- package/dist/errors-BOYNdIo3.mjs +479 -0
- package/dist/errors-BOYNdIo3.mjs.map +1 -0
- package/dist/escape-lsNq38PP.mjs +9 -0
- package/dist/escape-lsNq38PP.mjs.map +1 -0
- package/dist/fence-C3MUitUN.mjs +162 -0
- package/dist/fence-C3MUitUN.mjs.map +1 -0
- package/dist/field-defs-cache-Dez5iWJJ.mjs +77 -0
- package/dist/field-defs-cache-Dez5iWJJ.mjs.map +1 -0
- package/dist/field-map-Bft9LKak.mjs +83 -0
- package/dist/field-map-Bft9LKak.mjs.map +1 -0
- package/dist/fts-manager-Beg3e4bI.mjs +443 -0
- package/dist/fts-manager-Beg3e4bI.mjs.map +1 -0
- package/dist/gc-ByyAYiYE.mjs +75 -0
- package/dist/gc-ByyAYiYE.mjs.map +1 -0
- package/dist/hash-BJaeek87.mjs +37 -0
- package/dist/hash-BJaeek87.mjs.map +1 -0
- package/dist/hook-result-BrdLyOdI.d.mts +31 -0
- package/dist/hook-result-BrdLyOdI.d.mts.map +1 -0
- package/dist/hreflang-C8Jb-hrf.mjs +105 -0
- package/dist/hreflang-C8Jb-hrf.mjs.map +1 -0
- package/dist/hreflang-CY_F5OjF.d.mts +50 -0
- package/dist/hreflang-CY_F5OjF.d.mts.map +1 -0
- package/dist/http-route-dispatch-CyeW6iPv.mjs +342 -0
- package/dist/http-route-dispatch-CyeW6iPv.mjs.map +1 -0
- package/dist/identity-Cael5uTT.mjs +35 -0
- package/dist/identity-Cael5uTT.mjs.map +1 -0
- package/dist/import-BUXjdZUn.mjs +2126 -0
- package/dist/import-BUXjdZUn.mjs.map +1 -0
- package/dist/index-BB9sVisO.d.mts +623 -0
- package/dist/index-BB9sVisO.d.mts.map +1 -0
- package/dist/index.d.mts +24 -24
- package/dist/index.mjs +97 -95
- package/dist/install-finalization-3JX5qQEA.mjs +58 -0
- package/dist/install-finalization-3JX5qQEA.mjs.map +1 -0
- package/dist/json-recordset-BUjxhr77.mjs +12 -0
- package/dist/json-recordset-BUjxhr77.mjs.map +1 -0
- package/dist/json-schema-v_D_pPNG.mjs +15 -0
- package/dist/json-schema-v_D_pPNG.mjs.map +1 -0
- package/dist/keys-CifIkT0N.mjs +61 -0
- package/dist/keys-CifIkT0N.mjs.map +1 -0
- package/dist/kinds-B_Qcl5pz.mjs +974 -0
- package/dist/kinds-B_Qcl5pz.mjs.map +1 -0
- package/dist/lifecycle-7vUJeFRe.mjs +25 -0
- package/dist/lifecycle-7vUJeFRe.mjs.map +1 -0
- package/dist/load-CdAG9wz-.mjs +28 -0
- package/dist/load-CdAG9wz-.mjs.map +1 -0
- package/dist/loader-CswroUbe.mjs +1380 -0
- package/dist/loader-CswroUbe.mjs.map +1 -0
- package/dist/loops-uA4iTOzd.mjs +205 -0
- package/dist/loops-uA4iTOzd.mjs.map +1 -0
- package/dist/manifest-builder-B8zjuH3f.mjs +189 -0
- package/dist/manifest-builder-B8zjuH3f.mjs.map +1 -0
- package/dist/manifest-schema-DNb4XmTS.mjs +497 -0
- package/dist/manifest-schema-DNb4XmTS.mjs.map +1 -0
- package/dist/marketplace-CqbgeIa7.mjs +257 -0
- package/dist/marketplace-CqbgeIa7.mjs.map +1 -0
- package/dist/media/image-endpoint.d.mts +26 -2
- package/dist/media/image-endpoint.d.mts.map +1 -1
- package/dist/media/image-endpoint.mjs +73 -3
- package/dist/media/image-endpoint.mjs.map +1 -1
- package/dist/media/index.d.mts +1 -1
- package/dist/media/local-runtime.d.mts +14 -14
- package/dist/media/local-runtime.mjs +10 -5
- package/dist/media/local-runtime.mjs.map +1 -1
- package/dist/media--dJRU6i2.mjs +294 -0
- package/dist/media--dJRU6i2.mjs.map +1 -0
- package/dist/media-1WC65OCB.mjs +416 -0
- package/dist/media-1WC65OCB.mjs.map +1 -0
- package/dist/media-Bws9f18T.mjs +373 -0
- package/dist/media-Bws9f18T.mjs.map +1 -0
- package/dist/media-allowlist-BJB7MFx6.mjs +45 -0
- package/dist/media-allowlist-BJB7MFx6.mjs.map +1 -0
- package/dist/media-folders-Dn3C16B8.mjs +210 -0
- package/dist/media-folders-Dn3C16B8.mjs.map +1 -0
- package/dist/media-url-BQgKvpQ5.mjs +43 -0
- package/dist/media-url-BQgKvpQ5.mjs.map +1 -0
- package/dist/media-usage-CF0WVcLO.mjs +282 -0
- package/dist/media-usage-CF0WVcLO.mjs.map +1 -0
- package/dist/media-usage-activation-C9HwVw5w.mjs +78 -0
- package/dist/media-usage-activation-C9HwVw5w.mjs.map +1 -0
- package/dist/media-usage-work-CkLa5-nc.mjs +1036 -0
- package/dist/media-usage-work-CkLa5-nc.mjs.map +1 -0
- package/dist/media-usage-work-m3AWTmmC.mjs +151 -0
- package/dist/media-usage-work-m3AWTmmC.mjs.map +1 -0
- package/dist/menus-BCVSSp1z.mjs +753 -0
- package/dist/menus-BCVSSp1z.mjs.map +1 -0
- package/dist/menus-BSzwObhV.mjs +92 -0
- package/dist/menus-BSzwObhV.mjs.map +1 -0
- package/dist/menus-Cl4kwdt7.mjs +3721 -0
- package/dist/menus-Cl4kwdt7.mjs.map +1 -0
- package/dist/migrations/index.d.mts +1 -1
- package/dist/migrations/index.d.mts.map +1 -1
- package/dist/migrations/index.mjs +3 -3
- package/dist/mode-C-D3qICy.mjs +23 -0
- package/dist/mode-C-D3qICy.mjs.map +1 -0
- package/dist/node-sqlite-compat-CrKzRr0J.mjs +63 -0
- package/dist/node-sqlite-compat-CrKzRr0J.mjs.map +1 -0
- package/dist/oauth-authorization-TpEJrYB7.mjs +274 -0
- package/dist/oauth-authorization-TpEJrYB7.mjs.map +1 -0
- package/dist/oauth-clients-BT0Pg-MO.mjs +266 -0
- package/dist/oauth-clients-BT0Pg-MO.mjs.map +1 -0
- package/dist/oauth-state-store-CHMn_mwc.mjs +50 -0
- package/dist/oauth-state-store-CHMn_mwc.mjs.map +1 -0
- package/dist/oauth-user-lookup-BDgF6IVG.mjs +26 -0
- package/dist/oauth-user-lookup-BDgF6IVG.mjs.map +1 -0
- package/dist/object-cache/memory.d.mts +1 -1
- package/dist/options-DJWaq3Ie.d.mts +81 -0
- package/dist/options-DJWaq3Ie.d.mts.map +1 -0
- package/dist/ownership-MiyA7qKO.mjs +12 -0
- package/dist/ownership-MiyA7qKO.mjs.map +1 -0
- package/dist/page/index.d.mts +2 -2
- package/dist/page/index.mjs +9 -4
- package/dist/page/index.mjs.map +1 -1
- package/dist/parse-CWHOFc6z.d.mts +176 -0
- package/dist/parse-CWHOFc6z.d.mts.map +1 -0
- package/dist/parse-DgQ2NABT.mjs +81 -0
- package/dist/parse-DgQ2NABT.mjs.map +1 -0
- package/dist/passkey-config-D0kdzEao.mjs +46 -0
- package/dist/passkey-config-D0kdzEao.mjs.map +1 -0
- package/dist/paths-biDzFTY2.mjs +77 -0
- package/dist/paths-biDzFTY2.mjs.map +1 -0
- package/dist/patterns-CMNnYCgf.mjs +159 -0
- package/dist/patterns-CMNnYCgf.mjs.map +1 -0
- package/dist/placeholder-D41vk11_.d.mts +306 -0
- package/dist/placeholder-D41vk11_.d.mts.map +1 -0
- package/dist/plan-CCoqxNoU.mjs +135 -0
- package/dist/plan-CCoqxNoU.mjs.map +1 -0
- package/dist/plugin-test-runtime.d.mts +14 -14
- package/dist/plugin-test-runtime.d.mts.map +1 -1
- package/dist/plugin-test-runtime.mjs +110 -108
- package/dist/plugin-tool-name-DDUgN_0p.mjs +27 -0
- package/dist/plugin-tool-name-DDUgN_0p.mjs.map +1 -0
- package/dist/plugin-types.d.mts +2 -2
- package/dist/plugin-utils.d.mts +12 -12
- package/dist/plugin-utils.mjs +1 -1
- package/dist/plugin-utils.mjs.map +1 -1
- package/dist/plugins/adapt-sandbox-entry.d.mts +12 -12
- package/dist/plugins/adapt-sandbox-entry.d.mts.map +1 -1
- package/dist/plugins/adapt-sandbox-entry.mjs +9 -8
- package/dist/plugins/adapt-sandbox-entry.mjs.map +1 -1
- package/dist/plugins/host.d.mts +5 -5
- package/dist/plugins/host.mjs +46 -42
- package/dist/plugins-COJ2L49n.mjs +261 -0
- package/dist/plugins-COJ2L49n.mjs.map +1 -0
- package/dist/policy-DLQ--Hnm.mjs +45 -0
- package/dist/policy-DLQ--Hnm.mjs.map +1 -0
- package/dist/portable-text-BH4zgkSm.mjs +311 -0
- package/dist/portable-text-BH4zgkSm.mjs.map +1 -0
- package/dist/preview-DLexxwp3.mjs +107 -0
- package/dist/preview-DLexxwp3.mjs.map +1 -0
- package/dist/protocol-79kUO7jP.d.mts +65 -0
- package/dist/protocol-79kUO7jP.d.mts.map +1 -0
- package/dist/public-plugin-api-routes-BuAMJ8nN.mjs +316 -0
- package/dist/public-plugin-api-routes-BuAMJ8nN.mjs.map +1 -0
- package/dist/public-submission-Di3TsgzX.mjs +251 -0
- package/dist/public-submission-Di3TsgzX.mjs.map +1 -0
- package/dist/public-url-Bt98vysr.mjs +101 -0
- package/dist/public-url-Bt98vysr.mjs.map +1 -0
- package/dist/query-CpnRlBh8.mjs +1156 -0
- package/dist/query-CpnRlBh8.mjs.map +1 -0
- package/dist/query-haKvLAWl.mjs +41 -0
- package/dist/query-haKvLAWl.mjs.map +1 -0
- package/dist/range-CYfeXgGK.mjs +51 -0
- package/dist/range-CYfeXgGK.mjs.map +1 -0
- package/dist/rate-limit-Xp4d0NBY.mjs +127 -0
- package/dist/rate-limit-Xp4d0NBY.mjs.map +1 -0
- package/dist/receipt-BUsQCOeM.mjs +43 -0
- package/dist/receipt-BUsQCOeM.mjs.map +1 -0
- package/dist/redirect-CQAV7mCo.mjs +19 -0
- package/dist/redirect-CQAV7mCo.mjs.map +1 -0
- package/dist/redirect-DiS_3mA4.mjs +423 -0
- package/dist/redirect-DiS_3mA4.mjs.map +1 -0
- package/dist/redirect-paths-CNYq7w80.mjs +36 -0
- package/dist/redirect-paths-CNYq7w80.mjs.map +1 -0
- package/dist/redirects-BEVSRMa2.mjs +148 -0
- package/dist/redirects-BEVSRMa2.mjs.map +1 -0
- package/dist/redirects-BHpy-VsZ.mjs +446 -0
- package/dist/redirects-BHpy-VsZ.mjs.map +1 -0
- package/dist/registry/testing.mjs +3 -3
- package/dist/registry-TUVaid9Z.mjs +8369 -0
- package/dist/registry-TUVaid9Z.mjs.map +1 -0
- package/dist/relations-CA_QuMTU.mjs +776 -0
- package/dist/relations-CA_QuMTU.mjs.map +1 -0
- package/dist/request-context.d.mts +1 -1
- package/dist/request-meta-bwZ_NsvU.mjs +141 -0
- package/dist/request-meta-bwZ_NsvU.mjs.map +1 -0
- package/dist/resolve-DwNM-CXl.mjs +101 -0
- package/dist/resolve-DwNM-CXl.mjs.map +1 -0
- package/dist/revision-BVp8S0e_.mjs +374 -0
- package/dist/revision-BVp8S0e_.mjs.map +1 -0
- package/dist/route-cache-QSOyDEw0.mjs +20 -0
- package/dist/route-cache-QSOyDEw0.mjs.map +1 -0
- package/dist/route-wire-Ca_HWCZ5.mjs +197 -0
- package/dist/route-wire-Ca_HWCZ5.mjs.map +1 -0
- package/dist/routes-BerZFrvV.mjs +272 -0
- package/dist/routes-BerZFrvV.mjs.map +1 -0
- package/dist/runner-BObHz5FC.d.mts +68 -0
- package/dist/runner-BObHz5FC.d.mts.map +1 -0
- package/dist/runner-C5NeAkBQ.mjs +6595 -0
- package/dist/runner-C5NeAkBQ.mjs.map +1 -0
- package/dist/runtime.d.mts +13 -13
- package/dist/runtime.mjs +3 -2
- package/dist/runtime.mjs.map +1 -1
- package/dist/schema/project-env-types.mjs +40 -36
- package/dist/schema/project-env-types.mjs.map +1 -1
- package/dist/schema-C4OBuv6Z.mjs +13 -0
- package/dist/schema-C4OBuv6Z.mjs.map +1 -0
- package/dist/schema-DJRfvM_o.mjs +815 -0
- package/dist/schema-DJRfvM_o.mjs.map +1 -0
- package/dist/scopes-BU03K7Uo.mjs +34 -0
- package/dist/scopes-BU03K7Uo.mjs.map +1 -0
- package/dist/search-DfVzks89.mjs +450 -0
- package/dist/search-DfVzks89.mjs.map +1 -0
- package/dist/sections-BMy4JVUz.mjs +346 -0
- package/dist/sections-BMy4JVUz.mjs.map +1 -0
- package/dist/seed/index.d.mts +2 -2
- package/dist/seed/index.mjs +38 -34
- package/dist/seo/index.d.mts +3 -3
- package/dist/seo/index.mjs +25 -21
- package/dist/seo/index.mjs.map +1 -1
- package/dist/seo-ClB-dw9w.mjs +188 -0
- package/dist/seo-ClB-dw9w.mjs.map +1 -0
- package/dist/seo-VZYOEy8f.mjs +133 -0
- package/dist/seo-VZYOEy8f.mjs.map +1 -0
- package/dist/service-Bo_usgSk.mjs +150 -0
- package/dist/service-Bo_usgSk.mjs.map +1 -0
- package/dist/session-user-DlpPdf8L.mjs +61 -0
- package/dist/session-user-DlpPdf8L.mjs.map +1 -0
- package/dist/settings-CWb84sDm.mjs +452 -0
- package/dist/settings-CWb84sDm.mjs.map +1 -0
- package/dist/settings-DS914jjE.mjs +66 -0
- package/dist/settings-DS914jjE.mjs.map +1 -0
- package/dist/settings-Dd1uivmQ.mjs +73 -0
- package/dist/settings-Dd1uivmQ.mjs.map +1 -0
- package/dist/setup-complete-BuNxAUiN.mjs +65 -0
- package/dist/setup-complete-BuNxAUiN.mjs.map +1 -0
- package/dist/setup-nonce-BnEAX0iy.mjs +25 -0
- package/dist/setup-nonce-BnEAX0iy.mjs.map +1 -0
- package/dist/site-domain-Bq5j5bVg.mjs +131 -0
- package/dist/site-domain-Bq5j5bVg.mjs.map +1 -0
- package/dist/site-settings-DRHfX7bq.mjs +50 -0
- package/dist/site-settings-DRHfX7bq.mjs.map +1 -0
- package/dist/site-url-MB685I5X.mjs +45 -0
- package/dist/site-url-MB685I5X.mjs.map +1 -0
- package/dist/sitemap-name-BTg2NJJv.mjs +26 -0
- package/dist/sitemap-name-BTg2NJJv.mjs.map +1 -0
- package/dist/slug-aVnUV4SL.mjs +16 -0
- package/dist/slug-aVnUV4SL.mjs.map +1 -0
- package/dist/slugify-bu2-jKia.mjs +22 -0
- package/dist/slugify-bu2-jKia.mjs.map +1 -0
- package/dist/snapshot-DYsG4uOq.mjs +414 -0
- package/dist/snapshot-DYsG4uOq.mjs.map +1 -0
- package/dist/ssrf-BcYjyM4M.mjs +406 -0
- package/dist/ssrf-BcYjyM4M.mjs.map +1 -0
- package/dist/stage-D8DWgPcO.mjs +662 -0
- package/dist/stage-D8DWgPcO.mjs.map +1 -0
- package/dist/staged-CD_imitH.mjs +686 -0
- package/dist/staged-CD_imitH.mjs.map +1 -0
- package/dist/state-CFbGZziM.mjs +178 -0
- package/dist/state-CFbGZziM.mjs.map +1 -0
- package/dist/status-BFNdxzKc.mjs +30 -0
- package/dist/status-BFNdxzKc.mjs.map +1 -0
- package/dist/storage/local.d.mts +2 -2
- package/dist/storage/local.d.mts.map +1 -1
- package/dist/storage/local.mjs +12 -5
- package/dist/storage/local.mjs.map +1 -1
- package/dist/storage/s3.d.mts +4 -2
- package/dist/storage/s3.d.mts.map +1 -1
- package/dist/storage/s3.mjs +56 -9
- package/dist/storage/s3.mjs.map +1 -1
- package/dist/storage-query-DRyu3bSU.d.mts +1615 -0
- package/dist/storage-query-DRyu3bSU.d.mts.map +1 -0
- package/dist/tar-DFjExb9X.mjs +449 -0
- package/dist/tar-DFjExb9X.mjs.map +1 -0
- package/dist/target-CWZs2-o6.mjs +27 -0
- package/dist/target-CWZs2-o6.mjs.map +1 -0
- package/dist/taxonomies-ChnU7Mc8.mjs +697 -0
- package/dist/taxonomies-ChnU7Mc8.mjs.map +1 -0
- package/dist/taxonomies-Dd9JJv_a.mjs +939 -0
- package/dist/taxonomies-Dd9JJv_a.mjs.map +1 -0
- package/dist/taxonomy-C_C_LBAU.mjs +550 -0
- package/dist/taxonomy-C_C_LBAU.mjs.map +1 -0
- package/dist/tokens-BnhSnGwJ.mjs +171 -0
- package/dist/tokens-BnhSnGwJ.mjs.map +1 -0
- package/dist/transfer-ClH6w6BV.mjs +8873 -0
- package/dist/transfer-ClH6w6BV.mjs.map +1 -0
- package/dist/transfer-WmWiR3xf.mjs +166 -0
- package/dist/transfer-WmWiR3xf.mjs.map +1 -0
- package/dist/transfer-download--ofRj9Cw.mjs +33 -0
- package/dist/transfer-download--ofRj9Cw.mjs.map +1 -0
- package/dist/transformations-Bx4lYY0Y.mjs +196 -0
- package/dist/transformations-Bx4lYY0Y.mjs.map +1 -0
- package/dist/transport-BjbqNiPI.mjs +136 -0
- package/dist/transport-BjbqNiPI.mjs.map +1 -0
- package/dist/transport-DxiXnbXk.d.mts +42 -0
- package/dist/transport-DxiXnbXk.d.mts.map +1 -0
- package/dist/trusted-proxy-BU3Nx9g1.mjs +51 -0
- package/dist/trusted-proxy-BU3Nx9g1.mjs.map +1 -0
- package/dist/turnstile-CJwvsOqw.mjs +58 -0
- package/dist/turnstile-CJwvsOqw.mjs.map +1 -0
- package/dist/types-BA3ey2QH.d.mts +87 -0
- package/dist/types-BA3ey2QH.d.mts.map +1 -0
- package/dist/types-Bwpzb5o6.d.mts +227 -0
- package/dist/types-Bwpzb5o6.d.mts.map +1 -0
- package/dist/types-CNB-dj6F.d.mts +289 -0
- package/dist/types-CNB-dj6F.d.mts.map +1 -0
- package/dist/types-CgfFGfO5.mjs +16 -0
- package/dist/types-CgfFGfO5.mjs.map +1 -0
- package/dist/types-D2NEXtgB.mjs +127 -0
- package/dist/types-D2NEXtgB.mjs.map +1 -0
- package/dist/types-DCFavOii.d.mts +916 -0
- package/dist/types-DCFavOii.d.mts.map +1 -0
- package/dist/types-DHO7Pd25.d.mts +366 -0
- package/dist/types-DHO7Pd25.d.mts.map +1 -0
- package/dist/types-DvqVxZXa.d.mts +125 -0
- package/dist/types-DvqVxZXa.d.mts.map +1 -0
- package/dist/types-QoPHm-2w.d.mts +1741 -0
- package/dist/types-QoPHm-2w.d.mts.map +1 -0
- package/dist/types-RLgeIpnF.d.mts +374 -0
- package/dist/types-RLgeIpnF.d.mts.map +1 -0
- package/dist/types-qHVygneX.mjs +77 -0
- package/dist/types-qHVygneX.mjs.map +1 -0
- package/dist/types-sUHaH7lC.mjs +37 -0
- package/dist/types-sUHaH7lC.mjs.map +1 -0
- package/dist/types-slSqujQL.d.mts +204 -0
- package/dist/types-slSqujQL.d.mts.map +1 -0
- package/dist/update-check-BxNg9T6N.mjs +161 -0
- package/dist/update-check-BxNg9T6N.mjs.map +1 -0
- package/dist/upload-attempts-DPFC4COv.mjs +32 -0
- package/dist/upload-attempts-DPFC4COv.mjs.map +1 -0
- package/dist/url-pattern-QATUE_rv.mjs +41 -0
- package/dist/url-pattern-QATUE_rv.mjs.map +1 -0
- package/dist/user-BlCTKVAm.mjs +171 -0
- package/dist/user-BlCTKVAm.mjs.map +1 -0
- package/dist/utils-TPt7w2cS.mjs +442 -0
- package/dist/utils-TPt7w2cS.mjs.map +1 -0
- package/dist/validate-DxYhJQA-.mjs +524 -0
- package/dist/validate-DxYhJQA-.mjs.map +1 -0
- package/dist/validate-emKxGC5F.d.mts +468 -0
- package/dist/validate-emKxGC5F.d.mts.map +1 -0
- package/dist/validation-Ckq4vsVg.mjs +220 -0
- package/dist/validation-Ckq4vsVg.mjs.map +1 -0
- package/dist/version-BZj18Q7G.mjs +9 -0
- package/dist/version-BZj18Q7G.mjs.map +1 -0
- package/dist/version-DHmGpcch.mjs +7 -0
- package/dist/version-DHmGpcch.mjs.map +1 -0
- package/dist/video-DytCnw3L.mjs +54 -0
- package/dist/video-DytCnw3L.mjs.map +1 -0
- package/dist/virtual-modules-DO954n7P.mjs +515 -0
- package/dist/virtual-modules-DO954n7P.mjs.map +1 -0
- package/dist/widgets-DA5XmvVC.mjs +121 -0
- package/dist/widgets-DA5XmvVC.mjs.map +1 -0
- package/dist/wxr-taxonomies-CrMonejI.d.mts +34 -0
- package/dist/wxr-taxonomies-CrMonejI.d.mts.map +1 -0
- package/dist/wxr-taxonomies-RgRG0d5e.mjs +453 -0
- package/dist/wxr-taxonomies-RgRG0d5e.mjs.map +1 -0
- package/dist/zod-generator-D0JKy94C.mjs +424 -0
- package/dist/zod-generator-D0JKy94C.mjs.map +1 -0
- package/package.json +15 -11
- package/src/api/authorize.ts +42 -0
- package/src/api/errors.ts +9 -0
- package/src/api/handlers/api-tokens.ts +12 -6
- package/src/api/handlers/content.ts +57 -8
- package/src/api/handlers/dashboard.ts +33 -10
- package/src/api/handlers/domain-move-notice.ts +94 -0
- package/src/api/handlers/index.ts +2 -0
- package/src/api/handlers/manifest.ts +6 -0
- package/src/api/handlers/media-usage.ts +2 -1
- package/src/api/handlers/media.ts +1 -0
- package/src/api/handlers/plugins.ts +1 -0
- package/src/api/handlers/revision.ts +6 -2
- package/src/api/handlers/seo.ts +155 -59
- package/src/api/handlers/settings.ts +31 -1
- package/src/api/handlers/site-domain.ts +159 -0
- package/src/api/openapi/document.ts +2 -2
- package/src/api/public-url.ts +1 -1
- package/src/api/schemas/content.ts +20 -0
- package/src/api/schemas/media-usage.ts +7 -1
- package/src/api/schemas/media.ts +12 -0
- package/src/api/schemas/settings.ts +2 -0
- package/src/api/site-url.ts +53 -5
- package/src/api/types.ts +4 -0
- package/src/astro/image-endpoint.ts +46 -4
- package/src/astro/integration/admin-locales.ts +168 -0
- package/src/astro/integration/dev-env.ts +84 -0
- package/src/astro/integration/dev-scheduler-bridge.ts +91 -0
- package/src/astro/integration/index.ts +97 -10
- package/src/astro/integration/routes.ts +28 -0
- package/src/astro/integration/runtime.ts +17 -1
- package/src/astro/integration/virtual-modules.ts +9 -16
- package/src/astro/integration/vite-config.ts +22 -16
- package/src/astro/middleware/auth.ts +19 -4
- package/src/astro/middleware/csp.ts +1 -0
- package/src/astro/middleware/redirect.ts +94 -50
- package/src/astro/middleware/request-context.ts +12 -6
- package/src/astro/middleware.ts +71 -17
- package/src/astro/prefetch.ts +7 -5
- package/src/astro/public-plugin-api-routes.ts +10 -2
- package/src/astro/routes/api/admin/plugins/registry/artifact.ts +1 -1
- package/src/astro/routes/api/auth/handover.ts +58 -0
- package/src/astro/routes/api/auth/magic-link/verify.ts +11 -3
- package/src/astro/routes/api/auth/passkey/options.ts +10 -2
- package/src/astro/routes/api/content/[collection]/[id]/discard-draft.ts +2 -1
- package/src/astro/routes/api/content/[collection]/[id]/duplicate.ts +1 -5
- package/src/astro/routes/api/content/[collection]/[id]/lock.ts +2 -2
- package/src/astro/routes/api/content/[collection]/[id]/permanent.ts +2 -1
- package/src/astro/routes/api/content/[collection]/[id]/publish.ts +2 -1
- package/src/astro/routes/api/content/[collection]/[id]/restore.ts +2 -1
- package/src/astro/routes/api/content/[collection]/[id]/schedule.ts +3 -2
- package/src/astro/routes/api/content/[collection]/[id]/terms/[taxonomy].ts +5 -4
- package/src/astro/routes/api/content/[collection]/[id]/unpublish.ts +2 -1
- package/src/astro/routes/api/content/[collection]/[id].ts +18 -6
- package/src/astro/routes/api/content/[collection]/index.ts +1 -5
- package/src/astro/routes/api/dashboard.ts +4 -1
- package/src/astro/routes/api/dev/scheduled-tasks.ts +20 -0
- package/src/astro/routes/api/import/wordpress/analyze.ts +1 -16
- package/src/astro/routes/api/import/wordpress/execute.ts +27 -3
- package/src/astro/routes/api/import/wordpress/rewrite-url-helpers.ts +80 -42
- package/src/astro/routes/api/import/wordpress-plugin/analyze.ts +4 -1
- package/src/astro/routes/api/import/wordpress-plugin/execute.ts +49 -5
- package/src/astro/routes/api/manifest.ts +10 -0
- package/src/astro/routes/api/media/[id]/confirm.ts +19 -0
- package/src/astro/routes/api/media/file/[...key].ts +60 -12
- package/src/astro/routes/api/media/upload-url.ts +28 -4
- package/src/astro/routes/api/media.ts +15 -0
- package/src/astro/routes/api/menus/[name]/items/[id].ts +3 -2
- package/src/astro/routes/api/menus/[name]/items.ts +2 -1
- package/src/astro/routes/api/menus/[name]/reorder.ts +2 -1
- package/src/astro/routes/api/menus/[name]/translations.ts +2 -1
- package/src/astro/routes/api/menus/[name].ts +3 -2
- package/src/astro/routes/api/menus/index.ts +2 -1
- package/src/astro/routes/api/redirects/[id].ts +15 -2
- package/src/astro/routes/api/redirects/index.ts +5 -1
- package/src/astro/routes/api/schema/index.ts +1 -1
- package/src/astro/routes/api/settings/domain-notify.ts +76 -0
- package/src/astro/routes/api/settings/domain.ts +64 -0
- package/src/astro/routes/api/settings.ts +2 -1
- package/src/astro/routes/api/setup/admin-verify.ts +7 -1
- package/src/astro/routes/api/setup/index.ts +7 -0
- package/src/astro/routes/api/site/domain-proof.ts +28 -0
- package/src/astro/routes/api/taxonomies/[name]/reorder.ts +2 -1
- package/src/astro/routes/api/taxonomies/[name]/terms/[slug]/translations.ts +2 -1
- package/src/astro/routes/api/taxonomies/[name]/terms/[slug].ts +3 -2
- package/src/astro/routes/api/taxonomies/[name]/terms/index.ts +2 -1
- package/src/astro/routes/api/taxonomies/[name].ts +3 -2
- package/src/astro/routes/api/taxonomies/index.ts +2 -1
- package/src/astro/routes/api/widget-areas/[name]/reorder.ts +2 -1
- package/src/astro/routes/api/widget-areas/[name]/widgets/[id].ts +3 -2
- package/src/astro/routes/api/widget-areas/[name]/widgets.ts +2 -1
- package/src/astro/routes/api/widget-areas/[name].ts +2 -1
- package/src/astro/routes/api/widget-areas/index.ts +2 -1
- package/src/astro/routes/robots.txt.ts +33 -2
- package/src/astro/routes/sitemap-[collection].xml.ts +31 -8
- package/src/astro/routes/sitemap.xml.ts +12 -10
- package/src/astro/types.ts +23 -2
- package/src/auth/rate-limit.ts +18 -13
- package/src/auth/types.ts +11 -4
- package/src/aws-sdk.d.ts +2 -1
- package/src/cache/redirect-paths.ts +56 -0
- package/src/cache/route-cache.ts +22 -0
- package/src/cleanup.ts +26 -0
- package/src/cli/commands/export-seed.ts +2 -0
- package/src/cli/commands/import/wordpress.ts +3 -27
- package/src/cli/commands/login.ts +35 -43
- package/src/cli/commands/migrate.ts +36 -4
- package/src/cli/commands/seed.ts +23 -12
- package/src/cli/wxr/parser.ts +2 -2
- package/src/client/index.ts +18 -3
- package/src/client/portable-text.ts +21 -7
- package/src/comments/public-submission.ts +15 -8
- package/src/comments/query.ts +8 -2
- package/src/components/CommentForm.astro +50 -10
- package/src/components/Comments.astro +51 -29
- package/src/components/EmDashImage.astro +6 -4
- package/src/components/Gallery.astro +4 -3
- package/src/components/Image.astro +4 -3
- package/src/components/InlinePortableTextEditor.tsx +269 -1320
- package/src/components/Video.astro +100 -0
- package/src/components/index.ts +4 -1
- package/src/components/inline-block-types.ts +278 -0
- package/src/components/inline-bubble-menu.tsx +696 -0
- package/src/components/inline-code-block.tsx +8 -0
- package/src/components/inline-editor-ui.tsx +1192 -0
- package/src/components/inline-image.tsx +722 -0
- package/src/components/inline-media-picker.tsx +1221 -0
- package/src/components/inline-slash-menu.tsx +556 -0
- package/src/components/webmcp-search.ts +15 -19
- package/src/components/widgets/RecentPosts.astro +57 -17
- package/src/content/converters/mark-safety.ts +3 -3
- package/src/content/converters/portable-text-identity.ts +1 -0
- package/src/content/converters/portable-text-to-prosemirror.ts +7 -0
- package/src/content/converters/prosemirror-to-portable-text.ts +16 -0
- package/src/content/converters/types.ts +22 -0
- package/src/content/converters/video.ts +77 -0
- package/src/database/collection-cleanup.ts +30 -0
- package/src/database/datetime-storage.ts +337 -60
- package/src/database/migration-lock.ts +43 -7
- package/src/database/migrations/runner.ts +13 -1
- package/src/database/repositories/comment.ts +17 -3
- package/src/database/repositories/content.ts +25 -4
- package/src/database/repositories/plugin-storage.ts +137 -27
- package/src/database/repositories/redirect.ts +24 -2
- package/src/database/repositories/revision.ts +24 -6
- package/src/database/repositories/taxonomy.ts +61 -46
- package/src/database/repositories/types.ts +67 -7
- package/src/emdash-runtime.ts +393 -228
- package/src/import/index.ts +1 -0
- package/src/import/registry.ts +17 -0
- package/src/import/sources/wordpress-plugin.ts +154 -11
- package/src/import/types.ts +3 -0
- package/src/import/utils.ts +7 -3
- package/src/index.ts +3 -0
- package/src/loader.ts +170 -45
- package/src/mcp/json-schema.ts +14 -0
- package/src/mcp/plugin-tool-name.ts +36 -0
- package/src/mcp/server.ts +74 -15
- package/src/media/image-endpoint.ts +101 -1
- package/src/media/responsive.ts +14 -7
- package/src/media/usage/collection-deletion.ts +4 -0
- package/src/media/usage/extractor.ts +19 -2
- package/src/media/usage/types.ts +5 -1
- package/src/migrations/direct-executor.ts +42 -12
- package/src/migrations/protocol.ts +6 -2
- package/src/plugin-utils.ts +1 -1
- package/src/plugins/adapt-sandbox-entry.ts +16 -6
- package/src/plugins/context.ts +3 -7
- package/src/plugins/hooks.ts +1 -1
- package/src/plugins/http-route-dispatch.ts +5 -1
- package/src/plugins/manifest-schema.ts +1 -0
- package/src/plugins/route-error.ts +14 -0
- package/src/plugins/routes.ts +2 -2
- package/src/plugins/state.ts +41 -8
- package/src/plugins/types.ts +6 -0
- package/src/query.ts +59 -10
- package/src/redirects/cache.ts +34 -2
- package/src/redirects/patterns.ts +26 -2
- package/src/schema/block-values.ts +80 -17
- package/src/schema/registry.ts +16 -5
- package/src/schema/slug.ts +19 -0
- package/src/search/query.ts +3 -1
- package/src/search/text-extraction.ts +6 -1
- package/src/seed/apply.ts +32 -8
- package/src/seed/validate.ts +31 -0
- package/src/seo/sitemap-name.ts +22 -0
- package/src/settings/index.ts +20 -0
- package/src/settings/types.ts +2 -0
- package/src/storage/index.ts +2 -0
- package/src/storage/local.ts +10 -2
- package/src/storage/range.ts +54 -0
- package/src/storage/s3.ts +52 -8
- package/src/storage/types.ts +30 -3
- package/src/ui.ts +1 -0
- package/src/utils/slugify.ts +6 -1
- package/src/visual-editing/toolbar.ts +126 -47
- package/src/widgets/components.ts +4 -0
- package/src/widgets/index.ts +74 -82
- package/src/widgets/recent-posts.ts +62 -0
- package/dist/action-token-AgOs1UWD.mjs +0 -26
- package/dist/action-token-AgOs1UWD.mjs.map +0 -1
- package/dist/activation-xomsCMJg.mjs +0 -387
- package/dist/activation-xomsCMJg.mjs.map +0 -1
- package/dist/adapters-DM1oyHIN.d.mts +0 -173
- package/dist/adapters-DM1oyHIN.d.mts.map +0 -1
- package/dist/allowed-origins-CFtudhyw.mjs +0 -116
- package/dist/allowed-origins-CFtudhyw.mjs.map +0 -1
- package/dist/api-CltsXhiX.mjs +0 -4980
- package/dist/api-CltsXhiX.mjs.map +0 -1
- package/dist/api-tokens-P3mAaQgr.mjs +0 -166
- package/dist/api-tokens-P3mAaQgr.mjs.map +0 -1
- package/dist/apply-Q7uvzBWW.mjs +0 -1680
- package/dist/apply-Q7uvzBWW.mjs.map +0 -1
- package/dist/approvals-DycwI6lZ.mjs +0 -460
- package/dist/approvals-DycwI6lZ.mjs.map +0 -1
- package/dist/artifact-fetch-CWxyELVI.mjs +0 -659
- package/dist/artifact-fetch-CWxyELVI.mjs.map +0 -1
- package/dist/artifacts-UzWbysb8.mjs +0 -307
- package/dist/artifacts-UzWbysb8.mjs.map +0 -1
- package/dist/audit-CCH3MA4Y.mjs +0 -127
- package/dist/audit-CCH3MA4Y.mjs.map +0 -1
- package/dist/authoritative-records-dSvXCfzb.mjs +0 -5172
- package/dist/authoritative-records-dSvXCfzb.mjs.map +0 -1
- package/dist/authorize-DeWfk--K.mjs +0 -49
- package/dist/authorize-DeWfk--K.mjs.map +0 -1
- package/dist/backup-CFnbdTSJ.mjs +0 -246
- package/dist/backup-CFnbdTSJ.mjs.map +0 -1
- package/dist/block-types-C0YFSfR7.mjs +0 -132
- package/dist/block-types-C0YFSfR7.mjs.map +0 -1
- package/dist/block-values-H4E0XwE8.mjs +0 -175
- package/dist/block-values-H4E0XwE8.mjs.map +0 -1
- package/dist/byline-BhVslYLz.mjs +0 -909
- package/dist/byline-BhVslYLz.mjs.map +0 -1
- package/dist/byline-fields-DHJs0Mja.mjs +0 -280
- package/dist/byline-fields-DHJs0Mja.mjs.map +0 -1
- package/dist/byline-fields-xdxE9kxZ.mjs +0 -123
- package/dist/byline-fields-xdxE9kxZ.mjs.map +0 -1
- package/dist/bylines-B_nN9liM.mjs +0 -234
- package/dist/bylines-B_nN9liM.mjs.map +0 -1
- package/dist/bylines-C71YACkL.mjs +0 -150
- package/dist/bylines-C71YACkL.mjs.map +0 -1
- package/dist/cache-aTYCL9nK.mjs +0 -133
- package/dist/cache-aTYCL9nK.mjs.map +0 -1
- package/dist/canonical-Y1dpjCnp.mjs +0 -174
- package/dist/canonical-Y1dpjCnp.mjs.map +0 -1
- package/dist/capture-triggers-C9JKoIdT.mjs +0 -362
- package/dist/capture-triggers-C9JKoIdT.mjs.map +0 -1
- package/dist/challenge-store-CxZxPqaw.mjs +0 -51
- package/dist/challenge-store-CxZxPqaw.mjs.map +0 -1
- package/dist/checksum-DtH6m5uk.mjs +0 -162
- package/dist/checksum-DtH6m5uk.mjs.map +0 -1
- package/dist/chunks-zlGB5IQP.mjs +0 -25
- package/dist/chunks-zlGB5IQP.mjs.map +0 -1
- package/dist/collection-slugs-cache-B2Gs9Jwx.mjs +0 -85
- package/dist/collection-slugs-cache-B2Gs9Jwx.mjs.map +0 -1
- package/dist/comment-Bu08Wvr3.mjs +0 -313
- package/dist/comment-Bu08Wvr3.mjs.map +0 -1
- package/dist/comment-reaction-B8SfT-yM.mjs +0 -85
- package/dist/comment-reaction-B8SfT-yM.mjs.map +0 -1
- package/dist/comments-BRtp992B.mjs +0 -99
- package/dist/comments-BRtp992B.mjs.map +0 -1
- package/dist/comments-DVUYqdyC.mjs +0 -195
- package/dist/comments-DVUYqdyC.mjs.map +0 -1
- package/dist/components-CQY-Sgm-.mjs +0 -108
- package/dist/components-CQY-Sgm-.mjs.map +0 -1
- package/dist/config-B-uePMLj.d.mts +0 -39
- package/dist/config-B-uePMLj.d.mts.map +0 -1
- package/dist/config-B6BDSsz2.d.mts +0 -6712
- package/dist/config-B6BDSsz2.d.mts.map +0 -1
- package/dist/config-BsJHiQxC.mjs +0 -228
- package/dist/config-BsJHiQxC.mjs.map +0 -1
- package/dist/connection-B9pIasFd.mjs +0 -36
- package/dist/connection-B9pIasFd.mjs.map +0 -1
- package/dist/content-Dji9vEiW.mjs +0 -2063
- package/dist/content-Dji9vEiW.mjs.map +0 -1
- package/dist/content-list-query-DiNwyKtd.d.mts +0 -26
- package/dist/content-list-query-DiNwyKtd.d.mts.map +0 -1
- package/dist/content-repair-B7wnbzhN.mjs +0 -442
- package/dist/content-repair-B7wnbzhN.mjs.map +0 -1
- package/dist/context-Ctcxc8Ia.mjs +0 -2026
- package/dist/context-Ctcxc8Ia.mjs.map +0 -1
- package/dist/credits-Bu7dlobo.mjs +0 -110
- package/dist/credits-Bu7dlobo.mjs.map +0 -1
- package/dist/cron-xe5XKqA-.mjs +0 -306
- package/dist/cron-xe5XKqA-.mjs.map +0 -1
- package/dist/dashboard-B5hVHOtf.mjs +0 -151
- package/dist/dashboard-B5hVHOtf.mjs.map +0 -1
- package/dist/default-DaoYyFRS.mjs +0 -81
- package/dist/default-DaoYyFRS.mjs.map +0 -1
- package/dist/deferred-tasks-BYcDx2o_.d.mts +0 -9
- package/dist/deferred-tasks-BYcDx2o_.d.mts.map +0 -1
- package/dist/dev-typegen-Dtl8AfS6.mjs +0 -29
- package/dist/dev-typegen-Dtl8AfS6.mjs.map +0 -1
- package/dist/device-flow-Ma5P5d2e.mjs +0 -521
- package/dist/device-flow-Ma5P5d2e.mjs.map +0 -1
- package/dist/digest-xIpR3o64.mjs +0 -194
- package/dist/digest-xIpR3o64.mjs.map +0 -1
- package/dist/direct-executor-DMWwCey3.mjs +0 -104
- package/dist/direct-executor-DMWwCey3.mjs.map +0 -1
- package/dist/email-console-DmqVF5J_.mjs +0 -50
- package/dist/email-console-DmqVF5J_.mjs.map +0 -1
- package/dist/email-locale-Cc5YSXfJ.mjs +0 -25
- package/dist/email-locale-Cc5YSXfJ.mjs.map +0 -1
- package/dist/emdash-runtime-BlybX9Ui.mjs +0 -4249
- package/dist/emdash-runtime-BlybX9Ui.mjs.map +0 -1
- package/dist/entry-lock-De1L8qUQ.mjs +0 -163
- package/dist/entry-lock-De1L8qUQ.mjs.map +0 -1
- package/dist/entry-lock-esmMbgI9.d.mts +0 -4551
- package/dist/entry-lock-esmMbgI9.d.mts.map +0 -1
- package/dist/entry-lock-sxz2PGAT.mjs +0 -1197
- package/dist/entry-lock-sxz2PGAT.mjs.map +0 -1
- package/dist/env-types-BkjCtN13.mjs +0 -38
- package/dist/env-types-BkjCtN13.mjs.map +0 -1
- package/dist/error-B0rgPgsQ.mjs +0 -90
- package/dist/error-B0rgPgsQ.mjs.map +0 -1
- package/dist/errors-CuHQRiBW.mjs +0 -120
- package/dist/errors-CuHQRiBW.mjs.map +0 -1
- package/dist/errors-DTE6C3K_.mjs +0 -470
- package/dist/errors-DTE6C3K_.mjs.map +0 -1
- package/dist/escape-nJW7dR0s.mjs +0 -9
- package/dist/escape-nJW7dR0s.mjs.map +0 -1
- package/dist/fence-CGw57S4v.mjs +0 -162
- package/dist/fence-CGw57S4v.mjs.map +0 -1
- package/dist/field-defs-cache-Bw8w499w.mjs +0 -77
- package/dist/field-defs-cache-Bw8w499w.mjs.map +0 -1
- package/dist/field-map-hn-D-SyH.mjs +0 -83
- package/dist/field-map-hn-D-SyH.mjs.map +0 -1
- package/dist/fts-manager-DacCYIe4.mjs +0 -443
- package/dist/fts-manager-DacCYIe4.mjs.map +0 -1
- package/dist/gc-BBplHrv6.mjs +0 -75
- package/dist/gc-BBplHrv6.mjs.map +0 -1
- package/dist/hash-C4DFoJ7Z.mjs +0 -37
- package/dist/hash-C4DFoJ7Z.mjs.map +0 -1
- package/dist/hook-result-DSRRxu_-.d.mts +0 -31
- package/dist/hook-result-DSRRxu_-.d.mts.map +0 -1
- package/dist/hreflang-CKPunvU0.mjs +0 -105
- package/dist/hreflang-CKPunvU0.mjs.map +0 -1
- package/dist/hreflang-egumj6WF.d.mts +0 -50
- package/dist/hreflang-egumj6WF.d.mts.map +0 -1
- package/dist/http-route-dispatch-DjNFZcJ2.mjs +0 -339
- package/dist/http-route-dispatch-DjNFZcJ2.mjs.map +0 -1
- package/dist/identity-Dfrx2_Bc.mjs +0 -35
- package/dist/identity-Dfrx2_Bc.mjs.map +0 -1
- package/dist/import-ROBvhbNc.mjs +0 -2021
- package/dist/import-ROBvhbNc.mjs.map +0 -1
- package/dist/index-B4sIdCAT.d.mts +0 -623
- package/dist/index-B4sIdCAT.d.mts.map +0 -1
- package/dist/install-finalization-CPM7Gged.mjs +0 -58
- package/dist/install-finalization-CPM7Gged.mjs.map +0 -1
- package/dist/keys-DxqxcAD4.mjs +0 -61
- package/dist/keys-DxqxcAD4.mjs.map +0 -1
- package/dist/kinds-BQl5gN6e.mjs +0 -974
- package/dist/kinds-BQl5gN6e.mjs.map +0 -1
- package/dist/lifecycle-DGQI7itS.mjs +0 -25
- package/dist/lifecycle-DGQI7itS.mjs.map +0 -1
- package/dist/load-DMxRl4VK.mjs +0 -28
- package/dist/load-DMxRl4VK.mjs.map +0 -1
- package/dist/loader-1DMiOq5s.mjs +0 -1303
- package/dist/loader-1DMiOq5s.mjs.map +0 -1
- package/dist/loops-Dn1i16FP.mjs +0 -205
- package/dist/loops-Dn1i16FP.mjs.map +0 -1
- package/dist/manifest-builder-CTw4FmZk.mjs +0 -189
- package/dist/manifest-builder-CTw4FmZk.mjs.map +0 -1
- package/dist/manifest-schema-gy37bD_D.mjs +0 -496
- package/dist/manifest-schema-gy37bD_D.mjs.map +0 -1
- package/dist/marketplace-tHWSsCUo.mjs +0 -257
- package/dist/marketplace-tHWSsCUo.mjs.map +0 -1
- package/dist/media-Bw-Q65ve.mjs +0 -294
- package/dist/media-Bw-Q65ve.mjs.map +0 -1
- package/dist/media-BzUDu7nl.mjs +0 -373
- package/dist/media-BzUDu7nl.mjs.map +0 -1
- package/dist/media-aahnKHze.mjs +0 -408
- package/dist/media-aahnKHze.mjs.map +0 -1
- package/dist/media-allowlist-RMrjo8TU.mjs +0 -45
- package/dist/media-allowlist-RMrjo8TU.mjs.map +0 -1
- package/dist/media-folders-kabR1oJf.mjs +0 -210
- package/dist/media-folders-kabR1oJf.mjs.map +0 -1
- package/dist/media-url-DloW2xrP.mjs +0 -43
- package/dist/media-url-DloW2xrP.mjs.map +0 -1
- package/dist/media-usage-CHHpV7ee.mjs +0 -282
- package/dist/media-usage-CHHpV7ee.mjs.map +0 -1
- package/dist/media-usage-activation-BinYqC_r.mjs +0 -78
- package/dist/media-usage-activation-BinYqC_r.mjs.map +0 -1
- package/dist/media-usage-work-C734aq6s.mjs +0 -1015
- package/dist/media-usage-work-C734aq6s.mjs.map +0 -1
- package/dist/media-usage-work-lxvV0-UO.mjs +0 -151
- package/dist/media-usage-work-lxvV0-UO.mjs.map +0 -1
- package/dist/menus-6RHNq4ZK.mjs +0 -753
- package/dist/menus-6RHNq4ZK.mjs.map +0 -1
- package/dist/menus-AuCTaO9W.mjs +0 -3704
- package/dist/menus-AuCTaO9W.mjs.map +0 -1
- package/dist/menus-BQKqf0Up.mjs +0 -92
- package/dist/menus-BQKqf0Up.mjs.map +0 -1
- package/dist/mode-nh0ppSX5.mjs +0 -23
- package/dist/mode-nh0ppSX5.mjs.map +0 -1
- package/dist/node-sqlite-compat-CDOEcc97.mjs +0 -63
- package/dist/node-sqlite-compat-CDOEcc97.mjs.map +0 -1
- package/dist/oauth-authorization-BtYQ80uU.mjs +0 -274
- package/dist/oauth-authorization-BtYQ80uU.mjs.map +0 -1
- package/dist/oauth-clients-C1S4NQHh.mjs +0 -266
- package/dist/oauth-clients-C1S4NQHh.mjs.map +0 -1
- package/dist/oauth-state-store-CpGi2FZH.mjs +0 -50
- package/dist/oauth-state-store-CpGi2FZH.mjs.map +0 -1
- package/dist/oauth-user-lookup-BNp1aFAr.mjs +0 -26
- package/dist/oauth-user-lookup-BNp1aFAr.mjs.map +0 -1
- package/dist/options-B41aLm1I.d.mts +0 -81
- package/dist/options-B41aLm1I.d.mts.map +0 -1
- package/dist/ownership-DoeAIuTg.mjs +0 -12
- package/dist/ownership-DoeAIuTg.mjs.map +0 -1
- package/dist/parse-CmFDTGzp.mjs +0 -81
- package/dist/parse-CmFDTGzp.mjs.map +0 -1
- package/dist/parse-QVS0t5oR.d.mts +0 -172
- package/dist/parse-QVS0t5oR.d.mts.map +0 -1
- package/dist/passkey-config-C-MxsV22.mjs +0 -46
- package/dist/passkey-config-C-MxsV22.mjs.map +0 -1
- package/dist/paths-kr8hAMMI.mjs +0 -77
- package/dist/paths-kr8hAMMI.mjs.map +0 -1
- package/dist/patterns-DyZJ67I7.mjs +0 -140
- package/dist/patterns-DyZJ67I7.mjs.map +0 -1
- package/dist/placeholder-Dn7MMdWr.d.mts +0 -306
- package/dist/placeholder-Dn7MMdWr.d.mts.map +0 -1
- package/dist/plan-CuQOeU9g.mjs +0 -135
- package/dist/plan-CuQOeU9g.mjs.map +0 -1
- package/dist/plugins-CGb-G98c.mjs +0 -261
- package/dist/plugins-CGb-G98c.mjs.map +0 -1
- package/dist/policy-C5wrDXYV.mjs +0 -45
- package/dist/policy-C5wrDXYV.mjs.map +0 -1
- package/dist/portable-text-BnRuiR1-.mjs +0 -307
- package/dist/portable-text-BnRuiR1-.mjs.map +0 -1
- package/dist/preview-xWNSR1Li.mjs +0 -107
- package/dist/preview-xWNSR1Li.mjs.map +0 -1
- package/dist/protocol-ClxN-m1e.d.mts +0 -61
- package/dist/protocol-ClxN-m1e.d.mts.map +0 -1
- package/dist/public-submission-CkmT2SKv.mjs +0 -250
- package/dist/public-submission-CkmT2SKv.mjs.map +0 -1
- package/dist/public-url-B5a0QAh6.mjs +0 -101
- package/dist/public-url-B5a0QAh6.mjs.map +0 -1
- package/dist/query-DHqFiqqH.mjs +0 -41
- package/dist/query-DHqFiqqH.mjs.map +0 -1
- package/dist/query-DT85BehD.mjs +0 -1125
- package/dist/query-DT85BehD.mjs.map +0 -1
- package/dist/rate-limit-iMvcu3eu.mjs +0 -120
- package/dist/rate-limit-iMvcu3eu.mjs.map +0 -1
- package/dist/receipt-Dpp1uaX9.mjs +0 -43
- package/dist/receipt-Dpp1uaX9.mjs.map +0 -1
- package/dist/redirect-BRoLiWQE.mjs +0 -19
- package/dist/redirect-BRoLiWQE.mjs.map +0 -1
- package/dist/redirect-xZNpBoGp.mjs +0 -417
- package/dist/redirect-xZNpBoGp.mjs.map +0 -1
- package/dist/redirects-D4EWeXAo.mjs +0 -148
- package/dist/redirects-D4EWeXAo.mjs.map +0 -1
- package/dist/redirects-DCKqwiWp.mjs +0 -446
- package/dist/redirects-DCKqwiWp.mjs.map +0 -1
- package/dist/registry-DaXmUsD4.mjs +0 -8369
- package/dist/registry-DaXmUsD4.mjs.map +0 -1
- package/dist/relations-JvBP8nGP.mjs +0 -776
- package/dist/relations-JvBP8nGP.mjs.map +0 -1
- package/dist/request-meta-B6blULFY.mjs +0 -141
- package/dist/request-meta-B6blULFY.mjs.map +0 -1
- package/dist/resolve-DAhHi5tn.mjs +0 -100
- package/dist/resolve-DAhHi5tn.mjs.map +0 -1
- package/dist/revision-BWEH2qQB.mjs +0 -368
- package/dist/revision-BWEH2qQB.mjs.map +0 -1
- package/dist/route-wire-DK600v4u.mjs +0 -197
- package/dist/route-wire-DK600v4u.mjs.map +0 -1
- package/dist/routes-BeZyaCzv.mjs +0 -272
- package/dist/routes-BeZyaCzv.mjs.map +0 -1
- package/dist/runner-CskI4Hmq.mjs +0 -6372
- package/dist/runner-CskI4Hmq.mjs.map +0 -1
- package/dist/runner-J3Cj6DGk.d.mts +0 -68
- package/dist/runner-J3Cj6DGk.d.mts.map +0 -1
- package/dist/schema-CK0ihqMR.mjs +0 -815
- package/dist/schema-CK0ihqMR.mjs.map +0 -1
- package/dist/schema-VtaZSrC-.mjs +0 -13
- package/dist/schema-VtaZSrC-.mjs.map +0 -1
- package/dist/scopes-BRnGlL9t.mjs +0 -34
- package/dist/scopes-BRnGlL9t.mjs.map +0 -1
- package/dist/search-D6-XK1Sn.mjs +0 -448
- package/dist/search-D6-XK1Sn.mjs.map +0 -1
- package/dist/sections-CBDCf7qR.mjs +0 -346
- package/dist/sections-CBDCf7qR.mjs.map +0 -1
- package/dist/seo-BdeEPDNW.mjs +0 -133
- package/dist/seo-BdeEPDNW.mjs.map +0 -1
- package/dist/seo-C61bnPuV.mjs +0 -114
- package/dist/seo-C61bnPuV.mjs.map +0 -1
- package/dist/service-BuRKLMxa.mjs +0 -150
- package/dist/service-BuRKLMxa.mjs.map +0 -1
- package/dist/session-user-CqkPtrPL.mjs +0 -61
- package/dist/session-user-CqkPtrPL.mjs.map +0 -1
- package/dist/settings-0u0lTthS.mjs +0 -51
- package/dist/settings-0u0lTthS.mjs.map +0 -1
- package/dist/settings-WHr45II1.mjs +0 -61
- package/dist/settings-WHr45II1.mjs.map +0 -1
- package/dist/settings-m5tIYnF0.mjs +0 -443
- package/dist/settings-m5tIYnF0.mjs.map +0 -1
- package/dist/setup-complete-B2_dhZZz.mjs +0 -65
- package/dist/setup-complete-B2_dhZZz.mjs.map +0 -1
- package/dist/setup-nonce-CJV9ftSK.mjs +0 -25
- package/dist/setup-nonce-CJV9ftSK.mjs.map +0 -1
- package/dist/site-settings-KJOqJW6W.mjs +0 -50
- package/dist/site-settings-KJOqJW6W.mjs.map +0 -1
- package/dist/site-url-Ceq_AUK0.mjs +0 -16
- package/dist/site-url-Ceq_AUK0.mjs.map +0 -1
- package/dist/slugify-T5GHH42D.mjs +0 -17
- package/dist/slugify-T5GHH42D.mjs.map +0 -1
- package/dist/snapshot-Dzsn3NZa.mjs +0 -414
- package/dist/snapshot-Dzsn3NZa.mjs.map +0 -1
- package/dist/ssrf-DsmvZB80.mjs +0 -406
- package/dist/ssrf-DsmvZB80.mjs.map +0 -1
- package/dist/stage-Csnh_yEd.mjs +0 -662
- package/dist/stage-Csnh_yEd.mjs.map +0 -1
- package/dist/staged-Q7pnEVvI.mjs +0 -686
- package/dist/staged-Q7pnEVvI.mjs.map +0 -1
- package/dist/state-kGdOMQRY.mjs +0 -153
- package/dist/state-kGdOMQRY.mjs.map +0 -1
- package/dist/status-D39Fpy8R.mjs +0 -30
- package/dist/status-D39Fpy8R.mjs.map +0 -1
- package/dist/storage-query-C7iy6eUb.d.mts +0 -1615
- package/dist/storage-query-C7iy6eUb.d.mts.map +0 -1
- package/dist/tar-BWiraSUY.mjs +0 -449
- package/dist/tar-BWiraSUY.mjs.map +0 -1
- package/dist/target-DOFs5oUC.mjs +0 -27
- package/dist/target-DOFs5oUC.mjs.map +0 -1
- package/dist/taxonomies-BS40Wxvi.mjs +0 -939
- package/dist/taxonomies-BS40Wxvi.mjs.map +0 -1
- package/dist/taxonomies-DAZU9VDd.mjs +0 -697
- package/dist/taxonomies-DAZU9VDd.mjs.map +0 -1
- package/dist/taxonomy-XzLE95Vx.mjs +0 -525
- package/dist/taxonomy-XzLE95Vx.mjs.map +0 -1
- package/dist/tokens-DSQan4p7.mjs +0 -171
- package/dist/tokens-DSQan4p7.mjs.map +0 -1
- package/dist/transfer-BcCVxDgf.mjs +0 -166
- package/dist/transfer-BcCVxDgf.mjs.map +0 -1
- package/dist/transfer-OMrancOt.mjs +0 -8873
- package/dist/transfer-OMrancOt.mjs.map +0 -1
- package/dist/transfer-download-Dc-ltjZY.mjs +0 -33
- package/dist/transfer-download-Dc-ltjZY.mjs.map +0 -1
- package/dist/transformations-Ddx7UtrY.mjs +0 -196
- package/dist/transformations-Ddx7UtrY.mjs.map +0 -1
- package/dist/transport-flR-Zmds.d.mts +0 -42
- package/dist/transport-flR-Zmds.d.mts.map +0 -1
- package/dist/transport-umzEbgYO.mjs +0 -136
- package/dist/transport-umzEbgYO.mjs.map +0 -1
- package/dist/trusted-proxy-BqfQFs6a.mjs +0 -51
- package/dist/trusted-proxy-BqfQFs6a.mjs.map +0 -1
- package/dist/turnstile-Do60baId.mjs +0 -58
- package/dist/turnstile-Do60baId.mjs.map +0 -1
- package/dist/types-BT1p3uyb.d.mts +0 -1735
- package/dist/types-BT1p3uyb.d.mts.map +0 -1
- package/dist/types-BYaPWs_F.d.mts +0 -198
- package/dist/types-BYaPWs_F.d.mts.map +0 -1
- package/dist/types-C-Xp0CcN.mjs +0 -103
- package/dist/types-C-Xp0CcN.mjs.map +0 -1
- package/dist/types-CLTQ9b_r.d.mts +0 -374
- package/dist/types-CLTQ9b_r.d.mts.map +0 -1
- package/dist/types-CPkQw2T2.d.mts +0 -85
- package/dist/types-CPkQw2T2.d.mts.map +0 -1
- package/dist/types-CQLvuXoZ.d.mts +0 -198
- package/dist/types-CQLvuXoZ.d.mts.map +0 -1
- package/dist/types-CV5xszpF.d.mts +0 -363
- package/dist/types-CV5xszpF.d.mts.map +0 -1
- package/dist/types-CdEMurNh.mjs +0 -77
- package/dist/types-CdEMurNh.mjs.map +0 -1
- package/dist/types-CxwtnuSS.mjs +0 -37
- package/dist/types-CxwtnuSS.mjs.map +0 -1
- package/dist/types-DGw8KMX_.mjs +0 -16
- package/dist/types-DGw8KMX_.mjs.map +0 -1
- package/dist/types-DOfVMPoo.d.mts +0 -125
- package/dist/types-DOfVMPoo.d.mts.map +0 -1
- package/dist/types-LtS0SM4F.d.mts +0 -287
- package/dist/types-LtS0SM4F.d.mts.map +0 -1
- package/dist/types-ifgOkcBa.d.mts +0 -916
- package/dist/types-ifgOkcBa.d.mts.map +0 -1
- package/dist/update-check-DOc2aBIU.mjs +0 -161
- package/dist/update-check-DOc2aBIU.mjs.map +0 -1
- package/dist/upload-attempts-nzdc3cay.mjs +0 -32
- package/dist/upload-attempts-nzdc3cay.mjs.map +0 -1
- package/dist/url-pattern-hVbqpXs6.mjs +0 -41
- package/dist/url-pattern-hVbqpXs6.mjs.map +0 -1
- package/dist/user-Dnp53zTq.mjs +0 -171
- package/dist/user-Dnp53zTq.mjs.map +0 -1
- package/dist/utils-CoV-PYhg.mjs +0 -439
- package/dist/utils-CoV-PYhg.mjs.map +0 -1
- package/dist/validate-CfQ9_YlD.d.mts +0 -468
- package/dist/validate-CfQ9_YlD.d.mts.map +0 -1
- package/dist/validate-DBX3DKtL.mjs +0 -516
- package/dist/validate-DBX3DKtL.mjs.map +0 -1
- package/dist/validation-BJMiDhB1.mjs +0 -219
- package/dist/validation-BJMiDhB1.mjs.map +0 -1
- package/dist/version-BaT8yKIT.mjs +0 -7
- package/dist/version-BaT8yKIT.mjs.map +0 -1
- package/dist/version-BwEGkqkx.mjs +0 -9
- package/dist/version-BwEGkqkx.mjs.map +0 -1
- package/dist/virtual-modules-B6vJW15k.mjs +0 -516
- package/dist/virtual-modules-B6vJW15k.mjs.map +0 -1
- package/dist/widgets-BkxBAgZ_.mjs +0 -126
- package/dist/widgets-BkxBAgZ_.mjs.map +0 -1
- package/dist/wxr-taxonomies-D7gAJyOF.mjs +0 -453
- package/dist/wxr-taxonomies-D7gAJyOF.mjs.map +0 -1
- package/dist/wxr-taxonomies-DM5J9AsT.d.mts +0 -34
- package/dist/wxr-taxonomies-DM5J9AsT.d.mts.map +0 -1
- package/dist/zod-generator-BQilAboC.mjs +0 -424
- package/dist/zod-generator-BQilAboC.mjs.map +0 -1
- /package/dist/{api-tokens-BLz2MtQs.mjs → api-tokens-CdP49zVF.mjs} +0 -0
- /package/dist/{ssrf-tA45vIPX.mjs → ssrf-DM0E-D_8.mjs} +0 -0
|
@@ -0,0 +1,1741 @@
|
|
|
1
|
+
import { r as ContentFieldFilters } from "./content-list-query-CYKcY6Vi.mjs";
|
|
2
|
+
import { f as FieldType, m as FieldWidgetOptions, p as FieldValidation } from "./types-RLgeIpnF.mjs";
|
|
3
|
+
import { z } from "astro/zod";
|
|
4
|
+
import { Permission } from "@emdash-cms/auth";
|
|
5
|
+
import { CAPABILITY_RENAMES, CurrentPluginCapability, DeclaredAccess, DeprecatedPluginCapability, ManifestHookEntry as ManifestHookEntry$1, ManifestRouteEntry as ManifestRouteEntry$1, PluginCapability, PluginEditorDraftAccess, PluginEditorDraftFieldSelector, PluginFormData, PluginMcpManifestConfig, PluginRouteBodyMode, PluginRouteQuery, PluginRouteRequest, PluginStorageConfig, RouteOptions, StorageCollectionConfig, isDeprecatedCapability, normalizeCapabilities, normalizeCapability } from "@emdash-cms/plugin-types";
|
|
6
|
+
import { ConfirmDialog, Element, PluginUiContext } from "@emdash-cms/blocks";
|
|
7
|
+
import { JSX } from "astro/jsx-runtime";
|
|
8
|
+
|
|
9
|
+
//#region src/plugins/types.d.ts
|
|
10
|
+
declare function normalizePluginCapabilities(capabilities: readonly PluginCapability[]): PluginCapability[];
|
|
11
|
+
declare function normalizePluginCapabilities(capabilities: readonly string[]): string[];
|
|
12
|
+
/**
|
|
13
|
+
* Query filter operators
|
|
14
|
+
*/
|
|
15
|
+
interface RangeFilter {
|
|
16
|
+
gt?: number | string;
|
|
17
|
+
gte?: number | string;
|
|
18
|
+
lt?: number | string;
|
|
19
|
+
lte?: number | string;
|
|
20
|
+
}
|
|
21
|
+
interface InFilter {
|
|
22
|
+
in: Array<string | number>;
|
|
23
|
+
}
|
|
24
|
+
interface StartsWithFilter {
|
|
25
|
+
startsWith: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Where clause value types
|
|
29
|
+
*/
|
|
30
|
+
type WhereValue = string | number | boolean | null | RangeFilter | InFilter | StartsWithFilter;
|
|
31
|
+
/**
|
|
32
|
+
* Where clause for storage queries
|
|
33
|
+
*/
|
|
34
|
+
type WhereClause = Record<string, WhereValue>;
|
|
35
|
+
/**
|
|
36
|
+
* Query options for storage.query()
|
|
37
|
+
*/
|
|
38
|
+
interface QueryOptions {
|
|
39
|
+
where?: WhereClause;
|
|
40
|
+
orderBy?: Record<string, "asc" | "desc">;
|
|
41
|
+
/** Default 50, max 100 */
|
|
42
|
+
limit?: number;
|
|
43
|
+
cursor?: string;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Paginated result (used by storage.query, content.list, media.list)
|
|
47
|
+
*/
|
|
48
|
+
interface PaginatedResult<T> {
|
|
49
|
+
items: T[];
|
|
50
|
+
cursor?: string;
|
|
51
|
+
hasMore: boolean;
|
|
52
|
+
}
|
|
53
|
+
interface VersionedValue<T = unknown> {
|
|
54
|
+
value: T;
|
|
55
|
+
/** Opaque host revision, valid only for the key from which it was read. */
|
|
56
|
+
revision: string;
|
|
57
|
+
}
|
|
58
|
+
type ConditionalWriteResult = {
|
|
59
|
+
applied: true;
|
|
60
|
+
revision: string;
|
|
61
|
+
} | {
|
|
62
|
+
applied: false;
|
|
63
|
+
};
|
|
64
|
+
interface ConditionalDeleteResult {
|
|
65
|
+
applied: boolean;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* A single per-field integer delta for {@link StorageCollection.updateIf}.
|
|
69
|
+
*
|
|
70
|
+
* `inc`/`dec` values must be safe integers, enforced at runtime with
|
|
71
|
+
* `Number.isSafeInteger` (which also rejects `NaN`/`Infinity`), because a TS
|
|
72
|
+
* `number` cannot forbid float literals. Deltas are applied entirely in-SQL
|
|
73
|
+
* over the stored value with `COALESCE(<value>, 0) ± n`, so a delta on a
|
|
74
|
+
* missing or JSON-`null` field starts from `0` (never corrupts the document).
|
|
75
|
+
*
|
|
76
|
+
* `updateIf` does NOT clamp: a `dec` can drive a field negative when the
|
|
77
|
+
* `where` guard doesn't cover the delta magnitude (e.g. stock `2` with
|
|
78
|
+
* `where: { stock: { gte: 1 } }` and `delta: { stock: { dec: 3 } }` → `-1`,
|
|
79
|
+
* `applied: true`). The guard is the caller's responsibility — pair a `dec: k`
|
|
80
|
+
* with a `gte: k` guard to prevent underflow.
|
|
81
|
+
*/
|
|
82
|
+
type NumericDelta = {
|
|
83
|
+
inc: number;
|
|
84
|
+
} | {
|
|
85
|
+
dec: number;
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* Arguments to {@link StorageCollection.updateIf}.
|
|
89
|
+
*
|
|
90
|
+
* `where` reuses the {@link QueryOptions} `WhereClause` verbatim — the guard is
|
|
91
|
+
* evaluated in-SQL with the same numeric-correct, total comparisons as
|
|
92
|
+
* `query()`. An empty `where: {}` emits no guard, i.e. it matches the row
|
|
93
|
+
* unconditionally (update-if-row-exists) — a footgun in the no-oversell case,
|
|
94
|
+
* where a real predicate (e.g. `{ stock: { gte: 1 } }`) is what you want.
|
|
95
|
+
*
|
|
96
|
+
* At least one of `set` / `delta` must be present (a runtime error is thrown
|
|
97
|
+
* otherwise). A field may not appear in both `set` and `delta` in the same
|
|
98
|
+
* call. `set` and `delta` are separate arguments (not a union) so a wholesale
|
|
99
|
+
* value that happens to look like `{ inc: 5 }` is never mistaken for a delta.
|
|
100
|
+
*/
|
|
101
|
+
interface UpdateIfArgs<T> {
|
|
102
|
+
/**
|
|
103
|
+
* Guard evaluated in-SQL; identical semantics to `query({ where })`. An
|
|
104
|
+
* empty `{}` means "match the row unconditionally (no guard)".
|
|
105
|
+
*/
|
|
106
|
+
where: WhereClause;
|
|
107
|
+
/** Wholesale field values merged into the stored JSON document. */
|
|
108
|
+
set?: Partial<T>;
|
|
109
|
+
/** Per-field integer deltas applied in-SQL (`COALESCE(base, 0) ± n`). */
|
|
110
|
+
delta?: { [K in keyof T]?: NumericDelta };
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Result of {@link StorageCollection.updateIf}.
|
|
114
|
+
*
|
|
115
|
+
* `applied: false` intentionally conflates "row absent" and "guard failed": a
|
|
116
|
+
* single-statement guarded `UPDATE` cannot distinguish them, and the caller
|
|
117
|
+
* should not need to. `updateIf` is update-only — it never inserts a missing
|
|
118
|
+
* row.
|
|
119
|
+
*/
|
|
120
|
+
type UpdateIfResult<T> = {
|
|
121
|
+
applied: true;
|
|
122
|
+
data: T;
|
|
123
|
+
} | {
|
|
124
|
+
applied: false;
|
|
125
|
+
};
|
|
126
|
+
/**
|
|
127
|
+
* Storage collection interface - the API exposed to plugins
|
|
128
|
+
* No async iterators - all operations return promises with pagination
|
|
129
|
+
*/
|
|
130
|
+
interface StorageCollection<T = unknown> {
|
|
131
|
+
get(id: string): Promise<T | null>;
|
|
132
|
+
put(id: string, data: T): Promise<void>;
|
|
133
|
+
delete(id: string): Promise<boolean>;
|
|
134
|
+
exists(id: string): Promise<boolean>;
|
|
135
|
+
/** A stored JSON null returns an envelope with value: null; only an absent row returns null. */
|
|
136
|
+
getVersioned(id: string): Promise<VersionedValue<T> | null>;
|
|
137
|
+
/** A null expected revision creates only when absent. Errors reject; conflicts return applied: false. */
|
|
138
|
+
compareAndSet(id: string, expectedRevision: string | null, data: T): Promise<ConditionalWriteResult>;
|
|
139
|
+
compareAndDelete(id: string, expectedRevision: string): Promise<ConditionalDeleteResult>;
|
|
140
|
+
getMany(ids: string[]): Promise<Map<string, T>>;
|
|
141
|
+
putMany(items: Array<{
|
|
142
|
+
id: string;
|
|
143
|
+
data: T;
|
|
144
|
+
}>): Promise<void>;
|
|
145
|
+
deleteMany(ids: string[]): Promise<number>;
|
|
146
|
+
query(options?: QueryOptions): Promise<PaginatedResult<{
|
|
147
|
+
id: string;
|
|
148
|
+
data: T;
|
|
149
|
+
}>>;
|
|
150
|
+
count(where?: WhereClause): Promise<number>;
|
|
151
|
+
/**
|
|
152
|
+
* Predicate-guarded atomic update. Applies `set`/`delta` to the row `id`
|
|
153
|
+
* only if it exists and the `where` guard matches, in a single guarded
|
|
154
|
+
* `UPDATE … RETURNING`. This is the no-oversell primitive: the guard and the
|
|
155
|
+
* arithmetic live in one statement, so N concurrent guarded decrements
|
|
156
|
+
* serialize correctly. `applied: false` means the row was absent OR the
|
|
157
|
+
* guard failed (the two are intentionally indistinguishable). Non-object
|
|
158
|
+
* documents, invalid counters and unsafe arithmetic results also fail the
|
|
159
|
+
* guard. Never inserts.
|
|
160
|
+
*
|
|
161
|
+
* Serialization failures and deadlocks throw `StorageSerializationError`.
|
|
162
|
+
* Retry the write with a bounded policy; restart an explicit transaction
|
|
163
|
+
* before retrying its operations.
|
|
164
|
+
*/
|
|
165
|
+
updateIf(id: string, args: UpdateIfArgs<T>): Promise<UpdateIfResult<T>>;
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Plugin storage context - typed based on declared collections
|
|
169
|
+
*/
|
|
170
|
+
type PluginStorage<T extends PluginStorageConfig> = { [K in keyof T]: StorageCollection };
|
|
171
|
+
/**
|
|
172
|
+
* Plugin-scoped key-value state.
|
|
173
|
+
*
|
|
174
|
+
* Convention:
|
|
175
|
+
* - `state:*` - Internal plugin state (not shown to users)
|
|
176
|
+
* - `cache:*` - Reusable computed or remote data
|
|
177
|
+
*
|
|
178
|
+
* The `settings:*` namespace remains a compatibility alias through EmDash
|
|
179
|
+
* 0.x. New code uses `PluginContext.settings` for user configuration.
|
|
180
|
+
*/
|
|
181
|
+
interface KVAccess {
|
|
182
|
+
get<T>(key: string): Promise<T | null>;
|
|
183
|
+
getVersioned<T>(key: string): Promise<VersionedValue<T> | null>;
|
|
184
|
+
/** A null expected revision creates only when absent. Errors reject; conflicts return applied: false. */
|
|
185
|
+
compareAndSet(key: string, expectedRevision: string | null, value: unknown): Promise<ConditionalWriteResult>;
|
|
186
|
+
compareAndDelete(key: string, expectedRevision: string): Promise<ConditionalDeleteResult>;
|
|
187
|
+
set(key: string, value: unknown): Promise<void>;
|
|
188
|
+
delete(key: string): Promise<boolean>;
|
|
189
|
+
list(prefix?: string): Promise<Array<{
|
|
190
|
+
key: string;
|
|
191
|
+
value: unknown;
|
|
192
|
+
}>>;
|
|
193
|
+
}
|
|
194
|
+
/** Plugin settings. Fields declared as `secret` in `admin.settingsSchema` are encrypted. */
|
|
195
|
+
interface SettingsAccess {
|
|
196
|
+
get<T>(key: string): Promise<T | null>;
|
|
197
|
+
getVersioned<T>(key: string): Promise<VersionedValue<T> | null>;
|
|
198
|
+
compareAndSet(key: string, expectedRevision: string | null, value: unknown): Promise<ConditionalWriteResult>;
|
|
199
|
+
compareAndDelete(key: string, expectedRevision: string): Promise<ConditionalDeleteResult>;
|
|
200
|
+
set(key: string, value: unknown): Promise<void>;
|
|
201
|
+
delete(key: string): Promise<boolean>;
|
|
202
|
+
list(prefix?: string): Promise<Array<{
|
|
203
|
+
key: string;
|
|
204
|
+
value: unknown;
|
|
205
|
+
}>>;
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* SEO metadata for a content item, as stored in the core SEO panel.
|
|
209
|
+
*
|
|
210
|
+
* Only present on items in collections with `has_seo = 1`. For collections
|
|
211
|
+
* without SEO enabled, `ContentItem.seo` is `undefined`.
|
|
212
|
+
*/
|
|
213
|
+
interface ContentItemSeo {
|
|
214
|
+
title: string | null;
|
|
215
|
+
description: string | null;
|
|
216
|
+
image: string | null;
|
|
217
|
+
canonical: string | null;
|
|
218
|
+
noIndex: boolean;
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* SEO input accepted by content write operations.
|
|
222
|
+
*
|
|
223
|
+
* All fields are optional — only fields that are present overwrite existing
|
|
224
|
+
* values. An empty object is treated as a no-op.
|
|
225
|
+
*/
|
|
226
|
+
interface ContentItemSeoInput {
|
|
227
|
+
title?: string | null;
|
|
228
|
+
description?: string | null;
|
|
229
|
+
image?: string | null;
|
|
230
|
+
canonical?: string | null;
|
|
231
|
+
noIndex?: boolean;
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Content item returned from content API
|
|
235
|
+
*/
|
|
236
|
+
interface ContentItem {
|
|
237
|
+
id: string;
|
|
238
|
+
type: string;
|
|
239
|
+
slug: string | null;
|
|
240
|
+
status: string;
|
|
241
|
+
locale: string | null;
|
|
242
|
+
data: Record<string, unknown>;
|
|
243
|
+
/**
|
|
244
|
+
* SEO metadata, populated when the collection has SEO enabled
|
|
245
|
+
* (`has_seo = 1`). `undefined` for non-SEO collections.
|
|
246
|
+
*/
|
|
247
|
+
seo?: ContentItemSeo;
|
|
248
|
+
createdAt: string;
|
|
249
|
+
updatedAt: string;
|
|
250
|
+
publishedAt: string | null;
|
|
251
|
+
/** Scheduled publication time, if set (e.g. scheduled items or scheduled draft changes). */
|
|
252
|
+
scheduledAt?: string | null;
|
|
253
|
+
authorId?: string | null;
|
|
254
|
+
translationGroup?: string | null;
|
|
255
|
+
liveRevisionId?: string | null;
|
|
256
|
+
draftRevisionId?: string | null;
|
|
257
|
+
version?: number;
|
|
258
|
+
}
|
|
259
|
+
interface ContentTranslationSummary {
|
|
260
|
+
id: string;
|
|
261
|
+
locale: string | null;
|
|
262
|
+
slug: string | null;
|
|
263
|
+
status: string;
|
|
264
|
+
updatedAt: string;
|
|
265
|
+
}
|
|
266
|
+
interface ContentRevisionInfo {
|
|
267
|
+
id: string;
|
|
268
|
+
collection: string;
|
|
269
|
+
entryId: string;
|
|
270
|
+
data: Record<string, unknown>;
|
|
271
|
+
createdAt: string;
|
|
272
|
+
}
|
|
273
|
+
interface FieldSchemaInfo {
|
|
274
|
+
slug: string;
|
|
275
|
+
label: string;
|
|
276
|
+
type: FieldType;
|
|
277
|
+
required: boolean;
|
|
278
|
+
unique: boolean;
|
|
279
|
+
default?: unknown;
|
|
280
|
+
validation?: FieldValidation;
|
|
281
|
+
widget?: string;
|
|
282
|
+
options?: FieldWidgetOptions;
|
|
283
|
+
searchable: boolean;
|
|
284
|
+
indexed: boolean;
|
|
285
|
+
translatable: boolean;
|
|
286
|
+
sortOrder: number;
|
|
287
|
+
}
|
|
288
|
+
interface CollectionSchemaInfo {
|
|
289
|
+
slug: string;
|
|
290
|
+
label: string;
|
|
291
|
+
labelSingular: string | null;
|
|
292
|
+
description: string | null;
|
|
293
|
+
supports: string[];
|
|
294
|
+
hasSeo: boolean;
|
|
295
|
+
titleField: string | null;
|
|
296
|
+
dateField: string | null;
|
|
297
|
+
urlPattern: string | null;
|
|
298
|
+
routable: boolean;
|
|
299
|
+
hidden: boolean;
|
|
300
|
+
fields: FieldSchemaInfo[];
|
|
301
|
+
}
|
|
302
|
+
interface SchemaAccess {
|
|
303
|
+
listCollections(): Promise<CollectionSchemaInfo[]>;
|
|
304
|
+
getCollection(slug: string): Promise<CollectionSchemaInfo | null>;
|
|
305
|
+
}
|
|
306
|
+
interface ContentListWhere {
|
|
307
|
+
/** Exact match on `status` (e.g. `"published"`, `"draft"`). */
|
|
308
|
+
status?: string;
|
|
309
|
+
/** Exact match on `locale` (e.g. `"en"`, `"fr-CA"`). */
|
|
310
|
+
locale?: string;
|
|
311
|
+
/** AND-combined filters over custom fields explicitly marked as indexed. */
|
|
312
|
+
fieldFilters?: ContentFieldFilters;
|
|
313
|
+
}
|
|
314
|
+
/**
|
|
315
|
+
* Content list options
|
|
316
|
+
*/
|
|
317
|
+
interface ContentListOptions {
|
|
318
|
+
limit?: number;
|
|
319
|
+
cursor?: string;
|
|
320
|
+
orderBy?: Record<string, "asc" | "desc">;
|
|
321
|
+
where?: ContentListWhere;
|
|
322
|
+
}
|
|
323
|
+
/**
|
|
324
|
+
* Input accepted by `content.create` / `content.update`.
|
|
325
|
+
*
|
|
326
|
+
* Most entries are field slugs mapped to their values. The reserved `seo`
|
|
327
|
+
* key is extracted and routed to the core SEO panel (the `_emdash_seo`
|
|
328
|
+
* table), matching the shape accepted by the REST API. Passing `seo` for a
|
|
329
|
+
* collection that does not have SEO enabled throws a validation error.
|
|
330
|
+
*/
|
|
331
|
+
type ContentWriteInput = Record<string, unknown> & {
|
|
332
|
+
seo?: ContentItemSeoInput;
|
|
333
|
+
};
|
|
334
|
+
/** Options accepted by `content.create`. */
|
|
335
|
+
interface ContentCreateOptions {
|
|
336
|
+
/** Locale for the new content row. Defaults to the configured site locale, then `en`. */
|
|
337
|
+
locale?: string;
|
|
338
|
+
/** Existing row in the same collection whose translation group the new row joins. */
|
|
339
|
+
translationOf?: string;
|
|
340
|
+
}
|
|
341
|
+
type PluginContentCreateCallback = (pluginId: string, collection: string, data: ContentWriteInput, options?: ContentCreateOptions & {
|
|
342
|
+
/** Save-hook origin supplied by sandbox transports to prevent hook re-entry. */originHook?: "content:beforeSave" | "content:afterSave";
|
|
343
|
+
sandboxOrigin?: true;
|
|
344
|
+
}) => Promise<ContentItem>;
|
|
345
|
+
/**
|
|
346
|
+
* Taxonomy definition returned from the taxonomy API (e.g. "category", "tag").
|
|
347
|
+
*/
|
|
348
|
+
interface TaxonomyDefInfo {
|
|
349
|
+
name: string;
|
|
350
|
+
label: string;
|
|
351
|
+
labelSingular: string | null;
|
|
352
|
+
hierarchical: boolean;
|
|
353
|
+
/** Collections this taxonomy is attached to (e.g. `["posts"]`). */
|
|
354
|
+
collections: string[];
|
|
355
|
+
locale: string;
|
|
356
|
+
}
|
|
357
|
+
/**
|
|
358
|
+
* Taxonomy term returned from the taxonomy API. Flat shape — for hierarchical
|
|
359
|
+
* taxonomies the tree is reconstructed via `parentId` (which stores the
|
|
360
|
+
* parent's locale-agnostic `translationGroup`).
|
|
361
|
+
*/
|
|
362
|
+
interface TaxonomyTermInfo {
|
|
363
|
+
id: string;
|
|
364
|
+
/** Taxonomy name this term belongs to (e.g. "category"). */
|
|
365
|
+
taxonomy: string;
|
|
366
|
+
slug: string;
|
|
367
|
+
label: string;
|
|
368
|
+
parentId: string | null;
|
|
369
|
+
/** Term metadata as edited in the admin (`description` etc.). */
|
|
370
|
+
data: Record<string, unknown> | null;
|
|
371
|
+
locale: string;
|
|
372
|
+
translationGroup: string | null;
|
|
373
|
+
}
|
|
374
|
+
/**
|
|
375
|
+
* Options accepted by taxonomy read operations. Omitting `locale` returns
|
|
376
|
+
* rows for every locale.
|
|
377
|
+
*/
|
|
378
|
+
interface TaxonomyReadOptions {
|
|
379
|
+
locale?: string;
|
|
380
|
+
}
|
|
381
|
+
interface TaxonomyTermCreateInput {
|
|
382
|
+
label: string;
|
|
383
|
+
slug?: string;
|
|
384
|
+
parentId?: string | null;
|
|
385
|
+
description?: string;
|
|
386
|
+
locale?: string;
|
|
387
|
+
translationOf?: string;
|
|
388
|
+
}
|
|
389
|
+
/**
|
|
390
|
+
* Content access interface - capability-gated
|
|
391
|
+
*/
|
|
392
|
+
interface ContentAccess {
|
|
393
|
+
get(collection: string, id: string): Promise<ContentItem | null>;
|
|
394
|
+
list(collection: string, options?: ContentListOptions): Promise<PaginatedResult<ContentItem>>;
|
|
395
|
+
getTranslations?(collection: string, id: string): Promise<{
|
|
396
|
+
translationGroup: string;
|
|
397
|
+
translations: ContentTranslationSummary[];
|
|
398
|
+
}>;
|
|
399
|
+
getPublicUrl?(collection: string, id: string): Promise<string | null>;
|
|
400
|
+
listRevisions?(collection: string, id: string, options?: {
|
|
401
|
+
limit?: number;
|
|
402
|
+
}): Promise<ContentRevisionInfo[]>;
|
|
403
|
+
getRevision?(collection: string, id: string, revisionId: string): Promise<ContentRevisionInfo | null>;
|
|
404
|
+
create?(collection: string, data: ContentWriteInput, options?: ContentCreateOptions): Promise<ContentItem>;
|
|
405
|
+
update?(collection: string, id: string, data: ContentWriteInput): Promise<ContentItem>;
|
|
406
|
+
delete?(collection: string, id: string): Promise<boolean>;
|
|
407
|
+
getVersioned?(collection: string, id: string): Promise<VersionedContentItem | null>;
|
|
408
|
+
publish?(collection: string, id: string, options: {
|
|
409
|
+
_rev: string;
|
|
410
|
+
}): Promise<VersionedContentItem>;
|
|
411
|
+
unpublish?(collection: string, id: string, options: {
|
|
412
|
+
_rev: string;
|
|
413
|
+
}): Promise<VersionedContentItem>;
|
|
414
|
+
schedule?(collection: string, id: string, options: {
|
|
415
|
+
scheduledAt: string;
|
|
416
|
+
_rev: string;
|
|
417
|
+
}): Promise<VersionedContentItem>;
|
|
418
|
+
unschedule?(collection: string, id: string, options: {
|
|
419
|
+
_rev: string;
|
|
420
|
+
}): Promise<VersionedContentItem>;
|
|
421
|
+
getTrashedVersioned?(collection: string, id: string): Promise<VersionedContentItem | null>;
|
|
422
|
+
restore?(collection: string, id: string, options: {
|
|
423
|
+
_rev: string;
|
|
424
|
+
}): Promise<VersionedContentItem>;
|
|
425
|
+
}
|
|
426
|
+
interface VersionedContentItem {
|
|
427
|
+
item: ContentItem;
|
|
428
|
+
_rev: string;
|
|
429
|
+
}
|
|
430
|
+
/**
|
|
431
|
+
* Taxonomy access interface — capability-gated on `taxonomies:read`.
|
|
432
|
+
*/
|
|
433
|
+
interface TaxonomyAccess {
|
|
434
|
+
/** List taxonomy definitions. */
|
|
435
|
+
getAll(options?: TaxonomyReadOptions): Promise<TaxonomyDefInfo[]>;
|
|
436
|
+
/** All terms of a taxonomy, ordered by label. */
|
|
437
|
+
getTerms(taxonomy: string, options?: TaxonomyReadOptions): Promise<TaxonomyTermInfo[]>;
|
|
438
|
+
/** Terms assigned to a content entry, optionally scoped to one taxonomy. */
|
|
439
|
+
getEntryTerms(collection: string, entryId: string, options?: TaxonomyReadOptions & {
|
|
440
|
+
taxonomy?: string;
|
|
441
|
+
}): Promise<TaxonomyTermInfo[]>;
|
|
442
|
+
createTerm?(taxonomy: string, input: TaxonomyTermCreateInput): Promise<TaxonomyTermInfo>;
|
|
443
|
+
addEntryTerms?(collection: string, entryId: string, taxonomy: string, termIds: string[]): Promise<TaxonomyTermInfo[]>;
|
|
444
|
+
removeEntryTerms?(collection: string, entryId: string, taxonomy: string, termIds: string[]): Promise<TaxonomyTermInfo[]>;
|
|
445
|
+
}
|
|
446
|
+
/** Taxonomy mutations available with `taxonomies:write`. */
|
|
447
|
+
interface TaxonomyAccessWithWrite extends TaxonomyAccess {
|
|
448
|
+
createTerm(taxonomy: string, input: TaxonomyTermCreateInput): Promise<TaxonomyTermInfo>;
|
|
449
|
+
addEntryTerms(collection: string, entryId: string, taxonomy: string, termIds: string[]): Promise<TaxonomyTermInfo[]>;
|
|
450
|
+
removeEntryTerms(collection: string, entryId: string, taxonomy: string, termIds: string[]): Promise<TaxonomyTermInfo[]>;
|
|
451
|
+
}
|
|
452
|
+
/**
|
|
453
|
+
* Public byline profile returned from the byline API. Omits the linked user
|
|
454
|
+
* account, guest flag, and custom field values.
|
|
455
|
+
*/
|
|
456
|
+
interface BylineInfo {
|
|
457
|
+
id: string;
|
|
458
|
+
slug: string;
|
|
459
|
+
displayName: string;
|
|
460
|
+
bio: string | null;
|
|
461
|
+
websiteUrl: string | null;
|
|
462
|
+
/** Media ID of the avatar image. Resolve it with `ctx.media.get()`. */
|
|
463
|
+
avatarMediaId: string | null;
|
|
464
|
+
locale: string;
|
|
465
|
+
/** Locale-agnostic identity shared by every translation of the byline. */
|
|
466
|
+
translationGroup: string;
|
|
467
|
+
}
|
|
468
|
+
/** A byline credited on a content entry. */
|
|
469
|
+
interface BylineCreditInfo {
|
|
470
|
+
byline: BylineInfo;
|
|
471
|
+
sortOrder: number;
|
|
472
|
+
roleLabel: string | null;
|
|
473
|
+
/**
|
|
474
|
+
* `explicit` for a credit assigned in the editor; `inferred` when the entry
|
|
475
|
+
* has no credits and the byline linked to the entry's author is used.
|
|
476
|
+
*/
|
|
477
|
+
source: "explicit" | "inferred";
|
|
478
|
+
}
|
|
479
|
+
interface BylineListOptions {
|
|
480
|
+
/** Match one locale. Omit to list every locale. */
|
|
481
|
+
locale?: string;
|
|
482
|
+
/** Page size, clamped to 1–100. Defaults to 50. */
|
|
483
|
+
limit?: number;
|
|
484
|
+
cursor?: string;
|
|
485
|
+
}
|
|
486
|
+
/** Byline credits for one entry in a batched lookup. */
|
|
487
|
+
interface EntryBylineCredits {
|
|
488
|
+
entryId: string;
|
|
489
|
+
bylines: BylineCreditInfo[];
|
|
490
|
+
}
|
|
491
|
+
/**
|
|
492
|
+
* Byline access interface — capability-gated on `bylines:read`.
|
|
493
|
+
*/
|
|
494
|
+
interface BylineAccess {
|
|
495
|
+
/** Get a byline by its row ID. */
|
|
496
|
+
get(id: string): Promise<BylineInfo | null>;
|
|
497
|
+
/** List bylines, newest first. */
|
|
498
|
+
list(options?: BylineListOptions): Promise<PaginatedResult<BylineInfo>>;
|
|
499
|
+
/**
|
|
500
|
+
* Bylines credited on up to 100 entries of one collection, in the order the
|
|
501
|
+
* IDs were given. Duplicate IDs are returned once. Credits resolve at each
|
|
502
|
+
* entry's own locale, matching what the site renders. Trashed and missing
|
|
503
|
+
* entries have no credits.
|
|
504
|
+
*/
|
|
505
|
+
getEntriesBylines(collection: string, entryIds: string[]): Promise<EntryBylineCredits[]>;
|
|
506
|
+
}
|
|
507
|
+
type RedirectStatus = 301 | 302 | 307 | 308 | 410 | 451;
|
|
508
|
+
interface RedirectInfo {
|
|
509
|
+
id: string;
|
|
510
|
+
source: string;
|
|
511
|
+
destination: string;
|
|
512
|
+
type: RedirectStatus;
|
|
513
|
+
isPattern: boolean;
|
|
514
|
+
enabled: boolean;
|
|
515
|
+
hits: number;
|
|
516
|
+
lastHitAt: string | null;
|
|
517
|
+
groupName: string | null;
|
|
518
|
+
auto: boolean;
|
|
519
|
+
createdAt: string;
|
|
520
|
+
updatedAt: string;
|
|
521
|
+
}
|
|
522
|
+
interface VersionedRedirect {
|
|
523
|
+
redirect: RedirectInfo;
|
|
524
|
+
/** Opaque host revision. Pass it back unchanged for update or delete. */
|
|
525
|
+
_rev: string;
|
|
526
|
+
}
|
|
527
|
+
interface RedirectListOptions {
|
|
528
|
+
limit?: number;
|
|
529
|
+
cursor?: string;
|
|
530
|
+
search?: string;
|
|
531
|
+
group?: string;
|
|
532
|
+
enabled?: boolean;
|
|
533
|
+
auto?: boolean;
|
|
534
|
+
}
|
|
535
|
+
interface RedirectCreateInput {
|
|
536
|
+
source: string;
|
|
537
|
+
destination?: string;
|
|
538
|
+
type?: RedirectStatus;
|
|
539
|
+
enabled?: boolean;
|
|
540
|
+
groupName?: string | null;
|
|
541
|
+
}
|
|
542
|
+
interface RedirectUpdateInput {
|
|
543
|
+
source?: string;
|
|
544
|
+
destination?: string;
|
|
545
|
+
type?: RedirectStatus;
|
|
546
|
+
enabled?: boolean;
|
|
547
|
+
groupName?: string | null;
|
|
548
|
+
}
|
|
549
|
+
interface RedirectAccess {
|
|
550
|
+
list(options?: RedirectListOptions): Promise<PaginatedResult<RedirectInfo>>;
|
|
551
|
+
get(id: string): Promise<VersionedRedirect | null>;
|
|
552
|
+
create?(input: RedirectCreateInput): Promise<VersionedRedirect>;
|
|
553
|
+
update?(id: string, input: RedirectUpdateInput & {
|
|
554
|
+
_rev: string;
|
|
555
|
+
}): Promise<VersionedRedirect>;
|
|
556
|
+
delete?(id: string, options: {
|
|
557
|
+
_rev: string;
|
|
558
|
+
}): Promise<boolean>;
|
|
559
|
+
}
|
|
560
|
+
interface RedirectAccessWithWrite extends RedirectAccess {
|
|
561
|
+
create(input: RedirectCreateInput): Promise<VersionedRedirect>;
|
|
562
|
+
update(id: string, input: RedirectUpdateInput & {
|
|
563
|
+
_rev: string;
|
|
564
|
+
}): Promise<VersionedRedirect>;
|
|
565
|
+
delete(id: string, options: {
|
|
566
|
+
_rev: string;
|
|
567
|
+
}): Promise<boolean>;
|
|
568
|
+
}
|
|
569
|
+
/**
|
|
570
|
+
* Full content access with write operations
|
|
571
|
+
*/
|
|
572
|
+
interface ContentAccessWithWrite extends ContentAccess {
|
|
573
|
+
create(collection: string, data: ContentWriteInput, options?: ContentCreateOptions): Promise<ContentItem>;
|
|
574
|
+
update(collection: string, id: string, data: ContentWriteInput): Promise<ContentItem>;
|
|
575
|
+
delete(collection: string, id: string): Promise<boolean>;
|
|
576
|
+
}
|
|
577
|
+
/**
|
|
578
|
+
* Media item returned from media API
|
|
579
|
+
*/
|
|
580
|
+
interface MediaItem {
|
|
581
|
+
id: string;
|
|
582
|
+
filename: string;
|
|
583
|
+
mimeType: string;
|
|
584
|
+
size: number | null;
|
|
585
|
+
url: string;
|
|
586
|
+
createdAt: string;
|
|
587
|
+
width?: number | null;
|
|
588
|
+
height?: number | null;
|
|
589
|
+
alt?: string | null;
|
|
590
|
+
caption?: string | null;
|
|
591
|
+
focalX?: number | null;
|
|
592
|
+
focalY?: number | null;
|
|
593
|
+
blurhash?: string | null;
|
|
594
|
+
dominantColor?: string | null;
|
|
595
|
+
folderId?: string | null;
|
|
596
|
+
status?: "ready";
|
|
597
|
+
}
|
|
598
|
+
interface MediaBytes {
|
|
599
|
+
bytes: Uint8Array;
|
|
600
|
+
filename: string;
|
|
601
|
+
mimeType: string;
|
|
602
|
+
size: number;
|
|
603
|
+
contentHash?: string;
|
|
604
|
+
}
|
|
605
|
+
interface MediaMetadataPatch {
|
|
606
|
+
alt?: string | null;
|
|
607
|
+
caption?: string | null;
|
|
608
|
+
focalX?: number | null;
|
|
609
|
+
focalY?: number | null;
|
|
610
|
+
}
|
|
611
|
+
/**
|
|
612
|
+
* Media list options
|
|
613
|
+
*/
|
|
614
|
+
interface MediaListOptions {
|
|
615
|
+
limit?: number;
|
|
616
|
+
cursor?: string;
|
|
617
|
+
mimeType?: string;
|
|
618
|
+
}
|
|
619
|
+
/**
|
|
620
|
+
* Media access interface - capability-gated
|
|
621
|
+
*/
|
|
622
|
+
interface MediaAccess {
|
|
623
|
+
get(id: string): Promise<MediaItem | null>;
|
|
624
|
+
list(options?: MediaListOptions): Promise<PaginatedResult<MediaItem>>;
|
|
625
|
+
/** Read ready media bytes, bounded by the caller's limit and the host maximum. */
|
|
626
|
+
readBytes?(id: string, options?: {
|
|
627
|
+
maxBytes?: number;
|
|
628
|
+
}): Promise<MediaBytes>;
|
|
629
|
+
/** Change only alt text, caption, or the complete focal-point pair. */
|
|
630
|
+
updateMetadata?(id: string, patch: MediaMetadataPatch): Promise<MediaItem>;
|
|
631
|
+
getUploadUrl?(filename: string, contentType: string): Promise<{
|
|
632
|
+
uploadUrl: string;
|
|
633
|
+
mediaId: string;
|
|
634
|
+
}>;
|
|
635
|
+
/**
|
|
636
|
+
* Upload media bytes directly. Preferred in sandboxed mode where
|
|
637
|
+
* plugins cannot make external requests to a presigned URL.
|
|
638
|
+
* Returns the created media item.
|
|
639
|
+
*/
|
|
640
|
+
upload?(filename: string, contentType: string, bytes: ArrayBuffer): Promise<{
|
|
641
|
+
mediaId: string;
|
|
642
|
+
storageKey: string;
|
|
643
|
+
url: string;
|
|
644
|
+
}>;
|
|
645
|
+
delete?(id: string): Promise<boolean>;
|
|
646
|
+
}
|
|
647
|
+
/**
|
|
648
|
+
* Full media access with write operations
|
|
649
|
+
*/
|
|
650
|
+
interface MediaAccessWithWrite extends MediaAccess {
|
|
651
|
+
getUploadUrl(filename: string, contentType: string): Promise<{
|
|
652
|
+
uploadUrl: string;
|
|
653
|
+
mediaId: string;
|
|
654
|
+
}>;
|
|
655
|
+
upload(filename: string, contentType: string, bytes: ArrayBuffer): Promise<{
|
|
656
|
+
mediaId: string;
|
|
657
|
+
storageKey: string;
|
|
658
|
+
url: string;
|
|
659
|
+
}>;
|
|
660
|
+
delete(id: string): Promise<boolean>;
|
|
661
|
+
}
|
|
662
|
+
/**
|
|
663
|
+
* HTTP client interface - requires network:request capability
|
|
664
|
+
*/
|
|
665
|
+
interface HttpAccess {
|
|
666
|
+
/**
|
|
667
|
+
* Fetch an allowed external URL and return a buffered response.
|
|
668
|
+
* Decoded request and response bodies are each limited to 8 MiB.
|
|
669
|
+
*/
|
|
670
|
+
fetch(url: string, init?: RequestInit): Promise<Response>;
|
|
671
|
+
}
|
|
672
|
+
/**
|
|
673
|
+
* Logger interface - always available
|
|
674
|
+
*/
|
|
675
|
+
interface LogAccess {
|
|
676
|
+
debug(message: string, data?: unknown): void;
|
|
677
|
+
info(message: string, data?: unknown): void;
|
|
678
|
+
warn(message: string, data?: unknown): void;
|
|
679
|
+
error(message: string, data?: unknown): void;
|
|
680
|
+
}
|
|
681
|
+
/**
|
|
682
|
+
* Site information available to all plugins
|
|
683
|
+
*/
|
|
684
|
+
interface SiteInfo {
|
|
685
|
+
/** Site name (from settings) */
|
|
686
|
+
name: string;
|
|
687
|
+
/** Site URL (from settings or request) */
|
|
688
|
+
url: string;
|
|
689
|
+
/** Site locale (from settings, defaults to "en") */
|
|
690
|
+
locale: string;
|
|
691
|
+
/**
|
|
692
|
+
* Astro's `trailingSlash` routing policy, from the host's Astro config.
|
|
693
|
+
* Plugins that build absolute URLs (sitemap, canonical, hreflang) should
|
|
694
|
+
* honor this so the URLs they emit match what the site serves. `createSiteInfo`
|
|
695
|
+
* always populates it (defaulting to `"ignore"`, Astro's default); it is
|
|
696
|
+
* optional on the type so pre-existing `SiteInfo` construction stays valid.
|
|
697
|
+
*/
|
|
698
|
+
trailingSlash?: "always" | "never" | "ignore";
|
|
699
|
+
}
|
|
700
|
+
/**
|
|
701
|
+
* Read-only user information exposed to plugins.
|
|
702
|
+
* Sensitive fields (password hashes, sessions, passkeys) are excluded.
|
|
703
|
+
*/
|
|
704
|
+
interface UserInfo {
|
|
705
|
+
id: string;
|
|
706
|
+
email: string;
|
|
707
|
+
name: string | null;
|
|
708
|
+
role: number;
|
|
709
|
+
createdAt: string;
|
|
710
|
+
}
|
|
711
|
+
/**
|
|
712
|
+
* User access interface - requires read:users capability
|
|
713
|
+
*/
|
|
714
|
+
interface UserAccess {
|
|
715
|
+
/** Get a user by ID */
|
|
716
|
+
get(id: string): Promise<UserInfo | null>;
|
|
717
|
+
/** Get a user by email */
|
|
718
|
+
getByEmail(email: string): Promise<UserInfo | null>;
|
|
719
|
+
/** List users with optional filters */
|
|
720
|
+
list(opts?: {
|
|
721
|
+
role?: number;
|
|
722
|
+
limit?: number;
|
|
723
|
+
cursor?: string;
|
|
724
|
+
}): Promise<{
|
|
725
|
+
items: UserInfo[];
|
|
726
|
+
nextCursor?: string;
|
|
727
|
+
}>;
|
|
728
|
+
}
|
|
729
|
+
type PluginCommentStatus = "approved" | "pending" | "spam";
|
|
730
|
+
/** Comment data exposed by the explicit personal-data `comments:read` capability. */
|
|
731
|
+
interface PluginComment {
|
|
732
|
+
id: string;
|
|
733
|
+
collection: string;
|
|
734
|
+
contentId: string;
|
|
735
|
+
parentId: string | null;
|
|
736
|
+
authorName: string;
|
|
737
|
+
authorEmail: string;
|
|
738
|
+
body: string;
|
|
739
|
+
status: PluginCommentStatus;
|
|
740
|
+
ipHash: string | null;
|
|
741
|
+
userAgent: string | null;
|
|
742
|
+
moderationMetadata: Record<string, unknown> | null;
|
|
743
|
+
createdAt: string;
|
|
744
|
+
updatedAt: string;
|
|
745
|
+
}
|
|
746
|
+
interface CommentListOptions {
|
|
747
|
+
status?: PluginCommentStatus;
|
|
748
|
+
collection?: string;
|
|
749
|
+
contentId?: string;
|
|
750
|
+
limit?: number;
|
|
751
|
+
cursor?: string;
|
|
752
|
+
}
|
|
753
|
+
interface CommentCountOptions {
|
|
754
|
+
status?: PluginCommentStatus;
|
|
755
|
+
collection?: string;
|
|
756
|
+
contentId?: string;
|
|
757
|
+
}
|
|
758
|
+
interface CommentAccess {
|
|
759
|
+
get(id: string): Promise<PluginComment | null>;
|
|
760
|
+
list(options?: CommentListOptions): Promise<PaginatedResult<PluginComment>>;
|
|
761
|
+
count(options?: CommentCountOptions): Promise<number>;
|
|
762
|
+
setStatus?(id: string, status: PluginCommentStatus, options: {
|
|
763
|
+
expectedStatus: PluginCommentStatus;
|
|
764
|
+
}): Promise<PluginComment>;
|
|
765
|
+
}
|
|
766
|
+
/**
|
|
767
|
+
* The unified plugin context - same shape for all hooks and routes
|
|
768
|
+
*/
|
|
769
|
+
interface PluginContext<TStorage extends PluginStorageConfig = PluginStorageConfig> {
|
|
770
|
+
/** Plugin metadata */
|
|
771
|
+
plugin: {
|
|
772
|
+
id: string;
|
|
773
|
+
version: string;
|
|
774
|
+
};
|
|
775
|
+
/** Storage collections - only if plugin declares storage */
|
|
776
|
+
storage: PluginStorage<TStorage>;
|
|
777
|
+
/** Key-value store for internal state */
|
|
778
|
+
kv: KVAccess;
|
|
779
|
+
/** Plugin settings. Secret schema fields are encrypted by the host. */
|
|
780
|
+
settings: SettingsAccess;
|
|
781
|
+
/** Content access - only if read:content or write:content capability */
|
|
782
|
+
content?: ContentAccess | ContentAccessWithWrite;
|
|
783
|
+
/** Schema discovery - only if schema:read capability */
|
|
784
|
+
schema?: SchemaAccess;
|
|
785
|
+
/** Taxonomy access - only if a taxonomy capability is declared. */
|
|
786
|
+
taxonomies?: TaxonomyAccess | TaxonomyAccessWithWrite;
|
|
787
|
+
/** Byline access - only if bylines:read capability */
|
|
788
|
+
bylines?: BylineAccess;
|
|
789
|
+
/** Redirect access - only if redirects:read or redirects:write capability */
|
|
790
|
+
redirects?: RedirectAccess | RedirectAccessWithWrite;
|
|
791
|
+
/** Media access - only if read:media or write:media capability */
|
|
792
|
+
media?: MediaAccess | MediaAccessWithWrite;
|
|
793
|
+
/** HTTP client - only if network:request capability */
|
|
794
|
+
http?: HttpAccess;
|
|
795
|
+
/** Logger - always available */
|
|
796
|
+
log: LogAccess;
|
|
797
|
+
/** Site information - always available */
|
|
798
|
+
site: SiteInfo;
|
|
799
|
+
/** URL helper - generates absolute URLs from paths. Always available. */
|
|
800
|
+
url(path: string): string;
|
|
801
|
+
/** User access - only if read:users capability */
|
|
802
|
+
users?: UserAccess;
|
|
803
|
+
/** Comment access — only if comments:read or comments:moderate is declared. */
|
|
804
|
+
comments?: CommentAccess;
|
|
805
|
+
/** Cron task scheduling - always available, scoped to plugin */
|
|
806
|
+
cron?: CronAccess;
|
|
807
|
+
/** Email access - only if email:send capability and a provider is configured */
|
|
808
|
+
email?: EmailAccess;
|
|
809
|
+
}
|
|
810
|
+
/**
|
|
811
|
+
* Cron access interface �� always available on plugin context, scoped to plugin.
|
|
812
|
+
*/
|
|
813
|
+
interface CronAccess {
|
|
814
|
+
/** Schedule a recurring or one-shot task */
|
|
815
|
+
schedule(name: string, opts: {
|
|
816
|
+
schedule: string;
|
|
817
|
+
data?: Record<string, unknown>;
|
|
818
|
+
}): Promise<void>;
|
|
819
|
+
/** Cancel a scheduled task */
|
|
820
|
+
cancel(name: string): Promise<void>;
|
|
821
|
+
/** List this plugin's scheduled tasks */
|
|
822
|
+
list(): Promise<CronTaskInfo[]>;
|
|
823
|
+
}
|
|
824
|
+
/**
|
|
825
|
+
* Task info returned from CronAccess.list()
|
|
826
|
+
*/
|
|
827
|
+
interface CronTaskInfo {
|
|
828
|
+
name: string;
|
|
829
|
+
schedule: string;
|
|
830
|
+
nextRunAt: string;
|
|
831
|
+
lastRunAt: string | null;
|
|
832
|
+
}
|
|
833
|
+
/**
|
|
834
|
+
* Event passed to the `cron` hook handler
|
|
835
|
+
*/
|
|
836
|
+
interface CronEvent {
|
|
837
|
+
name: string;
|
|
838
|
+
data?: Record<string, unknown>;
|
|
839
|
+
scheduledAt: string;
|
|
840
|
+
}
|
|
841
|
+
/**
|
|
842
|
+
* Cron hook handler type
|
|
843
|
+
*/
|
|
844
|
+
type CronHandler = (event: CronEvent, ctx: PluginContext) => Promise<void>;
|
|
845
|
+
/**
|
|
846
|
+
* Email access interface — requires `email:send` capability.
|
|
847
|
+
* Undefined when no `email:deliver` provider is configured.
|
|
848
|
+
*
|
|
849
|
+
* Related capabilities:
|
|
850
|
+
* - `email:send` — grants ctx.email (this interface)
|
|
851
|
+
* - `email:provide` — allows registering the `email:deliver` exclusive hook
|
|
852
|
+
* - `email:intercept` — allows registering `email:beforeSend` / `email:afterSend` hooks
|
|
853
|
+
*/
|
|
854
|
+
interface EmailAccess {
|
|
855
|
+
send(message: EmailMessage): Promise<void>;
|
|
856
|
+
}
|
|
857
|
+
/**
|
|
858
|
+
* Email message shape
|
|
859
|
+
*/
|
|
860
|
+
interface EmailMessage {
|
|
861
|
+
to: string;
|
|
862
|
+
/** Additional visible recipients. */
|
|
863
|
+
cc?: string[];
|
|
864
|
+
/** Address that replies go to instead of the sender. */
|
|
865
|
+
replyTo?: string;
|
|
866
|
+
subject: string;
|
|
867
|
+
text: string;
|
|
868
|
+
html?: string;
|
|
869
|
+
}
|
|
870
|
+
/**
|
|
871
|
+
* Event passed to email:beforeSend hooks (middleware — transform, validate, cancel)
|
|
872
|
+
*/
|
|
873
|
+
interface EmailBeforeSendEvent {
|
|
874
|
+
message: EmailMessage;
|
|
875
|
+
/** Where the email originated — "system" for auth emails, plugin ID for plugin emails */
|
|
876
|
+
source: string;
|
|
877
|
+
}
|
|
878
|
+
/**
|
|
879
|
+
* Event passed to email:deliver hook (exclusive — exactly one provider delivers)
|
|
880
|
+
*/
|
|
881
|
+
interface EmailDeliverEvent {
|
|
882
|
+
message: EmailMessage;
|
|
883
|
+
source: string;
|
|
884
|
+
}
|
|
885
|
+
/**
|
|
886
|
+
* Event passed to email:afterSend hooks (logging, analytics, fire-and-forget)
|
|
887
|
+
*/
|
|
888
|
+
interface EmailAfterSendEvent {
|
|
889
|
+
message: EmailMessage;
|
|
890
|
+
source: string;
|
|
891
|
+
}
|
|
892
|
+
/**
|
|
893
|
+
* Handler type for email:beforeSend hooks.
|
|
894
|
+
* Returns modified message, or false to cancel delivery.
|
|
895
|
+
*/
|
|
896
|
+
type EmailBeforeSendHandler = (event: EmailBeforeSendEvent, ctx: PluginContext) => Promise<EmailMessage | false>;
|
|
897
|
+
/**
|
|
898
|
+
* Handler type for email:deliver hooks (exclusive provider).
|
|
899
|
+
*/
|
|
900
|
+
type EmailDeliverHandler = (event: EmailDeliverEvent, ctx: PluginContext) => Promise<void>;
|
|
901
|
+
/**
|
|
902
|
+
* Handler type for email:afterSend hooks (fire-and-forget).
|
|
903
|
+
*/
|
|
904
|
+
type EmailAfterSendHandler = (event: EmailAfterSendEvent, ctx: PluginContext) => Promise<void>;
|
|
905
|
+
/**
|
|
906
|
+
* Collection comment settings (read from _emdash_collections)
|
|
907
|
+
*/
|
|
908
|
+
interface CollectionCommentSettings {
|
|
909
|
+
commentsEnabled: boolean;
|
|
910
|
+
commentsModeration: "all" | "first_time" | "none";
|
|
911
|
+
commentsClosedAfterDays: number;
|
|
912
|
+
commentsAutoApproveUsers: boolean;
|
|
913
|
+
}
|
|
914
|
+
/**
|
|
915
|
+
* Event passed to comment:beforeCreate hooks (middleware — transform, enrich, reject)
|
|
916
|
+
*/
|
|
917
|
+
interface CommentBeforeCreateEvent {
|
|
918
|
+
comment: {
|
|
919
|
+
collection: string;
|
|
920
|
+
contentId: string;
|
|
921
|
+
parentId: string | null;
|
|
922
|
+
authorName: string;
|
|
923
|
+
authorEmail: string;
|
|
924
|
+
authorUserId: string | null;
|
|
925
|
+
body: string;
|
|
926
|
+
ipHash: string | null;
|
|
927
|
+
userAgent: string | null;
|
|
928
|
+
};
|
|
929
|
+
/** Metadata bag — plugins can attach signals for the moderator */
|
|
930
|
+
metadata: Record<string, unknown>;
|
|
931
|
+
}
|
|
932
|
+
/**
|
|
933
|
+
* Event passed to comment:moderate hook (exclusive — decides initial status)
|
|
934
|
+
*/
|
|
935
|
+
interface CommentModerateEvent {
|
|
936
|
+
comment: CommentBeforeCreateEvent["comment"];
|
|
937
|
+
metadata: Record<string, unknown>;
|
|
938
|
+
collectionSettings: CollectionCommentSettings;
|
|
939
|
+
/** Number of prior approved comments from this email address */
|
|
940
|
+
priorApprovedCount: number;
|
|
941
|
+
}
|
|
942
|
+
/**
|
|
943
|
+
* Moderation decision returned by the comment:moderate handler
|
|
944
|
+
*/
|
|
945
|
+
interface ModerationDecision {
|
|
946
|
+
status: "approved" | "pending" | "spam";
|
|
947
|
+
/** Optional reason for admin visibility */
|
|
948
|
+
reason?: string;
|
|
949
|
+
}
|
|
950
|
+
/**
|
|
951
|
+
* Stored comment shape (full record with id, status, timestamps)
|
|
952
|
+
*/
|
|
953
|
+
interface StoredComment {
|
|
954
|
+
id: string;
|
|
955
|
+
collection: string;
|
|
956
|
+
contentId: string;
|
|
957
|
+
parentId: string | null;
|
|
958
|
+
authorName: string;
|
|
959
|
+
authorEmail: string;
|
|
960
|
+
authorUserId: string | null;
|
|
961
|
+
body: string;
|
|
962
|
+
status: string;
|
|
963
|
+
moderationMetadata: Record<string, unknown> | null;
|
|
964
|
+
createdAt: string;
|
|
965
|
+
updatedAt: string;
|
|
966
|
+
}
|
|
967
|
+
/**
|
|
968
|
+
* Event passed to comment:afterCreate hooks (fire-and-forget)
|
|
969
|
+
*/
|
|
970
|
+
interface CommentAfterCreateEvent {
|
|
971
|
+
comment: StoredComment;
|
|
972
|
+
metadata: Record<string, unknown>;
|
|
973
|
+
/** The content item the comment is on */
|
|
974
|
+
content: {
|
|
975
|
+
id: string;
|
|
976
|
+
collection: string;
|
|
977
|
+
slug: string;
|
|
978
|
+
title?: string;
|
|
979
|
+
};
|
|
980
|
+
/** The content author (for notifications) */
|
|
981
|
+
contentAuthor?: {
|
|
982
|
+
id: string;
|
|
983
|
+
name: string | null;
|
|
984
|
+
email: string;
|
|
985
|
+
};
|
|
986
|
+
}
|
|
987
|
+
/**
|
|
988
|
+
* Event passed to comment:afterModerate hooks (fire-and-forget, admin status change)
|
|
989
|
+
*/
|
|
990
|
+
interface CommentAfterModerateEvent {
|
|
991
|
+
comment: StoredComment;
|
|
992
|
+
previousStatus: string;
|
|
993
|
+
newStatus: string;
|
|
994
|
+
/** The admin who moderated */
|
|
995
|
+
moderator: {
|
|
996
|
+
id: string;
|
|
997
|
+
name: string | null;
|
|
998
|
+
};
|
|
999
|
+
/** Identifies whether an administrator or a plugin initiated the transition. */
|
|
1000
|
+
origin?: {
|
|
1001
|
+
source: "admin";
|
|
1002
|
+
userId: string;
|
|
1003
|
+
} | {
|
|
1004
|
+
source: "plugin";
|
|
1005
|
+
pluginId: string;
|
|
1006
|
+
};
|
|
1007
|
+
}
|
|
1008
|
+
/**
|
|
1009
|
+
* Handler type for comment:beforeCreate hooks.
|
|
1010
|
+
* Returns modified event, or false to reject the comment.
|
|
1011
|
+
*/
|
|
1012
|
+
type CommentBeforeCreateHandler = (event: CommentBeforeCreateEvent, ctx: PluginContext) => Promise<CommentBeforeCreateEvent | false | void>;
|
|
1013
|
+
/**
|
|
1014
|
+
* Handler type for comment:moderate hook (exclusive provider).
|
|
1015
|
+
*/
|
|
1016
|
+
type CommentModerateHandler = (event: CommentModerateEvent, ctx: PluginContext) => Promise<ModerationDecision>;
|
|
1017
|
+
/**
|
|
1018
|
+
* Handler type for comment:afterCreate hooks (fire-and-forget).
|
|
1019
|
+
*/
|
|
1020
|
+
type CommentAfterCreateHandler = (event: CommentAfterCreateEvent, ctx: PluginContext) => Promise<void>;
|
|
1021
|
+
/**
|
|
1022
|
+
* Handler type for comment:afterModerate hooks (fire-and-forget).
|
|
1023
|
+
*/
|
|
1024
|
+
type CommentAfterModerateHandler = (event: CommentAfterModerateEvent, ctx: PluginContext) => Promise<void>;
|
|
1025
|
+
/**
|
|
1026
|
+
* Hook configuration
|
|
1027
|
+
*/
|
|
1028
|
+
interface HookConfig<THandler> {
|
|
1029
|
+
/** Explicit ordering - lower numbers run first (default: 100) */
|
|
1030
|
+
priority?: number;
|
|
1031
|
+
/** Max execution time in ms (default: 5000) */
|
|
1032
|
+
timeout?: number;
|
|
1033
|
+
/** Run after these plugins */
|
|
1034
|
+
dependencies?: string[];
|
|
1035
|
+
/** Error handling policy */
|
|
1036
|
+
errorPolicy?: "continue" | "abort";
|
|
1037
|
+
/**
|
|
1038
|
+
* Mark this hook as exclusive — only one plugin can be the active provider.
|
|
1039
|
+
* Exclusive hooks skip the priority pipeline and dispatch only to the
|
|
1040
|
+
* admin-selected provider. Used for email:deliver, search, image optimization, etc.
|
|
1041
|
+
*/
|
|
1042
|
+
exclusive?: boolean;
|
|
1043
|
+
/** The hook handler */
|
|
1044
|
+
handler: THandler;
|
|
1045
|
+
}
|
|
1046
|
+
/**
|
|
1047
|
+
* Acting user that triggered a content hook. Present for authenticated
|
|
1048
|
+
* saves; absent for unauthenticated or internal writes.
|
|
1049
|
+
*/
|
|
1050
|
+
interface ActorInfo {
|
|
1051
|
+
readonly id: string;
|
|
1052
|
+
readonly role: number;
|
|
1053
|
+
readonly source?: "api" | "mcp" | "visual-editor";
|
|
1054
|
+
}
|
|
1055
|
+
type ContentActionOrigin = {
|
|
1056
|
+
source: "api" | "mcp" | "visual-editor";
|
|
1057
|
+
} | {
|
|
1058
|
+
source: "plugin";
|
|
1059
|
+
pluginId: string;
|
|
1060
|
+
} | {
|
|
1061
|
+
source: "scheduler";
|
|
1062
|
+
} | {
|
|
1063
|
+
source: "system";
|
|
1064
|
+
};
|
|
1065
|
+
type ContentPolicyDecision = void | {
|
|
1066
|
+
cancel: true;
|
|
1067
|
+
reason: string;
|
|
1068
|
+
};
|
|
1069
|
+
/**
|
|
1070
|
+
* Content hook event
|
|
1071
|
+
*/
|
|
1072
|
+
interface ContentHookEvent {
|
|
1073
|
+
content: Record<string, unknown>;
|
|
1074
|
+
collection: string;
|
|
1075
|
+
isNew: boolean;
|
|
1076
|
+
/**
|
|
1077
|
+
* ID of the existing item on `content:beforeSave` for an update. Absent on
|
|
1078
|
+
* creates, where the ID is assigned when the save completes, and on
|
|
1079
|
+
* `content:afterSave`, where `content.id` carries it.
|
|
1080
|
+
*/
|
|
1081
|
+
id?: string;
|
|
1082
|
+
/**
|
|
1083
|
+
* The acting user for this save. Carries the same authenticated identity
|
|
1084
|
+
* used to set the revision author, so plugins (e.g. audit logs) can record
|
|
1085
|
+
* who made the change.
|
|
1086
|
+
*/
|
|
1087
|
+
actor?: ActorInfo;
|
|
1088
|
+
/**
|
|
1089
|
+
* Locale of the entry being saved: the resolved target locale on a create,
|
|
1090
|
+
* the stored entry's locale on an update.
|
|
1091
|
+
*/
|
|
1092
|
+
locale?: string;
|
|
1093
|
+
/**
|
|
1094
|
+
* ID of the source entry when a create comes from the translation flow.
|
|
1095
|
+
* Absent on updates and on creates that start a new translation group.
|
|
1096
|
+
*/
|
|
1097
|
+
translationOf?: string;
|
|
1098
|
+
}
|
|
1099
|
+
/** Locale details a save passes to its `content:beforeSave` and `content:afterSave` hooks. */
|
|
1100
|
+
interface ContentSaveHookDetails {
|
|
1101
|
+
locale?: string;
|
|
1102
|
+
translationOf?: string;
|
|
1103
|
+
}
|
|
1104
|
+
/**
|
|
1105
|
+
* Content delete hook event
|
|
1106
|
+
*/
|
|
1107
|
+
interface ContentDeleteEvent {
|
|
1108
|
+
id: string;
|
|
1109
|
+
collection: string;
|
|
1110
|
+
/** `true` when the content is permanently deleted (not just trashed). */
|
|
1111
|
+
permanent: boolean;
|
|
1112
|
+
}
|
|
1113
|
+
/**
|
|
1114
|
+
* Content state-change hook event (fired after publish, unpublish, restore,
|
|
1115
|
+
* schedule, or unschedule).
|
|
1116
|
+
*/
|
|
1117
|
+
interface ContentStateChangeEvent {
|
|
1118
|
+
content: Record<string, unknown>;
|
|
1119
|
+
collection: string;
|
|
1120
|
+
}
|
|
1121
|
+
/**
|
|
1122
|
+
* Content publish/unpublish hook event.
|
|
1123
|
+
*/
|
|
1124
|
+
type ContentPublishStateChangeEvent = ContentStateChangeEvent;
|
|
1125
|
+
/**
|
|
1126
|
+
* Content restore hook event.
|
|
1127
|
+
*/
|
|
1128
|
+
type ContentRestoreStateChangeEvent = ContentStateChangeEvent;
|
|
1129
|
+
/**
|
|
1130
|
+
* Content schedule/unschedule hook event.
|
|
1131
|
+
*/
|
|
1132
|
+
type ContentScheduleStateChangeEvent = ContentStateChangeEvent;
|
|
1133
|
+
interface ContentPolicyEvent extends ContentStateChangeEvent {
|
|
1134
|
+
origin: ContentActionOrigin;
|
|
1135
|
+
actor?: ActorInfo;
|
|
1136
|
+
}
|
|
1137
|
+
interface ContentSchedulePolicyEvent extends ContentPolicyEvent {
|
|
1138
|
+
scheduledAt: string;
|
|
1139
|
+
}
|
|
1140
|
+
/**
|
|
1141
|
+
* Media hook event
|
|
1142
|
+
*/
|
|
1143
|
+
interface MediaUploadEvent {
|
|
1144
|
+
file: {
|
|
1145
|
+
name: string;
|
|
1146
|
+
type: string;
|
|
1147
|
+
size: number;
|
|
1148
|
+
};
|
|
1149
|
+
}
|
|
1150
|
+
/**
|
|
1151
|
+
* Media after upload event
|
|
1152
|
+
*/
|
|
1153
|
+
interface MediaAfterUploadEvent {
|
|
1154
|
+
media: MediaItem;
|
|
1155
|
+
}
|
|
1156
|
+
/**
|
|
1157
|
+
* Lifecycle hook event
|
|
1158
|
+
*/
|
|
1159
|
+
interface LifecycleEvent {}
|
|
1160
|
+
/**
|
|
1161
|
+
* Uninstall hook event
|
|
1162
|
+
*/
|
|
1163
|
+
interface UninstallEvent {
|
|
1164
|
+
deleteData: boolean;
|
|
1165
|
+
}
|
|
1166
|
+
type ContentBeforeSaveHandler = (event: ContentHookEvent, ctx: PluginContext) => Promise<Record<string, unknown> | void>;
|
|
1167
|
+
type ContentAfterSaveHandler = (event: ContentHookEvent, ctx: PluginContext) => Promise<void>;
|
|
1168
|
+
type ContentBeforeDeleteHandler = (event: ContentDeleteEvent, ctx: PluginContext) => Promise<boolean | void>;
|
|
1169
|
+
type ContentAfterDeleteHandler = (event: ContentDeleteEvent, ctx: PluginContext) => Promise<void>;
|
|
1170
|
+
type ContentBeforePublishHandler = (event: ContentPolicyEvent, ctx: PluginContext) => Promise<ContentPolicyDecision>;
|
|
1171
|
+
type ContentBeforeScheduleHandler = (event: ContentSchedulePolicyEvent, ctx: PluginContext) => Promise<ContentPolicyDecision>;
|
|
1172
|
+
type ContentBeforeUnpublishHandler = (event: ContentPolicyEvent, ctx: PluginContext) => Promise<ContentPolicyDecision>;
|
|
1173
|
+
type ContentAfterPublishHandler = (event: ContentPublishStateChangeEvent, ctx: PluginContext) => Promise<void>;
|
|
1174
|
+
type ContentAfterUnpublishHandler = (event: ContentPublishStateChangeEvent, ctx: PluginContext) => Promise<void>;
|
|
1175
|
+
type ContentAfterRestoreHandler = (event: ContentRestoreStateChangeEvent, ctx: PluginContext) => Promise<void>;
|
|
1176
|
+
type ContentAfterScheduleHandler = (event: ContentScheduleStateChangeEvent, ctx: PluginContext) => Promise<void>;
|
|
1177
|
+
type ContentAfterUnscheduleHandler = (event: ContentScheduleStateChangeEvent, ctx: PluginContext) => Promise<void>;
|
|
1178
|
+
/**
|
|
1179
|
+
* Event for `byline:afterSave`, fired after a byline profile or one of its
|
|
1180
|
+
* locale translations is created or updated.
|
|
1181
|
+
*/
|
|
1182
|
+
interface BylineAfterSaveEvent {
|
|
1183
|
+
byline: BylineInfo;
|
|
1184
|
+
isNew: boolean;
|
|
1185
|
+
}
|
|
1186
|
+
/**
|
|
1187
|
+
* Event for `byline:afterDelete`, fired after a byline row is deleted. When it
|
|
1188
|
+
* was the last locale of its translation group, its credits have already been
|
|
1189
|
+
* removed from every entry.
|
|
1190
|
+
*/
|
|
1191
|
+
interface BylineAfterDeleteEvent {
|
|
1192
|
+
byline: BylineInfo;
|
|
1193
|
+
}
|
|
1194
|
+
type BylineAfterSaveHandler = (event: BylineAfterSaveEvent, ctx: PluginContext) => Promise<void>;
|
|
1195
|
+
type BylineAfterDeleteHandler = (event: BylineAfterDeleteEvent, ctx: PluginContext) => Promise<void>;
|
|
1196
|
+
type MediaBeforeUploadHandler = (event: MediaUploadEvent, ctx: PluginContext) => Promise<{
|
|
1197
|
+
name: string;
|
|
1198
|
+
type: string;
|
|
1199
|
+
size: number;
|
|
1200
|
+
} | void>;
|
|
1201
|
+
type MediaAfterUploadHandler = (event: MediaAfterUploadEvent, ctx: PluginContext) => Promise<void>;
|
|
1202
|
+
type LifecycleHandler = (event: LifecycleEvent, ctx: PluginContext) => Promise<void>;
|
|
1203
|
+
type UninstallHandler = (event: UninstallEvent, ctx: PluginContext) => Promise<void>;
|
|
1204
|
+
/** Placement targets for page fragment contributions */
|
|
1205
|
+
type PagePlacement = "head" | "body:start" | "body:end";
|
|
1206
|
+
/**
|
|
1207
|
+
* A single breadcrumb trail item. Used by `PublicPageContext.breadcrumbs`
|
|
1208
|
+
* so themes can publish breadcrumb trails that SEO plugins consume.
|
|
1209
|
+
*/
|
|
1210
|
+
interface BreadcrumbItem {
|
|
1211
|
+
/** Display name for this crumb (e.g. "Home", "Blog", "My Post"). */
|
|
1212
|
+
name: string;
|
|
1213
|
+
/** Absolute or root-relative URL for this crumb. */
|
|
1214
|
+
url: string;
|
|
1215
|
+
}
|
|
1216
|
+
/**
|
|
1217
|
+
* Describes the page being rendered. Passed to page hooks so plugins
|
|
1218
|
+
* can decide what to contribute without fetching content themselves.
|
|
1219
|
+
*/
|
|
1220
|
+
interface PublicPageContext {
|
|
1221
|
+
url: string;
|
|
1222
|
+
path: string;
|
|
1223
|
+
locale: string | null;
|
|
1224
|
+
kind: "content" | "custom";
|
|
1225
|
+
pageType: string;
|
|
1226
|
+
/** Full document title for the rendered page */
|
|
1227
|
+
title: string | null;
|
|
1228
|
+
/** Page-only title for OG/Twitter/JSON-LD headline output */
|
|
1229
|
+
pageTitle?: string | null;
|
|
1230
|
+
description: string | null;
|
|
1231
|
+
canonical: string | null;
|
|
1232
|
+
image: string | null;
|
|
1233
|
+
content?: {
|
|
1234
|
+
collection: string;
|
|
1235
|
+
id: string;
|
|
1236
|
+
slug: string | null;
|
|
1237
|
+
};
|
|
1238
|
+
/** SEO meta for base metadata generation in EmDashHead */
|
|
1239
|
+
seo?: {
|
|
1240
|
+
ogTitle?: string | null;
|
|
1241
|
+
ogDescription?: string | null;
|
|
1242
|
+
ogImage?: string | null;
|
|
1243
|
+
robots?: string | null;
|
|
1244
|
+
};
|
|
1245
|
+
/** Article metadata for Open Graph article: tags */
|
|
1246
|
+
articleMeta?: {
|
|
1247
|
+
publishedTime?: string | null;
|
|
1248
|
+
modifiedTime?: string | null;
|
|
1249
|
+
author?: string | null;
|
|
1250
|
+
};
|
|
1251
|
+
/** Site name for structured data and og:site_name */
|
|
1252
|
+
siteName?: string;
|
|
1253
|
+
/**
|
|
1254
|
+
* Optional breadcrumb trail for this page, root first. When set,
|
|
1255
|
+
* SEO plugins should use this verbatim rather than deriving a trail
|
|
1256
|
+
* from `path`. Themes typically populate this at the point they
|
|
1257
|
+
* build the context (e.g. from a content hierarchy walk, taxonomy
|
|
1258
|
+
* lookup, or per-`pageType` routing logic).
|
|
1259
|
+
*
|
|
1260
|
+
* Semantics for consumers:
|
|
1261
|
+
* - `undefined` — theme has no opinion; consumer falls back to
|
|
1262
|
+
* its own derivation.
|
|
1263
|
+
* - `[]` — this page has no breadcrumbs (e.g. homepage); consumer
|
|
1264
|
+
* should skip `BreadcrumbList` emission entirely.
|
|
1265
|
+
* - Non-empty array — used verbatim for `BreadcrumbList` output.
|
|
1266
|
+
*/
|
|
1267
|
+
breadcrumbs?: BreadcrumbItem[];
|
|
1268
|
+
/** Public-facing site URL (origin) for structured data */
|
|
1269
|
+
siteUrl?: string;
|
|
1270
|
+
}
|
|
1271
|
+
interface PageMetadataEvent {
|
|
1272
|
+
page: PublicPageContext;
|
|
1273
|
+
}
|
|
1274
|
+
/**
|
|
1275
|
+
* Allowed rel values for link contributions.
|
|
1276
|
+
* This is a security-critical allowlist -- sandboxed plugins can only inject
|
|
1277
|
+
* link tags with these rel values. Adding "stylesheet", "prefetch", "prerender"
|
|
1278
|
+
* etc. would allow sandboxed plugins to inject external resources.
|
|
1279
|
+
*/
|
|
1280
|
+
type PageMetadataLinkRel = "canonical" | "alternate" | "author" | "license" | "nlweb" | "site.standard.document";
|
|
1281
|
+
type PageMetadataContribution = {
|
|
1282
|
+
kind: "meta";
|
|
1283
|
+
name: string;
|
|
1284
|
+
content: string;
|
|
1285
|
+
key?: string;
|
|
1286
|
+
} | {
|
|
1287
|
+
kind: "property";
|
|
1288
|
+
property: string;
|
|
1289
|
+
content: string;
|
|
1290
|
+
key?: string;
|
|
1291
|
+
} | {
|
|
1292
|
+
kind: "link";
|
|
1293
|
+
rel: PageMetadataLinkRel;
|
|
1294
|
+
href: string;
|
|
1295
|
+
hreflang?: string;
|
|
1296
|
+
key?: string;
|
|
1297
|
+
} | {
|
|
1298
|
+
kind: "jsonld";
|
|
1299
|
+
id?: string;
|
|
1300
|
+
graph: Record<string, unknown> | Array<Record<string, unknown>>;
|
|
1301
|
+
};
|
|
1302
|
+
type PageMetadataHandler = (event: PageMetadataEvent, ctx: PluginContext) => PageMetadataContribution | PageMetadataContribution[] | null | Promise<PageMetadataContribution | PageMetadataContribution[] | null>;
|
|
1303
|
+
interface PageFragmentEvent {
|
|
1304
|
+
page: PublicPageContext;
|
|
1305
|
+
}
|
|
1306
|
+
type PageFragmentContribution = {
|
|
1307
|
+
kind: "external-script";
|
|
1308
|
+
placement: PagePlacement;
|
|
1309
|
+
src: string;
|
|
1310
|
+
async?: boolean;
|
|
1311
|
+
defer?: boolean;
|
|
1312
|
+
attributes?: Record<string, string>;
|
|
1313
|
+
key?: string;
|
|
1314
|
+
} | {
|
|
1315
|
+
kind: "inline-script";
|
|
1316
|
+
placement: PagePlacement;
|
|
1317
|
+
code: string;
|
|
1318
|
+
attributes?: Record<string, string>;
|
|
1319
|
+
key?: string;
|
|
1320
|
+
} | {
|
|
1321
|
+
kind: "html";
|
|
1322
|
+
placement: PagePlacement;
|
|
1323
|
+
html: string;
|
|
1324
|
+
key?: string;
|
|
1325
|
+
};
|
|
1326
|
+
type PageFragmentHandler = (event: PageFragmentEvent, ctx: PluginContext) => PageFragmentContribution | PageFragmentContribution[] | null | Promise<PageFragmentContribution | PageFragmentContribution[] | null>;
|
|
1327
|
+
/**
|
|
1328
|
+
* Plugin hooks definition
|
|
1329
|
+
*/
|
|
1330
|
+
interface PluginHooks {
|
|
1331
|
+
"plugin:install"?: HookConfig<LifecycleHandler> | LifecycleHandler;
|
|
1332
|
+
"plugin:activate"?: HookConfig<LifecycleHandler> | LifecycleHandler;
|
|
1333
|
+
"plugin:deactivate"?: HookConfig<LifecycleHandler> | LifecycleHandler;
|
|
1334
|
+
"plugin:uninstall"?: HookConfig<UninstallHandler> | UninstallHandler;
|
|
1335
|
+
"content:beforeSave"?: HookConfig<ContentBeforeSaveHandler> | ContentBeforeSaveHandler;
|
|
1336
|
+
"content:afterSave"?: HookConfig<ContentAfterSaveHandler> | ContentAfterSaveHandler;
|
|
1337
|
+
"content:beforeDelete"?: HookConfig<ContentBeforeDeleteHandler> | ContentBeforeDeleteHandler;
|
|
1338
|
+
"content:afterDelete"?: HookConfig<ContentAfterDeleteHandler> | ContentAfterDeleteHandler;
|
|
1339
|
+
"content:beforePublish"?: HookConfig<ContentBeforePublishHandler> | ContentBeforePublishHandler;
|
|
1340
|
+
"content:beforeSchedule"?: HookConfig<ContentBeforeScheduleHandler> | ContentBeforeScheduleHandler;
|
|
1341
|
+
"content:beforeUnpublish"?: HookConfig<ContentBeforeUnpublishHandler> | ContentBeforeUnpublishHandler;
|
|
1342
|
+
"content:afterPublish"?: HookConfig<ContentAfterPublishHandler> | ContentAfterPublishHandler;
|
|
1343
|
+
"content:afterUnpublish"?: HookConfig<ContentAfterUnpublishHandler> | ContentAfterUnpublishHandler;
|
|
1344
|
+
"content:afterRestore"?: HookConfig<ContentAfterRestoreHandler> | ContentAfterRestoreHandler;
|
|
1345
|
+
"content:afterSchedule"?: HookConfig<ContentAfterScheduleHandler> | ContentAfterScheduleHandler;
|
|
1346
|
+
"content:afterUnschedule"?: HookConfig<ContentAfterUnscheduleHandler> | ContentAfterUnscheduleHandler;
|
|
1347
|
+
"media:beforeUpload"?: HookConfig<MediaBeforeUploadHandler> | MediaBeforeUploadHandler;
|
|
1348
|
+
"media:afterUpload"?: HookConfig<MediaAfterUploadHandler> | MediaAfterUploadHandler;
|
|
1349
|
+
cron?: HookConfig<CronHandler> | CronHandler;
|
|
1350
|
+
"email:beforeSend"?: HookConfig<EmailBeforeSendHandler> | EmailBeforeSendHandler;
|
|
1351
|
+
"email:deliver"?: HookConfig<EmailDeliverHandler> | EmailDeliverHandler;
|
|
1352
|
+
"email:afterSend"?: HookConfig<EmailAfterSendHandler> | EmailAfterSendHandler;
|
|
1353
|
+
"comment:beforeCreate"?: HookConfig<CommentBeforeCreateHandler> | CommentBeforeCreateHandler;
|
|
1354
|
+
"comment:moderate"?: HookConfig<CommentModerateHandler> | CommentModerateHandler;
|
|
1355
|
+
"comment:afterCreate"?: HookConfig<CommentAfterCreateHandler> | CommentAfterCreateHandler;
|
|
1356
|
+
"comment:afterModerate"?: HookConfig<CommentAfterModerateHandler> | CommentAfterModerateHandler;
|
|
1357
|
+
"byline:afterSave"?: HookConfig<BylineAfterSaveHandler> | BylineAfterSaveHandler;
|
|
1358
|
+
"byline:afterDelete"?: HookConfig<BylineAfterDeleteHandler> | BylineAfterDeleteHandler;
|
|
1359
|
+
"page:metadata"?: HookConfig<PageMetadataHandler> | PageMetadataHandler;
|
|
1360
|
+
"page:fragments"?: HookConfig<PageFragmentHandler> | PageFragmentHandler;
|
|
1361
|
+
}
|
|
1362
|
+
/**
|
|
1363
|
+
* Hook names
|
|
1364
|
+
*/
|
|
1365
|
+
/**
|
|
1366
|
+
* Hook name in a manifest. Core's exhaustive union of recognised hook names,
|
|
1367
|
+
* derived from the `PluginHooks` registry. The serialised manifest carries
|
|
1368
|
+
* these as opaque strings; this stricter type is only used for type-checking
|
|
1369
|
+
* inside core. `ManifestHookEntry` is re-exported from
|
|
1370
|
+
* `@emdash-cms/plugin-types` near the top of this file.
|
|
1371
|
+
*/
|
|
1372
|
+
type HookName = keyof PluginHooks;
|
|
1373
|
+
/**
|
|
1374
|
+
* Resolved hook with normalized config
|
|
1375
|
+
*/
|
|
1376
|
+
interface ResolvedHook<THandler> {
|
|
1377
|
+
priority: number;
|
|
1378
|
+
timeout: number;
|
|
1379
|
+
dependencies: string[];
|
|
1380
|
+
errorPolicy: "continue" | "abort";
|
|
1381
|
+
/** Whether this hook is exclusive (provider pattern) */
|
|
1382
|
+
exclusive: boolean;
|
|
1383
|
+
handler: THandler;
|
|
1384
|
+
pluginId: string;
|
|
1385
|
+
}
|
|
1386
|
+
/**
|
|
1387
|
+
* Geographic location information derived from the request.
|
|
1388
|
+
* Available when running on Cloudflare Workers (via the `cf` object).
|
|
1389
|
+
*/
|
|
1390
|
+
interface GeoInfo {
|
|
1391
|
+
country: string | null;
|
|
1392
|
+
region: string | null;
|
|
1393
|
+
city: string | null;
|
|
1394
|
+
}
|
|
1395
|
+
/**
|
|
1396
|
+
* Normalized request metadata available to plugin route handlers.
|
|
1397
|
+
* Extracted from request headers and platform-specific properties.
|
|
1398
|
+
*/
|
|
1399
|
+
interface RequestMeta {
|
|
1400
|
+
ip: string | null;
|
|
1401
|
+
userAgent: string | null;
|
|
1402
|
+
referer: string | null;
|
|
1403
|
+
geo: GeoInfo | null;
|
|
1404
|
+
}
|
|
1405
|
+
/**
|
|
1406
|
+
* Route handler context extends plugin context with request-specific data
|
|
1407
|
+
*/
|
|
1408
|
+
interface RouteContext<TInput = unknown> extends PluginContext {
|
|
1409
|
+
/** Validated input from request body */
|
|
1410
|
+
input: TInput;
|
|
1411
|
+
/** Original request */
|
|
1412
|
+
request: Request;
|
|
1413
|
+
/** Normalized request metadata (IP, user agent, geo) */
|
|
1414
|
+
requestMeta: RequestMeta;
|
|
1415
|
+
/** Host-attested context for a validated Block Kit request. */
|
|
1416
|
+
ui?: PluginUiContext;
|
|
1417
|
+
/**
|
|
1418
|
+
* Authenticated caller, if the route is private. The host has already
|
|
1419
|
+
* authenticated and authorized this user before dispatch, so the value
|
|
1420
|
+
* is trustworthy — unlike a user id read from the request body.
|
|
1421
|
+
*
|
|
1422
|
+
* `undefined` for public routes (which skip auth entirely) and for
|
|
1423
|
+
* token-authed requests where no user is bound to the token.
|
|
1424
|
+
*
|
|
1425
|
+
* Not gated by the `users:read` capability: this is the caller's own
|
|
1426
|
+
* identity for the current request, not a user directory lookup.
|
|
1427
|
+
*/
|
|
1428
|
+
user?: UserInfo;
|
|
1429
|
+
}
|
|
1430
|
+
/**
|
|
1431
|
+
* Route definition
|
|
1432
|
+
*/
|
|
1433
|
+
interface PluginRoute<TInput = unknown> extends Omit<RouteOptions, "request"> {
|
|
1434
|
+
/** Zod schema for input validation */
|
|
1435
|
+
input?: z.ZodType<TInput>;
|
|
1436
|
+
/**
|
|
1437
|
+
* Mark this route as publicly accessible (no authentication required).
|
|
1438
|
+
* Public routes skip session/token auth and CSRF checks.
|
|
1439
|
+
*/
|
|
1440
|
+
public?: boolean;
|
|
1441
|
+
/** RBAC permission required to invoke the route. Legacy routes default to plugins:manage. */
|
|
1442
|
+
permission?: Permission;
|
|
1443
|
+
/**
|
|
1444
|
+
* `Cache-Control` header value for successful GET responses, e.g.
|
|
1445
|
+
* `"public, max-age=60, stale-while-revalidate=300"`. Only honored on
|
|
1446
|
+
* routes that are also `public: true` — authenticated responses always
|
|
1447
|
+
* keep the default `private, no-store`. Errors are never cached.
|
|
1448
|
+
*/
|
|
1449
|
+
cacheControl?: string;
|
|
1450
|
+
/** Bounded request parsing and incoming-header declaration. */
|
|
1451
|
+
request?: PluginRouteRequest;
|
|
1452
|
+
/** Route handler */
|
|
1453
|
+
handler: {
|
|
1454
|
+
bivarianceHack(ctx: RouteContext<TInput>): Promise<unknown>;
|
|
1455
|
+
}["bivarianceHack"];
|
|
1456
|
+
}
|
|
1457
|
+
type PluginRouteInput<TMode extends PluginRouteBodyMode> = TMode extends "none" ? PluginRouteQuery : TMode extends "text" ? string : TMode extends "bytes" ? Uint8Array : TMode extends "form-data" ? PluginFormData : unknown;
|
|
1458
|
+
type PluginRouteDefinition<TMode extends PluginRouteBodyMode = PluginRouteBodyMode> = Omit<PluginRoute<PluginRouteInput<TMode>>, "request"> & {
|
|
1459
|
+
request: PluginRouteRequest & {
|
|
1460
|
+
body: TMode;
|
|
1461
|
+
};
|
|
1462
|
+
};
|
|
1463
|
+
interface PluginMcpToolDefinition {
|
|
1464
|
+
description: string;
|
|
1465
|
+
route: string;
|
|
1466
|
+
input: z.ZodType;
|
|
1467
|
+
output?: z.ZodType;
|
|
1468
|
+
destructive?: boolean;
|
|
1469
|
+
}
|
|
1470
|
+
interface PluginMcpConfig {
|
|
1471
|
+
tools: Record<string, PluginMcpToolDefinition>;
|
|
1472
|
+
}
|
|
1473
|
+
/**
|
|
1474
|
+
* Admin page definition
|
|
1475
|
+
*/
|
|
1476
|
+
interface PluginAdminPage {
|
|
1477
|
+
path: string;
|
|
1478
|
+
label: string;
|
|
1479
|
+
icon?: string;
|
|
1480
|
+
/**
|
|
1481
|
+
* Admin sidebar folder. Pages sharing a group with a collection shown in
|
|
1482
|
+
* the sidebar join that folder; pages with any other group share a folder
|
|
1483
|
+
* with that label in the Plugins section, across plugins.
|
|
1484
|
+
*/
|
|
1485
|
+
group?: string;
|
|
1486
|
+
}
|
|
1487
|
+
/**
|
|
1488
|
+
* Dashboard widget definition
|
|
1489
|
+
*/
|
|
1490
|
+
interface PluginDashboardWidget {
|
|
1491
|
+
id: string;
|
|
1492
|
+
size?: "full" | "half" | "third";
|
|
1493
|
+
title?: string;
|
|
1494
|
+
}
|
|
1495
|
+
interface PluginEditorPanel {
|
|
1496
|
+
id: string;
|
|
1497
|
+
title: string;
|
|
1498
|
+
route: string;
|
|
1499
|
+
collections?: string[];
|
|
1500
|
+
order?: number;
|
|
1501
|
+
draft?: PluginEditorDraftAccess;
|
|
1502
|
+
}
|
|
1503
|
+
interface PluginEditorAction {
|
|
1504
|
+
id: string;
|
|
1505
|
+
label: string;
|
|
1506
|
+
route: string;
|
|
1507
|
+
placement: "toolbar" | "overflow";
|
|
1508
|
+
collections?: string[];
|
|
1509
|
+
style?: "default" | "danger";
|
|
1510
|
+
confirm?: ConfirmDialog;
|
|
1511
|
+
draft?: PluginEditorDraftAccess;
|
|
1512
|
+
}
|
|
1513
|
+
/**
|
|
1514
|
+
* Settings field types (for admin UI generation)
|
|
1515
|
+
*/
|
|
1516
|
+
type SettingFieldType = "string" | "number" | "boolean" | "select" | "secret" | "url" | "email";
|
|
1517
|
+
interface BaseSettingField {
|
|
1518
|
+
type: SettingFieldType;
|
|
1519
|
+
label: string;
|
|
1520
|
+
description?: string;
|
|
1521
|
+
}
|
|
1522
|
+
interface StringSettingField extends BaseSettingField {
|
|
1523
|
+
type: "string";
|
|
1524
|
+
default?: string;
|
|
1525
|
+
multiline?: boolean;
|
|
1526
|
+
}
|
|
1527
|
+
interface NumberSettingField extends BaseSettingField {
|
|
1528
|
+
type: "number";
|
|
1529
|
+
default?: number;
|
|
1530
|
+
min?: number;
|
|
1531
|
+
max?: number;
|
|
1532
|
+
}
|
|
1533
|
+
interface BooleanSettingField extends BaseSettingField {
|
|
1534
|
+
type: "boolean";
|
|
1535
|
+
default?: boolean;
|
|
1536
|
+
}
|
|
1537
|
+
interface SelectSettingField extends BaseSettingField {
|
|
1538
|
+
type: "select";
|
|
1539
|
+
options: Array<{
|
|
1540
|
+
value: string;
|
|
1541
|
+
label: string;
|
|
1542
|
+
}>;
|
|
1543
|
+
default?: string;
|
|
1544
|
+
}
|
|
1545
|
+
interface SecretSettingField extends BaseSettingField {
|
|
1546
|
+
type: "secret";
|
|
1547
|
+
}
|
|
1548
|
+
interface UrlSettingField extends BaseSettingField {
|
|
1549
|
+
type: "url";
|
|
1550
|
+
default?: string;
|
|
1551
|
+
placeholder?: string;
|
|
1552
|
+
}
|
|
1553
|
+
interface EmailSettingField extends BaseSettingField {
|
|
1554
|
+
type: "email";
|
|
1555
|
+
default?: string;
|
|
1556
|
+
placeholder?: string;
|
|
1557
|
+
}
|
|
1558
|
+
type SettingField = StringSettingField | NumberSettingField | BooleanSettingField | SelectSettingField | SecretSettingField | UrlSettingField | EmailSettingField;
|
|
1559
|
+
/**
|
|
1560
|
+
* Block Kit element for block editing fields.
|
|
1561
|
+
* This is the `Element` discriminated union from `@emdash-cms/blocks`.
|
|
1562
|
+
* Plugin authors should use `@emdash-cms/blocks` builder functions to create these.
|
|
1563
|
+
*/
|
|
1564
|
+
type PortableTextBlockField = Element;
|
|
1565
|
+
/**
|
|
1566
|
+
* Configuration for a Portable Text block type contributed by a plugin
|
|
1567
|
+
*/
|
|
1568
|
+
interface PortableTextBlockConfig {
|
|
1569
|
+
/** Block type name (must match the `_type` in Portable Text) */
|
|
1570
|
+
type: string;
|
|
1571
|
+
/** Human-readable label shown in slash commands and modals */
|
|
1572
|
+
label: string;
|
|
1573
|
+
/** Icon key (e.g., "video", "code", "link", "link-external") */
|
|
1574
|
+
icon?: string;
|
|
1575
|
+
/** Description shown in slash command menu */
|
|
1576
|
+
description?: string;
|
|
1577
|
+
/** Placeholder text for the URL input */
|
|
1578
|
+
placeholder?: string;
|
|
1579
|
+
/** Block Kit form fields for the editing UI. If declared, replaces the simple URL input. */
|
|
1580
|
+
fields?: PortableTextBlockField[];
|
|
1581
|
+
/**
|
|
1582
|
+
* Optional. Display category in the slash menu. Defaults to "Embeds".
|
|
1583
|
+
*
|
|
1584
|
+
* Plugin authors should pick a meaningful category that reflects what the
|
|
1585
|
+
* block actually is — e.g. "Sections", "Marketing", "Media", "Embeds",
|
|
1586
|
+
* "Layout". Blocks with the same category are grouped together in the
|
|
1587
|
+
* editor's slash menu.
|
|
1588
|
+
*/
|
|
1589
|
+
category?: string;
|
|
1590
|
+
}
|
|
1591
|
+
/**
|
|
1592
|
+
* Configuration for a field widget type contributed by a plugin.
|
|
1593
|
+
* A field widget provides a custom editing UI for a schema field.
|
|
1594
|
+
* The field references the widget via `widget: "pluginId:widgetName"`.
|
|
1595
|
+
*/
|
|
1596
|
+
interface FieldWidgetConfig {
|
|
1597
|
+
/** Widget name (without plugin ID prefix) */
|
|
1598
|
+
name: string;
|
|
1599
|
+
/** Human-readable label for the admin UI */
|
|
1600
|
+
label: string;
|
|
1601
|
+
/** Which field types this widget can edit (e.g., ["json", "string"]) */
|
|
1602
|
+
fieldTypes: FieldType[];
|
|
1603
|
+
/** Block Kit elements for sandboxed rendering. Omit for trusted plugins using React. */
|
|
1604
|
+
elements?: Element[];
|
|
1605
|
+
}
|
|
1606
|
+
/**
|
|
1607
|
+
* Admin configuration
|
|
1608
|
+
*/
|
|
1609
|
+
interface PluginAdminConfig {
|
|
1610
|
+
/** Module specifier for admin UI exports (e.g., "@emdash-cms/plugin-audit-log/admin") */
|
|
1611
|
+
entry?: string;
|
|
1612
|
+
/** Settings schema for auto-generated UI */
|
|
1613
|
+
settingsSchema?: Record<string, SettingField>;
|
|
1614
|
+
/** Admin pages */
|
|
1615
|
+
pages?: PluginAdminPage[];
|
|
1616
|
+
/** Dashboard widgets */
|
|
1617
|
+
widgets?: PluginDashboardWidget[];
|
|
1618
|
+
/** Saved-entry Block Kit panels. */
|
|
1619
|
+
editorPanels?: PluginEditorPanel[];
|
|
1620
|
+
/** Saved-entry host-rendered actions. */
|
|
1621
|
+
editorActions?: PluginEditorAction[];
|
|
1622
|
+
/** Portable Text block types this plugin provides */
|
|
1623
|
+
portableTextBlocks?: PortableTextBlockConfig[];
|
|
1624
|
+
/** Field widget types this plugin provides */
|
|
1625
|
+
fieldWidgets?: FieldWidgetConfig[];
|
|
1626
|
+
}
|
|
1627
|
+
/**
|
|
1628
|
+
* Plugin definition - input to definePlugin()
|
|
1629
|
+
*/
|
|
1630
|
+
interface PluginDefinition<TStorage extends PluginStorageConfig = PluginStorageConfig> {
|
|
1631
|
+
/** Unique plugin identifier */
|
|
1632
|
+
id: string;
|
|
1633
|
+
/** Plugin version (semver) */
|
|
1634
|
+
version: string;
|
|
1635
|
+
/** Declared capabilities */
|
|
1636
|
+
capabilities?: PluginCapability[];
|
|
1637
|
+
/** Allowed hosts for network:request (wildcards supported: *.example.com) */
|
|
1638
|
+
allowedHosts?: string[];
|
|
1639
|
+
/** Storage collections with indexes */
|
|
1640
|
+
storage?: TStorage;
|
|
1641
|
+
/** Hooks */
|
|
1642
|
+
hooks?: PluginHooks;
|
|
1643
|
+
/** API routes */
|
|
1644
|
+
routes?: Record<string, PluginRoute>;
|
|
1645
|
+
/** Routes explicitly exposed as agent-callable MCP tools. */
|
|
1646
|
+
mcp?: PluginMcpConfig;
|
|
1647
|
+
/** Admin UI configuration */
|
|
1648
|
+
admin?: PluginAdminConfig;
|
|
1649
|
+
}
|
|
1650
|
+
/**
|
|
1651
|
+
* Resolved plugin - after definePlugin() processing
|
|
1652
|
+
*/
|
|
1653
|
+
interface ResolvedPlugin<TStorage extends PluginStorageConfig = PluginStorageConfig> {
|
|
1654
|
+
id: string;
|
|
1655
|
+
version: string;
|
|
1656
|
+
capabilities: PluginCapability[];
|
|
1657
|
+
allowedHosts: string[];
|
|
1658
|
+
storage: TStorage;
|
|
1659
|
+
hooks: ResolvedPluginHooks;
|
|
1660
|
+
routes: Record<string, PluginRoute>;
|
|
1661
|
+
mcp?: PluginMcpConfig;
|
|
1662
|
+
admin: PluginAdminConfig;
|
|
1663
|
+
}
|
|
1664
|
+
/**
|
|
1665
|
+
* Resolved hooks with normalized config
|
|
1666
|
+
*/
|
|
1667
|
+
interface ResolvedPluginHooks {
|
|
1668
|
+
"plugin:install"?: ResolvedHook<LifecycleHandler>;
|
|
1669
|
+
"plugin:activate"?: ResolvedHook<LifecycleHandler>;
|
|
1670
|
+
"plugin:deactivate"?: ResolvedHook<LifecycleHandler>;
|
|
1671
|
+
"plugin:uninstall"?: ResolvedHook<UninstallHandler>;
|
|
1672
|
+
"content:beforeSave"?: ResolvedHook<ContentBeforeSaveHandler>;
|
|
1673
|
+
"content:afterSave"?: ResolvedHook<ContentAfterSaveHandler>;
|
|
1674
|
+
"content:beforeDelete"?: ResolvedHook<ContentBeforeDeleteHandler>;
|
|
1675
|
+
"content:afterDelete"?: ResolvedHook<ContentAfterDeleteHandler>;
|
|
1676
|
+
"content:beforePublish"?: ResolvedHook<ContentBeforePublishHandler>;
|
|
1677
|
+
"content:beforeSchedule"?: ResolvedHook<ContentBeforeScheduleHandler>;
|
|
1678
|
+
"content:beforeUnpublish"?: ResolvedHook<ContentBeforeUnpublishHandler>;
|
|
1679
|
+
"content:afterPublish"?: ResolvedHook<ContentAfterPublishHandler>;
|
|
1680
|
+
"content:afterUnpublish"?: ResolvedHook<ContentAfterUnpublishHandler>;
|
|
1681
|
+
"content:afterRestore"?: ResolvedHook<ContentAfterRestoreHandler>;
|
|
1682
|
+
"content:afterSchedule"?: ResolvedHook<ContentAfterScheduleHandler>;
|
|
1683
|
+
"content:afterUnschedule"?: ResolvedHook<ContentAfterUnscheduleHandler>;
|
|
1684
|
+
"media:beforeUpload"?: ResolvedHook<MediaBeforeUploadHandler>;
|
|
1685
|
+
"media:afterUpload"?: ResolvedHook<MediaAfterUploadHandler>;
|
|
1686
|
+
cron?: ResolvedHook<CronHandler>;
|
|
1687
|
+
"email:beforeSend"?: ResolvedHook<EmailBeforeSendHandler>;
|
|
1688
|
+
"email:deliver"?: ResolvedHook<EmailDeliverHandler>;
|
|
1689
|
+
"email:afterSend"?: ResolvedHook<EmailAfterSendHandler>;
|
|
1690
|
+
"comment:beforeCreate"?: ResolvedHook<CommentBeforeCreateHandler>;
|
|
1691
|
+
"comment:moderate"?: ResolvedHook<CommentModerateHandler>;
|
|
1692
|
+
"comment:afterCreate"?: ResolvedHook<CommentAfterCreateHandler>;
|
|
1693
|
+
"comment:afterModerate"?: ResolvedHook<CommentAfterModerateHandler>;
|
|
1694
|
+
"byline:afterSave"?: ResolvedHook<BylineAfterSaveHandler>;
|
|
1695
|
+
"byline:afterDelete"?: ResolvedHook<BylineAfterDeleteHandler>;
|
|
1696
|
+
"page:metadata"?: ResolvedHook<PageMetadataHandler>;
|
|
1697
|
+
"page:fragments"?: ResolvedHook<PageFragmentHandler>;
|
|
1698
|
+
}
|
|
1699
|
+
/**
|
|
1700
|
+
* What a plugin exports from its /admin entrypoint
|
|
1701
|
+
* Uses generic component type to avoid React dependency
|
|
1702
|
+
*/
|
|
1703
|
+
interface PluginAdminExports {
|
|
1704
|
+
widgets?: Record<string, JSX.Element>;
|
|
1705
|
+
pages?: Record<string, JSX.Element>;
|
|
1706
|
+
fields?: Record<string, JSX.Element>;
|
|
1707
|
+
}
|
|
1708
|
+
/**
|
|
1709
|
+
* Plugin manifest — the metadata portion of a plugin bundle, used for
|
|
1710
|
+
* sandboxed plugins loaded from the marketplace.
|
|
1711
|
+
*
|
|
1712
|
+
* This interface is core's stricter version of the manifest contract: it
|
|
1713
|
+
* uses the exhaustive `HookName` union and core's typed `PluginAdminConfig`.
|
|
1714
|
+
* The wire-shape lives in `@emdash-cms/plugin-types` as `PluginManifest`
|
|
1715
|
+
* with looser types (so the registry CLI can serialise hook names it
|
|
1716
|
+
* doesn't know about). Both must stay structurally compatible: every value
|
|
1717
|
+
* of this type must be assignable to the shared one. The static assertion
|
|
1718
|
+
* below catches any drift at compile time.
|
|
1719
|
+
*/
|
|
1720
|
+
interface PluginManifest {
|
|
1721
|
+
id: string;
|
|
1722
|
+
version: string;
|
|
1723
|
+
/**
|
|
1724
|
+
* The trust contract (see `@emdash-cms/plugin-types`). Authoritative;
|
|
1725
|
+
* `capabilities`/`allowedHosts` are derived from it at the parse boundary
|
|
1726
|
+
* via `reconcileManifestAccess`. Optional during the wire-format migration.
|
|
1727
|
+
*/
|
|
1728
|
+
declaredAccess?: DeclaredAccess;
|
|
1729
|
+
capabilities: PluginCapability[];
|
|
1730
|
+
allowedHosts: string[];
|
|
1731
|
+
storage: PluginStorageConfig;
|
|
1732
|
+
/** Hook declarations — either plain name strings or structured objects */
|
|
1733
|
+
hooks: Array<ManifestHookEntry$1 | HookName>;
|
|
1734
|
+
/** Route declarations — either plain name strings or structured objects */
|
|
1735
|
+
routes: Array<ManifestRouteEntry$1 | string>;
|
|
1736
|
+
mcp?: PluginMcpManifestConfig;
|
|
1737
|
+
admin: PluginAdminConfig;
|
|
1738
|
+
}
|
|
1739
|
+
//#endregion
|
|
1740
|
+
export { ContentSchedulePolicyEvent as $, PluginContext as $t, ContentAfterDeleteHandler as A, StorageCollection as An, MediaBeforeUploadHandler as At, ContentBeforeScheduleHandler as B, UninstallHandler as Bn, PageMetadataContribution as Bt, CommentModerateEvent as C, ResolvedPlugin as Cn, KVAccess as Ct, ContentAccess as D, SettingField as Dn, MediaAccess as Dt, ConditionalWriteResult as E, SchemaAccess as En, LogAccess as Et, ContentAfterUnpublishHandler as F, TaxonomyDefInfo as Fn, ModerationDecision as Ft, ContentItem as G, VersionedRedirect as Gn, PaginatedResult as Gt, ContentCreateOptions as H, UpdateIfResult as Hn, PageMetadataHandler as Ht, ContentAfterUnscheduleHandler as I, TaxonomyReadOptions as In, NumericDelta as It, ContentPolicyEvent as J, isDeprecatedCapability as Jn, PluginAdminPage as Jt, ContentListOptions as K, VersionedValue as Kn, PluginAdminConfig as Kt, ContentBeforeDeleteHandler as L, TaxonomyTermCreateInput as Ln, PageFragmentContribution as Lt, ContentAfterRestoreHandler as M, StoredComment as Mn, MediaItem as Mt, ContentAfterSaveHandler as N, TaxonomyAccess as Nn, MediaMetadataPatch as Nt, ContentAccessWithWrite as O, SettingsAccess as On, MediaAfterUploadEvent as Ot, ContentAfterScheduleHandler as P, TaxonomyAccessWithWrite as Pn, MediaUploadEvent as Pt, ContentSaveHookDetails as Q, PluginContentCreateCallback as Qt, ContentBeforePublishHandler as R, TaxonomyTermInfo as Rn, PageFragmentEvent as Rt, CommentListOptions as S, ResolvedHook as Sn, HttpAccess as St, ConditionalDeleteResult as T, RouteContext as Tn, LifecycleHandler as Tt, ContentDeleteEvent as U, UserInfo as Un, PageMetadataLinkRel as Ut, ContentBeforeUnpublishHandler as V, UpdateIfArgs as Vn, PageMetadataEvent as Vt, ContentHookEvent as W, VersionedContentItem as Wn, PagePlacement as Wt, ContentRestoreStateChangeEvent as X, normalizeCapability as Xn, PluginComment as Xt, ContentPublishStateChangeEvent as Y, normalizeCapabilities as Yn, PluginCapability as Yt, ContentRevisionInfo as Z, normalizePluginCapabilities as Zn, PluginCommentStatus as Zt, CommentAfterModerateEvent as _, RedirectInfo as _n, EntryBylineCredits as _t, BylineAfterDeleteHandler as a, PluginManifest as an, CronEvent as at, CommentBeforeCreateHandler as b, RedirectUpdateInput as bn, HookConfig as bt, BylineCreditInfo as c, PluginRouteDefinition as cn, CurrentPluginCapability as ct, CAPABILITY_RENAMES as d, PortableTextBlockField as dn, EmailAfterSendHandler as dt, PluginDefinition as en, ContentScheduleStateChangeEvent as et, CollectionCommentSettings as f, PublicPageContext as fn, EmailBeforeSendEvent as ft, CommentAfterCreateHandler as g, RedirectCreateInput as gn, EmailMessage as gt, CommentAfterCreateEvent as h, RedirectAccessWithWrite as hn, EmailDeliverHandler as ht, BylineAfterDeleteEvent as i, PluginHooks as in, CronAccess as it, ContentAfterPublishHandler as j, StorageCollectionConfig as jn, MediaBytes as jt, ContentActionOrigin as k, SiteInfo as kn, MediaAfterUploadHandler as kt, BylineInfo as l, PluginStorageConfig as ln, DeprecatedPluginCapability as lt, CommentAccess as m, RedirectAccess as mn, EmailDeliverEvent as mt, BreadcrumbItem as n, PluginEditorDraftFieldSelector as nn, ContentTranslationSummary as nt, BylineAfterSaveEvent as o, PluginMcpManifestConfig as on, CronHandler as ot, CollectionSchemaInfo as p, QueryOptions as pn, EmailBeforeSendHandler as pt, ContentPolicyDecision as q, WhereClause as qn, PluginAdminExports as qt, BylineAccess as r, PluginEditorPanel as rn, ContentWriteInput as rt, BylineAfterSaveHandler as s, PluginRoute as sn, CronTaskInfo as st, ActorInfo as t, PluginEditorAction as tn, ContentStateChangeEvent as tt, BylineListOptions as u, PortableTextBlockConfig as un, EmailAfterSendEvent as ut, CommentAfterModerateHandler as v, RedirectListOptions as vn, FieldSchemaInfo as vt, CommentModerateHandler as w, ResolvedPluginHooks as wn, LifecycleEvent as wt, CommentCountOptions as x, RequestMeta as xn, HookName as xt, CommentBeforeCreateEvent as y, RedirectStatus as yn, FieldWidgetConfig as yt, ContentBeforeSaveHandler as z, UninstallEvent as zn, PageFragmentHandler as zt };
|
|
1741
|
+
//# sourceMappingURL=types-QoPHm-2w.d.mts.map
|