emdash 0.19.0 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{adapters-C5AWLJSD.d.mts → adapters-BxSmgtbF.d.mts} +1 -1
- package/dist/{adapters-C5AWLJSD.d.mts.map → adapters-BxSmgtbF.d.mts.map} +1 -1
- package/dist/{allowed-origins-CyYLEJkp.mjs → allowed-origins-BqC8cul8.mjs} +2 -2
- package/dist/{allowed-origins-CyYLEJkp.mjs.map → allowed-origins-BqC8cul8.mjs.map} +1 -1
- package/dist/api/route-utils.d.mts +3 -3
- package/dist/api/route-utils.mjs +13 -12
- package/dist/api/route-utils.mjs.map +1 -1
- package/dist/api/schemas/index.d.mts +1 -1
- package/dist/api/schemas/index.mjs +3 -2
- package/dist/{api-BZ6bhjYs.mjs → api-DxjIV2o8.mjs} +46 -15
- package/dist/api-DxjIV2o8.mjs.map +1 -0
- package/dist/{api-tokens-VrXNiNvV.mjs → api-tokens-BFFkB0jB.mjs} +2 -2
- package/dist/{api-tokens-VrXNiNvV.mjs.map → api-tokens-BFFkB0jB.mjs.map} +1 -1
- package/dist/{apply-hQkKKBCf.mjs → apply-CLjxheyb.mjs} +12 -12
- package/dist/{apply-hQkKKBCf.mjs.map → apply-CLjxheyb.mjs.map} +1 -1
- package/dist/astro/index.d.mts +10 -10
- package/dist/astro/index.d.mts.map +1 -1
- package/dist/astro/index.mjs +50 -15
- package/dist/astro/index.mjs.map +1 -1
- package/dist/astro/middleware/auth.d.mts +9 -9
- package/dist/astro/middleware/auth.mjs +5 -5
- package/dist/astro/middleware/redirect.d.mts.map +1 -1
- package/dist/astro/middleware/redirect.mjs +11 -2
- package/dist/astro/middleware/redirect.mjs.map +1 -1
- package/dist/astro/middleware/request-context.mjs +3 -2
- package/dist/astro/middleware/request-context.mjs.map +1 -1
- package/dist/astro/middleware/setup.mjs +1 -1
- package/dist/astro/middleware.d.mts +1 -1
- package/dist/astro/middleware.d.mts.map +1 -1
- package/dist/astro/middleware.mjs +91 -137
- package/dist/astro/middleware.mjs.map +1 -1
- package/dist/astro/routes/api/admin/allowed-domains/_domain_.mjs +5 -4
- package/dist/astro/routes/api/admin/allowed-domains/_domain_.mjs.map +1 -1
- package/dist/astro/routes/api/admin/allowed-domains/index.mjs +5 -4
- package/dist/astro/routes/api/admin/allowed-domains/index.mjs.map +1 -1
- 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 +8 -7
- package/dist/astro/routes/api/admin/byline-fields/_slug_.mjs.map +1 -1
- package/dist/astro/routes/api/admin/byline-fields/index.mjs +8 -7
- package/dist/astro/routes/api/admin/byline-fields/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/byline-fields/reorder.mjs +8 -7
- package/dist/astro/routes/api/admin/byline-fields/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/admin/bylines/_id_/index.mjs +14 -12
- package/dist/astro/routes/api/admin/bylines/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs +14 -12
- package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs.map +1 -1
- package/dist/astro/routes/api/admin/bylines/index.mjs +14 -12
- package/dist/astro/routes/api/admin/bylines/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/comments/_id_/status.mjs +9 -8
- package/dist/astro/routes/api/admin/comments/_id_/status.mjs.map +1 -1
- package/dist/astro/routes/api/admin/comments/_id_.mjs +3 -3
- package/dist/astro/routes/api/admin/comments/bulk.mjs +7 -6
- package/dist/astro/routes/api/admin/comments/bulk.mjs.map +1 -1
- package/dist/astro/routes/api/admin/comments/counts.mjs +3 -3
- package/dist/astro/routes/api/admin/comments/index.mjs +7 -6
- package/dist/astro/routes/api/admin/comments/index.mjs.map +1 -1
- 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/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 +29 -27
- package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +29 -27
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +28 -26
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +28 -26
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs +28 -26
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/index.mjs +28 -26
- 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 +28 -26
- 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 +28 -26
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +28 -26
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.mjs +28 -26
- 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 +29 -27
- package/dist/astro/routes/api/admin/plugins/registry/_id_/update.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/artifact.mjs +28 -26
- package/dist/astro/routes/api/admin/plugins/registry/artifact.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/install.mjs +29 -27
- package/dist/astro/routes/api/admin/plugins/registry/install.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/updates.mjs +28 -26
- package/dist/astro/routes/api/admin/plugins/updates.mjs.map +1 -1
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +28 -26
- 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 +28 -26
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/users/_id_/disable.mjs +1 -1
- package/dist/astro/routes/api/admin/users/_id_/enable.mjs +1 -1
- package/dist/astro/routes/api/admin/users/_id_/index.mjs +5 -4
- package/dist/astro/routes/api/admin/users/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs +2 -2
- package/dist/astro/routes/api/admin/users/index.mjs +5 -4
- package/dist/astro/routes/api/admin/users/index.mjs.map +1 -1
- 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 +9 -8
- package/dist/astro/routes/api/auth/invite/complete.mjs.map +1 -1
- package/dist/astro/routes/api/auth/invite/index.mjs +6 -5
- package/dist/astro/routes/api/auth/invite/index.mjs.map +1 -1
- package/dist/astro/routes/api/auth/invite/register-options.mjs +8 -7
- package/dist/astro/routes/api/auth/invite/register-options.mjs.map +1 -1
- package/dist/astro/routes/api/auth/logout.mjs +2 -2
- package/dist/astro/routes/api/auth/magic-link/send.mjs +8 -7
- package/dist/astro/routes/api/auth/magic-link/send.mjs.map +1 -1
- package/dist/astro/routes/api/auth/magic-link/verify.mjs +2 -2
- package/dist/astro/routes/api/auth/me.mjs +5 -4
- package/dist/astro/routes/api/auth/me.mjs.map +1 -1
- package/dist/astro/routes/api/auth/mode.mjs +1 -1
- package/dist/astro/routes/api/auth/oauth/_provider_/callback.mjs +3 -3
- package/dist/astro/routes/api/auth/oauth/_provider_.mjs +2 -2
- package/dist/astro/routes/api/auth/passkey/_id_.mjs +5 -4
- package/dist/astro/routes/api/auth/passkey/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/auth/passkey/index.mjs +1 -1
- package/dist/astro/routes/api/auth/passkey/options.mjs +10 -9
- package/dist/astro/routes/api/auth/passkey/options.mjs.map +1 -1
- package/dist/astro/routes/api/auth/passkey/register/options.mjs +8 -7
- package/dist/astro/routes/api/auth/passkey/register/options.mjs.map +1 -1
- package/dist/astro/routes/api/auth/passkey/register/verify.mjs +9 -8
- package/dist/astro/routes/api/auth/passkey/register/verify.mjs.map +1 -1
- package/dist/astro/routes/api/auth/passkey/verify.mjs +9 -8
- package/dist/astro/routes/api/auth/passkey/verify.mjs.map +1 -1
- package/dist/astro/routes/api/auth/signup/complete.mjs +9 -8
- package/dist/astro/routes/api/auth/signup/complete.mjs.map +1 -1
- package/dist/astro/routes/api/auth/signup/request.mjs +8 -7
- package/dist/astro/routes/api/auth/signup/request.mjs.map +1 -1
- package/dist/astro/routes/api/auth/signup/verify.mjs +1 -1
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs +11 -9
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.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 +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/duplicate.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/permanent.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs +10 -8
- package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs +6 -5
- package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/restore.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/revisions.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs +6 -5
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs +10 -9
- 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 +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_.mjs +6 -5
- 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 +6 -5
- package/dist/astro/routes/api/content/_collection_/index.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/trash.mjs +6 -5
- package/dist/astro/routes/api/content/_collection_/trash.mjs.map +1 -1
- package/dist/astro/routes/api/dashboard.mjs +3 -3
- 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 +10 -9
- package/dist/astro/routes/api/import/probe.mjs.map +1 -1
- package/dist/astro/routes/api/import/wordpress/analyze.mjs +3 -3
- package/dist/astro/routes/api/import/wordpress/execute.d.mts +9 -9
- package/dist/astro/routes/api/import/wordpress/execute.mjs +10 -9
- package/dist/astro/routes/api/import/wordpress/execute.mjs.map +1 -1
- package/dist/astro/routes/api/import/wordpress/media.mjs +8 -7
- package/dist/astro/routes/api/import/wordpress/media.mjs.map +1 -1
- package/dist/astro/routes/api/import/wordpress/prepare.mjs +9 -8
- package/dist/astro/routes/api/import/wordpress/prepare.mjs.map +1 -1
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs +8 -7
- 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 +10 -9
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs.map +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/execute.d.mts +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs +14 -12
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs.map +1 -1
- package/dist/astro/routes/api/manifest.mjs +3 -3
- package/dist/astro/routes/api/mcp.mjs +20 -19
- package/dist/astro/routes/api/mcp.mjs.map +1 -1
- package/dist/astro/routes/api/media/_id_/confirm.mjs +6 -5
- package/dist/astro/routes/api/media/_id_/confirm.mjs.map +1 -1
- package/dist/astro/routes/api/media/_id_.mjs +6 -5
- 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/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 +8 -7
- package/dist/astro/routes/api/media/upload-url.mjs.map +1 -1
- package/dist/astro/routes/api/media.mjs +10 -9
- package/dist/astro/routes/api/media.mjs.map +1 -1
- package/dist/astro/routes/api/menus/_name_/items/_id_.mjs +6 -5
- package/dist/astro/routes/api/menus/_name_/items/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/menus/_name_/items.mjs +6 -5
- package/dist/astro/routes/api/menus/_name_/items.mjs.map +1 -1
- package/dist/astro/routes/api/menus/_name_/reorder.mjs +6 -5
- package/dist/astro/routes/api/menus/_name_/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/menus/_name_/translations.mjs +6 -5
- package/dist/astro/routes/api/menus/_name_/translations.mjs.map +1 -1
- package/dist/astro/routes/api/menus/_name_.mjs +6 -5
- package/dist/astro/routes/api/menus/_name_.mjs.map +1 -1
- package/dist/astro/routes/api/menus/index.mjs +6 -5
- package/dist/astro/routes/api/menus/index.mjs.map +1 -1
- package/dist/astro/routes/api/oauth/authorize.mjs +6 -6
- package/dist/astro/routes/api/oauth/device/authorize.mjs +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 +3 -2
- package/dist/astro/routes/api/openapi.json.mjs.map +1 -1
- package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs +3 -3
- package/dist/astro/routes/api/redirects/404s/index.mjs +7 -6
- package/dist/astro/routes/api/redirects/404s/index.mjs.map +1 -1
- package/dist/astro/routes/api/redirects/404s/summary.mjs +7 -6
- package/dist/astro/routes/api/redirects/404s/summary.mjs.map +1 -1
- package/dist/astro/routes/api/redirects/_id_.mjs +8 -7
- package/dist/astro/routes/api/redirects/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/redirects/index.mjs +8 -7
- package/dist/astro/routes/api/redirects/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 +2 -2
- package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs +28 -26
- 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 +28 -26
- 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 +28 -26
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +28 -26
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/index.mjs +28 -26
- package/dist/astro/routes/api/schema/collections/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/index.mjs +8 -13
- package/dist/astro/routes/api/schema/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs +28 -26
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs.map +1 -1
- package/dist/astro/routes/api/schema/orphans/index.mjs +28 -26
- package/dist/astro/routes/api/schema/orphans/index.mjs.map +1 -1
- package/dist/astro/routes/api/search/enable.mjs +9 -8
- package/dist/astro/routes/api/search/enable.mjs.map +1 -1
- package/dist/astro/routes/api/search/index.mjs +8 -7
- package/dist/astro/routes/api/search/index.mjs.map +1 -1
- package/dist/astro/routes/api/search/rebuild.mjs +9 -8
- package/dist/astro/routes/api/search/rebuild.mjs.map +1 -1
- package/dist/astro/routes/api/search/stats.mjs +5 -5
- package/dist/astro/routes/api/search/suggest.mjs +8 -7
- package/dist/astro/routes/api/search/suggest.mjs.map +1 -1
- package/dist/astro/routes/api/sections/_slug_.mjs +8 -7
- package/dist/astro/routes/api/sections/_slug_.mjs.map +1 -1
- package/dist/astro/routes/api/sections/index.mjs +8 -7
- package/dist/astro/routes/api/sections/index.mjs.map +1 -1
- package/dist/astro/routes/api/settings/email.mjs +3 -3
- package/dist/astro/routes/api/settings.mjs +11 -9
- package/dist/astro/routes/api/settings.mjs.map +1 -1
- package/dist/astro/routes/api/setup/admin-verify.mjs +10 -9
- package/dist/astro/routes/api/setup/admin-verify.mjs.map +1 -1
- package/dist/astro/routes/api/setup/admin.mjs +9 -8
- package/dist/astro/routes/api/setup/admin.mjs.map +1 -1
- package/dist/astro/routes/api/setup/dev-bypass.mjs +19 -18
- package/dist/astro/routes/api/setup/dev-bypass.mjs.map +1 -1
- package/dist/astro/routes/api/setup/dev-reset.mjs +1 -1
- package/dist/astro/routes/api/setup/index.mjs +20 -18
- 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 +5 -4
- package/dist/astro/routes/api/snapshot.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs +11 -10
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs +11 -10
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs +11 -10
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/index.mjs +11 -10
- package/dist/astro/routes/api/taxonomies/index.mjs.map +1 -1
- package/dist/astro/routes/api/themes/preview.mjs +5 -4
- package/dist/astro/routes/api/themes/preview.mjs.map +1 -1
- package/dist/astro/routes/api/typegen.mjs +4 -4
- package/dist/astro/routes/api/well-known/auth.mjs +1 -1
- package/dist/astro/routes/api/well-known/oauth-authorization-server.mjs +2 -2
- package/dist/astro/routes/api/well-known/oauth-protected-resource.mjs +2 -2
- package/dist/astro/routes/api/widget-areas/_name_/reorder.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_.mjs +9 -7
- package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs +9 -7
- package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs.map +1 -1
- package/dist/astro/routes/api/widget-areas/_name_.mjs +5 -4
- package/dist/astro/routes/api/widget-areas/_name_.mjs.map +1 -1
- package/dist/astro/routes/api/widget-areas/index.mjs +9 -7
- 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 +5 -4
- package/dist/astro/routes/robots.txt.mjs.map +1 -1
- package/dist/astro/routes/sitemap-_collection_.xml.d.mts.map +1 -1
- package/dist/astro/routes/sitemap-_collection_.xml.mjs +15 -7
- package/dist/astro/routes/sitemap-_collection_.xml.mjs.map +1 -1
- package/dist/astro/routes/sitemap.xml.mjs +6 -5
- package/dist/astro/routes/sitemap.xml.mjs.map +1 -1
- package/dist/astro/types.d.mts +12 -12
- package/dist/auth/providers/github.d.mts +1 -1
- package/dist/auth/providers/google.d.mts +1 -1
- package/dist/{authorize-C_8t2KGa.mjs → authorize-D5gfBVU5.mjs} +2 -2
- package/dist/{authorize-C_8t2KGa.mjs.map → authorize-D5gfBVU5.mjs.map} +1 -1
- package/dist/{byline-DUx48sJp.mjs → byline-V_Qp1Ziw.mjs} +27 -14
- package/dist/byline-V_Qp1Ziw.mjs.map +1 -0
- package/dist/{byline-fields-51kg6Vuv.mjs → byline-fields-B0NO1yUB.mjs} +3 -3
- package/dist/{byline-fields-51kg6Vuv.mjs.map → byline-fields-B0NO1yUB.mjs.map} +1 -1
- package/dist/{byline-fields-DYXKDuNX.d.mts → byline-fields-CQJRIQkn.d.mts} +36 -32
- package/dist/byline-fields-CQJRIQkn.d.mts.map +1 -0
- package/dist/{byline-fields-C_OsR-KF.mjs → byline-fields-nBVqK_Ff.mjs} +2 -2
- package/dist/{byline-fields-C_OsR-KF.mjs.map → byline-fields-nBVqK_Ff.mjs.map} +1 -1
- package/dist/{byline-registry-CWP7I71B.mjs → byline-registry-DedidtqC.mjs} +2 -2
- package/dist/{byline-registry-CWP7I71B.mjs.map → byline-registry-DedidtqC.mjs.map} +1 -1
- package/dist/{bylines-Cx5n-WqP.mjs → bylines-B2NWnIwS.mjs} +2 -2
- package/dist/{bylines-Cx5n-WqP.mjs.map → bylines-B2NWnIwS.mjs.map} +1 -1
- package/dist/{bylines-wurS258E.mjs → bylines-DfGDnred.mjs} +7 -7
- package/dist/{bylines-wurS258E.mjs.map → bylines-DfGDnred.mjs.map} +1 -1
- package/dist/{cache-B_HzASVT.mjs → cache-DTTHWD8n.mjs} +1 -1
- package/dist/{cache-B_HzASVT.mjs.map → cache-DTTHWD8n.mjs.map} +1 -1
- package/dist/{challenge-store-DGwuCc4R.mjs → challenge-store-woE0bbCf.mjs} +1 -1
- package/dist/{challenge-store-DGwuCc4R.mjs.map → challenge-store-woE0bbCf.mjs.map} +1 -1
- package/dist/cli/index.mjs +22 -20
- package/dist/cli/index.mjs.map +1 -1
- package/dist/client/cf-access.d.mts +1 -1
- package/dist/client/index.d.mts +1 -1
- package/dist/client/index.mjs +1 -1
- package/dist/{comments-CJ0RZsYR.mjs → comments-D2hNuxNa.mjs} +1 -1
- package/dist/{comments-CJ0RZsYR.mjs.map → comments-D2hNuxNa.mjs.map} +1 -1
- package/dist/{components-CTfpu3PZ.mjs → components-DYKp2gmo.mjs} +1 -1
- package/dist/{components-CTfpu3PZ.mjs.map → components-DYKp2gmo.mjs.map} +1 -1
- package/dist/{context-GG52SPgh.mjs → context-Cm4pt1Ws.mjs} +5 -5
- package/dist/{context-GG52SPgh.mjs.map → context-Cm4pt1Ws.mjs.map} +1 -1
- package/dist/{cron-BJ2ClIlj.mjs → cron-DdEVrQ2Y.mjs} +1 -1
- package/dist/{cron-BJ2ClIlj.mjs.map → cron-DdEVrQ2Y.mjs.map} +1 -1
- package/dist/{dashboard-2JgAMWxK.mjs → dashboard-C-UYpps0.mjs} +1 -1
- package/dist/{dashboard-2JgAMWxK.mjs.map → dashboard-C-UYpps0.mjs.map} +1 -1
- package/dist/database/instrumentation.d.mts +10 -1
- package/dist/database/instrumentation.d.mts.map +1 -1
- package/dist/database/instrumentation.mjs +13 -1
- package/dist/database/instrumentation.mjs.map +1 -1
- package/dist/db/index.d.mts +3 -3
- package/dist/db/libsql.d.mts +1 -1
- package/dist/db/postgres.d.mts +1 -1
- package/dist/db/sqlite.d.mts +1 -1
- package/dist/{db-errors-CtzxKBxe.mjs → db-errors-BluWkwGI.mjs} +1 -1
- package/dist/{db-errors-CtzxKBxe.mjs.map → db-errors-BluWkwGI.mjs.map} +1 -1
- package/dist/{default-xLFNSsZ9.mjs → default-NHGuJzQ3.mjs} +1 -1
- package/dist/{default-xLFNSsZ9.mjs.map → default-NHGuJzQ3.mjs.map} +1 -1
- package/dist/{device-flow-s6_q3T7A.mjs → device-flow-BQApWgnW.mjs} +4 -4
- package/dist/{device-flow-s6_q3T7A.mjs.map → device-flow-BQApWgnW.mjs.map} +1 -1
- package/dist/{email-console-DHT2Fbpj.mjs → email-console-BbU3RbWv.mjs} +1 -1
- package/dist/{email-console-DHT2Fbpj.mjs.map → email-console-BbU3RbWv.mjs.map} +1 -1
- package/dist/{error-RwM4dD35.mjs → error-CNn_w7jf.mjs} +1 -1
- package/dist/{error-RwM4dD35.mjs.map → error-CNn_w7jf.mjs.map} +1 -1
- package/dist/{escape-bIyGoW5W.mjs → escape-DPgcxcpL.mjs} +1 -1
- package/dist/{escape-bIyGoW5W.mjs.map → escape-DPgcxcpL.mjs.map} +1 -1
- package/dist/{fts-manager-1RgHmopc.mjs → fts-manager-Cx5z8jdA.mjs} +1 -1
- package/dist/{fts-manager-1RgHmopc.mjs.map → fts-manager-Cx5z8jdA.mjs.map} +1 -1
- package/dist/{hash-9w3pd3-m.mjs → hash-DlvIFn0b.mjs} +1 -1
- package/dist/{hash-9w3pd3-m.mjs.map → hash-DlvIFn0b.mjs.map} +1 -1
- package/dist/{import-Dh8bWmyq.mjs → import-KyxT1Mbs.mjs} +3 -3
- package/dist/{import-Dh8bWmyq.mjs.map → import-KyxT1Mbs.mjs.map} +1 -1
- package/dist/{index-FfiTQJq2.d.mts → index-D2VAiumu.d.mts} +46 -15
- package/dist/{index-FfiTQJq2.d.mts.map → index-D2VAiumu.d.mts.map} +1 -1
- package/dist/{index-BpYeJO1E.d.mts → index-uT2yR66F.d.mts} +3 -3
- package/dist/{index-BpYeJO1E.d.mts.map → index-uT2yR66F.d.mts.map} +1 -1
- package/dist/index.d.mts +16 -16
- package/dist/index.mjs +48 -46
- package/dist/init-lock-DlBHjf9-.mjs +83 -0
- package/dist/init-lock-DlBHjf9-.mjs.map +1 -0
- package/dist/{load-B84ohfBk.mjs → load-Dq91b_DK.mjs} +1 -1
- package/dist/{load-B84ohfBk.mjs.map → load-Dq91b_DK.mjs.map} +1 -1
- package/dist/{loader-CpZKpFz0.mjs → loader-BqWjcH3h.mjs} +12 -15
- package/dist/loader-BqWjcH3h.mjs.map +1 -0
- package/dist/{manifest-schema-Cj-YrzrF.mjs → manifest-schema-DFPeqMAn.mjs} +55 -2
- package/dist/manifest-schema-DFPeqMAn.mjs.map +1 -0
- package/dist/media/index.d.mts +1 -1
- package/dist/media/index.mjs +2 -2
- package/dist/media/local-runtime.d.mts +11 -11
- package/dist/media/local-runtime.mjs +4 -3
- package/dist/media/local-runtime.mjs.map +1 -1
- package/dist/{media-allowlist-CMcoYIjQ.mjs → media-allowlist-_A0SuDn4.mjs} +2 -2
- package/dist/{media-allowlist-CMcoYIjQ.mjs.map → media-allowlist-_A0SuDn4.mjs.map} +1 -1
- package/dist/media-url-CqLd69IO.mjs +26 -0
- package/dist/media-url-CqLd69IO.mjs.map +1 -0
- package/dist/{menus-Dp9xporj.mjs → menus-Ryk9L7fT.mjs} +10 -37
- package/dist/menus-Ryk9L7fT.mjs.map +1 -0
- package/dist/{mime-CCEzze7W.mjs → mime-YbtlEtvS.mjs} +1 -1
- package/dist/{mime-CCEzze7W.mjs.map → mime-YbtlEtvS.mjs.map} +1 -1
- package/dist/{mode-BjlXswIw.mjs → mode-CGXzIbD8.mjs} +1 -1
- package/dist/{mode-BjlXswIw.mjs.map → mode-CGXzIbD8.mjs.map} +1 -1
- package/dist/{normalize-CK5o04zr.mjs → normalize-DKsg36ty.mjs} +1 -1
- package/dist/{normalize-CK5o04zr.mjs.map → normalize-DKsg36ty.mjs.map} +1 -1
- package/dist/{oauth-authorization-1aPAYjiC.mjs → oauth-authorization-C2kVyjXI.mjs} +4 -4
- package/dist/{oauth-authorization-1aPAYjiC.mjs.map → oauth-authorization-C2kVyjXI.mjs.map} +1 -1
- package/dist/{oauth-clients-8mPDStMv.mjs → oauth-clients-BC873NCV.mjs} +1 -1
- package/dist/{oauth-clients-8mPDStMv.mjs.map → oauth-clients-BC873NCV.mjs.map} +1 -1
- package/dist/{oauth-state-store-BJ7YtrfD.mjs → oauth-state-store-Cd--TUaq.mjs} +1 -1
- package/dist/{oauth-state-store-BJ7YtrfD.mjs.map → oauth-state-store-Cd--TUaq.mjs.map} +1 -1
- package/dist/{oauth-user-lookup-BdDSDvjF.mjs → oauth-user-lookup-e4wOvDud.mjs} +1 -1
- package/dist/{oauth-user-lookup-BdDSDvjF.mjs.map → oauth-user-lookup-e4wOvDud.mjs.map} +1 -1
- package/dist/{options-D4MnavW_.d.mts → options-9kLgkE8m.d.mts} +3 -3
- package/dist/{options-D4MnavW_.d.mts.map → options-9kLgkE8m.d.mts.map} +1 -1
- package/dist/page/index.d.mts +2 -2
- package/dist/{parse-CrGndy1A.mjs → parse-DzSrk1t8.mjs} +2 -2
- package/dist/{parse-CrGndy1A.mjs.map → parse-DzSrk1t8.mjs.map} +1 -1
- package/dist/{passkey-config-BDVM86Tj.mjs → passkey-config-BpjbE_Uv.mjs} +1 -1
- package/dist/{passkey-config-BDVM86Tj.mjs.map → passkey-config-BpjbE_Uv.mjs.map} +1 -1
- package/dist/{placeholder-BZxr8W1j.mjs → placeholder-2xumZh4g.mjs} +1 -1
- package/dist/{placeholder-BZxr8W1j.mjs.map → placeholder-2xumZh4g.mjs.map} +1 -1
- package/dist/{placeholder-B9lUUEmj.d.mts → placeholder-BevVKfay.d.mts} +1 -1
- package/dist/{placeholder-B9lUUEmj.d.mts.map → placeholder-BevVKfay.d.mts.map} +1 -1
- package/dist/plugin-types.d.mts +1 -1
- package/dist/plugin-utils.d.mts +9 -9
- package/dist/plugins/adapt-sandbox-entry.d.mts +9 -9
- package/dist/plugins/adapt-sandbox-entry.mjs +2 -2
- package/dist/{preview-BfuRkVKW.mjs → preview-Dqv2hwXr.mjs} +2 -2
- package/dist/{preview-BfuRkVKW.mjs.map → preview-Dqv2hwXr.mjs.map} +1 -1
- package/dist/{public-url-egRHCy1m.mjs → public-url-D_zARuvZ.mjs} +1 -1
- package/dist/{public-url-egRHCy1m.mjs.map → public-url-D_zARuvZ.mjs.map} +1 -1
- package/dist/{query-BFQ029Ts.mjs → query-Crm038Mc.mjs} +21 -11
- package/dist/query-Crm038Mc.mjs.map +1 -0
- package/dist/{rate-limit-ClFFUga6.mjs → rate-limit-hRTBqmw1.mjs} +2 -2
- package/dist/{rate-limit-ClFFUga6.mjs.map → rate-limit-hRTBqmw1.mjs.map} +1 -1
- package/dist/{redirect-Cw3JTlmj.mjs → redirect-C-OOkyku.mjs} +1 -1
- package/dist/{redirect-Cw3JTlmj.mjs.map → redirect-C-OOkyku.mjs.map} +1 -1
- package/dist/{redirects-DEygMrRO.mjs → redirects-6Zg2SoYo.mjs} +11 -10
- package/dist/redirects-6Zg2SoYo.mjs.map +1 -0
- package/dist/{redirects-OIu6vQ2i.mjs → redirects-CP3TnTLO.mjs} +20 -14
- package/dist/redirects-CP3TnTLO.mjs.map +1 -0
- package/dist/{registry-brYh-rAT.mjs → registry-diMzD1Wf.mjs} +3 -3
- package/dist/{registry-brYh-rAT.mjs.map → registry-diMzD1Wf.mjs.map} +1 -1
- package/dist/{request-cache-D32LpnmI.mjs → request-cache-UwmBAiUK.mjs} +1 -1
- package/dist/{request-cache-D32LpnmI.mjs.map → request-cache-UwmBAiUK.mjs.map} +1 -1
- package/dist/request-context.d.mts +7 -0
- package/dist/request-context.d.mts.map +1 -1
- package/dist/request-context.mjs +2 -1
- package/dist/request-context.mjs.map +1 -1
- package/dist/{request-meta-7ByVLxB-.mjs → request-meta-DPechd0W.mjs} +2 -2
- package/dist/{request-meta-7ByVLxB-.mjs.map → request-meta-DPechd0W.mjs.map} +1 -1
- package/dist/{resolve-BqYMVG0D.mjs → resolve-B3NUUtVY.mjs} +1 -1
- package/dist/{resolve-BqYMVG0D.mjs.map → resolve-B3NUUtVY.mjs.map} +1 -1
- package/dist/{runner-BcRuXq_h.d.mts → runner-C8vcbvCe.d.mts} +2 -2
- package/dist/{runner-BcRuXq_h.d.mts.map → runner-C8vcbvCe.d.mts.map} +1 -1
- package/dist/runtime.d.mts +10 -10
- package/dist/runtime.mjs +1 -1
- package/dist/{schema-CS7Eg5gh.mjs → schema-BDOkd3OU.mjs} +4 -4
- package/dist/{schema-CS7Eg5gh.mjs.map → schema-BDOkd3OU.mjs.map} +1 -1
- package/dist/{search-o-aQzHI1.mjs → search-Bs_J_EW-.mjs} +3 -3
- package/dist/{search-o-aQzHI1.mjs.map → search-Bs_J_EW-.mjs.map} +1 -1
- package/dist/{secrets-C_ZtRos3.mjs → secrets-C8xmE6mR.mjs} +21 -11
- package/dist/secrets-C8xmE6mR.mjs.map +1 -0
- package/dist/{sections-DhsZ0ns9.mjs → sections-P0zuBlyz.mjs} +2 -2
- package/dist/{sections-DhsZ0ns9.mjs.map → sections-P0zuBlyz.mjs.map} +1 -1
- package/dist/seed/index.d.mts +2 -2
- package/dist/seed/index.mjs +14 -13
- package/dist/seo/index.d.mts +1 -1
- package/dist/seo/index.d.mts.map +1 -1
- package/dist/seo/index.mjs +3 -12
- package/dist/seo/index.mjs.map +1 -1
- package/dist/{seo-DfjLvu8i.mjs → seo-CLhm-Fmb.mjs} +4 -3
- package/dist/seo-CLhm-Fmb.mjs.map +1 -0
- package/dist/{seo-B5e6y9Wk.mjs → seo-DpNgGQjF.mjs} +1 -1
- package/dist/{seo-B5e6y9Wk.mjs.map → seo-DpNgGQjF.mjs.map} +1 -1
- package/dist/{service-DAxg8RPR.mjs → service-CDQQnT8W.mjs} +2 -2
- package/dist/{service-DAxg8RPR.mjs.map → service-CDQQnT8W.mjs.map} +1 -1
- package/dist/{settings-B1p-gPUK.mjs → settings-BjBsmVAo.mjs} +32 -30
- package/dist/settings-BjBsmVAo.mjs.map +1 -0
- package/dist/{settings-DIsbHTRE.mjs → settings-sO0Fif4p.mjs} +2 -2
- package/dist/{settings-DIsbHTRE.mjs.map → settings-sO0Fif4p.mjs.map} +1 -1
- package/dist/{setup-complete-Yuv78yua.mjs → setup-complete-CMMr-oZU.mjs} +1 -1
- package/dist/{setup-complete-Yuv78yua.mjs.map → setup-complete-CMMr-oZU.mjs.map} +1 -1
- package/dist/{setup-nonce-Bm0uKqmf.mjs → setup-nonce-169xl4fV.mjs} +1 -1
- package/dist/{setup-nonce-Bm0uKqmf.mjs.map → setup-nonce-169xl4fV.mjs.map} +1 -1
- package/dist/single-flight-cache-C0UV1Npg.mjs +104 -0
- package/dist/single-flight-cache-C0UV1Npg.mjs.map +1 -0
- package/dist/{site-url-mEVmwIFi.mjs → site-url-vtsuOvSD.mjs} +1 -1
- package/dist/{site-url-mEVmwIFi.mjs.map → site-url-vtsuOvSD.mjs.map} +1 -1
- package/dist/{ssrf-BsVGIE0Z.mjs → ssrf-XO05Voq6.mjs} +1 -1
- package/dist/{ssrf-BsVGIE0Z.mjs.map → ssrf-XO05Voq6.mjs.map} +1 -1
- package/dist/status-2gZklYuj.mjs +30 -0
- package/dist/status-2gZklYuj.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/{taxonomies-BEW7S5AI.mjs → taxonomies-BBxYA38v.mjs} +49 -12
- package/dist/taxonomies-BBxYA38v.mjs.map +1 -0
- package/dist/{taxonomies-UusDXv3C.mjs → taxonomies-DuESHWKI.mjs} +2 -2
- package/dist/{taxonomies-UusDXv3C.mjs.map → taxonomies-DuESHWKI.mjs.map} +1 -1
- package/dist/{tokens-Bx2afeT-.mjs → tokens-DMkVjxrx.mjs} +1 -1
- package/dist/{tokens-Bx2afeT-.mjs.map → tokens-DMkVjxrx.mjs.map} +1 -1
- package/dist/{transport--Ck3RBin.mjs → transport-1cIrOb1Y.mjs} +1 -1
- package/dist/{transport--Ck3RBin.mjs.map → transport-1cIrOb1Y.mjs.map} +1 -1
- package/dist/{transport-BwQeeY2p.d.mts → transport-jdvsZEIt.d.mts} +1 -1
- package/dist/{transport-BwQeeY2p.d.mts.map → transport-jdvsZEIt.d.mts.map} +1 -1
- package/dist/{trusted-proxy-B4AfnoAp.mjs → trusted-proxy-CHp41Fjj.mjs} +1 -1
- package/dist/{trusted-proxy-B4AfnoAp.mjs.map → trusted-proxy-CHp41Fjj.mjs.map} +1 -1
- package/dist/{types-DWnN7weG.d.mts → types-BFgYtuKd.d.mts} +1 -1
- package/dist/{types-DWnN7weG.d.mts.map → types-BFgYtuKd.d.mts.map} +1 -1
- package/dist/{types-DZk_y-MU.mjs → types-BIduXPJk.mjs} +1 -1
- package/dist/types-BIduXPJk.mjs.map +1 -0
- package/dist/{types-WVmpZBJV.d.mts → types-BTnnBYVX.d.mts} +2 -2
- package/dist/{types-WVmpZBJV.d.mts.map → types-BTnnBYVX.d.mts.map} +1 -1
- package/dist/types-BoRm8-pp.mjs +3 -0
- package/dist/{types-DbCWhHet.d.mts → types-Bzfk2yC8.d.mts} +2 -2
- package/dist/types-Bzfk2yC8.d.mts.map +1 -0
- package/dist/{types-Qa7-HJJC.d.mts → types-CkEuk-Zr.d.mts} +1 -1
- package/dist/{types-Qa7-HJJC.d.mts.map → types-CkEuk-Zr.d.mts.map} +1 -1
- package/dist/{types-DMwSpvcw.d.mts → types-DO7whVYU.d.mts} +9 -3
- package/dist/{types-DMwSpvcw.d.mts.map → types-DO7whVYU.d.mts.map} +1 -1
- package/dist/{types-DX6v9KzJ.d.mts → types-DdkL6fyv.d.mts} +1 -1
- package/dist/{types-DX6v9KzJ.d.mts.map → types-DdkL6fyv.d.mts.map} +1 -1
- package/dist/{types-DpFmlNyB.mjs → types-DejCHqWT.mjs} +1 -1
- package/dist/{types-DpFmlNyB.mjs.map → types-DejCHqWT.mjs.map} +1 -1
- package/dist/{types-OT_Es5mp.d.mts → types-Del0VMij.d.mts} +1 -1
- package/dist/{types-OT_Es5mp.d.mts.map → types-Del0VMij.d.mts.map} +1 -1
- package/dist/{types-kwqCOUxj.d.mts → types-u_XxjbS8.d.mts} +1 -1
- package/dist/{types-kwqCOUxj.d.mts.map → types-u_XxjbS8.d.mts.map} +1 -1
- package/dist/{utils-C4Ih4DML.mjs → utils-C4M981Br.mjs} +1 -1
- package/dist/{utils-C4Ih4DML.mjs.map → utils-C4M981Br.mjs.map} +1 -1
- package/dist/{validate-ZP9Dvg0P.mjs → validate-DGhQPXzI.mjs} +2 -2
- package/dist/{validate-ZP9Dvg0P.mjs.map → validate-DGhQPXzI.mjs.map} +1 -1
- package/dist/{validate-BPAHUSge.d.mts → validate-cJOiOvT2.d.mts} +5 -5
- package/dist/{validate-BPAHUSge.d.mts.map → validate-cJOiOvT2.d.mts.map} +1 -1
- package/dist/{validation-CE5i4q0c.mjs → validation-DVHjPM1M.mjs} +5 -5
- package/dist/{validation-CE5i4q0c.mjs.map → validation-DVHjPM1M.mjs.map} +1 -1
- package/dist/version-BOjj_cfz.mjs +7 -0
- package/dist/{version-Dw0JXu45.mjs.map → version-BOjj_cfz.mjs.map} +1 -1
- package/dist/{widgets-ClEnYQCH.mjs → widgets-Ci6hLwfO.mjs} +47 -44
- package/dist/widgets-Ci6hLwfO.mjs.map +1 -0
- package/dist/{zod-generator-Djo_VHCt.mjs → zod-generator-CarzgPAu.mjs} +2 -2
- package/dist/{zod-generator-Djo_VHCt.mjs.map → zod-generator-CarzgPAu.mjs.map} +1 -1
- package/package.json +10 -10
- package/src/api/handlers/marketplace.ts +2 -5
- package/src/api/handlers/redirects.ts +24 -13
- package/src/api/handlers/registry.ts +70 -0
- package/src/api/handlers/seo.ts +9 -1
- package/src/api/schemas/redirects.ts +11 -4
- package/src/api/schemas/schema.ts +13 -1
- package/src/astro/integration/index.ts +44 -8
- package/src/astro/integration/routes.ts +46 -9
- package/src/astro/middleware/redirect.ts +12 -0
- package/src/astro/middleware.ts +20 -6
- package/src/astro/routes/api/schema/index.ts +7 -15
- package/src/astro/routes/sitemap-[collection].xml.ts +13 -2
- package/src/bylines/field-defs-cache.ts +70 -20
- package/src/cli/commands/bundle-utils.ts +2 -0
- package/src/cli/commands/doctor.ts +1 -1
- package/src/cli/commands/secrets.ts +2 -2
- package/src/config/secrets.ts +28 -14
- package/src/database/instrumentation.ts +13 -0
- package/src/emdash-runtime.ts +31 -25
- package/src/loader.ts +24 -15
- package/src/plugins/manifest-schema.ts +75 -0
- package/src/plugins/marketplace.ts +2 -5
- package/src/plugins/types.ts +12 -0
- package/src/query.ts +13 -2
- package/src/redirects/status.ts +27 -0
- package/src/request-context.ts +8 -0
- package/src/schema/types.ts +11 -1
- package/src/seo/index.ts +2 -28
- package/src/seo/media-url.ts +32 -0
- package/src/settings/index.ts +32 -40
- package/src/taxonomies/index.ts +78 -12
- package/src/utils/single-flight-cache.ts +194 -0
- package/src/widgets/index.ts +57 -54
- package/dist/api-BZ6bhjYs.mjs.map +0 -1
- package/dist/byline-DUx48sJp.mjs.map +0 -1
- package/dist/byline-fields-DYXKDuNX.d.mts.map +0 -1
- package/dist/loader-CpZKpFz0.mjs.map +0 -1
- package/dist/manifest-schema-Cj-YrzrF.mjs.map +0 -1
- package/dist/menus-Dp9xporj.mjs.map +0 -1
- package/dist/query-BFQ029Ts.mjs.map +0 -1
- package/dist/redirects-DEygMrRO.mjs.map +0 -1
- package/dist/redirects-OIu6vQ2i.mjs.map +0 -1
- package/dist/secrets-C_ZtRos3.mjs.map +0 -1
- package/dist/seo-DfjLvu8i.mjs.map +0 -1
- package/dist/settings-B1p-gPUK.mjs.map +0 -1
- package/dist/taxonomies-BEW7S5AI.mjs.map +0 -1
- package/dist/types-Cj2S6FuC.mjs +0 -3
- package/dist/types-DZk_y-MU.mjs.map +0 -1
- package/dist/types-DbCWhHet.d.mts.map +0 -1
- package/dist/version-Dw0JXu45.mjs +0 -7
- package/dist/widgets-ClEnYQCH.mjs.map +0 -1
- /package/dist/{api-tokens-B6VgoE6M.mjs → api-tokens-C7ywRx7l.mjs} +0 -0
- /package/dist/{ssrf-BvgVcfNQ.mjs → ssrf-CRZGzjdL.mjs} +0 -0
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import "../../../../../base64-CqR-7kqF.mjs";
|
|
2
2
|
import "../../../../../types-BXSUSAjt.mjs";
|
|
3
|
-
import { a as unwrapResult, o as mapErrorStatus, t as apiError } from "../../../../../error-
|
|
4
|
-
import { n as parseBody, t as isParseError } from "../../../../../parse-
|
|
5
|
-
import { hn as contentUpdateBody } from "../../../../../redirects-
|
|
6
|
-
import "../../../../../byline-fields-
|
|
3
|
+
import { a as unwrapResult, o as mapErrorStatus, t as apiError } from "../../../../../error-CNn_w7jf.mjs";
|
|
4
|
+
import { n as parseBody, t as isParseError } from "../../../../../parse-DzSrk1t8.mjs";
|
|
5
|
+
import { hn as contentUpdateBody } from "../../../../../redirects-6Zg2SoYo.mjs";
|
|
6
|
+
import "../../../../../byline-fields-B0NO1yUB.mjs";
|
|
7
|
+
import "../../../../../status-2gZklYuj.mjs";
|
|
7
8
|
import "../../../../../api/schemas/index.mjs";
|
|
8
|
-
import { n as requirePerm, t as requireOwnerPerm } from "../../../../../authorize-
|
|
9
|
+
import { n as requirePerm, t as requireOwnerPerm } from "../../../../../authorize-D5gfBVU5.mjs";
|
|
9
10
|
import { hasPermission } from "@emdash-cms/auth";
|
|
10
11
|
|
|
11
12
|
//#region src/astro/routes/api/content/[collection]/[id].ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_id_.mjs","names":[],"sources":["../../../../../../src/astro/routes/api/content/[collection]/[id].ts"],"sourcesContent":["/**\n * Single content item endpoints - injected by EmDash integration\n *\n * GET /_emdash/api/content/{collection}/{id} - Get content\n * PUT /_emdash/api/content/{collection}/{id} - Update content\n * DELETE /_emdash/api/content/{collection}/{id} - Delete content\n */\n\nimport { hasPermission } from \"@emdash-cms/auth\";\nimport type { APIRoute } from \"astro\";\n\nimport { requirePerm, requireOwnerPerm } from \"#api/authorize.js\";\nimport { apiError, mapErrorStatus, unwrapResult } from \"#api/error.js\";\nimport { parseBody, isParseError } from \"#api/parse.js\";\nimport { contentUpdateBody } from \"#api/schemas.js\";\n\nexport const prerender = false;\n\nexport const GET: APIRoute = async ({ params, url, locals }) => {\n\tconst { emdash, user } = locals;\n\tconst denied = requirePerm(user, \"content:read\");\n\tif (denied) return denied;\n\tconst collection = params.collection!;\n\tconst id = params.id!;\n\tconst locale = url.searchParams.get(\"locale\") || undefined;\n\n\tif (!emdash?.handleContentGet) {\n\t\treturn apiError(\"NOT_CONFIGURED\", \"EmDash is not initialized\", 500);\n\t}\n\n\tconst result = await emdash.handleContentGet(collection, id, locale);\n\n\t// Hide non-published items from users without content:read_drafts. Return\n\t// 404 (not 403) so subscribers can't enumerate draft IDs by status code.\n\tif (result.success && !hasPermission(user, \"content:read_drafts\")) {\n\t\tconst data =\n\t\t\tresult.data && typeof result.data === \"object\"\n\t\t\t\t? // eslint-disable-next-line typescript/no-unsafe-type-assertion -- handler returns unknown data; narrowed by typeof check\n\t\t\t\t\t(result.data as Record<string, unknown>)\n\t\t\t\t: undefined;\n\t\tconst item =\n\t\t\tdata?.item && typeof data.item === \"object\"\n\t\t\t\t? // eslint-disable-next-line typescript/no-unsafe-type-assertion -- narrowed by typeof check\n\t\t\t\t\t(data.item as Record<string, unknown>)\n\t\t\t\t: undefined;\n\t\tconst status = typeof item?.status === \"string\" ? item.status : null;\n\t\tif (status !== \"published\") {\n\t\t\treturn apiError(\"NOT_FOUND\", `Content item not found: ${id}`, 404);\n\t\t}\n\n\t\t// Strip draft hydration data from response for users without read_drafts.\n\t\t// handleContentGet overlays draft revision data onto item.data and exposes\n\t\t// the published values in item.liveData. Without this, subscribers see\n\t\t// unpublished edits in the data field.\n\t\tif (item) {\n\t\t\tif (item.liveData && typeof item.liveData === \"object\") {\n\t\t\t\titem.data = item.liveData;\n\t\t\t}\n\t\t\tdelete item.liveData;\n\t\t\tdelete item.draftRevisionId;\n\t\t}\n\t}\n\n\treturn unwrapResult(result);\n};\n\nexport const PUT: APIRoute = async ({ params, request, locals, cache }) => {\n\tconst { emdash, user } = locals;\n\tconst collection = params.collection!;\n\tconst id = params.id!;\n\tconst locale = new URL(request.url).searchParams.get(\"locale\") || undefined;\n\tconst body = await parseBody(request, contentUpdateBody);\n\tif (isParseError(body)) return body;\n\n\tif (!emdash?.handleContentUpdate || !emdash?.handleContentGet) {\n\t\treturn apiError(\"NOT_CONFIGURED\", \"EmDash is not initialized\", 500);\n\t}\n\n\t// Fetch item to check ownership\n\tconst existing = await emdash.handleContentGet(collection, id, locale);\n\tif (!existing.success) {\n\t\treturn apiError(\n\t\t\texisting.error?.code ?? \"UNKNOWN_ERROR\",\n\t\t\texisting.error?.message ?? \"Unknown error\",\n\t\t\tmapErrorStatus(existing.error?.code),\n\t\t);\n\t}\n\n\tconst existingData =\n\t\texisting.data && typeof existing.data === \"object\"\n\t\t\t? // eslint-disable-next-line typescript/no-unsafe-type-assertion -- handler returns unknown data; narrowed by typeof check above\n\t\t\t\t(existing.data as Record<string, unknown>)\n\t\t\t: undefined;\n\t// Handler returns { item, _rev } — extract the item for ownership and ID resolution\n\tconst existingItem =\n\t\texistingData?.item && typeof existingData.item === \"object\"\n\t\t\t? // eslint-disable-next-line typescript/no-unsafe-type-assertion -- narrowed by typeof check above\n\t\t\t\t(existingData.item as Record<string, unknown>)\n\t\t\t: existingData;\n\tconst authorId = typeof existingItem?.authorId === \"string\" ? existingItem.authorId : \"\";\n\tconst editDenied = requireOwnerPerm(user, authorId, \"content:edit_own\", \"content:edit_any\");\n\tif (editDenied) return editDenied;\n\n\t// Only EDITOR+ can write publishedAt directly — incl. clearing to null.\n\tif (body.publishedAt !== undefined && !hasPermission(user, \"content:publish_any\")) {\n\t\treturn apiError(\n\t\t\t\"FORBIDDEN\",\n\t\t\t\"Writing publishedAt requires content:publish_any permission\",\n\t\t\t403,\n\t\t);\n\t}\n\n\t// Use the resolved ID (handles slug → ID resolution)\n\tconst resolvedId = typeof existingItem?.id === \"string\" ? existingItem.id : id;\n\n\t// Only allow authorId changes if user has content:edit_any permission (editor+)\n\tconst canChangeAuthor =\n\t\tbody.authorId !== undefined && user && hasPermission(user, \"content:edit_any\");\n\tconst updateBody = canChangeAuthor ? body : { ...body, authorId: undefined };\n\n\t// Pass _rev through for optimistic concurrency validation\n\tconst result = await emdash.handleContentUpdate(collection, resolvedId, {\n\t\t...updateBody,\n\t\tlocale,\n\t\t_rev: body._rev,\n\t});\n\n\tif (!result.success) return unwrapResult(result);\n\n\tif (cache?.enabled) await cache.invalidate({ tags: [collection, resolvedId] });\n\n\treturn unwrapResult(result);\n};\n\nexport const DELETE: APIRoute = async ({ params, locals, url, cache }) => {\n\tconst { emdash, user } = locals;\n\tconst collection = params.collection!;\n\tconst id = params.id!;\n\n\tif (!emdash?.handleContentDelete || !emdash?.handleContentGet) {\n\t\treturn apiError(\"NOT_CONFIGURED\", \"EmDash is not initialized\", 500);\n\t}\n\n\tconst locale = url.searchParams.get(\"locale\") || undefined;\n\n\t// Fetch item to check ownership\n\tconst existing = await emdash.handleContentGet(collection, id, locale);\n\tif (!existing.success) {\n\t\treturn apiError(\n\t\t\texisting.error?.code ?? \"UNKNOWN_ERROR\",\n\t\t\texisting.error?.message ?? \"Unknown error\",\n\t\t\tmapErrorStatus(existing.error?.code),\n\t\t);\n\t}\n\n\tconst deleteData =\n\t\texisting.data && typeof existing.data === \"object\"\n\t\t\t? // eslint-disable-next-line typescript/no-unsafe-type-assertion -- handler returns unknown data; narrowed by typeof check above\n\t\t\t\t(existing.data as Record<string, unknown>)\n\t\t\t: undefined;\n\t// Handler returns { item, _rev } — extract the item for ownership and ID resolution\n\tconst deleteItem =\n\t\tdeleteData?.item && typeof deleteData.item === \"object\"\n\t\t\t? // eslint-disable-next-line typescript/no-unsafe-type-assertion -- narrowed by typeof check above\n\t\t\t\t(deleteData.item as Record<string, unknown>)\n\t\t\t: deleteData;\n\tconst authorId = typeof deleteItem?.authorId === \"string\" ? deleteItem.authorId : \"\";\n\tconst deleteDenied = requireOwnerPerm(user, authorId, \"content:delete_own\", \"content:delete_any\");\n\tif (deleteDenied) return deleteDenied;\n\n\t// Use the resolved ID (handles slug → ID resolution)\n\tconst resolvedId = typeof deleteItem?.id === \"string\" ? deleteItem.id : id;\n\n\tconst result = await emdash.handleContentDelete(collection, resolvedId);\n\n\tif (!result.success) return unwrapResult(result);\n\n\tif (cache?.enabled) await cache.invalidate({ tags: [collection, resolvedId] });\n\n\treturn unwrapResult(result);\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAgBA,MAAa,YAAY;AAEzB,MAAa,MAAgB,OAAO,EAAE,QAAQ,KAAK,aAAa;CAC/D,MAAM,EAAE,QAAQ,SAAS;CACzB,MAAM,SAAS,YAAY,MAAM,eAAe;AAChD,KAAI,OAAQ,QAAO;CACnB,MAAM,aAAa,OAAO;CAC1B,MAAM,KAAK,OAAO;CAClB,MAAM,SAAS,IAAI,aAAa,IAAI,SAAS,IAAI;AAEjD,KAAI,CAAC,QAAQ,iBACZ,QAAO,SAAS,kBAAkB,6BAA6B,IAAI;CAGpE,MAAM,SAAS,MAAM,OAAO,iBAAiB,YAAY,IAAI,OAAO;AAIpE,KAAI,OAAO,WAAW,CAAC,cAAc,MAAM,sBAAsB,EAAE;EAClE,MAAM,OACL,OAAO,QAAQ,OAAO,OAAO,SAAS,WAEnC,OAAO,OACP;EACJ,MAAM,OACL,MAAM,QAAQ,OAAO,KAAK,SAAS,WAEhC,KAAK,OACL;AAEJ,OADe,OAAO,MAAM,WAAW,WAAW,KAAK,SAAS,UACjD,YACd,QAAO,SAAS,aAAa,2BAA2B,MAAM,IAAI;AAOnE,MAAI,MAAM;AACT,OAAI,KAAK,YAAY,OAAO,KAAK,aAAa,SAC7C,MAAK,OAAO,KAAK;AAElB,UAAO,KAAK;AACZ,UAAO,KAAK;;;AAId,QAAO,aAAa,OAAO;;AAG5B,MAAa,MAAgB,OAAO,EAAE,QAAQ,SAAS,QAAQ,YAAY;CAC1E,MAAM,EAAE,QAAQ,SAAS;CACzB,MAAM,aAAa,OAAO;CAC1B,MAAM,KAAK,OAAO;CAClB,MAAM,SAAS,IAAI,IAAI,QAAQ,IAAI,CAAC,aAAa,IAAI,SAAS,IAAI;CAClE,MAAM,OAAO,MAAM,UAAU,SAAS,kBAAkB;AACxD,KAAI,aAAa,KAAK,CAAE,QAAO;AAE/B,KAAI,CAAC,QAAQ,uBAAuB,CAAC,QAAQ,iBAC5C,QAAO,SAAS,kBAAkB,6BAA6B,IAAI;CAIpE,MAAM,WAAW,MAAM,OAAO,iBAAiB,YAAY,IAAI,OAAO;AACtE,KAAI,CAAC,SAAS,QACb,QAAO,SACN,SAAS,OAAO,QAAQ,iBACxB,SAAS,OAAO,WAAW,iBAC3B,eAAe,SAAS,OAAO,KAAK,CACpC;CAGF,MAAM,eACL,SAAS,QAAQ,OAAO,SAAS,SAAS,WAEvC,SAAS,OACT;CAEJ,MAAM,eACL,cAAc,QAAQ,OAAO,aAAa,SAAS,WAEhD,aAAa,OACb;CAEJ,MAAM,aAAa,iBAAiB,MADnB,OAAO,cAAc,aAAa,WAAW,aAAa,WAAW,IAClC,oBAAoB,mBAAmB;AAC3F,KAAI,WAAY,QAAO;AAGvB,KAAI,KAAK,gBAAgB,UAAa,CAAC,cAAc,MAAM,sBAAsB,CAChF,QAAO,SACN,aACA,+DACA,IACA;CAIF,MAAM,aAAa,OAAO,cAAc,OAAO,WAAW,aAAa,KAAK;CAK5E,MAAM,aADL,KAAK,aAAa,UAAa,QAAQ,cAAc,MAAM,mBAAmB,GAC1C,OAAO;EAAE,GAAG;EAAM,UAAU;EAAW;CAG5E,MAAM,SAAS,MAAM,OAAO,oBAAoB,YAAY,YAAY;EACvE,GAAG;EACH;EACA,MAAM,KAAK;EACX,CAAC;AAEF,KAAI,CAAC,OAAO,QAAS,QAAO,aAAa,OAAO;AAEhD,KAAI,OAAO,QAAS,OAAM,MAAM,WAAW,EAAE,MAAM,CAAC,YAAY,WAAW,EAAE,CAAC;AAE9E,QAAO,aAAa,OAAO;;AAG5B,MAAa,SAAmB,OAAO,EAAE,QAAQ,QAAQ,KAAK,YAAY;CACzE,MAAM,EAAE,QAAQ,SAAS;CACzB,MAAM,aAAa,OAAO;CAC1B,MAAM,KAAK,OAAO;AAElB,KAAI,CAAC,QAAQ,uBAAuB,CAAC,QAAQ,iBAC5C,QAAO,SAAS,kBAAkB,6BAA6B,IAAI;CAGpE,MAAM,SAAS,IAAI,aAAa,IAAI,SAAS,IAAI;CAGjD,MAAM,WAAW,MAAM,OAAO,iBAAiB,YAAY,IAAI,OAAO;AACtE,KAAI,CAAC,SAAS,QACb,QAAO,SACN,SAAS,OAAO,QAAQ,iBACxB,SAAS,OAAO,WAAW,iBAC3B,eAAe,SAAS,OAAO,KAAK,CACpC;CAGF,MAAM,aACL,SAAS,QAAQ,OAAO,SAAS,SAAS,WAEvC,SAAS,OACT;CAEJ,MAAM,aACL,YAAY,QAAQ,OAAO,WAAW,SAAS,WAE5C,WAAW,OACX;CAEJ,MAAM,eAAe,iBAAiB,MADrB,OAAO,YAAY,aAAa,WAAW,WAAW,WAAW,IAC5B,sBAAsB,qBAAqB;AACjG,KAAI,aAAc,QAAO;CAGzB,MAAM,aAAa,OAAO,YAAY,OAAO,WAAW,WAAW,KAAK;CAExE,MAAM,SAAS,MAAM,OAAO,oBAAoB,YAAY,WAAW;AAEvE,KAAI,CAAC,OAAO,QAAS,QAAO,aAAa,OAAO;AAEhD,KAAI,OAAO,QAAS,OAAM,MAAM,WAAW,EAAE,MAAM,CAAC,YAAY,WAAW,EAAE,CAAC;AAE9E,QAAO,aAAa,OAAO"}
|
|
1
|
+
{"version":3,"file":"_id_.mjs","names":[],"sources":["../../../../../../src/astro/routes/api/content/[collection]/[id].ts"],"sourcesContent":["/**\n * Single content item endpoints - injected by EmDash integration\n *\n * GET /_emdash/api/content/{collection}/{id} - Get content\n * PUT /_emdash/api/content/{collection}/{id} - Update content\n * DELETE /_emdash/api/content/{collection}/{id} - Delete content\n */\n\nimport { hasPermission } from \"@emdash-cms/auth\";\nimport type { APIRoute } from \"astro\";\n\nimport { requirePerm, requireOwnerPerm } from \"#api/authorize.js\";\nimport { apiError, mapErrorStatus, unwrapResult } from \"#api/error.js\";\nimport { parseBody, isParseError } from \"#api/parse.js\";\nimport { contentUpdateBody } from \"#api/schemas.js\";\n\nexport const prerender = false;\n\nexport const GET: APIRoute = async ({ params, url, locals }) => {\n\tconst { emdash, user } = locals;\n\tconst denied = requirePerm(user, \"content:read\");\n\tif (denied) return denied;\n\tconst collection = params.collection!;\n\tconst id = params.id!;\n\tconst locale = url.searchParams.get(\"locale\") || undefined;\n\n\tif (!emdash?.handleContentGet) {\n\t\treturn apiError(\"NOT_CONFIGURED\", \"EmDash is not initialized\", 500);\n\t}\n\n\tconst result = await emdash.handleContentGet(collection, id, locale);\n\n\t// Hide non-published items from users without content:read_drafts. Return\n\t// 404 (not 403) so subscribers can't enumerate draft IDs by status code.\n\tif (result.success && !hasPermission(user, \"content:read_drafts\")) {\n\t\tconst data =\n\t\t\tresult.data && typeof result.data === \"object\"\n\t\t\t\t? // eslint-disable-next-line typescript/no-unsafe-type-assertion -- handler returns unknown data; narrowed by typeof check\n\t\t\t\t\t(result.data as Record<string, unknown>)\n\t\t\t\t: undefined;\n\t\tconst item =\n\t\t\tdata?.item && typeof data.item === \"object\"\n\t\t\t\t? // eslint-disable-next-line typescript/no-unsafe-type-assertion -- narrowed by typeof check\n\t\t\t\t\t(data.item as Record<string, unknown>)\n\t\t\t\t: undefined;\n\t\tconst status = typeof item?.status === \"string\" ? item.status : null;\n\t\tif (status !== \"published\") {\n\t\t\treturn apiError(\"NOT_FOUND\", `Content item not found: ${id}`, 404);\n\t\t}\n\n\t\t// Strip draft hydration data from response for users without read_drafts.\n\t\t// handleContentGet overlays draft revision data onto item.data and exposes\n\t\t// the published values in item.liveData. Without this, subscribers see\n\t\t// unpublished edits in the data field.\n\t\tif (item) {\n\t\t\tif (item.liveData && typeof item.liveData === \"object\") {\n\t\t\t\titem.data = item.liveData;\n\t\t\t}\n\t\t\tdelete item.liveData;\n\t\t\tdelete item.draftRevisionId;\n\t\t}\n\t}\n\n\treturn unwrapResult(result);\n};\n\nexport const PUT: APIRoute = async ({ params, request, locals, cache }) => {\n\tconst { emdash, user } = locals;\n\tconst collection = params.collection!;\n\tconst id = params.id!;\n\tconst locale = new URL(request.url).searchParams.get(\"locale\") || undefined;\n\tconst body = await parseBody(request, contentUpdateBody);\n\tif (isParseError(body)) return body;\n\n\tif (!emdash?.handleContentUpdate || !emdash?.handleContentGet) {\n\t\treturn apiError(\"NOT_CONFIGURED\", \"EmDash is not initialized\", 500);\n\t}\n\n\t// Fetch item to check ownership\n\tconst existing = await emdash.handleContentGet(collection, id, locale);\n\tif (!existing.success) {\n\t\treturn apiError(\n\t\t\texisting.error?.code ?? \"UNKNOWN_ERROR\",\n\t\t\texisting.error?.message ?? \"Unknown error\",\n\t\t\tmapErrorStatus(existing.error?.code),\n\t\t);\n\t}\n\n\tconst existingData =\n\t\texisting.data && typeof existing.data === \"object\"\n\t\t\t? // eslint-disable-next-line typescript/no-unsafe-type-assertion -- handler returns unknown data; narrowed by typeof check above\n\t\t\t\t(existing.data as Record<string, unknown>)\n\t\t\t: undefined;\n\t// Handler returns { item, _rev } — extract the item for ownership and ID resolution\n\tconst existingItem =\n\t\texistingData?.item && typeof existingData.item === \"object\"\n\t\t\t? // eslint-disable-next-line typescript/no-unsafe-type-assertion -- narrowed by typeof check above\n\t\t\t\t(existingData.item as Record<string, unknown>)\n\t\t\t: existingData;\n\tconst authorId = typeof existingItem?.authorId === \"string\" ? existingItem.authorId : \"\";\n\tconst editDenied = requireOwnerPerm(user, authorId, \"content:edit_own\", \"content:edit_any\");\n\tif (editDenied) return editDenied;\n\n\t// Only EDITOR+ can write publishedAt directly — incl. clearing to null.\n\tif (body.publishedAt !== undefined && !hasPermission(user, \"content:publish_any\")) {\n\t\treturn apiError(\n\t\t\t\"FORBIDDEN\",\n\t\t\t\"Writing publishedAt requires content:publish_any permission\",\n\t\t\t403,\n\t\t);\n\t}\n\n\t// Use the resolved ID (handles slug → ID resolution)\n\tconst resolvedId = typeof existingItem?.id === \"string\" ? existingItem.id : id;\n\n\t// Only allow authorId changes if user has content:edit_any permission (editor+)\n\tconst canChangeAuthor =\n\t\tbody.authorId !== undefined && user && hasPermission(user, \"content:edit_any\");\n\tconst updateBody = canChangeAuthor ? body : { ...body, authorId: undefined };\n\n\t// Pass _rev through for optimistic concurrency validation\n\tconst result = await emdash.handleContentUpdate(collection, resolvedId, {\n\t\t...updateBody,\n\t\tlocale,\n\t\t_rev: body._rev,\n\t});\n\n\tif (!result.success) return unwrapResult(result);\n\n\tif (cache?.enabled) await cache.invalidate({ tags: [collection, resolvedId] });\n\n\treturn unwrapResult(result);\n};\n\nexport const DELETE: APIRoute = async ({ params, locals, url, cache }) => {\n\tconst { emdash, user } = locals;\n\tconst collection = params.collection!;\n\tconst id = params.id!;\n\n\tif (!emdash?.handleContentDelete || !emdash?.handleContentGet) {\n\t\treturn apiError(\"NOT_CONFIGURED\", \"EmDash is not initialized\", 500);\n\t}\n\n\tconst locale = url.searchParams.get(\"locale\") || undefined;\n\n\t// Fetch item to check ownership\n\tconst existing = await emdash.handleContentGet(collection, id, locale);\n\tif (!existing.success) {\n\t\treturn apiError(\n\t\t\texisting.error?.code ?? \"UNKNOWN_ERROR\",\n\t\t\texisting.error?.message ?? \"Unknown error\",\n\t\t\tmapErrorStatus(existing.error?.code),\n\t\t);\n\t}\n\n\tconst deleteData =\n\t\texisting.data && typeof existing.data === \"object\"\n\t\t\t? // eslint-disable-next-line typescript/no-unsafe-type-assertion -- handler returns unknown data; narrowed by typeof check above\n\t\t\t\t(existing.data as Record<string, unknown>)\n\t\t\t: undefined;\n\t// Handler returns { item, _rev } — extract the item for ownership and ID resolution\n\tconst deleteItem =\n\t\tdeleteData?.item && typeof deleteData.item === \"object\"\n\t\t\t? // eslint-disable-next-line typescript/no-unsafe-type-assertion -- narrowed by typeof check above\n\t\t\t\t(deleteData.item as Record<string, unknown>)\n\t\t\t: deleteData;\n\tconst authorId = typeof deleteItem?.authorId === \"string\" ? deleteItem.authorId : \"\";\n\tconst deleteDenied = requireOwnerPerm(user, authorId, \"content:delete_own\", \"content:delete_any\");\n\tif (deleteDenied) return deleteDenied;\n\n\t// Use the resolved ID (handles slug → ID resolution)\n\tconst resolvedId = typeof deleteItem?.id === \"string\" ? deleteItem.id : id;\n\n\tconst result = await emdash.handleContentDelete(collection, resolvedId);\n\n\tif (!result.success) return unwrapResult(result);\n\n\tif (cache?.enabled) await cache.invalidate({ tags: [collection, resolvedId] });\n\n\treturn unwrapResult(result);\n};\n"],"mappings":"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"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../../../../../base64-CqR-7kqF.mjs";
|
|
2
2
|
import "../../../../../types-BXSUSAjt.mjs";
|
|
3
|
-
import { a as unwrapResult, t as apiError } from "../../../../../error-
|
|
4
|
-
import { n as requirePerm } from "../../../../../authorize-
|
|
3
|
+
import { a as unwrapResult, t as apiError } from "../../../../../error-CNn_w7jf.mjs";
|
|
4
|
+
import { n as requirePerm } from "../../../../../authorize-D5gfBVU5.mjs";
|
|
5
5
|
|
|
6
6
|
//#region src/astro/routes/api/content/[collection]/authors.ts
|
|
7
7
|
const prerender = false;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import "../../../../../base64-CqR-7kqF.mjs";
|
|
2
2
|
import "../../../../../types-BXSUSAjt.mjs";
|
|
3
|
-
import { a as unwrapResult, o as mapErrorStatus, t as apiError } from "../../../../../error-
|
|
4
|
-
import { i as parseQuery, n as parseBody, t as isParseError } from "../../../../../parse-
|
|
5
|
-
import { rn as contentListQuery, tn as contentCreateBody } from "../../../../../redirects-
|
|
6
|
-
import "../../../../../byline-fields-
|
|
3
|
+
import { a as unwrapResult, o as mapErrorStatus, t as apiError } from "../../../../../error-CNn_w7jf.mjs";
|
|
4
|
+
import { i as parseQuery, n as parseBody, t as isParseError } from "../../../../../parse-DzSrk1t8.mjs";
|
|
5
|
+
import { rn as contentListQuery, tn as contentCreateBody } from "../../../../../redirects-6Zg2SoYo.mjs";
|
|
6
|
+
import "../../../../../byline-fields-B0NO1yUB.mjs";
|
|
7
|
+
import "../../../../../status-2gZklYuj.mjs";
|
|
7
8
|
import "../../../../../api/schemas/index.mjs";
|
|
8
|
-
import { n as requirePerm, t as requireOwnerPerm } from "../../../../../authorize-
|
|
9
|
+
import { n as requirePerm, t as requireOwnerPerm } from "../../../../../authorize-D5gfBVU5.mjs";
|
|
9
10
|
import { hasPermission } from "@emdash-cms/auth";
|
|
10
11
|
|
|
11
12
|
//#region src/astro/routes/api/content/[collection]/index.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../../../../../../src/astro/routes/api/content/[collection]/index.ts"],"sourcesContent":["/**\n * Content list and create endpoints - injected by EmDash integration\n *\n * GET /_emdash/api/content/{collection} - List content\n * POST /_emdash/api/content/{collection} - Create content\n */\n\nimport { hasPermission } from \"@emdash-cms/auth\";\nimport type { APIRoute } from \"astro\";\n\nimport { requirePerm, requireOwnerPerm } from \"#api/authorize.js\";\nimport { apiError, mapErrorStatus, unwrapResult } from \"#api/error.js\";\nimport { parseBody, parseQuery, isParseError } from \"#api/parse.js\";\nimport { contentListQuery, contentCreateBody } from \"#api/schemas.js\";\n\nexport const prerender = false;\n\nexport const GET: APIRoute = async ({ params, url, locals }) => {\n\tconst { emdash, user } = locals;\n\tconst denied = requirePerm(user, \"content:read\");\n\tif (denied) return denied;\n\tconst collection = params.collection!;\n\tconst query = parseQuery(url, contentListQuery);\n\tif (isParseError(query)) return query;\n\n\tif (!emdash?.handleContentList) {\n\t\treturn apiError(\"NOT_CONFIGURED\", \"EmDash is not initialized\", 500);\n\t}\n\n\t// Subscribers must only see published content; force the status filter\n\t// regardless of caller-supplied value. Any user with content:read_drafts\n\t// (CONTRIBUTOR+) keeps the requested filter.\n\tconst params_ = hasPermission(user, \"content:read_drafts\")\n\t\t? query\n\t\t: { ...query, status: \"published\" };\n\n\tconst result = await emdash.handleContentList(collection, params_);\n\n\treturn unwrapResult(result);\n};\n\nexport const POST: APIRoute = async ({ params, request, locals, cache }) => {\n\tconst { emdash, user } = locals;\n\tconst denied = requirePerm(user, \"content:create\");\n\tif (denied) return denied;\n\tconst collection = params.collection!;\n\tconst body = await parseBody(request, contentCreateBody);\n\tif (isParseError(body)) return body;\n\n\tif (!emdash?.handleContentCreate || !emdash?.handleContentGet) {\n\t\treturn apiError(\"NOT_CONFIGURED\", \"EmDash is not initialized\", 500);\n\t}\n\n\t// Creating a translation requires edit permission on the source item\n\tif (body.translationOf) {\n\t\tconst source = await emdash.handleContentGet(collection, body.translationOf);\n\t\tif (!source.success) {\n\t\t\treturn apiError(\n\t\t\t\tsource.error?.code ?? \"NOT_FOUND\",\n\t\t\t\tsource.error?.message ?? \"Translation source not found\",\n\t\t\t\tmapErrorStatus(source.error?.code),\n\t\t\t);\n\t\t}\n\t\tconst sourceAuthor = source.data.item.authorId ?? \"\";\n\t\tconst translationDenied = requireOwnerPerm(\n\t\t\tuser,\n\t\t\tsourceAuthor,\n\t\t\t\"content:edit_own\",\n\t\t\t\"content:edit_any\",\n\t\t);\n\t\tif (translationDenied) return translationDenied;\n\t}\n\n\t// Only EDITOR+ can write publishedAt / createdAt directly — incl. clearing to null.\n\tconst hasDateOverride = body.publishedAt !== undefined || body.createdAt !== undefined;\n\tif (hasDateOverride && !hasPermission(user, \"content:publish_any\")) {\n\t\treturn apiError(\n\t\t\t\"FORBIDDEN\",\n\t\t\t\"Writing publishedAt or createdAt requires content:publish_any permission\",\n\t\t\t403,\n\t\t);\n\t}\n\n\t// Auto-set authorId to current user when creating content\n\tconst result = await emdash.handleContentCreate(collection, {\n\t\t...body,\n\t\tauthorId: user?.id,\n\t\tlocale: body.locale,\n\t\ttranslationOf: body.translationOf,\n\t});\n\n\tif (!result.success) return unwrapResult(result);\n\n\tif (cache?.enabled) await cache.invalidate({ tags: [collection] });\n\n\treturn unwrapResult(result, 201);\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../../../../../src/astro/routes/api/content/[collection]/index.ts"],"sourcesContent":["/**\n * Content list and create endpoints - injected by EmDash integration\n *\n * GET /_emdash/api/content/{collection} - List content\n * POST /_emdash/api/content/{collection} - Create content\n */\n\nimport { hasPermission } from \"@emdash-cms/auth\";\nimport type { APIRoute } from \"astro\";\n\nimport { requirePerm, requireOwnerPerm } from \"#api/authorize.js\";\nimport { apiError, mapErrorStatus, unwrapResult } from \"#api/error.js\";\nimport { parseBody, parseQuery, isParseError } from \"#api/parse.js\";\nimport { contentListQuery, contentCreateBody } from \"#api/schemas.js\";\n\nexport const prerender = false;\n\nexport const GET: APIRoute = async ({ params, url, locals }) => {\n\tconst { emdash, user } = locals;\n\tconst denied = requirePerm(user, \"content:read\");\n\tif (denied) return denied;\n\tconst collection = params.collection!;\n\tconst query = parseQuery(url, contentListQuery);\n\tif (isParseError(query)) return query;\n\n\tif (!emdash?.handleContentList) {\n\t\treturn apiError(\"NOT_CONFIGURED\", \"EmDash is not initialized\", 500);\n\t}\n\n\t// Subscribers must only see published content; force the status filter\n\t// regardless of caller-supplied value. Any user with content:read_drafts\n\t// (CONTRIBUTOR+) keeps the requested filter.\n\tconst params_ = hasPermission(user, \"content:read_drafts\")\n\t\t? query\n\t\t: { ...query, status: \"published\" };\n\n\tconst result = await emdash.handleContentList(collection, params_);\n\n\treturn unwrapResult(result);\n};\n\nexport const POST: APIRoute = async ({ params, request, locals, cache }) => {\n\tconst { emdash, user } = locals;\n\tconst denied = requirePerm(user, \"content:create\");\n\tif (denied) return denied;\n\tconst collection = params.collection!;\n\tconst body = await parseBody(request, contentCreateBody);\n\tif (isParseError(body)) return body;\n\n\tif (!emdash?.handleContentCreate || !emdash?.handleContentGet) {\n\t\treturn apiError(\"NOT_CONFIGURED\", \"EmDash is not initialized\", 500);\n\t}\n\n\t// Creating a translation requires edit permission on the source item\n\tif (body.translationOf) {\n\t\tconst source = await emdash.handleContentGet(collection, body.translationOf);\n\t\tif (!source.success) {\n\t\t\treturn apiError(\n\t\t\t\tsource.error?.code ?? \"NOT_FOUND\",\n\t\t\t\tsource.error?.message ?? \"Translation source not found\",\n\t\t\t\tmapErrorStatus(source.error?.code),\n\t\t\t);\n\t\t}\n\t\tconst sourceAuthor = source.data.item.authorId ?? \"\";\n\t\tconst translationDenied = requireOwnerPerm(\n\t\t\tuser,\n\t\t\tsourceAuthor,\n\t\t\t\"content:edit_own\",\n\t\t\t\"content:edit_any\",\n\t\t);\n\t\tif (translationDenied) return translationDenied;\n\t}\n\n\t// Only EDITOR+ can write publishedAt / createdAt directly — incl. clearing to null.\n\tconst hasDateOverride = body.publishedAt !== undefined || body.createdAt !== undefined;\n\tif (hasDateOverride && !hasPermission(user, \"content:publish_any\")) {\n\t\treturn apiError(\n\t\t\t\"FORBIDDEN\",\n\t\t\t\"Writing publishedAt or createdAt requires content:publish_any permission\",\n\t\t\t403,\n\t\t);\n\t}\n\n\t// Auto-set authorId to current user when creating content\n\tconst result = await emdash.handleContentCreate(collection, {\n\t\t...body,\n\t\tauthorId: user?.id,\n\t\tlocale: body.locale,\n\t\ttranslationOf: body.translationOf,\n\t});\n\n\tif (!result.success) return unwrapResult(result);\n\n\tif (cache?.enabled) await cache.invalidate({ tags: [collection] });\n\n\treturn unwrapResult(result, 201);\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAeA,MAAa,YAAY;AAEzB,MAAa,MAAgB,OAAO,EAAE,QAAQ,KAAK,aAAa;CAC/D,MAAM,EAAE,QAAQ,SAAS;CACzB,MAAM,SAAS,YAAY,MAAM,eAAe;AAChD,KAAI,OAAQ,QAAO;CACnB,MAAM,aAAa,OAAO;CAC1B,MAAM,QAAQ,WAAW,KAAK,iBAAiB;AAC/C,KAAI,aAAa,MAAM,CAAE,QAAO;AAEhC,KAAI,CAAC,QAAQ,kBACZ,QAAO,SAAS,kBAAkB,6BAA6B,IAAI;CAMpE,MAAM,UAAU,cAAc,MAAM,sBAAsB,GACvD,QACA;EAAE,GAAG;EAAO,QAAQ;EAAa;AAIpC,QAAO,aAFQ,MAAM,OAAO,kBAAkB,YAAY,QAAQ,CAEvC;;AAG5B,MAAa,OAAiB,OAAO,EAAE,QAAQ,SAAS,QAAQ,YAAY;CAC3E,MAAM,EAAE,QAAQ,SAAS;CACzB,MAAM,SAAS,YAAY,MAAM,iBAAiB;AAClD,KAAI,OAAQ,QAAO;CACnB,MAAM,aAAa,OAAO;CAC1B,MAAM,OAAO,MAAM,UAAU,SAAS,kBAAkB;AACxD,KAAI,aAAa,KAAK,CAAE,QAAO;AAE/B,KAAI,CAAC,QAAQ,uBAAuB,CAAC,QAAQ,iBAC5C,QAAO,SAAS,kBAAkB,6BAA6B,IAAI;AAIpE,KAAI,KAAK,eAAe;EACvB,MAAM,SAAS,MAAM,OAAO,iBAAiB,YAAY,KAAK,cAAc;AAC5E,MAAI,CAAC,OAAO,QACX,QAAO,SACN,OAAO,OAAO,QAAQ,aACtB,OAAO,OAAO,WAAW,gCACzB,eAAe,OAAO,OAAO,KAAK,CAClC;EAGF,MAAM,oBAAoB,iBACzB,MAFoB,OAAO,KAAK,KAAK,YAAY,IAIjD,oBACA,mBACA;AACD,MAAI,kBAAmB,QAAO;;AAK/B,MADwB,KAAK,gBAAgB,UAAa,KAAK,cAAc,WACtD,CAAC,cAAc,MAAM,sBAAsB,CACjE,QAAO,SACN,aACA,4EACA,IACA;CAIF,MAAM,SAAS,MAAM,OAAO,oBAAoB,YAAY;EAC3D,GAAG;EACH,UAAU,MAAM;EAChB,QAAQ,KAAK;EACb,eAAe,KAAK;EACpB,CAAC;AAEF,KAAI,CAAC,OAAO,QAAS,QAAO,aAAa,OAAO;AAEhD,KAAI,OAAO,QAAS,OAAM,MAAM,WAAW,EAAE,MAAM,CAAC,WAAW,EAAE,CAAC;AAElE,QAAO,aAAa,QAAQ,IAAI"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import "../../../../../base64-CqR-7kqF.mjs";
|
|
2
2
|
import "../../../../../types-BXSUSAjt.mjs";
|
|
3
|
-
import { a as unwrapResult, t as apiError } from "../../../../../error-
|
|
4
|
-
import { i as parseQuery, t as isParseError } from "../../../../../parse-
|
|
5
|
-
import { mn as contentTrashQuery } from "../../../../../redirects-
|
|
6
|
-
import "../../../../../byline-fields-
|
|
3
|
+
import { a as unwrapResult, t as apiError } from "../../../../../error-CNn_w7jf.mjs";
|
|
4
|
+
import { i as parseQuery, t as isParseError } from "../../../../../parse-DzSrk1t8.mjs";
|
|
5
|
+
import { mn as contentTrashQuery } from "../../../../../redirects-6Zg2SoYo.mjs";
|
|
6
|
+
import "../../../../../byline-fields-B0NO1yUB.mjs";
|
|
7
|
+
import "../../../../../status-2gZklYuj.mjs";
|
|
7
8
|
import "../../../../../api/schemas/index.mjs";
|
|
8
|
-
import { n as requirePerm } from "../../../../../authorize-
|
|
9
|
+
import { n as requirePerm } from "../../../../../authorize-D5gfBVU5.mjs";
|
|
9
10
|
|
|
10
11
|
//#region src/astro/routes/api/content/[collection]/trash.ts
|
|
11
12
|
const prerender = false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trash.mjs","names":[],"sources":["../../../../../../src/astro/routes/api/content/[collection]/trash.ts"],"sourcesContent":["/**\n * Trash endpoints for content collection - injected by EmDash integration\n *\n * GET /_emdash/api/content/{collection}/trash - List trashed items\n */\n\nimport type { APIRoute } from \"astro\";\n\nimport { requirePerm } from \"#api/authorize.js\";\nimport { apiError, unwrapResult } from \"#api/error.js\";\nimport { parseQuery, isParseError } from \"#api/parse.js\";\nimport { contentTrashQuery } from \"#api/schemas.js\";\n\nexport const prerender = false;\n\nexport const GET: APIRoute = async ({ params, url, locals }) => {\n\tconst { emdash, user } = locals;\n\tconst collection = params.collection!;\n\n\tconst denied = requirePerm(user, \"content:read_drafts\");\n\tif (denied) return denied;\n\n\tif (!emdash?.handleContentListTrashed) {\n\t\treturn apiError(\"NOT_CONFIGURED\", \"EmDash is not initialized\", 500);\n\t}\n\n\tconst query = parseQuery(url, contentTrashQuery);\n\tif (isParseError(query)) return query;\n\n\tconst result = await emdash.handleContentListTrashed(collection, query);\n\n\treturn unwrapResult(result);\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"trash.mjs","names":[],"sources":["../../../../../../src/astro/routes/api/content/[collection]/trash.ts"],"sourcesContent":["/**\n * Trash endpoints for content collection - injected by EmDash integration\n *\n * GET /_emdash/api/content/{collection}/trash - List trashed items\n */\n\nimport type { APIRoute } from \"astro\";\n\nimport { requirePerm } from \"#api/authorize.js\";\nimport { apiError, unwrapResult } from \"#api/error.js\";\nimport { parseQuery, isParseError } from \"#api/parse.js\";\nimport { contentTrashQuery } from \"#api/schemas.js\";\n\nexport const prerender = false;\n\nexport const GET: APIRoute = async ({ params, url, locals }) => {\n\tconst { emdash, user } = locals;\n\tconst collection = params.collection!;\n\n\tconst denied = requirePerm(user, \"content:read_drafts\");\n\tif (denied) return denied;\n\n\tif (!emdash?.handleContentListTrashed) {\n\t\treturn apiError(\"NOT_CONFIGURED\", \"EmDash is not initialized\", 500);\n\t}\n\n\tconst query = parseQuery(url, contentTrashQuery);\n\tif (isParseError(query)) return query;\n\n\tconst result = await emdash.handleContentListTrashed(collection, query);\n\n\treturn unwrapResult(result);\n};\n"],"mappings":";;;;;;;;;;;AAaA,MAAa,YAAY;AAEzB,MAAa,MAAgB,OAAO,EAAE,QAAQ,KAAK,aAAa;CAC/D,MAAM,EAAE,QAAQ,SAAS;CACzB,MAAM,aAAa,OAAO;CAE1B,MAAM,SAAS,YAAY,MAAM,sBAAsB;AACvD,KAAI,OAAQ,QAAO;AAEnB,KAAI,CAAC,QAAQ,yBACZ,QAAO,SAAS,kBAAkB,6BAA6B,IAAI;CAGpE,MAAM,QAAQ,WAAW,KAAK,kBAAkB;AAChD,KAAI,aAAa,MAAM,CAAE,QAAO;AAIhC,QAAO,aAFQ,MAAM,OAAO,yBAAyB,YAAY,MAAM,CAE5C"}
|
|
@@ -3,9 +3,9 @@ import "../../../base64-CqR-7kqF.mjs";
|
|
|
3
3
|
import "../../../types-BXSUSAjt.mjs";
|
|
4
4
|
import "../../../media-JOf3pNkw.mjs";
|
|
5
5
|
import "../../../user-C0um7wrg.mjs";
|
|
6
|
-
import { t as handleDashboardStats } from "../../../dashboard-
|
|
7
|
-
import { a as unwrapResult, r as handleError, t as apiError } from "../../../error-
|
|
8
|
-
import { n as requirePerm } from "../../../authorize-
|
|
6
|
+
import { t as handleDashboardStats } from "../../../dashboard-C-UYpps0.mjs";
|
|
7
|
+
import { a as unwrapResult, r as handleError, t as apiError } from "../../../error-CNn_w7jf.mjs";
|
|
8
|
+
import { n as requirePerm } from "../../../authorize-D5gfBVU5.mjs";
|
|
9
9
|
|
|
10
10
|
//#region src/astro/routes/api/dashboard.ts
|
|
11
11
|
const prerender = false;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../../../../base64-CqR-7kqF.mjs";
|
|
2
2
|
import "../../../../types-BXSUSAjt.mjs";
|
|
3
|
-
import { n as apiSuccess, t as apiError } from "../../../../error-
|
|
4
|
-
import { i as getDevEmails, n as clearDevEmails } from "../../../../email-console-
|
|
3
|
+
import { n as apiSuccess, t as apiError } from "../../../../error-CNn_w7jf.mjs";
|
|
4
|
+
import { i as getDevEmails, n as clearDevEmails } from "../../../../email-console-BbU3RbWv.mjs";
|
|
5
5
|
|
|
6
6
|
//#region src/astro/routes/api/dev/emails.ts
|
|
7
7
|
const prerender = false;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "../../../../types-
|
|
2
|
-
import "../../../../index-
|
|
3
|
-
import { g as ProbeResult } from "../../../../types-
|
|
1
|
+
import "../../../../types-Del0VMij.mjs";
|
|
2
|
+
import "../../../../index-uT2yR66F.mjs";
|
|
3
|
+
import { g as ProbeResult } from "../../../../types-BFgYtuKd.mjs";
|
|
4
4
|
import { APIRoute } from "astro";
|
|
5
5
|
|
|
6
6
|
//#region src/astro/routes/api/import/probe.d.ts
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import "../../../../base64-CqR-7kqF.mjs";
|
|
2
2
|
import "../../../../types-BXSUSAjt.mjs";
|
|
3
|
-
import { t as SsrfError } from "../../../../ssrf-
|
|
4
|
-
import { n as apiSuccess, r as handleError, t as apiError } from "../../../../error-
|
|
5
|
-
import { n as parseBody, t as isParseError } from "../../../../parse-
|
|
6
|
-
import "../../../../redirects-
|
|
7
|
-
import { f as importProbeBody } from "../../../../byline-fields-
|
|
3
|
+
import { t as SsrfError } from "../../../../ssrf-XO05Voq6.mjs";
|
|
4
|
+
import { n as apiSuccess, r as handleError, t as apiError } from "../../../../error-CNn_w7jf.mjs";
|
|
5
|
+
import { n as parseBody, t as isParseError } from "../../../../parse-DzSrk1t8.mjs";
|
|
6
|
+
import "../../../../redirects-6Zg2SoYo.mjs";
|
|
7
|
+
import { f as importProbeBody } from "../../../../byline-fields-B0NO1yUB.mjs";
|
|
8
|
+
import "../../../../status-2gZklYuj.mjs";
|
|
8
9
|
import "../../../../api/schemas/index.mjs";
|
|
9
|
-
import { l as probeUrl } from "../../../../import-
|
|
10
|
-
import "../../../../ssrf-
|
|
11
|
-
import "../../../../utils-
|
|
12
|
-
import { n as requirePerm } from "../../../../authorize-
|
|
10
|
+
import { l as probeUrl } from "../../../../import-KyxT1Mbs.mjs";
|
|
11
|
+
import "../../../../ssrf-CRZGzjdL.mjs";
|
|
12
|
+
import "../../../../utils-C4M981Br.mjs";
|
|
13
|
+
import { n as requirePerm } from "../../../../authorize-D5gfBVU5.mjs";
|
|
13
14
|
|
|
14
15
|
//#region src/astro/routes/api/import/probe.ts
|
|
15
16
|
const prerender = false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"probe.mjs","names":[],"sources":["../../../../../src/astro/routes/api/import/probe.ts"],"sourcesContent":["/**\n * URL probe endpoint\n *\n * POST /_emdash/api/import/probe\n *\n * Probes a URL to detect what import source can handle it.\n */\n\nimport type { APIRoute } from \"astro\";\n\nimport { requirePerm } from \"#api/authorize.js\";\nimport { apiError, apiSuccess, handleError } from \"#api/error.js\";\nimport { isParseError, parseBody } from \"#api/parse.js\";\nimport { importProbeBody } from \"#api/schemas.js\";\nimport { probeUrl, type ProbeResult } from \"#import/index.js\";\nimport { SsrfError } from \"#import/ssrf.js\";\n\nexport const prerender = false;\n\nexport interface ProbeResponse {\n\tsuccess: boolean;\n\tresult?: ProbeResult;\n\terror?: { message: string };\n}\n\nexport const POST: APIRoute = async ({ request, locals }) => {\n\tconst { user } = locals;\n\tconst denied = requirePerm(user, \"import:execute\");\n\tif (denied) return denied;\n\n\ttry {\n\t\tconst body = await parseBody(request, importProbeBody);\n\t\tif (isParseError(body)) return body;\n\n\t\tconst result = await probeUrl(body.url);\n\n\t\treturn apiSuccess({\n\t\t\tsuccess: true,\n\t\t\tresult,\n\t\t});\n\t} catch (error) {\n\t\tif (error instanceof SsrfError) {\n\t\t\treturn apiError(\"SSRF_BLOCKED\", error.message, 400);\n\t\t}\n\t\treturn handleError(error, \"Failed to probe URL\", \"PROBE_ERROR\");\n\t}\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"probe.mjs","names":[],"sources":["../../../../../src/astro/routes/api/import/probe.ts"],"sourcesContent":["/**\n * URL probe endpoint\n *\n * POST /_emdash/api/import/probe\n *\n * Probes a URL to detect what import source can handle it.\n */\n\nimport type { APIRoute } from \"astro\";\n\nimport { requirePerm } from \"#api/authorize.js\";\nimport { apiError, apiSuccess, handleError } from \"#api/error.js\";\nimport { isParseError, parseBody } from \"#api/parse.js\";\nimport { importProbeBody } from \"#api/schemas.js\";\nimport { probeUrl, type ProbeResult } from \"#import/index.js\";\nimport { SsrfError } from \"#import/ssrf.js\";\n\nexport const prerender = false;\n\nexport interface ProbeResponse {\n\tsuccess: boolean;\n\tresult?: ProbeResult;\n\terror?: { message: string };\n}\n\nexport const POST: APIRoute = async ({ request, locals }) => {\n\tconst { user } = locals;\n\tconst denied = requirePerm(user, \"import:execute\");\n\tif (denied) return denied;\n\n\ttry {\n\t\tconst body = await parseBody(request, importProbeBody);\n\t\tif (isParseError(body)) return body;\n\n\t\tconst result = await probeUrl(body.url);\n\n\t\treturn apiSuccess({\n\t\t\tsuccess: true,\n\t\t\tresult,\n\t\t});\n\t} catch (error) {\n\t\tif (error instanceof SsrfError) {\n\t\t\treturn apiError(\"SSRF_BLOCKED\", error.message, 400);\n\t\t}\n\t\treturn handleError(error, \"Failed to probe URL\", \"PROBE_ERROR\");\n\t}\n};\n"],"mappings":";;;;;;;;;;;;;;;AAiBA,MAAa,YAAY;AAQzB,MAAa,OAAiB,OAAO,EAAE,SAAS,aAAa;CAC5D,MAAM,EAAE,SAAS;CACjB,MAAM,SAAS,YAAY,MAAM,iBAAiB;AAClD,KAAI,OAAQ,QAAO;AAEnB,KAAI;EACH,MAAM,OAAO,MAAM,UAAU,SAAS,gBAAgB;AACtD,MAAI,aAAa,KAAK,CAAE,QAAO;AAI/B,SAAO,WAAW;GACjB,SAAS;GACT,QAJc,MAAM,SAAS,KAAK,IAAI;GAKtC,CAAC;UACM,OAAO;AACf,MAAI,iBAAiB,UACpB,QAAO,SAAS,gBAAgB,MAAM,SAAS,IAAI;AAEpD,SAAO,YAAY,OAAO,uBAAuB,cAAc"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "../../../../../base64-CqR-7kqF.mjs";
|
|
2
2
|
import "../../../../../types-BXSUSAjt.mjs";
|
|
3
|
-
import { a as RESERVED_COLLECTION_SLUGS } from "../../../../../types-
|
|
4
|
-
import { n as apiSuccess, r as handleError, t as apiError } from "../../../../../error-
|
|
5
|
-
import { n as requirePerm } from "../../../../../authorize-
|
|
3
|
+
import { a as RESERVED_COLLECTION_SLUGS } from "../../../../../types-BIduXPJk.mjs";
|
|
4
|
+
import { n as apiSuccess, r as handleError, t as apiError } from "../../../../../error-CNn_w7jf.mjs";
|
|
5
|
+
import { n as requirePerm } from "../../../../../authorize-D5gfBVU5.mjs";
|
|
6
6
|
import mime from "mime/lite";
|
|
7
7
|
import { SchemaRegistry, parseWxrString } from "emdash";
|
|
8
8
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import "../../../../../options-
|
|
2
|
-
import "../../../../../types-
|
|
3
|
-
import "../../../../../types-
|
|
4
|
-
import "../../../../../byline-fields-
|
|
5
|
-
import "../../../../../index-
|
|
6
|
-
import "../../../../../runner-
|
|
7
|
-
import "../../../../../index-
|
|
8
|
-
import "../../../../../types-
|
|
9
|
-
import "../../../../../validate-
|
|
1
|
+
import "../../../../../options-9kLgkE8m.mjs";
|
|
2
|
+
import "../../../../../types-Del0VMij.mjs";
|
|
3
|
+
import "../../../../../types-DO7whVYU.mjs";
|
|
4
|
+
import "../../../../../byline-fields-CQJRIQkn.mjs";
|
|
5
|
+
import "../../../../../index-D2VAiumu.mjs";
|
|
6
|
+
import "../../../../../runner-C8vcbvCe.mjs";
|
|
7
|
+
import "../../../../../index-uT2yR66F.mjs";
|
|
8
|
+
import "../../../../../types-BFgYtuKd.mjs";
|
|
9
|
+
import "../../../../../validate-cJOiOvT2.mjs";
|
|
10
10
|
import { EmDashHandlers, EmDashManifest } from "../../../../types.mjs";
|
|
11
11
|
import { Kysely } from "kysely";
|
|
12
12
|
import { WxrPost } from "emdash";
|
|
@@ -3,15 +3,16 @@ import { n as slugify } from "../../../../../slugify-Cjh1ssOZ.mjs";
|
|
|
3
3
|
import "../../../../../base64-CqR-7kqF.mjs";
|
|
4
4
|
import "../../../../../types-BXSUSAjt.mjs";
|
|
5
5
|
import { t as TaxonomyRepository } from "../../../../../taxonomy-CdllE4oq.mjs";
|
|
6
|
-
import "../../../../../
|
|
7
|
-
import "../../../../../
|
|
8
|
-
import
|
|
9
|
-
import "../../../../../
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
6
|
+
import "../../../../../init-lock-DlBHjf9-.mjs";
|
|
7
|
+
import "../../../../../request-cache-UwmBAiUK.mjs";
|
|
8
|
+
import "../../../../../byline-registry-DedidtqC.mjs";
|
|
9
|
+
import { t as BylineRepository } from "../../../../../byline-V_Qp1Ziw.mjs";
|
|
10
|
+
import "../../../../../loader-BqWjcH3h.mjs";
|
|
11
|
+
import { i as resolveLocaleChain } from "../../../../../resolve-B3NUUtVY.mjs";
|
|
12
|
+
import { l as invalidateTermCache } from "../../../../../taxonomies-BBxYA38v.mjs";
|
|
13
|
+
import { n as apiSuccess, r as handleError, t as apiError } from "../../../../../error-CNn_w7jf.mjs";
|
|
14
|
+
import { m as resolveImportByline } from "../../../../../utils-C4M981Br.mjs";
|
|
15
|
+
import { n as requirePerm } from "../../../../../authorize-D5gfBVU5.mjs";
|
|
15
16
|
import { sanitizeSlug } from "./analyze.mjs";
|
|
16
17
|
import { gutenbergToPortableText } from "@emdash-cms/gutenberg-to-portable-text";
|
|
17
18
|
import { ContentRepository, importReusableBlocksAsSections, parseWxrDate, parseWxrString } from "emdash";
|