emdash 0.17.2 → 0.19.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/api/route-utils.d.mts +2 -2
- package/dist/api/route-utils.mjs +14 -14
- package/dist/api/schemas/index.d.mts +2 -2
- package/dist/api/schemas/index.mjs +3 -3
- package/dist/{api-B7GATEYo.mjs → api-BZ6bhjYs.mjs} +88 -16
- package/dist/api-BZ6bhjYs.mjs.map +1 -0
- package/dist/{apply-BrVqULFe.mjs → apply-hQkKKBCf.mjs} +23 -23
- package/dist/apply-hQkKKBCf.mjs.map +1 -0
- package/dist/astro/index.d.mts +8 -8
- package/dist/astro/index.d.mts.map +1 -1
- package/dist/astro/index.mjs +113 -23
- package/dist/astro/index.mjs.map +1 -1
- package/dist/astro/middleware/auth.d.mts +7 -7
- package/dist/astro/middleware/auth.mjs +2 -2
- package/dist/astro/middleware/redirect.mjs +4 -4
- package/dist/astro/middleware/request-context.mjs +2 -2
- package/dist/astro/middleware.d.mts +26 -4
- package/dist/astro/middleware.d.mts.map +1 -1
- package/dist/astro/middleware.mjs +414 -215
- package/dist/astro/middleware.mjs.map +1 -1
- package/dist/astro/routes/api/admin/allowed-domains/_domain_.mjs +5 -5
- package/dist/astro/routes/api/admin/allowed-domains/index.mjs +5 -5
- 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 +5 -5
- package/dist/astro/routes/api/admin/byline-fields/_slug_.mjs +8 -8
- package/dist/astro/routes/api/admin/byline-fields/index.mjs +8 -8
- package/dist/astro/routes/api/admin/byline-fields/reorder.mjs +8 -8
- package/dist/astro/routes/api/admin/bylines/_id_/index.mjs +12 -12
- package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs +12 -12
- package/dist/astro/routes/api/admin/bylines/index.mjs +12 -12
- package/dist/astro/routes/api/admin/comments/_id_/status.mjs +11 -11
- package/dist/astro/routes/api/admin/comments/_id_.mjs +5 -5
- package/dist/astro/routes/api/admin/comments/bulk.mjs +8 -8
- package/dist/astro/routes/api/admin/comments/counts.mjs +5 -5
- package/dist/astro/routes/api/admin/comments/index.mjs +8 -8
- package/dist/astro/routes/api/admin/hooks/exclusive/_hookName_.mjs +5 -5
- package/dist/astro/routes/api/admin/hooks/exclusive/index.mjs +4 -4
- 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 +31 -31
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +31 -31
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +30 -30
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +30 -30
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs +30 -30
- package/dist/astro/routes/api/admin/plugins/index.mjs +30 -30
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/icon.mjs +3 -3
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs +30 -30
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs +30 -30
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +30 -30
- package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.mjs +30 -30
- package/dist/astro/routes/api/admin/plugins/registry/_id_/update.mjs +31 -31
- package/dist/astro/routes/api/admin/plugins/registry/artifact.mjs +30 -30
- package/dist/astro/routes/api/admin/plugins/registry/install.mjs +31 -31
- package/dist/astro/routes/api/admin/plugins/updates.mjs +30 -30
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +30 -30
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/thumbnail.mjs +3 -3
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs +30 -30
- package/dist/astro/routes/api/admin/users/_id_/disable.mjs +3 -3
- package/dist/astro/routes/api/admin/users/_id_/enable.mjs +2 -2
- package/dist/astro/routes/api/admin/users/_id_/index.mjs +6 -6
- package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs +4 -4
- package/dist/astro/routes/api/admin/users/index.mjs +5 -5
- 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 +6 -6
- package/dist/astro/routes/api/auth/invite/index.mjs +7 -7
- package/dist/astro/routes/api/auth/invite/register-options.mjs +6 -6
- package/dist/astro/routes/api/auth/logout.mjs +2 -2
- package/dist/astro/routes/api/auth/magic-link/send.mjs +8 -8
- package/dist/astro/routes/api/auth/magic-link/verify.mjs +2 -2
- package/dist/astro/routes/api/auth/me.mjs +6 -6
- package/dist/astro/routes/api/auth/oauth/_provider_/callback.mjs +2 -2
- package/dist/astro/routes/api/auth/passkey/_id_.mjs +5 -5
- package/dist/astro/routes/api/auth/passkey/index.mjs +2 -2
- package/dist/astro/routes/api/auth/passkey/options.mjs +7 -7
- package/dist/astro/routes/api/auth/passkey/register/options.mjs +6 -6
- package/dist/astro/routes/api/auth/passkey/register/verify.mjs +6 -6
- package/dist/astro/routes/api/auth/passkey/verify.mjs +6 -6
- package/dist/astro/routes/api/auth/signup/complete.mjs +6 -6
- package/dist/astro/routes/api/auth/signup/request.mjs +8 -8
- package/dist/astro/routes/api/auth/signup/verify.mjs +2 -2
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs +11 -11
- package/dist/astro/routes/api/content/_collection_/_id_/compare.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs +6 -5
- package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs.map +1 -1
- 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 +8 -8
- package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs +9 -8
- package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/restore.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_/revisions.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.d.mts.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs +12 -10
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs +11 -11
- package/dist/astro/routes/api/content/_collection_/_id_/translations.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs +6 -5
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_.mjs +9 -8
- package/dist/astro/routes/api/content/_collection_/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/authors.d.mts +8 -0
- package/dist/astro/routes/api/content/_collection_/authors.d.mts.map +1 -0
- package/dist/astro/routes/api/content/_collection_/authors.mjs +19 -0
- package/dist/astro/routes/api/content/_collection_/authors.mjs.map +1 -0
- package/dist/astro/routes/api/content/_collection_/index.mjs +6 -6
- package/dist/astro/routes/api/content/_collection_/trash.mjs +6 -6
- package/dist/astro/routes/api/dashboard.mjs +7 -7
- package/dist/astro/routes/api/dev/emails.mjs +2 -2
- package/dist/astro/routes/api/import/probe.d.mts +2 -2
- package/dist/astro/routes/api/import/probe.mjs +6 -6
- package/dist/astro/routes/api/import/wordpress/analyze.mjs +4 -4
- package/dist/astro/routes/api/import/wordpress/execute.d.mts +7 -7
- package/dist/astro/routes/api/import/wordpress/execute.mjs +9 -9
- package/dist/astro/routes/api/import/wordpress/media.mjs +6 -6
- package/dist/astro/routes/api/import/wordpress/prepare.mjs +9 -9
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs +8 -8
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs +6 -6
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs +9 -9
- package/dist/astro/routes/api/manifest.mjs +3 -3
- package/dist/astro/routes/api/mcp.mjs +28 -28
- package/dist/astro/routes/api/media/_id_/confirm.mjs +6 -6
- package/dist/astro/routes/api/media/_id_.mjs +6 -6
- 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 +6 -6
- package/dist/astro/routes/api/media.mjs +7 -7
- package/dist/astro/routes/api/menus/_name_/items/_id_.mjs +7 -7
- package/dist/astro/routes/api/menus/_name_/items.mjs +7 -7
- package/dist/astro/routes/api/menus/_name_/reorder.mjs +7 -7
- package/dist/astro/routes/api/menus/_name_/translations.mjs +7 -7
- package/dist/astro/routes/api/menus/_name_.mjs +7 -7
- package/dist/astro/routes/api/menus/index.mjs +7 -7
- package/dist/astro/routes/api/oauth/authorize.mjs +1 -1
- package/dist/astro/routes/api/oauth/device/authorize.mjs +4 -4
- package/dist/astro/routes/api/oauth/device/code.mjs +5 -5
- package/dist/astro/routes/api/oauth/device/token.mjs +5 -5
- package/dist/astro/routes/api/oauth/register.mjs +2 -2
- package/dist/astro/routes/api/oauth/token/refresh.mjs +4 -4
- package/dist/astro/routes/api/oauth/token/revoke.mjs +4 -4
- package/dist/astro/routes/api/oauth/token.mjs +4 -4
- package/dist/astro/routes/api/openapi.json.mjs +17 -3
- 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 +9 -9
- package/dist/astro/routes/api/redirects/404s/summary.mjs +9 -9
- package/dist/astro/routes/api/redirects/_id_.mjs +10 -10
- package/dist/astro/routes/api/redirects/index.mjs +10 -10
- 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 +30 -30
- package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs +30 -30
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs +30 -30
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +30 -30
- package/dist/astro/routes/api/schema/collections/index.mjs +30 -30
- package/dist/astro/routes/api/schema/index.mjs +6 -6
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs +30 -30
- package/dist/astro/routes/api/schema/orphans/index.mjs +30 -30
- package/dist/astro/routes/api/search/enable.mjs +9 -9
- package/dist/astro/routes/api/search/index.mjs +8 -8
- package/dist/astro/routes/api/search/rebuild.mjs +9 -9
- package/dist/astro/routes/api/search/stats.mjs +6 -6
- package/dist/astro/routes/api/search/suggest.mjs +8 -8
- package/dist/astro/routes/api/sections/_slug_.mjs +8 -8
- package/dist/astro/routes/api/sections/index.mjs +8 -8
- package/dist/astro/routes/api/settings/email.mjs +5 -5
- package/dist/astro/routes/api/settings.mjs +12 -12
- package/dist/astro/routes/api/setup/admin-verify.mjs +6 -6
- package/dist/astro/routes/api/setup/admin.mjs +6 -6
- package/dist/astro/routes/api/setup/dev-bypass.mjs +18 -18
- package/dist/astro/routes/api/setup/dev-reset.mjs +3 -3
- package/dist/astro/routes/api/setup/index.mjs +21 -21
- package/dist/astro/routes/api/setup/status.mjs +3 -3
- package/dist/astro/routes/api/snapshot.mjs +5 -5
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs +11 -11
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs +11 -11
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs +11 -11
- package/dist/astro/routes/api/taxonomies/index.mjs +11 -11
- package/dist/astro/routes/api/themes/preview.mjs +5 -5
- package/dist/astro/routes/api/typegen.mjs +5 -5
- package/dist/astro/routes/api/well-known/auth.mjs +1 -1
- package/dist/astro/routes/api/widget-areas/_name_/reorder.mjs +6 -6
- package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs +8 -8
- package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs +8 -8
- package/dist/astro/routes/api/widget-areas/_name_.mjs +5 -5
- package/dist/astro/routes/api/widget-areas/index.mjs +8 -8
- package/dist/astro/routes/api/widget-components.mjs +2 -2
- package/dist/astro/routes/robots.txt.mjs +6 -6
- package/dist/astro/routes/sitemap-_collection_.xml.mjs +6 -6
- package/dist/astro/routes/sitemap.xml.mjs +6 -6
- package/dist/astro/types.d.mts +15 -8
- package/dist/astro/types.d.mts.map +1 -1
- package/dist/{authorize-CLTmOUyx.mjs → authorize-C_8t2KGa.mjs} +2 -2
- package/dist/{authorize-CLTmOUyx.mjs.map → authorize-C_8t2KGa.mjs.map} +1 -1
- package/dist/{byline-CAhk4FrG.mjs → byline-DUx48sJp.mjs} +6 -6
- package/dist/{byline-CAhk4FrG.mjs.map → byline-DUx48sJp.mjs.map} +1 -1
- package/dist/{byline-fields-Dr-xcb6S.mjs → byline-fields-51kg6Vuv.mjs} +3 -3
- package/dist/{byline-fields-Dr-xcb6S.mjs.map → byline-fields-51kg6Vuv.mjs.map} +1 -1
- package/dist/{byline-fields-DC3Wkk-U.mjs → byline-fields-C_OsR-KF.mjs} +2 -2
- package/dist/{byline-fields-DC3Wkk-U.mjs.map → byline-fields-C_OsR-KF.mjs.map} +1 -1
- package/dist/{byline-fields-CR5hGLMw.d.mts → byline-fields-DYXKDuNX.d.mts} +53 -29
- package/dist/byline-fields-DYXKDuNX.d.mts.map +1 -0
- package/dist/{byline-registry-CxK5g559.mjs → byline-registry-CWP7I71B.mjs} +3 -3
- package/dist/{byline-registry-CxK5g559.mjs.map → byline-registry-CWP7I71B.mjs.map} +1 -1
- package/dist/{bylines-CbrD7STW.mjs → bylines-Cx5n-WqP.mjs} +3 -3
- package/dist/{bylines-CbrD7STW.mjs.map → bylines-Cx5n-WqP.mjs.map} +1 -1
- package/dist/{bylines-DCczH3AV.mjs → bylines-wurS258E.mjs} +50 -6
- package/dist/{bylines-DCczH3AV.mjs.map → bylines-wurS258E.mjs.map} +1 -1
- package/dist/{cache-DIHHyPkt.mjs → cache-B_HzASVT.mjs} +3 -3
- package/dist/{cache-DIHHyPkt.mjs.map → cache-B_HzASVT.mjs.map} +1 -1
- package/dist/{chunks-DnnHlRG3.mjs → chunks-BerYVuve.mjs} +2 -2
- package/dist/{chunks-DnnHlRG3.mjs.map → chunks-BerYVuve.mjs.map} +1 -1
- package/dist/cli/index.mjs +40 -27
- 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-DkAfGX9E.mjs → comment-sqQxNpN3.mjs} +2 -2
- package/dist/{comment-DkAfGX9E.mjs.map → comment-sqQxNpN3.mjs.map} +1 -1
- package/dist/{comments-DLFnXs7J.mjs → comments-CJ0RZsYR.mjs} +3 -3
- package/dist/{comments-DLFnXs7J.mjs.map → comments-CJ0RZsYR.mjs.map} +1 -1
- package/dist/{content-C7aJ7keg.mjs → content-BIlVx-RX.mjs} +132 -43
- package/dist/content-BIlVx-RX.mjs.map +1 -0
- package/dist/{context-Ca0HkaIh.mjs → context-GG52SPgh.mjs} +10 -10
- package/dist/{context-Ca0HkaIh.mjs.map → context-GG52SPgh.mjs.map} +1 -1
- package/dist/{cron-DZovZUnC.mjs → cron-BJ2ClIlj.mjs} +4 -3
- package/dist/cron-BJ2ClIlj.mjs.map +1 -0
- package/dist/{dashboard-BrfLIsX1.mjs → dashboard-2JgAMWxK.mjs} +4 -4
- package/dist/{dashboard-BrfLIsX1.mjs.map → dashboard-2JgAMWxK.mjs.map} +1 -1
- package/dist/db/index.d.mts +2 -2
- package/dist/db/index.mjs +1 -1
- package/dist/{device-flow-ptLrVINd.mjs → device-flow-s6_q3T7A.mjs} +2 -2
- package/dist/{device-flow-ptLrVINd.mjs.map → device-flow-s6_q3T7A.mjs.map} +1 -1
- package/dist/{error-Bk9s3Ism.mjs → error-RwM4dD35.mjs} +2 -2
- package/dist/{error-Bk9s3Ism.mjs.map → error-RwM4dD35.mjs.map} +1 -1
- package/dist/{fts-manager-XpDfbIKo.mjs → fts-manager-1RgHmopc.mjs} +2 -2
- package/dist/{fts-manager-XpDfbIKo.mjs.map → fts-manager-1RgHmopc.mjs.map} +1 -1
- package/dist/{index-D60_SzHG.d.mts → index-BpYeJO1E.d.mts} +2 -2
- package/dist/{index-D60_SzHG.d.mts.map → index-BpYeJO1E.d.mts.map} +1 -1
- package/dist/{index-C8ciqSMJ.d.mts → index-FfiTQJq2.d.mts} +202 -20
- package/dist/index-FfiTQJq2.d.mts.map +1 -0
- package/dist/index.d.mts +9 -9
- package/dist/index.mjs +43 -43
- package/dist/{load-CF5oETkh.mjs → load-B84ohfBk.mjs} +2 -2
- package/dist/{load-CF5oETkh.mjs.map → load-B84ohfBk.mjs.map} +1 -1
- package/dist/{loader-BxyvbrZP.mjs → loader-CpZKpFz0.mjs} +32 -30
- package/dist/loader-CpZKpFz0.mjs.map +1 -0
- package/dist/media/index.mjs +1 -1
- package/dist/media/local-runtime.d.mts +7 -7
- package/dist/media/local-runtime.mjs +6 -6
- package/dist/{media-Cyz5BhSN.mjs → media-JOf3pNkw.mjs} +2 -2
- package/dist/{media-Cyz5BhSN.mjs.map → media-JOf3pNkw.mjs.map} +1 -1
- package/dist/{menus-PFp8FDuO.mjs → menus-DX4_E01q.mjs} +3 -3
- package/dist/{menus-PFp8FDuO.mjs.map → menus-DX4_E01q.mjs.map} +1 -1
- package/dist/{menus-CIdZ_Q6U.mjs → menus-Dp9xporj.mjs} +112 -16
- package/dist/menus-Dp9xporj.mjs.map +1 -0
- package/dist/{normalize-DVV8nbrL.mjs → normalize-CK5o04zr.mjs} +2 -2
- package/dist/{normalize-DVV8nbrL.mjs.map → normalize-CK5o04zr.mjs.map} +1 -1
- package/dist/{oauth-authorization-DvBAL75d.mjs → oauth-authorization-1aPAYjiC.mjs} +2 -2
- package/dist/{oauth-authorization-DvBAL75d.mjs.map → oauth-authorization-1aPAYjiC.mjs.map} +1 -1
- package/dist/{options-BL4X94qY.mjs → options-BPCVnesz.mjs} +1 -1
- package/dist/{options-BL4X94qY.mjs.map → options-BPCVnesz.mjs.map} +1 -1
- package/dist/{options-tb7DJROi.d.mts → options-D4MnavW_.d.mts} +3 -3
- package/dist/{options-tb7DJROi.d.mts.map → options-D4MnavW_.d.mts.map} +1 -1
- package/dist/{parse-B-K21lvm.mjs → parse-CrGndy1A.mjs} +2 -2
- package/dist/{parse-B-K21lvm.mjs.map → parse-CrGndy1A.mjs.map} +1 -1
- package/dist/{patterns-CqG5Ya3i.mjs → patterns-p-RBdTbM.mjs} +1 -1
- package/dist/{patterns-CqG5Ya3i.mjs.map → patterns-p-RBdTbM.mjs.map} +1 -1
- package/dist/plugin-utils.d.mts +7 -7
- package/dist/plugins/adapt-sandbox-entry.d.mts +7 -7
- package/dist/{query-Cc649nDl.mjs → query-BFQ029Ts.mjs} +21 -15
- package/dist/query-BFQ029Ts.mjs.map +1 -0
- package/dist/{rate-limit-BI1OdpQH.mjs → rate-limit-ClFFUga6.mjs} +2 -2
- package/dist/{rate-limit-BI1OdpQH.mjs.map → rate-limit-ClFFUga6.mjs.map} +1 -1
- package/dist/{redirect-C-FeA4j9.mjs → redirect-CRWIt8Zj.mjs} +3 -3
- package/dist/{redirect-C-FeA4j9.mjs.map → redirect-CRWIt8Zj.mjs.map} +1 -1
- package/dist/{redirects-C0L9JUk4.mjs → redirects-DEygMrRO.mjs} +25 -3
- package/dist/redirects-DEygMrRO.mjs.map +1 -0
- package/dist/{redirects-C1UgU9E0.mjs → redirects-OIu6vQ2i.mjs} +5 -5
- package/dist/{redirects-C1UgU9E0.mjs.map → redirects-OIu6vQ2i.mjs.map} +1 -1
- package/dist/{registry-C-T_PWgp.mjs → registry-brYh-rAT.mjs} +6 -6
- package/dist/{registry-C-T_PWgp.mjs.map → registry-brYh-rAT.mjs.map} +1 -1
- package/dist/{request-cache-BYMs-BGX.mjs → request-cache-D32LpnmI.mjs} +1 -1
- package/dist/{request-cache-BYMs-BGX.mjs.map → request-cache-D32LpnmI.mjs.map} +1 -1
- package/dist/{runner-BiuUfx-V.mjs → runner--4wMWwKM.mjs} +224 -168
- package/dist/runner--4wMWwKM.mjs.map +1 -0
- package/dist/{runner-DM1yR5qd.d.mts → runner-BcRuXq_h.d.mts} +2 -2
- package/dist/{runner-DM1yR5qd.d.mts.map → runner-BcRuXq_h.d.mts.map} +1 -1
- package/dist/runtime.d.mts +7 -7
- package/dist/runtime.mjs +2 -2
- package/dist/{schema-BpCJh2lU.mjs → schema-CS7Eg5gh.mjs} +5 -5
- package/dist/{schema-BpCJh2lU.mjs.map → schema-CS7Eg5gh.mjs.map} +1 -1
- package/dist/{search-BrF7k0Ho.mjs → search-o-aQzHI1.mjs} +4 -4
- package/dist/{search-BrF7k0Ho.mjs.map → search-o-aQzHI1.mjs.map} +1 -1
- package/dist/{secrets-YYbTgB1w.mjs → secrets-C_ZtRos3.mjs} +2 -2
- package/dist/{secrets-YYbTgB1w.mjs.map → secrets-C_ZtRos3.mjs.map} +1 -1
- package/dist/{sections-8DEa-dWt.mjs → sections-DhsZ0ns9.mjs} +3 -3
- package/dist/{sections-8DEa-dWt.mjs.map → sections-DhsZ0ns9.mjs.map} +1 -1
- package/dist/seed/index.d.mts +2 -2
- package/dist/seed/index.mjs +16 -16
- package/dist/seo/index.d.mts +1 -1
- package/dist/{seo-CKr7pLfA.mjs → seo-B5e6y9Wk.mjs} +2 -2
- package/dist/{seo-CKr7pLfA.mjs.map → seo-B5e6y9Wk.mjs.map} +1 -1
- package/dist/{service-9P2cdyR_.mjs → service-DAxg8RPR.mjs} +2 -2
- package/dist/{service-9P2cdyR_.mjs.map → service-DAxg8RPR.mjs.map} +1 -1
- package/dist/{settings-Jro4YcUb.mjs → settings-B1p-gPUK.mjs} +5 -5
- package/dist/{settings-Jro4YcUb.mjs.map → settings-B1p-gPUK.mjs.map} +1 -1
- package/dist/{settings-DYVzINdn.mjs → settings-DIsbHTRE.mjs} +3 -3
- package/dist/{settings-DYVzINdn.mjs.map → settings-DIsbHTRE.mjs.map} +1 -1
- package/dist/{setup-complete-VoEZfasi.mjs → setup-complete-Yuv78yua.mjs} +2 -2
- package/dist/{setup-complete-VoEZfasi.mjs.map → setup-complete-Yuv78yua.mjs.map} +1 -1
- package/dist/{site-url-Cm8-sJy7.mjs → site-url-mEVmwIFi.mjs} +2 -2
- package/dist/{site-url-Cm8-sJy7.mjs.map → site-url-mEVmwIFi.mjs.map} +1 -1
- package/dist/{taxonomies-CGD6y79Q.mjs → taxonomies-BEW7S5AI.mjs} +10 -8
- package/dist/taxonomies-BEW7S5AI.mjs.map +1 -0
- package/dist/{taxonomies-C0bVme_m.mjs → taxonomies-UusDXv3C.mjs} +4 -4
- package/dist/{taxonomies-C0bVme_m.mjs.map → taxonomies-UusDXv3C.mjs.map} +1 -1
- package/dist/{taxonomy-Db5xwphL.mjs → taxonomy-CdllE4oq.mjs} +3 -3
- package/dist/{taxonomy-Db5xwphL.mjs.map → taxonomy-CdllE4oq.mjs.map} +1 -1
- package/dist/{transaction-NQj4VJ7Z.mjs → transaction-x2tJQ-A1.mjs} +1 -1
- package/dist/{transaction-NQj4VJ7Z.mjs.map → transaction-x2tJQ-A1.mjs.map} +1 -1
- package/dist/{transport-OnMNbsIA.d.mts → transport-BwQeeY2p.d.mts} +1 -1
- package/dist/{transport-OnMNbsIA.d.mts.map → transport-BwQeeY2p.d.mts.map} +1 -1
- package/dist/{types-CfyYQ7eY.mjs → types-BXSUSAjt.mjs} +16 -3
- package/dist/{types-CfyYQ7eY.mjs.map → types-BXSUSAjt.mjs.map} +1 -1
- package/dist/{types-D8bhH891.mjs → types-DZk_y-MU.mjs} +1 -1
- package/dist/{types-D8bhH891.mjs.map → types-DZk_y-MU.mjs.map} +1 -1
- package/dist/{types-DawhLFwy.d.mts → types-OT_Es5mp.d.mts} +26 -1
- package/dist/{types-DawhLFwy.d.mts.map → types-OT_Es5mp.d.mts.map} +1 -1
- package/dist/{types-i8_uzhMD.d.mts → types-WVmpZBJV.d.mts} +18 -3
- package/dist/types-WVmpZBJV.d.mts.map +1 -0
- package/dist/{user-tLdHUEXV.mjs → user-C0um7wrg.mjs} +18 -2
- package/dist/user-C0um7wrg.mjs.map +1 -0
- package/dist/{validate-Dy6nkNls.d.mts → validate-BPAHUSge.d.mts} +10 -2
- package/dist/validate-BPAHUSge.d.mts.map +1 -0
- package/dist/{validate-DWmnRg6E.mjs → validate-ZP9Dvg0P.mjs} +6 -3
- package/dist/validate-ZP9Dvg0P.mjs.map +1 -0
- package/dist/{validation-BQ_TP-On.mjs → validation-CE5i4q0c.mjs} +5 -5
- package/dist/{validation-BQ_TP-On.mjs.map → validation-CE5i4q0c.mjs.map} +1 -1
- package/dist/version-Dw0JXu45.mjs +7 -0
- package/dist/{version-CgcnMvqS.mjs.map → version-Dw0JXu45.mjs.map} +1 -1
- package/dist/{widgets-DzlINGI6.mjs → widgets-ClEnYQCH.mjs} +2 -2
- package/dist/{widgets-DzlINGI6.mjs.map → widgets-ClEnYQCH.mjs.map} +1 -1
- package/dist/{zod-generator-MMm56Prt.mjs → zod-generator-Djo_VHCt.mjs} +4 -3
- package/dist/zod-generator-Djo_VHCt.mjs.map +1 -0
- package/package.json +7 -7
- package/src/api/handlers/content.ts +107 -8
- package/src/api/handlers/index.ts +2 -0
- package/src/api/openapi/document.ts +25 -0
- package/src/api/schemas/content.ts +33 -0
- package/src/astro/integration/index.ts +98 -0
- package/src/astro/integration/routes.ts +6 -0
- package/src/astro/integration/virtual-modules.ts +39 -0
- package/src/astro/integration/vite-config.ts +12 -0
- package/src/astro/middleware/stream-end-metrics.ts +96 -0
- package/src/astro/middleware.ts +107 -31
- package/src/astro/routes/api/content/[collection]/[id]/discard-draft.ts +4 -2
- package/src/astro/routes/api/content/[collection]/[id]/publish.ts +4 -2
- package/src/astro/routes/api/content/[collection]/[id]/schedule.ts +8 -4
- package/src/astro/routes/api/content/[collection]/[id]/unpublish.ts +4 -2
- package/src/astro/routes/api/content/[collection]/[id].ts +4 -2
- package/src/astro/routes/api/content/[collection]/authors.ts +34 -0
- package/src/astro/types.ts +8 -1
- package/src/bylines/index.ts +57 -0
- package/src/cli/commands/export-seed.ts +28 -12
- package/src/components/EmDashImage.astro +23 -4
- package/src/components/Image.astro +20 -3
- package/src/database/migrations/043_content_references.ts +121 -0
- package/src/database/migrations/runner.ts +9 -2
- package/src/database/repositories/content.ts +225 -67
- package/src/database/repositories/index.ts +7 -0
- package/src/database/repositories/relation.ts +467 -0
- package/src/database/repositories/types.ts +31 -0
- package/src/database/repositories/user.ts +18 -0
- package/src/database/types.ts +34 -0
- package/src/emdash-runtime.ts +318 -168
- package/src/index.ts +8 -1
- package/src/loader.ts +67 -34
- package/src/media/responsive.ts +125 -0
- package/src/menus/index.ts +27 -9
- package/src/plugins/cron.ts +3 -2
- package/src/plugins/hooks.ts +35 -6
- package/src/plugins/index.ts +5 -0
- package/src/plugins/manager.ts +1 -0
- package/src/plugins/scheduler/node.ts +9 -2
- package/src/query.ts +32 -5
- package/src/scheduled-publish.ts +153 -0
- package/src/schema/zod-generator.ts +6 -2
- package/src/seed/apply.ts +16 -6
- package/src/seed/types.ts +9 -0
- package/src/seed/validate.ts +15 -0
- package/src/taxonomies/index.ts +13 -8
- package/src/utils/init-lock.ts +143 -0
- package/src/virtual-modules.d.ts +11 -0
- package/dist/api-B7GATEYo.mjs.map +0 -1
- package/dist/apply-BrVqULFe.mjs.map +0 -1
- package/dist/byline-fields-CR5hGLMw.d.mts.map +0 -1
- package/dist/content-C7aJ7keg.mjs.map +0 -1
- package/dist/cron-DZovZUnC.mjs.map +0 -1
- package/dist/index-C8ciqSMJ.d.mts.map +0 -1
- package/dist/loader-BxyvbrZP.mjs.map +0 -1
- package/dist/menus-CIdZ_Q6U.mjs.map +0 -1
- package/dist/query-Cc649nDl.mjs.map +0 -1
- package/dist/redirects-C0L9JUk4.mjs.map +0 -1
- package/dist/runner-BiuUfx-V.mjs.map +0 -1
- package/dist/taxonomies-CGD6y79Q.mjs.map +0 -1
- package/dist/types-i8_uzhMD.d.mts.map +0 -1
- package/dist/user-tLdHUEXV.mjs.map +0 -1
- package/dist/validate-DWmnRg6E.mjs.map +0 -1
- package/dist/validate-Dy6nkNls.d.mts.map +0 -1
- package/dist/version-CgcnMvqS.mjs +0 -7
- package/dist/zod-generator-MMm56Prt.mjs.map +0 -1
- package/src/plugins/scheduler/piggyback.ts +0 -71
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "../../../../../base64-CqR-7kqF.mjs";
|
|
2
|
-
import "../../../../../types-
|
|
3
|
-
import { n as apiSuccess, r as handleError, t as apiError } from "../../../../../error-
|
|
4
|
-
import { i as parseQuery, t as isParseError } from "../../../../../parse-
|
|
5
|
-
import { D as usersListQuery } from "../../../../../redirects-
|
|
6
|
-
import "../../../../../byline-fields-
|
|
2
|
+
import "../../../../../types-BXSUSAjt.mjs";
|
|
3
|
+
import { n as apiSuccess, r as handleError, t as apiError } from "../../../../../error-RwM4dD35.mjs";
|
|
4
|
+
import { i as parseQuery, t as isParseError } from "../../../../../parse-CrGndy1A.mjs";
|
|
5
|
+
import { D as usersListQuery } from "../../../../../redirects-DEygMrRO.mjs";
|
|
6
|
+
import "../../../../../byline-fields-51kg6Vuv.mjs";
|
|
7
7
|
import "../../../../../api/schemas/index.mjs";
|
|
8
8
|
import { createKyselyAdapter } from "@emdash-cms/auth/adapters/kysely";
|
|
9
9
|
import { Role } from "@emdash-cms/auth";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as runMigrations } from "../../../../runner--4wMWwKM.mjs";
|
|
2
2
|
import "../../../../dialect-helpers-DRI5pyY3.mjs";
|
|
3
3
|
import "../../../../base64-CqR-7kqF.mjs";
|
|
4
|
-
import "../../../../types-
|
|
5
|
-
import { n as apiSuccess, r as handleError, t as apiError } from "../../../../error-
|
|
4
|
+
import "../../../../types-BXSUSAjt.mjs";
|
|
5
|
+
import { n as apiSuccess, r as handleError, t as apiError } from "../../../../error-RwM4dD35.mjs";
|
|
6
6
|
import { t as escapeHtml } from "../../../../escape-bIyGoW5W.mjs";
|
|
7
7
|
import { t as isSafeRedirect } from "../../../../redirect-Cw3JTlmj.mjs";
|
|
8
8
|
import { ulid } from "ulidx";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../../../../../base64-CqR-7kqF.mjs";
|
|
2
|
-
import "../../../../../types-
|
|
3
|
-
import { n as apiSuccess, r as handleError, t as apiError } from "../../../../../error-
|
|
2
|
+
import "../../../../../types-BXSUSAjt.mjs";
|
|
3
|
+
import { n as apiSuccess, r as handleError, t as apiError } from "../../../../../error-RwM4dD35.mjs";
|
|
4
4
|
import { createKyselyAdapter } from "@emdash-cms/auth/adapters/kysely";
|
|
5
5
|
import { InviteError, roleFromLevel, validateInvite } from "@emdash-cms/auth";
|
|
6
6
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "../../../../../base64-CqR-7kqF.mjs";
|
|
2
|
-
import "../../../../../types-
|
|
3
|
-
import { t as OptionsRepository } from "../../../../../options-
|
|
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 { y as inviteCompleteBody } from "../../../../../byline-fields-
|
|
2
|
+
import "../../../../../types-BXSUSAjt.mjs";
|
|
3
|
+
import { t as OptionsRepository } from "../../../../../options-BPCVnesz.mjs";
|
|
4
|
+
import { n as apiSuccess, r as handleError, t as apiError } from "../../../../../error-RwM4dD35.mjs";
|
|
5
|
+
import { n as parseBody, t as isParseError } from "../../../../../parse-CrGndy1A.mjs";
|
|
6
|
+
import "../../../../../redirects-DEygMrRO.mjs";
|
|
7
|
+
import { y as inviteCompleteBody } from "../../../../../byline-fields-51kg6Vuv.mjs";
|
|
8
8
|
import "../../../../../api/schemas/index.mjs";
|
|
9
9
|
import { n as getPublicOrigin } from "../../../../../public-url-egRHCy1m.mjs";
|
|
10
10
|
import { n as validateAllowedOrigins, t as getConfiguredAllowedOrigins } from "../../../../../allowed-origins-CyYLEJkp.mjs";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import "../../../../../base64-CqR-7kqF.mjs";
|
|
2
|
-
import "../../../../../types-
|
|
3
|
-
import { t as OptionsRepository } from "../../../../../options-
|
|
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 { b as inviteCreateBody } from "../../../../../byline-fields-
|
|
2
|
+
import "../../../../../types-BXSUSAjt.mjs";
|
|
3
|
+
import { t as OptionsRepository } from "../../../../../options-BPCVnesz.mjs";
|
|
4
|
+
import { n as apiSuccess, r as handleError, t as apiError } from "../../../../../error-RwM4dD35.mjs";
|
|
5
|
+
import { n as parseBody, t as isParseError } from "../../../../../parse-CrGndy1A.mjs";
|
|
6
|
+
import "../../../../../redirects-DEygMrRO.mjs";
|
|
7
|
+
import { b as inviteCreateBody } from "../../../../../byline-fields-51kg6Vuv.mjs";
|
|
8
8
|
import "../../../../../api/schemas/index.mjs";
|
|
9
|
-
import { t as getSiteBaseUrl } from "../../../../../site-url-
|
|
9
|
+
import { t as getSiteBaseUrl } from "../../../../../site-url-mEVmwIFi.mjs";
|
|
10
10
|
import { createKyselyAdapter } from "@emdash-cms/auth/adapters/kysely";
|
|
11
11
|
import { InviteError, Role, createInvite } from "@emdash-cms/auth";
|
|
12
12
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "../../../../../base64-CqR-7kqF.mjs";
|
|
2
|
-
import "../../../../../types-
|
|
3
|
-
import { t as OptionsRepository } from "../../../../../options-
|
|
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 { x as inviteRegisterOptionsBody } from "../../../../../byline-fields-
|
|
2
|
+
import "../../../../../types-BXSUSAjt.mjs";
|
|
3
|
+
import { t as OptionsRepository } from "../../../../../options-BPCVnesz.mjs";
|
|
4
|
+
import { n as apiSuccess, r as handleError, t as apiError } from "../../../../../error-RwM4dD35.mjs";
|
|
5
|
+
import { n as parseBody, t as isParseError } from "../../../../../parse-CrGndy1A.mjs";
|
|
6
|
+
import "../../../../../redirects-DEygMrRO.mjs";
|
|
7
|
+
import { x as inviteRegisterOptionsBody } from "../../../../../byline-fields-51kg6Vuv.mjs";
|
|
8
8
|
import "../../../../../api/schemas/index.mjs";
|
|
9
9
|
import { n as getPublicOrigin } from "../../../../../public-url-egRHCy1m.mjs";
|
|
10
10
|
import { n as createChallengeStore } from "../../../../../challenge-store-DGwuCc4R.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../../../../base64-CqR-7kqF.mjs";
|
|
2
|
-
import "../../../../types-
|
|
3
|
-
import { n as apiSuccess, r as handleError } from "../../../../error-
|
|
2
|
+
import "../../../../types-BXSUSAjt.mjs";
|
|
3
|
+
import { n as apiSuccess, r as handleError } from "../../../../error-RwM4dD35.mjs";
|
|
4
4
|
import { t as isSafeRedirect } from "../../../../redirect-Cw3JTlmj.mjs";
|
|
5
5
|
|
|
6
6
|
//#region src/astro/routes/api/auth/logout.ts
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import "../../../../../base64-CqR-7kqF.mjs";
|
|
2
|
-
import "../../../../../types-
|
|
3
|
-
import { t as OptionsRepository } from "../../../../../options-
|
|
4
|
-
import { n as apiSuccess, t as apiError } from "../../../../../error-
|
|
5
|
-
import { n as parseBody, t as isParseError } from "../../../../../parse-
|
|
6
|
-
import "../../../../../redirects-
|
|
7
|
-
import { S as magicLinkSendBody } from "../../../../../byline-fields-
|
|
2
|
+
import "../../../../../types-BXSUSAjt.mjs";
|
|
3
|
+
import { t as OptionsRepository } from "../../../../../options-BPCVnesz.mjs";
|
|
4
|
+
import { n as apiSuccess, t as apiError } from "../../../../../error-RwM4dD35.mjs";
|
|
5
|
+
import { n as parseBody, t as isParseError } from "../../../../../parse-CrGndy1A.mjs";
|
|
6
|
+
import "../../../../../redirects-DEygMrRO.mjs";
|
|
7
|
+
import { S as magicLinkSendBody } from "../../../../../byline-fields-51kg6Vuv.mjs";
|
|
8
8
|
import "../../../../../api/schemas/index.mjs";
|
|
9
9
|
import { t as getTrustedProxyHeaders } from "../../../../../trusted-proxy-B4AfnoAp.mjs";
|
|
10
|
-
import { t as getSiteBaseUrl } from "../../../../../site-url-
|
|
11
|
-
import { n as getClientIp, t as checkRateLimit } from "../../../../../rate-limit-
|
|
10
|
+
import { t as getSiteBaseUrl } from "../../../../../site-url-mEVmwIFi.mjs";
|
|
11
|
+
import { n as getClientIp, t as checkRateLimit } from "../../../../../rate-limit-ClFFUga6.mjs";
|
|
12
12
|
import { createKyselyAdapter } from "@emdash-cms/auth/adapters/kysely";
|
|
13
13
|
import { sendMagicLink } from "@emdash-cms/auth";
|
|
14
14
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../../../../../base64-CqR-7kqF.mjs";
|
|
2
|
-
import "../../../../../types-
|
|
3
|
-
import { t as apiError } from "../../../../../error-
|
|
2
|
+
import "../../../../../types-BXSUSAjt.mjs";
|
|
3
|
+
import { t as apiError } from "../../../../../error-RwM4dD35.mjs";
|
|
4
4
|
import { t as isSafeRedirect } from "../../../../../redirect-Cw3JTlmj.mjs";
|
|
5
5
|
import { createKyselyAdapter } from "@emdash-cms/auth/adapters/kysely";
|
|
6
6
|
import { MagicLinkError, verifyMagicLink } from "@emdash-cms/auth";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "../../../../base64-CqR-7kqF.mjs";
|
|
2
|
-
import "../../../../types-
|
|
3
|
-
import { t as UserRepository } from "../../../../user-
|
|
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 { v as authMeActionBody } from "../../../../byline-fields-
|
|
2
|
+
import "../../../../types-BXSUSAjt.mjs";
|
|
3
|
+
import { t as UserRepository } from "../../../../user-C0um7wrg.mjs";
|
|
4
|
+
import { n as apiSuccess, r as handleError, t as apiError } from "../../../../error-RwM4dD35.mjs";
|
|
5
|
+
import { n as parseBody, t as isParseError } from "../../../../parse-CrGndy1A.mjs";
|
|
6
|
+
import "../../../../redirects-DEygMrRO.mjs";
|
|
7
|
+
import { v as authMeActionBody } from "../../../../byline-fields-51kg6Vuv.mjs";
|
|
8
8
|
import "../../../../api/schemas/index.mjs";
|
|
9
9
|
|
|
10
10
|
//#region src/astro/routes/api/auth/me.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as OptionsRepository } from "../../../../../../options-
|
|
1
|
+
import { t as OptionsRepository } from "../../../../../../options-BPCVnesz.mjs";
|
|
2
2
|
import { n as getPublicOrigin } from "../../../../../../public-url-egRHCy1m.mjs";
|
|
3
|
-
import { t as finalizeSetup } from "../../../../../../setup-complete-
|
|
3
|
+
import { t as finalizeSetup } from "../../../../../../setup-complete-Yuv78yua.mjs";
|
|
4
4
|
import { t as createOAuthStateStore } from "../../../../../../oauth-state-store-BJ7YtrfD.mjs";
|
|
5
5
|
import { createKyselyAdapter } from "@emdash-cms/auth/adapters/kysely";
|
|
6
6
|
import { OAuthError, Role, handleOAuthCallback } from "@emdash-cms/auth";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "../../../../../base64-CqR-7kqF.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-
|
|
5
|
-
import "../../../../../redirects-
|
|
6
|
-
import { E as passkeyRenameBody } from "../../../../../byline-fields-
|
|
2
|
+
import "../../../../../types-BXSUSAjt.mjs";
|
|
3
|
+
import { n as apiSuccess, r as handleError, t as apiError } from "../../../../../error-RwM4dD35.mjs";
|
|
4
|
+
import { n as parseBody, t as isParseError } from "../../../../../parse-CrGndy1A.mjs";
|
|
5
|
+
import "../../../../../redirects-DEygMrRO.mjs";
|
|
6
|
+
import { E as passkeyRenameBody } from "../../../../../byline-fields-51kg6Vuv.mjs";
|
|
7
7
|
import "../../../../../api/schemas/index.mjs";
|
|
8
8
|
import { createKyselyAdapter } from "@emdash-cms/auth/adapters/kysely";
|
|
9
9
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../../../../../base64-CqR-7kqF.mjs";
|
|
2
|
-
import "../../../../../types-
|
|
3
|
-
import { n as apiSuccess, r as handleError, t as apiError } from "../../../../../error-
|
|
2
|
+
import "../../../../../types-BXSUSAjt.mjs";
|
|
3
|
+
import { n as apiSuccess, r as handleError, t as apiError } from "../../../../../error-RwM4dD35.mjs";
|
|
4
4
|
import { createKyselyAdapter } from "@emdash-cms/auth/adapters/kysely";
|
|
5
5
|
|
|
6
6
|
//#region src/astro/routes/api/auth/passkey/index.ts
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import "../../../../../base64-CqR-7kqF.mjs";
|
|
2
|
-
import "../../../../../types-
|
|
3
|
-
import { t as OptionsRepository } from "../../../../../options-
|
|
4
|
-
import { n as apiSuccess, r as handleError, t as apiError } from "../../../../../error-
|
|
5
|
-
import { r as parseOptionalBody, t as isParseError } from "../../../../../parse-
|
|
6
|
-
import "../../../../../redirects-
|
|
7
|
-
import { C as passkeyOptionsBody } from "../../../../../byline-fields-
|
|
2
|
+
import "../../../../../types-BXSUSAjt.mjs";
|
|
3
|
+
import { t as OptionsRepository } from "../../../../../options-BPCVnesz.mjs";
|
|
4
|
+
import { n as apiSuccess, r as handleError, t as apiError } from "../../../../../error-RwM4dD35.mjs";
|
|
5
|
+
import { r as parseOptionalBody, t as isParseError } from "../../../../../parse-CrGndy1A.mjs";
|
|
6
|
+
import "../../../../../redirects-DEygMrRO.mjs";
|
|
7
|
+
import { C as passkeyOptionsBody } from "../../../../../byline-fields-51kg6Vuv.mjs";
|
|
8
8
|
import "../../../../../api/schemas/index.mjs";
|
|
9
9
|
import { t as getTrustedProxyHeaders } from "../../../../../trusted-proxy-B4AfnoAp.mjs";
|
|
10
10
|
import { n as getPublicOrigin } from "../../../../../public-url-egRHCy1m.mjs";
|
|
11
11
|
import { n as createChallengeStore, t as cleanupExpiredChallenges } from "../../../../../challenge-store-DGwuCc4R.mjs";
|
|
12
12
|
import { t as getPasskeyConfig } from "../../../../../passkey-config-BDVM86Tj.mjs";
|
|
13
|
-
import { n as getClientIp, r as rateLimitResponse, t as checkRateLimit } from "../../../../../rate-limit-
|
|
13
|
+
import { n as getClientIp, r as rateLimitResponse, t as checkRateLimit } from "../../../../../rate-limit-ClFFUga6.mjs";
|
|
14
14
|
import { createKyselyAdapter } from "@emdash-cms/auth/adapters/kysely";
|
|
15
15
|
import { generateAuthenticationOptions } from "@emdash-cms/auth/passkey";
|
|
16
16
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "../../../../../../base64-CqR-7kqF.mjs";
|
|
2
|
-
import "../../../../../../types-
|
|
3
|
-
import { t as OptionsRepository } from "../../../../../../options-
|
|
4
|
-
import { n as apiSuccess, r as handleError, t as apiError } from "../../../../../../error-
|
|
5
|
-
import { r as parseOptionalBody, t as isParseError } from "../../../../../../parse-
|
|
6
|
-
import "../../../../../../redirects-
|
|
7
|
-
import { w as passkeyRegisterOptionsBody } from "../../../../../../byline-fields-
|
|
2
|
+
import "../../../../../../types-BXSUSAjt.mjs";
|
|
3
|
+
import { t as OptionsRepository } from "../../../../../../options-BPCVnesz.mjs";
|
|
4
|
+
import { n as apiSuccess, r as handleError, t as apiError } from "../../../../../../error-RwM4dD35.mjs";
|
|
5
|
+
import { r as parseOptionalBody, t as isParseError } from "../../../../../../parse-CrGndy1A.mjs";
|
|
6
|
+
import "../../../../../../redirects-DEygMrRO.mjs";
|
|
7
|
+
import { w as passkeyRegisterOptionsBody } from "../../../../../../byline-fields-51kg6Vuv.mjs";
|
|
8
8
|
import "../../../../../../api/schemas/index.mjs";
|
|
9
9
|
import { n as getPublicOrigin } from "../../../../../../public-url-egRHCy1m.mjs";
|
|
10
10
|
import { n as createChallengeStore } from "../../../../../../challenge-store-DGwuCc4R.mjs";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "../../../../../../base64-CqR-7kqF.mjs";
|
|
2
|
-
import "../../../../../../types-
|
|
3
|
-
import { t as OptionsRepository } from "../../../../../../options-
|
|
4
|
-
import { n as apiSuccess, t as apiError } from "../../../../../../error-
|
|
5
|
-
import { n as parseBody, t as isParseError } from "../../../../../../parse-
|
|
6
|
-
import "../../../../../../redirects-
|
|
7
|
-
import { T as passkeyRegisterVerifyBody } from "../../../../../../byline-fields-
|
|
2
|
+
import "../../../../../../types-BXSUSAjt.mjs";
|
|
3
|
+
import { t as OptionsRepository } from "../../../../../../options-BPCVnesz.mjs";
|
|
4
|
+
import { n as apiSuccess, t as apiError } from "../../../../../../error-RwM4dD35.mjs";
|
|
5
|
+
import { n as parseBody, t as isParseError } from "../../../../../../parse-CrGndy1A.mjs";
|
|
6
|
+
import "../../../../../../redirects-DEygMrRO.mjs";
|
|
7
|
+
import { T as passkeyRegisterVerifyBody } from "../../../../../../byline-fields-51kg6Vuv.mjs";
|
|
8
8
|
import "../../../../../../api/schemas/index.mjs";
|
|
9
9
|
import { n as getPublicOrigin } from "../../../../../../public-url-egRHCy1m.mjs";
|
|
10
10
|
import { n as validateAllowedOrigins, t as getConfiguredAllowedOrigins } from "../../../../../../allowed-origins-CyYLEJkp.mjs";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "../../../../../base64-CqR-7kqF.mjs";
|
|
2
|
-
import "../../../../../types-
|
|
3
|
-
import { t as OptionsRepository } from "../../../../../options-
|
|
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 { D as passkeyVerifyBody } from "../../../../../byline-fields-
|
|
2
|
+
import "../../../../../types-BXSUSAjt.mjs";
|
|
3
|
+
import { t as OptionsRepository } from "../../../../../options-BPCVnesz.mjs";
|
|
4
|
+
import { n as apiSuccess, r as handleError, t as apiError } from "../../../../../error-RwM4dD35.mjs";
|
|
5
|
+
import { n as parseBody, t as isParseError } from "../../../../../parse-CrGndy1A.mjs";
|
|
6
|
+
import "../../../../../redirects-DEygMrRO.mjs";
|
|
7
|
+
import { D as passkeyVerifyBody } from "../../../../../byline-fields-51kg6Vuv.mjs";
|
|
8
8
|
import "../../../../../api/schemas/index.mjs";
|
|
9
9
|
import { n as getPublicOrigin } from "../../../../../public-url-egRHCy1m.mjs";
|
|
10
10
|
import { n as validateAllowedOrigins, t as getConfiguredAllowedOrigins } from "../../../../../allowed-origins-CyYLEJkp.mjs";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "../../../../../base64-CqR-7kqF.mjs";
|
|
2
|
-
import "../../../../../types-
|
|
3
|
-
import { t as OptionsRepository } from "../../../../../options-
|
|
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 { O as signupCompleteBody } from "../../../../../byline-fields-
|
|
2
|
+
import "../../../../../types-BXSUSAjt.mjs";
|
|
3
|
+
import { t as OptionsRepository } from "../../../../../options-BPCVnesz.mjs";
|
|
4
|
+
import { n as apiSuccess, r as handleError, t as apiError } from "../../../../../error-RwM4dD35.mjs";
|
|
5
|
+
import { n as parseBody, t as isParseError } from "../../../../../parse-CrGndy1A.mjs";
|
|
6
|
+
import "../../../../../redirects-DEygMrRO.mjs";
|
|
7
|
+
import { O as signupCompleteBody } from "../../../../../byline-fields-51kg6Vuv.mjs";
|
|
8
8
|
import "../../../../../api/schemas/index.mjs";
|
|
9
9
|
import { n as getPublicOrigin } from "../../../../../public-url-egRHCy1m.mjs";
|
|
10
10
|
import { n as validateAllowedOrigins, t as getConfiguredAllowedOrigins } from "../../../../../allowed-origins-CyYLEJkp.mjs";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import "../../../../../base64-CqR-7kqF.mjs";
|
|
2
|
-
import "../../../../../types-
|
|
3
|
-
import { t as OptionsRepository } from "../../../../../options-
|
|
4
|
-
import { n as apiSuccess, t as apiError } from "../../../../../error-
|
|
5
|
-
import { n as parseBody, t as isParseError } from "../../../../../parse-
|
|
6
|
-
import "../../../../../redirects-
|
|
7
|
-
import { k as signupRequestBody } from "../../../../../byline-fields-
|
|
2
|
+
import "../../../../../types-BXSUSAjt.mjs";
|
|
3
|
+
import { t as OptionsRepository } from "../../../../../options-BPCVnesz.mjs";
|
|
4
|
+
import { n as apiSuccess, t as apiError } from "../../../../../error-RwM4dD35.mjs";
|
|
5
|
+
import { n as parseBody, t as isParseError } from "../../../../../parse-CrGndy1A.mjs";
|
|
6
|
+
import "../../../../../redirects-DEygMrRO.mjs";
|
|
7
|
+
import { k as signupRequestBody } from "../../../../../byline-fields-51kg6Vuv.mjs";
|
|
8
8
|
import "../../../../../api/schemas/index.mjs";
|
|
9
9
|
import { t as getTrustedProxyHeaders } from "../../../../../trusted-proxy-B4AfnoAp.mjs";
|
|
10
|
-
import { t as getSiteBaseUrl } from "../../../../../site-url-
|
|
11
|
-
import { n as getClientIp, t as checkRateLimit } from "../../../../../rate-limit-
|
|
10
|
+
import { t as getSiteBaseUrl } from "../../../../../site-url-mEVmwIFi.mjs";
|
|
11
|
+
import { n as getClientIp, t as checkRateLimit } from "../../../../../rate-limit-ClFFUga6.mjs";
|
|
12
12
|
import { createKyselyAdapter } from "@emdash-cms/auth/adapters/kysely";
|
|
13
13
|
import { requestSignup } from "@emdash-cms/auth";
|
|
14
14
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../../../../../base64-CqR-7kqF.mjs";
|
|
2
|
-
import "../../../../../types-
|
|
3
|
-
import { n as apiSuccess, r as handleError, t as apiError } from "../../../../../error-
|
|
2
|
+
import "../../../../../types-BXSUSAjt.mjs";
|
|
3
|
+
import { n as apiSuccess, r as handleError, t as apiError } from "../../../../../error-RwM4dD35.mjs";
|
|
4
4
|
import { createKyselyAdapter } from "@emdash-cms/auth/adapters/kysely";
|
|
5
5
|
import { SignupError, roleFromLevel, validateSignupToken } from "@emdash-cms/auth";
|
|
6
6
|
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { t as validateIdentifier } from "../../../../../../validate-VPnKoIzW.mjs";
|
|
2
2
|
import "../../../../../../base64-CqR-7kqF.mjs";
|
|
3
|
-
import "../../../../../../types-
|
|
4
|
-
import { t as CommentRepository } from "../../../../../../comment-
|
|
5
|
-
import "../../../../../../options-
|
|
6
|
-
import { a as unwrapResult, i as requireDb, n as apiSuccess, r as handleError, t as apiError } from "../../../../../../error-
|
|
7
|
-
import { n as parseBody, t as isParseError } from "../../../../../../parse-
|
|
8
|
-
import { yt as createCommentBody } from "../../../../../../redirects-
|
|
9
|
-
import "../../../../../../byline-fields-
|
|
3
|
+
import "../../../../../../types-BXSUSAjt.mjs";
|
|
4
|
+
import { t as CommentRepository } from "../../../../../../comment-sqQxNpN3.mjs";
|
|
5
|
+
import "../../../../../../options-BPCVnesz.mjs";
|
|
6
|
+
import { a as unwrapResult, i as requireDb, n as apiSuccess, r as handleError, t as apiError } from "../../../../../../error-RwM4dD35.mjs";
|
|
7
|
+
import { n as parseBody, t as isParseError } from "../../../../../../parse-CrGndy1A.mjs";
|
|
8
|
+
import { yt as createCommentBody } from "../../../../../../redirects-DEygMrRO.mjs";
|
|
9
|
+
import "../../../../../../byline-fields-51kg6Vuv.mjs";
|
|
10
10
|
import "../../../../../../api/schemas/index.mjs";
|
|
11
11
|
import { t as extractRequestMeta } from "../../../../../../request-meta-7ByVLxB-.mjs";
|
|
12
|
-
import { i as resolveSecretsCached } from "../../../../../../secrets-
|
|
13
|
-
import { c as hashIp, s as handleCommentList, t as checkRateLimit } from "../../../../../../comments-
|
|
14
|
-
import { t as getSiteBaseUrl } from "../../../../../../site-url-
|
|
15
|
-
import { i as sendCommentNotification, t as createComment } from "../../../../../../service-
|
|
12
|
+
import { i as resolveSecretsCached } from "../../../../../../secrets-C_ZtRos3.mjs";
|
|
13
|
+
import { c as hashIp, s as handleCommentList, t as checkRateLimit } from "../../../../../../comments-CJ0RZsYR.mjs";
|
|
14
|
+
import { t as getSiteBaseUrl } from "../../../../../../site-url-mEVmwIFi.mjs";
|
|
15
|
+
import { i as sendCommentNotification, t as createComment } from "../../../../../../service-DAxg8RPR.mjs";
|
|
16
16
|
|
|
17
17
|
//#region src/astro/routes/api/comments/[collection]/[contentId]/index.ts
|
|
18
18
|
const prerender = false;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../../../../../../base64-CqR-7kqF.mjs";
|
|
2
|
-
import "../../../../../../types-
|
|
3
|
-
import { a as unwrapResult, t as apiError } from "../../../../../../error-
|
|
4
|
-
import { n as requirePerm } from "../../../../../../authorize-
|
|
2
|
+
import "../../../../../../types-BXSUSAjt.mjs";
|
|
3
|
+
import { a as unwrapResult, t as apiError } from "../../../../../../error-RwM4dD35.mjs";
|
|
4
|
+
import { n as requirePerm } from "../../../../../../authorize-C_8t2KGa.mjs";
|
|
5
5
|
|
|
6
6
|
//#region src/astro/routes/api/content/[collection]/[id]/compare.ts
|
|
7
7
|
const prerender = false;
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import "../../../../../../base64-CqR-7kqF.mjs";
|
|
2
|
-
import "../../../../../../types-
|
|
3
|
-
import { a as unwrapResult, o as mapErrorStatus, t as apiError } from "../../../../../../error-
|
|
4
|
-
import { t as requireOwnerPerm } from "../../../../../../authorize-
|
|
2
|
+
import "../../../../../../types-BXSUSAjt.mjs";
|
|
3
|
+
import { a as unwrapResult, o as mapErrorStatus, t as apiError } from "../../../../../../error-RwM4dD35.mjs";
|
|
4
|
+
import { t as requireOwnerPerm } from "../../../../../../authorize-C_8t2KGa.mjs";
|
|
5
5
|
|
|
6
6
|
//#region src/astro/routes/api/content/[collection]/[id]/discard-draft.ts
|
|
7
7
|
const prerender = false;
|
|
8
|
-
const POST = async ({ params, locals, cache }) => {
|
|
8
|
+
const POST = async ({ params, locals, url, cache }) => {
|
|
9
9
|
const { emdash, user } = locals;
|
|
10
10
|
const collection = params.collection;
|
|
11
11
|
const id = params.id;
|
|
12
12
|
if (!emdash?.handleContentDiscardDraft || !emdash?.handleContentGet) return apiError("NOT_CONFIGURED", "EmDash is not initialized", 500);
|
|
13
|
-
const
|
|
13
|
+
const locale = url.searchParams.get("locale") || void 0;
|
|
14
|
+
const existing = await emdash.handleContentGet(collection, id, locale);
|
|
14
15
|
if (!existing.success) return apiError(existing.error?.code ?? "UNKNOWN_ERROR", existing.error?.message ?? "Unknown error", mapErrorStatus(existing.error?.code));
|
|
15
16
|
const existingData = existing.data && typeof existing.data === "object" ? existing.data : void 0;
|
|
16
17
|
const existingItem = existingData?.item && typeof existingData.item === "object" ? existingData.item : existingData;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discard-draft.mjs","names":[],"sources":["../../../../../../../src/astro/routes/api/content/[collection]/[id]/discard-draft.ts"],"sourcesContent":["/**\n * Discard draft changes - reverts to live version\n *\n * POST /_emdash/api/content/{collection}/{id}/discard-draft\n */\n\nimport type { APIRoute } from \"astro\";\n\nimport { requireOwnerPerm } from \"#api/authorize.js\";\nimport { apiError, mapErrorStatus, unwrapResult } from \"#api/error.js\";\n\nexport const prerender = false;\n\nexport const POST: APIRoute = async ({ params, locals, cache }) => {\n\tconst { emdash, user } = locals;\n\tconst collection = params.collection!;\n\tconst id = params.id!;\n\n\tif (!emdash?.handleContentDiscardDraft || !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);\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\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 check\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 denied = requireOwnerPerm(user, authorId, \"content:edit_own\", \"content:edit_any\");\n\tif (denied) return denied;\n\n\tconst resolvedId = typeof existingItem?.id === \"string\" ? existingItem.id : id;\n\n\tconst result = await emdash.handleContentDiscardDraft(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":";;;;;;AAWA,MAAa,YAAY;AAEzB,MAAa,OAAiB,OAAO,EAAE,QAAQ,QAAQ,YAAY;
|
|
1
|
+
{"version":3,"file":"discard-draft.mjs","names":[],"sources":["../../../../../../../src/astro/routes/api/content/[collection]/[id]/discard-draft.ts"],"sourcesContent":["/**\n * Discard draft changes - reverts to live version\n *\n * POST /_emdash/api/content/{collection}/{id}/discard-draft\n */\n\nimport type { APIRoute } from \"astro\";\n\nimport { requireOwnerPerm } from \"#api/authorize.js\";\nimport { apiError, mapErrorStatus, unwrapResult } from \"#api/error.js\";\n\nexport const prerender = false;\n\nexport const POST: 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?.handleContentDiscardDraft || !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\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 check\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 denied = requireOwnerPerm(user, authorId, \"content:edit_own\", \"content:edit_any\");\n\tif (denied) return denied;\n\n\tconst resolvedId = typeof existingItem?.id === \"string\" ? existingItem.id : id;\n\n\tconst result = await emdash.handleContentDiscardDraft(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":";;;;;;AAWA,MAAa,YAAY;AAEzB,MAAa,OAAiB,OAAO,EAAE,QAAQ,QAAQ,KAAK,YAAY;CACvE,MAAM,EAAE,QAAQ,SAAS;CACzB,MAAM,aAAa,OAAO;CAC1B,MAAM,KAAK,OAAO;AAElB,KAAI,CAAC,QAAQ,6BAA6B,CAAC,QAAQ,iBAClD,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;CAEF,MAAM,eACL,SAAS,QAAQ,OAAO,SAAS,SAAS,WAEvC,SAAS,OACT;CAEJ,MAAM,eACL,cAAc,QAAQ,OAAO,aAAa,SAAS,WAEhD,aAAa,OACb;CAEJ,MAAM,SAAS,iBAAiB,MADf,OAAO,cAAc,aAAa,WAAW,aAAa,WAAW,IACtC,oBAAoB,mBAAmB;AACvF,KAAI,OAAQ,QAAO;CAEnB,MAAM,aAAa,OAAO,cAAc,OAAO,WAAW,aAAa,KAAK;CAE5E,MAAM,SAAS,MAAM,OAAO,0BAA0B,YAAY,WAAW;AAE7E,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,7 +1,7 @@
|
|
|
1
1
|
import "../../../../../../base64-CqR-7kqF.mjs";
|
|
2
|
-
import "../../../../../../types-
|
|
3
|
-
import { a as unwrapResult, o as mapErrorStatus, t as apiError } from "../../../../../../error-
|
|
4
|
-
import { n as requirePerm, t as requireOwnerPerm } from "../../../../../../authorize-
|
|
2
|
+
import "../../../../../../types-BXSUSAjt.mjs";
|
|
3
|
+
import { a as unwrapResult, o as mapErrorStatus, t as apiError } from "../../../../../../error-RwM4dD35.mjs";
|
|
4
|
+
import { n as requirePerm, t as requireOwnerPerm } from "../../../../../../authorize-C_8t2KGa.mjs";
|
|
5
5
|
|
|
6
6
|
//#region src/astro/routes/api/content/[collection]/[id]/duplicate.ts
|
|
7
7
|
const prerender = false;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../../../../../../base64-CqR-7kqF.mjs";
|
|
2
|
-
import "../../../../../../types-
|
|
3
|
-
import { a as unwrapResult, t as apiError } from "../../../../../../error-
|
|
4
|
-
import { n as requirePerm } from "../../../../../../authorize-
|
|
2
|
+
import "../../../../../../types-BXSUSAjt.mjs";
|
|
3
|
+
import { a as unwrapResult, t as apiError } from "../../../../../../error-RwM4dD35.mjs";
|
|
4
|
+
import { n as requirePerm } from "../../../../../../authorize-C_8t2KGa.mjs";
|
|
5
5
|
|
|
6
6
|
//#region src/astro/routes/api/content/[collection]/[id]/permanent.ts
|
|
7
7
|
const prerender = false;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { n as getI18nConfig } from "../../../../../../config-CVssduLe.mjs";
|
|
2
2
|
import "../../../../../../base64-CqR-7kqF.mjs";
|
|
3
|
-
import "../../../../../../types-
|
|
4
|
-
import "../../../../../../options-
|
|
5
|
-
import { a as unwrapResult, n as apiSuccess, r as handleError, t as apiError } from "../../../../../../error-
|
|
6
|
-
import { r as parseOptionalBody, t as isParseError } from "../../../../../../parse-
|
|
7
|
-
import {
|
|
8
|
-
import "../../../../../../byline-fields-
|
|
3
|
+
import "../../../../../../types-BXSUSAjt.mjs";
|
|
4
|
+
import "../../../../../../options-BPCVnesz.mjs";
|
|
5
|
+
import { a as unwrapResult, n as apiSuccess, r as handleError, t as apiError } from "../../../../../../error-RwM4dD35.mjs";
|
|
6
|
+
import { r as parseOptionalBody, t as isParseError } from "../../../../../../parse-CrGndy1A.mjs";
|
|
7
|
+
import { an as contentPreviewUrlBody } from "../../../../../../redirects-DEygMrRO.mjs";
|
|
8
|
+
import "../../../../../../byline-fields-51kg6Vuv.mjs";
|
|
9
9
|
import "../../../../../../api/schemas/index.mjs";
|
|
10
10
|
import "../../../../../../tokens-Bx2afeT-.mjs";
|
|
11
11
|
import { i as getPreviewUrl } from "../../../../../../preview-BfuRkVKW.mjs";
|
|
12
|
-
import { i as resolveSecretsCached } from "../../../../../../secrets-
|
|
13
|
-
import { n as requirePerm } from "../../../../../../authorize-
|
|
12
|
+
import { i as resolveSecretsCached } from "../../../../../../secrets-C_ZtRos3.mjs";
|
|
13
|
+
import { n as requirePerm } from "../../../../../../authorize-C_8t2KGa.mjs";
|
|
14
14
|
|
|
15
15
|
//#region src/astro/routes/api/content/[collection]/[id]/preview-url.ts
|
|
16
16
|
const prerender = false;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import "../../../../../../base64-CqR-7kqF.mjs";
|
|
2
|
-
import "../../../../../../types-
|
|
3
|
-
import { a as unwrapResult, o as mapErrorStatus, t as apiError } from "../../../../../../error-
|
|
4
|
-
import { r as parseOptionalBody, t as isParseError } from "../../../../../../parse-
|
|
5
|
-
import {
|
|
6
|
-
import "../../../../../../byline-fields-
|
|
2
|
+
import "../../../../../../types-BXSUSAjt.mjs";
|
|
3
|
+
import { a as unwrapResult, o as mapErrorStatus, t as apiError } from "../../../../../../error-RwM4dD35.mjs";
|
|
4
|
+
import { r as parseOptionalBody, t as isParseError } from "../../../../../../parse-CrGndy1A.mjs";
|
|
5
|
+
import { on as contentPublishBody } from "../../../../../../redirects-DEygMrRO.mjs";
|
|
6
|
+
import "../../../../../../byline-fields-51kg6Vuv.mjs";
|
|
7
7
|
import "../../../../../../api/schemas/index.mjs";
|
|
8
|
-
import { t as requireOwnerPerm } from "../../../../../../authorize-
|
|
8
|
+
import { t as requireOwnerPerm } from "../../../../../../authorize-C_8t2KGa.mjs";
|
|
9
9
|
import { hasPermission } from "@emdash-cms/auth";
|
|
10
10
|
|
|
11
11
|
//#region src/astro/routes/api/content/[collection]/[id]/publish.ts
|
|
@@ -21,14 +21,15 @@ import { hasPermission } from "@emdash-cms/auth";
|
|
|
21
21
|
* falls back to the current time on first publish.
|
|
22
22
|
*/
|
|
23
23
|
const prerender = false;
|
|
24
|
-
const POST = async ({ params, request, locals, cache }) => {
|
|
24
|
+
const POST = async ({ params, request, locals, url, cache }) => {
|
|
25
25
|
const { emdash, user } = locals;
|
|
26
26
|
const collection = params.collection;
|
|
27
27
|
const id = params.id;
|
|
28
28
|
if (!emdash?.handleContentPublish || !emdash?.handleContentGet) return apiError("NOT_CONFIGURED", "EmDash is not initialized", 500);
|
|
29
29
|
const body = await parseOptionalBody(request, contentPublishBody, {});
|
|
30
30
|
if (isParseError(body)) return body;
|
|
31
|
-
const
|
|
31
|
+
const locale = url.searchParams.get("locale") || void 0;
|
|
32
|
+
const existing = await emdash.handleContentGet(collection, id, locale);
|
|
32
33
|
if (!existing.success) return apiError(existing.error?.code ?? "UNKNOWN_ERROR", existing.error?.message ?? "Unknown error", mapErrorStatus(existing.error?.code));
|
|
33
34
|
const existingData = existing.data && typeof existing.data === "object" ? existing.data : void 0;
|
|
34
35
|
const existingItem = existingData?.item && typeof existingData.item === "object" ? existingData.item : existingData;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publish.mjs","names":[],"sources":["../../../../../../../src/astro/routes/api/content/[collection]/[id]/publish.ts"],"sourcesContent":["/**\n * Publish content - promotes draft to live\n *\n * POST /_emdash/api/content/{collection}/{id}/publish\n *\n * Optional JSON body: { publishedAt?: string }\n * publishedAt — ISO 8601 datetime to backdate the publish (e.g. when\n * migrating content). Writing publishedAt requires content:publish_any.\n * Without it, the existing published_at is preserved on re-publish and\n * falls back to the current time on first publish.\n */\n\nimport { hasPermission } from \"@emdash-cms/auth\";\nimport type { APIRoute } from \"astro\";\n\nimport { requireOwnerPerm } from \"#api/authorize.js\";\nimport { apiError, mapErrorStatus, unwrapResult } from \"#api/error.js\";\nimport { isParseError, parseOptionalBody } from \"#api/parse.js\";\nimport { contentPublishBody } from \"#api/schemas.js\";\n\nexport const prerender = false;\n\nexport const POST: APIRoute = async ({ params, request, locals, cache }) => {\n\tconst { emdash, user } = locals;\n\tconst collection = params.collection!;\n\tconst id = params.id!;\n\n\tif (!emdash?.handleContentPublish || !emdash?.handleContentGet) {\n\t\treturn apiError(\"NOT_CONFIGURED\", \"EmDash is not initialized\", 500);\n\t}\n\n\t// Body is optional — empty body means use the legacy behavior (preserve\n\t// or default published_at). Pass `publishedAt` to backdate.\n\tconst body = await parseOptionalBody(request, contentPublishBody, {});\n\tif (isParseError(body)) return body;\n\n\t// Fetch item to check ownership\n\tconst existing = await emdash.handleContentGet(collection, id);\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\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 denied = requireOwnerPerm(user, authorId, \"content:publish_own\", \"content:publish_any\");\n\tif (denied) return denied;\n\n\t// Schema narrows `publishedAt` to `string | undefined`; null is rejected\n\t// at the schema layer (publish has no semantic meaning for \"clear\").\n\tconst publishedAt = body?.publishedAt;\n\n\t// Backdating overwrites historical record — gate behind publish_any\n\t// regardless of ownership.\n\tif (publishedAt !== undefined && !hasPermission(user, \"content:publish_any\")) {\n\t\treturn apiError(\n\t\t\t\"FORBIDDEN\",\n\t\t\t\"Setting publishedAt requires content:publish_any permission\",\n\t\t\t403,\n\t\t);\n\t}\n\n\tconst resolvedId = typeof existingItem?.id === \"string\" ? existingItem.id : id;\n\n\tconst result = await emdash.handleContentPublish(collection, resolvedId, {\n\t\tpublishedAt,\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"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAoBA,MAAa,YAAY;AAEzB,MAAa,OAAiB,OAAO,EAAE,QAAQ,SAAS,QAAQ,YAAY;
|
|
1
|
+
{"version":3,"file":"publish.mjs","names":[],"sources":["../../../../../../../src/astro/routes/api/content/[collection]/[id]/publish.ts"],"sourcesContent":["/**\n * Publish content - promotes draft to live\n *\n * POST /_emdash/api/content/{collection}/{id}/publish\n *\n * Optional JSON body: { publishedAt?: string }\n * publishedAt — ISO 8601 datetime to backdate the publish (e.g. when\n * migrating content). Writing publishedAt requires content:publish_any.\n * Without it, the existing published_at is preserved on re-publish and\n * falls back to the current time on first publish.\n */\n\nimport { hasPermission } from \"@emdash-cms/auth\";\nimport type { APIRoute } from \"astro\";\n\nimport { requireOwnerPerm } from \"#api/authorize.js\";\nimport { apiError, mapErrorStatus, unwrapResult } from \"#api/error.js\";\nimport { isParseError, parseOptionalBody } from \"#api/parse.js\";\nimport { contentPublishBody } from \"#api/schemas.js\";\n\nexport const prerender = false;\n\nexport const POST: APIRoute = async ({ params, request, locals, url, cache }) => {\n\tconst { emdash, user } = locals;\n\tconst collection = params.collection!;\n\tconst id = params.id!;\n\n\tif (!emdash?.handleContentPublish || !emdash?.handleContentGet) {\n\t\treturn apiError(\"NOT_CONFIGURED\", \"EmDash is not initialized\", 500);\n\t}\n\n\t// Body is optional — empty body means use the legacy behavior (preserve\n\t// or default published_at). Pass `publishedAt` to backdate.\n\tconst body = await parseOptionalBody(request, contentPublishBody, {});\n\tif (isParseError(body)) return body;\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 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\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 denied = requireOwnerPerm(user, authorId, \"content:publish_own\", \"content:publish_any\");\n\tif (denied) return denied;\n\n\t// Schema narrows `publishedAt` to `string | undefined`; null is rejected\n\t// at the schema layer (publish has no semantic meaning for \"clear\").\n\tconst publishedAt = body?.publishedAt;\n\n\t// Backdating overwrites historical record — gate behind publish_any\n\t// regardless of ownership.\n\tif (publishedAt !== undefined && !hasPermission(user, \"content:publish_any\")) {\n\t\treturn apiError(\n\t\t\t\"FORBIDDEN\",\n\t\t\t\"Setting publishedAt requires content:publish_any permission\",\n\t\t\t403,\n\t\t);\n\t}\n\n\tconst resolvedId = typeof existingItem?.id === \"string\" ? existingItem.id : id;\n\n\tconst result = await emdash.handleContentPublish(collection, resolvedId, {\n\t\tpublishedAt,\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"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAoBA,MAAa,YAAY;AAEzB,MAAa,OAAiB,OAAO,EAAE,QAAQ,SAAS,QAAQ,KAAK,YAAY;CAChF,MAAM,EAAE,QAAQ,SAAS;CACzB,MAAM,aAAa,OAAO;CAC1B,MAAM,KAAK,OAAO;AAElB,KAAI,CAAC,QAAQ,wBAAwB,CAAC,QAAQ,iBAC7C,QAAO,SAAS,kBAAkB,6BAA6B,IAAI;CAKpE,MAAM,OAAO,MAAM,kBAAkB,SAAS,oBAAoB,EAAE,CAAC;AACrE,KAAI,aAAa,KAAK,CAAE,QAAO;CAE/B,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,eACL,SAAS,QAAQ,OAAO,SAAS,SAAS,WAEvC,SAAS,OACT;CACJ,MAAM,eACL,cAAc,QAAQ,OAAO,aAAa,SAAS,WAEhD,aAAa,OACb;CAEJ,MAAM,SAAS,iBAAiB,MADf,OAAO,cAAc,aAAa,WAAW,aAAa,WAAW,IACtC,uBAAuB,sBAAsB;AAC7F,KAAI,OAAQ,QAAO;CAInB,MAAM,cAAc,MAAM;AAI1B,KAAI,gBAAgB,UAAa,CAAC,cAAc,MAAM,sBAAsB,CAC3E,QAAO,SACN,aACA,+DACA,IACA;CAGF,MAAM,aAAa,OAAO,cAAc,OAAO,WAAW,aAAa,KAAK;CAE5E,MAAM,SAAS,MAAM,OAAO,qBAAqB,YAAY,YAAY,EACxE,aACA,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"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../../../../../../base64-CqR-7kqF.mjs";
|
|
2
|
-
import "../../../../../../types-
|
|
3
|
-
import { a as unwrapResult, o as mapErrorStatus, t as apiError } from "../../../../../../error-
|
|
4
|
-
import { t as requireOwnerPerm } from "../../../../../../authorize-
|
|
2
|
+
import "../../../../../../types-BXSUSAjt.mjs";
|
|
3
|
+
import { a as unwrapResult, o as mapErrorStatus, t as apiError } from "../../../../../../error-RwM4dD35.mjs";
|
|
4
|
+
import { t as requireOwnerPerm } from "../../../../../../authorize-C_8t2KGa.mjs";
|
|
5
5
|
|
|
6
6
|
//#region src/astro/routes/api/content/[collection]/[id]/restore.ts
|
|
7
7
|
const prerender = false;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../../../../../../base64-CqR-7kqF.mjs";
|
|
2
|
-
import "../../../../../../types-
|
|
3
|
-
import { a as unwrapResult, t as apiError } from "../../../../../../error-
|
|
4
|
-
import { n as requirePerm } from "../../../../../../authorize-
|
|
2
|
+
import "../../../../../../types-BXSUSAjt.mjs";
|
|
3
|
+
import { a as unwrapResult, t as apiError } from "../../../../../../error-RwM4dD35.mjs";
|
|
4
|
+
import { n as requirePerm } from "../../../../../../authorize-C_8t2KGa.mjs";
|
|
5
5
|
|
|
6
6
|
//#region src/astro/routes/api/content/[collection]/[id]/revisions.ts
|
|
7
7
|
const prerender = false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schedule.d.mts","names":[],"sources":["../../../../../../../src/astro/routes/api/content/[collection]/[id]/schedule.ts"],"mappings":";;;cAca,SAAA;AAAA,cAsBA,IAAA,EAAM,QAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"schedule.d.mts","names":[],"sources":["../../../../../../../src/astro/routes/api/content/[collection]/[id]/schedule.ts"],"mappings":";;;cAca,SAAA;AAAA,cAsBA,IAAA,EAAM,QAAA;AAAA,cAoCN,MAAA,EAAQ,QAAA"}
|