emdash 1.5.0 → 1.6.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-DyXQ5VhB.mjs +26 -0
- package/dist/action-token-DyXQ5VhB.mjs.map +1 -0
- package/dist/activation-BRmrunZ3.mjs +387 -0
- package/dist/activation-BRmrunZ3.mjs.map +1 -0
- package/dist/adapters-CMuwJgdX.d.mts +173 -0
- package/dist/adapters-CMuwJgdX.d.mts.map +1 -0
- package/dist/after-B8cG5P6f.mjs +53 -0
- package/dist/after-B8cG5P6f.mjs.map +1 -0
- package/dist/allowed-origins-CUNAP6hl.mjs +116 -0
- package/dist/allowed-origins-CUNAP6hl.mjs.map +1 -0
- package/dist/api/route-utils.d.mts +4 -4
- package/dist/api/route-utils.mjs +6 -5
- package/dist/api/route-utils.mjs.map +1 -1
- package/dist/api/schemas/index.d.mts +2 -2
- package/dist/api/schemas/index.mjs +7 -7
- package/dist/api-tokens-BIwfh_Ke.mjs +173 -0
- package/dist/api-tokens-BIwfh_Ke.mjs.map +1 -0
- package/dist/apply-CmE9k57Q.mjs +1774 -0
- package/dist/apply-CmE9k57Q.mjs.map +1 -0
- package/dist/approvals-DbCK12-7.mjs +460 -0
- package/dist/approvals-DbCK12-7.mjs.map +1 -0
- package/dist/artifact-fetch-DXHP2vKC.mjs +659 -0
- package/dist/artifact-fetch-DXHP2vKC.mjs.map +1 -0
- package/dist/artifacts-a_0bb4Ks.mjs +323 -0
- package/dist/artifacts-a_0bb4Ks.mjs.map +1 -0
- package/dist/astro/image-endpoint.d.mts.map +1 -1
- package/dist/astro/image-endpoint.mjs +12 -4
- package/dist/astro/image-endpoint.mjs.map +1 -1
- package/dist/astro/index.d.mts +17 -17
- package/dist/astro/index.d.mts.map +1 -1
- package/dist/astro/index.mjs +28 -12
- package/dist/astro/index.mjs.map +1 -1
- package/dist/astro/middleware/auth.d.mts +17 -15
- package/dist/astro/middleware/auth.d.mts.map +1 -1
- package/dist/astro/middleware/auth.mjs +31 -20
- package/dist/astro/middleware/auth.mjs.map +1 -1
- package/dist/astro/middleware/media-usage-write-fence.mjs +2 -2
- package/dist/astro/middleware/redirect.d.mts +2 -1
- package/dist/astro/middleware/redirect.d.mts.map +1 -1
- package/dist/astro/middleware/redirect.mjs +29 -19
- 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 +6 -5
- package/dist/astro/middleware/request-context.mjs.map +1 -1
- package/dist/astro/middleware.d.mts +19 -21
- package/dist/astro/middleware.d.mts.map +1 -1
- package/dist/astro/middleware.mjs +179 -129
- package/dist/astro/middleware.mjs.map +1 -1
- package/dist/astro/routes/PluginRegistry.d.mts +2 -3
- package/dist/astro/routes/PluginRegistry.d.mts.map +1 -1
- package/dist/astro/routes/PluginRegistry.mjs +1 -1
- package/dist/astro/routes/PluginRegistry.mjs.map +1 -1
- package/dist/astro/routes/api/admin/allowed-domains/_domain_.mjs +3 -3
- package/dist/astro/routes/api/admin/allowed-domains/index.mjs +3 -3
- package/dist/astro/routes/api/admin/api-tokens/_id_.mjs +2 -2
- package/dist/astro/routes/api/admin/api-tokens/index.mjs +3 -3
- package/dist/astro/routes/api/admin/byline-fields/_slug_/usage.mjs +4 -5
- package/dist/astro/routes/api/admin/byline-fields/_slug_/usage.mjs.map +1 -1
- package/dist/astro/routes/api/admin/byline-fields/_slug_.d.mts.map +1 -1
- package/dist/astro/routes/api/admin/byline-fields/_slug_.mjs +8 -11
- package/dist/astro/routes/api/admin/byline-fields/_slug_.mjs.map +1 -1
- package/dist/astro/routes/api/admin/byline-fields/index.d.mts.map +1 -1
- package/dist/astro/routes/api/admin/byline-fields/index.mjs +7 -9
- package/dist/astro/routes/api/admin/byline-fields/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/byline-fields/reorder.mjs +6 -7
- package/dist/astro/routes/api/admin/byline-fields/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/admin/bylines/_id_/index.d.mts.map +1 -1
- package/dist/astro/routes/api/admin/bylines/_id_/index.mjs +9 -10
- package/dist/astro/routes/api/admin/bylines/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/bylines/_id_/translations.d.mts.map +1 -1
- package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs +10 -12
- package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs.map +1 -1
- package/dist/astro/routes/api/admin/bylines/index.mjs +8 -8
- package/dist/astro/routes/api/admin/comments/_id_/status.mjs +8 -8
- package/dist/astro/routes/api/admin/comments/_id_/status.mjs.map +1 -1
- package/dist/astro/routes/api/admin/comments/_id_.d.mts.map +1 -1
- package/dist/astro/routes/api/admin/comments/_id_.mjs +7 -8
- package/dist/astro/routes/api/admin/comments/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/admin/comments/bulk.mjs +9 -9
- package/dist/astro/routes/api/admin/comments/bulk.mjs.map +1 -1
- package/dist/astro/routes/api/admin/comments/counts.mjs +5 -5
- package/dist/astro/routes/api/admin/comments/counts.mjs.map +1 -1
- package/dist/astro/routes/api/admin/comments/index.mjs +7 -7
- package/dist/astro/routes/api/admin/comments/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/core-update.mjs +6 -6
- package/dist/astro/routes/api/admin/hooks/exclusive/_hookName_.mjs +3 -3
- package/dist/astro/routes/api/admin/hooks/exclusive/index.mjs +2 -2
- package/dist/astro/routes/api/admin/media-usage/activation.d.mts.map +1 -1
- package/dist/astro/routes/api/admin/media-usage/activation.mjs +8 -10
- package/dist/astro/routes/api/admin/media-usage/activation.mjs.map +1 -1
- package/dist/astro/routes/api/admin/media-usage/collection-deletions/index.mjs +7 -8
- package/dist/astro/routes/api/admin/media-usage/collection-deletions/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/media-usage/collection-deletions/retry.mjs +7 -8
- package/dist/astro/routes/api/admin/media-usage/collection-deletions/retry.mjs.map +1 -1
- package/dist/astro/routes/api/admin/media-usage/progress.d.mts.map +1 -1
- package/dist/astro/routes/api/admin/media-usage/progress.mjs +6 -8
- package/dist/astro/routes/api/admin/media-usage/progress.mjs.map +1 -1
- package/dist/astro/routes/api/admin/media-usage/repair.mjs +6 -7
- package/dist/astro/routes/api/admin/media-usage/repair.mjs.map +1 -1
- package/dist/astro/routes/api/admin/media-usage/work/index.mjs +7 -8
- package/dist/astro/routes/api/admin/media-usage/work/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/media-usage/work/retry.mjs +7 -8
- package/dist/astro/routes/api/admin/media-usage/work/retry.mjs.map +1 -1
- package/dist/astro/routes/api/admin/oauth-clients/_id_.mjs +3 -3
- package/dist/astro/routes/api/admin/oauth-clients/index.mjs +3 -3
- package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs +4 -4
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +4 -4
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +3 -3
- package/dist/astro/routes/api/admin/plugins/_id_/mcp.mjs +4 -4
- package/dist/astro/routes/api/admin/plugins/_id_/settings.mjs +4 -4
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +5 -5
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs +9 -8
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/index.mjs +3 -3
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/icon.mjs +3 -3
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs +3 -3
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs +8 -7
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +3 -3
- package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.mjs +7 -7
- package/dist/astro/routes/api/admin/plugins/registry/_id_/update.mjs +14 -13
- package/dist/astro/routes/api/admin/plugins/registry/_id_/update.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/artifact.d.mts.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/artifact.mjs +6 -6
- package/dist/astro/routes/api/admin/plugins/registry/artifact.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/install.mjs +10 -10
- package/dist/astro/routes/api/admin/plugins/registry/publisher-handle.mjs +4 -4
- package/dist/astro/routes/api/admin/plugins/registry/verify.mjs +8 -8
- package/dist/astro/routes/api/admin/plugins/updates.mjs +7 -7
- package/dist/astro/routes/api/admin/scheduled-policy-rejections/_collection_/_id_.mjs +2 -2
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +3 -3
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/thumbnail.mjs +3 -3
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs +3 -3
- package/dist/astro/routes/api/admin/transfer/_...path_.mjs +1 -1
- package/dist/astro/routes/api/admin/transfer/approvals/_id_/approve.mjs +7 -8
- 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 +7 -8
- package/dist/astro/routes/api/admin/transfer/approvals/_id_/deny.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/approvals/index.mjs +9 -10
- package/dist/astro/routes/api/admin/transfer/approvals/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/capabilities.mjs +9 -10
- package/dist/astro/routes/api/admin/transfer/capabilities.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/exports/_id_/advance.mjs +8 -9
- 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 +9 -10
- 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 +9 -10
- 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 +8 -9
- 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 +9 -10
- package/dist/astro/routes/api/admin/transfer/exports/_id_/manifest.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/exports/index.d.mts.map +1 -1
- package/dist/astro/routes/api/admin/transfer/exports/index.mjs +11 -13
- package/dist/astro/routes/api/admin/transfer/exports/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/imports/_id_/abandon.mjs +8 -9
- 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 +8 -9
- 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 +10 -11
- 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 +8 -9
- 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 +11 -12
- 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 +9 -10
- 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 +8 -9
- 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 +10 -11
- 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 +8 -9
- 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 +8 -9
- package/dist/astro/routes/api/admin/transfer/imports/_id_/receipt.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/imports/index.d.mts.map +1 -1
- package/dist/astro/routes/api/admin/transfer/imports/index.mjs +13 -15
- package/dist/astro/routes/api/admin/transfer/imports/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/users/_id_/disable.mjs +2 -2
- package/dist/astro/routes/api/admin/users/_id_/enable.mjs +1 -1
- package/dist/astro/routes/api/admin/users/_id_/index.mjs +4 -4
- package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs +4 -4
- package/dist/astro/routes/api/admin/users/index.mjs +3 -3
- package/dist/astro/routes/api/auth/dev-bypass.mjs +2 -2
- package/dist/astro/routes/api/auth/handover.mjs +3 -3
- package/dist/astro/routes/api/auth/invite/accept.mjs +1 -1
- package/dist/astro/routes/api/auth/invite/complete.d.mts.map +1 -1
- package/dist/astro/routes/api/auth/invite/complete.mjs +10 -9
- package/dist/astro/routes/api/auth/invite/complete.mjs.map +1 -1
- package/dist/astro/routes/api/auth/invite/index.mjs +6 -6
- package/dist/astro/routes/api/auth/invite/register-options.mjs +6 -6
- package/dist/astro/routes/api/auth/logout.mjs +2 -2
- package/dist/astro/routes/api/auth/magic-link/send.mjs +8 -8
- package/dist/astro/routes/api/auth/magic-link/verify.d.mts.map +1 -1
- package/dist/astro/routes/api/auth/magic-link/verify.mjs +7 -6
- package/dist/astro/routes/api/auth/magic-link/verify.mjs.map +1 -1
- package/dist/astro/routes/api/auth/me.mjs +4 -4
- package/dist/astro/routes/api/auth/mode.mjs +1 -1
- package/dist/astro/routes/api/auth/oauth/_provider_/callback.d.mts.map +1 -1
- package/dist/astro/routes/api/auth/oauth/_provider_/callback.mjs +6 -5
- package/dist/astro/routes/api/auth/oauth/_provider_/callback.mjs.map +1 -1
- package/dist/astro/routes/api/auth/oauth/_provider_.mjs +2 -2
- package/dist/astro/routes/api/auth/passkey/_id_.mjs +3 -3
- package/dist/astro/routes/api/auth/passkey/index.mjs +1 -1
- package/dist/astro/routes/api/auth/passkey/options.mjs +9 -9
- package/dist/astro/routes/api/auth/passkey/register/options.mjs +6 -6
- package/dist/astro/routes/api/auth/passkey/register/verify.mjs +7 -7
- package/dist/astro/routes/api/auth/passkey/verify.d.mts.map +1 -1
- package/dist/astro/routes/api/auth/passkey/verify.mjs +10 -9
- package/dist/astro/routes/api/auth/passkey/verify.mjs.map +1 -1
- package/dist/astro/routes/api/auth/signup/complete.d.mts.map +1 -1
- package/dist/astro/routes/api/auth/signup/complete.mjs +10 -9
- package/dist/astro/routes/api/auth/signup/complete.mjs.map +1 -1
- package/dist/astro/routes/api/auth/signup/register-options.d.mts +8 -0
- package/dist/astro/routes/api/auth/signup/register-options.d.mts.map +1 -0
- package/dist/astro/routes/api/auth/signup/register-options.mjs +44 -0
- package/dist/astro/routes/api/auth/signup/register-options.mjs.map +1 -0
- package/dist/astro/routes/api/auth/signup/request.mjs +7 -7
- package/dist/astro/routes/api/auth/signup/verify.mjs +1 -1
- package/dist/astro/routes/api/calendar.mjs +4 -4
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.d.mts.map +1 -1
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs +6 -7
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs.map +1 -1
- package/dist/astro/routes/api/comments/_collection_/_contentId_/reactions.d.mts.map +1 -1
- package/dist/astro/routes/api/comments/_collection_/_contentId_/reactions.mjs +11 -12
- package/dist/astro/routes/api/comments/_collection_/_contentId_/reactions.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/compare.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs +9 -10
- package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/duplicate.mjs +6 -7
- package/dist/astro/routes/api/content/_collection_/_id_/duplicate.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/lock.d.mts.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/lock.mjs +15 -15
- package/dist/astro/routes/api/content/_collection_/_id_/lock.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/permanent.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/plugin-extensions/_pluginId_/_kind_/_extensionId_.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs +8 -8
- package/dist/astro/routes/api/content/_collection_/_id_/publish.d.mts.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs +9 -10
- package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/children.mjs +6 -7
- 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 +6 -7
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/parents.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/restore.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_/revisions/editors.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/revisions.mjs +6 -6
- package/dist/astro/routes/api/content/_collection_/_id_/room.mjs +4 -4
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs +6 -6
- 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 +16 -19
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/translations.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs +9 -10
- 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 +19 -19
- package/dist/astro/routes/api/content/_collection_/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/authors.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/index.mjs +5 -5
- package/dist/astro/routes/api/content/_collection_/trash.mjs +4 -4
- package/dist/astro/routes/api/dashboard.mjs +6 -6
- package/dist/astro/routes/api/dev/emails.mjs +2 -2
- package/dist/astro/routes/api/dev/scheduled-tasks.mjs +4 -3
- package/dist/astro/routes/api/dev/scheduled-tasks.mjs.map +1 -1
- package/dist/astro/routes/api/health.mjs +3 -3
- package/dist/astro/routes/api/import/probe.d.mts +4 -4
- package/dist/astro/routes/api/import/probe.mjs +6 -6
- package/dist/astro/routes/api/import/wordpress/analyze.d.mts +3 -3
- package/dist/astro/routes/api/import/wordpress/analyze.mjs +3 -3
- package/dist/astro/routes/api/import/wordpress/execute.d.mts +16 -16
- package/dist/astro/routes/api/import/wordpress/execute.mjs +7 -7
- package/dist/astro/routes/api/import/wordpress/execute.mjs.map +1 -1
- package/dist/astro/routes/api/import/wordpress/media.d.mts +15 -15
- package/dist/astro/routes/api/import/wordpress/media.d.mts.map +1 -1
- package/dist/astro/routes/api/import/wordpress/media.mjs +9 -8
- package/dist/astro/routes/api/import/wordpress/media.mjs.map +1 -1
- package/dist/astro/routes/api/import/wordpress/prepare.mjs +7 -7
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.d.mts +16 -16
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs +6 -6
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.d.mts +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs +6 -6
- package/dist/astro/routes/api/import/wordpress-plugin/execute.d.mts +16 -16
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs +13 -13
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs.map +1 -1
- package/dist/astro/routes/api/manifest.mjs +4 -4
- package/dist/astro/routes/api/mcp.mjs +84 -77
- package/dist/astro/routes/api/mcp.mjs.map +1 -1
- package/dist/astro/routes/api/media/_id_/confirm.mjs +7 -7
- package/dist/astro/routes/api/media/_id_/replace.d.mts.map +1 -1
- package/dist/astro/routes/api/media/_id_/replace.mjs +8 -6
- package/dist/astro/routes/api/media/_id_/replace.mjs.map +1 -1
- package/dist/astro/routes/api/media/_id_/upload.mjs +5 -5
- package/dist/astro/routes/api/media/_id_/usage.mjs +6 -6
- package/dist/astro/routes/api/media/_id_.d.mts.map +1 -1
- package/dist/astro/routes/api/media/_id_.mjs +11 -8
- package/dist/astro/routes/api/media/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/media/asset/_id_/_filename_.mjs +3 -3
- package/dist/astro/routes/api/media/file/_...key_.d.mts.map +1 -1
- package/dist/astro/routes/api/media/file/_...key_.mjs +7 -5
- package/dist/astro/routes/api/media/file/_...key_.mjs.map +1 -1
- package/dist/astro/routes/api/media/folders/_id_.mjs +5 -5
- package/dist/astro/routes/api/media/folders/index.mjs +5 -5
- package/dist/astro/routes/api/media/providers/_providerId_/_itemId_.d.mts.map +1 -1
- package/dist/astro/routes/api/media/providers/_providerId_/_itemId_.mjs +10 -4
- package/dist/astro/routes/api/media/providers/_providerId_/_itemId_.mjs.map +1 -1
- package/dist/astro/routes/api/media/providers/_providerId_/index.mjs +2 -2
- package/dist/astro/routes/api/media/providers/index.mjs +2 -2
- package/dist/astro/routes/api/media/upload-url.mjs +7 -7
- package/dist/astro/routes/api/media.mjs +9 -9
- package/dist/astro/routes/api/menus/_name_/items/_id_.d.mts.map +1 -1
- package/dist/astro/routes/api/menus/_name_/items/_id_.mjs +8 -6
- package/dist/astro/routes/api/menus/_name_/items/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/menus/_name_/items.mjs +7 -6
- package/dist/astro/routes/api/menus/_name_/items.mjs.map +1 -1
- package/dist/astro/routes/api/menus/_name_/reorder.mjs +7 -6
- 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 +7 -9
- 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 +9 -6
- 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 +8 -6
- package/dist/astro/routes/api/menus/index.mjs.map +1 -1
- package/dist/astro/routes/api/oauth/authorize.mjs +3 -3
- package/dist/astro/routes/api/oauth/device/authorize.mjs +3 -3
- package/dist/astro/routes/api/oauth/device/code.mjs +6 -6
- package/dist/astro/routes/api/oauth/device/token.mjs +5 -5
- package/dist/astro/routes/api/oauth/register.mjs +4 -4
- package/dist/astro/routes/api/oauth/token/refresh.mjs +3 -3
- package/dist/astro/routes/api/oauth/token/revoke.mjs +3 -3
- package/dist/astro/routes/api/oauth/token.mjs +4 -4
- package/dist/astro/routes/api/openapi.json.mjs +9 -9
- package/dist/astro/routes/api/openapi.json.mjs.map +1 -1
- package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs +2 -2
- package/dist/astro/routes/api/redirects/404s/index.d.mts.map +1 -1
- package/dist/astro/routes/api/redirects/404s/index.mjs +8 -11
- package/dist/astro/routes/api/redirects/404s/index.mjs.map +1 -1
- package/dist/astro/routes/api/redirects/404s/summary.mjs +6 -7
- package/dist/astro/routes/api/redirects/404s/summary.mjs.map +1 -1
- package/dist/astro/routes/api/redirects/_id_.d.mts.map +1 -1
- package/dist/astro/routes/api/redirects/_id_.mjs +9 -12
- 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 +8 -10
- package/dist/astro/routes/api/redirects/index.mjs.map +1 -1
- package/dist/astro/routes/api/relations/_id_/index.d.mts.map +1 -1
- package/dist/astro/routes/api/relations/_id_/index.mjs +8 -11
- package/dist/astro/routes/api/relations/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/relations/index.d.mts.map +1 -1
- package/dist/astro/routes/api/relations/index.mjs +7 -9
- package/dist/astro/routes/api/relations/index.mjs.map +1 -1
- package/dist/astro/routes/api/revisions/_revisionId_/index.mjs +2 -2
- package/dist/astro/routes/api/revisions/_revisionId_/restore.mjs +6 -6
- package/dist/astro/routes/api/schema/block-types/_slug_/index.d.mts.map +1 -1
- package/dist/astro/routes/api/schema/block-types/_slug_/index.mjs +7 -9
- 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 +6 -7
- 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.d.mts.map +1 -1
- package/dist/astro/routes/api/schema/block-types/index.mjs +7 -9
- package/dist/astro/routes/api/schema/block-types/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.d.mts.map +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs +8 -11
- package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/fields/index.d.mts.map +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs +7 -9
- 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 +6 -7
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/index.d.mts.map +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +8 -11
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/index.d.mts.map +1 -1
- package/dist/astro/routes/api/schema/collections/index.mjs +7 -9
- package/dist/astro/routes/api/schema/collections/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/reorder.mjs +6 -7
- package/dist/astro/routes/api/schema/collections/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/schema/index.mjs +4 -5
- package/dist/astro/routes/api/schema/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs +6 -7
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs.map +1 -1
- package/dist/astro/routes/api/schema/orphans/index.mjs +4 -5
- package/dist/astro/routes/api/schema/orphans/index.mjs.map +1 -1
- package/dist/astro/routes/api/search/enable.d.mts.map +1 -1
- package/dist/astro/routes/api/search/enable.mjs +8 -5
- package/dist/astro/routes/api/search/enable.mjs.map +1 -1
- package/dist/astro/routes/api/search/index.d.mts.map +1 -1
- package/dist/astro/routes/api/search/index.mjs +7 -4
- package/dist/astro/routes/api/search/index.mjs.map +1 -1
- package/dist/astro/routes/api/search/rebuild.d.mts.map +1 -1
- package/dist/astro/routes/api/search/rebuild.mjs +8 -5
- package/dist/astro/routes/api/search/rebuild.mjs.map +1 -1
- package/dist/astro/routes/api/search/stats.d.mts.map +1 -1
- package/dist/astro/routes/api/search/stats.mjs +6 -3
- package/dist/astro/routes/api/search/stats.mjs.map +1 -1
- package/dist/astro/routes/api/search/suggest.d.mts.map +1 -1
- package/dist/astro/routes/api/search/suggest.mjs +7 -4
- package/dist/astro/routes/api/search/suggest.mjs.map +1 -1
- package/dist/astro/routes/api/sections/_slug_.d.mts.map +1 -1
- package/dist/astro/routes/api/sections/_slug_.mjs +8 -11
- package/dist/astro/routes/api/sections/_slug_.mjs.map +1 -1
- package/dist/astro/routes/api/sections/index.d.mts.map +1 -1
- package/dist/astro/routes/api/sections/index.mjs +7 -9
- package/dist/astro/routes/api/sections/index.mjs.map +1 -1
- package/dist/astro/routes/api/settings/backups/archives/_name_.mjs +4 -4
- package/dist/astro/routes/api/settings/backups/archives/index.mjs +3 -3
- package/dist/astro/routes/api/settings/backups/export.mjs +4 -4
- package/dist/astro/routes/api/settings/backups/index.mjs +5 -5
- package/dist/astro/routes/api/settings/domain-notify.mjs +6 -6
- package/dist/astro/routes/api/settings/domain.mjs +6 -6
- package/dist/astro/routes/api/settings/email.mjs +5 -5
- package/dist/astro/routes/api/settings.mjs +5 -5
- package/dist/astro/routes/api/setup/admin-verify.d.mts.map +1 -1
- package/dist/astro/routes/api/setup/admin-verify.mjs +12 -11
- package/dist/astro/routes/api/setup/admin-verify.mjs.map +1 -1
- package/dist/astro/routes/api/setup/admin.mjs +7 -7
- package/dist/astro/routes/api/setup/dev-bypass.mjs +8 -8
- package/dist/astro/routes/api/setup/dev-reset.mjs +1 -1
- package/dist/astro/routes/api/setup/index.mjs +8 -8
- package/dist/astro/routes/api/setup/status.mjs +2 -2
- package/dist/astro/routes/api/site/domain-proof.mjs +2 -2
- package/dist/astro/routes/api/snapshot.mjs +6 -6
- package/dist/astro/routes/api/taxonomies/_name_/reorder.mjs +6 -7
- 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 +7 -9
- 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 +9 -12
- 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 +7 -9
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/translations.mjs +6 -7
- 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 +9 -12
- package/dist/astro/routes/api/taxonomies/_name_.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/bulk-tag.mjs +12 -13
- 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 +8 -10
- package/dist/astro/routes/api/taxonomies/index.mjs.map +1 -1
- package/dist/astro/routes/api/themes/preview.mjs +4 -4
- package/dist/astro/routes/api/typegen.mjs +3 -3
- package/dist/astro/routes/api/visual-editing/action-token.mjs +3 -3
- package/dist/astro/routes/api/visual-editing/content/_collection_/_id_/publish.mjs +3 -3
- package/dist/astro/routes/api/visual-editing/toolbar-labels.mjs +1 -1
- package/dist/astro/routes/api/well-known/auth.mjs +1 -1
- package/dist/astro/routes/api/well-known/oauth-authorization-server.mjs +1 -1
- package/dist/astro/routes/api/well-known/oauth-protected-resource.mjs +1 -1
- package/dist/astro/routes/api/widget-areas/_name_/reorder.mjs +6 -5
- 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 +8 -6
- package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs +7 -6
- 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 +6 -4
- 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 +8 -6
- package/dist/astro/routes/api/widget-areas/index.mjs.map +1 -1
- package/dist/astro/routes/api/widget-components.mjs +2 -2
- package/dist/astro/routes/robots.txt.mjs +2 -2
- package/dist/astro/routes/sitemap-_collection_.xml.mjs +5 -5
- package/dist/astro/routes/sitemap.xml.mjs +3 -3
- package/dist/astro/types.d.mts +82 -69
- package/dist/astro/types.d.mts.map +1 -1
- package/dist/auth/providers/github.d.mts +1 -1
- package/dist/auth/providers/google.d.mts +1 -1
- package/dist/auth/providers/microsoft.d.mts +1 -1
- package/dist/authoritative-records-DFHFmreO.mjs +5183 -0
- package/dist/authoritative-records-DFHFmreO.mjs.map +1 -0
- package/dist/authorize-6a0h5NN5.mjs +74 -0
- package/dist/authorize-6a0h5NN5.mjs.map +1 -0
- package/dist/backup-GBRxixs1.mjs +246 -0
- package/dist/backup-GBRxixs1.mjs.map +1 -0
- package/dist/block-types-BeLZ85Sw.mjs +132 -0
- package/dist/block-types-BeLZ85Sw.mjs.map +1 -0
- package/dist/block-values-BRJZHvF4.mjs +215 -0
- package/dist/block-values-BRJZHvF4.mjs.map +1 -0
- package/dist/byline-BufjxQyd.mjs +930 -0
- package/dist/byline-BufjxQyd.mjs.map +1 -0
- package/dist/byline-fields-Bw7z2opJ.mjs +123 -0
- package/dist/byline-fields-Bw7z2opJ.mjs.map +1 -0
- package/dist/byline-registry-edmv55U7.mjs +406 -0
- package/dist/byline-registry-edmv55U7.mjs.map +1 -0
- package/dist/bylines-C8ZT6iWw.mjs +234 -0
- package/dist/bylines-C8ZT6iWw.mjs.map +1 -0
- package/dist/bylines-a01JW9yq.mjs +150 -0
- package/dist/bylines-a01JW9yq.mjs.map +1 -0
- package/dist/cache-LOb3NthC.mjs +151 -0
- package/dist/cache-LOb3NthC.mjs.map +1 -0
- package/dist/canonical-CUkatNPc.mjs +174 -0
- package/dist/canonical-CUkatNPc.mjs.map +1 -0
- package/dist/capture-triggers-BK2pp_kZ.mjs +362 -0
- package/dist/capture-triggers-BK2pp_kZ.mjs.map +1 -0
- package/dist/checksum-C8lkApUe.mjs +162 -0
- package/dist/checksum-C8lkApUe.mjs.map +1 -0
- package/dist/chunks-CvgCLYip.mjs +25 -0
- package/dist/chunks-CvgCLYip.mjs.map +1 -0
- package/dist/cli/index.mjs +24 -24
- package/dist/client/cf-access.d.mts +1 -1
- package/dist/client/index.d.mts +63 -63
- package/dist/client/index.d.mts.map +1 -1
- package/dist/client/index.mjs +6 -4
- package/dist/client/index.mjs.map +1 -1
- package/dist/collection-slugs-cache-CLR_8fY5.mjs +91 -0
- package/dist/collection-slugs-cache-CLR_8fY5.mjs.map +1 -0
- package/dist/comment-C163Gl_4.mjs +335 -0
- package/dist/comment-C163Gl_4.mjs.map +1 -0
- package/dist/comment-reaction-1Df3G-ij.mjs +85 -0
- package/dist/comment-reaction-1Df3G-ij.mjs.map +1 -0
- package/dist/comments-BFyw2y-m.mjs +99 -0
- package/dist/comments-BFyw2y-m.mjs.map +1 -0
- package/dist/comments-D73Sy_2U.mjs +195 -0
- package/dist/comments-D73Sy_2U.mjs.map +1 -0
- package/dist/components-DjV1sxUL.mjs +112 -0
- package/dist/components-DjV1sxUL.mjs.map +1 -0
- package/dist/config-B27hvMjf.d.mts +7274 -0
- package/dist/config-B27hvMjf.d.mts.map +1 -0
- package/dist/config-DLzKVQBA.d.mts +41 -0
- package/dist/config-DLzKVQBA.d.mts.map +1 -0
- package/dist/config-DeluGa9H.mjs +228 -0
- package/dist/config-DeluGa9H.mjs.map +1 -0
- package/dist/connection-D6aKSo2Y.mjs +36 -0
- package/dist/connection-D6aKSo2Y.mjs.map +1 -0
- package/dist/content-2gjSbGP3.mjs +2295 -0
- package/dist/content-2gjSbGP3.mjs.map +1 -0
- package/dist/content-list-query-B9SlIDbL.d.mts +26 -0
- package/dist/content-list-query-B9SlIDbL.d.mts.map +1 -0
- package/dist/content-repair-Dizo4qiY.mjs +443 -0
- package/dist/content-repair-Dizo4qiY.mjs.map +1 -0
- package/dist/content-save-BKDTKmkx.mjs +202 -0
- package/dist/content-save-BKDTKmkx.mjs.map +1 -0
- package/dist/context-DCQrjN95.mjs +2242 -0
- package/dist/context-DCQrjN95.mjs.map +1 -0
- package/dist/credits-Bxp4F72g.mjs +110 -0
- package/dist/credits-Bxp4F72g.mjs.map +1 -0
- package/dist/cron-DEV8oz3R.mjs +310 -0
- package/dist/cron-DEV8oz3R.mjs.map +1 -0
- 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 +2 -2
- package/dist/db/libsql.d.mts +1 -1
- package/dist/db/postgres-migrations.d.mts +1 -1
- package/dist/db/postgres-migrations.mjs +2 -2
- package/dist/db/postgres.d.mts +1 -1
- package/dist/db/sqlite-migrations.d.mts +1 -1
- package/dist/db/sqlite-migrations.mjs +2 -2
- package/dist/db/sqlite.d.mts +1 -1
- package/dist/db/sqlite.mjs +1 -1
- package/dist/default-DKs7zP7m.mjs +81 -0
- package/dist/default-DKs7zP7m.mjs.map +1 -0
- package/dist/deferred-tasks-B5LQWb5F.d.mts +10 -0
- package/dist/deferred-tasks-B5LQWb5F.d.mts.map +1 -0
- package/dist/device-flow-D6kyi3jX.mjs +519 -0
- package/dist/device-flow-D6kyi3jX.mjs.map +1 -0
- package/dist/dialect-helpers-DRe1Y08G.mjs +355 -0
- package/dist/dialect-helpers-DRe1Y08G.mjs.map +1 -0
- package/dist/digest-DSsUd9oL.mjs +194 -0
- package/dist/digest-DSsUd9oL.mjs.map +1 -0
- package/dist/direct-executor-DAcU8MTG.mjs +117 -0
- package/dist/direct-executor-DAcU8MTG.mjs.map +1 -0
- package/dist/email-console-CBZpj1VI.mjs +50 -0
- package/dist/email-console-CBZpj1VI.mjs.map +1 -0
- package/dist/email-locale-CGjBa23b.mjs +25 -0
- package/dist/email-locale-CGjBa23b.mjs.map +1 -0
- package/dist/email-smtp-CE6nESRL.mjs +643 -0
- package/dist/email-smtp-CE6nESRL.mjs.map +1 -0
- package/dist/emdash-runtime-CF6KAut9.mjs +5576 -0
- package/dist/emdash-runtime-CF6KAut9.mjs.map +1 -0
- package/dist/enrich-C4vKniyi.mjs +203 -0
- package/dist/enrich-C4vKniyi.mjs.map +1 -0
- package/dist/entry-lock-DJgDNfMf.mjs +1230 -0
- package/dist/entry-lock-DJgDNfMf.mjs.map +1 -0
- package/dist/entry-lock-GKD0lJI5.mjs +207 -0
- package/dist/entry-lock-GKD0lJI5.mjs.map +1 -0
- package/dist/entry-locks-B58Q9LZh.mjs +173 -0
- package/dist/entry-locks-B58Q9LZh.mjs.map +1 -0
- package/dist/env-types-EL7WTMzr.mjs +38 -0
- package/dist/env-types-EL7WTMzr.mjs.map +1 -0
- package/dist/error-0Y0dFPxm.mjs +82 -0
- package/dist/error-0Y0dFPxm.mjs.map +1 -0
- package/dist/errors-OTWh4SC_.mjs +502 -0
- package/dist/errors-OTWh4SC_.mjs.map +1 -0
- package/dist/errors-u5rZhbVQ.mjs +120 -0
- package/dist/errors-u5rZhbVQ.mjs.map +1 -0
- package/dist/fence-CkdbSoZX.mjs +162 -0
- package/dist/fence-CkdbSoZX.mjs.map +1 -0
- package/dist/field-defs-cache-BW0Y9Wrp.mjs +79 -0
- package/dist/field-defs-cache-BW0Y9Wrp.mjs.map +1 -0
- package/dist/field-map-Bhqs6zUK.mjs +84 -0
- package/dist/field-map-Bhqs6zUK.mjs.map +1 -0
- package/dist/fts-manager-m8GPxogO.mjs +532 -0
- package/dist/fts-manager-m8GPxogO.mjs.map +1 -0
- package/dist/gc-CEhfEMLY.mjs +62 -0
- package/dist/gc-CEhfEMLY.mjs.map +1 -0
- package/dist/hook-result-CG0uHAT5.d.mts +31 -0
- package/dist/hook-result-CG0uHAT5.d.mts.map +1 -0
- package/dist/hook-result-mOyk-VCt.mjs +3855 -0
- package/dist/hook-result-mOyk-VCt.mjs.map +1 -0
- package/dist/hreflang-B1E64c5R.d.mts +51 -0
- package/dist/hreflang-B1E64c5R.d.mts.map +1 -0
- package/dist/hreflang-DaMRoUor.mjs +105 -0
- package/dist/hreflang-DaMRoUor.mjs.map +1 -0
- package/dist/http-route-dispatch-Y8bwyixm.mjs +348 -0
- package/dist/http-route-dispatch-Y8bwyixm.mjs.map +1 -0
- package/dist/identity-cqdOzgy9.mjs +35 -0
- package/dist/identity-cqdOzgy9.mjs.map +1 -0
- package/dist/index-CzbH8FX2.d.mts +261 -0
- package/dist/index-CzbH8FX2.d.mts.map +1 -0
- package/dist/index.d.mts +25 -25
- package/dist/index.mjs +60 -53
- package/dist/index.mjs.map +1 -1
- package/dist/install-finalization-B02IcpqW.mjs +58 -0
- package/dist/install-finalization-B02IcpqW.mjs.map +1 -0
- package/dist/json-recordset-2VNAgija.mjs +12 -0
- package/dist/json-recordset-2VNAgija.mjs.map +1 -0
- package/dist/json-schema-CnImQ4DF.mjs +15 -0
- package/dist/json-schema-CnImQ4DF.mjs.map +1 -0
- package/dist/keys-B5WUGmYK.mjs +61 -0
- package/dist/keys-B5WUGmYK.mjs.map +1 -0
- package/dist/kinds-DyAmbNrx.mjs +974 -0
- package/dist/kinds-DyAmbNrx.mjs.map +1 -0
- package/dist/lifecycle-1Nl01SeB.mjs +53 -0
- package/dist/lifecycle-1Nl01SeB.mjs.map +1 -0
- package/dist/limits-BuiMu9zx.mjs +44 -0
- package/dist/limits-BuiMu9zx.mjs.map +1 -0
- package/dist/load-CEt0TQ4_.mjs +36 -0
- package/dist/load-CEt0TQ4_.mjs.map +1 -0
- package/dist/loader-DF6J1Fpd.mjs +1537 -0
- package/dist/loader-DF6J1Fpd.mjs.map +1 -0
- package/dist/loops-3DdrfQ6y.mjs +217 -0
- package/dist/loops-3DdrfQ6y.mjs.map +1 -0
- package/dist/manifest-builder-Dcfqd9Aw.mjs +196 -0
- package/dist/manifest-builder-Dcfqd9Aw.mjs.map +1 -0
- package/dist/manifest-schema-Pi_JP_Wi.mjs +497 -0
- package/dist/manifest-schema-Pi_JP_Wi.mjs.map +1 -0
- package/dist/marketplace-BsMC_Z7o.mjs +257 -0
- package/dist/marketplace-BsMC_Z7o.mjs.map +1 -0
- package/dist/marketplace-D9fChLav.mjs +965 -0
- package/dist/marketplace-D9fChLav.mjs.map +1 -0
- package/dist/media/image-endpoint.d.mts +33 -1
- package/dist/media/image-endpoint.d.mts.map +1 -1
- package/dist/media/image-endpoint.mjs +77 -1
- package/dist/media/image-endpoint.mjs.map +1 -1
- package/dist/media/index.d.mts +1 -1
- package/dist/media/index.mjs +1 -1
- package/dist/media/local-runtime.d.mts +17 -17
- package/dist/media/local-runtime.mjs +3 -3
- package/dist/media--P-IEycF.mjs +2813 -0
- package/dist/media--P-IEycF.mjs.map +1 -0
- package/dist/media-CTA82rU1.mjs +295 -0
- package/dist/media-CTA82rU1.mjs.map +1 -0
- package/dist/media-Cq_oKN_Y.mjs +425 -0
- package/dist/media-Cq_oKN_Y.mjs.map +1 -0
- package/dist/media-DRDkfiDv.d.mts +203 -0
- package/dist/media-DRDkfiDv.d.mts.map +1 -0
- package/dist/media-allowlist-C_kSleFj.mjs +103 -0
- package/dist/media-allowlist-C_kSleFj.mjs.map +1 -0
- package/dist/media-folders-Lc9Ks8az.mjs +205 -0
- package/dist/media-folders-Lc9Ks8az.mjs.map +1 -0
- package/dist/media-url-BEvOId4Z.mjs +43 -0
- package/dist/media-url-BEvOId4Z.mjs.map +1 -0
- package/dist/media-usage-D6LjfdGn.mjs +282 -0
- package/dist/media-usage-D6LjfdGn.mjs.map +1 -0
- package/dist/media-usage-activation-i6tqb6cn.mjs +78 -0
- package/dist/media-usage-activation-i6tqb6cn.mjs.map +1 -0
- package/dist/media-usage-work-C5HHgfEU.mjs +1036 -0
- package/dist/media-usage-work-C5HHgfEU.mjs.map +1 -0
- package/dist/media-usage-work-CxqS_Ny9.mjs +151 -0
- package/dist/media-usage-work-CxqS_Ny9.mjs.map +1 -0
- package/dist/menu-CvWToneO.mjs +420 -0
- package/dist/menu-CvWToneO.mjs.map +1 -0
- package/dist/menus-BzjHvAM4.mjs +434 -0
- package/dist/menus-BzjHvAM4.mjs.map +1 -0
- package/dist/menus-CnEw5nz8.mjs +92 -0
- package/dist/menus-CnEw5nz8.mjs.map +1 -0
- package/dist/menus-DoVbs2sn.mjs +433 -0
- package/dist/menus-DoVbs2sn.mjs.map +1 -0
- package/dist/migrations/index.d.mts +1 -1
- package/dist/migrations/index.mjs +2 -2
- package/dist/mime-C_YV5Mjm.mjs +90 -0
- package/dist/mime-C_YV5Mjm.mjs.map +1 -0
- package/dist/node-sqlite-compat-DHFDZMe2.mjs +68 -0
- package/dist/node-sqlite-compat-DHFDZMe2.mjs.map +1 -0
- package/dist/oauth-authorization-CvT-8KtG.mjs +287 -0
- package/dist/oauth-authorization-CvT-8KtG.mjs.map +1 -0
- package/dist/oauth-clients-ohsH0FlQ.mjs +266 -0
- package/dist/oauth-clients-ohsH0FlQ.mjs.map +1 -0
- package/dist/oauth-state-store-V4y2qZwD.mjs +80 -0
- package/dist/oauth-state-store-V4y2qZwD.mjs.map +1 -0
- package/dist/oauth-user-lookup-D2NTHxcr.mjs +26 -0
- package/dist/oauth-user-lookup-D2NTHxcr.mjs.map +1 -0
- package/dist/object-cache/memory.d.mts +1 -1
- package/dist/object-cache-I4Re7BOR.mjs +807 -0
- package/dist/object-cache-I4Re7BOR.mjs.map +1 -0
- package/dist/options-CbSYZAwr.d.mts +81 -0
- package/dist/options-CbSYZAwr.d.mts.map +1 -0
- package/dist/page/index.d.mts +2 -2
- package/dist/parse-BTfkfMuL.mjs +82 -0
- package/dist/parse-BTfkfMuL.mjs.map +1 -0
- package/dist/parse-CBM779p-.d.mts +180 -0
- package/dist/parse-CBM779p-.d.mts.map +1 -0
- package/dist/parts-i0nNljq-.mjs +68 -0
- package/dist/parts-i0nNljq-.mjs.map +1 -0
- package/dist/passkey-config-D9iYgt4G.mjs +46 -0
- package/dist/passkey-config-D9iYgt4G.mjs.map +1 -0
- package/dist/paths-B1TgS0ir.mjs +77 -0
- package/dist/paths-B1TgS0ir.mjs.map +1 -0
- package/dist/placeholder-PFMxMYTa.d.mts +316 -0
- package/dist/placeholder-PFMxMYTa.d.mts.map +1 -0
- package/dist/plan-DQoNgF2Y.mjs +135 -0
- package/dist/plan-DQoNgF2Y.mjs.map +1 -0
- package/dist/plugin-settings-CKffVNYE.mjs +162 -0
- package/dist/plugin-settings-CKffVNYE.mjs.map +1 -0
- package/dist/plugin-test-runtime.d.mts +23 -22
- package/dist/plugin-test-runtime.d.mts.map +1 -1
- package/dist/plugin-test-runtime.mjs +9 -8
- package/dist/plugin-types.d.mts +2 -2
- package/dist/plugin-utils.d.mts +15 -15
- package/dist/plugins/adapt-sandbox-entry.d.mts +15 -15
- package/dist/plugins/adapt-sandbox-entry.mjs +4 -4
- package/dist/plugins/host.d.mts +6 -6
- package/dist/plugins/host.mjs +8 -7
- package/dist/plugins-DDiWIA_N.mjs +261 -0
- package/dist/plugins-DDiWIA_N.mjs.map +1 -0
- package/dist/policy-72PGoCgJ.mjs +56 -0
- package/dist/policy-72PGoCgJ.mjs.map +1 -0
- package/dist/portable-text-D18C1jR6.mjs +457 -0
- package/dist/portable-text-D18C1jR6.mjs.map +1 -0
- package/dist/protocol-CbSoh3FE.d.mts +65 -0
- package/dist/protocol-CbSoh3FE.d.mts.map +1 -0
- package/dist/public-plugin-api-routes-Bq55wwHn.mjs +323 -0
- package/dist/public-plugin-api-routes-Bq55wwHn.mjs.map +1 -0
- package/dist/public-submission-BEcSmcWi.mjs +253 -0
- package/dist/public-submission-BEcSmcWi.mjs.map +1 -0
- package/dist/public-url-DYZMfvpa.mjs +123 -0
- package/dist/public-url-DYZMfvpa.mjs.map +1 -0
- package/dist/query-CslUTGOV.mjs +1221 -0
- package/dist/query-CslUTGOV.mjs.map +1 -0
- package/dist/query-Cv8bjIwl.mjs +41 -0
- package/dist/query-Cv8bjIwl.mjs.map +1 -0
- package/dist/range-CzdsIs-O.mjs +51 -0
- package/dist/range-CzdsIs-O.mjs.map +1 -0
- package/dist/rate-limit-iZgsy_oY.mjs +127 -0
- package/dist/rate-limit-iZgsy_oY.mjs.map +1 -0
- package/dist/receipt-CqxAacXn.mjs +43 -0
- package/dist/receipt-CqxAacXn.mjs.map +1 -0
- package/dist/redirect-3A3kqsD-.mjs +19 -0
- package/dist/redirect-3A3kqsD-.mjs.map +1 -0
- package/dist/redirect-DsaFuuQi.mjs +466 -0
- package/dist/redirect-DsaFuuQi.mjs.map +1 -0
- package/dist/redirect-paths-DgkkN0qJ.mjs +36 -0
- package/dist/redirect-paths-DgkkN0qJ.mjs.map +1 -0
- package/dist/redirects-DfvdrgF1.mjs +446 -0
- package/dist/redirects-DfvdrgF1.mjs.map +1 -0
- package/dist/redirects-Yo8YTJMV.mjs +148 -0
- package/dist/redirects-Yo8YTJMV.mjs.map +1 -0
- package/dist/registry/testing.mjs +2 -2
- package/dist/registry-2vAYgqCz.mjs +755 -0
- package/dist/registry-2vAYgqCz.mjs.map +1 -0
- package/dist/registry-COR9pjyi.mjs +1449 -0
- package/dist/registry-COR9pjyi.mjs.map +1 -0
- package/dist/registry-CSLrHSx1.mjs +6139 -0
- package/dist/registry-CSLrHSx1.mjs.map +1 -0
- package/dist/relations-5fVj42fZ.mjs +798 -0
- package/dist/relations-5fVj42fZ.mjs.map +1 -0
- package/dist/request-context.d.mts +2 -2
- package/dist/request-meta-B0TPrDpq.mjs +141 -0
- package/dist/request-meta-B0TPrDpq.mjs.map +1 -0
- package/dist/resolve--EmZidEz.mjs +92 -0
- package/dist/resolve--EmZidEz.mjs.map +1 -0
- package/dist/revision-Dk9VI8Vf.mjs +503 -0
- package/dist/revision-Dk9VI8Vf.mjs.map +1 -0
- package/dist/rooms/index.d.mts +15 -15
- package/dist/rooms/index.mjs +3 -3
- package/dist/rooms/node/index.d.mts +15 -15
- package/dist/rooms/node/index.mjs +6 -6
- package/dist/rooms/notifications.d.mts +15 -15
- package/dist/rooms/notifications.mjs +2 -2
- package/dist/rooms/room.d.mts +15 -15
- package/dist/rooms/room.mjs +2 -2
- package/dist/rooms/site.d.mts +15 -15
- package/dist/rooms/site.mjs +4 -4
- package/dist/rooms-AcO0YNUt.mjs +335 -0
- package/dist/rooms-AcO0YNUt.mjs.map +1 -0
- package/dist/rooms-B2P1xIS_.d.mts +4778 -0
- package/dist/rooms-B2P1xIS_.d.mts.map +1 -0
- package/dist/rooms-C08U-F8Y.mjs +169 -0
- package/dist/rooms-C08U-F8Y.mjs.map +1 -0
- package/dist/route-cache-CvTJlNVT.mjs +30 -0
- package/dist/route-cache-CvTJlNVT.mjs.map +1 -0
- package/dist/route-wire-NAkNES3Z.mjs +197 -0
- package/dist/route-wire-NAkNES3Z.mjs.map +1 -0
- package/dist/routes-BScyES_G.mjs +272 -0
- package/dist/routes-BScyES_G.mjs.map +1 -0
- package/dist/runner-C6gBIcTD.d.mts +79 -0
- package/dist/runner-C6gBIcTD.d.mts.map +1 -0
- package/dist/runner-Nv0yWP-G.mjs +6964 -0
- package/dist/runner-Nv0yWP-G.mjs.map +1 -0
- package/dist/runtime-holder-DkZ_0f7A.mjs +36 -0
- package/dist/runtime-holder-DkZ_0f7A.mjs.map +1 -0
- package/dist/runtime.d.mts +16 -16
- package/dist/runtime.mjs +1 -1
- package/dist/scheduler-health-B5n19775.mjs +31 -0
- package/dist/scheduler-health-B5n19775.mjs.map +1 -0
- package/dist/schema/project-env-types.mjs +6 -6
- package/dist/schema-B7ODIkP4.mjs +13 -0
- package/dist/schema-B7ODIkP4.mjs.map +1 -0
- package/dist/schema-D04_n_7j.mjs +815 -0
- package/dist/schema-D04_n_7j.mjs.map +1 -0
- package/dist/scopes-CHc86VzZ.mjs +34 -0
- package/dist/scopes-CHc86VzZ.mjs.map +1 -0
- package/dist/search-BxBg7Xq1.mjs +503 -0
- package/dist/search-BxBg7Xq1.mjs.map +1 -0
- package/dist/search-SRLBXKJU.mjs +12 -0
- package/dist/search-SRLBXKJU.mjs.map +1 -0
- package/dist/secrets-O25WpEe_.mjs +369 -0
- package/dist/secrets-O25WpEe_.mjs.map +1 -0
- package/dist/sections-BK7soA2U.mjs +222 -0
- package/dist/sections-BK7soA2U.mjs.map +1 -0
- package/dist/sections-CLejSkAG.mjs +129 -0
- package/dist/sections-CLejSkAG.mjs.map +1 -0
- package/dist/seed/index.d.mts +2 -2
- package/dist/seed/index.mjs +4 -4
- package/dist/seo/index.d.mts +3 -3
- package/dist/seo/index.mjs +3 -3
- package/dist/seo-Ie7B6cud.mjs +194 -0
- package/dist/seo-Ie7B6cud.mjs.map +1 -0
- package/dist/service-DbKGSUHC.mjs +150 -0
- package/dist/service-DbKGSUHC.mjs.map +1 -0
- package/dist/session-user-BrCPLyWB.mjs +61 -0
- package/dist/session-user-BrCPLyWB.mjs.map +1 -0
- package/dist/settings-BApLX_aS.mjs +413 -0
- package/dist/settings-BApLX_aS.mjs.map +1 -0
- package/dist/settings-Ces2K0VL.mjs +74 -0
- package/dist/settings-Ces2K0VL.mjs.map +1 -0
- package/dist/settings-DMHIgDyb.mjs +66 -0
- package/dist/settings-DMHIgDyb.mjs.map +1 -0
- package/dist/settings-DgnWX0GN.mjs +157 -0
- package/dist/settings-DgnWX0GN.mjs.map +1 -0
- package/dist/setup-complete-DQ1nNEjm.mjs +65 -0
- package/dist/setup-complete-DQ1nNEjm.mjs.map +1 -0
- package/dist/setup-nonce-5k8BY3W_.mjs +25 -0
- package/dist/setup-nonce-5k8BY3W_.mjs.map +1 -0
- package/dist/site-domain-B2KvJstd.mjs +131 -0
- package/dist/site-domain-B2KvJstd.mjs.map +1 -0
- package/dist/site-settings-B7VxSqP6.mjs +50 -0
- package/dist/site-settings-B7VxSqP6.mjs.map +1 -0
- package/dist/site-title-DHgWlyMw.mjs +14 -0
- package/dist/site-title-DHgWlyMw.mjs.map +1 -0
- package/dist/site-url-OBYES-gb.mjs +45 -0
- package/dist/site-url-OBYES-gb.mjs.map +1 -0
- package/dist/sitemap-name-BZXv5sf0.mjs +26 -0
- package/dist/sitemap-name-BZXv5sf0.mjs.map +1 -0
- package/dist/slug-CFsfrxUp.mjs +16 -0
- package/dist/slug-CFsfrxUp.mjs.map +1 -0
- package/dist/snapshot-BaIv7afB.mjs +466 -0
- package/dist/snapshot-BaIv7afB.mjs.map +1 -0
- package/dist/snapshot-VQM7BcdM.mjs +184 -0
- package/dist/snapshot-VQM7BcdM.mjs.map +1 -0
- package/dist/ssrf-Em0CeaaN.mjs +406 -0
- package/dist/ssrf-Em0CeaaN.mjs.map +1 -0
- package/dist/stage-Ctas_E7M.mjs +662 -0
- package/dist/stage-Ctas_E7M.mjs.map +1 -0
- package/dist/staged-C746SkS0.mjs +686 -0
- package/dist/staged-C746SkS0.mjs.map +1 -0
- package/dist/start-user-session-CdyNie0P.mjs +9 -0
- package/dist/start-user-session-CdyNie0P.mjs.map +1 -0
- package/dist/state-Cdkt6b1h.mjs +282 -0
- package/dist/state-Cdkt6b1h.mjs.map +1 -0
- package/dist/storage/local.d.mts +1 -1
- package/dist/storage/local.mjs +2 -2
- package/dist/storage/s3.d.mts +1 -1
- package/dist/storage/s3.mjs +1 -1
- package/dist/storage-query-DdKo8oes.d.mts +1614 -0
- package/dist/storage-query-DdKo8oes.d.mts.map +1 -0
- package/dist/tar-Tbl91sMI.mjs +449 -0
- package/dist/tar-Tbl91sMI.mjs.map +1 -0
- package/dist/target-Bjxlaj4T.mjs +27 -0
- package/dist/target-Bjxlaj4T.mjs.map +1 -0
- package/dist/taxonomies-D5bavOHA.mjs +937 -0
- package/dist/taxonomies-D5bavOHA.mjs.map +1 -0
- package/dist/taxonomies-DApyZAJq.mjs +722 -0
- package/dist/taxonomies-DApyZAJq.mjs.map +1 -0
- package/dist/taxonomy-D4Fl2smf.mjs +593 -0
- package/dist/taxonomy-D4Fl2smf.mjs.map +1 -0
- package/dist/tokens-DvEbszXd.mjs +171 -0
- package/dist/tokens-DvEbszXd.mjs.map +1 -0
- package/dist/transaction-D5Kq7MTL.mjs +44 -0
- package/dist/transaction-D5Kq7MTL.mjs.map +1 -0
- package/dist/transfer-BwKpOrTV.mjs +8963 -0
- package/dist/transfer-BwKpOrTV.mjs.map +1 -0
- package/dist/transfer-CafpWTD6.mjs +166 -0
- package/dist/transfer-CafpWTD6.mjs.map +1 -0
- package/dist/transfer-download-H8beYs2r.mjs +33 -0
- package/dist/transfer-download-H8beYs2r.mjs.map +1 -0
- package/dist/transformations-DX_dwSfp.mjs +196 -0
- package/dist/transformations-DX_dwSfp.mjs.map +1 -0
- package/dist/transport-7mI_Nvnn.d.mts +42 -0
- package/dist/transport-7mI_Nvnn.d.mts.map +1 -0
- package/dist/transport-Cs1Xl7-v.mjs +144 -0
- package/dist/transport-Cs1Xl7-v.mjs.map +1 -0
- package/dist/trusted-proxy-DaSru7xW.mjs +51 -0
- package/dist/trusted-proxy-DaSru7xW.mjs.map +1 -0
- package/dist/turnstile-DNR0cwtt.mjs +58 -0
- package/dist/turnstile-DNR0cwtt.mjs.map +1 -0
- package/dist/types-8q-gxKfV.d.mts +935 -0
- package/dist/types-8q-gxKfV.d.mts.map +1 -0
- package/dist/types-BBH-w_KS.mjs.map +1 -1
- package/dist/types-BE4og6EZ.d.mts +292 -0
- package/dist/types-BE4og6EZ.d.mts.map +1 -0
- package/dist/types-BbOWBoRk.d.mts +384 -0
- package/dist/types-BbOWBoRk.d.mts.map +1 -0
- package/dist/types-BmBK2cqf.mjs.map +1 -1
- package/dist/types-C3tTVw9y.mjs +37 -0
- package/dist/types-C3tTVw9y.mjs.map +1 -0
- package/dist/types-CTQEkZcI.mjs +16 -0
- package/dist/types-CTQEkZcI.mjs.map +1 -0
- package/dist/types-CbfB5YfA.d.mts +209 -0
- package/dist/types-CbfB5YfA.d.mts.map +1 -0
- package/dist/types-CeknTiV0.d.mts +93 -0
- package/dist/types-CeknTiV0.d.mts.map +1 -0
- package/dist/types-CpFfDrGH.mjs.map +1 -1
- package/dist/types-DHjtQujX.mjs +77 -0
- package/dist/types-DHjtQujX.mjs.map +1 -0
- package/dist/types-EYyvAjNA.d.mts +125 -0
- package/dist/types-EYyvAjNA.d.mts.map +1 -0
- package/dist/types-VMZCO8hc.d.mts +366 -0
- package/dist/types-VMZCO8hc.d.mts.map +1 -0
- package/dist/types-YTpIfKXX.d.mts +1756 -0
- package/dist/types-YTpIfKXX.d.mts.map +1 -0
- package/dist/types-iSBIMGiz.d.mts +227 -0
- package/dist/types-iSBIMGiz.d.mts.map +1 -0
- package/dist/upload-attempts-ChkgAfye.mjs +32 -0
- package/dist/upload-attempts-ChkgAfye.mjs.map +1 -0
- package/dist/url-CBR5ZBBQ.mjs +87 -0
- package/dist/url-CBR5ZBBQ.mjs.map +1 -0
- package/dist/url-pattern-DViEwhDu.mjs +41 -0
- package/dist/url-pattern-DViEwhDu.mjs.map +1 -0
- package/dist/urls-BCnpTM3T.mjs +79 -0
- package/dist/urls-BCnpTM3T.mjs.map +1 -0
- package/dist/user-Cy4kOmtD.mjs +184 -0
- package/dist/user-Cy4kOmtD.mjs.map +1 -0
- package/dist/utils-0R0olFJs.d.mts +374 -0
- package/dist/utils-0R0olFJs.d.mts.map +1 -0
- package/dist/utils-DIfKXQ5o.mjs +450 -0
- package/dist/utils-DIfKXQ5o.mjs.map +1 -0
- package/dist/validate-CYHbSQ-M.d.mts +472 -0
- package/dist/validate-CYHbSQ-M.d.mts.map +1 -0
- package/dist/validate-DBnEN6hU.mjs +524 -0
- package/dist/validate-DBnEN6hU.mjs.map +1 -0
- package/dist/validation-Becbh-zl.mjs +204 -0
- package/dist/validation-Becbh-zl.mjs.map +1 -0
- package/dist/version-BE4RahxC.mjs +7 -0
- package/dist/version-BE4RahxC.mjs.map +1 -0
- package/dist/version-C3C6o1xi.mjs +9 -0
- package/dist/version-C3C6o1xi.mjs.map +1 -0
- package/dist/version-PIyVra05.mjs +49 -0
- package/dist/version-PIyVra05.mjs.map +1 -0
- package/dist/video-Cgw31pIP.mjs +18 -0
- package/dist/video-Cgw31pIP.mjs.map +1 -0
- package/dist/virtual-modules-DAvm-Tct.mjs +565 -0
- package/dist/virtual-modules-DAvm-Tct.mjs.map +1 -0
- package/dist/widgets-HYhp_QtR.mjs +134 -0
- package/dist/widgets-HYhp_QtR.mjs.map +1 -0
- package/dist/wxr-CDtij4U5.mjs +1054 -0
- package/dist/wxr-CDtij4U5.mjs.map +1 -0
- package/dist/wxr-taxonomies-fliLjgKD.mjs +735 -0
- package/dist/wxr-taxonomies-fliLjgKD.mjs.map +1 -0
- package/dist/wxr-taxonomies-uZgPVgPe.d.mts +34 -0
- package/dist/wxr-taxonomies-uZgPVgPe.d.mts.map +1 -0
- package/package.json +11 -10
- package/src/after.ts +17 -10
- package/src/api/error.ts +0 -13
- package/src/api/handlers/manifest.ts +1 -0
- package/src/api/handlers/media-allowlist.ts +66 -7
- package/src/api/handlers/media-usage.ts +2 -1
- package/src/api/handlers/media.ts +4 -2
- package/src/api/handlers/seo.ts +19 -7
- package/src/api/openapi/document.ts +1 -1
- package/src/api/schemas/auth.ts +7 -0
- package/src/api/schemas/media-usage.ts +1 -0
- package/src/api/schemas/media.ts +13 -3
- package/src/api/schemas/schema.ts +14 -0
- package/src/api/search.ts +15 -0
- package/src/api/types.ts +3 -0
- package/src/astro/image-endpoint.ts +30 -4
- package/src/astro/integration/dev-scheduler-bridge.ts +1 -2
- package/src/astro/integration/index.ts +22 -1
- package/src/astro/integration/routes.ts +4 -0
- package/src/astro/integration/virtual-modules.ts +3 -6
- package/src/astro/integration/vite-config.ts +13 -6
- package/src/astro/middleware/auth.ts +18 -11
- package/src/astro/middleware/redirect.ts +41 -23
- package/src/astro/middleware/request-context.ts +4 -2
- package/src/astro/middleware/scoped-db.ts +4 -4
- package/src/astro/middleware.ts +288 -204
- package/src/astro/prefetch.ts +21 -17
- package/src/astro/public-plugin-api-routes.ts +4 -4
- package/src/astro/routes/PluginRegistry.tsx +2 -3
- package/src/astro/routes/api/admin/byline-fields/[slug]/usage.ts +4 -3
- package/src/astro/routes/api/admin/byline-fields/[slug].ts +10 -7
- package/src/astro/routes/api/admin/byline-fields/index.ts +7 -5
- package/src/astro/routes/api/admin/byline-fields/reorder.ts +4 -3
- package/src/astro/routes/api/admin/bylines/[id]/index.ts +4 -3
- package/src/astro/routes/api/admin/bylines/[id]/translations.ts +7 -5
- package/src/astro/routes/api/admin/comments/[id]/status.ts +4 -3
- package/src/astro/routes/api/admin/comments/[id].ts +7 -5
- package/src/astro/routes/api/admin/comments/bulk.ts +4 -3
- package/src/astro/routes/api/admin/comments/counts.ts +4 -3
- package/src/astro/routes/api/admin/comments/index.ts +4 -3
- package/src/astro/routes/api/admin/media-usage/activation.ts +7 -5
- package/src/astro/routes/api/admin/media-usage/collection-deletions/index.ts +4 -3
- package/src/astro/routes/api/admin/media-usage/collection-deletions/retry.ts +4 -3
- package/src/astro/routes/api/admin/media-usage/progress.ts +7 -5
- package/src/astro/routes/api/admin/media-usage/repair.ts +4 -3
- package/src/astro/routes/api/admin/media-usage/work/index.ts +4 -3
- package/src/astro/routes/api/admin/media-usage/work/retry.ts +4 -3
- package/src/astro/routes/api/admin/plugins/registry/artifact.ts +7 -4
- package/src/astro/routes/api/admin/transfer/approvals/[id]/approve.ts +4 -3
- package/src/astro/routes/api/admin/transfer/approvals/[id]/deny.ts +4 -3
- package/src/astro/routes/api/admin/transfer/approvals/index.ts +4 -3
- package/src/astro/routes/api/admin/transfer/capabilities.ts +4 -3
- package/src/astro/routes/api/admin/transfer/exports/[id]/advance.ts +4 -3
- package/src/astro/routes/api/admin/transfer/exports/[id]/archive.ts +4 -3
- package/src/astro/routes/api/admin/transfer/exports/[id]/files/[...path].ts +4 -3
- package/src/astro/routes/api/admin/transfer/exports/[id]/index.ts +4 -3
- package/src/astro/routes/api/admin/transfer/exports/[id]/manifest.ts +4 -3
- package/src/astro/routes/api/admin/transfer/exports/index.ts +7 -5
- package/src/astro/routes/api/admin/transfer/imports/[id]/abandon.ts +4 -3
- package/src/astro/routes/api/admin/transfer/imports/[id]/advance.ts +4 -3
- package/src/astro/routes/api/admin/transfer/imports/[id]/analyze.ts +4 -3
- package/src/astro/routes/api/admin/transfer/imports/[id]/cancel.ts +4 -3
- package/src/astro/routes/api/admin/transfer/imports/[id]/execute.ts +4 -3
- package/src/astro/routes/api/admin/transfer/imports/[id]/files/[...path].ts +4 -3
- package/src/astro/routes/api/admin/transfer/imports/[id]/index.ts +4 -3
- package/src/astro/routes/api/admin/transfer/imports/[id]/missing.ts +4 -3
- package/src/astro/routes/api/admin/transfer/imports/[id]/plan.ts +4 -3
- package/src/astro/routes/api/admin/transfer/imports/[id]/receipt.ts +4 -3
- package/src/astro/routes/api/admin/transfer/imports/index.ts +7 -5
- package/src/astro/routes/api/auth/invite/complete.ts +2 -1
- package/src/astro/routes/api/auth/magic-link/verify.ts +2 -1
- package/src/astro/routes/api/auth/oauth/[provider]/callback.ts +2 -1
- package/src/astro/routes/api/auth/passkey/verify.ts +2 -1
- package/src/astro/routes/api/auth/signup/complete.ts +2 -1
- package/src/astro/routes/api/auth/signup/register-options.ts +69 -0
- package/src/astro/routes/api/comments/[collection]/[contentId]/index.ts +7 -5
- package/src/astro/routes/api/comments/[collection]/[contentId]/reactions.ts +7 -5
- package/src/astro/routes/api/content/[collection]/[id]/discard-draft.ts +3 -13
- package/src/astro/routes/api/content/[collection]/[id]/duplicate.ts +3 -13
- package/src/astro/routes/api/content/[collection]/[id]/lock.ts +19 -19
- package/src/astro/routes/api/content/[collection]/[id]/publish.ts +3 -12
- package/src/astro/routes/api/content/[collection]/[id]/references/[relation]/children.ts +4 -3
- package/src/astro/routes/api/content/[collection]/[id]/references/[relation]/parents.ts +4 -3
- package/src/astro/routes/api/content/[collection]/[id]/terms/[taxonomy].ts +11 -19
- package/src/astro/routes/api/content/[collection]/[id]/unpublish.ts +3 -12
- package/src/astro/routes/api/content/[collection]/[id].ts +12 -34
- package/src/astro/routes/api/import/wordpress/execute.ts +1 -4
- package/src/astro/routes/api/import/wordpress/media.ts +3 -2
- package/src/astro/routes/api/import/wordpress-plugin/execute.ts +1 -4
- package/src/astro/routes/api/media/[id]/replace.ts +11 -2
- package/src/astro/routes/api/media/[id].ts +16 -3
- package/src/astro/routes/api/media/file/[...key].ts +11 -0
- package/src/astro/routes/api/media/providers/[providerId]/[itemId].ts +18 -2
- package/src/astro/routes/api/menus/[name]/items/[id].ts +6 -0
- package/src/astro/routes/api/menus/[name]/items.ts +4 -1
- package/src/astro/routes/api/menus/[name]/reorder.ts +4 -1
- package/src/astro/routes/api/menus/[name]/translations.ts +7 -5
- package/src/astro/routes/api/menus/[name].ts +10 -1
- package/src/astro/routes/api/menus/index.ts +7 -1
- package/src/astro/routes/api/redirects/404s/index.ts +10 -7
- package/src/astro/routes/api/redirects/404s/summary.ts +4 -3
- package/src/astro/routes/api/redirects/[id].ts +10 -7
- package/src/astro/routes/api/redirects/index.ts +7 -5
- package/src/astro/routes/api/relations/[id]/index.ts +10 -7
- package/src/astro/routes/api/relations/index.ts +7 -5
- package/src/astro/routes/api/schema/block-types/[slug]/index.ts +7 -5
- package/src/astro/routes/api/schema/block-types/[slug]/versions/[version]/activate.ts +4 -3
- package/src/astro/routes/api/schema/block-types/index.ts +7 -5
- package/src/astro/routes/api/schema/collections/[slug]/fields/[fieldSlug].ts +10 -7
- package/src/astro/routes/api/schema/collections/[slug]/fields/index.ts +7 -5
- package/src/astro/routes/api/schema/collections/[slug]/fields/reorder.ts +4 -3
- package/src/astro/routes/api/schema/collections/[slug]/index.ts +10 -7
- package/src/astro/routes/api/schema/collections/index.ts +7 -5
- package/src/astro/routes/api/schema/collections/reorder.ts +4 -3
- package/src/astro/routes/api/schema/index.ts +4 -3
- package/src/astro/routes/api/schema/orphans/[slug].ts +4 -3
- package/src/astro/routes/api/schema/orphans/index.ts +4 -3
- package/src/astro/routes/api/search/enable.ts +4 -0
- package/src/astro/routes/api/search/index.ts +5 -3
- package/src/astro/routes/api/search/rebuild.ts +4 -0
- package/src/astro/routes/api/search/stats.ts +4 -0
- package/src/astro/routes/api/search/suggest.ts +4 -0
- package/src/astro/routes/api/sections/[slug].ts +10 -7
- package/src/astro/routes/api/sections/index.ts +7 -5
- package/src/astro/routes/api/setup/admin-verify.ts +2 -1
- package/src/astro/routes/api/taxonomies/[name]/reorder.ts +4 -3
- package/src/astro/routes/api/taxonomies/[name]/terms/[slug]/translations.ts +7 -5
- package/src/astro/routes/api/taxonomies/[name]/terms/[slug].ts +10 -7
- package/src/astro/routes/api/taxonomies/[name]/terms/index.ts +7 -5
- package/src/astro/routes/api/taxonomies/[name]/translations.ts +4 -3
- package/src/astro/routes/api/taxonomies/[name].ts +10 -7
- package/src/astro/routes/api/taxonomies/bulk-tag.ts +4 -3
- package/src/astro/routes/api/taxonomies/index.ts +7 -5
- package/src/astro/routes/api/widget-areas/[name]/reorder.ts +3 -0
- package/src/astro/routes/api/widget-areas/[name]/widgets/[id].ts +6 -0
- package/src/astro/routes/api/widget-areas/[name]/widgets.ts +3 -0
- package/src/astro/routes/api/widget-areas/[name].ts +6 -0
- package/src/astro/routes/api/widget-areas/index.ts +6 -0
- package/src/astro/session-user.ts +8 -4
- package/src/astro/types.ts +77 -53
- package/src/auth/start-user-session.ts +16 -0
- package/src/cleanup.ts +24 -5
- package/src/client/index.ts +5 -3
- package/src/client/portable-text.ts +9 -1
- package/src/comments/public-submission.ts +1 -1
- package/src/components/Code.astro +6 -1
- package/src/components/Comments.astro +17 -6
- package/src/components/InlinePortableTextEditor.tsx +9 -1
- package/src/database/dialect-helpers.ts +18 -3
- package/src/database/migrations/098_user_last_login.ts +13 -0
- package/src/database/migrations/runner.ts +2 -0
- package/src/database/repositories/content.ts +37 -0
- package/src/database/repositories/media-folders.ts +2 -6
- package/src/database/repositories/media.ts +16 -7
- package/src/database/repositories/revision.ts +2 -2
- package/src/database/repositories/seo.ts +34 -10
- package/src/database/repositories/types.ts +2 -2
- package/src/database/repositories/user.ts +2 -2
- package/src/database/types.ts +1 -0
- package/src/db/node-sqlite-compat.ts +13 -0
- package/src/emdash-runtime.ts +775 -308
- package/src/mcp/server.ts +27 -34
- package/src/media/image-endpoint.ts +84 -0
- package/src/media/url.ts +16 -3
- package/src/media/usage/content-fields.ts +7 -5
- package/src/media/usage/content-lock.ts +71 -0
- package/src/media/usage/content-refresh.ts +3 -72
- package/src/media/usage/content-snapshots.ts +26 -0
- package/src/media/usage/extractor.ts +132 -32
- package/src/media/usage/types.ts +3 -1
- package/src/object-cache/index.ts +16 -12
- package/src/plugins/context.ts +22 -1
- package/src/plugins/http-route-dispatch.ts +16 -8
- package/src/plugins/lifecycle.ts +16 -4
- package/src/plugins/sandbox/proxy.ts +2 -2
- package/src/plugins/scheduler/node.ts +17 -11
- package/src/plugins/state.ts +236 -78
- package/src/query.ts +36 -5
- package/src/scheduled-publish.ts +54 -6
- package/src/schema/block-type-contract.ts +35 -4
- package/src/schema/block-type-registry.ts +1 -1
- package/src/schema/types.ts +3 -0
- package/src/search/fts-manager.ts +79 -19
- package/src/search/query.ts +212 -101
- package/src/search/types.ts +6 -1
- package/src/virtual-modules.d.ts +3 -10
- package/dist/action-token-CKphU6ur.mjs +0 -26
- package/dist/action-token-CKphU6ur.mjs.map +0 -1
- package/dist/activation-X5iMalte.mjs +0 -387
- package/dist/activation-X5iMalte.mjs.map +0 -1
- package/dist/adapters-DFsc9XjW.d.mts +0 -173
- package/dist/adapters-DFsc9XjW.d.mts.map +0 -1
- package/dist/after-B3AvMfBQ.mjs +0 -50
- package/dist/after-B3AvMfBQ.mjs.map +0 -1
- package/dist/allowed-origins-BFDNF-05.mjs +0 -116
- package/dist/allowed-origins-BFDNF-05.mjs.map +0 -1
- package/dist/api-tokens-D27OQ0oQ.mjs +0 -173
- package/dist/api-tokens-D27OQ0oQ.mjs.map +0 -1
- package/dist/apply-Culv7QJl.mjs +0 -1774
- package/dist/apply-Culv7QJl.mjs.map +0 -1
- package/dist/approvals-oLE5G5jw.mjs +0 -460
- package/dist/approvals-oLE5G5jw.mjs.map +0 -1
- package/dist/artifact-fetch-ByK_1pck.mjs +0 -659
- package/dist/artifact-fetch-ByK_1pck.mjs.map +0 -1
- package/dist/artifacts-BXKMIV2F.mjs +0 -323
- package/dist/artifacts-BXKMIV2F.mjs.map +0 -1
- package/dist/authoritative-records-Cd5BVXRs.mjs +0 -5183
- package/dist/authoritative-records-Cd5BVXRs.mjs.map +0 -1
- package/dist/authorize-B-4ogCQG.mjs +0 -74
- package/dist/authorize-B-4ogCQG.mjs.map +0 -1
- package/dist/backup-BQhg3MEK.mjs +0 -246
- package/dist/backup-BQhg3MEK.mjs.map +0 -1
- package/dist/block-types-BTzqdEZV.mjs +0 -132
- package/dist/block-types-BTzqdEZV.mjs.map +0 -1
- package/dist/block-values-DzZIh7WN.mjs +0 -215
- package/dist/block-values-DzZIh7WN.mjs.map +0 -1
- package/dist/byline--sweE_MZ.mjs +0 -930
- package/dist/byline--sweE_MZ.mjs.map +0 -1
- package/dist/byline-fields-Czdq4Yad.mjs +0 -123
- package/dist/byline-fields-Czdq4Yad.mjs.map +0 -1
- package/dist/byline-registry-Cr7kjrxM.mjs +0 -406
- package/dist/byline-registry-Cr7kjrxM.mjs.map +0 -1
- package/dist/bylines-DnuH3H8z.mjs +0 -234
- package/dist/bylines-DnuH3H8z.mjs.map +0 -1
- package/dist/bylines-txlwgzIK.mjs +0 -150
- package/dist/bylines-txlwgzIK.mjs.map +0 -1
- package/dist/cache-BjnpmIpb.mjs +0 -151
- package/dist/cache-BjnpmIpb.mjs.map +0 -1
- package/dist/canonical-Cb-rJGRU.mjs +0 -174
- package/dist/canonical-Cb-rJGRU.mjs.map +0 -1
- package/dist/capture-triggers-BZmIEdX2.mjs +0 -362
- package/dist/capture-triggers-BZmIEdX2.mjs.map +0 -1
- package/dist/checksum-CH9TyM-N.mjs +0 -162
- package/dist/checksum-CH9TyM-N.mjs.map +0 -1
- package/dist/chunks-DRnEstVb.mjs +0 -25
- package/dist/chunks-DRnEstVb.mjs.map +0 -1
- package/dist/collection-slugs-cache-CYMrqHZ6.mjs +0 -91
- package/dist/collection-slugs-cache-CYMrqHZ6.mjs.map +0 -1
- package/dist/comment-BGeXmJ8F.mjs +0 -335
- package/dist/comment-BGeXmJ8F.mjs.map +0 -1
- package/dist/comment-reaction-ty-JEDYR.mjs +0 -85
- package/dist/comment-reaction-ty-JEDYR.mjs.map +0 -1
- package/dist/comments-ByrrLvZL.mjs +0 -99
- package/dist/comments-ByrrLvZL.mjs.map +0 -1
- package/dist/comments-DqhARoef.mjs +0 -195
- package/dist/comments-DqhARoef.mjs.map +0 -1
- package/dist/components-u2HE5Mu9.mjs +0 -112
- package/dist/components-u2HE5Mu9.mjs.map +0 -1
- package/dist/config-B4F2ttAZ.d.mts +0 -7230
- package/dist/config-B4F2ttAZ.d.mts.map +0 -1
- package/dist/config-BnrtMvHW.mjs +0 -228
- package/dist/config-BnrtMvHW.mjs.map +0 -1
- package/dist/config-DEse9gaE.d.mts +0 -41
- package/dist/config-DEse9gaE.d.mts.map +0 -1
- package/dist/connection-BaIVuaDX.mjs +0 -36
- package/dist/connection-BaIVuaDX.mjs.map +0 -1
- package/dist/content-Dxztag5t.mjs +0 -2270
- package/dist/content-Dxztag5t.mjs.map +0 -1
- package/dist/content-list-query-yYbBU-dB.d.mts +0 -26
- package/dist/content-list-query-yYbBU-dB.d.mts.map +0 -1
- package/dist/content-repair-2PdahlgZ.mjs +0 -443
- package/dist/content-repair-2PdahlgZ.mjs.map +0 -1
- package/dist/content-save-KMll0S7E.mjs +0 -202
- package/dist/content-save-KMll0S7E.mjs.map +0 -1
- package/dist/context-C3OZjexd.mjs +0 -2225
- package/dist/context-C3OZjexd.mjs.map +0 -1
- package/dist/credits-C8uXoWfN.mjs +0 -110
- package/dist/credits-C8uXoWfN.mjs.map +0 -1
- package/dist/cron-CrjBjDuy.mjs +0 -310
- package/dist/cron-CrjBjDuy.mjs.map +0 -1
- package/dist/default-DPoN3H5H.mjs +0 -81
- package/dist/default-DPoN3H5H.mjs.map +0 -1
- package/dist/deferred-tasks-uSx5qCFn.d.mts +0 -10
- package/dist/deferred-tasks-uSx5qCFn.d.mts.map +0 -1
- package/dist/device-flow-hT8lKWXq.mjs +0 -519
- package/dist/device-flow-hT8lKWXq.mjs.map +0 -1
- package/dist/dialect-helpers-DqUMP9fJ.mjs +0 -350
- package/dist/dialect-helpers-DqUMP9fJ.mjs.map +0 -1
- package/dist/digest-xYRiuW_E.mjs +0 -194
- package/dist/digest-xYRiuW_E.mjs.map +0 -1
- package/dist/direct-executor-CZ2SH1bq.mjs +0 -117
- package/dist/direct-executor-CZ2SH1bq.mjs.map +0 -1
- package/dist/email-console-CochjAlh.mjs +0 -50
- package/dist/email-console-CochjAlh.mjs.map +0 -1
- package/dist/email-locale-BoxaIPG8.mjs +0 -25
- package/dist/email-locale-BoxaIPG8.mjs.map +0 -1
- package/dist/email-smtp-BnHR_Ccx.mjs +0 -643
- package/dist/email-smtp-BnHR_Ccx.mjs.map +0 -1
- package/dist/emdash-runtime-CXsdCQnM.mjs +0 -5262
- package/dist/emdash-runtime-CXsdCQnM.mjs.map +0 -1
- package/dist/enrich-BReo_COC.mjs +0 -203
- package/dist/enrich-BReo_COC.mjs.map +0 -1
- package/dist/entry-lock-BfnhlRhC.mjs +0 -207
- package/dist/entry-lock-BfnhlRhC.mjs.map +0 -1
- package/dist/entry-lock-DsVhZcJN.mjs +0 -1228
- package/dist/entry-lock-DsVhZcJN.mjs.map +0 -1
- package/dist/entry-locks-D_kjygT1.mjs +0 -173
- package/dist/entry-locks-D_kjygT1.mjs.map +0 -1
- package/dist/env-types-CXI9uaMU.mjs +0 -38
- package/dist/env-types-CXI9uaMU.mjs.map +0 -1
- package/dist/error-DcDNU7hZ.mjs +0 -92
- package/dist/error-DcDNU7hZ.mjs.map +0 -1
- package/dist/errors-CJ6711al.mjs +0 -120
- package/dist/errors-CJ6711al.mjs.map +0 -1
- package/dist/errors-CwYHYcWF.mjs +0 -502
- package/dist/errors-CwYHYcWF.mjs.map +0 -1
- package/dist/fence-C3MLClBo.mjs +0 -162
- package/dist/fence-C3MLClBo.mjs.map +0 -1
- package/dist/field-defs-cache-Cpk0eFsQ.mjs +0 -79
- package/dist/field-defs-cache-Cpk0eFsQ.mjs.map +0 -1
- package/dist/field-map-6o9hPcRl.mjs +0 -84
- package/dist/field-map-6o9hPcRl.mjs.map +0 -1
- package/dist/fts-manager-B3iLXCGz.mjs +0 -500
- package/dist/fts-manager-B3iLXCGz.mjs.map +0 -1
- package/dist/gc-D24C-KP7.mjs +0 -62
- package/dist/gc-D24C-KP7.mjs.map +0 -1
- package/dist/hook-result-BU5rI-6M.d.mts +0 -31
- package/dist/hook-result-BU5rI-6M.d.mts.map +0 -1
- package/dist/hook-result-CO4E3zDv.mjs +0 -3854
- package/dist/hook-result-CO4E3zDv.mjs.map +0 -1
- package/dist/hreflang-Bzvlo9Ci.mjs +0 -105
- package/dist/hreflang-Bzvlo9Ci.mjs.map +0 -1
- package/dist/hreflang-Ds0WbBOu.d.mts +0 -51
- package/dist/hreflang-Ds0WbBOu.d.mts.map +0 -1
- package/dist/http-route-dispatch-BsjkWBZF.mjs +0 -348
- package/dist/http-route-dispatch-BsjkWBZF.mjs.map +0 -1
- package/dist/identity-CahxkBZC.mjs +0 -35
- package/dist/identity-CahxkBZC.mjs.map +0 -1
- package/dist/index-BauU0yTw.d.mts +0 -261
- package/dist/index-BauU0yTw.d.mts.map +0 -1
- package/dist/install-finalization-CIl610wT.mjs +0 -58
- package/dist/install-finalization-CIl610wT.mjs.map +0 -1
- package/dist/json-recordset-CrS6ZqMk.mjs +0 -12
- package/dist/json-recordset-CrS6ZqMk.mjs.map +0 -1
- package/dist/json-schema-CBcJlGcY.mjs +0 -15
- package/dist/json-schema-CBcJlGcY.mjs.map +0 -1
- package/dist/keys-DJ62Wt5b.mjs +0 -61
- package/dist/keys-DJ62Wt5b.mjs.map +0 -1
- package/dist/kinds-D7_f3Qu3.mjs +0 -974
- package/dist/kinds-D7_f3Qu3.mjs.map +0 -1
- package/dist/lifecycle-DPCkpFHV.mjs +0 -49
- package/dist/lifecycle-DPCkpFHV.mjs.map +0 -1
- package/dist/limits-Bv6mXNM-.mjs +0 -44
- package/dist/limits-Bv6mXNM-.mjs.map +0 -1
- package/dist/load-r9P0fsRH.mjs +0 -36
- package/dist/load-r9P0fsRH.mjs.map +0 -1
- package/dist/loader-CSEfTKzr.mjs +0 -1537
- package/dist/loader-CSEfTKzr.mjs.map +0 -1
- package/dist/loops-BxzrcxPO.mjs +0 -217
- package/dist/loops-BxzrcxPO.mjs.map +0 -1
- package/dist/manifest-builder-BLWqITXR.mjs +0 -196
- package/dist/manifest-builder-BLWqITXR.mjs.map +0 -1
- package/dist/manifest-schema-BRpk5V7x.mjs +0 -497
- package/dist/manifest-schema-BRpk5V7x.mjs.map +0 -1
- package/dist/marketplace-5YFgYPVr.mjs +0 -257
- package/dist/marketplace-5YFgYPVr.mjs.map +0 -1
- package/dist/marketplace-zPVE4UY5.mjs +0 -965
- package/dist/marketplace-zPVE4UY5.mjs.map +0 -1
- package/dist/media-C5fg1Xte.d.mts +0 -203
- package/dist/media-C5fg1Xte.d.mts.map +0 -1
- package/dist/media-CPETKjop.mjs +0 -424
- package/dist/media-CPETKjop.mjs.map +0 -1
- package/dist/media-Cid3xIHk.mjs +0 -294
- package/dist/media-Cid3xIHk.mjs.map +0 -1
- package/dist/media-DJaAAYI2.mjs +0 -2805
- package/dist/media-DJaAAYI2.mjs.map +0 -1
- package/dist/media-allowlist-B7JwNf-U.mjs +0 -75
- package/dist/media-allowlist-B7JwNf-U.mjs.map +0 -1
- package/dist/media-folders-BI7B7XUM.mjs +0 -210
- package/dist/media-folders-BI7B7XUM.mjs.map +0 -1
- package/dist/media-url-xWuPVfqO.mjs +0 -43
- package/dist/media-url-xWuPVfqO.mjs.map +0 -1
- package/dist/media-usage-SwtWPxy4.mjs +0 -282
- package/dist/media-usage-SwtWPxy4.mjs.map +0 -1
- package/dist/media-usage-activation-BTa1H4wE.mjs +0 -78
- package/dist/media-usage-activation-BTa1H4wE.mjs.map +0 -1
- package/dist/media-usage-work-BxHWfbKq.mjs +0 -1036
- package/dist/media-usage-work-BxHWfbKq.mjs.map +0 -1
- package/dist/media-usage-work-DYenZS8y.mjs +0 -151
- package/dist/media-usage-work-DYenZS8y.mjs.map +0 -1
- package/dist/menu-FtSf33fF.mjs +0 -420
- package/dist/menu-FtSf33fF.mjs.map +0 -1
- package/dist/menus--MSfZ5Eu.mjs +0 -433
- package/dist/menus--MSfZ5Eu.mjs.map +0 -1
- package/dist/menus-C8h6Jtpu.mjs +0 -92
- package/dist/menus-C8h6Jtpu.mjs.map +0 -1
- package/dist/menus-CpFAi_LK.mjs +0 -434
- package/dist/menus-CpFAi_LK.mjs.map +0 -1
- package/dist/mime-Dx6aHTsR.mjs +0 -82
- package/dist/mime-Dx6aHTsR.mjs.map +0 -1
- package/dist/node-sqlite-compat-DvYkqx7Q.mjs +0 -63
- package/dist/node-sqlite-compat-DvYkqx7Q.mjs.map +0 -1
- package/dist/oauth-authorization-CBxtOboy.mjs +0 -287
- package/dist/oauth-authorization-CBxtOboy.mjs.map +0 -1
- package/dist/oauth-clients-HLGHmHqI.mjs +0 -266
- package/dist/oauth-clients-HLGHmHqI.mjs.map +0 -1
- package/dist/oauth-state-store-B4YAveSb.mjs +0 -80
- package/dist/oauth-state-store-B4YAveSb.mjs.map +0 -1
- package/dist/oauth-user-lookup-CTYMaKlq.mjs +0 -26
- package/dist/oauth-user-lookup-CTYMaKlq.mjs.map +0 -1
- package/dist/object-cache-DeATK4vw.mjs +0 -805
- package/dist/object-cache-DeATK4vw.mjs.map +0 -1
- package/dist/options-BJZMHnpx.d.mts +0 -81
- package/dist/options-BJZMHnpx.d.mts.map +0 -1
- package/dist/parse-B1E5cdyD.mjs +0 -82
- package/dist/parse-B1E5cdyD.mjs.map +0 -1
- package/dist/parse-Clt6wmpy.d.mts +0 -178
- package/dist/parse-Clt6wmpy.d.mts.map +0 -1
- package/dist/parts-CMwESQ6e.mjs +0 -68
- package/dist/parts-CMwESQ6e.mjs.map +0 -1
- package/dist/passkey-config-DiVZI-cx.mjs +0 -46
- package/dist/passkey-config-DiVZI-cx.mjs.map +0 -1
- package/dist/paths-NrYImb_h.mjs +0 -77
- package/dist/paths-NrYImb_h.mjs.map +0 -1
- package/dist/placeholder-B0vI-EQ9.d.mts +0 -316
- package/dist/placeholder-B0vI-EQ9.d.mts.map +0 -1
- package/dist/plan-CSb3BdFS.mjs +0 -135
- package/dist/plan-CSb3BdFS.mjs.map +0 -1
- package/dist/plugin-settings-HdYYRFi3.mjs +0 -162
- package/dist/plugin-settings-HdYYRFi3.mjs.map +0 -1
- package/dist/plugins-Bc70Xs37.mjs +0 -261
- package/dist/plugins-Bc70Xs37.mjs.map +0 -1
- package/dist/policy-C-ngDrxa.mjs +0 -56
- package/dist/policy-C-ngDrxa.mjs.map +0 -1
- package/dist/portable-text-T17rOqF7.mjs +0 -454
- package/dist/portable-text-T17rOqF7.mjs.map +0 -1
- package/dist/protocol-CmSX4cXv.d.mts +0 -65
- package/dist/protocol-CmSX4cXv.d.mts.map +0 -1
- package/dist/public-plugin-api-routes-_xsWTlwE.mjs +0 -316
- package/dist/public-plugin-api-routes-_xsWTlwE.mjs.map +0 -1
- package/dist/public-submission-ui3pFYtq.mjs +0 -253
- package/dist/public-submission-ui3pFYtq.mjs.map +0 -1
- package/dist/public-url-DMRZPAiW.mjs +0 -123
- package/dist/public-url-DMRZPAiW.mjs.map +0 -1
- package/dist/query-C1K9PzUc.mjs +0 -41
- package/dist/query-C1K9PzUc.mjs.map +0 -1
- package/dist/query-DdmHrvie.mjs +0 -1201
- package/dist/query-DdmHrvie.mjs.map +0 -1
- package/dist/range-BaF0521t.mjs +0 -51
- package/dist/range-BaF0521t.mjs.map +0 -1
- package/dist/rate-limit-6MngP0_m.mjs +0 -127
- package/dist/rate-limit-6MngP0_m.mjs.map +0 -1
- package/dist/receipt-BFm5eaN7.mjs +0 -43
- package/dist/receipt-BFm5eaN7.mjs.map +0 -1
- package/dist/redirect-ChcHI1KC.mjs +0 -466
- package/dist/redirect-ChcHI1KC.mjs.map +0 -1
- package/dist/redirect-EpidEf_5.mjs +0 -19
- package/dist/redirect-EpidEf_5.mjs.map +0 -1
- package/dist/redirect-paths-B9cXh9Wv.mjs +0 -36
- package/dist/redirect-paths-B9cXh9Wv.mjs.map +0 -1
- package/dist/redirects-D3zHoxhn.mjs +0 -446
- package/dist/redirects-D3zHoxhn.mjs.map +0 -1
- package/dist/redirects-dFPJ0HrD.mjs +0 -148
- package/dist/redirects-dFPJ0HrD.mjs.map +0 -1
- package/dist/registry-CDzYrAFY.mjs +0 -6074
- package/dist/registry-CDzYrAFY.mjs.map +0 -1
- package/dist/registry-Cf9vkVxW.mjs +0 -1449
- package/dist/registry-Cf9vkVxW.mjs.map +0 -1
- package/dist/registry-mZi_lxtT.mjs +0 -755
- package/dist/registry-mZi_lxtT.mjs.map +0 -1
- package/dist/relations-Eyop_U4o.mjs +0 -798
- package/dist/relations-Eyop_U4o.mjs.map +0 -1
- package/dist/request-meta-DsSkOdO0.mjs +0 -141
- package/dist/request-meta-DsSkOdO0.mjs.map +0 -1
- package/dist/resolve-s7ANHtFx.mjs +0 -92
- package/dist/resolve-s7ANHtFx.mjs.map +0 -1
- package/dist/revision-D7EedSdU.mjs +0 -503
- package/dist/revision-D7EedSdU.mjs.map +0 -1
- package/dist/rooms-CSNLTJsG.mjs +0 -331
- package/dist/rooms-CSNLTJsG.mjs.map +0 -1
- package/dist/rooms-CVsLla78.mjs +0 -169
- package/dist/rooms-CVsLla78.mjs.map +0 -1
- package/dist/rooms-CyXG83RZ.d.mts +0 -4653
- package/dist/rooms-CyXG83RZ.d.mts.map +0 -1
- package/dist/route-cache-CBpXPq-N.mjs +0 -30
- package/dist/route-cache-CBpXPq-N.mjs.map +0 -1
- package/dist/route-wire-DKSTaEz_.mjs +0 -197
- package/dist/route-wire-DKSTaEz_.mjs.map +0 -1
- package/dist/routes-QcHRiebw.mjs +0 -272
- package/dist/routes-QcHRiebw.mjs.map +0 -1
- package/dist/runner-4BfB04Rg.mjs +0 -6950
- package/dist/runner-4BfB04Rg.mjs.map +0 -1
- package/dist/runner-CAHS_KER.d.mts +0 -79
- package/dist/runner-CAHS_KER.d.mts.map +0 -1
- package/dist/runtime-holder-0g6pqbzx.mjs +0 -36
- package/dist/runtime-holder-0g6pqbzx.mjs.map +0 -1
- package/dist/scheduler-health-C5HEg2Yl.mjs +0 -31
- package/dist/scheduler-health-C5HEg2Yl.mjs.map +0 -1
- package/dist/schema-DS7ooMmp.mjs +0 -13
- package/dist/schema-DS7ooMmp.mjs.map +0 -1
- package/dist/schema-Mjtj7n1t.mjs +0 -815
- package/dist/schema-Mjtj7n1t.mjs.map +0 -1
- package/dist/scopes-BaR6WUyq.mjs +0 -34
- package/dist/scopes-BaR6WUyq.mjs.map +0 -1
- package/dist/search-B9RFgr0N.mjs +0 -450
- package/dist/search-B9RFgr0N.mjs.map +0 -1
- package/dist/secrets-C4UrjPiG.mjs +0 -369
- package/dist/secrets-C4UrjPiG.mjs.map +0 -1
- package/dist/sections-Bfa0oF8Q.mjs +0 -129
- package/dist/sections-Bfa0oF8Q.mjs.map +0 -1
- package/dist/sections-Bn2C6we7.mjs +0 -222
- package/dist/sections-Bn2C6we7.mjs.map +0 -1
- package/dist/seo-DPW6k5_-.mjs +0 -188
- package/dist/seo-DPW6k5_-.mjs.map +0 -1
- package/dist/service-B4mHMku9.mjs +0 -150
- package/dist/service-B4mHMku9.mjs.map +0 -1
- package/dist/session-user-CF2jNfj7.mjs +0 -61
- package/dist/session-user-CF2jNfj7.mjs.map +0 -1
- package/dist/settings-4r88LLIM.mjs +0 -66
- package/dist/settings-4r88LLIM.mjs.map +0 -1
- package/dist/settings-BB2xxz3Y.mjs +0 -74
- package/dist/settings-BB2xxz3Y.mjs.map +0 -1
- package/dist/settings-BTkGl-bX.mjs +0 -413
- package/dist/settings-BTkGl-bX.mjs.map +0 -1
- package/dist/settings-y8Jx8b7g.mjs +0 -157
- package/dist/settings-y8Jx8b7g.mjs.map +0 -1
- package/dist/setup-complete-BGRiC59t.mjs +0 -65
- package/dist/setup-complete-BGRiC59t.mjs.map +0 -1
- package/dist/setup-nonce-D43FsOgZ.mjs +0 -25
- package/dist/setup-nonce-D43FsOgZ.mjs.map +0 -1
- package/dist/site-domain-CFX7g6ik.mjs +0 -131
- package/dist/site-domain-CFX7g6ik.mjs.map +0 -1
- package/dist/site-settings-C0D9fv7e.mjs +0 -50
- package/dist/site-settings-C0D9fv7e.mjs.map +0 -1
- package/dist/site-title-C0JVN6en.mjs +0 -14
- package/dist/site-title-C0JVN6en.mjs.map +0 -1
- package/dist/site-url-DzVnHJ8j.mjs +0 -45
- package/dist/site-url-DzVnHJ8j.mjs.map +0 -1
- package/dist/sitemap-name-Ja_Cvwx9.mjs +0 -26
- package/dist/sitemap-name-Ja_Cvwx9.mjs.map +0 -1
- package/dist/slug-CO2jtUda.mjs +0 -16
- package/dist/slug-CO2jtUda.mjs.map +0 -1
- package/dist/snapshot-C9OWUtFr.mjs +0 -466
- package/dist/snapshot-C9OWUtFr.mjs.map +0 -1
- package/dist/snapshot-CR5tan8p.mjs +0 -184
- package/dist/snapshot-CR5tan8p.mjs.map +0 -1
- package/dist/ssrf-Lj1KZxYt.mjs +0 -406
- package/dist/ssrf-Lj1KZxYt.mjs.map +0 -1
- package/dist/stage-ChbGIslu.mjs +0 -662
- package/dist/stage-ChbGIslu.mjs.map +0 -1
- package/dist/staged-BN8pRZwX.mjs +0 -686
- package/dist/staged-BN8pRZwX.mjs.map +0 -1
- package/dist/state-DtcE0eN3.mjs +0 -178
- package/dist/state-DtcE0eN3.mjs.map +0 -1
- package/dist/storage-query-BDUX3Cef.d.mts +0 -1608
- package/dist/storage-query-BDUX3Cef.d.mts.map +0 -1
- package/dist/tar-CAvEHFbE.mjs +0 -449
- package/dist/tar-CAvEHFbE.mjs.map +0 -1
- package/dist/target-BM_6fT9m.mjs +0 -27
- package/dist/target-BM_6fT9m.mjs.map +0 -1
- package/dist/taxonomies-BMuFLd53.mjs +0 -722
- package/dist/taxonomies-BMuFLd53.mjs.map +0 -1
- package/dist/taxonomies-ClkYcmcH.mjs +0 -937
- package/dist/taxonomies-ClkYcmcH.mjs.map +0 -1
- package/dist/taxonomy-s1GcBCRo.mjs +0 -593
- package/dist/taxonomy-s1GcBCRo.mjs.map +0 -1
- package/dist/tokens-Cpm6FIKJ.mjs +0 -171
- package/dist/tokens-Cpm6FIKJ.mjs.map +0 -1
- package/dist/transaction-SKrr6u84.mjs +0 -44
- package/dist/transaction-SKrr6u84.mjs.map +0 -1
- package/dist/transfer-B3CsI5MG.mjs +0 -8963
- package/dist/transfer-B3CsI5MG.mjs.map +0 -1
- package/dist/transfer-DqUiK3ca.mjs +0 -166
- package/dist/transfer-DqUiK3ca.mjs.map +0 -1
- package/dist/transfer-download-CWPfhL91.mjs +0 -33
- package/dist/transfer-download-CWPfhL91.mjs.map +0 -1
- package/dist/transformations-ClH4dJeM.mjs +0 -196
- package/dist/transformations-ClH4dJeM.mjs.map +0 -1
- package/dist/transport-C6Ps8ejN.mjs +0 -144
- package/dist/transport-C6Ps8ejN.mjs.map +0 -1
- package/dist/transport-D4hWYmO_.d.mts +0 -42
- package/dist/transport-D4hWYmO_.d.mts.map +0 -1
- package/dist/trusted-proxy-CWX1sqgb.mjs +0 -51
- package/dist/trusted-proxy-CWX1sqgb.mjs.map +0 -1
- package/dist/turnstile-B6zM50Mh.mjs +0 -58
- package/dist/turnstile-B6zM50Mh.mjs.map +0 -1
- package/dist/types-Ba3bWb9D.mjs +0 -37
- package/dist/types-Ba3bWb9D.mjs.map +0 -1
- package/dist/types-C0M6z2A4.mjs +0 -16
- package/dist/types-C0M6z2A4.mjs.map +0 -1
- package/dist/types-CG1dR_Cm.d.mts +0 -934
- package/dist/types-CG1dR_Cm.d.mts.map +0 -1
- package/dist/types-CImd8MBY.d.mts +0 -1756
- package/dist/types-CImd8MBY.d.mts.map +0 -1
- package/dist/types-CML-oGr6.d.mts +0 -293
- package/dist/types-CML-oGr6.d.mts.map +0 -1
- package/dist/types-CZO9f_vJ.d.mts +0 -381
- package/dist/types-CZO9f_vJ.d.mts.map +0 -1
- package/dist/types-DLKviL1s.d.mts +0 -93
- package/dist/types-DLKviL1s.d.mts.map +0 -1
- package/dist/types-Df0R58Wu.mjs +0 -77
- package/dist/types-Df0R58Wu.mjs.map +0 -1
- package/dist/types-DwNwhyWP.d.mts +0 -227
- package/dist/types-DwNwhyWP.d.mts.map +0 -1
- package/dist/types-DwZgl0Zn.d.mts +0 -366
- package/dist/types-DwZgl0Zn.d.mts.map +0 -1
- package/dist/types-Dyb_OuSw.d.mts +0 -125
- package/dist/types-Dyb_OuSw.d.mts.map +0 -1
- package/dist/types-iOnPkHRk.d.mts +0 -209
- package/dist/types-iOnPkHRk.d.mts.map +0 -1
- package/dist/upload-attempts-5Ot7-vsw.mjs +0 -32
- package/dist/upload-attempts-5Ot7-vsw.mjs.map +0 -1
- package/dist/url-ZCjpMO-q.mjs +0 -74
- package/dist/url-ZCjpMO-q.mjs.map +0 -1
- package/dist/url-pattern-BQT-sGmD.mjs +0 -41
- package/dist/url-pattern-BQT-sGmD.mjs.map +0 -1
- package/dist/urls-Cq_hUk4P.mjs +0 -79
- package/dist/urls-Cq_hUk4P.mjs.map +0 -1
- package/dist/user-C4km6fox.mjs +0 -184
- package/dist/user-C4km6fox.mjs.map +0 -1
- package/dist/utils-Cpo0_V09.d.mts +0 -374
- package/dist/utils-Cpo0_V09.d.mts.map +0 -1
- package/dist/utils-DMDmdhU3.mjs +0 -450
- package/dist/utils-DMDmdhU3.mjs.map +0 -1
- package/dist/validate-BNupiQtz.mjs +0 -524
- package/dist/validate-BNupiQtz.mjs.map +0 -1
- package/dist/validate-DBfkJa3O.d.mts +0 -472
- package/dist/validate-DBfkJa3O.d.mts.map +0 -1
- package/dist/validation-W_efZFgP.mjs +0 -204
- package/dist/validation-W_efZFgP.mjs.map +0 -1
- package/dist/version-C61rw8-y.mjs +0 -9
- package/dist/version-C61rw8-y.mjs.map +0 -1
- package/dist/version-DhGLeLRo.mjs +0 -7
- package/dist/version-DhGLeLRo.mjs.map +0 -1
- package/dist/version-eqLBDtcz.mjs +0 -49
- package/dist/version-eqLBDtcz.mjs.map +0 -1
- package/dist/video-My3h7vwE.mjs +0 -18
- package/dist/video-My3h7vwE.mjs.map +0 -1
- package/dist/virtual-modules-BZKqvjRC.mjs +0 -568
- package/dist/virtual-modules-BZKqvjRC.mjs.map +0 -1
- package/dist/widgets-DAdni19y.mjs +0 -134
- package/dist/widgets-DAdni19y.mjs.map +0 -1
- package/dist/wxr-DDPJOgkM.mjs +0 -1054
- package/dist/wxr-DDPJOgkM.mjs.map +0 -1
- package/dist/wxr-taxonomies-B0U2fJgs.mjs +0 -735
- package/dist/wxr-taxonomies-B0U2fJgs.mjs.map +0 -1
- package/dist/wxr-taxonomies-CyP2k4-Q.d.mts +0 -34
- package/dist/wxr-taxonomies-CyP2k4-Q.d.mts.map +0 -1
|
@@ -1,1449 +0,0 @@
|
|
|
1
|
-
import { t as OptionsRepository } from "./options-CMocxAku.mjs";
|
|
2
|
-
import { a as parseDurationSeconds, l as validateAggregatorUrl, n as coerceRegistryConfig, o as releaseExemptFromMinimumAge, t as canonicalCapabilitiesForDriftCheck } from "./config-BnrtMvHW.mjs";
|
|
3
|
-
import { t as PluginStateRepository } from "./state-DtcE0eN3.mjs";
|
|
4
|
-
import { a as pluginManifestSchema$1, o as reconcileManifestAccess$1 } from "./manifest-schema-BRpk5V7x.mjs";
|
|
5
|
-
import { o as withUnavailableReason } from "./types-Df0R58Wu.mjs";
|
|
6
|
-
import { _ as syncDeclaredStorageIndexes, f as loadBundleFromR2, g as removeAllPluginIndexes, m as storeBundleInR2, n as diffCapabilities, r as diffRouteVisibility, t as deleteBundleFromR2 } from "./marketplace-zPVE4UY5.mjs";
|
|
7
|
-
import { t as EmDashStorageError } from "./types-C0M6z2A4.mjs";
|
|
8
|
-
import { i as verificationError, r as verifyMultihash, t as computeArtifactDigestCandidates } from "./checksum-CH9TyM-N.mjs";
|
|
9
|
-
import { n as fetchReleaseArtifact, t as fetchRegistryArtifactUrl } from "./artifact-fetch-ByK_1pck.mjs";
|
|
10
|
-
import { i as resolveAndValidateExternalUrlTarget } from "./ssrf-Lj1KZxYt.mjs";
|
|
11
|
-
import { r as verifyAuthoritativePackageRelease, t as readAuthoritativePackageRelease } from "./authoritative-records-Cd5BVXRs.mjs";
|
|
12
|
-
import { canonicalizeDeclaredAccess, pluginManifestSchema, reconcileManifestAccess } from "@emdash-cms/plugin-types";
|
|
13
|
-
import { createGzipDecoder } from "modern-tar";
|
|
14
|
-
import { ClientResponseError, ClientValidationError } from "@atcute/client";
|
|
15
|
-
import { checkEnvCompatibility, compareVersions, findSkippedEnvConstraints } from "@emdash-cms/registry-client/env";
|
|
16
|
-
import { isProvenFirstRelease } from "@emdash-cms/registry-client/listing-policy";
|
|
17
|
-
import { evaluateRegistryReleaseWithdrawal } from "@emdash-cms/registry-client/withdrawal";
|
|
18
|
-
import { NSID } from "@emdash-cms/registry-lexicons";
|
|
19
|
-
|
|
20
|
-
//#region ../registry-verification/dist/bundle.js
|
|
21
|
-
/** Maximum accepted gzip payload size. */
|
|
22
|
-
const MAX_BUNDLE_COMPRESSED_BYTES = 384 * 1024;
|
|
23
|
-
/** Maximum aggregate size of regular-file contents. */
|
|
24
|
-
const MAX_BUNDLE_SIZE = 256 * 1024;
|
|
25
|
-
/** Maximum size of one regular file. */
|
|
26
|
-
const MAX_BUNDLE_FILE_BYTES = 128 * 1024;
|
|
27
|
-
/** Maximum number of regular files. */
|
|
28
|
-
const MAX_BUNDLE_FILE_COUNT = 20;
|
|
29
|
-
/** Maximum total tar entries, including harmless directory entries. */
|
|
30
|
-
const MAX_BUNDLE_TAR_ENTRY_COUNT = 32;
|
|
31
|
-
/**
|
|
32
|
-
* Maximum tar stream size after decompression. This includes USTAR headers,
|
|
33
|
-
* file padding, and the end marker in addition to the regular-file contents.
|
|
34
|
-
*/
|
|
35
|
-
const MAX_BUNDLE_DECOMPRESSED_BYTES = MAX_BUNDLE_SIZE + MAX_BUNDLE_TAR_ENTRY_COUNT * 512 + MAX_BUNDLE_FILE_COUNT * 511 + 2 * 512;
|
|
36
|
-
const TAR_BLOCK_BYTES = 512;
|
|
37
|
-
const TAR_END_BYTES = TAR_BLOCK_BYTES * 2;
|
|
38
|
-
const OCTAL_PATTERN = /^[0-7]+$/;
|
|
39
|
-
const WINDOWS_DRIVE_PATTERN = /^[a-zA-Z]:/;
|
|
40
|
-
const decoder = new TextDecoder("utf-8", {
|
|
41
|
-
fatal: true,
|
|
42
|
-
ignoreBOM: false
|
|
43
|
-
});
|
|
44
|
-
async function validatePluginBundle(compressed, options = {}) {
|
|
45
|
-
if (compressed.byteLength > MAX_BUNDLE_COMPRESSED_BYTES) return verificationError("BUNDLE_COMPRESSED_SIZE_EXCEEDED", "The compressed plugin bundle exceeds the size limit.");
|
|
46
|
-
const decompressed = await decompressBundle(compressed);
|
|
47
|
-
if (!decompressed.success) return decompressed;
|
|
48
|
-
const files = parseTar(decompressed.value);
|
|
49
|
-
if (!files.success) return files;
|
|
50
|
-
const manifestFile = files.value.get("manifest.json");
|
|
51
|
-
if (!manifestFile) return verificationError("BUNDLE_MISSING_MANIFEST", "The plugin bundle is missing manifest.json.");
|
|
52
|
-
const backend = files.value.get("backend.js");
|
|
53
|
-
if (!backend) return verificationError("BUNDLE_MISSING_BACKEND", "The plugin bundle is missing backend.js.");
|
|
54
|
-
let parsed;
|
|
55
|
-
try {
|
|
56
|
-
parsed = JSON.parse(decoder.decode(manifestFile.data));
|
|
57
|
-
} catch {
|
|
58
|
-
return verificationError("BUNDLE_INVALID_MANIFEST", "The plugin bundle manifest is not valid JSON.");
|
|
59
|
-
}
|
|
60
|
-
const validated = pluginManifestSchema.safeParse(parsed);
|
|
61
|
-
if (!validated.success) return verificationError("BUNDLE_INVALID_MANIFEST", "The plugin bundle manifest failed schema validation.");
|
|
62
|
-
const manifest = reconcileManifestAccess(validated.data);
|
|
63
|
-
if (options.expectedSlug !== void 0 && manifest.id !== options.expectedSlug) return verificationError("BUNDLE_ID_MISMATCH", "The plugin bundle manifest id does not match the expected plugin.");
|
|
64
|
-
if (options.expectedVersion !== void 0 && manifest.version !== options.expectedVersion) return verificationError("BUNDLE_VERSION_MISMATCH", "The plugin bundle manifest version does not match the expected version.");
|
|
65
|
-
const result = {
|
|
66
|
-
manifest,
|
|
67
|
-
declaredAccess: manifest.declaredAccess ?? {},
|
|
68
|
-
backend: backend.data
|
|
69
|
-
};
|
|
70
|
-
const admin = files.value.get("admin.js");
|
|
71
|
-
if (admin) result.admin = admin.data;
|
|
72
|
-
return {
|
|
73
|
-
success: true,
|
|
74
|
-
value: result
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
async function decompressBundle(bytes) {
|
|
78
|
-
const source = new ReadableStream({ start(controller) {
|
|
79
|
-
controller.enqueue(bytes);
|
|
80
|
-
controller.close();
|
|
81
|
-
} });
|
|
82
|
-
let reader;
|
|
83
|
-
try {
|
|
84
|
-
reader = source.pipeThrough(createGzipDecoder()).getReader();
|
|
85
|
-
} catch {
|
|
86
|
-
return verificationError("BUNDLE_INVALID_ARCHIVE", "The plugin bundle is not valid gzip data.");
|
|
87
|
-
}
|
|
88
|
-
const chunks = [];
|
|
89
|
-
let total = 0;
|
|
90
|
-
try {
|
|
91
|
-
while (true) {
|
|
92
|
-
const { done, value } = await reader.read();
|
|
93
|
-
if (done) break;
|
|
94
|
-
if (!value) continue;
|
|
95
|
-
total += value.byteLength;
|
|
96
|
-
if (total > MAX_BUNDLE_DECOMPRESSED_BYTES) {
|
|
97
|
-
await reader.cancel().catch(() => void 0);
|
|
98
|
-
return verificationError("BUNDLE_DECOMPRESSED_SIZE_EXCEEDED", "The decompressed plugin bundle exceeds the size limit.");
|
|
99
|
-
}
|
|
100
|
-
chunks.push(value);
|
|
101
|
-
}
|
|
102
|
-
} catch {
|
|
103
|
-
return verificationError("BUNDLE_INVALID_ARCHIVE", "The plugin bundle is not valid gzip data.");
|
|
104
|
-
}
|
|
105
|
-
const output = new Uint8Array(total);
|
|
106
|
-
let offset = 0;
|
|
107
|
-
for (const chunk of chunks) {
|
|
108
|
-
output.set(chunk, offset);
|
|
109
|
-
offset += chunk.byteLength;
|
|
110
|
-
}
|
|
111
|
-
return {
|
|
112
|
-
success: true,
|
|
113
|
-
value: output
|
|
114
|
-
};
|
|
115
|
-
}
|
|
116
|
-
function parseTar(bytes) {
|
|
117
|
-
if (bytes.byteLength < TAR_END_BYTES || bytes.byteLength % TAR_BLOCK_BYTES !== 0) return invalidArchive();
|
|
118
|
-
const files = /* @__PURE__ */ new Map();
|
|
119
|
-
const rawPaths = /* @__PURE__ */ new Set();
|
|
120
|
-
const normalizedPaths = /* @__PURE__ */ new Set();
|
|
121
|
-
let offset = 0;
|
|
122
|
-
let fileCount = 0;
|
|
123
|
-
let entryCount = 0;
|
|
124
|
-
let totalFileBytes = 0;
|
|
125
|
-
let ended = false;
|
|
126
|
-
while (offset + TAR_BLOCK_BYTES <= bytes.byteLength) {
|
|
127
|
-
const header = bytes.subarray(offset, offset + TAR_BLOCK_BYTES);
|
|
128
|
-
if (isZeroBlock(header)) {
|
|
129
|
-
if (!isZeroBlock(bytes.subarray(offset + TAR_BLOCK_BYTES, offset + TAR_END_BYTES))) return invalidArchive();
|
|
130
|
-
if (bytes.subarray(offset + TAR_END_BYTES).some((byte) => byte !== 0)) return invalidArchive();
|
|
131
|
-
ended = true;
|
|
132
|
-
break;
|
|
133
|
-
}
|
|
134
|
-
if (!validChecksum(header)) return invalidArchive();
|
|
135
|
-
entryCount += 1;
|
|
136
|
-
if (entryCount > MAX_BUNDLE_TAR_ENTRY_COUNT) return verificationError("BUNDLE_FILE_COUNT_EXCEEDED", "The plugin bundle contains too many archive entries.");
|
|
137
|
-
const rawName = readTarPath(header);
|
|
138
|
-
if (!rawName.success) return rawName;
|
|
139
|
-
const typeFlag = header[156];
|
|
140
|
-
const type = typeFlag === 0 ? "file" : String.fromCharCode(typeFlag ?? 0);
|
|
141
|
-
const isDirectory = type === "5";
|
|
142
|
-
const normalized = normalizePath(rawName.value, isDirectory);
|
|
143
|
-
if (!normalized.success) return normalized;
|
|
144
|
-
if (rawPaths.has(rawName.value) || normalizedPaths.has(normalized.value)) return verificationError("BUNDLE_PATH_COLLISION", "The plugin bundle contains duplicate or ambiguous paths.");
|
|
145
|
-
rawPaths.add(rawName.value);
|
|
146
|
-
normalizedPaths.add(normalized.value);
|
|
147
|
-
const size = readOctal(header.subarray(124, 136));
|
|
148
|
-
if (size === null || !Number.isSafeInteger(size)) return invalidArchive();
|
|
149
|
-
const bodyStart = offset + TAR_BLOCK_BYTES;
|
|
150
|
-
const nextOffset = bodyStart + Math.ceil(size / TAR_BLOCK_BYTES) * TAR_BLOCK_BYTES;
|
|
151
|
-
if (nextOffset > bytes.byteLength) return invalidArchive();
|
|
152
|
-
if (isDirectory) {
|
|
153
|
-
if (size !== 0) return invalidArchive();
|
|
154
|
-
} else if (type === "file" || type === "0") {
|
|
155
|
-
fileCount += 1;
|
|
156
|
-
if (fileCount > MAX_BUNDLE_FILE_COUNT) return verificationError("BUNDLE_FILE_COUNT_EXCEEDED", "The plugin bundle contains too many files.");
|
|
157
|
-
if (size > MAX_BUNDLE_FILE_BYTES) return verificationError("BUNDLE_FILE_SIZE_EXCEEDED", "A file in the plugin bundle exceeds the per-file size limit.");
|
|
158
|
-
totalFileBytes += size;
|
|
159
|
-
if (totalFileBytes > MAX_BUNDLE_SIZE) return verificationError("BUNDLE_DECOMPRESSED_SIZE_EXCEEDED", "The plugin bundle file contents exceed the size limit.");
|
|
160
|
-
files.set(normalized.value, {
|
|
161
|
-
name: normalized.value,
|
|
162
|
-
data: bytes.slice(bodyStart, bodyStart + size)
|
|
163
|
-
});
|
|
164
|
-
} else return verificationError("BUNDLE_UNSUPPORTED_ENTRY", "The plugin bundle contains an unsupported archive entry type.");
|
|
165
|
-
offset = nextOffset;
|
|
166
|
-
}
|
|
167
|
-
if (!ended) return invalidArchive();
|
|
168
|
-
return {
|
|
169
|
-
success: true,
|
|
170
|
-
value: files
|
|
171
|
-
};
|
|
172
|
-
}
|
|
173
|
-
function readTarPath(header) {
|
|
174
|
-
const name = readTarString(header.subarray(0, 100));
|
|
175
|
-
const prefix = readTarString(header.subarray(345, 500));
|
|
176
|
-
if (name === null || prefix === null || name.length === 0) return verificationError("BUNDLE_INVALID_PATH", "The plugin bundle contains a malformed path.");
|
|
177
|
-
return {
|
|
178
|
-
success: true,
|
|
179
|
-
value: prefix ? `${prefix}/${name}` : name
|
|
180
|
-
};
|
|
181
|
-
}
|
|
182
|
-
function readTarString(field) {
|
|
183
|
-
const terminator = field.indexOf(0);
|
|
184
|
-
const end = terminator === -1 ? field.length : terminator;
|
|
185
|
-
if (terminator !== -1 && field.subarray(terminator + 1).some((byte) => byte !== 0)) return null;
|
|
186
|
-
try {
|
|
187
|
-
return decoder.decode(field.subarray(0, end));
|
|
188
|
-
} catch {
|
|
189
|
-
return null;
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
function normalizePath(raw, isDirectory) {
|
|
193
|
-
if (raw.includes("\\") || raw.startsWith("/") || WINDOWS_DRIVE_PATTERN.test(raw) || hasControlCharacter(raw) || raw.endsWith("/") !== isDirectory) return verificationError("BUNDLE_INVALID_PATH", "The plugin bundle contains an unsafe path.");
|
|
194
|
-
const parts = raw.split("/");
|
|
195
|
-
if (isDirectory) parts.pop();
|
|
196
|
-
const normalized = [];
|
|
197
|
-
for (const part of parts) {
|
|
198
|
-
if (part === ".") continue;
|
|
199
|
-
if (part === "" || part === "..") return verificationError("BUNDLE_INVALID_PATH", "The plugin bundle contains an unsafe path.");
|
|
200
|
-
normalized.push(part.normalize("NFC"));
|
|
201
|
-
}
|
|
202
|
-
if (normalized.length === 0) return verificationError("BUNDLE_INVALID_PATH", "The plugin bundle contains a malformed path.");
|
|
203
|
-
return {
|
|
204
|
-
success: true,
|
|
205
|
-
value: normalized.join("/")
|
|
206
|
-
};
|
|
207
|
-
}
|
|
208
|
-
function hasControlCharacter(value) {
|
|
209
|
-
for (const character of value) {
|
|
210
|
-
const codePoint = character.codePointAt(0);
|
|
211
|
-
if (codePoint !== void 0 && (codePoint <= 31 || codePoint === 127)) return true;
|
|
212
|
-
}
|
|
213
|
-
return false;
|
|
214
|
-
}
|
|
215
|
-
function readOctal(field) {
|
|
216
|
-
const text = new TextDecoder().decode(field).replaceAll("\0", "").trim();
|
|
217
|
-
if (!OCTAL_PATTERN.test(text)) return null;
|
|
218
|
-
const value = Number.parseInt(text, 8);
|
|
219
|
-
return Number.isSafeInteger(value) ? value : null;
|
|
220
|
-
}
|
|
221
|
-
function validChecksum(header) {
|
|
222
|
-
const expected = readOctal(header.subarray(148, 156));
|
|
223
|
-
if (expected === null) return false;
|
|
224
|
-
let actual = 0;
|
|
225
|
-
for (let index = 0; index < header.length; index += 1) actual += index >= 148 && index < 156 ? 32 : header[index] ?? 0;
|
|
226
|
-
return actual === expected;
|
|
227
|
-
}
|
|
228
|
-
function isZeroBlock(block) {
|
|
229
|
-
return block.byteLength === TAR_BLOCK_BYTES && block.every((byte) => byte === 0);
|
|
230
|
-
}
|
|
231
|
-
function invalidArchive() {
|
|
232
|
-
return verificationError("BUNDLE_INVALID_ARCHIVE", "The plugin bundle is not a valid tar archive.");
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
//#endregion
|
|
236
|
-
//#region src/registry/artifact-verification.ts
|
|
237
|
-
const bundleDecoder = new TextDecoder("utf-8", { fatal: true });
|
|
238
|
-
async function validateRegistryArtifact(bytes, checksum, slug, version) {
|
|
239
|
-
const checksumReport = await verifyMultihash(bytes, checksum);
|
|
240
|
-
if (!checksumReport.success) return checksumReport;
|
|
241
|
-
const [artifactDigest, ...artifactDigests] = await computeArtifactDigestCandidates(bytes);
|
|
242
|
-
const bundleReport = await validatePluginBundle(bytes, {
|
|
243
|
-
expectedSlug: slug,
|
|
244
|
-
expectedVersion: version
|
|
245
|
-
});
|
|
246
|
-
if (!bundleReport.success) return bundleReport;
|
|
247
|
-
const manifest = pluginManifestSchema$1.safeParse(bundleReport.value.manifest);
|
|
248
|
-
if (!manifest.success) return {
|
|
249
|
-
success: false,
|
|
250
|
-
error: {
|
|
251
|
-
code: "BUNDLE_RUNTIME_UNSUPPORTED",
|
|
252
|
-
message: "The plugin bundle uses manifest features unsupported by this EmDash version."
|
|
253
|
-
}
|
|
254
|
-
};
|
|
255
|
-
try {
|
|
256
|
-
return {
|
|
257
|
-
success: true,
|
|
258
|
-
value: {
|
|
259
|
-
bundle: {
|
|
260
|
-
manifest: reconcileManifestAccess$1(manifest.data),
|
|
261
|
-
backendCode: bundleDecoder.decode(bundleReport.value.backend),
|
|
262
|
-
adminCode: bundleReport.value.admin === void 0 ? void 0 : bundleDecoder.decode(bundleReport.value.admin),
|
|
263
|
-
checksum
|
|
264
|
-
},
|
|
265
|
-
artifactDigest,
|
|
266
|
-
artifactDigests
|
|
267
|
-
}
|
|
268
|
-
};
|
|
269
|
-
} catch {
|
|
270
|
-
return {
|
|
271
|
-
success: false,
|
|
272
|
-
error: {
|
|
273
|
-
code: "BUNDLE_INVALID_CODE_ENCODING",
|
|
274
|
-
message: "Plugin bundle code must be valid UTF-8."
|
|
275
|
-
}
|
|
276
|
-
};
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
//#endregion
|
|
281
|
-
//#region src/registry/plugin-id.ts
|
|
282
|
-
/**
|
|
283
|
-
* Plugin identifier helpers for the experimental decentralized plugin
|
|
284
|
-
* registry.
|
|
285
|
-
*
|
|
286
|
-
* Registry plugins are addressed by `(publisher_did, slug)`, but the
|
|
287
|
-
* EmDash runtime threads a single `pluginId: string` through every
|
|
288
|
-
* install primitive (R2 storage keys, `PluginStateRepository`,
|
|
289
|
-
* `syncMarketplacePlugins`, sandbox cache keys). Rather than refactor
|
|
290
|
-
* everything to carry a composite identifier, we normalize the registry
|
|
291
|
-
* tuple to an opaque content-addressed id that satisfies the existing
|
|
292
|
-
* `validatePluginIdentifier` shape (`/^[a-z][a-z0-9_-]*$/`).
|
|
293
|
-
*
|
|
294
|
-
* The normalized id is:
|
|
295
|
-
*
|
|
296
|
-
* `r_` + base32-encoded SHA-256(publisher_did + "\n" + slug), truncated.
|
|
297
|
-
*
|
|
298
|
-
* Properties:
|
|
299
|
-
*
|
|
300
|
-
* - Deterministic. The same `(publisher, slug)` always produces the
|
|
301
|
-
* same id, so re-resolving an installed plugin's metadata against
|
|
302
|
-
* the aggregator is a straightforward lookup keyed by the columns
|
|
303
|
-
* stored alongside `plugin_id` in `plugin_states`.
|
|
304
|
-
* - Collision-resistant. 80 bits of truncated hash; a 50% birthday
|
|
305
|
-
* collision happens around 2^40 distinct plugins, well beyond what
|
|
306
|
-
* this registry will ever index.
|
|
307
|
-
* - R2-safe. Lowercase alphanumerics + underscore (no hyphens), no
|
|
308
|
-
* `:` or `/`. Existing sandbox cache keys (`${pluginId}:${version}`)
|
|
309
|
-
* keep working because the id contains no `:`.
|
|
310
|
-
* - Syntactically distinct from typical marketplace plugin ids: the
|
|
311
|
-
* `r_` prefix plus exactly 16 base32 characters is unlikely to be
|
|
312
|
-
* chosen as a marketplace id. Not formally guaranteed by the
|
|
313
|
-
* validator -- marketplace ids may begin with `r_` and contain
|
|
314
|
-
* hyphens -- so the install handler also performs an explicit
|
|
315
|
-
* pre-existing-row check at the derived id and rejects any cross-
|
|
316
|
-
* source collision (`PLUGIN_ID_COLLISION`).
|
|
317
|
-
*
|
|
318
|
-
* Reverse lookup (id → publisher + slug) requires the `plugin_states`
|
|
319
|
-
* row -- the hash is one-way. That's intentional: any code path that
|
|
320
|
-
* needs the human-meaningful pair already has the state row in hand.
|
|
321
|
-
*/
|
|
322
|
-
/** Length (in base32 characters) of the truncated hash portion of the id. */
|
|
323
|
-
const HASH_LENGTH = 16;
|
|
324
|
-
/** Total expected length of a registry plugin id. */
|
|
325
|
-
const REGISTRY_PLUGIN_ID_LENGTH = 2 + HASH_LENGTH;
|
|
326
|
-
const BASE32_ALPHABET = "abcdefghijklmnopqrstuvwxyz234567";
|
|
327
|
-
/**
|
|
328
|
-
* RFC 4648 base32 encoding without padding, lowercase. Implemented inline
|
|
329
|
-
* rather than depending on a multibase library because (a) we only need
|
|
330
|
-
* lowercase base32 here, (b) we need it to run identically in workerd,
|
|
331
|
-
* Node, and the browser, and (c) the implementation is fewer lines than
|
|
332
|
-
* the import statement would be.
|
|
333
|
-
*/
|
|
334
|
-
function base32Encode(bytes) {
|
|
335
|
-
let bits = 0;
|
|
336
|
-
let value = 0;
|
|
337
|
-
let out = "";
|
|
338
|
-
for (const byte of bytes) {
|
|
339
|
-
value = value << 8 | byte;
|
|
340
|
-
bits += 8;
|
|
341
|
-
while (bits >= 5) {
|
|
342
|
-
bits -= 5;
|
|
343
|
-
out += BASE32_ALPHABET[value >>> bits & 31];
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
if (bits > 0) out += BASE32_ALPHABET[value << 5 - bits & 31];
|
|
347
|
-
return out;
|
|
348
|
-
}
|
|
349
|
-
/**
|
|
350
|
-
* Derive the normalized plugin id for a registry-published plugin.
|
|
351
|
-
*
|
|
352
|
-
* Throws if either input is empty or whitespace-only -- a missing DID
|
|
353
|
-
* or slug is always a programming error in the install path, not a
|
|
354
|
-
* recoverable runtime condition.
|
|
355
|
-
*/
|
|
356
|
-
async function makeRegistryPluginId(publisherDid, slug) {
|
|
357
|
-
const did = publisherDid.trim();
|
|
358
|
-
const s = slug.trim();
|
|
359
|
-
if (!did) throw new Error("makeRegistryPluginId: publisherDid is required");
|
|
360
|
-
if (!s) throw new Error("makeRegistryPluginId: slug is required");
|
|
361
|
-
const input = `${did}\n${s}`;
|
|
362
|
-
const hashBuffer = await crypto.subtle.digest("SHA-256", new TextEncoder().encode(input));
|
|
363
|
-
return `r_${base32Encode(new Uint8Array(hashBuffer)).slice(0, HASH_LENGTH)}`;
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
//#endregion
|
|
367
|
-
//#region src/registry/record-labels.ts
|
|
368
|
-
function hasCurrentRecordLabel(labels, value, record, now = Date.now()) {
|
|
369
|
-
return labels.some((label) => {
|
|
370
|
-
if (label.val !== value || label.uri !== record.uri || label.cid !== record.cid || label.neg === true) return false;
|
|
371
|
-
if (label.exp === void 0) return true;
|
|
372
|
-
const expiresAt = Date.parse(label.exp);
|
|
373
|
-
return Number.isFinite(expiresAt) && expiresAt > now;
|
|
374
|
-
});
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
//#endregion
|
|
378
|
-
//#region src/api/handlers/registry.ts
|
|
379
|
-
/**
|
|
380
|
-
* Registry installs use aggregator results only for discovery and moderation
|
|
381
|
-
* metadata. The handler reads profile and release records from the publisher's
|
|
382
|
-
* PDS, verifies their repository proofs, then validates the bundle checksum,
|
|
383
|
-
* manifest, policy, and consent before storing or activating executable code.
|
|
384
|
-
* Applicable labels can block installation but cannot supply any verified
|
|
385
|
-
* record, checksum, permission, or executable byte.
|
|
386
|
-
*/
|
|
387
|
-
function verifiedAccessEqual(a, b) {
|
|
388
|
-
return JSON.stringify(a) === JSON.stringify(canonicalizeDeclaredAccess(b));
|
|
389
|
-
}
|
|
390
|
-
function registryArtifactError(code, message, operation) {
|
|
391
|
-
let apiCode;
|
|
392
|
-
switch (code) {
|
|
393
|
-
case "BUNDLE_ID_MISMATCH":
|
|
394
|
-
apiCode = operation === "install" ? "MANIFEST_ID_MISMATCH" : "BUNDLE_IDENTITY_MISMATCH";
|
|
395
|
-
break;
|
|
396
|
-
case "BUNDLE_VERSION_MISMATCH":
|
|
397
|
-
apiCode = operation === "install" ? "MANIFEST_VERSION_MISMATCH" : code;
|
|
398
|
-
break;
|
|
399
|
-
case "CHECKSUM_MISMATCH":
|
|
400
|
-
case "INVALID_MULTIHASH":
|
|
401
|
-
case "UNSUPPORTED_MULTIHASH":
|
|
402
|
-
apiCode = "CHECKSUM_MISMATCH";
|
|
403
|
-
break;
|
|
404
|
-
case "FETCH_FAILED":
|
|
405
|
-
case "HOST_REJECTED":
|
|
406
|
-
case "REDIRECT_LIMIT_EXCEEDED":
|
|
407
|
-
case "REDIRECT_LOCATION_MISSING":
|
|
408
|
-
case "RESOURCE_STATUS_ERROR":
|
|
409
|
-
case "RESOURCE_TIMEOUT":
|
|
410
|
-
apiCode = operation === "install" ? "INSTALL_FAILED" : "UPDATE_FAILED";
|
|
411
|
-
break;
|
|
412
|
-
default: apiCode = "INVALID_BUNDLE";
|
|
413
|
-
}
|
|
414
|
-
return {
|
|
415
|
-
success: false,
|
|
416
|
-
error: {
|
|
417
|
-
code: apiCode,
|
|
418
|
-
message,
|
|
419
|
-
details: { verificationCode: code }
|
|
420
|
-
}
|
|
421
|
-
};
|
|
422
|
-
}
|
|
423
|
-
function registryRecordError(code, message) {
|
|
424
|
-
return {
|
|
425
|
-
success: false,
|
|
426
|
-
error: {
|
|
427
|
-
code: "RECORD_VERIFICATION_FAILED",
|
|
428
|
-
message,
|
|
429
|
-
details: { verificationCode: code }
|
|
430
|
-
}
|
|
431
|
-
};
|
|
432
|
-
}
|
|
433
|
-
function recordConsentError(input, records) {
|
|
434
|
-
if (!input.profileCid || !input.releaseCid) return {
|
|
435
|
-
success: false,
|
|
436
|
-
error: {
|
|
437
|
-
code: "RECORD_CONSENT_REQUIRED",
|
|
438
|
-
message: "Verify the signed package records before confirming this action."
|
|
439
|
-
}
|
|
440
|
-
};
|
|
441
|
-
if (input.profileCid !== records.profile.cid || input.releaseCid !== records.release.cid) return {
|
|
442
|
-
success: false,
|
|
443
|
-
error: {
|
|
444
|
-
code: "RECORD_VERIFICATION_DRIFT",
|
|
445
|
-
message: "The signed package records changed after review. Verify them again."
|
|
446
|
-
}
|
|
447
|
-
};
|
|
448
|
-
return null;
|
|
449
|
-
}
|
|
450
|
-
function recordVerificationSummary(records, report) {
|
|
451
|
-
return {
|
|
452
|
-
profileCid: records.profile.cid,
|
|
453
|
-
releaseCid: records.release.cid,
|
|
454
|
-
provenance: report.provenance.status,
|
|
455
|
-
policy: report.value.policy
|
|
456
|
-
};
|
|
457
|
-
}
|
|
458
|
-
/**
|
|
459
|
-
* Bytes-per-artifact cap on the gzipped tarball we'll download before
|
|
460
|
-
* decompression. RFC 0001 caps a sandboxed plugin bundle at 256 KiB
|
|
461
|
-
* decompressed (see `MAX_BUNDLE_SIZE` in @emdash-cms/plugin-cli);
|
|
462
|
-
* gzip on a mix of JSON manifest + JS code typically gives 0.3-0.6
|
|
463
|
-
* ratio, so compressed bundles are well under 200 KiB in practice.
|
|
464
|
-
* 512 KiB leaves margin for unusual file mixes that compress poorly
|
|
465
|
-
* while still rejecting anything that's obviously not a legitimate
|
|
466
|
-
* plugin bundle.
|
|
467
|
-
*/
|
|
468
|
-
const MAX_ARTIFACT_BYTES = 512 * 1024;
|
|
469
|
-
/**
|
|
470
|
-
* Maximum number of HTTP redirects followed during artifact download.
|
|
471
|
-
* Each hop is independently URL-validated, so a malicious server cannot
|
|
472
|
-
* redirect through a series of allowed-looking origins to reach a
|
|
473
|
-
* forbidden one.
|
|
474
|
-
*/
|
|
475
|
-
const MAX_REDIRECTS = 5;
|
|
476
|
-
/**
|
|
477
|
-
* Wall-clock cap on any single artifact fetch attempt (per URL).
|
|
478
|
-
* Defends against slow-loris artifact sources that accept the connection but
|
|
479
|
-
* never finish sending headers or body.
|
|
480
|
-
*/
|
|
481
|
-
const ARTIFACT_FETCH_TIMEOUT_MS = 15e3;
|
|
482
|
-
/**
|
|
483
|
-
* Total wall-clock budget for the artifact-download phase across all
|
|
484
|
-
* advertised caches, the publisher PDS, and the declared URL. Even with the
|
|
485
|
-
* per-URL timeout, unavailable sources could otherwise tie up the install request for
|
|
486
|
-
* minutes; this caps total time at a budget interactive admins can
|
|
487
|
-
* tolerate. Tuned so a fast happy path takes <1s of budget per
|
|
488
|
-
* attempt and a worst case still completes in under a minute.
|
|
489
|
-
*/
|
|
490
|
-
const ARTIFACT_TOTAL_BUDGET_MS = 45e3;
|
|
491
|
-
/**
|
|
492
|
-
* Per-request timeout applied to every aggregator XRPC call
|
|
493
|
-
* (`resolvePackage`, `getLatestRelease`, `listReleases`). Matches the
|
|
494
|
-
* per-URL artifact-fetch cap. Without this, a slow-loris aggregator
|
|
495
|
-
* can stall the install before the artifact phase even starts.
|
|
496
|
-
*/
|
|
497
|
-
const AGGREGATOR_REQUEST_TIMEOUT_MS = 15e3;
|
|
498
|
-
/**
|
|
499
|
-
* Total wall-clock budget for the aggregator-discovery phase
|
|
500
|
-
* (resolve + selected-release lookup). Mirrors the artifact-download
|
|
501
|
-
* budget. Worst case with the pinned-version path's 20-page cap is
|
|
502
|
-
* 20 + 1 calls; capping the total ensures any one stalled call
|
|
503
|
-
* still bounds the whole phase.
|
|
504
|
-
*/
|
|
505
|
-
const AGGREGATOR_TOTAL_BUDGET_MS = 3e4;
|
|
506
|
-
var RegistryArtifactFetchError = class extends Error {
|
|
507
|
-
constructor(code, message) {
|
|
508
|
-
super(message);
|
|
509
|
-
this.code = code;
|
|
510
|
-
this.name = "RegistryArtifactFetchError";
|
|
511
|
-
}
|
|
512
|
-
};
|
|
513
|
-
/** Build a fetch function that enforces a per-request and per-budget timeout. */
|
|
514
|
-
function timedFetch(totalDeadline) {
|
|
515
|
-
return (input, init) => {
|
|
516
|
-
const now = Date.now();
|
|
517
|
-
const remaining = Math.max(0, totalDeadline - now);
|
|
518
|
-
if (remaining === 0) return Promise.reject(/* @__PURE__ */ new Error("Aggregator request budget exhausted"));
|
|
519
|
-
const timeout = Math.min(AGGREGATOR_REQUEST_TIMEOUT_MS, remaining);
|
|
520
|
-
const controller = new AbortController();
|
|
521
|
-
const timer = setTimeout(() => controller.abort(), timeout);
|
|
522
|
-
const callerSignal = init?.signal;
|
|
523
|
-
if (callerSignal) if (callerSignal.aborted) controller.abort(callerSignal.reason);
|
|
524
|
-
else callerSignal.addEventListener("abort", () => controller.abort(callerSignal.reason));
|
|
525
|
-
return fetch(input, {
|
|
526
|
-
...init,
|
|
527
|
-
signal: controller.signal
|
|
528
|
-
}).finally(() => {
|
|
529
|
-
clearTimeout(timer);
|
|
530
|
-
});
|
|
531
|
-
};
|
|
532
|
-
}
|
|
533
|
-
async function fetchArtifact(artifactCaches, artifact, record, auth) {
|
|
534
|
-
const result = await fetchReleaseArtifact({
|
|
535
|
-
artifact,
|
|
536
|
-
record,
|
|
537
|
-
artifactCaches,
|
|
538
|
-
...auth === void 0 ? {} : { auth }
|
|
539
|
-
}, {
|
|
540
|
-
fetch: async (url, init) => {
|
|
541
|
-
if (!init.signal) throw new Error("Registry artifact fetch requires an abort signal");
|
|
542
|
-
return fetchRegistryArtifactUrl(url.href, {
|
|
543
|
-
signal: init.signal,
|
|
544
|
-
maxResponseBytes: MAX_ARTIFACT_BYTES
|
|
545
|
-
});
|
|
546
|
-
},
|
|
547
|
-
resolveHostname: async (hostname) => (await resolveAndValidateExternalUrlTarget(`https://${hostname}`)).addresses,
|
|
548
|
-
allowHttpLocalhost: import.meta.env.DEV,
|
|
549
|
-
headerTimeoutMs: ARTIFACT_FETCH_TIMEOUT_MS,
|
|
550
|
-
totalTimeoutMs: ARTIFACT_TOTAL_BUDGET_MS,
|
|
551
|
-
maxBytes: MAX_ARTIFACT_BYTES,
|
|
552
|
-
maxRedirects: MAX_REDIRECTS
|
|
553
|
-
});
|
|
554
|
-
if (!result.success) throw new RegistryArtifactFetchError(result.error.code, result.error.message);
|
|
555
|
-
return result.value.bytes;
|
|
556
|
-
}
|
|
557
|
-
/**
|
|
558
|
-
* Returns an error when the release is younger than `policy.minimumReleaseAge`,
|
|
559
|
-
* unless its publisher or package is in `minimumReleaseAgeExclude` or it is a
|
|
560
|
-
* proven first release.
|
|
561
|
-
*
|
|
562
|
-
* `releaseView.indexedAt` is aggregator operational data, not part of the
|
|
563
|
-
* signed release. The release schema has no publication timestamp, so minimum
|
|
564
|
-
* age remains a local discovery holdback rather than a cryptographic property.
|
|
565
|
-
* A missing or malformed timestamp fails closed.
|
|
566
|
-
*/
|
|
567
|
-
function checkMinimumReleaseAge(registryConfig, publisherDid, slug, packageView, releaseView) {
|
|
568
|
-
const minimumReleaseAge = registryConfig.policy?.minimumReleaseAge;
|
|
569
|
-
let minimumReleaseAgeSeconds = 0;
|
|
570
|
-
if (minimumReleaseAge !== void 0) try {
|
|
571
|
-
minimumReleaseAgeSeconds = parseDurationSeconds(minimumReleaseAge);
|
|
572
|
-
} catch (err) {
|
|
573
|
-
return {
|
|
574
|
-
success: false,
|
|
575
|
-
error: {
|
|
576
|
-
code: "REGISTRY_POLICY_INVALID",
|
|
577
|
-
message: err instanceof Error ? err.message : "Invalid minimumReleaseAge value in registry config"
|
|
578
|
-
}
|
|
579
|
-
};
|
|
580
|
-
}
|
|
581
|
-
if (minimumReleaseAgeSeconds > 0) {
|
|
582
|
-
const exclude = registryConfig.policy?.minimumReleaseAgeExclude?.map((e) => e.trim().toLowerCase());
|
|
583
|
-
if (!(releaseExemptFromMinimumAge(exclude, publisherDid, slug) || isProvenFirstRelease(packageView))) {
|
|
584
|
-
const indexedAt = Date.parse(releaseView.indexedAt);
|
|
585
|
-
if (!Number.isFinite(indexedAt)) return {
|
|
586
|
-
success: false,
|
|
587
|
-
error: {
|
|
588
|
-
code: "RELEASE_TIMESTAMP_INVALID",
|
|
589
|
-
message: "Release record is missing a valid indexed-at timestamp; cannot evaluate minimum release age policy."
|
|
590
|
-
}
|
|
591
|
-
};
|
|
592
|
-
const ageSeconds = (Date.now() - indexedAt) / 1e3;
|
|
593
|
-
if (ageSeconds < minimumReleaseAgeSeconds) {
|
|
594
|
-
const remaining = Math.ceil(minimumReleaseAgeSeconds - ageSeconds);
|
|
595
|
-
return {
|
|
596
|
-
success: false,
|
|
597
|
-
error: {
|
|
598
|
-
code: "RELEASE_TOO_NEW",
|
|
599
|
-
message: `This release does not meet the configured minimum release age of ${minimumReleaseAgeSeconds}s. It will be installable in ~${remaining}s.`
|
|
600
|
-
}
|
|
601
|
-
};
|
|
602
|
-
}
|
|
603
|
-
}
|
|
604
|
-
}
|
|
605
|
-
return null;
|
|
606
|
-
}
|
|
607
|
-
/**
|
|
608
|
-
* Gate a release's `requires` constraints against the running host
|
|
609
|
-
* environment. `requires` is the lexicon-`unknown` value off the signed
|
|
610
|
-
* release record — never trust its shape; `checkEnvCompatibility` guards it.
|
|
611
|
-
*
|
|
612
|
-
* Returns `null` when every advertised constraint is satisfied (or there are
|
|
613
|
-
* none), or a structured `ENV_INCOMPATIBLE` error naming the unsatisfied
|
|
614
|
-
* constraints and the host versions. The error carries the guarded `requires`
|
|
615
|
-
* and `host` maps so the admin can render the same mismatch the UI gate shows.
|
|
616
|
-
*/
|
|
617
|
-
function assertEnvCompatible(requires, hostEnv) {
|
|
618
|
-
for (const skipped of findSkippedEnvConstraints(requires, hostEnv)) console.warn(`[registry] env compatibility constraint skipped: ${skipped.key} requires ${skipped.required} but host version is ${skipped.reason}`);
|
|
619
|
-
const mismatches = checkEnvCompatibility(requires, hostEnv);
|
|
620
|
-
if (mismatches.length === 0) return null;
|
|
621
|
-
const guarded = {};
|
|
622
|
-
for (const m of mismatches) guarded[m.key] = m.required;
|
|
623
|
-
return {
|
|
624
|
-
code: "ENV_INCOMPATIBLE",
|
|
625
|
-
message: `This release is not compatible with the current environment: ${mismatches.map((m) => `${m.key} requires ${m.required} but host is ${m.host}`).join("; ")}.`,
|
|
626
|
-
details: {
|
|
627
|
-
requires: guarded,
|
|
628
|
-
host: hostEnv
|
|
629
|
-
}
|
|
630
|
-
};
|
|
631
|
-
}
|
|
632
|
-
async function handleRegistryInstall(db, storage, sandboxRunner, registryConfigInput, input, opts) {
|
|
633
|
-
const registryConfig = coerceRegistryConfig(registryConfigInput);
|
|
634
|
-
if (!registryConfig) return {
|
|
635
|
-
success: false,
|
|
636
|
-
error: {
|
|
637
|
-
code: "REGISTRY_NOT_CONFIGURED",
|
|
638
|
-
message: "Registry is not configured"
|
|
639
|
-
}
|
|
640
|
-
};
|
|
641
|
-
if (!storage) return {
|
|
642
|
-
success: false,
|
|
643
|
-
error: {
|
|
644
|
-
code: "STORAGE_NOT_CONFIGURED",
|
|
645
|
-
message: "Storage is required for registry plugin installation"
|
|
646
|
-
}
|
|
647
|
-
};
|
|
648
|
-
if (!sandboxRunner || !sandboxRunner.isAvailable()) return {
|
|
649
|
-
success: false,
|
|
650
|
-
error: {
|
|
651
|
-
code: "SANDBOX_NOT_AVAILABLE",
|
|
652
|
-
message: withUnavailableReason("Sandbox runner is required for registry plugins", sandboxRunner)
|
|
653
|
-
}
|
|
654
|
-
};
|
|
655
|
-
try {
|
|
656
|
-
validateAggregatorUrl(registryConfig.aggregatorUrl);
|
|
657
|
-
} catch (err) {
|
|
658
|
-
return {
|
|
659
|
-
success: false,
|
|
660
|
-
error: {
|
|
661
|
-
code: "REGISTRY_NOT_CONFIGURED",
|
|
662
|
-
message: err instanceof Error ? err.message : "Invalid aggregator URL"
|
|
663
|
-
}
|
|
664
|
-
};
|
|
665
|
-
}
|
|
666
|
-
const { did, slug, version: requestedVersion } = input;
|
|
667
|
-
const { DiscoveryClient, registryLabelerPolicy } = await import("@emdash-cms/registry-client/discovery");
|
|
668
|
-
const aggregatorDeadline = Date.now() + AGGREGATOR_TOTAL_BUDGET_MS;
|
|
669
|
-
const discovery = new DiscoveryClient({
|
|
670
|
-
aggregatorUrl: registryConfig.aggregatorUrl,
|
|
671
|
-
acceptLabelers: registryConfig.acceptLabelers,
|
|
672
|
-
labelerPolicy: registryLabelerPolicy(registryConfig.acceptLabelers),
|
|
673
|
-
fetch: timedFetch(aggregatorDeadline)
|
|
674
|
-
});
|
|
675
|
-
if (!did.startsWith("did:") || did.split(":").length < 3) return {
|
|
676
|
-
success: false,
|
|
677
|
-
error: {
|
|
678
|
-
code: "INVALID_DID",
|
|
679
|
-
message: "DID must be a valid atproto DID (e.g. did:plc:abc123)"
|
|
680
|
-
}
|
|
681
|
-
};
|
|
682
|
-
try {
|
|
683
|
-
const publisherDid = did;
|
|
684
|
-
const packageView = await discovery.getPackage({
|
|
685
|
-
did: publisherDid,
|
|
686
|
-
slug
|
|
687
|
-
});
|
|
688
|
-
const MAX_LIST_PAGES = 20;
|
|
689
|
-
const releaseView = await (async () => {
|
|
690
|
-
if (!requestedVersion) return discovery.getLatestRelease({
|
|
691
|
-
did: publisherDid,
|
|
692
|
-
package: slug
|
|
693
|
-
});
|
|
694
|
-
let cursor;
|
|
695
|
-
const seenCursors = /* @__PURE__ */ new Set();
|
|
696
|
-
for (let page = 0; page < MAX_LIST_PAGES; page++) {
|
|
697
|
-
if (cursor !== void 0) {
|
|
698
|
-
if (seenCursors.has(cursor)) break;
|
|
699
|
-
seenCursors.add(cursor);
|
|
700
|
-
}
|
|
701
|
-
const result = await discovery.listReleases({
|
|
702
|
-
did: publisherDid,
|
|
703
|
-
package: slug,
|
|
704
|
-
cursor,
|
|
705
|
-
limit: 50
|
|
706
|
-
});
|
|
707
|
-
for (const r of result.releases) if (r.version === requestedVersion) return r;
|
|
708
|
-
if (!result.cursor) break;
|
|
709
|
-
cursor = result.cursor;
|
|
710
|
-
}
|
|
711
|
-
})();
|
|
712
|
-
if (!releaseView) return {
|
|
713
|
-
success: false,
|
|
714
|
-
error: {
|
|
715
|
-
code: "NO_RELEASE",
|
|
716
|
-
message: requestedVersion ? `Version ${requestedVersion} not found for ${publisherDid}/${slug}` : `No installable release found for ${publisherDid}/${slug}`
|
|
717
|
-
}
|
|
718
|
-
};
|
|
719
|
-
if (packageView.did !== publisherDid || packageView.slug !== slug) return {
|
|
720
|
-
success: false,
|
|
721
|
-
error: {
|
|
722
|
-
code: "AGGREGATOR_IDENTITY_MISMATCH",
|
|
723
|
-
message: "Aggregator returned a package view for a different publisher or slug."
|
|
724
|
-
}
|
|
725
|
-
};
|
|
726
|
-
if (releaseView.did !== publisherDid || releaseView.package !== slug || requestedVersion !== void 0 && releaseView.version !== requestedVersion) return {
|
|
727
|
-
success: false,
|
|
728
|
-
error: {
|
|
729
|
-
code: "AGGREGATOR_IDENTITY_MISMATCH",
|
|
730
|
-
message: "Aggregator returned a release view that does not match the requested package or version."
|
|
731
|
-
}
|
|
732
|
-
};
|
|
733
|
-
const version = releaseView.version;
|
|
734
|
-
if (evaluateRegistryReleaseWithdrawal(releaseView, discovery.labelerPolicy).withdrawn) return {
|
|
735
|
-
success: false,
|
|
736
|
-
error: {
|
|
737
|
-
code: "RELEASE_YANKED",
|
|
738
|
-
message: "This release has been withdrawn"
|
|
739
|
-
}
|
|
740
|
-
};
|
|
741
|
-
const authoritative = await (opts?.readAuthoritativeRecords ?? readAuthoritativePackageRelease)(publisherDid, slug, version, opts?.authoritativeRecords);
|
|
742
|
-
if (!authoritative.success) return registryRecordError(authoritative.error.code, authoritative.error.message);
|
|
743
|
-
const records = authoritative.value;
|
|
744
|
-
const { profile, release } = records.inspection.value;
|
|
745
|
-
if (packageView.uri !== records.profile.uri || releaseView.uri !== records.release.uri || releaseView.cid !== records.release.cid) return {
|
|
746
|
-
success: false,
|
|
747
|
-
error: {
|
|
748
|
-
code: "AGGREGATOR_RECORD_MISMATCH",
|
|
749
|
-
message: "Aggregator metadata does not match the publisher's signed records."
|
|
750
|
-
}
|
|
751
|
-
};
|
|
752
|
-
if (!opts?.verifyOnly) {
|
|
753
|
-
const consentError = recordConsentError({
|
|
754
|
-
profileCid: input.acknowledgedProfileCid,
|
|
755
|
-
releaseCid: input.acknowledgedReleaseCid
|
|
756
|
-
}, records);
|
|
757
|
-
if (consentError) return consentError;
|
|
758
|
-
}
|
|
759
|
-
if ([packageView, records.profile].some((record) => hasCurrentRecordLabel(packageView.labels ?? [], "security:yanked", record) || hasCurrentRecordLabel(packageView.labels ?? [], "security-yanked", record))) return {
|
|
760
|
-
success: false,
|
|
761
|
-
error: {
|
|
762
|
-
code: "RELEASE_YANKED",
|
|
763
|
-
message: "This release has been withdrawn"
|
|
764
|
-
}
|
|
765
|
-
};
|
|
766
|
-
if (opts?.hostEnv) {
|
|
767
|
-
const envError = assertEnvCompatible(release.requires, opts.hostEnv);
|
|
768
|
-
if (envError) return {
|
|
769
|
-
success: false,
|
|
770
|
-
error: envError
|
|
771
|
-
};
|
|
772
|
-
}
|
|
773
|
-
const releaseAgeError = checkMinimumReleaseAge(registryConfig, publisherDid, slug, packageView, releaseView);
|
|
774
|
-
if (releaseAgeError) return releaseAgeError;
|
|
775
|
-
const pluginId = await makeRegistryPluginId(publisherDid, slug);
|
|
776
|
-
if (opts?.configuredPluginIds?.has(pluginId)) return {
|
|
777
|
-
success: false,
|
|
778
|
-
error: {
|
|
779
|
-
code: "PLUGIN_ID_CONFLICT",
|
|
780
|
-
message: "A configured plugin with the same derived id already exists"
|
|
781
|
-
}
|
|
782
|
-
};
|
|
783
|
-
const stateRepo = new PluginStateRepository(db);
|
|
784
|
-
const existing = await stateRepo.get(pluginId);
|
|
785
|
-
if (existing) {
|
|
786
|
-
if (existing.source === "registry") return {
|
|
787
|
-
success: false,
|
|
788
|
-
error: {
|
|
789
|
-
code: "ALREADY_INSTALLED",
|
|
790
|
-
message: `Plugin ${publisherDid}/${slug} is already installed`
|
|
791
|
-
}
|
|
792
|
-
};
|
|
793
|
-
return {
|
|
794
|
-
success: false,
|
|
795
|
-
error: {
|
|
796
|
-
code: "PLUGIN_ID_COLLISION",
|
|
797
|
-
message: `A non-registry plugin already exists at the derived id ${pluginId}. Uninstall it before installing this registry plugin.`
|
|
798
|
-
}
|
|
799
|
-
};
|
|
800
|
-
}
|
|
801
|
-
const packageArtifact = release.artifacts.package;
|
|
802
|
-
const declaredChecksum = release.artifacts.package.checksum;
|
|
803
|
-
if (!packageArtifact || !declaredChecksum) return {
|
|
804
|
-
success: false,
|
|
805
|
-
error: {
|
|
806
|
-
code: "INVALID_RELEASE",
|
|
807
|
-
message: "Release record is missing its package artifact or checksum"
|
|
808
|
-
}
|
|
809
|
-
};
|
|
810
|
-
let artifactBytes;
|
|
811
|
-
try {
|
|
812
|
-
artifactBytes = await fetchArtifact(releaseView.artifactCaches ?? [], packageArtifact, {
|
|
813
|
-
did: publisherDid,
|
|
814
|
-
collection: NSID.packageRelease,
|
|
815
|
-
rkey: `${slug}:${version}`,
|
|
816
|
-
cid: releaseView.cid
|
|
817
|
-
}, release.auth);
|
|
818
|
-
} catch (error) {
|
|
819
|
-
if (error instanceof RegistryArtifactFetchError) return registryArtifactError(error.code, error.message, "install");
|
|
820
|
-
throw error;
|
|
821
|
-
}
|
|
822
|
-
const artifactReport = await validateRegistryArtifact(artifactBytes, declaredChecksum, slug, version);
|
|
823
|
-
if (!artifactReport.success) return registryArtifactError(artifactReport.error.code, artifactReport.error.message, "install");
|
|
824
|
-
const { bundle, artifactDigest, artifactDigests } = artifactReport.value;
|
|
825
|
-
const recordReport = await verifyAuthoritativePackageRelease(records, artifactDigest, {
|
|
826
|
-
...opts?.authoritativeRecords,
|
|
827
|
-
artifactDigests
|
|
828
|
-
});
|
|
829
|
-
if (!recordReport.success) return registryRecordError(recordReport.code, recordReport.reasons[0]?.message ?? "The release provenance is invalid.");
|
|
830
|
-
const verification = recordVerificationSummary(records, recordReport);
|
|
831
|
-
bundle.manifest = {
|
|
832
|
-
...bundle.manifest,
|
|
833
|
-
id: pluginId
|
|
834
|
-
};
|
|
835
|
-
if (!verifiedAccessEqual(recordReport.value.declaredAccess, bundle.manifest.declaredAccess ?? {})) return {
|
|
836
|
-
success: false,
|
|
837
|
-
error: {
|
|
838
|
-
code: "DECLARED_ACCESS_DRIFT",
|
|
839
|
-
message: "The plugin bundle declares different permissions than its published record. Installation refused."
|
|
840
|
-
}
|
|
841
|
-
};
|
|
842
|
-
const actualCapabilities = canonicalCapabilitiesForDriftCheck(bundle.manifest.capabilities);
|
|
843
|
-
if (!opts?.verifyOnly && actualCapabilities.length > 0) {
|
|
844
|
-
if (input.acknowledgedDeclaredAccess === void 0) return {
|
|
845
|
-
success: false,
|
|
846
|
-
error: {
|
|
847
|
-
code: "DECLARED_ACCESS_REQUIRED",
|
|
848
|
-
message: "This plugin declares capabilities that require consent. Re-open the install dialog to review and acknowledge them."
|
|
849
|
-
}
|
|
850
|
-
};
|
|
851
|
-
const acknowledged = canonicalCapabilitiesForDriftCheck(input.acknowledgedDeclaredAccess);
|
|
852
|
-
if (acknowledged.length !== actualCapabilities.length || acknowledged.some((cap, i) => cap !== actualCapabilities[i])) return {
|
|
853
|
-
success: false,
|
|
854
|
-
error: {
|
|
855
|
-
code: "DECLARED_ACCESS_DRIFT",
|
|
856
|
-
message: "Plugin manifest has changed since you consented. Re-open the install dialog to review the new permissions."
|
|
857
|
-
}
|
|
858
|
-
};
|
|
859
|
-
}
|
|
860
|
-
const actualMcpTools = (bundle.manifest.mcp?.tools ?? []).map(({ inputSchema: _, outputSchema: __, ...tool }) => tool);
|
|
861
|
-
const publicRoutes = diffRouteVisibility(void 0, bundle.manifest).newlyPublic.toSorted();
|
|
862
|
-
if (!opts?.verifyOnly && publicRoutes.length > 0) {
|
|
863
|
-
const acknowledgedPublicRoutes = Array.isArray(input.acknowledgedPublicRoutes) ? input.acknowledgedPublicRoutes.filter((route) => typeof route === "string").toSorted() : [];
|
|
864
|
-
if (JSON.stringify(acknowledgedPublicRoutes) !== JSON.stringify(publicRoutes)) return {
|
|
865
|
-
success: false,
|
|
866
|
-
error: {
|
|
867
|
-
code: "ROUTE_VISIBILITY_ESCALATION",
|
|
868
|
-
message: "Plugin install exposes public (unauthenticated) routes",
|
|
869
|
-
details: {
|
|
870
|
-
routeVisibilityChanges: { newlyPublic: publicRoutes },
|
|
871
|
-
mcpTools: actualMcpTools,
|
|
872
|
-
verification
|
|
873
|
-
}
|
|
874
|
-
}
|
|
875
|
-
};
|
|
876
|
-
}
|
|
877
|
-
if (!opts?.verifyOnly && actualMcpTools.length > 0) {
|
|
878
|
-
if (JSON.stringify(input.acknowledgedMcpTools) !== JSON.stringify(actualMcpTools)) return {
|
|
879
|
-
success: false,
|
|
880
|
-
error: {
|
|
881
|
-
code: "MCP_TOOL_CONSENT_REQUIRED",
|
|
882
|
-
message: "Plugin MCP tools require explicit consent",
|
|
883
|
-
details: {
|
|
884
|
-
mcpTools: actualMcpTools,
|
|
885
|
-
routeVisibilityChanges: publicRoutes.length > 0 ? { newlyPublic: publicRoutes } : void 0,
|
|
886
|
-
verification
|
|
887
|
-
}
|
|
888
|
-
}
|
|
889
|
-
};
|
|
890
|
-
}
|
|
891
|
-
const result = {
|
|
892
|
-
pluginId,
|
|
893
|
-
publisherDid,
|
|
894
|
-
slug,
|
|
895
|
-
version,
|
|
896
|
-
capabilities: bundle.manifest.capabilities,
|
|
897
|
-
declaredAccess: recordReport.value.releaseExtension.declaredAccess,
|
|
898
|
-
mcpTools: actualMcpTools,
|
|
899
|
-
publicRoutes,
|
|
900
|
-
verification
|
|
901
|
-
};
|
|
902
|
-
if (opts?.verifyOnly) return {
|
|
903
|
-
success: true,
|
|
904
|
-
data: result
|
|
905
|
-
};
|
|
906
|
-
await storeBundleInR2(storage, pluginId, version, bundle, "registry");
|
|
907
|
-
const displayProfile = packageView.cid === records.profile.cid ? profile : packageView.profile;
|
|
908
|
-
try {
|
|
909
|
-
await stateRepo.upsert(pluginId, version, "active", {
|
|
910
|
-
source: "registry",
|
|
911
|
-
displayName: displayProfile?.name ?? slug,
|
|
912
|
-
description: displayProfile?.description ?? void 0,
|
|
913
|
-
registryPublisherDid: publisherDid,
|
|
914
|
-
registrySlug: slug
|
|
915
|
-
});
|
|
916
|
-
} catch (stateErr) {
|
|
917
|
-
let lostRace = false;
|
|
918
|
-
try {
|
|
919
|
-
const winner = await stateRepo.get(pluginId);
|
|
920
|
-
lostRace = winner !== void 0 && winner !== null;
|
|
921
|
-
} catch (probeErr) {
|
|
922
|
-
console.warn(`[registry-install] Failed to probe state row for ${pluginId} after state-write failure; treating as orphan:`, probeErr);
|
|
923
|
-
}
|
|
924
|
-
if (!lostRace) try {
|
|
925
|
-
await deleteBundleFromR2(storage, pluginId, version, "registry");
|
|
926
|
-
} catch (cleanupErr) {
|
|
927
|
-
console.warn(`[registry-install] Failed to clean up R2 bundle for ${pluginId}@${version} after state-row write failure:`, cleanupErr);
|
|
928
|
-
}
|
|
929
|
-
throw stateErr;
|
|
930
|
-
}
|
|
931
|
-
await syncDeclaredStorageIndexes(db, [bundle.manifest]);
|
|
932
|
-
return {
|
|
933
|
-
success: true,
|
|
934
|
-
data: result
|
|
935
|
-
};
|
|
936
|
-
} catch (err) {
|
|
937
|
-
if (err instanceof ClientValidationError) return {
|
|
938
|
-
success: false,
|
|
939
|
-
error: {
|
|
940
|
-
code: "AGGREGATOR_RESPONSE_INVALID",
|
|
941
|
-
message: `Aggregator returned a response that does not conform to its lexicon (${err.target})`
|
|
942
|
-
}
|
|
943
|
-
};
|
|
944
|
-
if (err instanceof ClientResponseError) {
|
|
945
|
-
if (err.error === "ListingUnavailable") return {
|
|
946
|
-
success: false,
|
|
947
|
-
error: {
|
|
948
|
-
code: "LISTING_UNAVAILABLE",
|
|
949
|
-
message: "This plugin is unavailable under the active registry policy"
|
|
950
|
-
}
|
|
951
|
-
};
|
|
952
|
-
return {
|
|
953
|
-
success: false,
|
|
954
|
-
error: {
|
|
955
|
-
code: err.status === 404 ? "AGGREGATOR_NOT_FOUND" : "AGGREGATOR_HTTP_ERROR",
|
|
956
|
-
message: `Aggregator returned ${err.status}: ${err.error}`
|
|
957
|
-
}
|
|
958
|
-
};
|
|
959
|
-
}
|
|
960
|
-
if (err instanceof EmDashStorageError) return {
|
|
961
|
-
success: false,
|
|
962
|
-
error: {
|
|
963
|
-
code: err.code ?? "STORAGE_ERROR",
|
|
964
|
-
message: "Storage error while installing plugin"
|
|
965
|
-
}
|
|
966
|
-
};
|
|
967
|
-
console.error("[registry-install] Failed:", err);
|
|
968
|
-
return {
|
|
969
|
-
success: false,
|
|
970
|
-
error: {
|
|
971
|
-
code: "INSTALL_FAILED",
|
|
972
|
-
message: err instanceof Error ? err.message : "Failed to install plugin from registry"
|
|
973
|
-
}
|
|
974
|
-
};
|
|
975
|
-
}
|
|
976
|
-
}
|
|
977
|
-
/**
|
|
978
|
-
* Uninstall a registry-source plugin. Deletes the R2 bundle under
|
|
979
|
-
* `registry/<pluginId>/<version>/`, optionally drops the plugin's
|
|
980
|
-
* `_plugin_storage` rows, and removes the `_plugin_state` row. The
|
|
981
|
-
* sandbox runtime is reconciled by the route's `syncRegistryPlugins`
|
|
982
|
-
* call after this returns.
|
|
983
|
-
*
|
|
984
|
-
* Refuses to uninstall plugins whose `source` is not `"registry"` to
|
|
985
|
-
* avoid trashing a marketplace/config plugin that happens to share the
|
|
986
|
-
* pluginId namespace.
|
|
987
|
-
*/
|
|
988
|
-
async function handleRegistryUninstall(db, storage, pluginId, opts) {
|
|
989
|
-
try {
|
|
990
|
-
const stateRepo = new PluginStateRepository(db);
|
|
991
|
-
const existing = await stateRepo.get(pluginId);
|
|
992
|
-
if (!existing || existing.source !== "registry") return {
|
|
993
|
-
success: false,
|
|
994
|
-
error: {
|
|
995
|
-
code: "NOT_FOUND",
|
|
996
|
-
message: `No registry plugin found: ${pluginId}`
|
|
997
|
-
}
|
|
998
|
-
};
|
|
999
|
-
const version = existing.version;
|
|
1000
|
-
await opts?.beforeDelete?.();
|
|
1001
|
-
let dataDeleted = false;
|
|
1002
|
-
if (opts?.deleteData && !opts.rollbackInstall) {
|
|
1003
|
-
await db.deleteFrom("_plugin_storage").where("plugin_id", "=", pluginId).execute();
|
|
1004
|
-
await new OptionsRepository(db).deleteByPrefix(`plugin:${pluginId}:`);
|
|
1005
|
-
dataDeleted = true;
|
|
1006
|
-
}
|
|
1007
|
-
try {
|
|
1008
|
-
await removeAllPluginIndexes(db, pluginId);
|
|
1009
|
-
} catch {}
|
|
1010
|
-
await stateRepo.delete(pluginId);
|
|
1011
|
-
if (storage) await deleteBundleFromR2(storage, pluginId, version, "registry");
|
|
1012
|
-
return {
|
|
1013
|
-
success: true,
|
|
1014
|
-
data: {
|
|
1015
|
-
pluginId,
|
|
1016
|
-
dataDeleted
|
|
1017
|
-
}
|
|
1018
|
-
};
|
|
1019
|
-
} catch (err) {
|
|
1020
|
-
console.error("[registry-uninstall] Failed:", err);
|
|
1021
|
-
return {
|
|
1022
|
-
success: false,
|
|
1023
|
-
error: {
|
|
1024
|
-
code: "UNINSTALL_FAILED",
|
|
1025
|
-
message: "Failed to uninstall plugin"
|
|
1026
|
-
}
|
|
1027
|
-
};
|
|
1028
|
-
}
|
|
1029
|
-
}
|
|
1030
|
-
/**
|
|
1031
|
-
* Update a registry-source plugin to a newer release. Mirrors
|
|
1032
|
-
* `handleMarketplaceUpdate`: resolves the target version via the aggregator,
|
|
1033
|
-
* re-runs the artifact fetch / checksum / extract pipeline, diffs capabilities
|
|
1034
|
-
* and route visibility against the currently installed bundle, and gates
|
|
1035
|
-
* escalations behind `confirmCapabilityChanges` and an exact
|
|
1036
|
-
* `acknowledgedPublicRoutes` match so the admin re-consents to widened permissions.
|
|
1037
|
-
*
|
|
1038
|
-
* Refuses non-registry sources. Refuses when the stored state row is missing
|
|
1039
|
-
* the `(publisherDid, slug)` it needs to resolve against the aggregator.
|
|
1040
|
-
*/
|
|
1041
|
-
async function handleRegistryUpdate(db, storage, sandboxRunner, registryConfigInput, pluginId, opts) {
|
|
1042
|
-
const registryConfig = coerceRegistryConfig(registryConfigInput);
|
|
1043
|
-
if (!registryConfig) return {
|
|
1044
|
-
success: false,
|
|
1045
|
-
error: {
|
|
1046
|
-
code: "REGISTRY_NOT_CONFIGURED",
|
|
1047
|
-
message: "Registry is not configured"
|
|
1048
|
-
}
|
|
1049
|
-
};
|
|
1050
|
-
if (!storage) return {
|
|
1051
|
-
success: false,
|
|
1052
|
-
error: {
|
|
1053
|
-
code: "STORAGE_NOT_CONFIGURED",
|
|
1054
|
-
message: "Storage is required for registry plugin updates"
|
|
1055
|
-
}
|
|
1056
|
-
};
|
|
1057
|
-
if (!sandboxRunner || !sandboxRunner.isAvailable()) return {
|
|
1058
|
-
success: false,
|
|
1059
|
-
error: {
|
|
1060
|
-
code: "SANDBOX_NOT_AVAILABLE",
|
|
1061
|
-
message: withUnavailableReason("Sandbox runner is required", sandboxRunner)
|
|
1062
|
-
}
|
|
1063
|
-
};
|
|
1064
|
-
try {
|
|
1065
|
-
validateAggregatorUrl(registryConfig.aggregatorUrl);
|
|
1066
|
-
} catch (err) {
|
|
1067
|
-
return {
|
|
1068
|
-
success: false,
|
|
1069
|
-
error: {
|
|
1070
|
-
code: "REGISTRY_NOT_CONFIGURED",
|
|
1071
|
-
message: err instanceof Error ? err.message : "Invalid aggregator URL"
|
|
1072
|
-
}
|
|
1073
|
-
};
|
|
1074
|
-
}
|
|
1075
|
-
try {
|
|
1076
|
-
const stateRepo = new PluginStateRepository(db);
|
|
1077
|
-
const existing = await stateRepo.get(pluginId);
|
|
1078
|
-
if (!existing || existing.source !== "registry") return {
|
|
1079
|
-
success: false,
|
|
1080
|
-
error: {
|
|
1081
|
-
code: "NOT_FOUND",
|
|
1082
|
-
message: `No registry plugin found: ${pluginId}`
|
|
1083
|
-
}
|
|
1084
|
-
};
|
|
1085
|
-
if (!existing.registryPublisherDid || !existing.registrySlug) return {
|
|
1086
|
-
success: false,
|
|
1087
|
-
error: {
|
|
1088
|
-
code: "INVALID_STATE",
|
|
1089
|
-
message: `Registry plugin ${pluginId} is missing publisher DID or slug in state`
|
|
1090
|
-
}
|
|
1091
|
-
};
|
|
1092
|
-
const oldVersion = existing.version;
|
|
1093
|
-
const publisherDid = existing.registryPublisherDid;
|
|
1094
|
-
const slug = existing.registrySlug;
|
|
1095
|
-
const { DiscoveryClient, registryLabelerPolicy } = await import("@emdash-cms/registry-client/discovery");
|
|
1096
|
-
const aggregatorDeadline = Date.now() + AGGREGATOR_TOTAL_BUDGET_MS;
|
|
1097
|
-
const discovery = new DiscoveryClient({
|
|
1098
|
-
aggregatorUrl: registryConfig.aggregatorUrl,
|
|
1099
|
-
acceptLabelers: registryConfig.acceptLabelers,
|
|
1100
|
-
labelerPolicy: registryLabelerPolicy(registryConfig.acceptLabelers),
|
|
1101
|
-
fetch: timedFetch(aggregatorDeadline)
|
|
1102
|
-
});
|
|
1103
|
-
const MAX_LIST_PAGES = 20;
|
|
1104
|
-
const releaseView = await (async () => {
|
|
1105
|
-
if (!opts?.version) return discovery.getLatestRelease({
|
|
1106
|
-
did: publisherDid,
|
|
1107
|
-
package: slug
|
|
1108
|
-
});
|
|
1109
|
-
let cursor;
|
|
1110
|
-
const seenCursors = /* @__PURE__ */ new Set();
|
|
1111
|
-
for (let page = 0; page < MAX_LIST_PAGES; page++) {
|
|
1112
|
-
if (cursor !== void 0) {
|
|
1113
|
-
if (seenCursors.has(cursor)) break;
|
|
1114
|
-
seenCursors.add(cursor);
|
|
1115
|
-
}
|
|
1116
|
-
const result = await discovery.listReleases({
|
|
1117
|
-
did: publisherDid,
|
|
1118
|
-
package: slug,
|
|
1119
|
-
cursor,
|
|
1120
|
-
limit: 50
|
|
1121
|
-
});
|
|
1122
|
-
for (const r of result.releases) if (r.version === opts.version) return r;
|
|
1123
|
-
if (!result.cursor) break;
|
|
1124
|
-
cursor = result.cursor;
|
|
1125
|
-
}
|
|
1126
|
-
})();
|
|
1127
|
-
if (!releaseView) return {
|
|
1128
|
-
success: false,
|
|
1129
|
-
error: {
|
|
1130
|
-
code: "NO_VERSION",
|
|
1131
|
-
message: opts?.version ? `Version ${opts.version} not found for ${publisherDid}/${slug}` : `No installable release found for ${publisherDid}/${slug}`
|
|
1132
|
-
}
|
|
1133
|
-
};
|
|
1134
|
-
if (releaseView.did !== publisherDid || releaseView.package !== slug || opts?.version !== void 0 && releaseView.version !== opts.version) return {
|
|
1135
|
-
success: false,
|
|
1136
|
-
error: {
|
|
1137
|
-
code: "AGGREGATOR_IDENTITY_MISMATCH",
|
|
1138
|
-
message: "Aggregator returned a release view that does not match the requested package or version."
|
|
1139
|
-
}
|
|
1140
|
-
};
|
|
1141
|
-
const packageView = await discovery.getPackage({
|
|
1142
|
-
did: publisherDid,
|
|
1143
|
-
slug
|
|
1144
|
-
});
|
|
1145
|
-
if (!packageView || packageView.did !== publisherDid || packageView.slug !== slug) return {
|
|
1146
|
-
success: false,
|
|
1147
|
-
error: {
|
|
1148
|
-
code: "AGGREGATOR_IDENTITY_MISMATCH",
|
|
1149
|
-
message: "Aggregator returned a package view that does not match the installed plugin."
|
|
1150
|
-
}
|
|
1151
|
-
};
|
|
1152
|
-
const newVersion = releaseView.version;
|
|
1153
|
-
if (evaluateRegistryReleaseWithdrawal(releaseView, discovery.labelerPolicy).withdrawn) return {
|
|
1154
|
-
success: false,
|
|
1155
|
-
error: {
|
|
1156
|
-
code: "YANKED",
|
|
1157
|
-
message: "Release has been withdrawn"
|
|
1158
|
-
}
|
|
1159
|
-
};
|
|
1160
|
-
if (newVersion === oldVersion) return {
|
|
1161
|
-
success: false,
|
|
1162
|
-
error: {
|
|
1163
|
-
code: "ALREADY_UP_TO_DATE",
|
|
1164
|
-
message: "Plugin is already at the requested version"
|
|
1165
|
-
}
|
|
1166
|
-
};
|
|
1167
|
-
if (opts?.version !== void 0) {
|
|
1168
|
-
const order = compareVersions(newVersion, oldVersion);
|
|
1169
|
-
if (order === null) return {
|
|
1170
|
-
success: false,
|
|
1171
|
-
error: {
|
|
1172
|
-
code: "INVALID_VERSION",
|
|
1173
|
-
message: "Installed or requested version is not valid semver"
|
|
1174
|
-
}
|
|
1175
|
-
};
|
|
1176
|
-
if (order < 0) return {
|
|
1177
|
-
success: false,
|
|
1178
|
-
error: {
|
|
1179
|
-
code: "DOWNGRADE_NOT_ALLOWED",
|
|
1180
|
-
message: "An update cannot target a version older than the installed one"
|
|
1181
|
-
}
|
|
1182
|
-
};
|
|
1183
|
-
}
|
|
1184
|
-
const releaseAgeError = checkMinimumReleaseAge(registryConfig, publisherDid, slug, packageView, releaseView);
|
|
1185
|
-
if (releaseAgeError) return releaseAgeError;
|
|
1186
|
-
const authoritative = await (opts?.readAuthoritativeRecords ?? readAuthoritativePackageRelease)(publisherDid, slug, newVersion, opts?.authoritativeRecords);
|
|
1187
|
-
if (!authoritative.success) return registryRecordError(authoritative.error.code, authoritative.error.message);
|
|
1188
|
-
const records = authoritative.value;
|
|
1189
|
-
const { profile, release } = records.inspection.value;
|
|
1190
|
-
if (packageView.uri !== records.profile.uri || releaseView.uri !== records.release.uri || releaseView.cid !== records.release.cid) return {
|
|
1191
|
-
success: false,
|
|
1192
|
-
error: {
|
|
1193
|
-
code: "AGGREGATOR_RECORD_MISMATCH",
|
|
1194
|
-
message: "Aggregator metadata does not match the publisher's signed records."
|
|
1195
|
-
}
|
|
1196
|
-
};
|
|
1197
|
-
if ([packageView, records.profile].some((record) => hasCurrentRecordLabel(packageView.labels ?? [], "security:yanked", record) || hasCurrentRecordLabel(packageView.labels ?? [], "security-yanked", record))) return {
|
|
1198
|
-
success: false,
|
|
1199
|
-
error: {
|
|
1200
|
-
code: "YANKED",
|
|
1201
|
-
message: "Package has been withdrawn"
|
|
1202
|
-
}
|
|
1203
|
-
};
|
|
1204
|
-
if (opts?.confirmCapabilityChanges || (opts?.acknowledgedPublicRoutes?.length ?? 0) > 0 || opts?.confirmMcpTools) {
|
|
1205
|
-
const consentError = recordConsentError({
|
|
1206
|
-
profileCid: opts?.acknowledgedProfileCid,
|
|
1207
|
-
releaseCid: opts?.acknowledgedReleaseCid
|
|
1208
|
-
}, records);
|
|
1209
|
-
if (consentError) return consentError;
|
|
1210
|
-
}
|
|
1211
|
-
if (opts?.hostEnv) {
|
|
1212
|
-
const envError = assertEnvCompatible(release.requires, opts.hostEnv);
|
|
1213
|
-
if (envError) return {
|
|
1214
|
-
success: false,
|
|
1215
|
-
error: envError
|
|
1216
|
-
};
|
|
1217
|
-
}
|
|
1218
|
-
const packageArtifact = release.artifacts.package;
|
|
1219
|
-
const declaredChecksum = packageArtifact?.checksum;
|
|
1220
|
-
if (!packageArtifact || !declaredChecksum) return {
|
|
1221
|
-
success: false,
|
|
1222
|
-
error: {
|
|
1223
|
-
code: "INVALID_RELEASE",
|
|
1224
|
-
message: "Release record is missing its package artifact or checksum"
|
|
1225
|
-
}
|
|
1226
|
-
};
|
|
1227
|
-
let artifactBytes;
|
|
1228
|
-
try {
|
|
1229
|
-
artifactBytes = await fetchArtifact(releaseView.artifactCaches ?? [], packageArtifact, {
|
|
1230
|
-
did: publisherDid,
|
|
1231
|
-
collection: NSID.packageRelease,
|
|
1232
|
-
rkey: `${slug}:${newVersion}`,
|
|
1233
|
-
cid: releaseView.cid
|
|
1234
|
-
}, release.auth);
|
|
1235
|
-
} catch (error) {
|
|
1236
|
-
if (error instanceof RegistryArtifactFetchError) return registryArtifactError(error.code, error.message, "update");
|
|
1237
|
-
throw error;
|
|
1238
|
-
}
|
|
1239
|
-
const artifactReport = await validateRegistryArtifact(artifactBytes, declaredChecksum, slug, newVersion);
|
|
1240
|
-
if (!artifactReport.success) return registryArtifactError(artifactReport.error.code, artifactReport.error.message, "update");
|
|
1241
|
-
const { bundle, artifactDigest, artifactDigests } = artifactReport.value;
|
|
1242
|
-
const recordReport = await verifyAuthoritativePackageRelease(records, artifactDigest, {
|
|
1243
|
-
...opts?.authoritativeRecords,
|
|
1244
|
-
artifactDigests
|
|
1245
|
-
});
|
|
1246
|
-
if (!recordReport.success) return registryRecordError(recordReport.code, recordReport.reasons[0]?.message ?? "The release provenance is invalid.");
|
|
1247
|
-
const verification = recordVerificationSummary(records, recordReport);
|
|
1248
|
-
bundle.manifest = {
|
|
1249
|
-
...bundle.manifest,
|
|
1250
|
-
id: pluginId
|
|
1251
|
-
};
|
|
1252
|
-
if (!verifiedAccessEqual(recordReport.value.declaredAccess, bundle.manifest.declaredAccess ?? {})) return {
|
|
1253
|
-
success: false,
|
|
1254
|
-
error: {
|
|
1255
|
-
code: "DECLARED_ACCESS_DRIFT",
|
|
1256
|
-
message: "The plugin bundle declares different permissions than its published record. Update refused."
|
|
1257
|
-
}
|
|
1258
|
-
};
|
|
1259
|
-
const oldBundle = await loadBundleFromR2(storage, pluginId, oldVersion, "registry");
|
|
1260
|
-
const capabilityChanges = diffCapabilities(oldBundle?.manifest.capabilities ?? [], bundle.manifest.capabilities);
|
|
1261
|
-
if (capabilityChanges.added.length > 0 && !opts?.confirmCapabilityChanges) return {
|
|
1262
|
-
success: false,
|
|
1263
|
-
error: {
|
|
1264
|
-
code: "CAPABILITY_ESCALATION",
|
|
1265
|
-
message: "Plugin update requires new capabilities",
|
|
1266
|
-
details: {
|
|
1267
|
-
capabilityChanges,
|
|
1268
|
-
verification
|
|
1269
|
-
}
|
|
1270
|
-
}
|
|
1271
|
-
};
|
|
1272
|
-
const newlyPublicRoutes = diffRouteVisibility(oldBundle?.manifest, bundle.manifest).newlyPublic.toSorted();
|
|
1273
|
-
const acknowledgedPublicRoutes = (opts?.acknowledgedPublicRoutes ?? []).filter((route) => typeof route === "string").toSorted();
|
|
1274
|
-
if (newlyPublicRoutes.length > 0 && JSON.stringify(acknowledgedPublicRoutes) !== JSON.stringify(newlyPublicRoutes)) return {
|
|
1275
|
-
success: false,
|
|
1276
|
-
error: {
|
|
1277
|
-
code: "ROUTE_VISIBILITY_ESCALATION",
|
|
1278
|
-
message: "Plugin update exposes new public (unauthenticated) routes",
|
|
1279
|
-
details: {
|
|
1280
|
-
routeVisibilityChanges: { newlyPublic: newlyPublicRoutes },
|
|
1281
|
-
capabilityChanges,
|
|
1282
|
-
verification
|
|
1283
|
-
}
|
|
1284
|
-
}
|
|
1285
|
-
};
|
|
1286
|
-
const oldMcpTools = [...oldBundle?.manifest.mcp?.tools ?? []].toSorted((a, b) => a.name.localeCompare(b.name));
|
|
1287
|
-
const newMcpTools = [...bundle.manifest.mcp?.tools ?? []].toSorted((a, b) => a.name.localeCompare(b.name));
|
|
1288
|
-
if (JSON.stringify(oldMcpTools) !== JSON.stringify(newMcpTools) && !opts?.confirmMcpTools) return {
|
|
1289
|
-
success: false,
|
|
1290
|
-
error: {
|
|
1291
|
-
code: "MCP_TOOL_CONSENT_REQUIRED",
|
|
1292
|
-
message: "Plugin update changes its MCP tools",
|
|
1293
|
-
details: {
|
|
1294
|
-
mcpTools: newMcpTools.map(({ inputSchema: _, outputSchema: __, ...tool }) => tool),
|
|
1295
|
-
verification
|
|
1296
|
-
}
|
|
1297
|
-
}
|
|
1298
|
-
};
|
|
1299
|
-
await storeBundleInR2(storage, pluginId, newVersion, bundle, "registry");
|
|
1300
|
-
const displayProfile = packageView.cid === records.profile.cid ? profile : packageView.profile;
|
|
1301
|
-
await stateRepo.upsert(pluginId, newVersion, "active", {
|
|
1302
|
-
source: "registry",
|
|
1303
|
-
registryPublisherDid: publisherDid,
|
|
1304
|
-
registrySlug: slug,
|
|
1305
|
-
displayName: displayProfile?.name ?? slug,
|
|
1306
|
-
description: displayProfile?.description ?? void 0,
|
|
1307
|
-
mcpToolsEnabled: false,
|
|
1308
|
-
mcpToolsConsent: null
|
|
1309
|
-
});
|
|
1310
|
-
await syncDeclaredStorageIndexes(db, [bundle.manifest]);
|
|
1311
|
-
return {
|
|
1312
|
-
success: true,
|
|
1313
|
-
data: {
|
|
1314
|
-
pluginId,
|
|
1315
|
-
oldVersion,
|
|
1316
|
-
newVersion,
|
|
1317
|
-
capabilityChanges,
|
|
1318
|
-
routeVisibilityChanges: newlyPublicRoutes.length > 0 ? { newlyPublic: newlyPublicRoutes } : void 0,
|
|
1319
|
-
verification
|
|
1320
|
-
}
|
|
1321
|
-
};
|
|
1322
|
-
} catch (err) {
|
|
1323
|
-
if (err instanceof ClientValidationError) return {
|
|
1324
|
-
success: false,
|
|
1325
|
-
error: {
|
|
1326
|
-
code: "AGGREGATOR_RESPONSE_INVALID",
|
|
1327
|
-
message: `Aggregator returned a response that does not conform to its lexicon (${err.target})`
|
|
1328
|
-
}
|
|
1329
|
-
};
|
|
1330
|
-
if (err instanceof ClientResponseError) {
|
|
1331
|
-
if (err.error === "ListingUnavailable") return {
|
|
1332
|
-
success: false,
|
|
1333
|
-
error: {
|
|
1334
|
-
code: "LISTING_UNAVAILABLE",
|
|
1335
|
-
message: "This plugin is unavailable under the active registry policy"
|
|
1336
|
-
}
|
|
1337
|
-
};
|
|
1338
|
-
return {
|
|
1339
|
-
success: false,
|
|
1340
|
-
error: {
|
|
1341
|
-
code: err.status === 404 ? "AGGREGATOR_NOT_FOUND" : "AGGREGATOR_HTTP_ERROR",
|
|
1342
|
-
message: `Aggregator returned ${err.status}: ${err.error}`
|
|
1343
|
-
}
|
|
1344
|
-
};
|
|
1345
|
-
}
|
|
1346
|
-
if (err instanceof EmDashStorageError) return {
|
|
1347
|
-
success: false,
|
|
1348
|
-
error: {
|
|
1349
|
-
code: err.code ?? "STORAGE_ERROR",
|
|
1350
|
-
message: "Storage error while updating plugin"
|
|
1351
|
-
}
|
|
1352
|
-
};
|
|
1353
|
-
console.error("[registry-update] Failed:", err);
|
|
1354
|
-
return {
|
|
1355
|
-
success: false,
|
|
1356
|
-
error: {
|
|
1357
|
-
code: "UPDATE_FAILED",
|
|
1358
|
-
message: err instanceof Error ? err.message : "Failed to update plugin"
|
|
1359
|
-
}
|
|
1360
|
-
};
|
|
1361
|
-
}
|
|
1362
|
-
}
|
|
1363
|
-
/**
|
|
1364
|
-
* Bulk update check across every installed registry plugin. Queries the
|
|
1365
|
-
* aggregator for each plugin's latest release and reports `hasUpdate`
|
|
1366
|
-
* based on the version comparison. Plugins whose aggregator lookup fails
|
|
1367
|
-
* (unreachable, delisted, malformed) are skipped silently — one bad
|
|
1368
|
-
* publisher must not blank the whole admin Updates list.
|
|
1369
|
-
*/
|
|
1370
|
-
async function handleRegistryUpdateCheck(db, registryConfigInput) {
|
|
1371
|
-
const registryConfig = coerceRegistryConfig(registryConfigInput);
|
|
1372
|
-
if (!registryConfig) return {
|
|
1373
|
-
success: false,
|
|
1374
|
-
error: {
|
|
1375
|
-
code: "REGISTRY_NOT_CONFIGURED",
|
|
1376
|
-
message: "Registry is not configured"
|
|
1377
|
-
}
|
|
1378
|
-
};
|
|
1379
|
-
try {
|
|
1380
|
-
const registryPlugins = await new PluginStateRepository(db).getRegistryPlugins();
|
|
1381
|
-
if (registryPlugins.length === 0) return {
|
|
1382
|
-
success: true,
|
|
1383
|
-
data: { items: [] }
|
|
1384
|
-
};
|
|
1385
|
-
const { DiscoveryClient, registryLabelerPolicy } = await import("@emdash-cms/registry-client/discovery");
|
|
1386
|
-
const aggregatorDeadline = Date.now() + AGGREGATOR_TOTAL_BUDGET_MS;
|
|
1387
|
-
const discovery = new DiscoveryClient({
|
|
1388
|
-
aggregatorUrl: registryConfig.aggregatorUrl,
|
|
1389
|
-
acceptLabelers: registryConfig.acceptLabelers,
|
|
1390
|
-
labelerPolicy: registryLabelerPolicy(registryConfig.acceptLabelers),
|
|
1391
|
-
fetch: timedFetch(aggregatorDeadline)
|
|
1392
|
-
});
|
|
1393
|
-
const items = [];
|
|
1394
|
-
for (const plugin of registryPlugins) {
|
|
1395
|
-
if (!plugin.registryPublisherDid || !plugin.registrySlug) continue;
|
|
1396
|
-
try {
|
|
1397
|
-
const releaseView = await discovery.getLatestRelease({
|
|
1398
|
-
did: plugin.registryPublisherDid,
|
|
1399
|
-
package: plugin.registrySlug
|
|
1400
|
-
});
|
|
1401
|
-
if (evaluateRegistryReleaseWithdrawal(releaseView, discovery.labelerPolicy).withdrawn) continue;
|
|
1402
|
-
const latest = releaseView.version;
|
|
1403
|
-
if (!latest) continue;
|
|
1404
|
-
const installed = plugin.version;
|
|
1405
|
-
items.push({
|
|
1406
|
-
pluginId: plugin.pluginId,
|
|
1407
|
-
installed,
|
|
1408
|
-
latest,
|
|
1409
|
-
hasUpdate: latest !== installed,
|
|
1410
|
-
hasCapabilityChanges: false,
|
|
1411
|
-
hasRouteVisibilityChanges: false
|
|
1412
|
-
});
|
|
1413
|
-
} catch (err) {
|
|
1414
|
-
console.warn(`[registry-update-check] Skipped ${plugin.pluginId}:`, err);
|
|
1415
|
-
}
|
|
1416
|
-
}
|
|
1417
|
-
return {
|
|
1418
|
-
success: true,
|
|
1419
|
-
data: { items }
|
|
1420
|
-
};
|
|
1421
|
-
} catch (err) {
|
|
1422
|
-
if (err instanceof ClientValidationError) return {
|
|
1423
|
-
success: false,
|
|
1424
|
-
error: {
|
|
1425
|
-
code: "AGGREGATOR_RESPONSE_INVALID",
|
|
1426
|
-
message: `Aggregator returned a response that does not conform to its lexicon (${err.target})`
|
|
1427
|
-
}
|
|
1428
|
-
};
|
|
1429
|
-
if (err instanceof ClientResponseError) return {
|
|
1430
|
-
success: false,
|
|
1431
|
-
error: {
|
|
1432
|
-
code: err.status === 404 ? "AGGREGATOR_NOT_FOUND" : "AGGREGATOR_HTTP_ERROR",
|
|
1433
|
-
message: `Aggregator returned ${err.status}: ${err.error}`
|
|
1434
|
-
}
|
|
1435
|
-
};
|
|
1436
|
-
console.error("[registry-update-check] Failed:", err);
|
|
1437
|
-
return {
|
|
1438
|
-
success: false,
|
|
1439
|
-
error: {
|
|
1440
|
-
code: "UPDATE_CHECK_FAILED",
|
|
1441
|
-
message: "Failed to check for registry updates"
|
|
1442
|
-
}
|
|
1443
|
-
};
|
|
1444
|
-
}
|
|
1445
|
-
}
|
|
1446
|
-
|
|
1447
|
-
//#endregion
|
|
1448
|
-
export { handleRegistryUpdateCheck as i, handleRegistryUninstall as n, handleRegistryUpdate as r, handleRegistryInstall as t };
|
|
1449
|
-
//# sourceMappingURL=registry-Cf9vkVxW.mjs.map
|