emdash 0.25.1 → 0.27.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-DAAjOID4.d.mts → adapters-u037EnTR.d.mts} +1 -1
- package/dist/{adapters-DAAjOID4.d.mts.map → adapters-u037EnTR.d.mts.map} +1 -1
- package/dist/api/route-utils.d.mts +3 -3
- package/dist/api/route-utils.mjs +11 -11
- package/dist/api/schemas/index.d.mts +1 -1
- package/dist/{api-D2_sbavn.mjs → api-80kycR9o.mjs} +86 -30
- package/dist/api-80kycR9o.mjs.map +1 -0
- package/dist/{apply-Bk2mAuLn.mjs → apply-DSypk6Iu.mjs} +20 -18
- package/dist/apply-DSypk6Iu.mjs.map +1 -0
- package/dist/astro/index.d.mts +11 -10
- package/dist/astro/index.d.mts.map +1 -1
- package/dist/astro/index.mjs +12 -3
- package/dist/astro/index.mjs.map +1 -1
- package/dist/astro/middleware/auth.d.mts +10 -9
- package/dist/astro/middleware/auth.d.mts.map +1 -1
- package/dist/astro/middleware/auth.mjs +4 -3
- package/dist/astro/middleware/auth.mjs.map +1 -1
- package/dist/astro/middleware/redirect.mjs +4 -4
- package/dist/astro/middleware.d.mts +2 -9
- package/dist/astro/middleware.d.mts.map +1 -1
- package/dist/astro/middleware.mjs +86 -85
- package/dist/astro/middleware.mjs.map +1 -1
- package/dist/astro/routes/api/admin/allowed-domains/_domain_.mjs +3 -3
- package/dist/astro/routes/api/admin/allowed-domains/index.mjs +3 -3
- package/dist/astro/routes/api/admin/api-tokens/_id_.mjs +2 -2
- package/dist/astro/routes/api/admin/api-tokens/index.mjs +3 -3
- package/dist/astro/routes/api/admin/byline-fields/_slug_/usage.mjs +3 -3
- package/dist/astro/routes/api/admin/byline-fields/_slug_.mjs +4 -4
- package/dist/astro/routes/api/admin/byline-fields/index.mjs +4 -4
- package/dist/astro/routes/api/admin/byline-fields/reorder.mjs +4 -4
- package/dist/astro/routes/api/admin/bylines/_id_/index.mjs +10 -10
- package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs +10 -10
- package/dist/astro/routes/api/admin/bylines/index.mjs +10 -10
- package/dist/astro/routes/api/admin/comments/_id_/status.mjs +8 -8
- package/dist/astro/routes/api/admin/comments/_id_.mjs +6 -6
- package/dist/astro/routes/api/admin/comments/bulk.mjs +7 -7
- package/dist/astro/routes/api/admin/comments/counts.mjs +6 -6
- package/dist/astro/routes/api/admin/comments/index.mjs +7 -7
- 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/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 -29
- package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +29 -29
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +29 -29
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +28 -28
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs +28 -28
- package/dist/astro/routes/api/admin/plugins/index.mjs +29 -29
- package/dist/astro/routes/api/admin/plugins/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/icon.mjs +3 -3
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs +28 -28
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs +28 -28
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +28 -28
- package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.mjs +28 -28
- package/dist/astro/routes/api/admin/plugins/registry/_id_/update.mjs +29 -29
- package/dist/astro/routes/api/admin/plugins/registry/artifact.mjs +28 -28
- package/dist/astro/routes/api/admin/plugins/registry/install.mjs +29 -29
- package/dist/astro/routes/api/admin/plugins/updates.mjs +28 -28
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +28 -28
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/thumbnail.mjs +3 -3
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs +28 -28
- package/dist/astro/routes/api/admin/users/_id_/disable.mjs +2 -2
- package/dist/astro/routes/api/admin/users/_id_/enable.mjs +2 -2
- package/dist/astro/routes/api/admin/users/_id_/index.mjs +3 -3
- package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs +2 -2
- package/dist/astro/routes/api/admin/users/index.mjs +3 -3
- package/dist/astro/routes/api/auth/dev-bypass.mjs +3 -3
- package/dist/astro/routes/api/auth/invite/accept.mjs +2 -2
- package/dist/astro/routes/api/auth/invite/complete.mjs +3 -3
- package/dist/astro/routes/api/auth/invite/index.mjs +3 -3
- package/dist/astro/routes/api/auth/invite/register-options.mjs +3 -3
- package/dist/astro/routes/api/auth/logout.mjs +2 -2
- package/dist/astro/routes/api/auth/magic-link/send.mjs +4 -4
- package/dist/astro/routes/api/auth/magic-link/verify.mjs +2 -2
- package/dist/astro/routes/api/auth/me.mjs +4 -4
- package/dist/astro/routes/api/auth/passkey/_id_.mjs +3 -3
- package/dist/astro/routes/api/auth/passkey/index.mjs +2 -2
- package/dist/astro/routes/api/auth/passkey/options.mjs +4 -4
- package/dist/astro/routes/api/auth/passkey/register/options.mjs +3 -3
- package/dist/astro/routes/api/auth/passkey/register/verify.mjs +3 -3
- package/dist/astro/routes/api/auth/passkey/verify.mjs +3 -3
- package/dist/astro/routes/api/auth/signup/complete.mjs +3 -3
- package/dist/astro/routes/api/auth/signup/request.mjs +4 -4
- package/dist/astro/routes/api/auth/signup/verify.mjs +2 -2
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs +7 -7
- package/dist/astro/routes/api/comments/_collection_/_contentId_/reactions.mjs +7 -7
- package/dist/astro/routes/api/content/_collection_/_id_/compare.mjs +3 -3
- 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 +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs +4 -4
- package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs +4 -4
- package/dist/astro/routes/api/content/_collection_/_id_/restore.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_/revisions.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs +4 -4
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs +9 -9
- package/dist/astro/routes/api/content/_collection_/_id_/translations.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_.mjs +4 -4
- package/dist/astro/routes/api/content/_collection_/authors.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/index.mjs +4 -4
- package/dist/astro/routes/api/content/_collection_/trash.mjs +4 -4
- package/dist/astro/routes/api/dashboard.mjs +8 -8
- 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 +4 -4
- package/dist/astro/routes/api/import/wordpress/analyze.mjs +3 -3
- package/dist/astro/routes/api/import/wordpress/execute.d.mts +10 -9
- package/dist/astro/routes/api/import/wordpress/execute.d.mts.map +1 -1
- package/dist/astro/routes/api/import/wordpress/execute.mjs +9 -9
- package/dist/astro/routes/api/import/wordpress/media.d.mts +10 -9
- package/dist/astro/routes/api/import/wordpress/media.d.mts.map +1 -1
- package/dist/astro/routes/api/import/wordpress/media.mjs +4 -4
- package/dist/astro/routes/api/import/wordpress/prepare.mjs +6 -6
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs +5 -5
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.d.mts +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs +4 -4
- package/dist/astro/routes/api/import/wordpress-plugin/execute.d.mts +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs +7 -7
- package/dist/astro/routes/api/manifest.d.mts.map +1 -1
- package/dist/astro/routes/api/manifest.mjs +13 -4
- package/dist/astro/routes/api/manifest.mjs.map +1 -1
- package/dist/astro/routes/api/mcp.mjs +34 -34
- package/dist/astro/routes/api/media/_id_/confirm.mjs +4 -4
- package/dist/astro/routes/api/media/_id_.mjs +4 -4
- package/dist/astro/routes/api/media/file/_...key_.mjs +2 -2
- package/dist/astro/routes/api/media/providers/_providerId_/_itemId_.mjs +3 -3
- package/dist/astro/routes/api/media/providers/_providerId_/index.mjs +3 -3
- package/dist/astro/routes/api/media/providers/index.mjs +3 -3
- package/dist/astro/routes/api/media/upload-url.mjs +4 -4
- package/dist/astro/routes/api/media.mjs +5 -5
- package/dist/astro/routes/api/menus/_name_/items/_id_.mjs +6 -6
- package/dist/astro/routes/api/menus/_name_/items.mjs +6 -6
- package/dist/astro/routes/api/menus/_name_/reorder.mjs +6 -6
- package/dist/astro/routes/api/menus/_name_/translations.mjs +6 -6
- package/dist/astro/routes/api/menus/_name_.mjs +6 -6
- package/dist/astro/routes/api/menus/index.mjs +6 -6
- package/dist/astro/routes/api/oauth/device/authorize.mjs +3 -3
- package/dist/astro/routes/api/oauth/device/code.mjs +4 -4
- package/dist/astro/routes/api/oauth/device/token.mjs +4 -4
- package/dist/astro/routes/api/oauth/register.mjs +2 -2
- package/dist/astro/routes/api/oauth/token/refresh.mjs +3 -3
- package/dist/astro/routes/api/oauth/token/revoke.mjs +3 -3
- package/dist/astro/routes/api/oauth/token.mjs +2 -2
- package/dist/astro/routes/api/openapi.json.mjs +2 -2
- package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs +3 -3
- package/dist/astro/routes/api/redirects/404s/index.mjs +6 -6
- package/dist/astro/routes/api/redirects/404s/summary.mjs +6 -6
- package/dist/astro/routes/api/redirects/_id_.mjs +7 -7
- package/dist/astro/routes/api/redirects/index.mjs +7 -7
- package/dist/astro/routes/api/revisions/_revisionId_/index.mjs +3 -3
- package/dist/astro/routes/api/revisions/_revisionId_/restore.mjs +3 -3
- package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs +28 -28
- package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs +28 -28
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs +28 -28
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +28 -28
- package/dist/astro/routes/api/schema/collections/index.mjs +28 -28
- package/dist/astro/routes/api/schema/index.mjs +6 -6
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs +28 -28
- package/dist/astro/routes/api/schema/orphans/index.mjs +28 -28
- package/dist/astro/routes/api/search/enable.mjs +7 -7
- package/dist/astro/routes/api/search/index.mjs +6 -6
- package/dist/astro/routes/api/search/rebuild.mjs +7 -7
- package/dist/astro/routes/api/search/stats.mjs +6 -6
- package/dist/astro/routes/api/search/suggest.mjs +6 -6
- package/dist/astro/routes/api/sections/_slug_.mjs +6 -6
- package/dist/astro/routes/api/sections/index.mjs +6 -6
- package/dist/astro/routes/api/settings/email.mjs +4 -4
- package/dist/astro/routes/api/settings.mjs +9 -9
- package/dist/astro/routes/api/setup/admin-verify.mjs +3 -3
- package/dist/astro/routes/api/setup/admin.mjs +3 -3
- package/dist/astro/routes/api/setup/dev-bypass.d.mts.map +1 -1
- package/dist/astro/routes/api/setup/dev-bypass.mjs +20 -18
- 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 +18 -18
- package/dist/astro/routes/api/setup/status.mjs +3 -3
- package/dist/astro/routes/api/snapshot.mjs +3 -3
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs +9 -9
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs +9 -9
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs +9 -9
- package/dist/astro/routes/api/taxonomies/index.mjs +9 -9
- package/dist/astro/routes/api/themes/preview.mjs +3 -3
- package/dist/astro/routes/api/typegen.mjs +5 -5
- package/dist/astro/routes/api/widget-areas/_name_/reorder.mjs +4 -4
- package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs +6 -6
- package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs +6 -6
- package/dist/astro/routes/api/widget-areas/_name_.mjs +5 -5
- package/dist/astro/routes/api/widget-areas/index.mjs +6 -6
- package/dist/astro/routes/api/widget-components.mjs +2 -2
- package/dist/astro/routes/robots.txt.mjs +5 -5
- package/dist/astro/routes/sitemap-_collection_.xml.mjs +10 -9
- package/dist/astro/routes/sitemap-_collection_.xml.mjs.map +1 -1
- package/dist/astro/routes/sitemap.xml.mjs +5 -5
- package/dist/astro/types.d.mts +12 -10
- 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-CuxZ0i2t.mjs → authorize-C3a_zGsM.mjs} +2 -2
- package/dist/{authorize-CuxZ0i2t.mjs.map → authorize-C3a_zGsM.mjs.map} +1 -1
- package/dist/{byline-C-YajfV7.mjs → byline-DEKSVPTy.mjs} +6 -6
- package/dist/{byline-C-YajfV7.mjs.map → byline-DEKSVPTy.mjs.map} +1 -1
- package/dist/{byline-fields-KD3JFRuH.d.mts → byline-fields-CtQ6blXd.d.mts} +32 -32
- package/dist/{byline-fields-KD3JFRuH.d.mts.map → byline-fields-CtQ6blXd.d.mts.map} +1 -1
- package/dist/{bylines-CPc_q2Vd.mjs → bylines-CiqgTHWF.mjs} +5 -5
- package/dist/{bylines-CPc_q2Vd.mjs.map → bylines-CiqgTHWF.mjs.map} +1 -1
- package/dist/{bylines-D4KADDAi.mjs → bylines-Ds4-otXl.mjs} +4 -4
- package/dist/{bylines-D4KADDAi.mjs.map → bylines-Ds4-otXl.mjs.map} +1 -1
- package/dist/{cache-C35VWD5D.mjs → cache-Ciu3e3AF.mjs} +2 -2
- package/dist/{cache-C35VWD5D.mjs.map → cache-Ciu3e3AF.mjs.map} +1 -1
- package/dist/{chunks-BHgcHh2C.mjs → chunks-CZFiauig.mjs} +2 -2
- package/dist/{chunks-BHgcHh2C.mjs.map → chunks-CZFiauig.mjs.map} +1 -1
- package/dist/cli/index.mjs +17 -17
- 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/{comment-BDx50EX5.mjs → comment-CH1IrFFs.mjs} +3 -3
- package/dist/{comment-BDx50EX5.mjs.map → comment-CH1IrFFs.mjs.map} +1 -1
- package/dist/{comment-reaction-Gv_pgfI3.mjs → comment-reaction-kruNY-kP.mjs} +2 -2
- package/dist/{comment-reaction-Gv_pgfI3.mjs.map → comment-reaction-kruNY-kP.mjs.map} +1 -1
- package/dist/{comments-CXHuQ6jI.mjs → comments-BUJyXbgq.mjs} +3 -3
- package/dist/{comments-CXHuQ6jI.mjs.map → comments-BUJyXbgq.mjs.map} +1 -1
- package/dist/{content-B43-YrIq.mjs → content-RmfHoWqK.mjs} +4 -4
- package/dist/{content-B43-YrIq.mjs.map → content-RmfHoWqK.mjs.map} +1 -1
- package/dist/{context-BW3N7wyt.mjs → context-CzUU_WzL.mjs} +7 -7
- package/dist/{context-BW3N7wyt.mjs.map → context-CzUU_WzL.mjs.map} +1 -1
- package/dist/{dashboard-FIe0S512.mjs → dashboard-CVyGhift.mjs} +4 -4
- package/dist/{dashboard-FIe0S512.mjs.map → dashboard-CVyGhift.mjs.map} +1 -1
- package/dist/db/index.d.mts +3 -3
- package/dist/db/index.mjs +1 -1
- 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/{error-DXnK2wF4.mjs → error-BHkLZk-w.mjs} +2 -2
- package/dist/{error-DXnK2wF4.mjs.map → error-BHkLZk-w.mjs.map} +1 -1
- package/dist/{field-defs-cache-CYYx8xlG.mjs → field-defs-cache-BA-8ZPiT.mjs} +2 -2
- package/dist/{field-defs-cache-CYYx8xlG.mjs.map → field-defs-cache-BA-8ZPiT.mjs.map} +1 -1
- package/dist/{fts-manager-DW_NR-Fs.mjs → fts-manager-Db9jGavf.mjs} +2 -2
- package/dist/{fts-manager-DW_NR-Fs.mjs.map → fts-manager-Db9jGavf.mjs.map} +1 -1
- package/dist/{index-Cz6_JBL3.d.mts → index-CDZZjrLT.d.mts} +2430 -2363
- package/dist/index-CDZZjrLT.d.mts.map +1 -0
- package/dist/{index-qbL02uhs.d.mts → index-DGIjmUXQ.d.mts} +3 -3
- package/dist/{index-qbL02uhs.d.mts.map → index-DGIjmUXQ.d.mts.map} +1 -1
- package/dist/index.d.mts +16 -15
- package/dist/index.mjs +38 -38
- package/dist/{load-DMFi4n1p.mjs → load-DpHICVPh.mjs} +2 -2
- package/dist/{load-DMFi4n1p.mjs.map → load-DpHICVPh.mjs.map} +1 -1
- package/dist/{loader-DrpofRon.mjs → loader-4K37qA-y.mjs} +81 -18
- package/dist/loader-4K37qA-y.mjs.map +1 -0
- package/dist/{manifest-schema-BOfPXse0.mjs → manifest-schema-kPGX7VS-.mjs} +3 -1
- package/dist/manifest-schema-kPGX7VS-.mjs.map +1 -0
- package/dist/media/local-runtime.d.mts +11 -10
- package/dist/media/local-runtime.d.mts.map +1 -1
- package/dist/media/local-runtime.mjs +5 -5
- package/dist/{media-BjKxjzk8.mjs → media-C0nRRfs1.mjs} +2 -2
- package/dist/{media-BjKxjzk8.mjs.map → media-C0nRRfs1.mjs.map} +1 -1
- package/dist/{menus-CxqJ-z-N.mjs → menus-DzRyC1ID.mjs} +50 -68
- package/dist/menus-DzRyC1ID.mjs.map +1 -0
- package/dist/{menus-8O6xNcYW.mjs → menus-SL2K0xq2.mjs} +3 -3
- package/dist/{menus-8O6xNcYW.mjs.map → menus-SL2K0xq2.mjs.map} +1 -1
- package/dist/object-cache/memory.d.mts +1 -1
- package/dist/{object-cache-SEb2IM4Z.mjs → object-cache-CHbHv83-.mjs} +8 -4
- package/dist/object-cache-CHbHv83-.mjs.map +1 -0
- package/dist/{options-BvClpP5Q.d.mts → options-41nCWqi9.d.mts} +2 -2
- package/dist/{options-BvClpP5Q.d.mts.map → options-41nCWqi9.d.mts.map} +1 -1
- package/dist/page/index.d.mts +6 -3
- package/dist/page/index.d.mts.map +1 -1
- package/dist/page/index.mjs +3 -2
- package/dist/page/index.mjs.map +1 -1
- package/dist/{parse-DqMWHQ8x.mjs → parse-CqyZj3Hp.mjs} +2 -2
- package/dist/{parse-DqMWHQ8x.mjs.map → parse-CqyZj3Hp.mjs.map} +1 -1
- package/dist/plugin-types.d.mts +4 -2
- package/dist/plugin-types.d.mts.map +1 -1
- package/dist/plugin-utils.d.mts +10 -9
- package/dist/plugin-utils.d.mts.map +1 -1
- package/dist/plugins/adapt-sandbox-entry.d.mts +10 -9
- package/dist/plugins/adapt-sandbox-entry.d.mts.map +1 -1
- package/dist/plugins/adapt-sandbox-entry.mjs +1 -1
- package/dist/{query-34pfm02Q.mjs → query-B0M-9LYR.mjs} +14 -14
- package/dist/{query-34pfm02Q.mjs.map → query-B0M-9LYR.mjs.map} +1 -1
- package/dist/{rate-limit-CBQK4ygJ.mjs → rate-limit-BwoUdIpC.mjs} +2 -2
- package/dist/{rate-limit-CBQK4ygJ.mjs.map → rate-limit-BwoUdIpC.mjs.map} +1 -1
- package/dist/{redirect-C1KVGYWe.mjs → redirect-lMOzG04S.mjs} +2 -2
- package/dist/{redirect-C1KVGYWe.mjs.map → redirect-lMOzG04S.mjs.map} +1 -1
- package/dist/{redirects-DgnypVir.mjs → redirects-9218MmYl.mjs} +3 -3
- package/dist/{redirects-DgnypVir.mjs.map → redirects-9218MmYl.mjs.map} +1 -1
- package/dist/{registry-3aOAS4My.mjs → registry-DP-iEtdR.mjs} +4 -4
- package/dist/{registry-3aOAS4My.mjs.map → registry-DP-iEtdR.mjs.map} +1 -1
- package/dist/{runner-CEtq-6Sm.d.mts → runner-BbR3DfrL.d.mts} +2 -2
- package/dist/{runner-CEtq-6Sm.d.mts.map → runner-BbR3DfrL.d.mts.map} +1 -1
- package/dist/{runner-BsquExlK.mjs → runner-CFngB4WZ.mjs} +296 -191
- package/dist/runner-CFngB4WZ.mjs.map +1 -0
- package/dist/runtime.d.mts +10 -9
- package/dist/runtime.d.mts.map +1 -1
- package/dist/runtime.mjs +2 -2
- package/dist/scheduled-publish-BMljtY5G.d.mts +11 -0
- package/dist/scheduled-publish-BMljtY5G.d.mts.map +1 -0
- package/dist/{schema-BGwx8AQY.mjs → schema-BfJ7bIXH.mjs} +5 -5
- package/dist/{schema-BGwx8AQY.mjs.map → schema-BfJ7bIXH.mjs.map} +1 -1
- package/dist/{search-Gl747zMP.mjs → search-C7t3PH1J.mjs} +6 -4
- package/dist/search-C7t3PH1J.mjs.map +1 -0
- package/dist/{sections-C-umuuLj.mjs → sections-Dm0CVX23.mjs} +3 -3
- package/dist/{sections-C-umuuLj.mjs.map → sections-Dm0CVX23.mjs.map} +1 -1
- package/dist/seed/index.d.mts +2 -2
- package/dist/seed/index.mjs +15 -15
- package/dist/{seo-BNzkiK_W.mjs → seo-Dd3tbY_k.mjs} +3 -3
- package/dist/{seo-BNzkiK_W.mjs.map → seo-Dd3tbY_k.mjs.map} +1 -1
- package/dist/{service-CQHK_10l.mjs → service-CTrqp_Jy.mjs} +2 -2
- package/dist/{service-CQHK_10l.mjs.map → service-CTrqp_Jy.mjs.map} +1 -1
- package/dist/{settings-C4tXRYiG.mjs → settings-BX8cWBus.mjs} +4 -4
- package/dist/{settings-C4tXRYiG.mjs.map → settings-BX8cWBus.mjs.map} +1 -1
- package/dist/{settings-fPSR6dJa.mjs → settings-CZ7ZP9cW.mjs} +3 -3
- package/dist/{settings-fPSR6dJa.mjs.map → settings-CZ7ZP9cW.mjs.map} +1 -1
- package/dist/storage/local.d.mts +1 -1
- package/dist/storage/s3.d.mts +1 -1
- package/dist/{taxonomies-DbAtL6m4.mjs → taxonomies-DChKcVxf.mjs} +5 -4
- package/dist/taxonomies-DChKcVxf.mjs.map +1 -0
- package/dist/{taxonomies-n8w72lLQ.mjs → taxonomies-ckPjz-6d.mjs} +75 -20
- package/dist/taxonomies-ckPjz-6d.mjs.map +1 -0
- package/dist/{taxonomy-BBUlGug5.mjs → taxonomy-Cru-he6s.mjs} +4 -4
- package/dist/{taxonomy-BBUlGug5.mjs.map → taxonomy-Cru-he6s.mjs.map} +1 -1
- package/dist/{transport-BZ-03aFT.d.mts → transport-Blrl2k_o.d.mts} +1 -1
- package/dist/{transport-BZ-03aFT.d.mts.map → transport-Blrl2k_o.d.mts.map} +1 -1
- package/dist/{types-h2Cwbzi2.d.mts → types-BYnDBVwe.d.mts} +24 -5
- package/dist/{types-h2Cwbzi2.d.mts.map → types-BYnDBVwe.d.mts.map} +1 -1
- package/dist/{types-BG8_XTLj.d.mts → types-BkZ8DUEI.d.mts} +1 -1
- package/dist/{types-BG8_XTLj.d.mts.map → types-BkZ8DUEI.d.mts.map} +1 -1
- package/dist/{types-DrYMm9s5.d.mts → types-ByChcBgE.d.mts} +1 -1
- package/dist/{types-DrYMm9s5.d.mts.map → types-ByChcBgE.d.mts.map} +1 -1
- package/dist/{types-BWqGVhFn.d.mts → types-CvuKO5Pn.d.mts} +1 -1
- package/dist/{types-BWqGVhFn.d.mts.map → types-CvuKO5Pn.d.mts.map} +1 -1
- package/dist/{types-CmI1OyQg.mjs → types-DU4TSFS5.mjs} +2 -2
- package/dist/{types-CmI1OyQg.mjs.map → types-DU4TSFS5.mjs.map} +1 -1
- package/dist/{types-CUsXGRVj.d.mts → types-Dbqff978.d.mts} +1 -1
- package/dist/{types-CUsXGRVj.d.mts.map → types-Dbqff978.d.mts.map} +1 -1
- package/dist/{types-fS7-VTdR.d.mts → types-Y09-wtyU.d.mts} +1 -1
- package/dist/{types-fS7-VTdR.d.mts.map → types-Y09-wtyU.d.mts.map} +1 -1
- package/dist/{types-B-gIxFCE.d.mts → types-xIfVRNLp.d.mts} +38 -1
- package/dist/types-xIfVRNLp.d.mts.map +1 -0
- package/dist/{user-JAuc8VUf.mjs → user-DgGbKL9s.mjs} +3 -3
- package/dist/{user-JAuc8VUf.mjs.map → user-DgGbKL9s.mjs.map} +1 -1
- package/dist/{validate-Va_An3qb.d.mts → validate-9ECmtEpJ.d.mts} +10 -5
- package/dist/{validate-Va_An3qb.d.mts.map → validate-9ECmtEpJ.d.mts.map} +1 -1
- package/dist/{validate-BzXHWnkV.mjs → validate-CRkcYZAR.mjs} +2 -2
- package/dist/{validate-BzXHWnkV.mjs.map → validate-CRkcYZAR.mjs.map} +1 -1
- package/dist/{validation-B6DKPTtU.mjs → validation-sR26SOwD.mjs} +5 -5
- package/dist/{validation-B6DKPTtU.mjs.map → validation-sR26SOwD.mjs.map} +1 -1
- package/dist/version-CrqhKGWn.mjs +7 -0
- package/dist/{version-DHdCA24u.mjs.map → version-CrqhKGWn.mjs.map} +1 -1
- package/dist/{widgets-C2RbFN0G.mjs → widgets-DRgtn7Cl.mjs} +2 -2
- package/dist/{widgets-C2RbFN0G.mjs.map → widgets-DRgtn7Cl.mjs.map} +1 -1
- package/dist/{zod-generator-xEHODMJf.mjs → zod-generator-C5JaV--i.mjs} +6 -3
- package/dist/zod-generator-C5JaV--i.mjs.map +1 -0
- package/package.json +8 -8
- package/src/api/handlers/content.ts +59 -16
- package/src/api/handlers/plugins.ts +77 -10
- package/src/api/handlers/taxonomies.ts +5 -1
- package/src/astro/integration/virtual-modules.ts +15 -0
- package/src/astro/integration/vite-config.ts +19 -1
- package/src/astro/middleware/auth.ts +1 -0
- package/src/astro/middleware.ts +1 -0
- package/src/astro/routes/api/admin/plugins/[id]/disable.ts +6 -1
- package/src/astro/routes/api/admin/plugins/[id]/enable.ts +6 -1
- package/src/astro/routes/api/admin/plugins/[id]/index.ts +1 -0
- package/src/astro/routes/api/admin/plugins/index.ts +1 -0
- package/src/astro/routes/api/manifest.ts +20 -1
- package/src/astro/routes/api/setup/dev-bypass.ts +7 -2
- package/src/astro/routes/sitemap-[collection].xml.ts +5 -4
- package/src/astro/types.ts +4 -0
- package/src/cli/commands/seed.ts +1 -1
- package/src/components/EmDashHead.astro +23 -3
- package/src/components/JsonLdScript.astro +9 -0
- package/src/components/LiveSearch.astro +40 -4
- package/src/components/live-search-routing.ts +30 -0
- package/src/database/migrations/036_i18n_menus_and_taxonomies.ts +39 -18
- package/src/database/migrations/046_media_usage_index.ts +115 -0
- package/src/database/migrations/047_restore_taxonomy_parent_index.ts +29 -0
- package/src/database/migrations/048_restore_content_taxonomies_term_index.ts +32 -0
- package/src/database/migrations/runner.ts +6 -0
- package/src/database/repositories/media-usage.ts +444 -0
- package/src/database/types.ts +39 -0
- package/src/emdash-runtime.ts +61 -52
- package/src/index.ts +3 -0
- package/src/loader.ts +110 -31
- package/src/media/usage/extractor.ts +302 -0
- package/src/media/usage/types.ts +46 -0
- package/src/object-cache/index.ts +8 -2
- package/src/page/metadata.ts +23 -3
- package/src/plugin-types.ts +10 -0
- package/src/plugins/define-plugin.ts +14 -5
- package/src/plugins/hooks.ts +53 -65
- package/src/plugins/index.ts +5 -0
- package/src/plugins/manager.ts +22 -0
- package/src/plugins/manifest-schema.ts +2 -0
- package/src/plugins/types.ts +35 -3
- package/src/schema/zod-generator.ts +9 -1
- package/src/search/query.ts +3 -0
- package/src/search/types.ts +2 -0
- package/src/seed/apply.ts +8 -2
- package/src/seed/types.ts +6 -1
- package/src/taxonomies/index.ts +121 -18
- package/dist/api-D2_sbavn.mjs.map +0 -1
- package/dist/apply-Bk2mAuLn.mjs.map +0 -1
- package/dist/index-Cz6_JBL3.d.mts.map +0 -1
- package/dist/loader-DrpofRon.mjs.map +0 -1
- package/dist/manifest-schema-BOfPXse0.mjs.map +0 -1
- package/dist/menus-CxqJ-z-N.mjs.map +0 -1
- package/dist/object-cache-SEb2IM4Z.mjs.map +0 -1
- package/dist/runner-BsquExlK.mjs.map +0 -1
- package/dist/search-Gl747zMP.mjs.map +0 -1
- package/dist/taxonomies-DbAtL6m4.mjs.map +0 -1
- package/dist/taxonomies-n8w72lLQ.mjs.map +0 -1
- package/dist/types-B-gIxFCE.d.mts.map +0 -1
- package/dist/version-DHdCA24u.mjs +0 -7
- package/dist/zod-generator-xEHODMJf.mjs.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../../../../base64-CmWvODNW.mjs";
|
|
2
|
-
import "../../../../types-
|
|
3
|
-
import { n as apiSuccess, r as handleError, t as apiError } from "../../../../error-
|
|
4
|
-
import { n as loadUserSeed } from "../../../../load-
|
|
2
|
+
import "../../../../types-DU4TSFS5.mjs";
|
|
3
|
+
import { n as apiSuccess, r as handleError, t as apiError } from "../../../../error-BHkLZk-w.mjs";
|
|
4
|
+
import { n as loadUserSeed } from "../../../../load-DpHICVPh.mjs";
|
|
5
5
|
import { t as getAuthMode } from "../../../../mode-BB0F8xTC.mjs";
|
|
6
6
|
|
|
7
7
|
//#region src/astro/routes/api/setup/status.ts
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import "../../../after-B1IIdH3Y.mjs";
|
|
2
2
|
import "../../../base64-CmWvODNW.mjs";
|
|
3
|
-
import "../../../types-
|
|
3
|
+
import "../../../types-DU4TSFS5.mjs";
|
|
4
4
|
import "../../../options-DTTML-Tx.mjs";
|
|
5
|
-
import { n as apiSuccess, r as handleError, t as apiError } from "../../../error-
|
|
5
|
+
import { n as apiSuccess, r as handleError, t as apiError } from "../../../error-BHkLZk-w.mjs";
|
|
6
6
|
import { n as getPublicOrigin } from "../../../public-url-CTVqgMmg.mjs";
|
|
7
7
|
import { i as resolveSecretsCached } from "../../../secrets-BSf9pRRY.mjs";
|
|
8
8
|
import { t as resolveSessionUser } from "../../../session-user-B8aLtKAH.mjs";
|
|
9
|
-
import { n as requirePerm } from "../../../authorize-
|
|
9
|
+
import { n as requirePerm } from "../../../authorize-C3a_zGsM.mjs";
|
|
10
10
|
import { sql } from "kysely";
|
|
11
11
|
|
|
12
12
|
//#region src/api/handlers/snapshot.ts
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import "../../../../../../../dialect-helpers-DRI5pyY3.mjs";
|
|
2
2
|
import "../../../../../../../after-B1IIdH3Y.mjs";
|
|
3
|
-
import "../../../../../../../object-cache-
|
|
3
|
+
import "../../../../../../../object-cache-CHbHv83-.mjs";
|
|
4
4
|
import "../../../../../../../base64-CmWvODNW.mjs";
|
|
5
|
-
import "../../../../../../../types-
|
|
6
|
-
import "../../../../../../../taxonomy-
|
|
5
|
+
import "../../../../../../../types-DU4TSFS5.mjs";
|
|
6
|
+
import "../../../../../../../taxonomy-Cru-he6s.mjs";
|
|
7
7
|
import "../../../../../../../request-cache-KCNHp_RJ.mjs";
|
|
8
|
-
import "../../../../../../../loader-
|
|
8
|
+
import "../../../../../../../loader-4K37qA-y.mjs";
|
|
9
9
|
import "../../../../../../../resolve-C7I0qiR0.mjs";
|
|
10
|
-
import "../../../../../../../taxonomies-
|
|
11
|
-
import { a as handleTermGet, r as handleTermCreate, s as handleTermTranslations } from "../../../../../../../taxonomies-
|
|
12
|
-
import { a as unwrapResult, i as requireDb, r as handleError, t as apiError } from "../../../../../../../error-
|
|
13
|
-
import { i as parseQuery, n as parseBody, t as isParseError } from "../../../../../../../parse-
|
|
10
|
+
import "../../../../../../../taxonomies-ckPjz-6d.mjs";
|
|
11
|
+
import { a as handleTermGet, r as handleTermCreate, s as handleTermTranslations } from "../../../../../../../taxonomies-DChKcVxf.mjs";
|
|
12
|
+
import { a as unwrapResult, i as requireDb, r as handleError, t as apiError } from "../../../../../../../error-BHkLZk-w.mjs";
|
|
13
|
+
import { i as parseQuery, n as parseBody, t as isParseError } from "../../../../../../../parse-CqyZj3Hp.mjs";
|
|
14
14
|
import { Fn as localeFilterQuery } from "../../../../../../../redirects-Dcbuisoj.mjs";
|
|
15
15
|
import "../../../../../../../byline-fields-eyJMblSr.mjs";
|
|
16
16
|
import "../../../../../../../status-vUK0SA17.mjs";
|
|
17
17
|
import "../../../../../../../api/schemas/index.mjs";
|
|
18
|
-
import { n as requirePerm } from "../../../../../../../authorize-
|
|
18
|
+
import { n as requirePerm } from "../../../../../../../authorize-C3a_zGsM.mjs";
|
|
19
19
|
import { z } from "zod";
|
|
20
20
|
|
|
21
21
|
//#region src/astro/routes/api/taxonomies/[name]/terms/[slug]/translations.ts
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import "../../../../../../dialect-helpers-DRI5pyY3.mjs";
|
|
2
2
|
import "../../../../../../after-B1IIdH3Y.mjs";
|
|
3
|
-
import "../../../../../../object-cache-
|
|
3
|
+
import "../../../../../../object-cache-CHbHv83-.mjs";
|
|
4
4
|
import "../../../../../../base64-CmWvODNW.mjs";
|
|
5
|
-
import "../../../../../../types-
|
|
6
|
-
import "../../../../../../taxonomy-
|
|
5
|
+
import "../../../../../../types-DU4TSFS5.mjs";
|
|
6
|
+
import "../../../../../../taxonomy-Cru-he6s.mjs";
|
|
7
7
|
import "../../../../../../request-cache-KCNHp_RJ.mjs";
|
|
8
|
-
import "../../../../../../loader-
|
|
8
|
+
import "../../../../../../loader-4K37qA-y.mjs";
|
|
9
9
|
import "../../../../../../resolve-C7I0qiR0.mjs";
|
|
10
|
-
import "../../../../../../taxonomies-
|
|
11
|
-
import { a as handleTermGet, c as handleTermUpdate, i as handleTermDelete } from "../../../../../../taxonomies-
|
|
12
|
-
import { a as unwrapResult, i as requireDb, r as handleError, t as apiError } from "../../../../../../error-
|
|
13
|
-
import { i as parseQuery, n as parseBody, t as isParseError } from "../../../../../../parse-
|
|
10
|
+
import "../../../../../../taxonomies-ckPjz-6d.mjs";
|
|
11
|
+
import { a as handleTermGet, c as handleTermUpdate, i as handleTermDelete } from "../../../../../../taxonomies-DChKcVxf.mjs";
|
|
12
|
+
import { a as unwrapResult, i as requireDb, r as handleError, t as apiError } from "../../../../../../error-BHkLZk-w.mjs";
|
|
13
|
+
import { i as parseQuery, n as parseBody, t as isParseError } from "../../../../../../parse-CqyZj3Hp.mjs";
|
|
14
14
|
import { Fn as localeFilterQuery, Q as updateTermBody } from "../../../../../../redirects-Dcbuisoj.mjs";
|
|
15
15
|
import "../../../../../../byline-fields-eyJMblSr.mjs";
|
|
16
16
|
import "../../../../../../status-vUK0SA17.mjs";
|
|
17
17
|
import "../../../../../../api/schemas/index.mjs";
|
|
18
|
-
import { n as requirePerm } from "../../../../../../authorize-
|
|
18
|
+
import { n as requirePerm } from "../../../../../../authorize-C3a_zGsM.mjs";
|
|
19
19
|
|
|
20
20
|
//#region src/astro/routes/api/taxonomies/[name]/terms/[slug].ts
|
|
21
21
|
const prerender = false;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import "../../../../../../dialect-helpers-DRI5pyY3.mjs";
|
|
2
2
|
import "../../../../../../after-B1IIdH3Y.mjs";
|
|
3
|
-
import "../../../../../../object-cache-
|
|
3
|
+
import "../../../../../../object-cache-CHbHv83-.mjs";
|
|
4
4
|
import "../../../../../../base64-CmWvODNW.mjs";
|
|
5
|
-
import "../../../../../../types-
|
|
6
|
-
import "../../../../../../taxonomy-
|
|
5
|
+
import "../../../../../../types-DU4TSFS5.mjs";
|
|
6
|
+
import "../../../../../../taxonomy-Cru-he6s.mjs";
|
|
7
7
|
import "../../../../../../request-cache-KCNHp_RJ.mjs";
|
|
8
|
-
import "../../../../../../loader-
|
|
8
|
+
import "../../../../../../loader-4K37qA-y.mjs";
|
|
9
9
|
import "../../../../../../resolve-C7I0qiR0.mjs";
|
|
10
|
-
import "../../../../../../taxonomies-
|
|
11
|
-
import { o as handleTermList, r as handleTermCreate } from "../../../../../../taxonomies-
|
|
12
|
-
import { a as unwrapResult, i as requireDb, r as handleError, t as apiError } from "../../../../../../error-
|
|
13
|
-
import { i as parseQuery, n as parseBody, t as isParseError } from "../../../../../../parse-
|
|
10
|
+
import "../../../../../../taxonomies-ckPjz-6d.mjs";
|
|
11
|
+
import { o as handleTermList, r as handleTermCreate } from "../../../../../../taxonomies-DChKcVxf.mjs";
|
|
12
|
+
import { a as unwrapResult, i as requireDb, r as handleError, t as apiError } from "../../../../../../error-BHkLZk-w.mjs";
|
|
13
|
+
import { i as parseQuery, n as parseBody, t as isParseError } from "../../../../../../parse-CqyZj3Hp.mjs";
|
|
14
14
|
import { Fn as localeFilterQuery, H as createTermBody } from "../../../../../../redirects-Dcbuisoj.mjs";
|
|
15
15
|
import "../../../../../../byline-fields-eyJMblSr.mjs";
|
|
16
16
|
import "../../../../../../status-vUK0SA17.mjs";
|
|
17
17
|
import "../../../../../../api/schemas/index.mjs";
|
|
18
|
-
import { n as requirePerm } from "../../../../../../authorize-
|
|
18
|
+
import { n as requirePerm } from "../../../../../../authorize-C3a_zGsM.mjs";
|
|
19
19
|
|
|
20
20
|
//#region src/astro/routes/api/taxonomies/[name]/terms/index.ts
|
|
21
21
|
const prerender = false;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import "../../../../dialect-helpers-DRI5pyY3.mjs";
|
|
2
2
|
import "../../../../after-B1IIdH3Y.mjs";
|
|
3
|
-
import "../../../../object-cache-
|
|
3
|
+
import "../../../../object-cache-CHbHv83-.mjs";
|
|
4
4
|
import "../../../../base64-CmWvODNW.mjs";
|
|
5
|
-
import "../../../../types-
|
|
6
|
-
import "../../../../taxonomy-
|
|
5
|
+
import "../../../../types-DU4TSFS5.mjs";
|
|
6
|
+
import "../../../../taxonomy-Cru-he6s.mjs";
|
|
7
7
|
import "../../../../request-cache-KCNHp_RJ.mjs";
|
|
8
|
-
import "../../../../loader-
|
|
8
|
+
import "../../../../loader-4K37qA-y.mjs";
|
|
9
9
|
import "../../../../resolve-C7I0qiR0.mjs";
|
|
10
|
-
import "../../../../taxonomies-
|
|
11
|
-
import { n as handleTaxonomyList, t as handleTaxonomyCreate } from "../../../../taxonomies-
|
|
12
|
-
import { a as unwrapResult, i as requireDb, r as handleError } from "../../../../error-
|
|
13
|
-
import { i as parseQuery, n as parseBody, t as isParseError } from "../../../../parse-
|
|
10
|
+
import "../../../../taxonomies-ckPjz-6d.mjs";
|
|
11
|
+
import { n as handleTaxonomyList, t as handleTaxonomyCreate } from "../../../../taxonomies-DChKcVxf.mjs";
|
|
12
|
+
import { a as unwrapResult, i as requireDb, r as handleError } from "../../../../error-BHkLZk-w.mjs";
|
|
13
|
+
import { i as parseQuery, n as parseBody, t as isParseError } from "../../../../parse-CqyZj3Hp.mjs";
|
|
14
14
|
import { Fn as localeFilterQuery, V as createTaxonomyDefBody } from "../../../../redirects-Dcbuisoj.mjs";
|
|
15
15
|
import "../../../../byline-fields-eyJMblSr.mjs";
|
|
16
16
|
import "../../../../status-vUK0SA17.mjs";
|
|
17
17
|
import "../../../../api/schemas/index.mjs";
|
|
18
|
-
import { n as requirePerm } from "../../../../authorize-
|
|
18
|
+
import { n as requirePerm } from "../../../../authorize-C3a_zGsM.mjs";
|
|
19
19
|
|
|
20
20
|
//#region src/astro/routes/api/taxonomies/index.ts
|
|
21
21
|
const prerender = false;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import "../../../../after-B1IIdH3Y.mjs";
|
|
2
2
|
import "../../../../base64-CmWvODNW.mjs";
|
|
3
|
-
import "../../../../types-
|
|
3
|
+
import "../../../../types-DU4TSFS5.mjs";
|
|
4
4
|
import "../../../../options-DTTML-Tx.mjs";
|
|
5
|
-
import { n as apiSuccess, t as apiError } from "../../../../error-
|
|
5
|
+
import { n as apiSuccess, t as apiError } from "../../../../error-BHkLZk-w.mjs";
|
|
6
6
|
import { n as getPublicOrigin } from "../../../../public-url-CTVqgMmg.mjs";
|
|
7
7
|
import { i as resolveSecretsCached } from "../../../../secrets-BSf9pRRY.mjs";
|
|
8
|
-
import { n as requirePerm } from "../../../../authorize-
|
|
8
|
+
import { n as requirePerm } from "../../../../authorize-C3a_zGsM.mjs";
|
|
9
9
|
|
|
10
10
|
//#region src/astro/routes/api/themes/preview.ts
|
|
11
11
|
const prerender = false;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../../../base64-CmWvODNW.mjs";
|
|
2
|
-
import "../../../types-
|
|
3
|
-
import { n as apiSuccess, r as handleError, t as apiError } from "../../../error-
|
|
2
|
+
import "../../../types-DU4TSFS5.mjs";
|
|
3
|
+
import { n as apiSuccess, r as handleError, t as apiError } from "../../../error-BHkLZk-w.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/astro/routes/api/typegen.ts
|
|
6
6
|
const prerender = false;
|
|
@@ -19,7 +19,7 @@ async function safeListCollections(registry) {
|
|
|
19
19
|
* Generate types content and metadata from the current schema.
|
|
20
20
|
*/
|
|
21
21
|
async function generateTypes(registry) {
|
|
22
|
-
const { generateTypesFile, generateSchemaHash } = await import("../../../zod-generator-
|
|
22
|
+
const { generateTypesFile, generateSchemaHash } = await import("../../../zod-generator-C5JaV--i.mjs").then((n) => n.i);
|
|
23
23
|
const collections = await safeListCollections(registry);
|
|
24
24
|
const collectionsWithFields = await Promise.all(collections.map(async (c) => {
|
|
25
25
|
const fields = await registry.listFields(c.id);
|
|
@@ -42,7 +42,7 @@ const GET = async ({ locals }) => {
|
|
|
42
42
|
const { emdash } = locals;
|
|
43
43
|
if (!emdash?.db) return apiError("NOT_CONFIGURED", "EmDash not configured", 500);
|
|
44
44
|
try {
|
|
45
|
-
const { SchemaRegistry } = await import("../../../registry-
|
|
45
|
+
const { SchemaRegistry } = await import("../../../registry-DP-iEtdR.mjs").then((n) => n.r);
|
|
46
46
|
const { types } = await generateTypes(new SchemaRegistry(emdash.db));
|
|
47
47
|
return new Response(types, {
|
|
48
48
|
status: 200,
|
|
@@ -66,7 +66,7 @@ const POST = async ({ locals }) => {
|
|
|
66
66
|
const { emdash } = locals;
|
|
67
67
|
if (!emdash?.db) return apiError("NOT_CONFIGURED", "EmDash not configured", 500);
|
|
68
68
|
try {
|
|
69
|
-
const { SchemaRegistry } = await import("../../../registry-
|
|
69
|
+
const { SchemaRegistry } = await import("../../../registry-DP-iEtdR.mjs").then((n) => n.r);
|
|
70
70
|
return apiSuccess(await generateTypes(new SchemaRegistry(emdash.db)));
|
|
71
71
|
} catch (error) {
|
|
72
72
|
return handleError(error, "Typegen failed", "TYPEGEN_ERROR");
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import "../../../../../base64-CmWvODNW.mjs";
|
|
2
|
-
import "../../../../../types-
|
|
3
|
-
import { n as apiSuccess, r as handleError, t as apiError } from "../../../../../error-
|
|
4
|
-
import { n as parseBody, t as isParseError } from "../../../../../parse-
|
|
2
|
+
import "../../../../../types-DU4TSFS5.mjs";
|
|
3
|
+
import { n as apiSuccess, r as handleError, t as apiError } from "../../../../../error-BHkLZk-w.mjs";
|
|
4
|
+
import { n as parseBody, t as isParseError } from "../../../../../parse-CqyZj3Hp.mjs";
|
|
5
5
|
import { h as reorderWidgetsBody } from "../../../../../redirects-Dcbuisoj.mjs";
|
|
6
6
|
import "../../../../../byline-fields-eyJMblSr.mjs";
|
|
7
7
|
import "../../../../../status-vUK0SA17.mjs";
|
|
8
8
|
import "../../../../../api/schemas/index.mjs";
|
|
9
|
-
import { n as requirePerm } from "../../../../../authorize-
|
|
9
|
+
import { n as requirePerm } from "../../../../../authorize-C3a_zGsM.mjs";
|
|
10
10
|
|
|
11
11
|
//#region src/astro/routes/api/widget-areas/[name]/reorder.ts
|
|
12
12
|
const prerender = false;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import "../../../../../../dialect-helpers-DRI5pyY3.mjs";
|
|
2
2
|
import "../../../../../../base64-CmWvODNW.mjs";
|
|
3
|
-
import "../../../../../../types-
|
|
3
|
+
import "../../../../../../types-DU4TSFS5.mjs";
|
|
4
4
|
import "../../../../../../request-cache-KCNHp_RJ.mjs";
|
|
5
|
-
import "../../../../../../loader-
|
|
6
|
-
import { n as apiSuccess, r as handleError, t as apiError } from "../../../../../../error-
|
|
7
|
-
import { n as parseBody, t as isParseError } from "../../../../../../parse-
|
|
5
|
+
import "../../../../../../loader-4K37qA-y.mjs";
|
|
6
|
+
import { n as apiSuccess, r as handleError, t as apiError } from "../../../../../../error-BHkLZk-w.mjs";
|
|
7
|
+
import { n as parseBody, t as isParseError } from "../../../../../../parse-CqyZj3Hp.mjs";
|
|
8
8
|
import { g as updateWidgetBody } from "../../../../../../redirects-Dcbuisoj.mjs";
|
|
9
9
|
import "../../../../../../byline-fields-eyJMblSr.mjs";
|
|
10
10
|
import "../../../../../../status-vUK0SA17.mjs";
|
|
11
11
|
import "../../../../../../api/schemas/index.mjs";
|
|
12
|
-
import { i as rowToWidget } from "../../../../../../widgets-
|
|
13
|
-
import { n as requirePerm } from "../../../../../../authorize-
|
|
12
|
+
import { i as rowToWidget } from "../../../../../../widgets-DRgtn7Cl.mjs";
|
|
13
|
+
import { n as requirePerm } from "../../../../../../authorize-C3a_zGsM.mjs";
|
|
14
14
|
|
|
15
15
|
//#region src/astro/routes/api/widget-areas/[name]/widgets/[id].ts
|
|
16
16
|
const prerender = false;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import "../../../../../dialect-helpers-DRI5pyY3.mjs";
|
|
2
2
|
import "../../../../../base64-CmWvODNW.mjs";
|
|
3
|
-
import "../../../../../types-
|
|
3
|
+
import "../../../../../types-DU4TSFS5.mjs";
|
|
4
4
|
import "../../../../../request-cache-KCNHp_RJ.mjs";
|
|
5
|
-
import "../../../../../loader-
|
|
6
|
-
import { n as apiSuccess, r as handleError, t as apiError } from "../../../../../error-
|
|
7
|
-
import { n as parseBody, t as isParseError } from "../../../../../parse-
|
|
5
|
+
import "../../../../../loader-4K37qA-y.mjs";
|
|
6
|
+
import { n as apiSuccess, r as handleError, t as apiError } from "../../../../../error-BHkLZk-w.mjs";
|
|
7
|
+
import { n as parseBody, t as isParseError } from "../../../../../parse-CqyZj3Hp.mjs";
|
|
8
8
|
import { m as createWidgetBody } from "../../../../../redirects-Dcbuisoj.mjs";
|
|
9
9
|
import "../../../../../byline-fields-eyJMblSr.mjs";
|
|
10
10
|
import "../../../../../status-vUK0SA17.mjs";
|
|
11
11
|
import "../../../../../api/schemas/index.mjs";
|
|
12
|
-
import { i as rowToWidget } from "../../../../../widgets-
|
|
13
|
-
import { n as requirePerm } from "../../../../../authorize-
|
|
12
|
+
import { i as rowToWidget } from "../../../../../widgets-DRgtn7Cl.mjs";
|
|
13
|
+
import { n as requirePerm } from "../../../../../authorize-C3a_zGsM.mjs";
|
|
14
14
|
import { ulid } from "ulidx";
|
|
15
15
|
|
|
16
16
|
//#region src/astro/routes/api/widget-areas/[name]/widgets.ts
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import "../../../../dialect-helpers-DRI5pyY3.mjs";
|
|
2
2
|
import "../../../../base64-CmWvODNW.mjs";
|
|
3
|
-
import "../../../../types-
|
|
3
|
+
import "../../../../types-DU4TSFS5.mjs";
|
|
4
4
|
import "../../../../request-cache-KCNHp_RJ.mjs";
|
|
5
|
-
import "../../../../loader-
|
|
6
|
-
import { n as apiSuccess, r as handleError, t as apiError } from "../../../../error-
|
|
7
|
-
import { i as rowToWidget } from "../../../../widgets-
|
|
8
|
-
import { n as requirePerm } from "../../../../authorize-
|
|
5
|
+
import "../../../../loader-4K37qA-y.mjs";
|
|
6
|
+
import { n as apiSuccess, r as handleError, t as apiError } from "../../../../error-BHkLZk-w.mjs";
|
|
7
|
+
import { i as rowToWidget } from "../../../../widgets-DRgtn7Cl.mjs";
|
|
8
|
+
import { n as requirePerm } from "../../../../authorize-C3a_zGsM.mjs";
|
|
9
9
|
|
|
10
10
|
//#region src/astro/routes/api/widget-areas/[name].ts
|
|
11
11
|
const prerender = false;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import "../../../../dialect-helpers-DRI5pyY3.mjs";
|
|
2
2
|
import "../../../../base64-CmWvODNW.mjs";
|
|
3
|
-
import "../../../../types-
|
|
3
|
+
import "../../../../types-DU4TSFS5.mjs";
|
|
4
4
|
import "../../../../request-cache-KCNHp_RJ.mjs";
|
|
5
|
-
import "../../../../loader-
|
|
6
|
-
import { n as apiSuccess, r as handleError, t as apiError } from "../../../../error-
|
|
7
|
-
import { n as parseBody, t as isParseError } from "../../../../parse-
|
|
5
|
+
import "../../../../loader-4K37qA-y.mjs";
|
|
6
|
+
import { n as apiSuccess, r as handleError, t as apiError } from "../../../../error-BHkLZk-w.mjs";
|
|
7
|
+
import { n as parseBody, t as isParseError } from "../../../../parse-CqyZj3Hp.mjs";
|
|
8
8
|
import { p as createWidgetAreaBody } from "../../../../redirects-Dcbuisoj.mjs";
|
|
9
9
|
import "../../../../byline-fields-eyJMblSr.mjs";
|
|
10
10
|
import "../../../../status-vUK0SA17.mjs";
|
|
11
11
|
import "../../../../api/schemas/index.mjs";
|
|
12
|
-
import { i as rowToWidget } from "../../../../widgets-
|
|
13
|
-
import { n as requirePerm } from "../../../../authorize-
|
|
12
|
+
import { i as rowToWidget } from "../../../../widgets-DRgtn7Cl.mjs";
|
|
13
|
+
import { n as requirePerm } from "../../../../authorize-C3a_zGsM.mjs";
|
|
14
14
|
import { ulid } from "ulidx";
|
|
15
15
|
|
|
16
16
|
//#region src/astro/routes/api/widget-areas/index.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../../../base64-CmWvODNW.mjs";
|
|
2
|
-
import "../../../types-
|
|
3
|
-
import { n as apiSuccess, r as handleError } from "../../../error-
|
|
2
|
+
import "../../../types-DU4TSFS5.mjs";
|
|
3
|
+
import { n as apiSuccess, r as handleError } from "../../../error-BHkLZk-w.mjs";
|
|
4
4
|
import { t as getWidgetComponents } from "../../../components-CYt4uVK9.mjs";
|
|
5
5
|
|
|
6
6
|
//#region src/astro/routes/api/widget-components.ts
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import "../../dialect-helpers-DRI5pyY3.mjs";
|
|
2
2
|
import "../../after-B1IIdH3Y.mjs";
|
|
3
|
-
import "../../object-cache-
|
|
3
|
+
import "../../object-cache-CHbHv83-.mjs";
|
|
4
4
|
import "../../base64-CmWvODNW.mjs";
|
|
5
|
-
import "../../types-
|
|
6
|
-
import "../../media-
|
|
5
|
+
import "../../types-DU4TSFS5.mjs";
|
|
6
|
+
import "../../media-C0nRRfs1.mjs";
|
|
7
7
|
import "../../options-DTTML-Tx.mjs";
|
|
8
8
|
import "../../request-cache-KCNHp_RJ.mjs";
|
|
9
|
-
import "../../loader-
|
|
10
|
-
import { a as getSiteSettingsWithDb } from "../../settings-
|
|
9
|
+
import "../../loader-4K37qA-y.mjs";
|
|
10
|
+
import { a as getSiteSettingsWithDb } from "../../settings-BX8cWBus.mjs";
|
|
11
11
|
import { n as getPublicOrigin } from "../../public-url-CTVqgMmg.mjs";
|
|
12
12
|
|
|
13
13
|
//#region src/astro/routes/robots.txt.ts
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import "../../dialect-helpers-DRI5pyY3.mjs";
|
|
2
2
|
import { n as getI18nConfig, r as isI18nEnabled } from "../../config-CVssduLe.mjs";
|
|
3
3
|
import "../../after-B1IIdH3Y.mjs";
|
|
4
|
-
import "../../object-cache-
|
|
4
|
+
import "../../object-cache-CHbHv83-.mjs";
|
|
5
5
|
import "../../base64-CmWvODNW.mjs";
|
|
6
|
-
import "../../types-
|
|
7
|
-
import "../../media-
|
|
6
|
+
import "../../types-DU4TSFS5.mjs";
|
|
7
|
+
import "../../media-C0nRRfs1.mjs";
|
|
8
8
|
import "../../options-DTTML-Tx.mjs";
|
|
9
9
|
import "../../request-cache-KCNHp_RJ.mjs";
|
|
10
|
-
import "../../loader-
|
|
10
|
+
import "../../loader-4K37qA-y.mjs";
|
|
11
11
|
import { t as handleSitemapData } from "../../seo-BkhuuaaE.mjs";
|
|
12
|
-
import { a as getSiteSettingsWithDb } from "../../settings-
|
|
12
|
+
import { a as getSiteSettingsWithDb } from "../../settings-BX8cWBus.mjs";
|
|
13
13
|
import { n as localizePath, t as interpolateUrlPattern } from "../../resolve-C7I0qiR0.mjs";
|
|
14
14
|
import { t as buildSeoImageUrl } from "../../media-url-O4rm9-SQ.mjs";
|
|
15
15
|
import { n as getPublicOrigin } from "../../public-url-CTVqgMmg.mjs";
|
|
@@ -78,16 +78,17 @@ const GET = async ({ params, locals, url }) => {
|
|
|
78
78
|
lines.push(` <image:loc>${escapeXml(imageLoc)}</image:loc>`);
|
|
79
79
|
lines.push(" </image:image>");
|
|
80
80
|
}
|
|
81
|
-
|
|
82
|
-
|
|
81
|
+
const alternateEntries = siblings ?? (useXhtml ? [entry] : null);
|
|
82
|
+
if (useXhtml && alternateEntries) {
|
|
83
|
+
for (const sib of alternateEntries) {
|
|
83
84
|
const sibLoc = await resolveEntryUrl(sib);
|
|
84
85
|
if (sibLoc === null) continue;
|
|
85
86
|
lines.push(` <xhtml:link rel="alternate" hreflang="${escapeXml(sib.locale)}" href="${escapeXml(sibLoc)}" />`);
|
|
86
87
|
}
|
|
87
|
-
const defaultSibling = i18nConfig &&
|
|
88
|
+
const defaultSibling = i18nConfig && alternateEntries.find((s) => s.locale === i18nConfig.defaultLocale);
|
|
88
89
|
let xDefaultLoc = null;
|
|
89
90
|
if (defaultSibling) xDefaultLoc = await resolveEntryUrl(defaultSibling);
|
|
90
|
-
if (xDefaultLoc === null) for (const sib of
|
|
91
|
+
if (xDefaultLoc === null) for (const sib of alternateEntries) {
|
|
91
92
|
const sibLoc = await resolveEntryUrl(sib);
|
|
92
93
|
if (sibLoc !== null) {
|
|
93
94
|
xDefaultLoc = sibLoc;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sitemap-_collection_.xml.mjs","names":[],"sources":["../../../src/astro/routes/sitemap-[collection].xml.ts"],"sourcesContent":["/**\n * Per-collection sitemap endpoint\n *\n * GET /sitemap-{collection}.xml - Sitemap for a single content collection.\n *\n * Uses the collection's url_pattern to build URLs. Falls back to\n * /{collection}/{slug} when no pattern is configured.\n *\n * i18n behaviour: when Astro i18n is enabled, the locale prefix is\n * applied via Astro's own `getRelativeLocaleUrl` (which honours\n * `prefixDefaultLocale`, custom `path` mappings, and other `routing`\n * config). Each translation row is emitted as its own `<url>` with\n * `<xhtml:link rel=\"alternate\" hreflang=\"...\">` entries pointing to\n * its siblings (grouped by `translation_group`). The default-locale\n * variant is also linked as `hreflang=\"x-default\"`.\n */\n\nimport type { APIRoute } from \"astro\";\n\nimport { handleSitemapData } from \"#api/handlers/seo.js\";\nimport { getPublicOrigin } from \"#api/public-url.js\";\nimport { getSiteSettingsWithDb } from \"#settings/index.js\";\n\nimport { getI18nConfig, isI18nEnabled } from \"../../i18n/config.js\";\nimport { interpolateUrlPattern, localizePath } from \"../../i18n/resolve.js\";\nimport { buildSeoImageUrl } from \"../../seo/media-url.js\";\n\nexport const prerender = false;\n\nconst TRAILING_SLASH_RE = /\\/$/;\nconst AMP_RE = /&/g;\nconst LT_RE = /</g;\nconst GT_RE = />/g;\nconst QUOT_RE = /\"/g;\nconst APOS_RE = /'/g;\n\nexport const GET: APIRoute = async ({ params, locals, url }) => {\n\tconst { emdash } = locals;\n\tconst collectionSlug = params.collection;\n\n\tif (!emdash?.db || !collectionSlug) {\n\t\treturn new Response(\"<!-- EmDash not configured -->\", {\n\t\t\tstatus: 500,\n\t\t\theaders: { \"Content-Type\": \"application/xml\" },\n\t\t});\n\t}\n\n\ttry {\n\t\tconst settings = await getSiteSettingsWithDb(emdash.db);\n\t\tconst siteUrl = (settings.url || getPublicOrigin(url, emdash?.config)).replace(\n\t\t\tTRAILING_SLASH_RE,\n\t\t\t\"\",\n\t\t);\n\n\t\tconst result = await handleSitemapData(emdash.db, collectionSlug);\n\n\t\tif (!result.success || !result.data) {\n\t\t\treturn new Response(\"<!-- Failed to generate sitemap -->\", {\n\t\t\t\tstatus: 500,\n\t\t\t\theaders: { \"Content-Type\": \"application/xml\" },\n\t\t\t});\n\t\t}\n\n\t\tconst col = result.data.collections[0];\n\t\tif (!col) {\n\t\t\treturn new Response(\"<!-- Collection not found or empty -->\", {\n\t\t\t\tstatus: 404,\n\t\t\t\theaders: { \"Content-Type\": \"application/xml\" },\n\t\t\t});\n\t\t}\n\n\t\tconst i18nEnabled = isI18nEnabled();\n\t\tconst i18nConfig = getI18nConfig();\n\n\t\t// Group entries by `translation_group` so each <url> can advertise\n\t\t// its sibling translations via xhtml:link. Rows without a group\n\t\t// (legacy/single-locale data) are emitted individually.\n\t\ttype Entry = (typeof col.entries)[number];\n\t\tconst groups = new Map<string, Entry[]>();\n\t\tconst ungrouped: Entry[] = [];\n\t\tfor (const entry of col.entries) {\n\t\t\tif (i18nEnabled && entry.translationGroup) {\n\t\t\t\tconst list = groups.get(entry.translationGroup);\n\t\t\t\tif (list) list.push(entry);\n\t\t\t\telse groups.set(entry.translationGroup, [entry]);\n\t\t\t} else {\n\t\t\t\tungrouped.push(entry);\n\t\t\t}\n\t\t}\n\n\t\t// Resolve every URL up-front so we can reference sibling URLs\n\t\t// while emitting hreflang alternates without re-resolving.\n\t\t// `localizePath` returns `null` when the row's locale isn't in\n\t\t// the configured `i18n.locales` list -- the site can't serve a\n\t\t// route for it, so the entry is dropped from the sitemap and\n\t\t// omitted from sibling alternates.\n\t\tconst urlByEntry = new Map<string, string | null>();\n\t\tconst resolveEntryUrl = async (entry: Entry): Promise<string | null> => {\n\t\t\tif (urlByEntry.has(entry.id)) return urlByEntry.get(entry.id) ?? null;\n\t\t\tconst path = interpolateUrlPattern({\n\t\t\t\tpattern: col.urlPattern,\n\t\t\t\tcollection: col.collection,\n\t\t\t\tslug: entry.slug || entry.id,\n\t\t\t\tid: entry.id,\n\t\t\t});\n\t\t\tconst localized = await localizePath(path, entry.locale);\n\t\t\tconst absolute = localized === null ? null : `${siteUrl}${localized}`;\n\t\t\turlByEntry.set(entry.id, absolute);\n\t\t\treturn absolute;\n\t\t};\n\n\t\tconst useXhtml = i18nEnabled;\n\t\tconst lines: string[] = ['<?xml version=\"1.0\" encoding=\"UTF-8\"?>'];\n\t\tlines.push(\n\t\t\tuseXhtml\n\t\t\t\t? '<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\" xmlns:xhtml=\"http://www.w3.org/1999/xhtml\" xmlns:image=\"http://www.google.com/schemas/sitemap-image/1.1\">'\n\t\t\t\t: '<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\" xmlns:image=\"http://www.google.com/schemas/sitemap-image/1.1\">',\n\t\t);\n\n\t\tconst writeUrl = async (entry: Entry, siblings: Entry[] | null) => {\n\t\t\tconst loc = await resolveEntryUrl(entry);\n\t\t\t// Skip rows whose locale isn't in the configured `i18n.locales`\n\t\t\t// list. Linking to a route the site can't serve is worse than\n\t\t\t// no link at all (search engines hit a 404 and downrank).\n\t\t\tif (loc === null) return;\n\n\t\t\tlines.push(\" <url>\");\n\t\t\tlines.push(` <loc>${escapeXml(loc)}</loc>`);\n\t\t\tlines.push(` <lastmod>${escapeXml(entry.updatedAt)}</lastmod>`);\n\n\t\t\t// Google image sitemap extension: advertise the entry's SEO\n\t\t\t// image (the same \"preferred image\" used for og:image) so it\n\t\t\t// can be discovered and indexed for Google Images.\n\t\t\tif (entry.image) {\n\t\t\t\tconst imageLoc = buildSeoImageUrl(entry.image, siteUrl);\n\t\t\t\tlines.push(\" <image:image>\");\n\t\t\t\tlines.push(` <image:loc>${escapeXml(imageLoc)}</image:loc>`);\n\t\t\t\tlines.push(\" </image:image>\");\n\t\t\t}\n\n\t\t\tif (useXhtml && siblings && siblings.length > 1) {\n\t\t\t\t// Emit one xhtml:link per sibling (including self -- Google\n\t\t\t\t// recommends including the page's own hreflang annotation).\n\t\t\t\t// Siblings with unroutable locales are skipped here too.\n\t\t\t\tfor (const sib of siblings) {\n\t\t\t\t\tconst sibLoc = await resolveEntryUrl(sib);\n\t\t\t\t\tif (sibLoc === null) continue;\n\t\t\t\t\tlines.push(\n\t\t\t\t\t\t` <xhtml:link rel=\"alternate\" hreflang=\"${escapeXml(sib.locale)}\" href=\"${escapeXml(sibLoc)}\" />`,\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\t// x-default: prefer the default-locale sibling, otherwise\n\t\t\t\t// the first sibling with a routable URL. Stable order:\n\t\t\t\t// rows arrive sorted by updated_at DESC from the handler.\n\t\t\t\tconst defaultSibling =\n\t\t\t\t\ti18nConfig && siblings.find((s) => s.locale === i18nConfig.defaultLocale);\n\t\t\t\tlet xDefaultLoc: string | null = null;\n\t\t\t\tif (defaultSibling) {\n\t\t\t\t\txDefaultLoc = await resolveEntryUrl(defaultSibling);\n\t\t\t\t}\n\t\t\t\tif (xDefaultLoc === null) {\n\t\t\t\t\tfor (const sib of siblings) {\n\t\t\t\t\t\tconst sibLoc = await resolveEntryUrl(sib);\n\t\t\t\t\t\tif (sibLoc !== null) {\n\t\t\t\t\t\t\txDefaultLoc = sibLoc;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (xDefaultLoc !== null) {\n\t\t\t\t\tlines.push(\n\t\t\t\t\t\t` <xhtml:link rel=\"alternate\" hreflang=\"x-default\" href=\"${escapeXml(xDefaultLoc)}\" />`,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlines.push(\" </url>\");\n\t\t};\n\n\t\tfor (const siblings of groups.values()) {\n\t\t\tfor (const entry of siblings) {\n\t\t\t\tawait writeUrl(entry, siblings);\n\t\t\t}\n\t\t}\n\t\tfor (const entry of ungrouped) {\n\t\t\tawait writeUrl(entry, null);\n\t\t}\n\n\t\tlines.push(\"</urlset>\");\n\n\t\treturn new Response(lines.join(\"\\n\"), {\n\t\t\tstatus: 200,\n\t\t\theaders: {\n\t\t\t\t\"Content-Type\": \"application/xml; charset=utf-8\",\n\t\t\t\t\"Cache-Control\": \"public, max-age=3600\",\n\t\t\t},\n\t\t});\n\t} catch {\n\t\treturn new Response(\"<!-- Internal error generating sitemap -->\", {\n\t\t\tstatus: 500,\n\t\t\theaders: { \"Content-Type\": \"application/xml\" },\n\t\t});\n\t}\n};\n\n/** Escape special XML characters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F,MAAM,iBACL,cAAc,SAAS,MAAM,MAAM,EAAE,WAAW,WAAW,cAAc;IAC1E,IAAI,cAA6B;AACjC,QAAI,eACH,eAAc,MAAM,gBAAgB,eAAe;AAEpD,QAAI,gBAAgB,KACnB,MAAK,MAAM,OAAO,UAAU;KAC3B,MAAM,SAAS,MAAM,gBAAgB,IAAI;AACzC,SAAI,WAAW,MAAM;AACpB,oBAAc;AACd;;;AAIH,QAAI,gBAAgB,KACnB,OAAM,KACL,8DAA8D,UAAU,YAAY,CAAC,MACrF;;AAIH,SAAM,KAAK,WAAW;;AAGvB,OAAK,MAAM,YAAY,OAAO,QAAQ,CACrC,MAAK,MAAM,SAAS,SACnB,OAAM,SAAS,OAAO,SAAS;AAGjC,OAAK,MAAM,SAAS,UACnB,OAAM,SAAS,OAAO,KAAK;AAG5B,QAAM,KAAK,YAAY;AAEvB,SAAO,IAAI,SAAS,MAAM,KAAK,KAAK,EAAE;GACrC,QAAQ;GACR,SAAS;IACR,gBAAgB;IAChB,iBAAiB;IACjB;GACD,CAAC;SACK;AACP,SAAO,IAAI,SAAS,8CAA8C;GACjE,QAAQ;GACR,SAAS,EAAE,gBAAgB,mBAAmB;GAC9C,CAAC;;;;AAKJ,SAAS,UAAU,KAAqB;AACvC,QAAO,IACL,QAAQ,QAAQ,QAAQ,CACxB,QAAQ,OAAO,OAAO,CACtB,QAAQ,OAAO,OAAO,CACtB,QAAQ,SAAS,SAAS,CAC1B,QAAQ,SAAS,SAAS"}
|
|
1
|
+
{"version":3,"file":"sitemap-_collection_.xml.mjs","names":[],"sources":["../../../src/astro/routes/sitemap-[collection].xml.ts"],"sourcesContent":["/**\n * Per-collection sitemap endpoint\n *\n * GET /sitemap-{collection}.xml - Sitemap for a single content collection.\n *\n * Uses the collection's url_pattern to build URLs. Falls back to\n * /{collection}/{slug} when no pattern is configured.\n *\n * i18n behaviour: when Astro i18n is enabled, the locale prefix is\n * applied via Astro's own `getRelativeLocaleUrl` (which honours\n * `prefixDefaultLocale`, custom `path` mappings, and other `routing`\n * config). Each translation row is emitted as its own `<url>` with\n * `<xhtml:link rel=\"alternate\" hreflang=\"...\">` entries pointing to\n * its siblings (grouped by `translation_group`). The default-locale\n * variant is also linked as `hreflang=\"x-default\"`.\n */\n\nimport type { APIRoute } from \"astro\";\n\nimport { handleSitemapData } from \"#api/handlers/seo.js\";\nimport { getPublicOrigin } from \"#api/public-url.js\";\nimport { getSiteSettingsWithDb } from \"#settings/index.js\";\n\nimport { getI18nConfig, isI18nEnabled } from \"../../i18n/config.js\";\nimport { interpolateUrlPattern, localizePath } from \"../../i18n/resolve.js\";\nimport { buildSeoImageUrl } from \"../../seo/media-url.js\";\n\nexport const prerender = false;\n\nconst TRAILING_SLASH_RE = /\\/$/;\nconst AMP_RE = /&/g;\nconst LT_RE = /</g;\nconst GT_RE = />/g;\nconst QUOT_RE = /\"/g;\nconst APOS_RE = /'/g;\n\nexport const GET: APIRoute = async ({ params, locals, url }) => {\n\tconst { emdash } = locals;\n\tconst collectionSlug = params.collection;\n\n\tif (!emdash?.db || !collectionSlug) {\n\t\treturn new Response(\"<!-- EmDash not configured -->\", {\n\t\t\tstatus: 500,\n\t\t\theaders: { \"Content-Type\": \"application/xml\" },\n\t\t});\n\t}\n\n\ttry {\n\t\tconst settings = await getSiteSettingsWithDb(emdash.db);\n\t\tconst siteUrl = (settings.url || getPublicOrigin(url, emdash?.config)).replace(\n\t\t\tTRAILING_SLASH_RE,\n\t\t\t\"\",\n\t\t);\n\n\t\tconst result = await handleSitemapData(emdash.db, collectionSlug);\n\n\t\tif (!result.success || !result.data) {\n\t\t\treturn new Response(\"<!-- Failed to generate sitemap -->\", {\n\t\t\t\tstatus: 500,\n\t\t\t\theaders: { \"Content-Type\": \"application/xml\" },\n\t\t\t});\n\t\t}\n\n\t\tconst col = result.data.collections[0];\n\t\tif (!col) {\n\t\t\treturn new Response(\"<!-- Collection not found or empty -->\", {\n\t\t\t\tstatus: 404,\n\t\t\t\theaders: { \"Content-Type\": \"application/xml\" },\n\t\t\t});\n\t\t}\n\n\t\tconst i18nEnabled = isI18nEnabled();\n\t\tconst i18nConfig = getI18nConfig();\n\n\t\t// Group entries by `translation_group` so each <url> can advertise\n\t\t// its sibling translations via xhtml:link. Rows without a group\n\t\t// (legacy/single-locale data) are emitted individually.\n\t\ttype Entry = (typeof col.entries)[number];\n\t\tconst groups = new Map<string, Entry[]>();\n\t\tconst ungrouped: Entry[] = [];\n\t\tfor (const entry of col.entries) {\n\t\t\tif (i18nEnabled && entry.translationGroup) {\n\t\t\t\tconst list = groups.get(entry.translationGroup);\n\t\t\t\tif (list) list.push(entry);\n\t\t\t\telse groups.set(entry.translationGroup, [entry]);\n\t\t\t} else {\n\t\t\t\tungrouped.push(entry);\n\t\t\t}\n\t\t}\n\n\t\t// Resolve every URL up-front so we can reference sibling URLs\n\t\t// while emitting hreflang alternates without re-resolving.\n\t\t// `localizePath` returns `null` when the row's locale isn't in\n\t\t// the configured `i18n.locales` list -- the site can't serve a\n\t\t// route for it, so the entry is dropped from the sitemap and\n\t\t// omitted from sibling alternates.\n\t\tconst urlByEntry = new Map<string, string | null>();\n\t\tconst resolveEntryUrl = async (entry: Entry): Promise<string | null> => {\n\t\t\tif (urlByEntry.has(entry.id)) return urlByEntry.get(entry.id) ?? null;\n\t\t\tconst path = interpolateUrlPattern({\n\t\t\t\tpattern: col.urlPattern,\n\t\t\t\tcollection: col.collection,\n\t\t\t\tslug: entry.slug || entry.id,\n\t\t\t\tid: entry.id,\n\t\t\t});\n\t\t\tconst localized = await localizePath(path, entry.locale);\n\t\t\tconst absolute = localized === null ? null : `${siteUrl}${localized}`;\n\t\t\turlByEntry.set(entry.id, absolute);\n\t\t\treturn absolute;\n\t\t};\n\n\t\tconst useXhtml = i18nEnabled;\n\t\tconst lines: string[] = ['<?xml version=\"1.0\" encoding=\"UTF-8\"?>'];\n\t\tlines.push(\n\t\t\tuseXhtml\n\t\t\t\t? '<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\" xmlns:xhtml=\"http://www.w3.org/1999/xhtml\" xmlns:image=\"http://www.google.com/schemas/sitemap-image/1.1\">'\n\t\t\t\t: '<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\" xmlns:image=\"http://www.google.com/schemas/sitemap-image/1.1\">',\n\t\t);\n\n\t\tconst writeUrl = async (entry: Entry, siblings: Entry[] | null) => {\n\t\t\tconst loc = await resolveEntryUrl(entry);\n\t\t\t// Skip rows whose locale isn't in the configured `i18n.locales`\n\t\t\t// list. Linking to a route the site can't serve is worse than\n\t\t\t// no link at all (search engines hit a 404 and downrank).\n\t\t\tif (loc === null) return;\n\n\t\t\tlines.push(\" <url>\");\n\t\t\tlines.push(` <loc>${escapeXml(loc)}</loc>`);\n\t\t\tlines.push(` <lastmod>${escapeXml(entry.updatedAt)}</lastmod>`);\n\n\t\t\t// Google image sitemap extension: advertise the entry's SEO\n\t\t\t// image (the same \"preferred image\" used for og:image) so it\n\t\t\t// can be discovered and indexed for Google Images.\n\t\t\tif (entry.image) {\n\t\t\t\tconst imageLoc = buildSeoImageUrl(entry.image, siteUrl);\n\t\t\t\tlines.push(\" <image:image>\");\n\t\t\t\tlines.push(` <image:loc>${escapeXml(imageLoc)}</image:loc>`);\n\t\t\t\tlines.push(\" </image:image>\");\n\t\t\t}\n\n\t\t\tconst alternateEntries = siblings ?? (useXhtml ? [entry] : null);\n\t\t\tif (useXhtml && alternateEntries) {\n\t\t\t\t// Emit one xhtml:link per sibling (including self -- Google\n\t\t\t\t// recommends including the page's own hreflang annotation).\n\t\t\t\t// Siblings with unroutable locales are skipped here too.\n\t\t\t\tfor (const sib of alternateEntries) {\n\t\t\t\t\tconst sibLoc = await resolveEntryUrl(sib);\n\t\t\t\t\tif (sibLoc === null) continue;\n\t\t\t\t\tlines.push(\n\t\t\t\t\t\t` <xhtml:link rel=\"alternate\" hreflang=\"${escapeXml(sib.locale)}\" href=\"${escapeXml(sibLoc)}\" />`,\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\t// x-default: prefer the default-locale sibling, otherwise\n\t\t\t\t// the first sibling with a routable URL. Stable order:\n\t\t\t\t// rows arrive sorted by updated_at DESC from the handler.\n\t\t\t\tconst defaultSibling =\n\t\t\t\t\ti18nConfig && alternateEntries.find((s) => s.locale === i18nConfig.defaultLocale);\n\t\t\t\tlet xDefaultLoc: string | null = null;\n\t\t\t\tif (defaultSibling) {\n\t\t\t\t\txDefaultLoc = await resolveEntryUrl(defaultSibling);\n\t\t\t\t}\n\t\t\t\tif (xDefaultLoc === null) {\n\t\t\t\t\tfor (const sib of alternateEntries) {\n\t\t\t\t\t\tconst sibLoc = await resolveEntryUrl(sib);\n\t\t\t\t\t\tif (sibLoc !== null) {\n\t\t\t\t\t\t\txDefaultLoc = sibLoc;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (xDefaultLoc !== null) {\n\t\t\t\t\tlines.push(\n\t\t\t\t\t\t` <xhtml:link rel=\"alternate\" hreflang=\"x-default\" href=\"${escapeXml(xDefaultLoc)}\" />`,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlines.push(\" </url>\");\n\t\t};\n\n\t\tfor (const siblings of groups.values()) {\n\t\t\tfor (const entry of siblings) {\n\t\t\t\tawait writeUrl(entry, siblings);\n\t\t\t}\n\t\t}\n\t\tfor (const entry of ungrouped) {\n\t\t\tawait writeUrl(entry, null);\n\t\t}\n\n\t\tlines.push(\"</urlset>\");\n\n\t\treturn new Response(lines.join(\"\\n\"), {\n\t\t\tstatus: 200,\n\t\t\theaders: {\n\t\t\t\t\"Content-Type\": \"application/xml; charset=utf-8\",\n\t\t\t\t\"Cache-Control\": \"public, max-age=3600\",\n\t\t\t},\n\t\t});\n\t} catch {\n\t\treturn new Response(\"<!-- Internal error generating sitemap -->\", {\n\t\t\tstatus: 500,\n\t\t\theaders: { \"Content-Type\": \"application/xml\" },\n\t\t});\n\t}\n};\n\n/** Escape special XML characters in a string */\nfunction escapeXml(str: string): string {\n\treturn str\n\t\t.replace(AMP_RE, \"&\")\n\t\t.replace(LT_RE, \"<\")\n\t\t.replace(GT_RE, \">\")\n\t\t.replace(QUOT_RE, \""\")\n\t\t.replace(APOS_RE, \"'\");\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AA2BA,MAAa,YAAY;AAEzB,MAAM,oBAAoB;AAC1B,MAAM,SAAS;AACf,MAAM,QAAQ;AACd,MAAM,QAAQ;AACd,MAAM,UAAU;AAChB,MAAM,UAAU;AAEhB,MAAa,MAAgB,OAAO,EAAE,QAAQ,QAAQ,UAAU;CAC/D,MAAM,EAAE,WAAW;CACnB,MAAM,iBAAiB,OAAO;AAE9B,KAAI,CAAC,QAAQ,MAAM,CAAC,eACnB,QAAO,IAAI,SAAS,kCAAkC;EACrD,QAAQ;EACR,SAAS,EAAE,gBAAgB,mBAAmB;EAC9C,CAAC;AAGH,KAAI;EAEH,MAAM,YADW,MAAM,sBAAsB,OAAO,GAAG,EAC7B,OAAO,gBAAgB,KAAK,QAAQ,OAAO,EAAE,QACtE,mBACA,GACA;EAED,MAAM,SAAS,MAAM,kBAAkB,OAAO,IAAI,eAAe;AAEjE,MAAI,CAAC,OAAO,WAAW,CAAC,OAAO,KAC9B,QAAO,IAAI,SAAS,uCAAuC;GAC1D,QAAQ;GACR,SAAS,EAAE,gBAAgB,mBAAmB;GAC9C,CAAC;EAGH,MAAM,MAAM,OAAO,KAAK,YAAY;AACpC,MAAI,CAAC,IACJ,QAAO,IAAI,SAAS,0CAA0C;GAC7D,QAAQ;GACR,SAAS,EAAE,gBAAgB,mBAAmB;GAC9C,CAAC;EAGH,MAAM,cAAc,eAAe;EACnC,MAAM,aAAa,eAAe;EAMlC,MAAM,yBAAS,IAAI,KAAsB;EACzC,MAAM,YAAqB,EAAE;AAC7B,OAAK,MAAM,SAAS,IAAI,QACvB,KAAI,eAAe,MAAM,kBAAkB;GAC1C,MAAM,OAA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C,UAAU,IAAI,OAAO,CAAC,UAAU,UAAU,OAAO,CAAC,MAC/F;;IAMF,MAAM,iBACL,cAAc,iBAAiB,MAAM,MAAM,EAAE,WAAW,WAAW,cAAc;IAClF,IAAI,cAA6B;AACjC,QAAI,eACH,eAAc,MAAM,gBAAgB,eAAe;AAEpD,QAAI,gBAAgB,KACnB,MAAK,MAAM,OAAO,kBAAkB;KACnC,MAAM,SAAS,MAAM,gBAAgB,IAAI;AACzC,SAAI,WAAW,MAAM;AACpB,oBAAc;AACd;;;AAIH,QAAI,gBAAgB,KACnB,OAAM,KACL,8DAA8D,UAAU,YAAY,CAAC,MACrF;;AAIH,SAAM,KAAK,WAAW;;AAGvB,OAAK,MAAM,YAAY,OAAO,QAAQ,CACrC,MAAK,MAAM,SAAS,SACnB,OAAM,SAAS,OAAO,SAAS;AAGjC,OAAK,MAAM,SAAS,UACnB,OAAM,SAAS,OAAO,KAAK;AAG5B,QAAM,KAAK,YAAY;AAEvB,SAAO,IAAI,SAAS,MAAM,KAAK,KAAK,EAAE;GACrC,QAAQ;GACR,SAAS;IACR,gBAAgB;IAChB,iBAAiB;IACjB;GACD,CAAC;SACK;AACP,SAAO,IAAI,SAAS,8CAA8C;GACjE,QAAQ;GACR,SAAS,EAAE,gBAAgB,mBAAmB;GAC9C,CAAC;;;;AAKJ,SAAS,UAAU,KAAqB;AACvC,QAAO,IACL,QAAQ,QAAQ,QAAQ,CACxB,QAAQ,OAAO,OAAO,CACtB,QAAQ,OAAO,OAAO,CACtB,QAAQ,SAAS,SAAS,CAC1B,QAAQ,SAAS,SAAS"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import "../../dialect-helpers-DRI5pyY3.mjs";
|
|
2
2
|
import "../../after-B1IIdH3Y.mjs";
|
|
3
|
-
import "../../object-cache-
|
|
3
|
+
import "../../object-cache-CHbHv83-.mjs";
|
|
4
4
|
import "../../base64-CmWvODNW.mjs";
|
|
5
|
-
import "../../types-
|
|
6
|
-
import "../../media-
|
|
5
|
+
import "../../types-DU4TSFS5.mjs";
|
|
6
|
+
import "../../media-C0nRRfs1.mjs";
|
|
7
7
|
import "../../options-DTTML-Tx.mjs";
|
|
8
8
|
import "../../request-cache-KCNHp_RJ.mjs";
|
|
9
|
-
import "../../loader-
|
|
9
|
+
import "../../loader-4K37qA-y.mjs";
|
|
10
10
|
import { t as handleSitemapData } from "../../seo-BkhuuaaE.mjs";
|
|
11
|
-
import { a as getSiteSettingsWithDb } from "../../settings-
|
|
11
|
+
import { a as getSiteSettingsWithDb } from "../../settings-BX8cWBus.mjs";
|
|
12
12
|
import { n as getPublicOrigin } from "../../public-url-CTVqgMmg.mjs";
|
|
13
13
|
|
|
14
14
|
//#region src/astro/routes/sitemap.xml.ts
|
package/dist/astro/types.d.mts
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { i as ContentItem } from "../types-ETmO_jQr.mjs";
|
|
2
|
-
import { d as ContentListResponse, f as ContentResponse } from "../options-
|
|
3
|
-
import { t as Database } from "../types-
|
|
4
|
-
import {
|
|
5
|
-
import "../byline-fields-
|
|
2
|
+
import { d as ContentListResponse, f as ContentResponse } from "../options-41nCWqi9.mjs";
|
|
3
|
+
import { t as Database } from "../types-xIfVRNLp.mjs";
|
|
4
|
+
import { Lt as Element, Tt as ResolvedPlugin, et as PageFragmentContribution, rt as PageMetadataContribution, xt as PublicPageContext } from "../types-BYnDBVwe.mjs";
|
|
5
|
+
import "../byline-fields-CtQ6blXd.mjs";
|
|
6
6
|
import { f as MediaProvider, p as MediaProviderCapabilities } from "../placeholder-Cuce9U-m.mjs";
|
|
7
|
-
import {
|
|
8
|
-
import "../runner-
|
|
9
|
-
import "../index-
|
|
10
|
-
import { d as Storage } from "../types-
|
|
11
|
-
import "../
|
|
12
|
-
import "../
|
|
7
|
+
import { $n as HookPipeline, Jn as SandboxedPluginEntry, Qn as EmailPipeline, Sr as MediaResponse, fi as MediaItem, fr as EmDashConfig, sr as SandboxRunner, xr as MediaListResponse } from "../index-CDZZjrLT.mjs";
|
|
8
|
+
import "../runner-BbR3DfrL.mjs";
|
|
9
|
+
import "../index-DGIjmUXQ.mjs";
|
|
10
|
+
import { d as Storage } from "../types-ByChcBgE.mjs";
|
|
11
|
+
import "../scheduled-publish-BMljtY5G.mjs";
|
|
12
|
+
import "../types-Dbqff978.mjs";
|
|
13
|
+
import "../validate-9ECmtEpJ.mjs";
|
|
13
14
|
import "../index.mjs";
|
|
14
15
|
import { Kysely } from "kysely";
|
|
15
16
|
|
|
@@ -343,6 +344,7 @@ interface EmDashHandlers {
|
|
|
343
344
|
hooks: HookPipeline;
|
|
344
345
|
email: EmailPipeline | null;
|
|
345
346
|
configuredPlugins: ResolvedPlugin[];
|
|
347
|
+
sandboxedPluginEntries: SandboxedPluginEntry[];
|
|
346
348
|
config: EmDashConfig;
|
|
347
349
|
getManifest: () => Promise<EmDashManifest>;
|
|
348
350
|
invalidateUrlPatternCache: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.mts","names":[],"sources":["../../src/astro/types.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.d.mts","names":[],"sources":["../../src/astro/types.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;UAyBiB,kBAAA;EAChB,KAAA;EACA,aAAA;EACA,QAAA;EACA,MAAA;EACA,UAAA;EACA,MAAA,EAAQ,MAAA;IAGN,IAAA;IACA,KAAA;IACA,QAAA;IACA,MAAA;IANM;;;;;;IAaN,OAAA,GAAU,KAAA;MAAQ,KAAA;MAAe,KAAA;IAAA,KAAmB,MAAA,mBAVpD;IAYA,EAAA,WAVA;IAYA,UAAA,GAAa,MAAA;EAAA;AAAA;;;;UAQC,cAAA;EAChB,OAAA;EATe;EAWf,OAAA;EAXqB;EAarB,OAAA;EAL8B;;;;;;EAY9B,SAAA;EACA,UAAA,GAAa,KAAA;IACZ,IAAA;IACA,KAAA;IACA,IAAA;EAAA;EAED,gBAAA,GAAmB,KAAA;IAClB,EAAA;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A;EAG7E,oBAAA,GACC,QAAA,UACA,MAAA,UACA,IAAA,UACA,OAAA,EAAS,OAAA,KACL,OAAA,CAAQ,eAAA;EAGb,0BAAA,GACC,QAAA,UACA,MAAA,UACA,IAAA,UACA,OAAA,EAAS,OAAA,KACL,OAAA,CAAQ,eAAA;EAGb,kBAAA,GAAqB,QAAA,UAAkB,IAAA;IAAmB,MAAA;EAAA;EAG1D,gBAAA,GAAmB,UAAA,aANP,aAAA;EAOZ,oBAAA,QAA4B,KAAA;IAC3B,EAAA;IACA,IAAA;IACA,IAAA;IACA,YAAA,EALkF,yBAAA;EAAA;EASnF,OAAA,EARiC,OAAA;EASjC,EAAA,EAAI,MAAA,CADkC,QAAA;EAEtC,iBAAA,IAAqB,UAAA;EAGrB,KAAA,EAJU,YAAA;EAOV,KAAA,EAHiD,aAAA;EAMjD,iBAAA,EAHkD,cAAA;EAOlD,sBAAA,EAJ+D,oBAAA;EAO/D,MAAA,EAH2E,YAAA;EAQ3E,WAAA,QAAmB,OAAA,CAAQ,cAAA;EAK3B,yBAAA;EAGA,gBAAA,QAR0B,aAAA;EAY1B,iBAAA;EAGA,sBAAA,QAA8B,OAAA;EAG9B,mBAAA,QAA2B,OAAA;EAG3B,eAAA,GAAkB,QAAA,UAAkB,MAAA,4BAAkC,OAAA;EAGtE,mBAAA,GACC,IAAA,EAJ4E,iBAAA,KAKxE,OAAA,CADiD,wBAAA;EAEtD,oBAAA,GACC,IAAA,EAFW,iBAAA,KAGP,OAAA,CADiD,wBAAA;EArKK;;;;;;EA8K3D,mBAAA,SAA4B,OAAA;AAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as apiError } from "./error-
|
|
1
|
+
import { t as apiError } from "./error-BHkLZk-w.mjs";
|
|
2
2
|
import { canActOnOwn, hasPermission } from "@emdash-cms/auth";
|
|
3
3
|
|
|
4
4
|
//#region src/api/authorize.ts
|
|
@@ -34,4 +34,4 @@ function requireOwnerPerm(user, ownerId, ownPermission, anyPermission) {
|
|
|
34
34
|
|
|
35
35
|
//#endregion
|
|
36
36
|
export { requirePerm as n, requireOwnerPerm as t };
|
|
37
|
-
//# sourceMappingURL=authorize-
|
|
37
|
+
//# sourceMappingURL=authorize-C3a_zGsM.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authorize-
|
|
1
|
+
{"version":3,"file":"authorize-C3a_zGsM.mjs","names":[],"sources":["../src/api/authorize.ts"],"sourcesContent":["/**\n * Authorization helpers for API routes\n *\n * Thin wrappers around @emdash-cms/auth RBAC that return HTTP responses.\n * Auth middleware handles authentication; these handle authorization.\n */\n\nimport type { Permission, RoleLevel } from \"@emdash-cms/auth\";\nimport { hasPermission, canActOnOwn } from \"@emdash-cms/auth\";\n\nimport { apiError } from \"./error.js\";\n\ninterface UserLike {\n\tid: string;\n\trole: RoleLevel;\n}\n\n/**\n * Check if user has a permission. Returns a 401/403 Response if not, or null if authorized.\n *\n * Usage:\n * ```ts\n * const denied = requirePerm(user, \"schema:manage\");\n * if (denied) return denied;\n * ```\n */\nexport function requirePerm(\n\tuser: UserLike | null | undefined,\n\tpermission: Permission,\n): Response | null {\n\tif (!user) {\n\t\treturn apiError(\"UNAUTHORIZED\", \"Authentication required\", 401);\n\t}\n\tif (!hasPermission(user, permission)) {\n\t\treturn apiError(\"FORBIDDEN\", \"Insufficient permissions\", 403);\n\t}\n\treturn null;\n}\n\n/**\n * Check if user can act on a resource, considering ownership.\n * Returns a 401/403 Response if not, or null if authorized.\n *\n * Usage:\n * ```ts\n * const denied = requireOwnerPerm(user, item.authorId, \"content:edit_own\", \"content:edit_any\");\n * if (denied) return denied;\n * ```\n */\nexport function requireOwnerPerm(\n\tuser: UserLike | null | undefined,\n\townerId: string,\n\townPermission: Permission,\n\tanyPermission: Permission,\n): Response | null {\n\tif (!user) {\n\t\treturn apiError(\"UNAUTHORIZED\", \"Authentication required\", 401);\n\t}\n\tif (!canActOnOwn(user, ownerId, ownPermission, anyPermission)) {\n\t\treturn apiError(\"FORBIDDEN\", \"Insufficient permissions\", 403);\n\t}\n\treturn null;\n}\n"],"mappings":";;;;;;;;;;;;;AA0BA,SAAgB,YACf,MACA,YACkB;AAClB,KAAI,CAAC,KACJ,QAAO,SAAS,gBAAgB,2BAA2B,IAAI;AAEhE,KAAI,CAAC,cAAc,MAAM,WAAW,CACnC,QAAO,SAAS,aAAa,4BAA4B,IAAI;AAE9D,QAAO;;;;;;;;;;;;AAaR,SAAgB,iBACf,MACA,SACA,eACA,eACkB;AAClB,KAAI,CAAC,KACJ,QAAO,SAAS,gBAAgB,2BAA2B,IAAI;AAEhE,KAAI,CAAC,YAAY,MAAM,SAAS,eAAe,cAAc,CAC5D,QAAO,SAAS,aAAa,4BAA4B,IAAI;AAE9D,QAAO"}
|