emdash 0.35.0 → 0.36.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/activation-K0kGBWuJ.mjs +382 -0
- package/dist/activation-K0kGBWuJ.mjs.map +1 -0
- package/dist/{adapters-Bb1vG41D.d.mts → adapters-CzL3H752.d.mts} +3 -3
- package/dist/{adapters-Bb1vG41D.d.mts.map → adapters-CzL3H752.d.mts.map} +1 -1
- package/dist/{allowed-origins-DW7sYyqg.mjs → allowed-origins-maylGaHv.mjs} +2 -2
- package/dist/{allowed-origins-DW7sYyqg.mjs.map → allowed-origins-maylGaHv.mjs.map} +1 -1
- package/dist/api/route-utils.d.mts +3 -3
- package/dist/api/route-utils.mjs +22 -20
- package/dist/api/route-utils.mjs.map +1 -1
- package/dist/api/schemas/index.d.mts +2 -2
- package/dist/api/schemas/index.mjs +5 -5
- package/dist/api-B0w3uBiG.mjs +2269 -0
- package/dist/api-B0w3uBiG.mjs.map +1 -0
- package/dist/{api-tokens-KO24G1Fd.mjs → api-tokens-9YrrCoE6.mjs} +2 -2
- package/dist/{api-tokens-KO24G1Fd.mjs.map → api-tokens-9YrrCoE6.mjs.map} +1 -1
- package/dist/{apply-kUDt80-G.mjs → apply-B_VMpJ2P.mjs} +34 -35
- package/dist/{apply-kUDt80-G.mjs.map → apply-B_VMpJ2P.mjs.map} +1 -1
- package/dist/astro/index.d.mts +12 -12
- package/dist/astro/index.mjs +26 -15
- package/dist/astro/index.mjs.map +1 -1
- package/dist/astro/middleware/auth.d.mts +10 -10
- package/dist/astro/middleware/auth.d.mts.map +1 -1
- package/dist/astro/middleware/auth.mjs +10 -7
- 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.mjs +4 -4
- package/dist/astro/middleware/request-context.mjs +3 -3
- package/dist/astro/middleware/setup.mjs +1 -1
- package/dist/astro/middleware.d.mts +11 -12
- package/dist/astro/middleware.d.mts.map +1 -1
- package/dist/astro/middleware.mjs +168 -1305
- package/dist/astro/middleware.mjs.map +1 -1
- package/dist/astro/routes/api/admin/allowed-domains/_domain_.mjs +6 -6
- package/dist/astro/routes/api/admin/allowed-domains/index.mjs +6 -6
- package/dist/astro/routes/api/admin/api-tokens/_id_.mjs +3 -3
- package/dist/astro/routes/api/admin/api-tokens/index.mjs +4 -4
- package/dist/astro/routes/api/admin/byline-fields/_slug_/usage.mjs +4 -4
- package/dist/astro/routes/api/admin/byline-fields/_slug_.mjs +9 -9
- package/dist/astro/routes/api/admin/byline-fields/index.mjs +9 -9
- package/dist/astro/routes/api/admin/byline-fields/reorder.mjs +9 -9
- package/dist/astro/routes/api/admin/bylines/_id_/index.mjs +15 -15
- package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs +15 -15
- package/dist/astro/routes/api/admin/bylines/index.mjs +15 -15
- package/dist/astro/routes/api/admin/comments/_id_/status.mjs +12 -12
- package/dist/astro/routes/api/admin/comments/_id_.mjs +4 -4
- package/dist/astro/routes/api/admin/comments/bulk.mjs +9 -9
- package/dist/astro/routes/api/admin/comments/counts.mjs +4 -4
- package/dist/astro/routes/api/admin/comments/index.mjs +9 -9
- package/dist/astro/routes/api/admin/hooks/exclusive/_hookName_.mjs +4 -4
- package/dist/astro/routes/api/admin/hooks/exclusive/index.mjs +3 -3
- package/dist/astro/routes/api/admin/media-usage/activation.d.mts +9 -0
- package/dist/astro/routes/api/admin/media-usage/activation.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/media-usage/activation.mjs +46 -0
- package/dist/astro/routes/api/admin/media-usage/activation.mjs.map +1 -0
- package/dist/astro/routes/api/admin/media-usage/collection-deletions/index.mjs +14 -13
- 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 +14 -13
- 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 +9 -0
- package/dist/astro/routes/api/admin/media-usage/progress.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/media-usage/progress.mjs +44 -0
- package/dist/astro/routes/api/admin/media-usage/progress.mjs.map +1 -0
- package/dist/astro/routes/api/admin/media-usage/repair.mjs +16 -11
- package/dist/astro/routes/api/admin/media-usage/repair.mjs.map +1 -1
- package/dist/astro/routes/api/admin/media-usage/work/index.mjs +14 -13
- 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 +14 -13
- 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 +54 -48
- package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +54 -48
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +52 -46
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/mcp.mjs +4 -4
- package/dist/astro/routes/api/admin/plugins/_id_/settings.mjs +52 -46
- package/dist/astro/routes/api/admin/plugins/_id_/settings.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +53 -47
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs +53 -47
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/index.mjs +52 -46
- package/dist/astro/routes/api/admin/plugins/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/icon.mjs +2 -2
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs +52 -46
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs +53 -47
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +52 -46
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.mjs +53 -47
- package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/_id_/update.mjs +54 -48
- 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 +172 -133
- package/dist/astro/routes/api/admin/plugins/registry/artifact.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/install.mjs +54 -48
- package/dist/astro/routes/api/admin/plugins/registry/install.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/updates.mjs +52 -46
- package/dist/astro/routes/api/admin/plugins/updates.mjs.map +1 -1
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +52 -46
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/thumbnail.mjs +2 -2
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs +52 -46
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/users/_id_/disable.mjs +2 -2
- package/dist/astro/routes/api/admin/users/_id_/enable.mjs +1 -1
- package/dist/astro/routes/api/admin/users/_id_/index.mjs +7 -7
- package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs +3 -3
- package/dist/astro/routes/api/admin/users/index.mjs +6 -6
- package/dist/astro/routes/api/auth/dev-bypass.mjs +3 -3
- package/dist/astro/routes/api/auth/invite/accept.mjs +1 -1
- package/dist/astro/routes/api/auth/invite/complete.mjs +11 -11
- package/dist/astro/routes/api/auth/invite/index.mjs +8 -8
- package/dist/astro/routes/api/auth/invite/register-options.mjs +10 -10
- package/dist/astro/routes/api/auth/logout.mjs +2 -2
- package/dist/astro/routes/api/auth/magic-link/send.mjs +10 -10
- package/dist/astro/routes/api/auth/magic-link/verify.mjs +2 -2
- package/dist/astro/routes/api/auth/me.d.mts.map +1 -1
- package/dist/astro/routes/api/auth/me.mjs +19 -9
- package/dist/astro/routes/api/auth/me.mjs.map +1 -1
- package/dist/astro/routes/api/auth/mode.mjs +2 -2
- package/dist/astro/routes/api/auth/oauth/_provider_/callback.mjs +4 -4
- package/dist/astro/routes/api/auth/oauth/_provider_.mjs +2 -2
- package/dist/astro/routes/api/auth/passkey/_id_.mjs +6 -6
- package/dist/astro/routes/api/auth/passkey/index.mjs +1 -1
- package/dist/astro/routes/api/auth/passkey/options.mjs +12 -12
- package/dist/astro/routes/api/auth/passkey/register/options.mjs +10 -10
- package/dist/astro/routes/api/auth/passkey/register/verify.mjs +11 -11
- package/dist/astro/routes/api/auth/passkey/verify.mjs +11 -11
- package/dist/astro/routes/api/auth/signup/complete.mjs +11 -11
- package/dist/astro/routes/api/auth/signup/request.mjs +10 -10
- package/dist/astro/routes/api/auth/signup/verify.mjs +1 -1
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs +13 -13
- package/dist/astro/routes/api/comments/_collection_/_contentId_/reactions.mjs +12 -12
- package/dist/astro/routes/api/content/_collection_/_id_/compare.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_/duplicate.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_/permanent.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs +11 -11
- package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs +8 -8
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/children.mjs +16 -14
- 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 +16 -14
- 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.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs +8 -8
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs +13 -13
- package/dist/astro/routes/api/content/_collection_/_id_/translations.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_.mjs +8 -8
- package/dist/astro/routes/api/content/_collection_/authors.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/index.mjs +8 -8
- package/dist/astro/routes/api/content/_collection_/trash.mjs +7 -7
- package/dist/astro/routes/api/dashboard.mjs +7 -7
- package/dist/astro/routes/api/dev/emails.mjs +2 -2
- package/dist/astro/routes/api/import/probe.d.mts +3 -3
- package/dist/astro/routes/api/import/probe.mjs +16 -16
- package/dist/astro/routes/api/import/wordpress/analyze.mjs +2 -2
- package/dist/astro/routes/api/import/wordpress/execute.d.mts +11 -11
- package/dist/astro/routes/api/import/wordpress/execute.mjs +12 -12
- package/dist/astro/routes/api/import/wordpress/media.d.mts +10 -10
- package/dist/astro/routes/api/import/wordpress/media.mjs +11 -11
- package/dist/astro/routes/api/import/wordpress/prepare.mjs +9 -9
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.d.mts +11 -11
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs +12 -10
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs.map +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.d.mts +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs +16 -16
- package/dist/astro/routes/api/import/wordpress-plugin/execute.d.mts +11 -11
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs +26 -26
- package/dist/astro/routes/api/manifest.mjs +4 -4
- package/dist/astro/routes/api/mcp.mjs +42 -42
- package/dist/astro/routes/api/media/_id_/confirm.mjs +11 -11
- package/dist/astro/routes/api/media/_id_/upload.mjs +6 -6
- package/dist/astro/routes/api/media/_id_/usage.mjs +18 -13
- package/dist/astro/routes/api/media/_id_/usage.mjs.map +1 -1
- package/dist/astro/routes/api/media/_id_.d.mts.map +1 -1
- package/dist/astro/routes/api/media/_id_.mjs +21 -13
- package/dist/astro/routes/api/media/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/media/file/_...key_.mjs +1 -1
- package/dist/astro/routes/api/media/folders/_id_.d.mts +10 -0
- package/dist/astro/routes/api/media/folders/_id_.d.mts.map +1 -0
- package/dist/astro/routes/api/media/folders/_id_.mjs +52 -0
- package/dist/astro/routes/api/media/folders/_id_.mjs.map +1 -0
- package/dist/astro/routes/api/media/folders/index.d.mts +9 -0
- package/dist/astro/routes/api/media/folders/index.d.mts.map +1 -0
- package/dist/astro/routes/api/media/folders/index.mjs +41 -0
- package/dist/astro/routes/api/media/folders/index.mjs.map +1 -0
- package/dist/astro/routes/api/media/providers/_providerId_/_itemId_.mjs +2 -2
- 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 +9 -9
- package/dist/astro/routes/api/media.d.mts.map +1 -1
- package/dist/astro/routes/api/media.mjs +28 -19
- package/dist/astro/routes/api/media.mjs.map +1 -1
- package/dist/astro/routes/api/menus/_name_/items/_id_.mjs +8 -8
- package/dist/astro/routes/api/menus/_name_/items.mjs +8 -8
- package/dist/astro/routes/api/menus/_name_/reorder.mjs +8 -8
- package/dist/astro/routes/api/menus/_name_/translations.mjs +8 -8
- package/dist/astro/routes/api/menus/_name_.mjs +8 -8
- package/dist/astro/routes/api/menus/index.mjs +8 -8
- package/dist/astro/routes/api/oauth/authorize.mjs +6 -6
- package/dist/astro/routes/api/oauth/device/authorize.mjs +5 -5
- package/dist/astro/routes/api/oauth/device/code.mjs +8 -8
- package/dist/astro/routes/api/oauth/device/token.mjs +7 -7
- package/dist/astro/routes/api/oauth/register.mjs +2 -2
- package/dist/astro/routes/api/oauth/token/refresh.mjs +5 -5
- package/dist/astro/routes/api/oauth/token/revoke.mjs +5 -5
- package/dist/astro/routes/api/oauth/token.mjs +5 -5
- package/dist/astro/routes/api/openapi.json.mjs +153 -6
- package/dist/astro/routes/api/openapi.json.mjs.map +1 -1
- package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs +4 -4
- package/dist/astro/routes/api/redirects/404s/index.mjs +10 -10
- package/dist/astro/routes/api/redirects/404s/summary.mjs +10 -10
- package/dist/astro/routes/api/redirects/_id_.mjs +11 -11
- package/dist/astro/routes/api/redirects/index.mjs +11 -11
- package/dist/astro/routes/api/relations/_id_/index.mjs +16 -14
- package/dist/astro/routes/api/relations/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/relations/_id_/translations.mjs +11 -9
- package/dist/astro/routes/api/relations/_id_/translations.mjs.map +1 -1
- package/dist/astro/routes/api/relations/index.mjs +16 -14
- 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 +3 -3
- package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs +52 -46
- package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs +52 -46
- package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs +52 -46
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +52 -46
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/index.mjs +52 -46
- package/dist/astro/routes/api/schema/collections/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/reorder.mjs +52 -46
- package/dist/astro/routes/api/schema/collections/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/schema/index.mjs +10 -8
- package/dist/astro/routes/api/schema/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs +52 -46
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs.map +1 -1
- package/dist/astro/routes/api/schema/orphans/index.mjs +52 -46
- package/dist/astro/routes/api/schema/orphans/index.mjs.map +1 -1
- package/dist/astro/routes/api/search/enable.mjs +10 -10
- package/dist/astro/routes/api/search/index.mjs +9 -9
- package/dist/astro/routes/api/search/rebuild.mjs +10 -10
- package/dist/astro/routes/api/search/stats.mjs +5 -5
- package/dist/astro/routes/api/search/suggest.mjs +9 -9
- package/dist/astro/routes/api/sections/_slug_.mjs +9 -9
- package/dist/astro/routes/api/sections/index.mjs +9 -9
- package/dist/astro/routes/api/settings/backups/archives/_name_.mjs +6 -6
- package/dist/astro/routes/api/settings/backups/archives/index.mjs +5 -5
- package/dist/astro/routes/api/settings/backups/export.mjs +6 -6
- package/dist/astro/routes/api/settings/backups/index.mjs +7 -7
- package/dist/astro/routes/api/settings/email.mjs +4 -4
- package/dist/astro/routes/api/settings.mjs +13 -13
- package/dist/astro/routes/api/setup/admin-verify.mjs +12 -12
- package/dist/astro/routes/api/setup/admin.mjs +11 -11
- package/dist/astro/routes/api/setup/dev-bypass.d.mts.map +1 -1
- package/dist/astro/routes/api/setup/dev-bypass.mjs +34 -27
- package/dist/astro/routes/api/setup/dev-bypass.mjs.map +1 -1
- package/dist/astro/routes/api/setup/dev-reset.mjs +2 -2
- package/dist/astro/routes/api/setup/index.mjs +31 -29
- package/dist/astro/routes/api/setup/index.mjs.map +1 -1
- package/dist/astro/routes/api/setup/status.mjs +3 -3
- package/dist/astro/routes/api/snapshot.mjs +7 -7
- package/dist/astro/routes/api/taxonomies/_name_/reorder.mjs +13 -13
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs +13 -13
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs +13 -13
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs +13 -13
- package/dist/astro/routes/api/taxonomies/_name_/translations.mjs +13 -13
- package/dist/astro/routes/api/taxonomies/_name_.mjs +13 -13
- package/dist/astro/routes/api/taxonomies/index.mjs +13 -13
- package/dist/astro/routes/api/themes/preview.mjs +5 -5
- package/dist/astro/routes/api/typegen.mjs +4 -4
- package/dist/astro/routes/api/well-known/auth.mjs +2 -2
- package/dist/astro/routes/api/well-known/oauth-authorization-server.mjs +2 -2
- package/dist/astro/routes/api/well-known/oauth-protected-resource.mjs +2 -2
- package/dist/astro/routes/api/widget-areas/_name_/reorder.mjs +7 -7
- package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs +10 -10
- package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs +10 -10
- package/dist/astro/routes/api/widget-areas/_name_.mjs +5 -5
- package/dist/astro/routes/api/widget-areas/index.mjs +10 -10
- package/dist/astro/routes/api/widget-components.mjs +2 -2
- package/dist/astro/routes/robots.txt.mjs +6 -6
- package/dist/astro/routes/sitemap-_collection_.xml.mjs +9 -9
- package/dist/astro/routes/sitemap.xml.mjs +7 -7
- package/dist/astro/types.d.mts +19 -14
- package/dist/astro/types.d.mts.map +1 -1
- package/dist/auth/providers/github.d.mts +1 -1
- package/dist/auth/providers/google.d.mts +1 -1
- package/dist/{authorize-DUElxgOQ.mjs → authorize-ByYs-Uxs.mjs} +2 -2
- package/dist/{authorize-DUElxgOQ.mjs.map → authorize-ByYs-Uxs.mjs.map} +1 -1
- package/dist/{backup-DWYpJlLj.mjs → backup-ChyHfIoX.mjs} +5 -5
- package/dist/{backup-DWYpJlLj.mjs.map → backup-ChyHfIoX.mjs.map} +1 -1
- package/dist/{bundle-vn56sLos.mjs → bundle-DZFhFurR.mjs} +4 -4
- package/dist/{bundle-vn56sLos.mjs.map → bundle-DZFhFurR.mjs.map} +1 -1
- package/dist/{byline-yjvWq4ip.mjs → byline-Cpnwrje1.mjs} +6 -6
- package/dist/{byline-yjvWq4ip.mjs.map → byline-Cpnwrje1.mjs.map} +1 -1
- package/dist/{byline-fields-txaLGoME.mjs → byline-fields-CAyA_Umd.mjs} +2 -2
- package/dist/{byline-fields-txaLGoME.mjs.map → byline-fields-CAyA_Umd.mjs.map} +1 -1
- package/dist/{byline-registry-DDun8sxh.mjs → byline-registry-Bpu9-MVs.mjs} +2 -2
- package/dist/{byline-registry-DDun8sxh.mjs.map → byline-registry-Bpu9-MVs.mjs.map} +1 -1
- package/dist/{bylines-DjXS5p0P.mjs → bylines-BSo9B9RX.mjs} +7 -7
- package/dist/{bylines-DjXS5p0P.mjs.map → bylines-BSo9B9RX.mjs.map} +1 -1
- package/dist/{bylines-Bu7pchQ4.mjs → bylines-CHjvehVX.mjs} +3 -3
- package/dist/{bylines-Bu7pchQ4.mjs.map → bylines-CHjvehVX.mjs.map} +1 -1
- package/dist/{cache-C46-3Irl.mjs → cache-5VirJ2Cn.mjs} +4 -4
- package/dist/{cache-C46-3Irl.mjs.map → cache-5VirJ2Cn.mjs.map} +1 -1
- package/dist/capture-triggers-CNW1q3HK.mjs +362 -0
- package/dist/capture-triggers-CNW1q3HK.mjs.map +1 -0
- package/dist/{challenge-store-SIL5DsF2.mjs → challenge-store-D5pSY2S1.mjs} +1 -1
- package/dist/{challenge-store-SIL5DsF2.mjs.map → challenge-store-D5pSY2S1.mjs.map} +1 -1
- package/dist/{chunks-fiZ8G9RJ.mjs → chunks-bNiX6_DR.mjs} +2 -2
- package/dist/{chunks-fiZ8G9RJ.mjs.map → chunks-bNiX6_DR.mjs.map} +1 -1
- package/dist/cli/index.mjs +36 -52
- package/dist/cli/index.mjs.map +1 -1
- package/dist/client/cf-access.d.mts +1 -1
- package/dist/client/index.d.mts +74 -4
- package/dist/client/index.d.mts.map +1 -1
- package/dist/client/index.mjs +54 -2
- package/dist/client/index.mjs.map +1 -1
- package/dist/{collection-deletion-DQPvMD8R.mjs → collection-deletion-m_oi2c0N.mjs} +13 -356
- package/dist/collection-deletion-m_oi2c0N.mjs.map +1 -0
- package/dist/{comment-Dxlep6cE.mjs → comment-DhvLEdhQ.mjs} +1 -1
- package/dist/{comment-Dxlep6cE.mjs.map → comment-DhvLEdhQ.mjs.map} +1 -1
- package/dist/{comment-reaction-D-2J84UE.mjs → comment-reaction-CRuItEjt.mjs} +2 -2
- package/dist/{comment-reaction-D-2J84UE.mjs.map → comment-reaction-CRuItEjt.mjs.map} +1 -1
- package/dist/{comments-CTfZtLmM.mjs → comments-CLj4bi8I.mjs} +2 -2
- package/dist/{comments-CTfZtLmM.mjs.map → comments-CLj4bi8I.mjs.map} +1 -1
- package/dist/{components-CQy3lh9x.mjs → components-v4U4DT2y.mjs} +1 -1
- package/dist/{components-CQy3lh9x.mjs.map → components-v4U4DT2y.mjs.map} +1 -1
- package/dist/{config-COQzTe5Q.d.mts → config-DrfghTPe.d.mts} +1 -1
- package/dist/{config-COQzTe5Q.d.mts.map → config-DrfghTPe.d.mts.map} +1 -1
- package/dist/{content-ZHCc1ngN.mjs → content-CP-SeXNa.mjs} +5 -4
- package/dist/content-CP-SeXNa.mjs.map +1 -0
- package/dist/{content-list-query-wJ2WN8Vp.d.mts → content-list-query-BhejKVqb.d.mts} +1 -1
- package/dist/{content-list-query-wJ2WN8Vp.d.mts.map → content-list-query-BhejKVqb.d.mts.map} +1 -1
- package/dist/{content-refresh-B_8SJzuU.mjs → content-refresh-DLOfIhYc.mjs} +1094 -93
- package/dist/content-refresh-DLOfIhYc.mjs.map +1 -0
- package/dist/{media-usage-BZCydfvu.mjs → content-repair-BCxzy0r4.mjs} +5 -196
- package/dist/content-repair-BCxzy0r4.mjs.map +1 -0
- package/dist/{context-ZldbZcle.mjs → context-BR5hRWiK.mjs} +13 -13
- package/dist/{context-ZldbZcle.mjs.map → context-BR5hRWiK.mjs.map} +1 -1
- package/dist/{cron-Y9aLtgrA.mjs → cron-CWfWrWKG.mjs} +1 -1
- package/dist/{cron-Y9aLtgrA.mjs.map → cron-CWfWrWKG.mjs.map} +1 -1
- package/dist/{dashboard-DvHbk_cv.mjs → dashboard-CkIV2rnQ.mjs} +5 -5
- package/dist/{dashboard-DvHbk_cv.mjs.map → dashboard-CkIV2rnQ.mjs.map} +1 -1
- package/dist/db/index.d.mts +3 -3
- package/dist/db/index.mjs +3 -3
- package/dist/db/index.mjs.map +1 -1
- package/dist/db/libsql-migrations.d.mts +1 -1
- package/dist/db/libsql-migrations.mjs +4 -4
- package/dist/db/libsql.d.mts +1 -1
- package/dist/db/postgres-migrations.d.mts +1 -1
- package/dist/db/postgres-migrations.mjs +4 -4
- package/dist/db/postgres.d.mts +1 -1
- package/dist/db/sqlite-migrations.d.mts +1 -1
- package/dist/db/sqlite-migrations.mjs +4 -4
- package/dist/db/sqlite.d.mts +1 -1
- package/dist/db/sqlite.mjs +3 -3
- package/dist/db/sqlite.mjs.map +1 -1
- package/dist/{default-DdDl3fxv.mjs → default-YMEfcQUx.mjs} +1 -1
- package/dist/{default-DdDl3fxv.mjs.map → default-YMEfcQUx.mjs.map} +1 -1
- package/dist/{deferred-tasks-SDWxrgzJ.d.mts → deferred-tasks-DfqxH5Xf.d.mts} +1 -1
- package/dist/{deferred-tasks-SDWxrgzJ.d.mts.map → deferred-tasks-DfqxH5Xf.d.mts.map} +1 -1
- package/dist/{device-flow-C0GdD_z8.mjs → device-flow-CojjSBwb.mjs} +5 -5
- package/dist/{device-flow-C0GdD_z8.mjs.map → device-flow-CojjSBwb.mjs.map} +1 -1
- package/dist/{direct-executor-CDXeJCSs.mjs → direct-executor-BWeWiRYB.mjs} +3 -3
- package/dist/{direct-executor-CDXeJCSs.mjs.map → direct-executor-BWeWiRYB.mjs.map} +1 -1
- package/dist/{dist-D_6CKR8z.mjs → dist-89xCrGqi.mjs} +1 -1
- package/dist/{dist-D_6CKR8z.mjs.map → dist-89xCrGqi.mjs.map} +1 -1
- package/dist/{email-console-BHNjIwiB.mjs → email-console-CEJgR_LB.mjs} +1 -1
- package/dist/{email-console-BHNjIwiB.mjs.map → email-console-CEJgR_LB.mjs.map} +1 -1
- package/dist/{enrich-_ySMEvEE.mjs → enrich-BX0IDp4z.mjs} +3 -3
- package/dist/{enrich-_ySMEvEE.mjs.map → enrich-BX0IDp4z.mjs.map} +1 -1
- package/dist/{error-DupyJZE2.mjs → error-D9w94fjV.mjs} +2 -2
- package/dist/{error-DupyJZE2.mjs.map → error-D9w94fjV.mjs.map} +1 -1
- package/dist/{errors-CLUPm7aD.mjs → errors-n2j49uNf.mjs} +22 -2
- package/dist/errors-n2j49uNf.mjs.map +1 -0
- package/dist/{escape-DUY2r2Zs.mjs → escape-DN4Qmjsl.mjs} +1 -1
- package/dist/{escape-DUY2r2Zs.mjs.map → escape-DN4Qmjsl.mjs.map} +1 -1
- package/dist/{field-defs-cache-BzwBlJrR.mjs → field-defs-cache-Bh4q6oar.mjs} +5 -5
- package/dist/{field-defs-cache-BzwBlJrR.mjs.map → field-defs-cache-Bh4q6oar.mjs.map} +1 -1
- package/dist/focal-point-BeWFo6Xx.mjs +23 -0
- package/dist/focal-point-BeWFo6Xx.mjs.map +1 -0
- package/dist/{fts-manager-DyZEohZC.mjs → fts-manager-BhOdW0bi.mjs} +3 -3
- package/dist/{fts-manager-DyZEohZC.mjs.map → fts-manager-BhOdW0bi.mjs.map} +1 -1
- package/dist/{hash-Cg0TXJPV.mjs → hash-CTcngWvj.mjs} +1 -1
- package/dist/{hash-Cg0TXJPV.mjs.map → hash-CTcngWvj.mjs.map} +1 -1
- package/dist/{hreflang-DwT2E0Sa.d.mts → hreflang-7pTHsLZJ.d.mts} +2 -2
- package/dist/{hreflang-DwT2E0Sa.d.mts.map → hreflang-7pTHsLZJ.d.mts.map} +1 -1
- package/dist/{hreflang-BBe83kKa.mjs → hreflang-Huc6O5wa.mjs} +7 -7
- package/dist/{hreflang-BBe83kKa.mjs.map → hreflang-Huc6O5wa.mjs.map} +1 -1
- package/dist/{identity-Ys6Dlc9C.mjs → identity-DXmb4aVp.mjs} +3 -3
- package/dist/{identity-Ys6Dlc9C.mjs.map → identity-DXmb4aVp.mjs.map} +1 -1
- package/dist/{import-DPkLmeXO.mjs → import-C4_O3KXU.mjs} +5 -5
- package/dist/{import-DPkLmeXO.mjs.map → import-C4_O3KXU.mjs.map} +1 -1
- package/dist/{index-C9KuQyO-.d.mts → index-6bRee8zb.d.mts} +3 -3
- package/dist/{index-C9KuQyO-.d.mts.map → index-6bRee8zb.d.mts.map} +1 -1
- package/dist/{index-BVBZj4-7.d.mts → index-DWbJrsAg.d.mts} +128 -52
- package/dist/index-DWbJrsAg.d.mts.map +1 -0
- package/dist/index.d.mts +21 -21
- package/dist/index.mjs +78 -72
- package/dist/{init-lock-6b309ZrF.mjs → init-lock-DJkX6Hto.mjs} +1 -1
- package/dist/{init-lock-6b309ZrF.mjs.map → init-lock-DJkX6Hto.mjs.map} +1 -1
- package/dist/{load-YJ2xl3ra.mjs → load-Bo7fZAbg.mjs} +2 -2
- package/dist/{load-YJ2xl3ra.mjs.map → load-Bo7fZAbg.mjs.map} +1 -1
- package/dist/{loader-CdG_Ci3H.mjs → loader-ZsjE4paL.mjs} +2 -2
- package/dist/{loader-CdG_Ci3H.mjs.map → loader-ZsjE4paL.mjs.map} +1 -1
- package/dist/{manifest-builder-B252yQUf.mjs → manifest-builder-QXuqvVMP.mjs} +2 -2
- package/dist/{manifest-builder-B252yQUf.mjs.map → manifest-builder-QXuqvVMP.mjs.map} +1 -1
- package/dist/{manifest-schema-BXbUAHod.mjs → manifest-schema-CUYPfCEH.mjs} +1 -1
- package/dist/{manifest-schema-BXbUAHod.mjs.map → manifest-schema-CUYPfCEH.mjs.map} +1 -1
- package/dist/media/image-endpoint.mjs +1 -1
- package/dist/media/index.d.mts +1 -1
- package/dist/media/index.mjs +13 -3
- package/dist/media/index.mjs.map +1 -1
- package/dist/media/local-runtime.d.mts +14 -12
- package/dist/media/local-runtime.d.mts.map +1 -1
- package/dist/media/local-runtime.mjs +11 -5
- package/dist/media/local-runtime.mjs.map +1 -1
- package/dist/{media-BWWWb8kg.mjs → media-BjwNuLEu.mjs} +100 -6
- package/dist/media-BjwNuLEu.mjs.map +1 -0
- package/dist/{media-CzhAn2--.mjs → media-D6SeAfBl.mjs} +41 -12
- package/dist/media-D6SeAfBl.mjs.map +1 -0
- package/dist/{media-allowlist-D6x-Us02.mjs → media-allowlist-D35v7bmL.mjs} +3 -2
- package/dist/media-allowlist-D35v7bmL.mjs.map +1 -0
- package/dist/media-folders-D-0CmRZj.mjs +210 -0
- package/dist/media-folders-D-0CmRZj.mjs.map +1 -0
- package/dist/{media-upload-CHBVn6m-.mjs → media-upload-C7bLXGcI.mjs} +9 -9
- package/dist/{media-upload-CHBVn6m-.mjs.map → media-upload-C7bLXGcI.mjs.map} +1 -1
- package/dist/{media-url-BvoX88FA.mjs → media-url-DH7giMx_.mjs} +1 -1
- package/dist/{media-url-BvoX88FA.mjs.map → media-url-DH7giMx_.mjs.map} +1 -1
- package/dist/media-usage-BTRJvS6V.mjs +1833 -0
- package/dist/media-usage-BTRJvS6V.mjs.map +1 -0
- package/dist/media-usage-activation-Dx0kPV6b.mjs +78 -0
- package/dist/media-usage-activation-Dx0kPV6b.mjs.map +1 -0
- package/dist/{media-usage-work-DrCbqBcl.mjs → media-usage-work-C-fhM30c.mjs} +221 -59
- package/dist/media-usage-work-C-fhM30c.mjs.map +1 -0
- package/dist/{media-usage-work-CLo_6tct.mjs → media-usage-work-DWb2XPMI.mjs} +4 -4
- package/dist/{media-usage-work-CLo_6tct.mjs.map → media-usage-work-DWb2XPMI.mjs.map} +1 -1
- package/dist/{media-usage-write-fence-aHEgN1zB.mjs → media-usage-write-fence-BwoJVRDC.mjs} +2 -2
- package/dist/{media-usage-write-fence-aHEgN1zB.mjs.map → media-usage-write-fence-BwoJVRDC.mjs.map} +1 -1
- package/dist/{menus-TCNSd2vp.mjs → menus-CD7EFLwz.mjs} +3 -3
- package/dist/{menus-TCNSd2vp.mjs.map → menus-CD7EFLwz.mjs.map} +1 -1
- package/dist/{menus-DSo5QeW0.mjs → menus-CNg0QlDt.mjs} +42 -26
- package/dist/menus-CNg0QlDt.mjs.map +1 -0
- package/dist/migrations/index.d.mts +1 -1
- package/dist/migrations/index.mjs +3 -3
- package/dist/{mime-DfIVjNkr.mjs → mime-CUIG6x84.mjs} +1 -1
- package/dist/mime-CUIG6x84.mjs.map +1 -0
- package/dist/{mode-BDoH_WcF.mjs → mode-DaUM_MB2.mjs} +1 -1
- package/dist/{mode-BDoH_WcF.mjs.map → mode-DaUM_MB2.mjs.map} +1 -1
- package/dist/node-sqlite-compat-Udb4Y-rs.mjs +46 -0
- package/dist/node-sqlite-compat-Udb4Y-rs.mjs.map +1 -0
- package/dist/{normalize-Bc-s_r-a.mjs → normalize-CSxdKBVa.mjs} +22 -1
- package/dist/normalize-CSxdKBVa.mjs.map +1 -0
- package/dist/{oauth-authorization-iOikmrJd.mjs → oauth-authorization-Dpsb-fMJ.mjs} +5 -5
- package/dist/{oauth-authorization-iOikmrJd.mjs.map → oauth-authorization-Dpsb-fMJ.mjs.map} +1 -1
- package/dist/{oauth-clients-CvI0nHMJ.mjs → oauth-clients-Bxnoe_67.mjs} +1 -1
- package/dist/{oauth-clients-CvI0nHMJ.mjs.map → oauth-clients-Bxnoe_67.mjs.map} +1 -1
- package/dist/{oauth-state-store-Ba8KZlwW.mjs → oauth-state-store-0C4s0K6w.mjs} +1 -1
- package/dist/{oauth-state-store-Ba8KZlwW.mjs.map → oauth-state-store-0C4s0K6w.mjs.map} +1 -1
- package/dist/{oauth-user-lookup-C5SQwGYC.mjs → oauth-user-lookup-wlGYSeqX.mjs} +1 -1
- package/dist/{oauth-user-lookup-C5SQwGYC.mjs.map → oauth-user-lookup-wlGYSeqX.mjs.map} +1 -1
- package/dist/object-cache/memory.d.mts +1 -1
- package/dist/{options-CBXIHUoT.mjs → options-BHPeIbBd.mjs} +1 -1
- package/dist/{options-CBXIHUoT.mjs.map → options-BHPeIbBd.mjs.map} +1 -1
- package/dist/{options--hhz-jZ1.d.mts → options-BhZIeFY1.d.mts} +3 -3
- package/dist/{options--hhz-jZ1.d.mts.map → options-BhZIeFY1.d.mts.map} +1 -1
- package/dist/page/index.d.mts +2 -2
- package/dist/{parse-DFbuc-Fh.mjs → parse-BRJg1kz8.mjs} +2 -2
- package/dist/{parse-DFbuc-Fh.mjs.map → parse-BRJg1kz8.mjs.map} +1 -1
- package/dist/{passkey-config-DFAmUyuE.mjs → passkey-config-B3P0nHRR.mjs} +1 -1
- package/dist/{passkey-config-DFAmUyuE.mjs.map → passkey-config-B3P0nHRR.mjs.map} +1 -1
- package/dist/{patterns-CiyXeDgr.mjs → patterns-D9iDO3j8.mjs} +1 -1
- package/dist/{patterns-CiyXeDgr.mjs.map → patterns-D9iDO3j8.mjs.map} +1 -1
- package/dist/{placeholder-Dp0K3RkD.d.mts → placeholder-BR4ZhVJl.d.mts} +7 -1
- package/dist/placeholder-BR4ZhVJl.d.mts.map +1 -0
- package/dist/plugin-types.d.mts +1 -1
- package/dist/plugin-utils.d.mts +10 -10
- package/dist/plugins/adapt-sandbox-entry.d.mts +10 -10
- package/dist/plugins/adapt-sandbox-entry.mjs +2 -2
- package/dist/{policy-TluUIxuu.mjs → policy-BVRganJQ.mjs} +2 -2
- package/dist/{policy-TluUIxuu.mjs.map → policy-BVRganJQ.mjs.map} +1 -1
- package/dist/{portable-text-imBW5cHK.mjs → portable-text-C8Tvp4_g.mjs} +1 -1
- package/dist/{portable-text-imBW5cHK.mjs.map → portable-text-C8Tvp4_g.mjs.map} +1 -1
- package/dist/{preview-PW-nOnq4.mjs → preview-dn2dUyM0.mjs} +2 -2
- package/dist/{preview-PW-nOnq4.mjs.map → preview-dn2dUyM0.mjs.map} +1 -1
- package/dist/{protocol-DjsJHTlK.d.mts → protocol-CuBEsqgE.d.mts} +2 -2
- package/dist/{protocol-DjsJHTlK.d.mts.map → protocol-CuBEsqgE.d.mts.map} +1 -1
- package/dist/{public-url-CWoFhQT8.mjs → public-url-DRz_AinV.mjs} +1 -1
- package/dist/{public-url-CWoFhQT8.mjs.map → public-url-DRz_AinV.mjs.map} +1 -1
- package/dist/{query-zTVAR1Sl.mjs → query-D18vTdha.mjs} +14 -14
- package/dist/{query-zTVAR1Sl.mjs.map → query-D18vTdha.mjs.map} +1 -1
- package/dist/{query-BWs7O5Il.mjs → query-tZDEdtCN.mjs} +4 -4
- package/dist/{query-BWs7O5Il.mjs.map → query-tZDEdtCN.mjs.map} +1 -1
- package/dist/{rate-limit-Bx4g9m3p.mjs → rate-limit-on7KPo-v.mjs} +2 -2
- package/dist/{rate-limit-Bx4g9m3p.mjs.map → rate-limit-on7KPo-v.mjs.map} +1 -1
- package/dist/{redirect-COsS6SWJ.mjs → redirect-CZkbozu9.mjs} +2 -2
- package/dist/{redirect-COsS6SWJ.mjs.map → redirect-CZkbozu9.mjs.map} +1 -1
- package/dist/{redirect-BgAOGHDq.mjs → redirect-DrbEmU9a.mjs} +1 -1
- package/dist/{redirect-BgAOGHDq.mjs.map → redirect-DrbEmU9a.mjs.map} +1 -1
- package/dist/{redirects-DyChwDkG.mjs → redirects-BahWiu8Z.mjs} +5 -5
- package/dist/{redirects-DyChwDkG.mjs.map → redirects-BahWiu8Z.mjs.map} +1 -1
- package/dist/{redirects-DTDHWH31.mjs → redirects-CRIM55KH.mjs} +6 -6
- package/dist/{redirects-DTDHWH31.mjs.map → redirects-CRIM55KH.mjs.map} +1 -1
- package/dist/{api-BeBglVxU.mjs → registry-BiO5WwPq.mjs} +483 -2462
- package/dist/registry-BiO5WwPq.mjs.map +1 -0
- package/dist/{registry-Cqa2I749.mjs → registry-Cx-jEJOS.mjs} +9 -123
- package/dist/registry-Cx-jEJOS.mjs.map +1 -0
- package/dist/{relation-BnHB0T4J.mjs → relation-A6wLF_DS.mjs} +2 -2
- package/dist/{relation-BnHB0T4J.mjs.map → relation-A6wLF_DS.mjs.map} +1 -1
- package/dist/{relations-BBApI4e2.mjs → relations-BTPM2saV.mjs} +2 -2
- package/dist/{relations-BBApI4e2.mjs.map → relations-BTPM2saV.mjs.map} +1 -1
- package/dist/{relations-BHo5A8Zf.d.mts → relations-C7B46bcU.d.mts} +192 -33
- package/dist/relations-C7B46bcU.d.mts.map +1 -0
- package/dist/{relations-D5sM5fW0.mjs → relations-Cj5hZ6Zg.mjs} +4 -4
- package/dist/{relations-D5sM5fW0.mjs.map → relations-Cj5hZ6Zg.mjs.map} +1 -1
- package/dist/{request-cache-BSUptuJR.mjs → request-cache-DH9zdCOD.mjs} +1 -1
- package/dist/{request-cache-BSUptuJR.mjs.map → request-cache-DH9zdCOD.mjs.map} +1 -1
- package/dist/request-context.d.mts +1 -1
- package/dist/{request-meta-DgZJh3zG.mjs → request-meta-DRp5ENd_.mjs} +2 -2
- package/dist/{request-meta-DgZJh3zG.mjs.map → request-meta-DRp5ENd_.mjs.map} +1 -1
- package/dist/{resolve-DOhVEvty.mjs → resolve-DxUpTMmE.mjs} +1 -1
- package/dist/{resolve-DOhVEvty.mjs.map → resolve-DxUpTMmE.mjs.map} +1 -1
- package/dist/{runner-C1T11CfC.mjs → runner-77GOZCnH.mjs} +410 -286
- package/dist/runner-77GOZCnH.mjs.map +1 -0
- package/dist/{runner-BYHZn3Jy.d.mts → runner-zgqA_CqP.d.mts} +2 -2
- package/dist/{runner-BYHZn3Jy.d.mts.map → runner-zgqA_CqP.d.mts.map} +1 -1
- package/dist/runtime.d.mts +11 -11
- package/dist/runtime.mjs +1 -1
- package/dist/{schema-DZ5YVVZj.mjs → schema-BY-oVntF.mjs} +3 -3
- package/dist/{schema-DZ5YVVZj.mjs.map → schema-BY-oVntF.mjs.map} +1 -1
- package/dist/{schema-2AOsSn2v.mjs → schema-Cw9kVK0I.mjs} +35 -5
- package/dist/{schema-2AOsSn2v.mjs.map → schema-Cw9kVK0I.mjs.map} +1 -1
- package/dist/{scopes-8ClPF2bC.mjs → scopes-vMR1uIbt.mjs} +3 -3
- package/dist/{scopes-8ClPF2bC.mjs.map → scopes-vMR1uIbt.mjs.map} +1 -1
- package/dist/{search-u1QYdOCG.mjs → search-CfT3KxO5.mjs} +4 -4
- package/dist/{search-u1QYdOCG.mjs.map → search-CfT3KxO5.mjs.map} +1 -1
- package/dist/{secrets-BEgsAQEU.mjs → secrets-BH2Qow1-.mjs} +3 -3
- package/dist/{secrets-BEgsAQEU.mjs.map → secrets-BH2Qow1-.mjs.map} +1 -1
- package/dist/{sections-DmHviGyM.mjs → sections-DTfjyf1z.mjs} +2 -2
- package/dist/{sections-DmHviGyM.mjs.map → sections-DTfjyf1z.mjs.map} +1 -1
- package/dist/seed/index.d.mts +2 -2
- package/dist/seed/index.mjs +24 -22
- package/dist/seo/index.d.mts +3 -3
- package/dist/seo/index.mjs +16 -14
- package/dist/seo/index.mjs.map +1 -1
- package/dist/{seo-AFpVvTqr.mjs → seo-BSiTIXzd.mjs} +1 -1
- package/dist/{seo-AFpVvTqr.mjs.map → seo-BSiTIXzd.mjs.map} +1 -1
- package/dist/{seo-Dq4G-RrO.mjs → seo-Cm-dtvgk.mjs} +2 -2
- package/dist/{seo-Dq4G-RrO.mjs.map → seo-Cm-dtvgk.mjs.map} +1 -1
- package/dist/{service-BpArayPr.mjs → service-DYsDHEKe.mjs} +3 -3
- package/dist/{service-BpArayPr.mjs.map → service-DYsDHEKe.mjs.map} +1 -1
- package/dist/{session-user-BEorKVT-.mjs → session-user-CNAfvsdw.mjs} +1 -1
- package/dist/{session-user-BEorKVT-.mjs.map → session-user-CNAfvsdw.mjs.map} +1 -1
- package/dist/{settings-xRdoUZr0.mjs → settings-BgN-0DT-.mjs} +6 -6
- package/dist/{settings-xRdoUZr0.mjs.map → settings-BgN-0DT-.mjs.map} +1 -1
- package/dist/{settings-DE9xtzqd.mjs → settings-DjtkUo__.mjs} +3 -3
- package/dist/{settings-DE9xtzqd.mjs.map → settings-DjtkUo__.mjs.map} +1 -1
- package/dist/{setup-complete-BnT8pq_C.mjs → setup-complete-CcpXaPU7.mjs} +2 -2
- package/dist/{setup-complete-BnT8pq_C.mjs.map → setup-complete-CcpXaPU7.mjs.map} +1 -1
- package/dist/{setup-nonce-CBitf_oQ.mjs → setup-nonce-Reyw30jg.mjs} +1 -1
- package/dist/{setup-nonce-CBitf_oQ.mjs.map → setup-nonce-Reyw30jg.mjs.map} +1 -1
- package/dist/{single-flight-cache-B0eLKS6K.mjs → single-flight-cache-BPuGPdcN.mjs} +2 -2
- package/dist/{single-flight-cache-B0eLKS6K.mjs.map → single-flight-cache-BPuGPdcN.mjs.map} +1 -1
- package/dist/{site-url-DjpIXMXJ.mjs → site-url-Cs_V9n3V.mjs} +3 -3
- package/dist/{site-url-DjpIXMXJ.mjs.map → site-url-Cs_V9n3V.mjs.map} +1 -1
- package/dist/{snapshot-BBlGkb2q.mjs → snapshot-DSB8P7Lm.mjs} +1 -1
- package/dist/{snapshot-BBlGkb2q.mjs.map → snapshot-DSB8P7Lm.mjs.map} +1 -1
- package/dist/{ssrf-Cpvg_n3A.mjs → ssrf-DqebVE34.mjs} +21 -5
- package/dist/{ssrf-Cpvg_n3A.mjs.map → ssrf-DqebVE34.mjs.map} +1 -1
- package/dist/{state-DYwPue40.mjs → state-BJfU9Uzw.mjs} +12 -4
- package/dist/state-BJfU9Uzw.mjs.map +1 -0
- package/dist/{status-CWVYpbD8.mjs → status-DDu8HIQl.mjs} +1 -1
- package/dist/{status-CWVYpbD8.mjs.map → status-DDu8HIQl.mjs.map} +1 -1
- package/dist/storage/local.d.mts +1 -1
- package/dist/storage/local.mjs +1 -1
- package/dist/storage/s3.d.mts +1 -1
- package/dist/storage/s3.mjs +1 -1
- package/dist/{target-DixqqV5i.mjs → target-D0o26Azo.mjs} +1 -1
- package/dist/{target-DixqqV5i.mjs.map → target-D0o26Azo.mjs.map} +1 -1
- package/dist/{taxonomies-OHUIiIpI.mjs → taxonomies-CPGxo-bn.mjs} +5 -5
- package/dist/{taxonomies-OHUIiIpI.mjs.map → taxonomies-CPGxo-bn.mjs.map} +1 -1
- package/dist/{taxonomies-BlrncHi9.mjs → taxonomies-kmyudNGP.mjs} +7 -7
- package/dist/{taxonomies-BlrncHi9.mjs.map → taxonomies-kmyudNGP.mjs.map} +1 -1
- package/dist/{taxonomy-BqCZ1TdU.mjs → taxonomy-8X09dLN5.mjs} +4 -4
- package/dist/{taxonomy-BqCZ1TdU.mjs.map → taxonomy-8X09dLN5.mjs.map} +1 -1
- package/dist/{tokens-C39klX8R.mjs → tokens-gTS-IVUp.mjs} +1 -1
- package/dist/{tokens-C39klX8R.mjs.map → tokens-gTS-IVUp.mjs.map} +1 -1
- package/dist/{transaction-NQj4VJ7Z.mjs → transaction-0KOpOyMu.mjs} +2 -1
- package/dist/{transaction-NQj4VJ7Z.mjs.map → transaction-0KOpOyMu.mjs.map} +1 -1
- package/dist/{transport-RQE36APG.d.mts → transport-_6R1ub7t.d.mts} +1 -1
- package/dist/{transport-RQE36APG.d.mts.map → transport-_6R1ub7t.d.mts.map} +1 -1
- package/dist/{transport-DBJwa-Si.mjs → transport-fX59xaJz.mjs} +4 -3
- package/dist/{transport-DBJwa-Si.mjs.map → transport-fX59xaJz.mjs.map} +1 -1
- package/dist/{trusted-proxy-CEVekpby.mjs → trusted-proxy-fe6nEgR4.mjs} +1 -1
- package/dist/{trusted-proxy-CEVekpby.mjs.map → trusted-proxy-fe6nEgR4.mjs.map} +1 -1
- package/dist/types-75KIqzL9.mjs.map +1 -1
- package/dist/{types-BW1syrlw.mjs → types-BXUmsINL.mjs} +1 -1
- package/dist/{types-BW1syrlw.mjs.map → types-BXUmsINL.mjs.map} +1 -1
- package/dist/{types-BntycPTF.d.mts → types-Blb-MRC3.d.mts} +1 -1
- package/dist/{types-BntycPTF.d.mts.map → types-Blb-MRC3.d.mts.map} +1 -1
- package/dist/{types-C2pMvO62.d.mts → types-Br-ERaxh.d.mts} +2 -1
- package/dist/types-Br-ERaxh.d.mts.map +1 -0
- package/dist/{types-DWRhk9xZ.d.mts → types-BzBd3PeX.d.mts} +1 -1
- package/dist/{types-DWRhk9xZ.d.mts.map → types-BzBd3PeX.d.mts.map} +1 -1
- package/dist/{types-CXnOzDe1.d.mts → types-CLqvnd05.d.mts} +1 -1
- package/dist/{types-CXnOzDe1.d.mts.map → types-CLqvnd05.d.mts.map} +1 -1
- package/dist/{types-Dfk8KI5R.d.mts → types-D5VVLr7J.d.mts} +1 -1
- package/dist/{types-Dfk8KI5R.d.mts.map → types-D5VVLr7J.d.mts.map} +1 -1
- package/dist/{types-DQIDRKF2.d.mts → types-DHxzBjbD.d.mts} +10 -1
- package/dist/types-DHxzBjbD.d.mts.map +1 -0
- package/dist/{types-DN64_zzZ.d.mts → types-DJQxln7q.d.mts} +3 -3
- package/dist/{types-DN64_zzZ.d.mts.map → types-DJQxln7q.d.mts.map} +1 -1
- package/dist/{types-CtzytVXn.mjs → types-DM3vioBY.mjs} +1 -1
- package/dist/{types-CtzytVXn.mjs.map → types-DM3vioBY.mjs.map} +1 -1
- package/dist/{types-BcqdcT-r.d.mts → types-D_DWe7k9.d.mts} +1 -1
- package/dist/{types-BcqdcT-r.d.mts.map → types-D_DWe7k9.d.mts.map} +1 -1
- package/dist/{types-DrJrVCT1.d.mts → types-Vg6f5i3s.d.mts} +3 -3
- package/dist/{types-DrJrVCT1.d.mts.map → types-Vg6f5i3s.d.mts.map} +1 -1
- package/dist/{upload-attempts-D4FS8LT6.mjs → upload-attempts-CNyGSepg.mjs} +1 -1
- package/dist/{upload-attempts-D4FS8LT6.mjs.map → upload-attempts-CNyGSepg.mjs.map} +1 -1
- package/dist/{url-pattern-BHS0V5Ng.mjs → url-pattern-K-KdXcSe.mjs} +1 -1
- package/dist/{url-pattern-BHS0V5Ng.mjs.map → url-pattern-K-KdXcSe.mjs.map} +1 -1
- package/dist/{user-DJZfUJVE.mjs → user-CtYY0tp2.mjs} +2 -2
- package/dist/{user-DJZfUJVE.mjs.map → user-CtYY0tp2.mjs.map} +1 -1
- package/dist/{utils-D4vD_Y98.mjs → utils-HztC73hq.mjs} +1 -1
- package/dist/{utils-D4vD_Y98.mjs.map → utils-HztC73hq.mjs.map} +1 -1
- package/dist/{validate-BMLBvxOC.mjs → validate-Dd-IUjnZ.mjs} +2 -2
- package/dist/{validate-BMLBvxOC.mjs.map → validate-Dd-IUjnZ.mjs.map} +1 -1
- package/dist/{validate-CTqt5nuE.d.mts → validate-DlqdOZXB.d.mts} +5 -5
- package/dist/{validate-CTqt5nuE.d.mts.map → validate-DlqdOZXB.d.mts.map} +1 -1
- package/dist/{validation-npvENUCB.mjs → validation-D83n7Npi.mjs} +10 -8
- package/dist/{validation-npvENUCB.mjs.map → validation-D83n7Npi.mjs.map} +1 -1
- package/dist/version-ri-sCyAp.mjs +7 -0
- package/dist/{version-DB_fqCSI.mjs.map → version-ri-sCyAp.mjs.map} +1 -1
- package/dist/{widgets-BD3ho7Rq.mjs → widgets-CpmZd9Q-.mjs} +4 -4
- package/dist/{widgets-BD3ho7Rq.mjs.map → widgets-CpmZd9Q-.mjs.map} +1 -1
- package/dist/{wxr-taxonomies-Ca68766D.d.mts → wxr-taxonomies-BFd0y72_.d.mts} +1 -1
- package/dist/{wxr-taxonomies-Ca68766D.d.mts.map → wxr-taxonomies-BFd0y72_.d.mts.map} +1 -1
- package/dist/{wxr-taxonomies-B1R3vBoD.mjs → wxr-taxonomies-Df4vxWcU.mjs} +4 -4
- package/dist/{wxr-taxonomies-B1R3vBoD.mjs.map → wxr-taxonomies-Df4vxWcU.mjs.map} +1 -1
- package/dist/{zod-generator-LC-on_Vb.mjs → zod-generator-DylzusHh.mjs} +24 -18
- package/dist/zod-generator-DylzusHh.mjs.map +1 -0
- package/package.json +16 -8
- package/src/api/errors.ts +20 -0
- package/src/api/handlers/index.ts +17 -0
- package/src/api/handlers/media-allowlist.ts +1 -0
- package/src/api/handlers/media-folders.ts +130 -0
- package/src/api/handlers/media-usage-activation.ts +102 -0
- package/src/api/handlers/media-usage.ts +108 -0
- package/src/api/handlers/media.ts +62 -2
- package/src/api/handlers/registry.ts +134 -316
- package/src/api/openapi/document.ts +192 -2
- package/src/api/schemas/media-usage.ts +77 -0
- package/src/api/schemas/media.ts +69 -0
- package/src/astro/integration/routes.ts +18 -0
- package/src/astro/integration/vite-config.ts +2 -7
- package/src/astro/middleware/auth.ts +4 -0
- package/src/astro/middleware.ts +0 -7
- package/src/astro/routes/api/admin/media-usage/activation.ts +42 -0
- package/src/astro/routes/api/admin/media-usage/progress.ts +37 -0
- package/src/astro/routes/api/admin/plugins/registry/artifact.ts +246 -96
- package/src/astro/routes/api/auth/me.ts +14 -2
- package/src/astro/routes/api/media/[id].ts +3 -0
- package/src/astro/routes/api/media/folders/[id].ts +55 -0
- package/src/astro/routes/api/media/folders/index.ts +37 -0
- package/src/astro/routes/api/media.ts +12 -2
- package/src/astro/routes/api/setup/dev-bypass.ts +12 -0
- package/src/astro/types.ts +11 -1
- package/src/client/index.ts +140 -2
- package/src/client/transport.ts +6 -2
- package/src/components/EmDashImage.astro +154 -50
- package/src/components/Gallery.astro +7 -0
- package/src/components/InlinePortableTextEditor.tsx +130 -1
- package/src/components/LiveSearch.astro +23 -0
- package/src/components/inline-code-block.tsx +180 -49
- package/src/content/converters/gallery.ts +2 -0
- package/src/content/converters/types.ts +2 -0
- package/src/database/connection.ts +2 -31
- package/src/database/index.ts +1 -1
- package/src/database/json-recordset.ts +16 -0
- package/src/database/migrations/019_i18n.ts +1 -1
- package/src/database/migrations/071_restore_content_bylines_table.ts +43 -0
- package/src/database/migrations/072_media_folders.ts +72 -0
- package/src/database/migrations/073_media_focal_point.ts +57 -0
- package/src/database/migrations/runner.ts +8 -2
- package/src/database/repositories/content.ts +5 -4
- package/src/database/repositories/media-folders.ts +115 -0
- package/src/database/repositories/media-usage-work.ts +395 -111
- package/src/database/repositories/media-usage.ts +1038 -10
- package/src/database/repositories/media.ts +97 -29
- package/src/database/transaction.ts +1 -0
- package/src/database/types.ts +13 -0
- package/src/db/adapters.ts +2 -2
- package/src/db/node-sqlite-compat.ts +78 -0
- package/src/db/sqlite.ts +3 -3
- package/src/emdash-runtime.ts +110 -105
- package/src/fields/image.ts +7 -1
- package/src/fields/types.ts +6 -2
- package/src/index.ts +5 -0
- package/src/media/focal-point.ts +37 -0
- package/src/media/local-runtime.ts +8 -0
- package/src/media/mime.ts +1 -0
- package/src/media/normalize.ts +10 -0
- package/src/media/types.ts +10 -0
- package/src/media/usage/activation.ts +162 -35
- package/src/media/usage/capture-triggers.ts +19 -3
- package/src/media/usage/collection-deletion-processor.ts +7 -3
- package/src/media/usage/collection-deletion.ts +10 -0
- package/src/media/usage/content-refresh.ts +258 -39
- package/src/media/usage/content-snapshots.ts +128 -31
- package/src/media/usage/extractor.ts +32 -13
- package/src/media/usage/maintenance-engine.ts +166 -0
- package/src/media/usage/reconciliation-processor.ts +106 -29
- package/src/media/usage/reconciliation.ts +90 -7
- package/src/media/usage/work-processor.ts +342 -101
- package/src/plugins/index.ts +1 -0
- package/src/plugins/save-rejection.ts +20 -0
- package/src/plugins/scheduler/node.ts +1 -13
- package/src/plugins/scheduler/types.ts +0 -2
- package/src/plugins/state.ts +13 -3
- package/src/registry/artifact-fetch.ts +530 -0
- package/src/registry/config.ts +24 -6
- package/src/registry/types.ts +12 -15
- package/src/schema/types.ts +1 -0
- package/src/schema/zod-generator.ts +12 -4
- package/src/security/ssrf.ts +21 -2
- package/src/seed/apply.ts +4 -4
- package/src/ui.ts +2 -0
- package/dist/api-BeBglVxU.mjs.map +0 -1
- package/dist/collection-deletion-DQPvMD8R.mjs.map +0 -1
- package/dist/content-ZHCc1ngN.mjs.map +0 -1
- package/dist/content-refresh-B_8SJzuU.mjs.map +0 -1
- package/dist/errors-CLUPm7aD.mjs.map +0 -1
- package/dist/index-BVBZj4-7.d.mts.map +0 -1
- package/dist/media-BWWWb8kg.mjs.map +0 -1
- package/dist/media-CzhAn2--.mjs.map +0 -1
- package/dist/media-allowlist-D6x-Us02.mjs.map +0 -1
- package/dist/media-usage-BZCydfvu.mjs.map +0 -1
- package/dist/media-usage-work-DrCbqBcl.mjs.map +0 -1
- package/dist/menus-DSo5QeW0.mjs.map +0 -1
- package/dist/mime-DfIVjNkr.mjs.map +0 -1
- package/dist/normalize-Bc-s_r-a.mjs.map +0 -1
- package/dist/placeholder-Dp0K3RkD.d.mts.map +0 -1
- package/dist/registry-Cqa2I749.mjs.map +0 -1
- package/dist/relations-BHo5A8Zf.d.mts.map +0 -1
- package/dist/runner-C1T11CfC.mjs.map +0 -1
- package/dist/state-DYwPue40.mjs.map +0 -1
- package/dist/types-C2pMvO62.d.mts.map +0 -1
- package/dist/types-DQIDRKF2.d.mts.map +0 -1
- package/dist/version-DB_fqCSI.mjs +0 -7
- package/dist/zod-generator-LC-on_Vb.mjs.map +0 -1
- /package/dist/{api-tokens-rIXC6LdE.mjs → api-tokens-B5NHLNUN.mjs} +0 -0
- /package/dist/{ssrf-DpXgKsna.mjs → ssrf-BPKzkm6O.mjs} +0 -0
- /package/dist/{types-CP1CflWf.mjs → types-D6OcIp2P.mjs} +0 -0
|
@@ -8,11 +8,10 @@
|
|
|
8
8
|
* aggregator's `resolvePackage` XRPC.
|
|
9
9
|
* 2. Look up the requested release (or the policy-filtered latest one)
|
|
10
10
|
* via `getLatestRelease` / `listReleases`.
|
|
11
|
-
* 3.
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* falling back to the publisher-declared URL.
|
|
11
|
+
* 3. Require the aggregator's approved listing projection, then apply the
|
|
12
|
+
* independent release-age and environment policies.
|
|
13
|
+
* 4. Fetch the bundle artifact through an advertised record-scoped cache,
|
|
14
|
+
* the publisher PDS, or the publisher-declared URL.
|
|
16
15
|
* 5. Verify the artifact's multibase checksum against the signed
|
|
17
16
|
* release record's `artifacts.package.checksum`.
|
|
18
17
|
* 6. Extract `manifest.json` + `backend.js` + optional `admin.js` from
|
|
@@ -32,16 +31,22 @@
|
|
|
32
31
|
* The artifact checksum is verified end-to-end against the value
|
|
33
32
|
* in the (aggregator-relayed) release record, which is the actual
|
|
34
33
|
* trust boundary for the bytes that end up in the sandbox.
|
|
35
|
-
* -
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
34
|
+
* - Listing approval controls whether metadata is eligible for discovery.
|
|
35
|
+
* It is never treated as approval of plugin code: checksum, bundle,
|
|
36
|
+
* manifest, access, consent, sandbox, and environment gates remain
|
|
37
|
+
* independent below.
|
|
39
38
|
*/
|
|
40
39
|
|
|
41
40
|
import { ClientResponseError, ClientValidationError } from "@atcute/client";
|
|
42
41
|
import type { Did } from "@atcute/lexicons";
|
|
43
42
|
import { checkEnvCompatibility, findSkippedEnvConstraints } from "@emdash-cms/registry-client/env";
|
|
44
43
|
import type { HostEnv } from "@emdash-cms/registry-client/env";
|
|
44
|
+
import { evaluateRegistryReleaseWithdrawal } from "@emdash-cms/registry-client/withdrawal";
|
|
45
|
+
import { NSID } from "@emdash-cms/registry-lexicons";
|
|
46
|
+
import {
|
|
47
|
+
fetchReleaseArtifact,
|
|
48
|
+
type ReleaseArtifactReference,
|
|
49
|
+
} from "@emdash-cms/registry-verification/artifact";
|
|
45
50
|
import type { Kysely } from "kysely";
|
|
46
51
|
|
|
47
52
|
import type { Database } from "../../database/types.js";
|
|
@@ -55,6 +60,7 @@ import {
|
|
|
55
60
|
} from "../../plugins/storage-indexes.js";
|
|
56
61
|
import { declaredAccessToCapabilities } from "../../plugins/types.js";
|
|
57
62
|
import type { DeclaredAccess } from "../../plugins/types.js";
|
|
63
|
+
import { fetchRegistryArtifactUrl } from "../../registry/artifact-fetch.js";
|
|
58
64
|
import {
|
|
59
65
|
canonicalCapabilitiesForDriftCheck,
|
|
60
66
|
coerceRegistryConfig,
|
|
@@ -64,7 +70,7 @@ import {
|
|
|
64
70
|
} from "../../registry/config.js";
|
|
65
71
|
import { makeRegistryPluginId } from "../../registry/plugin-id.js";
|
|
66
72
|
import type { RegistryConfigInput } from "../../registry/types.js";
|
|
67
|
-
import {
|
|
73
|
+
import { resolveAndValidateExternalUrlTarget } from "../../security/ssrf.js";
|
|
68
74
|
import { EmDashStorageError } from "../../storage/types.js";
|
|
69
75
|
import type { Storage } from "../../storage/types.js";
|
|
70
76
|
import type { ApiResult } from "../types.js";
|
|
@@ -76,6 +82,8 @@ import {
|
|
|
76
82
|
storeBundleInR2,
|
|
77
83
|
} from "./marketplace.js";
|
|
78
84
|
|
|
85
|
+
export { assertSafeArtifactUrl } from "../../registry/artifact-fetch.js";
|
|
86
|
+
|
|
79
87
|
const RELEASE_EXTENSION_NSID = "com.emdashcms.experimental.package.releaseExtension";
|
|
80
88
|
|
|
81
89
|
/**
|
|
@@ -241,30 +249,21 @@ const MAX_REDIRECTS = 5;
|
|
|
241
249
|
|
|
242
250
|
/**
|
|
243
251
|
* Wall-clock cap on any single artifact fetch attempt (per URL).
|
|
244
|
-
* Defends against slow-loris
|
|
252
|
+
* Defends against slow-loris artifact sources that accept the connection but
|
|
245
253
|
* never finish sending headers or body.
|
|
246
254
|
*/
|
|
247
255
|
const ARTIFACT_FETCH_TIMEOUT_MS = 15_000;
|
|
248
256
|
|
|
249
257
|
/**
|
|
250
258
|
* Total wall-clock budget for the artifact-download phase across all
|
|
251
|
-
*
|
|
252
|
-
*
|
|
259
|
+
* advertised caches, the publisher PDS, and the declared URL. Even with the
|
|
260
|
+
* per-URL timeout, unavailable sources could otherwise tie up the install request for
|
|
253
261
|
* minutes; this caps total time at a budget interactive admins can
|
|
254
262
|
* tolerate. Tuned so a fast happy path takes <1s of budget per
|
|
255
263
|
* attempt and a worst case still completes in under a minute.
|
|
256
264
|
*/
|
|
257
265
|
const ARTIFACT_TOTAL_BUDGET_MS = 45_000;
|
|
258
266
|
|
|
259
|
-
/**
|
|
260
|
-
* Cap on the number of mirror URLs we try before falling back to the
|
|
261
|
-
* publisher-declared URL. Matches the aggregator lexicon's
|
|
262
|
-
* `mirrors` array length cap (16) but enforced here independently so
|
|
263
|
-
* a misbehaving aggregator can't slow-loris us through hundreds of
|
|
264
|
-
* URLs.
|
|
265
|
-
*/
|
|
266
|
-
const MAX_MIRRORS = 16;
|
|
267
|
-
|
|
268
267
|
/**
|
|
269
268
|
* Per-request timeout applied to every aggregator XRPC call
|
|
270
269
|
* (`resolvePackage`, `getLatestRelease`, `listReleases`). Matches the
|
|
@@ -304,249 +303,45 @@ function timedFetch(totalDeadline: number): typeof fetch {
|
|
|
304
303
|
};
|
|
305
304
|
}
|
|
306
305
|
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
* credentials, any host that's a loopback / private / link-local
|
|
342
|
-
* literal address, and any hostname whose resolved A or AAAA records
|
|
343
|
-
* point at one of those addresses (closes the DNS-rebinding gap).
|
|
344
|
-
*
|
|
345
|
-
* Wraps `resolveAndValidateExternalUrl` from the import-pipeline SSRF
|
|
346
|
-
* module so both code paths share one DoH cache, one resolver, one
|
|
347
|
-
* blocklist, and one set of regression tests. Layers an
|
|
348
|
-
* artifact-specific protocol/dev-localhost policy on top.
|
|
349
|
-
*
|
|
350
|
-
* `import.meta.env.DEV` is a Vite/Astro compile-time constant, so
|
|
351
|
-
* production bundles cannot enable the dev escape hatch at runtime.
|
|
352
|
-
*/
|
|
353
|
-
export async function assertSafeArtifactUrl(urlString: string): Promise<URL> {
|
|
354
|
-
let url: URL;
|
|
355
|
-
try {
|
|
356
|
-
url = new URL(urlString);
|
|
357
|
-
} catch {
|
|
358
|
-
throw new Error(`Invalid artifact URL: ${urlString}`);
|
|
359
|
-
}
|
|
360
|
-
if (url.protocol !== "https:" && url.protocol !== "http:") {
|
|
361
|
-
throw new Error(`Artifact URL protocol not allowed: ${url.protocol}`);
|
|
362
|
-
}
|
|
363
|
-
if (url.username || url.password) {
|
|
364
|
-
throw new Error("Artifact URL must not contain embedded credentials");
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
const rawHostname = url.hostname.toLowerCase().replace(TRAILING_DOT, "");
|
|
368
|
-
// Strip brackets so the IPv4/IPv6 checks see the canonical form.
|
|
369
|
-
const hostname =
|
|
370
|
-
rawHostname.startsWith("[") && rawHostname.endsWith("]")
|
|
371
|
-
? rawHostname.slice(1, -1)
|
|
372
|
-
: rawHostname;
|
|
373
|
-
const localhost = isLocalhostHostname(hostname);
|
|
374
|
-
|
|
375
|
-
// In production: reject HTTP entirely and reject localhost over any
|
|
376
|
-
// protocol -- a publisher pointing at `https://localhost` is still
|
|
377
|
-
// trying to bounce the server through its own loopback interface.
|
|
378
|
-
if (!import.meta.env.DEV) {
|
|
379
|
-
if (url.protocol === "http:") {
|
|
380
|
-
throw new Error("Artifact URL must use https");
|
|
381
|
-
}
|
|
382
|
-
if (localhost) {
|
|
383
|
-
throw new Error(`Artifact URL points to localhost: ${hostname}`);
|
|
384
|
-
}
|
|
385
|
-
} else if (url.protocol === "http:" && !localhost) {
|
|
386
|
-
// Dev mode: http allowed only for localhost.
|
|
387
|
-
throw new Error("Artifact URL must use https (http allowed only for localhost in dev)");
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
if (localhost) {
|
|
391
|
-
// Dev-only path; nothing to resolve.
|
|
392
|
-
return url;
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
// Delegate IP-literal + DNS-rebinding validation to the import
|
|
396
|
-
// pipeline's SSRF helper. Adapts the SsrfError to the existing
|
|
397
|
-
// artifact-URL error vocabulary so callers keep their current
|
|
398
|
-
// catch shape.
|
|
399
|
-
try {
|
|
400
|
-
return await resolveAndValidateExternalUrl(url.href);
|
|
401
|
-
} catch (err) {
|
|
402
|
-
if (err instanceof SsrfError) {
|
|
403
|
-
throw new Error(`Artifact URL rejected: ${err.message}`, { cause: err });
|
|
404
|
-
}
|
|
405
|
-
throw err;
|
|
406
|
-
}
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
/**
|
|
410
|
-
* Fetch one URL with manual redirect handling so every hop is
|
|
411
|
-
* URL-validated, a hard byte cap so a malicious response body cannot
|
|
412
|
-
* exhaust memory before the checksum check rejects it, and a wall-clock
|
|
413
|
-
* timeout that covers connect, headers, and body together. The timeout
|
|
414
|
-
* is the minimum of the per-URL cap and the remaining total budget so
|
|
415
|
-
* a late-arriving mirror still respects the install's global budget.
|
|
416
|
-
*/
|
|
417
|
-
async function fetchWithLimits(initialUrl: string, totalDeadline: number): Promise<Uint8Array> {
|
|
418
|
-
const now = Date.now();
|
|
419
|
-
const remaining = Math.max(0, totalDeadline - now);
|
|
420
|
-
if (remaining === 0) {
|
|
421
|
-
throw new Error("Artifact download budget exhausted");
|
|
422
|
-
}
|
|
423
|
-
const perUrlTimeout = Math.min(ARTIFACT_FETCH_TIMEOUT_MS, remaining);
|
|
424
|
-
const controller = new AbortController();
|
|
425
|
-
const timer = setTimeout(() => controller.abort(), perUrlTimeout);
|
|
426
|
-
try {
|
|
427
|
-
let current = await assertSafeArtifactUrl(initialUrl);
|
|
428
|
-
let response: Response;
|
|
429
|
-
for (let hop = 0; hop <= MAX_REDIRECTS; hop++) {
|
|
430
|
-
response = await fetch(current.href, { redirect: "manual", signal: controller.signal });
|
|
431
|
-
if (response.status < 300 || response.status >= 400) break;
|
|
432
|
-
const location = response.headers.get("location");
|
|
433
|
-
if (!location) break;
|
|
434
|
-
if (hop === MAX_REDIRECTS) {
|
|
435
|
-
throw new Error(`Too many redirects fetching artifact (>${MAX_REDIRECTS})`);
|
|
436
|
-
}
|
|
437
|
-
const next = new URL(location, current);
|
|
438
|
-
current = await assertSafeArtifactUrl(next.href);
|
|
439
|
-
}
|
|
440
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- response is assigned in the first loop iteration
|
|
441
|
-
const finalResponse = response!;
|
|
442
|
-
if (!finalResponse.ok) {
|
|
443
|
-
throw new Error(`HTTP ${finalResponse.status}`);
|
|
444
|
-
}
|
|
445
|
-
|
|
446
|
-
// Check Content-Length up front when present. Untrusted servers can
|
|
447
|
-
// lie or omit it; the streaming cap below is the real defense.
|
|
448
|
-
const lengthHeader = finalResponse.headers.get("content-length");
|
|
449
|
-
if (lengthHeader) {
|
|
450
|
-
const declared = Number(lengthHeader);
|
|
451
|
-
if (Number.isFinite(declared) && declared > MAX_ARTIFACT_BYTES) {
|
|
452
|
-
throw new Error(
|
|
453
|
-
`Artifact too large (declared ${declared} bytes, limit ${MAX_ARTIFACT_BYTES})`,
|
|
454
|
-
);
|
|
455
|
-
}
|
|
456
|
-
}
|
|
457
|
-
|
|
458
|
-
const body = finalResponse.body;
|
|
459
|
-
if (!body) {
|
|
460
|
-
// Workers can't return a null body for a normal GET; defensive fallback.
|
|
461
|
-
const buf = new Uint8Array(await finalResponse.arrayBuffer());
|
|
462
|
-
if (buf.byteLength > MAX_ARTIFACT_BYTES) {
|
|
463
|
-
throw new Error(`Artifact too large (limit ${MAX_ARTIFACT_BYTES} bytes)`);
|
|
464
|
-
}
|
|
465
|
-
return buf;
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
const reader = body.getReader();
|
|
469
|
-
const chunks: Uint8Array[] = [];
|
|
470
|
-
let total = 0;
|
|
471
|
-
while (true) {
|
|
472
|
-
const { done, value } = await reader.read();
|
|
473
|
-
if (done) break;
|
|
474
|
-
if (!value) continue;
|
|
475
|
-
total += value.byteLength;
|
|
476
|
-
if (total > MAX_ARTIFACT_BYTES) {
|
|
477
|
-
try {
|
|
478
|
-
await reader.cancel();
|
|
479
|
-
} catch {
|
|
480
|
-
// nothing to do
|
|
481
|
-
}
|
|
482
|
-
throw new Error(`Artifact too large (limit ${MAX_ARTIFACT_BYTES} bytes)`);
|
|
483
|
-
}
|
|
484
|
-
chunks.push(value);
|
|
485
|
-
}
|
|
486
|
-
|
|
487
|
-
const out = new Uint8Array(total);
|
|
488
|
-
let offset = 0;
|
|
489
|
-
for (const chunk of chunks) {
|
|
490
|
-
out.set(chunk, offset);
|
|
491
|
-
offset += chunk.byteLength;
|
|
492
|
-
}
|
|
493
|
-
return out;
|
|
494
|
-
} finally {
|
|
495
|
-
clearTimeout(timer);
|
|
496
|
-
}
|
|
497
|
-
}
|
|
498
|
-
|
|
499
|
-
/**
|
|
500
|
-
* Strip query string and fragment from a URL for use in
|
|
501
|
-
* client-visible error messages. Registry artifacts are often hosted
|
|
502
|
-
* on storage backends that include presigned tokens in the query
|
|
503
|
-
* string; surfacing the raw URL on a failed install leaks those
|
|
504
|
-
* tokens into the admin's HTTP response and any log drain that
|
|
505
|
-
* captures the error chain. Origin + pathname is enough to identify
|
|
506
|
-
* the host and resource without exposing credentials.
|
|
507
|
-
*
|
|
508
|
-
* Falls back to a generic placeholder when the URL is malformed.
|
|
509
|
-
*/
|
|
510
|
-
function redactUrlForError(raw: string): string {
|
|
511
|
-
try {
|
|
512
|
-
const u = new URL(raw);
|
|
513
|
-
return `${u.origin}${u.pathname}`;
|
|
514
|
-
} catch {
|
|
515
|
-
return "<malformed url>";
|
|
516
|
-
}
|
|
517
|
-
}
|
|
518
|
-
|
|
519
|
-
/** Walk artifact source URLs in priority order and return the first that fetches successfully. */
|
|
520
|
-
async function fetchArtifact(mirrors: string[], declaredUrl: string): Promise<Uint8Array> {
|
|
521
|
-
// Clamp mirrors regardless of what the lexicon type says -- a buggy
|
|
522
|
-
// or malicious aggregator could return more than the spec'd limit
|
|
523
|
-
// and slow-loris each one. The declared URL is always tried last.
|
|
524
|
-
const clampedMirrors = mirrors.slice(0, MAX_MIRRORS);
|
|
525
|
-
const urls = [...clampedMirrors, declaredUrl];
|
|
526
|
-
// Client-visible errors carry redacted URLs (origin + path only).
|
|
527
|
-
// The full URL with any query-string token is logged server-side
|
|
528
|
-
// so operators can still debug delivery failures.
|
|
529
|
-
const clientErrors: string[] = [];
|
|
530
|
-
|
|
531
|
-
const totalDeadline = Date.now() + ARTIFACT_TOTAL_BUDGET_MS;
|
|
532
|
-
|
|
533
|
-
for (const url of urls) {
|
|
534
|
-
if (Date.now() >= totalDeadline) {
|
|
535
|
-
clientErrors.push("(total artifact download budget exhausted)");
|
|
536
|
-
break;
|
|
537
|
-
}
|
|
538
|
-
try {
|
|
539
|
-
return await fetchWithLimits(url, totalDeadline);
|
|
540
|
-
} catch (err) {
|
|
541
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
542
|
-
console.warn(`[registry-install] Artifact fetch failed from ${url}:`, message);
|
|
543
|
-
clientErrors.push(`${redactUrlForError(url)}: ${message}`);
|
|
544
|
-
}
|
|
545
|
-
}
|
|
546
|
-
|
|
547
|
-
throw new Error(
|
|
548
|
-
`Failed to download artifact from any source. Tried:\n ${clientErrors.join("\n ")}`,
|
|
306
|
+
async function fetchArtifact(
|
|
307
|
+
artifactCaches: readonly unknown[],
|
|
308
|
+
artifact: ReleaseArtifactReference,
|
|
309
|
+
record: {
|
|
310
|
+
did: string;
|
|
311
|
+
collection: string;
|
|
312
|
+
rkey: string;
|
|
313
|
+
cid: string;
|
|
314
|
+
},
|
|
315
|
+
auth?: unknown,
|
|
316
|
+
): Promise<Uint8Array> {
|
|
317
|
+
const result = await fetchReleaseArtifact(
|
|
318
|
+
{
|
|
319
|
+
artifact,
|
|
320
|
+
record,
|
|
321
|
+
artifactCaches,
|
|
322
|
+
...(auth === undefined ? {} : { auth }),
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
fetch: async (url, init) => {
|
|
326
|
+
if (!init.signal) throw new Error("Registry artifact fetch requires an abort signal");
|
|
327
|
+
return fetchRegistryArtifactUrl(url.href, {
|
|
328
|
+
signal: init.signal,
|
|
329
|
+
maxResponseBytes: MAX_ARTIFACT_BYTES,
|
|
330
|
+
});
|
|
331
|
+
},
|
|
332
|
+
resolveHostname: async (hostname) =>
|
|
333
|
+
(await resolveAndValidateExternalUrlTarget(`https://${hostname}`)).addresses,
|
|
334
|
+
allowHttpLocalhost: import.meta.env.DEV,
|
|
335
|
+
headerTimeoutMs: ARTIFACT_FETCH_TIMEOUT_MS,
|
|
336
|
+
totalTimeoutMs: ARTIFACT_TOTAL_BUDGET_MS,
|
|
337
|
+
maxBytes: MAX_ARTIFACT_BYTES,
|
|
338
|
+
maxRedirects: MAX_REDIRECTS,
|
|
339
|
+
},
|
|
549
340
|
);
|
|
341
|
+
if (!result.success) {
|
|
342
|
+
throw new Error(`Artifact retrieval failed (${result.error.code}): ${result.error.message}`);
|
|
343
|
+
}
|
|
344
|
+
return result.value.bytes;
|
|
550
345
|
}
|
|
551
346
|
|
|
552
347
|
/**
|
|
@@ -658,7 +453,8 @@ export async function handleRegistryInstall(
|
|
|
658
453
|
|
|
659
454
|
// Lazy-load the discovery client. Avoids pulling @atcute/client into
|
|
660
455
|
// every code path that imports core/api/handlers.
|
|
661
|
-
const { DiscoveryClient } =
|
|
456
|
+
const { DiscoveryClient, registryLabelerPolicy } =
|
|
457
|
+
await import("@emdash-cms/registry-client/discovery");
|
|
662
458
|
|
|
663
459
|
// Every aggregator XRPC call passes through `timedFetch`, which
|
|
664
460
|
// enforces a per-request timeout and shares a single total-budget
|
|
@@ -668,6 +464,7 @@ export async function handleRegistryInstall(
|
|
|
668
464
|
const discovery = new DiscoveryClient({
|
|
669
465
|
aggregatorUrl: registryConfig.aggregatorUrl,
|
|
670
466
|
acceptLabelers: registryConfig.acceptLabelers,
|
|
467
|
+
labelerPolicy: registryLabelerPolicy(registryConfig.acceptLabelers),
|
|
671
468
|
fetch: timedFetch(aggregatorDeadline),
|
|
672
469
|
});
|
|
673
470
|
|
|
@@ -792,28 +589,19 @@ export async function handleRegistryInstall(
|
|
|
792
589
|
}
|
|
793
590
|
|
|
794
591
|
const version = releaseView.version;
|
|
795
|
-
|
|
796
|
-
// Step 3: takedown label check (hard-enforced via aggregator's
|
|
797
|
-
// `atproto-accept-labelers` filtering, but we belt-and-suspenders
|
|
798
|
-
// the package-level labels too).
|
|
799
|
-
const yanked = (packageView.labels ?? []).some(
|
|
800
|
-
(l: { val?: string }) => l.val === "security:yanked",
|
|
801
|
-
);
|
|
802
|
-
const releaseYanked = (releaseView.labels ?? []).some(
|
|
803
|
-
(l: { val?: string }) => l.val === "security:yanked",
|
|
804
|
-
);
|
|
805
|
-
if (yanked || releaseYanked) {
|
|
592
|
+
if (evaluateRegistryReleaseWithdrawal(releaseView, discovery.labelerPolicy).withdrawn) {
|
|
806
593
|
return {
|
|
807
594
|
success: false,
|
|
808
595
|
error: {
|
|
809
596
|
code: "RELEASE_YANKED",
|
|
810
|
-
message: "This release has been withdrawn
|
|
597
|
+
message: "This release has been withdrawn",
|
|
811
598
|
},
|
|
812
599
|
};
|
|
813
600
|
}
|
|
814
601
|
|
|
815
|
-
//
|
|
816
|
-
//
|
|
602
|
+
// Environment compatibility remains an install-safety gate. Listing
|
|
603
|
+
// approval says only that displayed metadata passed moderation. A release
|
|
604
|
+
// may carry a `requires` block (`env:emdash`, `env:astro`, ...). Refuse
|
|
817
605
|
// the install if the running host doesn't satisfy a constraint, so a
|
|
818
606
|
// stale browser tab or non-UI caller can't bypass the admin's
|
|
819
607
|
// disabled Install button. `requires` is lexicon-`unknown`; the
|
|
@@ -942,25 +730,33 @@ export async function handleRegistryInstall(
|
|
|
942
730
|
|
|
943
731
|
// Step 4: fetch the artifact bytes.
|
|
944
732
|
// `releaseView.release` is lexicon-validated by DiscoveryClient (or
|
|
945
|
-
// `null`); a missing
|
|
946
|
-
// below.
|
|
947
|
-
// not part of the signed record).
|
|
733
|
+
// `null`); a missing source/checksum (including the `null` case) fails
|
|
734
|
+
// closed below. Cache descriptors are unsigned aggregator operational data.
|
|
948
735
|
const release = releaseView.release;
|
|
949
|
-
const
|
|
950
|
-
const declaredChecksum =
|
|
736
|
+
const packageArtifact = release?.artifacts?.package;
|
|
737
|
+
const declaredChecksum = packageArtifact?.checksum;
|
|
951
738
|
|
|
952
|
-
if (!
|
|
739
|
+
if (!packageArtifact || !declaredChecksum) {
|
|
953
740
|
return {
|
|
954
741
|
success: false,
|
|
955
742
|
error: {
|
|
956
743
|
code: "INVALID_RELEASE",
|
|
957
|
-
message: "Release record is missing artifact
|
|
744
|
+
message: "Release record is missing its package artifact or checksum",
|
|
958
745
|
},
|
|
959
746
|
};
|
|
960
747
|
}
|
|
961
748
|
|
|
962
|
-
const
|
|
963
|
-
|
|
749
|
+
const artifactBytes = await fetchArtifact(
|
|
750
|
+
releaseView.artifactCaches ?? [],
|
|
751
|
+
packageArtifact,
|
|
752
|
+
{
|
|
753
|
+
did: publisherDid,
|
|
754
|
+
collection: NSID.packageRelease,
|
|
755
|
+
rkey: `${slug}:${version}`,
|
|
756
|
+
cid: releaseView.cid,
|
|
757
|
+
},
|
|
758
|
+
release.auth,
|
|
759
|
+
);
|
|
964
760
|
|
|
965
761
|
// Step 5: verify the bytes against the signed record's checksum.
|
|
966
762
|
const checksumOk = await verifyChecksum(artifactBytes, declaredChecksum);
|
|
@@ -1208,6 +1004,15 @@ export async function handleRegistryInstall(
|
|
|
1208
1004
|
};
|
|
1209
1005
|
}
|
|
1210
1006
|
if (err instanceof ClientResponseError) {
|
|
1007
|
+
if (err.error === "ListingUnavailable") {
|
|
1008
|
+
return {
|
|
1009
|
+
success: false,
|
|
1010
|
+
error: {
|
|
1011
|
+
code: "LISTING_UNAVAILABLE",
|
|
1012
|
+
message: "This plugin is unavailable under the active registry policy",
|
|
1013
|
+
},
|
|
1014
|
+
};
|
|
1015
|
+
}
|
|
1211
1016
|
return {
|
|
1212
1017
|
success: false,
|
|
1213
1018
|
error: {
|
|
@@ -1408,11 +1213,13 @@ export async function handleRegistryUpdate(
|
|
|
1408
1213
|
const publisherDid = existing.registryPublisherDid as Did;
|
|
1409
1214
|
const slug = existing.registrySlug;
|
|
1410
1215
|
|
|
1411
|
-
const { DiscoveryClient } =
|
|
1216
|
+
const { DiscoveryClient, registryLabelerPolicy } =
|
|
1217
|
+
await import("@emdash-cms/registry-client/discovery");
|
|
1412
1218
|
const aggregatorDeadline = Date.now() + AGGREGATOR_TOTAL_BUDGET_MS;
|
|
1413
1219
|
const discovery = new DiscoveryClient({
|
|
1414
1220
|
aggregatorUrl: registryConfig.aggregatorUrl,
|
|
1415
1221
|
acceptLabelers: registryConfig.acceptLabelers,
|
|
1222
|
+
labelerPolicy: registryLabelerPolicy(registryConfig.acceptLabelers),
|
|
1416
1223
|
fetch: timedFetch(aggregatorDeadline),
|
|
1417
1224
|
});
|
|
1418
1225
|
|
|
@@ -1479,6 +1286,12 @@ export async function handleRegistryUpdate(
|
|
|
1479
1286
|
}
|
|
1480
1287
|
|
|
1481
1288
|
const newVersion = releaseView.version;
|
|
1289
|
+
if (evaluateRegistryReleaseWithdrawal(releaseView, discovery.labelerPolicy).withdrawn) {
|
|
1290
|
+
return {
|
|
1291
|
+
success: false,
|
|
1292
|
+
error: { code: "YANKED", message: "Release has been withdrawn" },
|
|
1293
|
+
};
|
|
1294
|
+
}
|
|
1482
1295
|
if (newVersion === oldVersion) {
|
|
1483
1296
|
return {
|
|
1484
1297
|
success: false,
|
|
@@ -1489,18 +1302,8 @@ export async function handleRegistryUpdate(
|
|
|
1489
1302
|
};
|
|
1490
1303
|
}
|
|
1491
1304
|
|
|
1492
|
-
//
|
|
1493
|
-
|
|
1494
|
-
(l: { val?: string }) => l.val === "security:yanked",
|
|
1495
|
-
);
|
|
1496
|
-
if (releaseYanked) {
|
|
1497
|
-
return {
|
|
1498
|
-
success: false,
|
|
1499
|
-
error: { code: "YANKED", message: "Release has been yanked by a trusted labeller" },
|
|
1500
|
-
};
|
|
1501
|
-
}
|
|
1502
|
-
|
|
1503
|
-
// Environment compatibility gate. An ungated update could otherwise
|
|
1305
|
+
// Environment compatibility remains independent from listing approval.
|
|
1306
|
+
// An ungated update could otherwise
|
|
1504
1307
|
// land a version whose `requires` the host doesn't satisfy. Same
|
|
1505
1308
|
// guard as install; `requires` is lexicon-`unknown`.
|
|
1506
1309
|
if (opts?.hostEnv) {
|
|
@@ -1508,28 +1311,29 @@ export async function handleRegistryUpdate(
|
|
|
1508
1311
|
if (envError) return { success: false, error: envError };
|
|
1509
1312
|
}
|
|
1510
1313
|
|
|
1511
|
-
const
|
|
1512
|
-
const declaredChecksum =
|
|
1513
|
-
if (!
|
|
1314
|
+
const packageArtifact = signedRelease.artifacts?.package;
|
|
1315
|
+
const declaredChecksum = packageArtifact?.checksum;
|
|
1316
|
+
if (!packageArtifact || !declaredChecksum) {
|
|
1514
1317
|
return {
|
|
1515
1318
|
success: false,
|
|
1516
1319
|
error: {
|
|
1517
1320
|
code: "INVALID_RELEASE",
|
|
1518
|
-
message: "Release record is missing artifact
|
|
1321
|
+
message: "Release record is missing its package artifact or checksum",
|
|
1519
1322
|
},
|
|
1520
1323
|
};
|
|
1521
1324
|
}
|
|
1522
1325
|
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1326
|
+
const artifactBytes = await fetchArtifact(
|
|
1327
|
+
releaseView.artifactCaches ?? [],
|
|
1328
|
+
packageArtifact,
|
|
1329
|
+
{
|
|
1330
|
+
did: publisherDid,
|
|
1331
|
+
collection: NSID.packageRelease,
|
|
1332
|
+
rkey: `${slug}:${newVersion}`,
|
|
1333
|
+
cid: releaseView.cid,
|
|
1334
|
+
},
|
|
1335
|
+
signedRelease.auth,
|
|
1336
|
+
);
|
|
1533
1337
|
if (!(await verifyChecksum(artifactBytes, declaredChecksum))) {
|
|
1534
1338
|
return {
|
|
1535
1339
|
success: false,
|
|
@@ -1686,6 +1490,15 @@ export async function handleRegistryUpdate(
|
|
|
1686
1490
|
};
|
|
1687
1491
|
}
|
|
1688
1492
|
if (err instanceof ClientResponseError) {
|
|
1493
|
+
if (err.error === "ListingUnavailable") {
|
|
1494
|
+
return {
|
|
1495
|
+
success: false,
|
|
1496
|
+
error: {
|
|
1497
|
+
code: "LISTING_UNAVAILABLE",
|
|
1498
|
+
message: "This plugin is unavailable under the active registry policy",
|
|
1499
|
+
},
|
|
1500
|
+
};
|
|
1501
|
+
}
|
|
1689
1502
|
return {
|
|
1690
1503
|
success: false,
|
|
1691
1504
|
error: {
|
|
@@ -1759,11 +1572,13 @@ export async function handleRegistryUpdateCheck(
|
|
|
1759
1572
|
return { success: true, data: { items: [] } };
|
|
1760
1573
|
}
|
|
1761
1574
|
|
|
1762
|
-
const { DiscoveryClient } =
|
|
1575
|
+
const { DiscoveryClient, registryLabelerPolicy } =
|
|
1576
|
+
await import("@emdash-cms/registry-client/discovery");
|
|
1763
1577
|
const aggregatorDeadline = Date.now() + AGGREGATOR_TOTAL_BUDGET_MS;
|
|
1764
1578
|
const discovery = new DiscoveryClient({
|
|
1765
1579
|
aggregatorUrl: registryConfig.aggregatorUrl,
|
|
1766
1580
|
acceptLabelers: registryConfig.acceptLabelers,
|
|
1581
|
+
labelerPolicy: registryLabelerPolicy(registryConfig.acceptLabelers),
|
|
1767
1582
|
fetch: timedFetch(aggregatorDeadline),
|
|
1768
1583
|
});
|
|
1769
1584
|
|
|
@@ -1776,6 +1591,9 @@ export async function handleRegistryUpdateCheck(
|
|
|
1776
1591
|
did: plugin.registryPublisherDid as Did,
|
|
1777
1592
|
package: plugin.registrySlug,
|
|
1778
1593
|
});
|
|
1594
|
+
if (evaluateRegistryReleaseWithdrawal(releaseView, discovery.labelerPolicy).withdrawn) {
|
|
1595
|
+
continue;
|
|
1596
|
+
}
|
|
1779
1597
|
const latest = releaseView.version;
|
|
1780
1598
|
if (!latest) continue;
|
|
1781
1599
|
const installed = plugin.version;
|