emdash 0.16.1 → 0.17.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-C4yd_UJR.d.mts → adapters-C5AWLJSD.d.mts} +1 -1
- package/dist/{adapters-C4yd_UJR.d.mts.map → adapters-C5AWLJSD.d.mts.map} +1 -1
- package/dist/{allowed-origins-D0fFk9a6.mjs → allowed-origins-CyYLEJkp.mjs} +2 -2
- package/dist/{allowed-origins-D0fFk9a6.mjs.map → allowed-origins-CyYLEJkp.mjs.map} +1 -1
- package/dist/api/route-utils.d.mts +3 -3
- package/dist/api/route-utils.mjs +16 -16
- package/dist/api/schemas/index.d.mts +2 -2
- package/dist/api/schemas/index.mjs +3 -3
- package/dist/{api-BNKqxyFX.mjs → api-Dmz40c2V.mjs} +44 -22
- package/dist/api-Dmz40c2V.mjs.map +1 -0
- package/dist/{api-tokens-ucpcNXDt.mjs → api-tokens-VrXNiNvV.mjs} +2 -2
- package/dist/{api-tokens-ucpcNXDt.mjs.map → api-tokens-VrXNiNvV.mjs.map} +1 -1
- package/dist/{apply-BOPaD-s9.mjs → apply-CgamLmed.mjs} +93 -31
- package/dist/apply-CgamLmed.mjs.map +1 -0
- package/dist/astro/index.d.mts +10 -10
- package/dist/astro/index.mjs +19 -3
- package/dist/astro/index.mjs.map +1 -1
- package/dist/astro/middleware/auth.d.mts +9 -9
- package/dist/astro/middleware/auth.mjs +6 -6
- package/dist/astro/middleware/redirect.d.mts.map +1 -1
- package/dist/astro/middleware/redirect.mjs +9 -5
- package/dist/astro/middleware/redirect.mjs.map +1 -1
- package/dist/astro/middleware/request-context.mjs +2 -2
- package/dist/astro/middleware/setup.mjs +1 -1
- package/dist/astro/middleware.mjs +66 -65
- 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 +4 -4
- package/dist/astro/routes/api/admin/api-tokens/index.mjs +5 -5
- package/dist/astro/routes/api/admin/byline-fields/_slug_/usage.d.mts +8 -0
- package/dist/astro/routes/api/admin/byline-fields/_slug_/usage.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/byline-fields/_slug_/usage.mjs +23 -0
- package/dist/astro/routes/api/admin/byline-fields/_slug_/usage.mjs.map +1 -0
- package/dist/astro/routes/api/admin/byline-fields/_slug_.d.mts +10 -0
- package/dist/astro/routes/api/admin/byline-fields/_slug_.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/byline-fields/_slug_.mjs +55 -0
- package/dist/astro/routes/api/admin/byline-fields/_slug_.mjs.map +1 -0
- package/dist/astro/routes/api/admin/byline-fields/index.d.mts +9 -0
- package/dist/astro/routes/api/admin/byline-fields/index.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/byline-fields/index.mjs +43 -0
- package/dist/astro/routes/api/admin/byline-fields/index.mjs.map +1 -0
- package/dist/astro/routes/api/admin/byline-fields/reorder.d.mts +8 -0
- package/dist/astro/routes/api/admin/byline-fields/reorder.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/byline-fields/reorder.mjs +27 -0
- package/dist/astro/routes/api/admin/byline-fields/reorder.mjs.map +1 -0
- package/dist/astro/routes/api/admin/bylines/_id_/index.d.mts.map +1 -1
- package/dist/astro/routes/api/admin/bylines/_id_/index.mjs +27 -28
- package/dist/astro/routes/api/admin/bylines/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs +13 -12
- package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs.map +1 -1
- package/dist/astro/routes/api/admin/bylines/index.mjs +15 -13
- package/dist/astro/routes/api/admin/bylines/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/comments/_id_/status.mjs +10 -10
- 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 +4 -4
- package/dist/astro/routes/api/admin/hooks/exclusive/index.mjs +3 -3
- package/dist/astro/routes/api/admin/oauth-clients/_id_.mjs +4 -4
- package/dist/astro/routes/api/admin/oauth-clients/index.mjs +4 -4
- package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs +35 -34
- package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +35 -34
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +34 -33
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +34 -33
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs +34 -33
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/index.mjs +34 -33
- 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 +34 -33
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs +34 -33
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +34 -33
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.mjs +34 -33
- package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/_id_/update.mjs +35 -34
- package/dist/astro/routes/api/admin/plugins/registry/_id_/update.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/artifact.mjs +34 -33
- package/dist/astro/routes/api/admin/plugins/registry/artifact.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/install.mjs +35 -34
- package/dist/astro/routes/api/admin/plugins/registry/install.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/updates.mjs +34 -33
- package/dist/astro/routes/api/admin/plugins/updates.mjs.map +1 -1
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +34 -33
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/thumbnail.mjs +3 -3
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs +34 -33
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/users/_id_/disable.mjs +2 -2
- package/dist/astro/routes/api/admin/users/_id_/enable.mjs +2 -2
- package/dist/astro/routes/api/admin/users/_id_/index.mjs +5 -5
- package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs +3 -3
- package/dist/astro/routes/api/admin/users/index.mjs +5 -5
- package/dist/astro/routes/api/auth/dev-bypass.mjs +5 -5
- package/dist/astro/routes/api/auth/invite/accept.mjs +2 -2
- package/dist/astro/routes/api/auth/invite/complete.mjs +9 -9
- package/dist/astro/routes/api/auth/invite/index.mjs +6 -6
- package/dist/astro/routes/api/auth/invite/register-options.mjs +8 -8
- package/dist/astro/routes/api/auth/logout.mjs +3 -3
- package/dist/astro/routes/api/auth/magic-link/send.mjs +8 -8
- package/dist/astro/routes/api/auth/magic-link/verify.mjs +3 -3
- package/dist/astro/routes/api/auth/me.d.mts.map +1 -1
- package/dist/astro/routes/api/auth/me.mjs +18 -11
- package/dist/astro/routes/api/auth/me.mjs.map +1 -1
- package/dist/astro/routes/api/auth/mode.mjs +1 -1
- package/dist/astro/routes/api/auth/oauth/_provider_/callback.mjs +3 -3
- package/dist/astro/routes/api/auth/oauth/_provider_.mjs +2 -2
- package/dist/astro/routes/api/auth/passkey/_id_.mjs +5 -5
- package/dist/astro/routes/api/auth/passkey/index.mjs +2 -2
- package/dist/astro/routes/api/auth/passkey/options.mjs +10 -10
- package/dist/astro/routes/api/auth/passkey/register/options.mjs +8 -8
- package/dist/astro/routes/api/auth/passkey/register/verify.mjs +9 -9
- package/dist/astro/routes/api/auth/passkey/verify.mjs +9 -9
- package/dist/astro/routes/api/auth/signup/complete.mjs +9 -9
- 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 +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 +9 -9
- package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs +6 -6
- 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 +6 -6
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.d.mts.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs +18 -13
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs.map +1 -1
- 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_.d.mts.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_.mjs +9 -7
- package/dist/astro/routes/api/content/_collection_/_id_.mjs.map +1 -1
- 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 +3 -3
- package/dist/astro/routes/api/import/probe.d.mts +3 -3
- package/dist/astro/routes/api/import/probe.mjs +10 -10
- package/dist/astro/routes/api/import/wordpress/analyze.mjs +4 -4
- package/dist/astro/routes/api/import/wordpress/execute.d.mts +9 -9
- package/dist/astro/routes/api/import/wordpress/execute.mjs +11 -10
- package/dist/astro/routes/api/import/wordpress/execute.mjs.map +1 -1
- package/dist/astro/routes/api/import/wordpress/media.mjs +8 -8
- 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.d.mts +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs +10 -10
- package/dist/astro/routes/api/import/wordpress-plugin/execute.d.mts +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs +13 -11
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs.map +1 -1
- package/dist/astro/routes/api/manifest.mjs +4 -4
- package/dist/astro/routes/api/mcp.mjs +34 -30
- package/dist/astro/routes/api/mcp.mjs.map +1 -1
- 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 +8 -8
- package/dist/astro/routes/api/media.d.mts.map +1 -1
- package/dist/astro/routes/api/media.mjs +13 -12
- package/dist/astro/routes/api/media.mjs.map +1 -1
- 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 +6 -6
- package/dist/astro/routes/api/oauth/device/authorize.mjs +6 -6
- package/dist/astro/routes/api/oauth/device/code.mjs +9 -9
- package/dist/astro/routes/api/oauth/device/token.mjs +8 -8
- package/dist/astro/routes/api/oauth/register.mjs +3 -3
- package/dist/astro/routes/api/oauth/token/refresh.mjs +6 -6
- package/dist/astro/routes/api/oauth/token/revoke.mjs +6 -6
- package/dist/astro/routes/api/oauth/token.mjs +6 -6
- package/dist/astro/routes/api/openapi.json.mjs +10 -7
- package/dist/astro/routes/api/openapi.json.mjs.map +1 -1
- package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs +4 -4
- package/dist/astro/routes/api/redirects/404s/index.mjs +8 -8
- package/dist/astro/routes/api/redirects/404s/summary.mjs +8 -8
- package/dist/astro/routes/api/redirects/_id_.mjs +9 -9
- package/dist/astro/routes/api/redirects/index.mjs +9 -9
- 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 +34 -33
- package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs +34 -33
- package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs +34 -33
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +34 -33
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/index.mjs +34 -33
- package/dist/astro/routes/api/schema/collections/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/index.mjs +6 -6
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs +34 -33
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs.map +1 -1
- package/dist/astro/routes/api/schema/orphans/index.mjs +34 -33
- package/dist/astro/routes/api/schema/orphans/index.mjs.map +1 -1
- 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 +4 -4
- package/dist/astro/routes/api/settings.mjs +11 -11
- package/dist/astro/routes/api/setup/admin-verify.mjs +10 -10
- package/dist/astro/routes/api/setup/admin.mjs +9 -9
- package/dist/astro/routes/api/setup/dev-bypass.mjs +24 -23
- 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 +24 -23
- package/dist/astro/routes/api/setup/index.mjs.map +1 -1
- package/dist/astro/routes/api/setup/status.mjs +4 -4
- package/dist/astro/routes/api/snapshot.mjs +5 -5
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs +12 -12
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs +12 -12
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs +12 -12
- package/dist/astro/routes/api/taxonomies/index.mjs +12 -12
- 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/well-known/oauth-authorization-server.mjs +2 -2
- package/dist/astro/routes/api/well-known/oauth-protected-resource.mjs +2 -2
- package/dist/astro/routes/api/widget-areas/_name_/reorder.mjs +6 -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 +3 -3
- package/dist/astro/routes/robots.txt.mjs +6 -6
- package/dist/astro/routes/sitemap-_collection_.xml.mjs +8 -8
- package/dist/astro/routes/sitemap.xml.mjs +7 -7
- package/dist/astro/types.d.mts +13 -12
- 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-Bn4S4DUT.mjs → authorize-_wWM_44T.mjs} +2 -2
- package/dist/{authorize-Bn4S4DUT.mjs.map → authorize-_wWM_44T.mjs.map} +1 -1
- package/dist/byline-BrIVWLm-.mjs +925 -0
- package/dist/byline-BrIVWLm-.mjs.map +1 -0
- package/dist/{bylines-DWLnr6-k.d.mts → byline-fields-BNy7Ng1U.d.mts} +151 -23
- package/dist/byline-fields-BNy7Ng1U.d.mts.map +1 -0
- package/dist/byline-fields-DC3Wkk-U.mjs +123 -0
- package/dist/byline-fields-DC3Wkk-U.mjs.map +1 -0
- package/dist/byline-fields-Dr-xcb6S.mjs +238 -0
- package/dist/byline-fields-Dr-xcb6S.mjs.map +1 -0
- package/dist/byline-registry-CxK5g559.mjs +406 -0
- package/dist/byline-registry-CxK5g559.mjs.map +1 -0
- package/dist/{bylines-n6nykUyI.mjs → bylines-C_POWmGT.mjs} +25 -11
- package/dist/{bylines-n6nykUyI.mjs.map → bylines-C_POWmGT.mjs.map} +1 -1
- package/dist/bylines-sqExMElV.mjs +204 -0
- package/dist/bylines-sqExMElV.mjs.map +1 -0
- package/dist/{cache-BcI1yUjR.mjs → cache-wsDkA8ru.mjs} +2 -2
- package/dist/{cache-BcI1yUjR.mjs.map → cache-wsDkA8ru.mjs.map} +1 -1
- package/dist/{challenge-store-Dng1SxKT.mjs → challenge-store-DGwuCc4R.mjs} +1 -1
- package/dist/{challenge-store-Dng1SxKT.mjs.map → challenge-store-DGwuCc4R.mjs.map} +1 -1
- package/dist/{chunks-cYG4SnIP.mjs → chunks-BAYkM-CF.mjs} +2 -2
- package/dist/{chunks-cYG4SnIP.mjs.map → chunks-BAYkM-CF.mjs.map} +1 -1
- package/dist/cli/index.mjs +29 -23
- package/dist/cli/index.mjs.map +1 -1
- package/dist/client/cf-access.d.mts +1 -1
- package/dist/client/index.d.mts +2 -1
- package/dist/client/index.d.mts.map +1 -1
- package/dist/client/index.mjs +4 -2
- package/dist/client/index.mjs.map +1 -1
- package/dist/{comment-C76G-9tz.mjs → comment-Cd29aktf.mjs} +2 -2
- package/dist/{comment-C76G-9tz.mjs.map → comment-Cd29aktf.mjs.map} +1 -1
- package/dist/{comments-CCxFFGY1.mjs → comments-B7ufhkxN.mjs} +3 -3
- package/dist/{comments-CCxFFGY1.mjs.map → comments-B7ufhkxN.mjs.map} +1 -1
- package/dist/{components-Dx3DM0gg.mjs → components-CTfpu3PZ.mjs} +1 -1
- package/dist/{components-Dx3DM0gg.mjs.map → components-CTfpu3PZ.mjs.map} +1 -1
- package/dist/{content-8voQNTXX.mjs → content-BbqKo3Kc.mjs} +22 -3
- package/dist/content-BbqKo3Kc.mjs.map +1 -0
- package/dist/{context-B7qiYrz2.mjs → context-BsF1rhoI.mjs} +9 -9
- package/dist/{context-B7qiYrz2.mjs.map → context-BsF1rhoI.mjs.map} +1 -1
- package/dist/{cron-Bd3b3iuj.mjs → cron-DZovZUnC.mjs} +1 -1
- package/dist/{cron-Bd3b3iuj.mjs.map → cron-DZovZUnC.mjs.map} +1 -1
- package/dist/{dashboard-BeaFSPpx.mjs → dashboard-BwIX9r-X.mjs} +4 -4
- package/dist/{dashboard-BeaFSPpx.mjs.map → dashboard-BwIX9r-X.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/{db-errors-BiYqoX-n.mjs → db-errors-CtzxKBxe.mjs} +1 -1
- package/dist/{db-errors-BiYqoX-n.mjs.map → db-errors-CtzxKBxe.mjs.map} +1 -1
- package/dist/{default-BvTAYCzx.mjs → default-xLFNSsZ9.mjs} +1 -1
- package/dist/{default-BvTAYCzx.mjs.map → default-xLFNSsZ9.mjs.map} +1 -1
- package/dist/{device-flow-B9oG8PwP.mjs → device-flow-ptLrVINd.mjs} +4 -4
- package/dist/{device-flow-B9oG8PwP.mjs.map → device-flow-ptLrVINd.mjs.map} +1 -1
- package/dist/{email-console-CubRll9q.mjs → email-console-DHT2Fbpj.mjs} +1 -1
- package/dist/{email-console-CubRll9q.mjs.map → email-console-DHT2Fbpj.mjs.map} +1 -1
- package/dist/{error-ChfADBuu.mjs → error-npZWBSb7.mjs} +7 -3
- package/dist/error-npZWBSb7.mjs.map +1 -0
- package/dist/{escape-Cg6kMELH.mjs → escape-bIyGoW5W.mjs} +1 -1
- package/dist/{escape-Cg6kMELH.mjs.map → escape-bIyGoW5W.mjs.map} +1 -1
- package/dist/{fts-manager-C_b-4x8u.mjs → fts-manager-DmUAk-kQ.mjs} +2 -2
- package/dist/{fts-manager-C_b-4x8u.mjs.map → fts-manager-DmUAk-kQ.mjs.map} +1 -1
- package/dist/{hash-DlUxGhQS.mjs → hash-9w3pd3-m.mjs} +1 -1
- package/dist/{hash-DlUxGhQS.mjs.map → hash-9w3pd3-m.mjs.map} +1 -1
- package/dist/{import-DG80rC_I.mjs → import-Dh8bWmyq.mjs} +3 -3
- package/dist/{import-DG80rC_I.mjs.map → import-Dh8bWmyq.mjs.map} +1 -1
- package/dist/{index-D_p_jIP1.d.mts → index-CjKdMZ3U.d.mts} +38 -16
- package/dist/index-CjKdMZ3U.d.mts.map +1 -0
- package/dist/{index-CC42STEm.d.mts → index-D60_SzHG.d.mts} +3 -3
- package/dist/{index-CC42STEm.d.mts.map → index-D60_SzHG.d.mts.map} +1 -1
- package/dist/index.d.mts +17 -17
- package/dist/index.mjs +55 -54
- package/dist/{load-CLFRjk9r.mjs → load-DsoLq7ex.mjs} +2 -2
- package/dist/{load-CLFRjk9r.mjs.map → load-DsoLq7ex.mjs.map} +1 -1
- package/dist/{loader-D-vIJjfY.mjs → loader-CJ6lWO0d.mjs} +75 -19
- package/dist/loader-CJ6lWO0d.mjs.map +1 -0
- package/dist/{manifest-schema-Czqf0TLu.mjs → manifest-schema-Cj-YrzrF.mjs} +1 -1
- package/dist/{manifest-schema-Czqf0TLu.mjs.map → manifest-schema-Cj-YrzrF.mjs.map} +1 -1
- package/dist/media/index.d.mts +1 -1
- package/dist/media/index.mjs +2 -2
- package/dist/media/local-runtime.d.mts +11 -11
- package/dist/media/local-runtime.mjs +5 -5
- package/dist/{media-allowlist-BNloC69x.mjs → media-allowlist-CMcoYIjQ.mjs} +2 -2
- package/dist/{media-allowlist-BNloC69x.mjs.map → media-allowlist-CMcoYIjQ.mjs.map} +1 -1
- package/dist/{media-CKQd8AYU.mjs → media-jk_HzzOl.mjs} +7 -2
- package/dist/media-jk_HzzOl.mjs.map +1 -0
- package/dist/{menus-arUNspyU.mjs → menus-B-5-3aon.mjs} +2 -2
- package/dist/{menus-arUNspyU.mjs.map → menus-B-5-3aon.mjs.map} +1 -1
- package/dist/{menus-C-nWT5Tu.mjs → menus-CyMO6GBx.mjs} +27 -11
- package/dist/menus-CyMO6GBx.mjs.map +1 -0
- package/dist/{mime-KV5TqkMN.mjs → mime-CCEzze7W.mjs} +1 -1
- package/dist/{mime-KV5TqkMN.mjs.map → mime-CCEzze7W.mjs.map} +1 -1
- package/dist/{mode-CaaiebZI.mjs → mode-BjlXswIw.mjs} +1 -1
- package/dist/{mode-CaaiebZI.mjs.map → mode-BjlXswIw.mjs.map} +1 -1
- package/dist/{normalize-CN5kRSMC.mjs → normalize-DVV8nbrL.mjs} +1 -1
- package/dist/{normalize-CN5kRSMC.mjs.map → normalize-DVV8nbrL.mjs.map} +1 -1
- package/dist/{oauth-authorization-CTMeVfvj.mjs → oauth-authorization-DvBAL75d.mjs} +4 -4
- package/dist/{oauth-authorization-CTMeVfvj.mjs.map → oauth-authorization-DvBAL75d.mjs.map} +1 -1
- package/dist/{oauth-clients-eJCbkVSG.mjs → oauth-clients-8mPDStMv.mjs} +1 -1
- package/dist/{oauth-clients-eJCbkVSG.mjs.map → oauth-clients-8mPDStMv.mjs.map} +1 -1
- package/dist/{oauth-state-store-vOSdOeGe.mjs → oauth-state-store-BJ7YtrfD.mjs} +1 -1
- package/dist/{oauth-state-store-vOSdOeGe.mjs.map → oauth-state-store-BJ7YtrfD.mjs.map} +1 -1
- package/dist/{oauth-user-lookup-3JwsVw6N.mjs → oauth-user-lookup-BdDSDvjF.mjs} +1 -1
- package/dist/{oauth-user-lookup-3JwsVw6N.mjs.map → oauth-user-lookup-BdDSDvjF.mjs.map} +1 -1
- package/dist/{options-DhV-gwJb.d.mts → options-tb7DJROi.d.mts} +3 -3
- package/dist/{options-DhV-gwJb.d.mts.map → options-tb7DJROi.d.mts.map} +1 -1
- package/dist/page/index.d.mts +2 -2
- package/dist/{parse-DHbXfvxO.mjs → parse-4zO5Y2DL.mjs} +2 -2
- package/dist/{parse-DHbXfvxO.mjs.map → parse-4zO5Y2DL.mjs.map} +1 -1
- package/dist/{passkey-config-BloQOT3y.mjs → passkey-config-BDVM86Tj.mjs} +1 -1
- package/dist/{passkey-config-BloQOT3y.mjs.map → passkey-config-BDVM86Tj.mjs.map} +1 -1
- package/dist/{placeholder-KCkkCtgQ.d.mts → placeholder-B9lUUEmj.d.mts} +1 -1
- package/dist/{placeholder-KCkkCtgQ.d.mts.map → placeholder-B9lUUEmj.d.mts.map} +1 -1
- package/dist/{placeholder-LqmHqvBw.mjs → placeholder-BZxr8W1j.mjs} +1 -1
- package/dist/{placeholder-LqmHqvBw.mjs.map → placeholder-BZxr8W1j.mjs.map} +1 -1
- package/dist/plugin-types.d.mts +1 -1
- package/dist/plugin-utils.d.mts +9 -9
- package/dist/plugins/adapt-sandbox-entry.d.mts +9 -9
- package/dist/plugins/adapt-sandbox-entry.mjs +2 -2
- package/dist/{preview-D4z0WONU.mjs → preview-BfuRkVKW.mjs} +2 -2
- package/dist/{preview-D4z0WONU.mjs.map → preview-BfuRkVKW.mjs.map} +1 -1
- package/dist/{public-url-CUWWFME2.mjs → public-url-egRHCy1m.mjs} +1 -1
- package/dist/{public-url-CUWWFME2.mjs.map → public-url-egRHCy1m.mjs.map} +1 -1
- package/dist/{query-7m6-l0f_.mjs → query-CuvjwhrE.mjs} +12 -12
- package/dist/{query-7m6-l0f_.mjs.map → query-CuvjwhrE.mjs.map} +1 -1
- package/dist/{rate-limit-D8RAXN8b.mjs → rate-limit-D6VQqBk_.mjs} +2 -2
- package/dist/{rate-limit-D8RAXN8b.mjs.map → rate-limit-D6VQqBk_.mjs.map} +1 -1
- package/dist/{redirect-CjfDGrTd.mjs → redirect-BZUJltlj.mjs} +2 -2
- package/dist/{redirect-CjfDGrTd.mjs.map → redirect-BZUJltlj.mjs.map} +1 -1
- package/dist/{redirect-BINiRYq4.mjs → redirect-Cw3JTlmj.mjs} +1 -1
- package/dist/{redirect-BINiRYq4.mjs.map → redirect-Cw3JTlmj.mjs.map} +1 -1
- package/dist/{redirects-COMLwsV5.mjs → redirects-C0L9JUk4.mjs} +19 -6
- package/dist/redirects-C0L9JUk4.mjs.map +1 -0
- package/dist/{redirects-CowoEHdE.mjs → redirects-DnYuqsEf.mjs} +3 -3
- package/dist/{redirects-CowoEHdE.mjs.map → redirects-DnYuqsEf.mjs.map} +1 -1
- package/dist/{registry-Cyp-dx6J.mjs → registry-Dn6gsx3L.mjs} +13 -5
- package/dist/{registry-Cyp-dx6J.mjs.map → registry-Dn6gsx3L.mjs.map} +1 -1
- package/dist/{request-cache-dzCt8TZB.mjs → request-cache-BYMs-BGX.mjs} +23 -2
- package/dist/{request-cache-dzCt8TZB.mjs.map → request-cache-BYMs-BGX.mjs.map} +1 -1
- package/dist/{request-meta-C_Cjii-T.mjs → request-meta-7ByVLxB-.mjs} +2 -2
- package/dist/{request-meta-C_Cjii-T.mjs.map → request-meta-7ByVLxB-.mjs.map} +1 -1
- package/dist/{resolve-D6sM-SgF.mjs → resolve-BqYMVG0D.mjs} +1 -1
- package/dist/{resolve-D6sM-SgF.mjs.map → resolve-BqYMVG0D.mjs.map} +1 -1
- package/dist/{runner-DSQBurMS.d.mts → runner-DM1yR5qd.d.mts} +2 -2
- package/dist/{runner-DSQBurMS.d.mts.map → runner-DM1yR5qd.d.mts.map} +1 -1
- package/dist/{runner-Drnvs96u.mjs → runner-eAgyIkeg.mjs} +284 -158
- package/dist/runner-eAgyIkeg.mjs.map +1 -0
- package/dist/runtime.d.mts +10 -10
- package/dist/runtime.mjs +2 -2
- package/dist/{schema-CI9mYPX3.mjs → schema--mYZX4D7.mjs} +5 -5
- package/dist/{schema-CI9mYPX3.mjs.map → schema--mYZX4D7.mjs.map} +1 -1
- package/dist/{search-DKz_mGBP.mjs → search-C6U_NvZI.mjs} +4 -4
- package/dist/{search-DKz_mGBP.mjs.map → search-C6U_NvZI.mjs.map} +1 -1
- package/dist/{secrets-rPdhEBkD.mjs → secrets-YYbTgB1w.mjs} +1 -1
- package/dist/{secrets-rPdhEBkD.mjs.map → secrets-YYbTgB1w.mjs.map} +1 -1
- package/dist/{sections-DBbCDIAT.mjs → sections-Ba-rJLKb.mjs} +3 -3
- package/dist/{sections-DBbCDIAT.mjs.map → sections-Ba-rJLKb.mjs.map} +1 -1
- package/dist/seed/index.d.mts +2 -2
- package/dist/seed/index.mjs +18 -17
- package/dist/seo/index.d.mts +1 -1
- package/dist/{seo-BGCyDlkb.mjs → seo-BTzb5ksq.mjs} +2 -2
- package/dist/{seo-BGCyDlkb.mjs.map → seo-BTzb5ksq.mjs.map} +1 -1
- package/dist/{seo-Dq707mNQ.mjs → seo-DfjLvu8i.mjs} +1 -1
- package/dist/{seo-Dq707mNQ.mjs.map → seo-DfjLvu8i.mjs.map} +1 -1
- package/dist/{service-B0H7U1Y9.mjs → service-Cn-kIfZn.mjs} +3 -3
- package/dist/{service-B0H7U1Y9.mjs.map → service-Cn-kIfZn.mjs.map} +1 -1
- package/dist/{settings-DfwNyQkf.mjs → settings-C65OSm41.mjs} +3 -3
- package/dist/{settings-DfwNyQkf.mjs.map → settings-C65OSm41.mjs.map} +1 -1
- package/dist/{settings-BSXRtTzk.mjs → settings-ChlQbwU0.mjs} +4 -4
- package/dist/{settings-BSXRtTzk.mjs.map → settings-ChlQbwU0.mjs.map} +1 -1
- package/dist/{setup-complete-MzzN9u0b.mjs → setup-complete-VoEZfasi.mjs} +1 -1
- package/dist/{setup-complete-MzzN9u0b.mjs.map → setup-complete-VoEZfasi.mjs.map} +1 -1
- package/dist/{setup-nonce-DXuriHsg.mjs → setup-nonce-Bm0uKqmf.mjs} +1 -1
- package/dist/{setup-nonce-DXuriHsg.mjs.map → setup-nonce-Bm0uKqmf.mjs.map} +1 -1
- package/dist/{site-url-xkhw1tcz.mjs → site-url-Cm8-sJy7.mjs} +1 -1
- package/dist/{site-url-xkhw1tcz.mjs.map → site-url-Cm8-sJy7.mjs.map} +1 -1
- package/dist/{ssrf-MZ-zrG6-.mjs → ssrf-BsVGIE0Z.mjs} +1 -1
- package/dist/{ssrf-MZ-zrG6-.mjs.map → ssrf-BsVGIE0Z.mjs.map} +1 -1
- package/dist/storage/local.d.mts +1 -1
- package/dist/storage/local.mjs +1 -1
- package/dist/storage/s3.d.mts +1 -1
- package/dist/storage/s3.mjs +1 -1
- package/dist/{taxonomies-CcvrMLbR.mjs → taxonomies-CgpzAU6F.mjs} +8 -8
- package/dist/{taxonomies-CcvrMLbR.mjs.map → taxonomies-CgpzAU6F.mjs.map} +1 -1
- package/dist/{taxonomies-4vx0nmMr.mjs → taxonomies-D72gTOg_.mjs} +4 -4
- package/dist/{taxonomies-4vx0nmMr.mjs.map → taxonomies-D72gTOg_.mjs.map} +1 -1
- package/dist/{taxonomy-zqGQUqgu.mjs → taxonomy-BBK-UAEo.mjs} +3 -3
- package/dist/{taxonomy-zqGQUqgu.mjs.map → taxonomy-BBK-UAEo.mjs.map} +1 -1
- package/dist/{tokens-N8otWMmj.mjs → tokens-Bx2afeT-.mjs} +1 -1
- package/dist/{tokens-N8otWMmj.mjs.map → tokens-Bx2afeT-.mjs.map} +1 -1
- package/dist/{transport-B6CHddbu.mjs → transport--Ck3RBin.mjs} +1 -1
- package/dist/{transport-B6CHddbu.mjs.map → transport--Ck3RBin.mjs.map} +1 -1
- package/dist/{transport-C2MGqtL6.d.mts → transport-OnMNbsIA.d.mts} +1 -1
- package/dist/{transport-C2MGqtL6.d.mts.map → transport-OnMNbsIA.d.mts.map} +1 -1
- package/dist/{trusted-proxy-97pajC2f.mjs → trusted-proxy-B4AfnoAp.mjs} +1 -1
- package/dist/{trusted-proxy-97pajC2f.mjs.map → trusted-proxy-B4AfnoAp.mjs.map} +1 -1
- package/dist/types-D8bhH891.mjs +125 -0
- package/dist/{types-DSZl1Dsv.mjs.map → types-D8bhH891.mjs.map} +1 -1
- package/dist/{types-DGHWRQgr.d.mts → types-DMwSpvcw.d.mts} +2 -2
- package/dist/{types-DGHWRQgr.d.mts.map → types-DMwSpvcw.d.mts.map} +1 -1
- package/dist/{types-bYmRn_Uy.d.mts → types-DWnN7weG.d.mts} +1 -1
- package/dist/{types-bYmRn_Uy.d.mts.map → types-DWnN7weG.d.mts.map} +1 -1
- package/dist/{types-Dgo6y-Ut.d.mts → types-DX6v9KzJ.d.mts} +1 -1
- package/dist/{types-Dgo6y-Ut.d.mts.map → types-DX6v9KzJ.d.mts.map} +1 -1
- package/dist/{types-DaqNzqVt.d.mts → types-DawhLFwy.d.mts} +35 -1
- package/dist/{types-DaqNzqVt.d.mts.map → types-DawhLFwy.d.mts.map} +1 -1
- package/dist/{types-CpUuGcd5.d.mts → types-DbCWhHet.d.mts} +8 -2
- package/dist/{types-CpUuGcd5.d.mts.map → types-DbCWhHet.d.mts.map} +1 -1
- package/dist/{types-Cd9UCu3t.mjs → types-DpFmlNyB.mjs} +1 -1
- package/dist/{types-Cd9UCu3t.mjs.map → types-DpFmlNyB.mjs.map} +1 -1
- package/dist/{types-D599-ruj.d.mts → types-Qa7-HJJC.d.mts} +1 -1
- package/dist/{types-D599-ruj.d.mts.map → types-Qa7-HJJC.d.mts.map} +1 -1
- package/dist/{types-B0bmgwMG.mjs → types-SF1DwGf2.mjs} +2 -2
- package/dist/types-SF1DwGf2.mjs.map +1 -0
- package/dist/{types-DaYDYW6g.d.mts → types-i8_uzhMD.d.mts} +40 -2
- package/dist/types-i8_uzhMD.d.mts.map +1 -0
- package/dist/{types-CkDSF81F.d.mts → types-kwqCOUxj.d.mts} +1 -1
- package/dist/{types-CkDSF81F.d.mts.map → types-kwqCOUxj.d.mts.map} +1 -1
- package/dist/{user-hUSOaIJy.mjs → user-X4rtyO4Y.mjs} +2 -2
- package/dist/{user-hUSOaIJy.mjs.map → user-X4rtyO4Y.mjs.map} +1 -1
- package/dist/{utils-C3wTAP-P.mjs → utils-C4Ih4DML.mjs} +1 -1
- package/dist/{utils-C3wTAP-P.mjs.map → utils-C4Ih4DML.mjs.map} +1 -1
- package/dist/{validate-IGltez8n.mjs → validate-DactmcJG.mjs} +23 -3
- package/dist/validate-DactmcJG.mjs.map +1 -0
- package/dist/{validate-DQtHw9NT.d.mts → validate-Dy6nkNls.d.mts} +25 -5
- package/dist/{validate-DQtHw9NT.d.mts.map → validate-Dy6nkNls.d.mts.map} +1 -1
- package/dist/{validation-Bmymau7y.mjs → validation-BYA4i85b.mjs} +6 -6
- package/dist/{validation-Bmymau7y.mjs.map → validation-BYA4i85b.mjs.map} +1 -1
- package/dist/version-FGcv0ooe.mjs +7 -0
- package/dist/{version-ITD3PlQd.mjs.map → version-FGcv0ooe.mjs.map} +1 -1
- package/dist/{widgets-yHQa4c6c.mjs → widgets-DG-1jxnz.mjs} +3 -3
- package/dist/{widgets-yHQa4c6c.mjs.map → widgets-DG-1jxnz.mjs.map} +1 -1
- package/dist/{zod-generator-B80aap1J.mjs → zod-generator-BNAObjSt.mjs} +3 -3
- package/dist/{zod-generator-B80aap1J.mjs.map → zod-generator-BNAObjSt.mjs.map} +1 -1
- package/package.json +7 -7
- package/src/api/errors.ts +7 -0
- package/src/api/handlers/byline-fields.ts +212 -0
- package/src/api/handlers/bylines.ts +126 -5
- package/src/api/handlers/content.ts +43 -2
- package/src/api/handlers/media.ts +2 -0
- package/src/api/openapi/document.ts +3 -0
- package/src/api/schemas/byline-fields.ts +188 -0
- package/src/api/schemas/bylines.ts +42 -0
- package/src/api/schemas/content.ts +2 -0
- package/src/api/schemas/index.ts +1 -0
- package/src/api/schemas/media.ts +2 -0
- package/src/astro/integration/routes.ts +27 -0
- package/src/astro/middleware/redirect.ts +5 -1
- package/src/astro/routes/api/admin/byline-fields/[slug]/usage.ts +36 -0
- package/src/astro/routes/api/admin/byline-fields/[slug].ts +92 -0
- package/src/astro/routes/api/admin/byline-fields/index.ts +66 -0
- package/src/astro/routes/api/admin/byline-fields/reorder.ts +39 -0
- package/src/astro/routes/api/admin/bylines/[id]/index.ts +23 -21
- package/src/astro/routes/api/admin/bylines/index.ts +1 -0
- package/src/astro/routes/api/auth/me.ts +21 -10
- package/src/astro/routes/api/content/[collection]/[id]/terms/[taxonomy].ts +15 -3
- package/src/astro/routes/api/content/[collection]/[id].ts +3 -1
- package/src/astro/routes/api/media.ts +1 -0
- package/src/astro/types.ts +1 -0
- package/src/bylines/field-defs-cache.ts +138 -0
- package/src/bylines/index.ts +37 -4
- package/src/cli/commands/content.ts +4 -2
- package/src/client/index.ts +4 -1
- package/src/components/InlinePortableTextEditor.tsx +69 -0
- package/src/content/converters/portable-text-to-prosemirror.ts +7 -0
- package/src/content/converters/prosemirror-to-portable-text.ts +16 -0
- package/src/content/converters/types.ts +10 -0
- package/src/database/migrations/041_content_locale_list_index.ts +47 -0
- package/src/database/migrations/042_byline_fields.ts +157 -0
- package/src/database/migrations/runner.ts +4 -0
- package/src/database/repositories/byline.ts +758 -50
- package/src/database/repositories/content.ts +43 -3
- package/src/database/repositories/media.ts +14 -0
- package/src/database/repositories/types.ts +38 -0
- package/src/database/types.ts +44 -0
- package/src/emdash-runtime.ts +4 -1
- package/src/index.ts +1 -0
- package/src/loader.ts +98 -10
- package/src/mcp/server.ts +10 -1
- package/src/request-cache.ts +23 -0
- package/src/schema/byline-registry.ts +671 -0
- package/src/schema/registry.ts +14 -0
- package/src/schema/types.ts +133 -0
- package/src/seed/apply.ts +101 -14
- package/src/seed/types.ts +21 -0
- package/src/seed/validate.ts +39 -0
- package/dist/api-BNKqxyFX.mjs.map +0 -1
- package/dist/apply-BOPaD-s9.mjs.map +0 -1
- package/dist/byline-BDylH_m4.mjs +0 -404
- package/dist/byline-BDylH_m4.mjs.map +0 -1
- package/dist/bylines-B7TFEvFf.mjs +0 -118
- package/dist/bylines-B7TFEvFf.mjs.map +0 -1
- package/dist/bylines-DWLnr6-k.d.mts.map +0 -1
- package/dist/content-8voQNTXX.mjs.map +0 -1
- package/dist/error-ChfADBuu.mjs.map +0 -1
- package/dist/index-D_p_jIP1.d.mts.map +0 -1
- package/dist/loader-D-vIJjfY.mjs.map +0 -1
- package/dist/media-CKQd8AYU.mjs.map +0 -1
- package/dist/menus-C-nWT5Tu.mjs.map +0 -1
- package/dist/redirects-COMLwsV5.mjs.map +0 -1
- package/dist/runner-Drnvs96u.mjs.map +0 -1
- package/dist/setup-Cf_TyOv5.mjs +0 -137
- package/dist/setup-Cf_TyOv5.mjs.map +0 -1
- package/dist/types-B0bmgwMG.mjs.map +0 -1
- package/dist/types-DSZl1Dsv.mjs +0 -83
- package/dist/types-DaYDYW6g.d.mts.map +0 -1
- package/dist/validate-IGltez8n.mjs.map +0 -1
- package/dist/version-ITD3PlQd.mjs +0 -7
- /package/dist/{api-tokens-iPIHAY8N.mjs → api-tokens-B6VgoE6M.mjs} +0 -0
- /package/dist/{ssrf-BIcd-aXW.mjs → ssrf-BvgVcfNQ.mjs} +0 -0
- /package/dist/{types-1NNkmTIn.mjs → types-Cj2S6FuC.mjs} +0 -0
|
@@ -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 { S as allowedDomainUpdateBody } from "../../../../../redirects-
|
|
6
|
-
import "../../../../../
|
|
2
|
+
import "../../../../../types-SF1DwGf2.mjs";
|
|
3
|
+
import { n as apiSuccess, r as handleError, t as apiError } from "../../../../../error-npZWBSb7.mjs";
|
|
4
|
+
import { n as parseBody, t as isParseError } from "../../../../../parse-4zO5Y2DL.mjs";
|
|
5
|
+
import { S as allowedDomainUpdateBody } from "../../../../../redirects-C0L9JUk4.mjs";
|
|
6
|
+
import "../../../../../byline-fields-Dr-xcb6S.mjs";
|
|
7
7
|
import "../../../../../api/schemas/index.mjs";
|
|
8
8
|
import { createKyselyAdapter } from "@emdash-cms/auth/adapters/kysely";
|
|
9
9
|
import { Role, roleFromLevel } 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 { x as allowedDomainCreateBody } from "../../../../../redirects-
|
|
6
|
-
import "../../../../../
|
|
2
|
+
import "../../../../../types-SF1DwGf2.mjs";
|
|
3
|
+
import { n as apiSuccess, r as handleError, t as apiError } from "../../../../../error-npZWBSb7.mjs";
|
|
4
|
+
import { n as parseBody, t as isParseError } from "../../../../../parse-4zO5Y2DL.mjs";
|
|
5
|
+
import { x as allowedDomainCreateBody } from "../../../../../redirects-C0L9JUk4.mjs";
|
|
6
|
+
import "../../../../../byline-fields-Dr-xcb6S.mjs";
|
|
7
7
|
import "../../../../../api/schemas/index.mjs";
|
|
8
8
|
import { createKyselyAdapter } from "@emdash-cms/auth/adapters/kysely";
|
|
9
9
|
import { Role, roleFromLevel } from "@emdash-cms/auth";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "../../../../../base64-CqR-7kqF.mjs";
|
|
2
|
-
import "../../../../../types-
|
|
3
|
-
import { a as unwrapResult, r as handleError, t as apiError } from "../../../../../error-
|
|
4
|
-
import "../../../../../api-tokens-
|
|
5
|
-
import { r as handleApiTokenRevoke } from "../../../../../api-tokens-
|
|
2
|
+
import "../../../../../types-SF1DwGf2.mjs";
|
|
3
|
+
import { a as unwrapResult, r as handleError, t as apiError } from "../../../../../error-npZWBSb7.mjs";
|
|
4
|
+
import "../../../../../api-tokens-B6VgoE6M.mjs";
|
|
5
|
+
import { r as handleApiTokenRevoke } from "../../../../../api-tokens-VrXNiNvV.mjs";
|
|
6
6
|
import { Role } from "@emdash-cms/auth";
|
|
7
7
|
|
|
8
8
|
//#region src/astro/routes/api/admin/api-tokens/[id].ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "../../../../../base64-CqR-7kqF.mjs";
|
|
2
|
-
import "../../../../../types-
|
|
3
|
-
import { a as unwrapResult, r as handleError, t as apiError } from "../../../../../error-
|
|
4
|
-
import { n as parseBody, t as isParseError } from "../../../../../parse-
|
|
5
|
-
import { n as VALID_SCOPES } from "../../../../../api-tokens-
|
|
6
|
-
import { n as handleApiTokenList, t as handleApiTokenCreate } from "../../../../../api-tokens-
|
|
2
|
+
import "../../../../../types-SF1DwGf2.mjs";
|
|
3
|
+
import { a as unwrapResult, r as handleError, t as apiError } from "../../../../../error-npZWBSb7.mjs";
|
|
4
|
+
import { n as parseBody, t as isParseError } from "../../../../../parse-4zO5Y2DL.mjs";
|
|
5
|
+
import { n as VALID_SCOPES } from "../../../../../api-tokens-B6VgoE6M.mjs";
|
|
6
|
+
import { n as handleApiTokenList, t as handleApiTokenCreate } from "../../../../../api-tokens-VrXNiNvV.mjs";
|
|
7
7
|
import { z } from "zod";
|
|
8
8
|
import { Role } from "@emdash-cms/auth";
|
|
9
9
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usage.d.mts","names":[],"sources":["../../../../../../../src/astro/routes/api/admin/byline-fields/[slug]/usage.ts"],"mappings":";;;cAkBa,SAAA;AAAA,cAIA,GAAA,EAAK,QAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import "../../../../../../base64-CqR-7kqF.mjs";
|
|
2
|
+
import "../../../../../../types-SF1DwGf2.mjs";
|
|
3
|
+
import "../../../../../../byline-registry-CxK5g559.mjs";
|
|
4
|
+
import { a as unwrapResult, i as requireDb, t as apiError } from "../../../../../../error-npZWBSb7.mjs";
|
|
5
|
+
import { n as requirePerm } from "../../../../../../authorize-_wWM_44T.mjs";
|
|
6
|
+
import { s as handleBylineFieldUsage } from "../../../../../../byline-fields-DC3Wkk-U.mjs";
|
|
7
|
+
|
|
8
|
+
//#region src/astro/routes/api/admin/byline-fields/[slug]/usage.ts
|
|
9
|
+
const prerender = false;
|
|
10
|
+
const GET = async ({ params, locals }) => {
|
|
11
|
+
const { emdash, user } = locals;
|
|
12
|
+
const denied = requirePerm(user, "schema:read");
|
|
13
|
+
if (denied) return denied;
|
|
14
|
+
const dbErr = requireDb(emdash?.db);
|
|
15
|
+
if (dbErr) return dbErr;
|
|
16
|
+
const slug = params.slug;
|
|
17
|
+
if (!slug) return apiError("MISSING_PARAM", "Field slug is required", 400);
|
|
18
|
+
return unwrapResult(await handleBylineFieldUsage(emdash.db, slug));
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
//#endregion
|
|
22
|
+
export { GET, prerender };
|
|
23
|
+
//# sourceMappingURL=usage.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usage.mjs","names":[],"sources":["../../../../../../../src/astro/routes/api/admin/byline-fields/[slug]/usage.ts"],"sourcesContent":["/**\n * Byline field usage counts.\n *\n * GET /_emdash/api/admin/byline-fields/{slug}/usage\n *\n * Returns `{ translatableValueCount, groupValueCount, totalAffectedRows }`.\n * Backs the destructive-delete confirm dialog in the admin UI (Phase 5).\n * Thin wrapper around `handleBylineFieldUsage`.\n *\n * Phase 4 of Discussion #1174.\n */\n\nimport type { APIRoute } from \"astro\";\n\nimport { requirePerm } from \"#api/authorize.js\";\nimport { apiError, requireDb, unwrapResult } from \"#api/error.js\";\nimport { handleBylineFieldUsage } from \"#api/handlers/byline-fields.js\";\n\nexport const prerender = false;\n\n// GET requires `schema:read` (Editor+); see byline-fields/index.ts GET\n// for rationale on the read/manage split.\nexport const GET: APIRoute = async ({ params, locals }) => {\n\tconst { emdash, user } = locals;\n\tconst denied = requirePerm(user, \"schema:read\");\n\tif (denied) return denied;\n\n\tconst dbErr = requireDb(emdash?.db);\n\tif (dbErr) return dbErr;\n\n\tconst slug = params.slug;\n\tif (!slug) return apiError(\"MISSING_PARAM\", \"Field slug is required\", 400);\n\n\tconst result = await handleBylineFieldUsage(emdash.db, slug);\n\treturn unwrapResult(result);\n};\n"],"mappings":";;;;;;;;AAkBA,MAAa,YAAY;AAIzB,MAAa,MAAgB,OAAO,EAAE,QAAQ,aAAa;CAC1D,MAAM,EAAE,QAAQ,SAAS;CACzB,MAAM,SAAS,YAAY,MAAM,cAAc;AAC/C,KAAI,OAAQ,QAAO;CAEnB,MAAM,QAAQ,UAAU,QAAQ,GAAG;AACnC,KAAI,MAAO,QAAO;CAElB,MAAM,OAAO,OAAO;AACpB,KAAI,CAAC,KAAM,QAAO,SAAS,iBAAiB,0BAA0B,IAAI;AAG1E,QAAO,aADQ,MAAM,uBAAuB,OAAO,IAAI,KAAK,CACjC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { APIRoute } from "astro";
|
|
2
|
+
|
|
3
|
+
//#region src/astro/routes/api/admin/byline-fields/[slug].d.ts
|
|
4
|
+
declare const prerender = false;
|
|
5
|
+
declare const GET: APIRoute;
|
|
6
|
+
declare const PATCH: APIRoute;
|
|
7
|
+
declare const DELETE: APIRoute;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { DELETE, GET, PATCH, prerender };
|
|
10
|
+
//# sourceMappingURL=_slug_.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_slug_.d.mts","names":[],"sources":["../../../../../../src/astro/routes/api/admin/byline-fields/[slug].ts"],"mappings":";;;cAgCa,SAAA;AAAA,cAIA,GAAA,EAAK,QAAA;AAAA,cAeL,KAAA,EAAO,QAAA;AAAA,cA2BP,MAAA,EAAQ,QAAA"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import "../../../../../base64-CqR-7kqF.mjs";
|
|
2
|
+
import "../../../../../types-SF1DwGf2.mjs";
|
|
3
|
+
import "../../../../../byline-registry-CxK5g559.mjs";
|
|
4
|
+
import { a as unwrapResult, i as requireDb, t as apiError } from "../../../../../error-npZWBSb7.mjs";
|
|
5
|
+
import { n as parseBody, t as isParseError } from "../../../../../parse-4zO5Y2DL.mjs";
|
|
6
|
+
import "../../../../../redirects-C0L9JUk4.mjs";
|
|
7
|
+
import { a as bylineFieldUpdateBody } from "../../../../../byline-fields-Dr-xcb6S.mjs";
|
|
8
|
+
import "../../../../../api/schemas/index.mjs";
|
|
9
|
+
import { n as requirePerm } from "../../../../../authorize-_wWM_44T.mjs";
|
|
10
|
+
import { n as handleBylineFieldDelete, o as handleBylineFieldUpdate, r as handleBylineFieldGet } from "../../../../../byline-fields-DC3Wkk-U.mjs";
|
|
11
|
+
|
|
12
|
+
//#region src/astro/routes/api/admin/byline-fields/[slug].ts
|
|
13
|
+
const prerender = false;
|
|
14
|
+
const GET = async ({ params, locals }) => {
|
|
15
|
+
const { emdash, user } = locals;
|
|
16
|
+
const denied = requirePerm(user, "schema:read");
|
|
17
|
+
if (denied) return denied;
|
|
18
|
+
const dbErr = requireDb(emdash?.db);
|
|
19
|
+
if (dbErr) return dbErr;
|
|
20
|
+
const slug = params.slug;
|
|
21
|
+
if (!slug) return apiError("MISSING_PARAM", "Field slug is required", 400);
|
|
22
|
+
return unwrapResult(await handleBylineFieldGet(emdash.db, slug));
|
|
23
|
+
};
|
|
24
|
+
const PATCH = async ({ params, request, locals }) => {
|
|
25
|
+
const { emdash, user } = locals;
|
|
26
|
+
const denied = requirePerm(user, "schema:manage");
|
|
27
|
+
if (denied) return denied;
|
|
28
|
+
const dbErr = requireDb(emdash?.db);
|
|
29
|
+
if (dbErr) return dbErr;
|
|
30
|
+
const slug = params.slug;
|
|
31
|
+
if (!slug) return apiError("MISSING_PARAM", "Field slug is required", 400);
|
|
32
|
+
const body = await parseBody(request, bylineFieldUpdateBody);
|
|
33
|
+
if (isParseError(body)) return body;
|
|
34
|
+
return unwrapResult(await handleBylineFieldUpdate(emdash.db, slug, {
|
|
35
|
+
label: body.label,
|
|
36
|
+
required: body.required,
|
|
37
|
+
translatable: body.translatable,
|
|
38
|
+
validation: body.validation,
|
|
39
|
+
sortOrder: body.sortOrder
|
|
40
|
+
}));
|
|
41
|
+
};
|
|
42
|
+
const DELETE = async ({ params, locals }) => {
|
|
43
|
+
const { emdash, user } = locals;
|
|
44
|
+
const denied = requirePerm(user, "schema:manage");
|
|
45
|
+
if (denied) return denied;
|
|
46
|
+
const dbErr = requireDb(emdash?.db);
|
|
47
|
+
if (dbErr) return dbErr;
|
|
48
|
+
const slug = params.slug;
|
|
49
|
+
if (!slug) return apiError("MISSING_PARAM", "Field slug is required", 400);
|
|
50
|
+
return unwrapResult(await handleBylineFieldDelete(emdash.db, slug));
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
//#endregion
|
|
54
|
+
export { DELETE, GET, PATCH, prerender };
|
|
55
|
+
//# sourceMappingURL=_slug_.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_slug_.mjs","names":[],"sources":["../../../../../../src/astro/routes/api/admin/byline-fields/[slug].ts"],"sourcesContent":["/**\n * Byline custom-field schema management — single field CRUD.\n *\n * - GET /_emdash/api/admin/byline-fields/{slug} read one definition\n * - PATCH /_emdash/api/admin/byline-fields/{slug} update label / required /\n * translatable / validation /\n * sort order\n * - DELETE /_emdash/api/admin/byline-fields/{slug} drop the definition and all\n * stored values (FK CASCADE +\n * app-level cleanup; see\n * `BylineSchemaRegistry.deleteField`)\n *\n * Thin wrappers around the handler layer; status mapping happens in\n * `unwrapResult`. `slug` and `type` are immutable post-create — see\n * `bylineFieldUpdateBody`. Flipping `translatable` while value rows\n * exist surfaces as a 409 `TRANSLATABLE_LOCKED`.\n *\n * Phase 4 of Discussion #1174.\n */\n\nimport type { APIRoute } from \"astro\";\n\nimport { requirePerm } from \"#api/authorize.js\";\nimport { apiError, requireDb, unwrapResult } from \"#api/error.js\";\nimport {\n\thandleBylineFieldDelete,\n\thandleBylineFieldGet,\n\thandleBylineFieldUpdate,\n} from \"#api/handlers/byline-fields.js\";\nimport { isParseError, parseBody } from \"#api/parse.js\";\nimport { bylineFieldUpdateBody } from \"#api/schemas.js\";\n\nexport const prerender = false;\n\n// GET requires `schema:read` (Editor+); see sibling `index.ts` GET\n// for rationale.\nexport const GET: APIRoute = async ({ params, locals }) => {\n\tconst { emdash, user } = locals;\n\tconst denied = requirePerm(user, \"schema:read\");\n\tif (denied) return denied;\n\n\tconst dbErr = requireDb(emdash?.db);\n\tif (dbErr) return dbErr;\n\n\tconst slug = params.slug;\n\tif (!slug) return apiError(\"MISSING_PARAM\", \"Field slug is required\", 400);\n\n\tconst result = await handleBylineFieldGet(emdash.db, slug);\n\treturn unwrapResult(result);\n};\n\nexport const PATCH: APIRoute = async ({ params, request, locals }) => {\n\tconst { emdash, user } = locals;\n\tconst denied = requirePerm(user, \"schema:manage\");\n\tif (denied) return denied;\n\n\tconst dbErr = requireDb(emdash?.db);\n\tif (dbErr) return dbErr;\n\n\tconst slug = params.slug;\n\tif (!slug) return apiError(\"MISSING_PARAM\", \"Field slug is required\", 400);\n\n\tconst body = await parseBody(request, bylineFieldUpdateBody);\n\tif (isParseError(body)) return body;\n\n\tconst result = await handleBylineFieldUpdate(emdash.db, slug, {\n\t\tlabel: body.label,\n\t\trequired: body.required,\n\t\ttranslatable: body.translatable,\n\t\t// `null` clears the stored validation; `undefined` leaves it as-is.\n\t\t// The zod schema makes `validation` itself optional, so an absent\n\t\t// key reaches the handler as `undefined`.\n\t\tvalidation: body.validation,\n\t\tsortOrder: body.sortOrder,\n\t});\n\treturn unwrapResult(result);\n};\n\nexport const DELETE: APIRoute = async ({ params, locals }) => {\n\tconst { emdash, user } = locals;\n\tconst denied = requirePerm(user, \"schema:manage\");\n\tif (denied) return denied;\n\n\tconst dbErr = requireDb(emdash?.db);\n\tif (dbErr) return dbErr;\n\n\tconst slug = params.slug;\n\tif (!slug) return apiError(\"MISSING_PARAM\", \"Field slug is required\", 400);\n\n\tconst result = await handleBylineFieldDelete(emdash.db, slug);\n\treturn unwrapResult(result);\n};\n"],"mappings":";;;;;;;;;;;;AAgCA,MAAa,YAAY;AAIzB,MAAa,MAAgB,OAAO,EAAE,QAAQ,aAAa;CAC1D,MAAM,EAAE,QAAQ,SAAS;CACzB,MAAM,SAAS,YAAY,MAAM,cAAc;AAC/C,KAAI,OAAQ,QAAO;CAEnB,MAAM,QAAQ,UAAU,QAAQ,GAAG;AACnC,KAAI,MAAO,QAAO;CAElB,MAAM,OAAO,OAAO;AACpB,KAAI,CAAC,KAAM,QAAO,SAAS,iBAAiB,0BAA0B,IAAI;AAG1E,QAAO,aADQ,MAAM,qBAAqB,OAAO,IAAI,KAAK,CAC/B;;AAG5B,MAAa,QAAkB,OAAO,EAAE,QAAQ,SAAS,aAAa;CACrE,MAAM,EAAE,QAAQ,SAAS;CACzB,MAAM,SAAS,YAAY,MAAM,gBAAgB;AACjD,KAAI,OAAQ,QAAO;CAEnB,MAAM,QAAQ,UAAU,QAAQ,GAAG;AACnC,KAAI,MAAO,QAAO;CAElB,MAAM,OAAO,OAAO;AACpB,KAAI,CAAC,KAAM,QAAO,SAAS,iBAAiB,0BAA0B,IAAI;CAE1E,MAAM,OAAO,MAAM,UAAU,SAAS,sBAAsB;AAC5D,KAAI,aAAa,KAAK,CAAE,QAAO;AAY/B,QAAO,aAVQ,MAAM,wBAAwB,OAAO,IAAI,MAAM;EAC7D,OAAO,KAAK;EACZ,UAAU,KAAK;EACf,cAAc,KAAK;EAInB,YAAY,KAAK;EACjB,WAAW,KAAK;EAChB,CAAC,CACyB;;AAG5B,MAAa,SAAmB,OAAO,EAAE,QAAQ,aAAa;CAC7D,MAAM,EAAE,QAAQ,SAAS;CACzB,MAAM,SAAS,YAAY,MAAM,gBAAgB;AACjD,KAAI,OAAQ,QAAO;CAEnB,MAAM,QAAQ,UAAU,QAAQ,GAAG;AACnC,KAAI,MAAO,QAAO;CAElB,MAAM,OAAO,OAAO;AACpB,KAAI,CAAC,KAAM,QAAO,SAAS,iBAAiB,0BAA0B,IAAI;AAG1E,QAAO,aADQ,MAAM,wBAAwB,OAAO,IAAI,KAAK,CAClC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { APIRoute } from "astro";
|
|
2
|
+
|
|
3
|
+
//#region src/astro/routes/api/admin/byline-fields/index.d.ts
|
|
4
|
+
declare const prerender = false;
|
|
5
|
+
declare const GET: APIRoute;
|
|
6
|
+
declare const POST: APIRoute;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { GET, POST, prerender };
|
|
9
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../../../../../src/astro/routes/api/admin/byline-fields/index.ts"],"mappings":";;;cAwBa,SAAA;AAAA,cAQA,GAAA,EAAK,QAAA;AAAA,cAYL,IAAA,EAAM,QAAA"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import "../../../../../base64-CqR-7kqF.mjs";
|
|
2
|
+
import "../../../../../types-SF1DwGf2.mjs";
|
|
3
|
+
import "../../../../../byline-registry-CxK5g559.mjs";
|
|
4
|
+
import { a as unwrapResult, i as requireDb } from "../../../../../error-npZWBSb7.mjs";
|
|
5
|
+
import { n as parseBody, t as isParseError } from "../../../../../parse-4zO5Y2DL.mjs";
|
|
6
|
+
import "../../../../../redirects-C0L9JUk4.mjs";
|
|
7
|
+
import { t as bylineFieldCreateBody } from "../../../../../byline-fields-Dr-xcb6S.mjs";
|
|
8
|
+
import "../../../../../api/schemas/index.mjs";
|
|
9
|
+
import { n as requirePerm } from "../../../../../authorize-_wWM_44T.mjs";
|
|
10
|
+
import { i as handleBylineFieldList, t as handleBylineFieldCreate } from "../../../../../byline-fields-DC3Wkk-U.mjs";
|
|
11
|
+
|
|
12
|
+
//#region src/astro/routes/api/admin/byline-fields/index.ts
|
|
13
|
+
const prerender = false;
|
|
14
|
+
const GET = async ({ locals }) => {
|
|
15
|
+
const { emdash, user } = locals;
|
|
16
|
+
const denied = requirePerm(user, "schema:read");
|
|
17
|
+
if (denied) return denied;
|
|
18
|
+
const dbErr = requireDb(emdash?.db);
|
|
19
|
+
if (dbErr) return dbErr;
|
|
20
|
+
return unwrapResult(await handleBylineFieldList(emdash.db));
|
|
21
|
+
};
|
|
22
|
+
const POST = async ({ request, locals }) => {
|
|
23
|
+
const { emdash, user } = locals;
|
|
24
|
+
const denied = requirePerm(user, "schema:manage");
|
|
25
|
+
if (denied) return denied;
|
|
26
|
+
const dbErr = requireDb(emdash?.db);
|
|
27
|
+
if (dbErr) return dbErr;
|
|
28
|
+
const body = await parseBody(request, bylineFieldCreateBody);
|
|
29
|
+
if (isParseError(body)) return body;
|
|
30
|
+
return unwrapResult(await handleBylineFieldCreate(emdash.db, {
|
|
31
|
+
slug: body.slug,
|
|
32
|
+
label: body.label,
|
|
33
|
+
type: body.type,
|
|
34
|
+
required: body.required,
|
|
35
|
+
translatable: body.translatable,
|
|
36
|
+
validation: body.validation ?? null,
|
|
37
|
+
sortOrder: body.sortOrder
|
|
38
|
+
}), 201);
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
//#endregion
|
|
42
|
+
export { GET, POST, prerender };
|
|
43
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../../../../../src/astro/routes/api/admin/byline-fields/index.ts"],"sourcesContent":["/**\n * Byline custom-field schema management — list + create.\n *\n * - GET /_emdash/api/admin/byline-fields list every registered field\n * - POST /_emdash/api/admin/byline-fields create a new field definition\n *\n * Thin wrappers around `handleBylineFieldList` / `handleBylineFieldCreate`\n * in `api/handlers/byline-fields.ts`. Both endpoints require\n * `schema:manage`. Reserved-slug + identifier validation runs at the\n * zod layer in `bylineFieldCreateBody`; the registry repeats the check\n * for defence-in-depth. Domain errors surface as typed `ErrorCode`s and\n * are mapped to HTTP statuses by `unwrapResult` → `mapErrorStatus`.\n *\n * Phase 4 of Discussion #1174.\n */\n\nimport type { APIRoute } from \"astro\";\n\nimport { requirePerm } from \"#api/authorize.js\";\nimport { requireDb, unwrapResult } from \"#api/error.js\";\nimport { handleBylineFieldCreate, handleBylineFieldList } from \"#api/handlers/byline-fields.js\";\nimport { isParseError, parseBody } from \"#api/parse.js\";\nimport { bylineFieldCreateBody } from \"#api/schemas.js\";\n\nexport const prerender = false;\n\n// GET requires `schema:read` (Editor+), not `schema:manage` — Phase 6\n// of #1174 surfaced the split: editors need to read field definitions\n// to render custom-field inputs in the byline edit form, while only\n// admins manage the registry. The Phase 4 review-round constraint\n// \"every endpoint returns 403 for a user without schema:manage\" is\n// superseded for the read endpoints; mutations remain admin-only.\nexport const GET: APIRoute = async ({ locals }) => {\n\tconst { emdash, user } = locals;\n\tconst denied = requirePerm(user, \"schema:read\");\n\tif (denied) return denied;\n\n\tconst dbErr = requireDb(emdash?.db);\n\tif (dbErr) return dbErr;\n\n\tconst result = await handleBylineFieldList(emdash.db);\n\treturn unwrapResult(result);\n};\n\nexport const POST: APIRoute = async ({ request, locals }) => {\n\tconst { emdash, user } = locals;\n\tconst denied = requirePerm(user, \"schema:manage\");\n\tif (denied) return denied;\n\n\tconst dbErr = requireDb(emdash?.db);\n\tif (dbErr) return dbErr;\n\n\tconst body = await parseBody(request, bylineFieldCreateBody);\n\tif (isParseError(body)) return body;\n\n\tconst result = await handleBylineFieldCreate(emdash.db, {\n\t\tslug: body.slug,\n\t\tlabel: body.label,\n\t\ttype: body.type,\n\t\trequired: body.required,\n\t\ttranslatable: body.translatable,\n\t\tvalidation: body.validation ?? null,\n\t\tsortOrder: body.sortOrder,\n\t});\n\treturn unwrapResult(result, 201);\n};\n"],"mappings":";;;;;;;;;;;;AAwBA,MAAa,YAAY;AAQzB,MAAa,MAAgB,OAAO,EAAE,aAAa;CAClD,MAAM,EAAE,QAAQ,SAAS;CACzB,MAAM,SAAS,YAAY,MAAM,cAAc;AAC/C,KAAI,OAAQ,QAAO;CAEnB,MAAM,QAAQ,UAAU,QAAQ,GAAG;AACnC,KAAI,MAAO,QAAO;AAGlB,QAAO,aADQ,MAAM,sBAAsB,OAAO,GAAG,CAC1B;;AAG5B,MAAa,OAAiB,OAAO,EAAE,SAAS,aAAa;CAC5D,MAAM,EAAE,QAAQ,SAAS;CACzB,MAAM,SAAS,YAAY,MAAM,gBAAgB;AACjD,KAAI,OAAQ,QAAO;CAEnB,MAAM,QAAQ,UAAU,QAAQ,GAAG;AACnC,KAAI,MAAO,QAAO;CAElB,MAAM,OAAO,MAAM,UAAU,SAAS,sBAAsB;AAC5D,KAAI,aAAa,KAAK,CAAE,QAAO;AAW/B,QAAO,aATQ,MAAM,wBAAwB,OAAO,IAAI;EACvD,MAAM,KAAK;EACX,OAAO,KAAK;EACZ,MAAM,KAAK;EACX,UAAU,KAAK;EACf,cAAc,KAAK;EACnB,YAAY,KAAK,cAAc;EAC/B,WAAW,KAAK;EAChB,CAAC,EAC0B,IAAI"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reorder.d.mts","names":[],"sources":["../../../../../../src/astro/routes/api/admin/byline-fields/reorder.ts"],"mappings":";;;cAuBa,SAAA;AAAA,cAEA,IAAA,EAAM,QAAA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import "../../../../../base64-CqR-7kqF.mjs";
|
|
2
|
+
import "../../../../../types-SF1DwGf2.mjs";
|
|
3
|
+
import "../../../../../byline-registry-CxK5g559.mjs";
|
|
4
|
+
import { a as unwrapResult, i as requireDb } from "../../../../../error-npZWBSb7.mjs";
|
|
5
|
+
import { n as parseBody, t as isParseError } from "../../../../../parse-4zO5Y2DL.mjs";
|
|
6
|
+
import "../../../../../redirects-C0L9JUk4.mjs";
|
|
7
|
+
import { i as bylineFieldReorderBody } from "../../../../../byline-fields-Dr-xcb6S.mjs";
|
|
8
|
+
import "../../../../../api/schemas/index.mjs";
|
|
9
|
+
import { n as requirePerm } from "../../../../../authorize-_wWM_44T.mjs";
|
|
10
|
+
import { a as handleBylineFieldReorder } from "../../../../../byline-fields-DC3Wkk-U.mjs";
|
|
11
|
+
|
|
12
|
+
//#region src/astro/routes/api/admin/byline-fields/reorder.ts
|
|
13
|
+
const prerender = false;
|
|
14
|
+
const POST = async ({ request, locals }) => {
|
|
15
|
+
const { emdash, user } = locals;
|
|
16
|
+
const denied = requirePerm(user, "schema:manage");
|
|
17
|
+
if (denied) return denied;
|
|
18
|
+
const dbErr = requireDb(emdash?.db);
|
|
19
|
+
if (dbErr) return dbErr;
|
|
20
|
+
const body = await parseBody(request, bylineFieldReorderBody);
|
|
21
|
+
if (isParseError(body)) return body;
|
|
22
|
+
return unwrapResult(await handleBylineFieldReorder(emdash.db, body.slugs));
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
//#endregion
|
|
26
|
+
export { POST, prerender };
|
|
27
|
+
//# sourceMappingURL=reorder.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reorder.mjs","names":[],"sources":["../../../../../../src/astro/routes/api/admin/byline-fields/reorder.ts"],"sourcesContent":["/**\n * Byline field reorder.\n *\n * POST /_emdash/api/admin/byline-fields/reorder\n *\n * Body: `{ slugs: string[] }` — the exact set of currently registered\n * slugs in the desired order. The registry rejects any drift\n * (`REORDER_MISMATCH` → 400). Empty `[]` against an empty registered\n * set is a no-op by registry contract; the zod schema permits it.\n *\n * Thin wrapper around `handleBylineFieldReorder`.\n *\n * Phase 4 of Discussion #1174.\n */\n\nimport type { APIRoute } from \"astro\";\n\nimport { requirePerm } from \"#api/authorize.js\";\nimport { requireDb, unwrapResult } from \"#api/error.js\";\nimport { handleBylineFieldReorder } from \"#api/handlers/byline-fields.js\";\nimport { isParseError, parseBody } from \"#api/parse.js\";\nimport { bylineFieldReorderBody } from \"#api/schemas.js\";\n\nexport const prerender = false;\n\nexport const POST: APIRoute = async ({ request, locals }) => {\n\tconst { emdash, user } = locals;\n\tconst denied = requirePerm(user, \"schema:manage\");\n\tif (denied) return denied;\n\n\tconst dbErr = requireDb(emdash?.db);\n\tif (dbErr) return dbErr;\n\n\tconst body = await parseBody(request, bylineFieldReorderBody);\n\tif (isParseError(body)) return body;\n\n\tconst result = await handleBylineFieldReorder(emdash.db, body.slugs);\n\treturn unwrapResult(result);\n};\n"],"mappings":";;;;;;;;;;;;AAuBA,MAAa,YAAY;AAEzB,MAAa,OAAiB,OAAO,EAAE,SAAS,aAAa;CAC5D,MAAM,EAAE,QAAQ,SAAS;CACzB,MAAM,SAAS,YAAY,MAAM,gBAAgB;AACjD,KAAI,OAAQ,QAAO;CAEnB,MAAM,QAAQ,UAAU,QAAQ,GAAG;AACnC,KAAI,MAAO,QAAO;CAElB,MAAM,OAAO,MAAM,UAAU,SAAS,uBAAuB;AAC7D,KAAI,aAAa,KAAK,CAAE,QAAO;AAG/B,QAAO,aADQ,MAAM,yBAAyB,OAAO,IAAI,KAAK,MAAM,CACzC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../../../../../../../src/astro/routes/api/admin/bylines/[id]/index.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../../../../../../src/astro/routes/api/admin/bylines/[id]/index.ts"],"mappings":";;;cAUa,SAAA;AAAA,cAEA,GAAA,EAAK,QAAA;AAAA,cAmBL,GAAA,EAAK,QAAA;AAAA,cAiCL,MAAA,EAAQ,QAAA"}
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import "../../../../../../dialect-helpers-BKCvISIQ.mjs";
|
|
2
2
|
import "../../../../../../base64-CqR-7kqF.mjs";
|
|
3
|
-
import "../../../../../../types-
|
|
4
|
-
import
|
|
5
|
-
import "../../../../../../
|
|
6
|
-
import "../../../../../../
|
|
7
|
-
import "../../../../../../
|
|
8
|
-
import
|
|
9
|
-
import { n as
|
|
10
|
-
import {
|
|
11
|
-
import "../../../../../../
|
|
3
|
+
import "../../../../../../types-SF1DwGf2.mjs";
|
|
4
|
+
import "../../../../../../request-cache-BYMs-BGX.mjs";
|
|
5
|
+
import "../../../../../../byline-registry-CxK5g559.mjs";
|
|
6
|
+
import { t as BylineRepository } from "../../../../../../byline-BrIVWLm-.mjs";
|
|
7
|
+
import "../../../../../../loader-CJ6lWO0d.mjs";
|
|
8
|
+
import "../../../../../../resolve-BqYMVG0D.mjs";
|
|
9
|
+
import { a as unwrapResult, i as requireDb, n as apiSuccess, r as handleError, t as apiError } from "../../../../../../error-npZWBSb7.mjs";
|
|
10
|
+
import { n as parseBody, t as isParseError } from "../../../../../../parse-4zO5Y2DL.mjs";
|
|
11
|
+
import { Sn as bylineUpdateBody } from "../../../../../../redirects-C0L9JUk4.mjs";
|
|
12
|
+
import "../../../../../../byline-fields-Dr-xcb6S.mjs";
|
|
12
13
|
import "../../../../../../api/schemas/index.mjs";
|
|
13
|
-
import { i as invalidateBylineCache } from "../../../../../../bylines-
|
|
14
|
-
import { n as requirePerm } from "../../../../../../authorize-
|
|
14
|
+
import { i as invalidateBylineCache } from "../../../../../../bylines-C_POWmGT.mjs";
|
|
15
|
+
import { n as requirePerm } from "../../../../../../authorize-_wWM_44T.mjs";
|
|
16
|
+
import { r as handleBylineUpdate } from "../../../../../../bylines-sqExMElV.mjs";
|
|
15
17
|
|
|
16
18
|
//#region src/astro/routes/api/admin/bylines/[id]/index.ts
|
|
17
19
|
const prerender = false;
|
|
@@ -32,25 +34,22 @@ const PUT = async ({ params, request, locals }) => {
|
|
|
32
34
|
const { emdash, user } = locals;
|
|
33
35
|
const denied = requirePerm(user, "bylines:manage");
|
|
34
36
|
if (denied) return denied;
|
|
35
|
-
|
|
37
|
+
const dbErr = requireDb(emdash?.db);
|
|
38
|
+
if (dbErr) return dbErr;
|
|
36
39
|
const body = await parseBody(request, bylineUpdateBody);
|
|
37
40
|
if (isParseError(body)) return body;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
return apiSuccess(byline);
|
|
51
|
-
} catch (error) {
|
|
52
|
-
return handleError(error, "Failed to update byline", "BYLINE_UPDATE_ERROR");
|
|
53
|
-
}
|
|
41
|
+
const result = await handleBylineUpdate(emdash.db, params.id, {
|
|
42
|
+
slug: body.slug,
|
|
43
|
+
displayName: body.displayName,
|
|
44
|
+
bio: body.bio ?? null,
|
|
45
|
+
avatarMediaId: body.avatarMediaId ?? null,
|
|
46
|
+
websiteUrl: body.websiteUrl ?? null,
|
|
47
|
+
userId: body.userId ?? null,
|
|
48
|
+
isGuest: body.isGuest,
|
|
49
|
+
customFields: body.customFields
|
|
50
|
+
});
|
|
51
|
+
if (result.success) /* @__PURE__ */ invalidateBylineCache();
|
|
52
|
+
return unwrapResult(result);
|
|
54
53
|
};
|
|
55
54
|
const DELETE = async ({ params, locals }) => {
|
|
56
55
|
const { emdash, user } = locals;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../../../../../../../src/astro/routes/api/admin/bylines/[id]/index.ts"],"sourcesContent":["import type { APIRoute } from \"astro\";\n\nimport { requirePerm } from \"#api/authorize.js\";\nimport { apiError, apiSuccess, handleError } from \"#api/error.js\";\nimport { isParseError, parseBody } from \"#api/parse.js\";\nimport { bylineUpdateBody } from \"#api/schemas.js\";\nimport { invalidateBylineCache } from \"#bylines/index.js\";\nimport { BylineRepository } from \"#db/repositories/byline.js\";\n\nexport const prerender = false;\n\nexport const GET: APIRoute = async ({ params, locals }) => {\n\tconst { emdash, user } = locals;\n\tconst denied = requirePerm(user, \"bylines:read\");\n\tif (denied) return denied;\n\n\tif (!emdash?.db) {\n\t\treturn apiError(\"NOT_CONFIGURED\", \"EmDash is not initialized\", 500);\n\t}\n\n\ttry {\n\t\tconst repo = new BylineRepository(emdash.db);\n\t\tconst byline = await repo.findById(params.id!);\n\t\tif (!byline) return apiError(\"NOT_FOUND\", \"Byline not found\", 404);\n\t\treturn apiSuccess(byline);\n\t} catch (error) {\n\t\treturn handleError(error, \"Failed to get byline\", \"BYLINE_GET_ERROR\");\n\t}\n};\n\nexport const PUT: APIRoute = async ({ params, request, locals }) => {\n\tconst { emdash, user } = locals;\n\tconst denied = requirePerm(user, \"bylines:manage\");\n\tif (denied) return denied;\n\n\
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../../../../../../src/astro/routes/api/admin/bylines/[id]/index.ts"],"sourcesContent":["import type { APIRoute } from \"astro\";\n\nimport { requirePerm } from \"#api/authorize.js\";\nimport { apiError, apiSuccess, handleError, requireDb, unwrapResult } from \"#api/error.js\";\nimport { handleBylineUpdate } from \"#api/handlers/bylines.js\";\nimport { isParseError, parseBody } from \"#api/parse.js\";\nimport { bylineUpdateBody } from \"#api/schemas.js\";\nimport { invalidateBylineCache } from \"#bylines/index.js\";\nimport { BylineRepository } from \"#db/repositories/byline.js\";\n\nexport const prerender = false;\n\nexport const GET: APIRoute = async ({ params, locals }) => {\n\tconst { emdash, user } = locals;\n\tconst denied = requirePerm(user, \"bylines:read\");\n\tif (denied) return denied;\n\n\tif (!emdash?.db) {\n\t\treturn apiError(\"NOT_CONFIGURED\", \"EmDash is not initialized\", 500);\n\t}\n\n\ttry {\n\t\tconst repo = new BylineRepository(emdash.db);\n\t\tconst byline = await repo.findById(params.id!);\n\t\tif (!byline) return apiError(\"NOT_FOUND\", \"Byline not found\", 404);\n\t\treturn apiSuccess(byline);\n\t} catch (error) {\n\t\treturn handleError(error, \"Failed to get byline\", \"BYLINE_GET_ERROR\");\n\t}\n};\n\nexport const PUT: APIRoute = async ({ params, request, locals }) => {\n\tconst { emdash, user } = locals;\n\tconst denied = requirePerm(user, \"bylines:manage\");\n\tif (denied) return denied;\n\n\tconst dbErr = requireDb(emdash?.db);\n\tif (dbErr) return dbErr;\n\n\tconst body = await parseBody(request, bylineUpdateBody);\n\tif (isParseError(body)) return body;\n\n\tconst result = await handleBylineUpdate(emdash.db, params.id!, {\n\t\tslug: body.slug,\n\t\tdisplayName: body.displayName,\n\t\tbio: body.bio ?? null,\n\t\tavatarMediaId: body.avatarMediaId ?? null,\n\t\twebsiteUrl: body.websiteUrl ?? null,\n\t\tuserId: body.userId ?? null,\n\t\tisGuest: body.isGuest,\n\t\t// Forward `customFields` only when present so the repo treats an\n\t\t// omitted key as \"leave existing values untouched\". An empty\n\t\t// object also no-ops by repo convention — see\n\t\t// `BylineRepository.update`. Validation (unknown slug, type\n\t\t// mismatch, select-choice) happens inside the repo and surfaces\n\t\t// as `EmDashValidationError`, which the handler maps to a 400\n\t\t// `VALIDATION_ERROR` for `unwrapResult` / `mapErrorStatus`.\n\t\tcustomFields: body.customFields,\n\t});\n\n\tif (result.success) invalidateBylineCache();\n\treturn unwrapResult(result);\n};\n\nexport const DELETE: APIRoute = async ({ params, locals }) => {\n\tconst { emdash, user } = locals;\n\tconst denied = requirePerm(user, \"bylines:manage\");\n\tif (denied) return denied;\n\n\tif (!emdash?.db) {\n\t\treturn apiError(\"NOT_CONFIGURED\", \"EmDash is not initialized\", 500);\n\t}\n\n\ttry {\n\t\tconst repo = new BylineRepository(emdash.db);\n\t\tconst deleted = await repo.delete(params.id!);\n\t\tif (!deleted) return apiError(\"NOT_FOUND\", \"Byline not found\", 404);\n\t\tinvalidateBylineCache();\n\t\treturn apiSuccess({ deleted: true });\n\t} catch (error) {\n\t\treturn handleError(error, \"Failed to delete byline\", \"BYLINE_DELETE_ERROR\");\n\t}\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAUA,MAAa,YAAY;AAEzB,MAAa,MAAgB,OAAO,EAAE,QAAQ,aAAa;CAC1D,MAAM,EAAE,QAAQ,SAAS;CACzB,MAAM,SAAS,YAAY,MAAM,eAAe;AAChD,KAAI,OAAQ,QAAO;AAEnB,KAAI,CAAC,QAAQ,GACZ,QAAO,SAAS,kBAAkB,6BAA6B,IAAI;AAGpE,KAAI;EAEH,MAAM,SAAS,MADF,IAAI,iBAAiB,OAAO,GAAG,CAClB,SAAS,OAAO,GAAI;AAC9C,MAAI,CAAC,OAAQ,QAAO,SAAS,aAAa,oBAAoB,IAAI;AAClE,SAAO,WAAW,OAAO;UACjB,OAAO;AACf,SAAO,YAAY,OAAO,wBAAwB,mBAAmB;;;AAIvE,MAAa,MAAgB,OAAO,EAAE,QAAQ,SAAS,aAAa;CACnE,MAAM,EAAE,QAAQ,SAAS;CACzB,MAAM,SAAS,YAAY,MAAM,iBAAiB;AAClD,KAAI,OAAQ,QAAO;CAEnB,MAAM,QAAQ,UAAU,QAAQ,GAAG;AACnC,KAAI,MAAO,QAAO;CAElB,MAAM,OAAO,MAAM,UAAU,SAAS,iBAAiB;AACvD,KAAI,aAAa,KAAK,CAAE,QAAO;CAE/B,MAAM,SAAS,MAAM,mBAAmB,OAAO,IAAI,OAAO,IAAK;EAC9D,MAAM,KAAK;EACX,aAAa,KAAK;EAClB,KAAK,KAAK,OAAO;EACjB,eAAe,KAAK,iBAAiB;EACrC,YAAY,KAAK,cAAc;EAC/B,QAAQ,KAAK,UAAU;EACvB,SAAS,KAAK;EAQd,cAAc,KAAK;EACnB,CAAC;AAEF,KAAI,OAAO,QAAS,wCAAuB;AAC3C,QAAO,aAAa,OAAO;;AAG5B,MAAa,SAAmB,OAAO,EAAE,QAAQ,aAAa;CAC7D,MAAM,EAAE,QAAQ,SAAS;CACzB,MAAM,SAAS,YAAY,MAAM,iBAAiB;AAClD,KAAI,OAAQ,QAAO;AAEnB,KAAI,CAAC,QAAQ,GACZ,QAAO,SAAS,kBAAkB,6BAA6B,IAAI;AAGpE,KAAI;AAGH,MAAI,CADY,MADH,IAAI,iBAAiB,OAAO,GAAG,CACjB,OAAO,OAAO,GAAI,CAC/B,QAAO,SAAS,aAAa,oBAAoB,IAAI;AACnE,yCAAuB;AACvB,SAAO,WAAW,EAAE,SAAS,MAAM,CAAC;UAC5B,OAAO;AACf,SAAO,YAAY,OAAO,2BAA2B,sBAAsB"}
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import "../../../../../../dialect-helpers-BKCvISIQ.mjs";
|
|
2
2
|
import "../../../../../../base64-CqR-7kqF.mjs";
|
|
3
|
-
import "../../../../../../types-
|
|
4
|
-
import
|
|
5
|
-
import "../../../../../../
|
|
6
|
-
import "../../../../../../
|
|
7
|
-
import "../../../../../../
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import "../../../../../../
|
|
3
|
+
import "../../../../../../types-SF1DwGf2.mjs";
|
|
4
|
+
import "../../../../../../request-cache-BYMs-BGX.mjs";
|
|
5
|
+
import "../../../../../../byline-registry-CxK5g559.mjs";
|
|
6
|
+
import { t as BylineRepository } from "../../../../../../byline-BrIVWLm-.mjs";
|
|
7
|
+
import "../../../../../../loader-CJ6lWO0d.mjs";
|
|
8
|
+
import "../../../../../../resolve-BqYMVG0D.mjs";
|
|
9
|
+
import { a as unwrapResult, i as requireDb, r as handleError } from "../../../../../../error-npZWBSb7.mjs";
|
|
10
|
+
import { n as parseBody, t as isParseError } from "../../../../../../parse-4zO5Y2DL.mjs";
|
|
11
|
+
import { bn as bylineTranslationCreateBody } from "../../../../../../redirects-C0L9JUk4.mjs";
|
|
12
|
+
import "../../../../../../byline-fields-Dr-xcb6S.mjs";
|
|
12
13
|
import "../../../../../../api/schemas/index.mjs";
|
|
13
|
-
import { i as invalidateBylineCache } from "../../../../../../bylines-
|
|
14
|
-
import { n as requirePerm } from "../../../../../../authorize-
|
|
15
|
-
import { n as handleBylineTranslations, t as handleBylineCreate } from "../../../../../../bylines-
|
|
14
|
+
import { i as invalidateBylineCache } from "../../../../../../bylines-C_POWmGT.mjs";
|
|
15
|
+
import { n as requirePerm } from "../../../../../../authorize-_wWM_44T.mjs";
|
|
16
|
+
import { n as handleBylineTranslations, t as handleBylineCreate } from "../../../../../../bylines-sqExMElV.mjs";
|
|
16
17
|
|
|
17
18
|
//#region src/astro/routes/api/admin/bylines/[id]/translations.ts
|
|
18
19
|
const prerender = false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translations.mjs","names":[],"sources":["../../../../../../../src/astro/routes/api/admin/bylines/[id]/translations.ts"],"sourcesContent":["/**\n * Byline translation endpoints\n *\n * GET /_emdash/api/admin/bylines/:id/translations — list every translation\n * of a byline (siblings\n * in the same\n * translation_group)\n * POST /_emdash/api/admin/bylines/:id/translations — create a new locale\n * variant joining the\n * source's\n * translation_group\n * (body: { locale, ... })\n */\n\nimport type { APIRoute } from \"astro\";\n\nimport { requirePerm } from \"#api/authorize.js\";\nimport { handleError, requireDb, unwrapResult } from \"#api/error.js\";\nimport { handleBylineCreate, handleBylineTranslations } from \"#api/handlers/bylines.js\";\nimport { isParseError, parseBody } from \"#api/parse.js\";\nimport { bylineTranslationCreateBody } from \"#api/schemas.js\";\nimport { invalidateBylineCache } from \"#bylines/index.js\";\nimport { BylineRepository } from \"#db/repositories/byline.js\";\n\nexport const prerender = false;\n\nexport const GET: APIRoute = async ({ params, locals }) => {\n\tconst { emdash, user } = locals;\n\tconst id = params.id!;\n\n\tconst dbErr = requireDb(emdash?.db);\n\tif (dbErr) return dbErr;\n\n\tconst denied = requirePerm(user, \"bylines:read\");\n\tif (denied) return denied;\n\n\ttry {\n\t\tconst result = await handleBylineTranslations(emdash.db, id);\n\t\treturn unwrapResult(result);\n\t} catch (error) {\n\t\treturn handleError(error, \"Failed to fetch byline translations\", \"BYLINE_TRANSLATIONS_ERROR\");\n\t}\n};\n\nexport const POST: APIRoute = async ({ params, request, locals }) => {\n\tconst { emdash, user } = locals;\n\tconst id = params.id!;\n\n\tconst dbErr = requireDb(emdash?.db);\n\tif (dbErr) return dbErr;\n\n\tconst denied = requirePerm(user, \"bylines:manage\");\n\tif (denied) return denied;\n\n\ttry {\n\t\tconst body = await parseBody(request, bylineTranslationCreateBody);\n\t\tif (isParseError(body)) return body;\n\n\t\t// Look up the source byline so we can:\n\t\t// (a) emit a clean 404 when it doesn't exist (route layer);\n\t\t// (b) fall back to its slug + display_name + avatar/website when\n\t\t// the body omits them. Editors creating a translation often\n\t\t// want to keep the slug stable and only enter the localized\n\t\t// bio/displayName — defaulting saves clicks.\n\t\tconst repo = new BylineRepository(emdash.db);\n\t\tconst source = await repo.findById(id);\n\t\tif (!source) {\n\t\t\treturn new Response(\n\t\t\t\tJSON.stringify({ error: { code: \"NOT_FOUND\", message: \"Byline not found\" } }),\n\t\t\t\t{ status: 404, headers: { \"Content-Type\": \"application/json\" } },\n\t\t\t);\n\t\t}\n\n\t\tconst result = await handleBylineCreate(emdash.db, {\n\t\t\tslug: body.slug ?? source.slug,\n\t\t\tdisplayName: body.displayName ?? source.displayName,\n\t\t\tbio: body.bio ?? null,\n\t\t\tavatarMediaId: body.avatarMediaId ?? source.avatarMediaId,\n\t\t\twebsiteUrl: body.websiteUrl ?? source.websiteUrl,\n\t\t\t// Translations don't inherit the source's user_id or guest flag —\n\t\t\t// the partial unique on (user_id, locale) means a single user can\n\t\t\t// own one byline per locale, but the editor must opt into linking\n\t\t\t// the new row by editing it after creation.\n\t\t\tuserId: null,\n\t\t\tisGuest: source.isGuest,\n\t\t\tlocale: body.locale,\n\t\t\ttranslationOf: id,\n\t\t});\n\n\t\tif (result.success) invalidateBylineCache();\n\t\treturn unwrapResult(result, 201);\n\t} catch (error) {\n\t\treturn handleError(\n\t\t\terror,\n\t\t\t\"Failed to create byline translation\",\n\t\t\t\"BYLINE_TRANSLATION_CREATE_ERROR\",\n\t\t);\n\t}\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"translations.mjs","names":[],"sources":["../../../../../../../src/astro/routes/api/admin/bylines/[id]/translations.ts"],"sourcesContent":["/**\n * Byline translation endpoints\n *\n * GET /_emdash/api/admin/bylines/:id/translations — list every translation\n * of a byline (siblings\n * in the same\n * translation_group)\n * POST /_emdash/api/admin/bylines/:id/translations — create a new locale\n * variant joining the\n * source's\n * translation_group\n * (body: { locale, ... })\n */\n\nimport type { APIRoute } from \"astro\";\n\nimport { requirePerm } from \"#api/authorize.js\";\nimport { handleError, requireDb, unwrapResult } from \"#api/error.js\";\nimport { handleBylineCreate, handleBylineTranslations } from \"#api/handlers/bylines.js\";\nimport { isParseError, parseBody } from \"#api/parse.js\";\nimport { bylineTranslationCreateBody } from \"#api/schemas.js\";\nimport { invalidateBylineCache } from \"#bylines/index.js\";\nimport { BylineRepository } from \"#db/repositories/byline.js\";\n\nexport const prerender = false;\n\nexport const GET: APIRoute = async ({ params, locals }) => {\n\tconst { emdash, user } = locals;\n\tconst id = params.id!;\n\n\tconst dbErr = requireDb(emdash?.db);\n\tif (dbErr) return dbErr;\n\n\tconst denied = requirePerm(user, \"bylines:read\");\n\tif (denied) return denied;\n\n\ttry {\n\t\tconst result = await handleBylineTranslations(emdash.db, id);\n\t\treturn unwrapResult(result);\n\t} catch (error) {\n\t\treturn handleError(error, \"Failed to fetch byline translations\", \"BYLINE_TRANSLATIONS_ERROR\");\n\t}\n};\n\nexport const POST: APIRoute = async ({ params, request, locals }) => {\n\tconst { emdash, user } = locals;\n\tconst id = params.id!;\n\n\tconst dbErr = requireDb(emdash?.db);\n\tif (dbErr) return dbErr;\n\n\tconst denied = requirePerm(user, \"bylines:manage\");\n\tif (denied) return denied;\n\n\ttry {\n\t\tconst body = await parseBody(request, bylineTranslationCreateBody);\n\t\tif (isParseError(body)) return body;\n\n\t\t// Look up the source byline so we can:\n\t\t// (a) emit a clean 404 when it doesn't exist (route layer);\n\t\t// (b) fall back to its slug + display_name + avatar/website when\n\t\t// the body omits them. Editors creating a translation often\n\t\t// want to keep the slug stable and only enter the localized\n\t\t// bio/displayName — defaulting saves clicks.\n\t\tconst repo = new BylineRepository(emdash.db);\n\t\tconst source = await repo.findById(id);\n\t\tif (!source) {\n\t\t\treturn new Response(\n\t\t\t\tJSON.stringify({ error: { code: \"NOT_FOUND\", message: \"Byline not found\" } }),\n\t\t\t\t{ status: 404, headers: { \"Content-Type\": \"application/json\" } },\n\t\t\t);\n\t\t}\n\n\t\tconst result = await handleBylineCreate(emdash.db, {\n\t\t\tslug: body.slug ?? source.slug,\n\t\t\tdisplayName: body.displayName ?? source.displayName,\n\t\t\tbio: body.bio ?? null,\n\t\t\tavatarMediaId: body.avatarMediaId ?? source.avatarMediaId,\n\t\t\twebsiteUrl: body.websiteUrl ?? source.websiteUrl,\n\t\t\t// Translations don't inherit the source's user_id or guest flag —\n\t\t\t// the partial unique on (user_id, locale) means a single user can\n\t\t\t// own one byline per locale, but the editor must opt into linking\n\t\t\t// the new row by editing it after creation.\n\t\t\tuserId: null,\n\t\t\tisGuest: source.isGuest,\n\t\t\tlocale: body.locale,\n\t\t\ttranslationOf: id,\n\t\t});\n\n\t\tif (result.success) invalidateBylineCache();\n\t\treturn unwrapResult(result, 201);\n\t} catch (error) {\n\t\treturn handleError(\n\t\t\terror,\n\t\t\t\"Failed to create byline translation\",\n\t\t\t\"BYLINE_TRANSLATION_CREATE_ERROR\",\n\t\t);\n\t}\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAwBA,MAAa,YAAY;AAEzB,MAAa,MAAgB,OAAO,EAAE,QAAQ,aAAa;CAC1D,MAAM,EAAE,QAAQ,SAAS;CACzB,MAAM,KAAK,OAAO;CAElB,MAAM,QAAQ,UAAU,QAAQ,GAAG;AACnC,KAAI,MAAO,QAAO;CAElB,MAAM,SAAS,YAAY,MAAM,eAAe;AAChD,KAAI,OAAQ,QAAO;AAEnB,KAAI;AAEH,SAAO,aADQ,MAAM,yBAAyB,OAAO,IAAI,GAAG,CACjC;UACnB,OAAO;AACf,SAAO,YAAY,OAAO,uCAAuC,4BAA4B;;;AAI/F,MAAa,OAAiB,OAAO,EAAE,QAAQ,SAAS,aAAa;CACpE,MAAM,EAAE,QAAQ,SAAS;CACzB,MAAM,KAAK,OAAO;CAElB,MAAM,QAAQ,UAAU,QAAQ,GAAG;AACnC,KAAI,MAAO,QAAO;CAElB,MAAM,SAAS,YAAY,MAAM,iBAAiB;AAClD,KAAI,OAAQ,QAAO;AAEnB,KAAI;EACH,MAAM,OAAO,MAAM,UAAU,SAAS,4BAA4B;AAClE,MAAI,aAAa,KAAK,CAAE,QAAO;EAS/B,MAAM,SAAS,MADF,IAAI,iBAAiB,OAAO,GAAG,CAClB,SAAS,GAAG;AACtC,MAAI,CAAC,OACJ,QAAO,IAAI,SACV,KAAK,UAAU,EAAE,OAAO;GAAE,MAAM;GAAa,SAAS;GAAoB,EAAE,CAAC,EAC7E;GAAE,QAAQ;GAAK,SAAS,EAAE,gBAAgB,oBAAoB;GAAE,CAChE;EAGF,MAAM,SAAS,MAAM,mBAAmB,OAAO,IAAI;GAClD,MAAM,KAAK,QAAQ,OAAO;GAC1B,aAAa,KAAK,eAAe,OAAO;GACxC,KAAK,KAAK,OAAO;GACjB,eAAe,KAAK,iBAAiB,OAAO;GAC5C,YAAY,KAAK,cAAc,OAAO;GAKtC,QAAQ;GACR,SAAS,OAAO;GAChB,QAAQ,KAAK;GACb,eAAe;GACf,CAAC;AAEF,MAAI,OAAO,QAAS,wCAAuB;AAC3C,SAAO,aAAa,QAAQ,IAAI;UACxB,OAAO;AACf,SAAO,YACN,OACA,uCACA,kCACA"}
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import "../../../../../dialect-helpers-BKCvISIQ.mjs";
|
|
2
2
|
import { n as getI18nConfig } from "../../../../../config-CVssduLe.mjs";
|
|
3
3
|
import "../../../../../base64-CqR-7kqF.mjs";
|
|
4
|
-
import "../../../../../types-
|
|
5
|
-
import
|
|
6
|
-
import "../../../../../
|
|
7
|
-
import "../../../../../
|
|
8
|
-
import "../../../../../
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import "../../../../../
|
|
4
|
+
import "../../../../../types-SF1DwGf2.mjs";
|
|
5
|
+
import "../../../../../request-cache-BYMs-BGX.mjs";
|
|
6
|
+
import "../../../../../byline-registry-CxK5g559.mjs";
|
|
7
|
+
import { t as BylineRepository } from "../../../../../byline-BrIVWLm-.mjs";
|
|
8
|
+
import "../../../../../loader-CJ6lWO0d.mjs";
|
|
9
|
+
import "../../../../../resolve-BqYMVG0D.mjs";
|
|
10
|
+
import { a as unwrapResult, n as apiSuccess, r as handleError, t as apiError } from "../../../../../error-npZWBSb7.mjs";
|
|
11
|
+
import { i as parseQuery, n as parseBody, t as isParseError } from "../../../../../parse-4zO5Y2DL.mjs";
|
|
12
|
+
import { Cn as bylinesListQuery, gn as bylineCreateBody } from "../../../../../redirects-C0L9JUk4.mjs";
|
|
13
|
+
import "../../../../../byline-fields-Dr-xcb6S.mjs";
|
|
13
14
|
import "../../../../../api/schemas/index.mjs";
|
|
14
|
-
import { i as invalidateBylineCache } from "../../../../../bylines-
|
|
15
|
-
import { n as requirePerm } from "../../../../../authorize-
|
|
16
|
-
import { t as handleBylineCreate } from "../../../../../bylines-
|
|
15
|
+
import { i as invalidateBylineCache } from "../../../../../bylines-C_POWmGT.mjs";
|
|
16
|
+
import { n as requirePerm } from "../../../../../authorize-_wWM_44T.mjs";
|
|
17
|
+
import { t as handleBylineCreate } from "../../../../../bylines-sqExMElV.mjs";
|
|
17
18
|
|
|
18
19
|
//#region src/astro/routes/api/admin/bylines/index.ts
|
|
19
20
|
const prerender = false;
|
|
@@ -56,7 +57,8 @@ const POST = async ({ request, locals }) => {
|
|
|
56
57
|
userId: body.userId ?? null,
|
|
57
58
|
isGuest: body.isGuest,
|
|
58
59
|
locale: body.locale,
|
|
59
|
-
translationOf: body.translationOf
|
|
60
|
+
translationOf: body.translationOf,
|
|
61
|
+
customFields: body.customFields
|
|
60
62
|
});
|
|
61
63
|
if (result.success) /* @__PURE__ */ invalidateBylineCache();
|
|
62
64
|
return unwrapResult(result, 201);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../../../../../../src/astro/routes/api/admin/bylines/index.ts"],"sourcesContent":["import type { APIRoute } from \"astro\";\n\nimport { requirePerm } from \"#api/authorize.js\";\nimport { apiError, apiSuccess, handleError, unwrapResult } from \"#api/error.js\";\nimport { handleBylineCreate } from \"#api/handlers/bylines.js\";\nimport { isParseError, parseBody, parseQuery } from \"#api/parse.js\";\nimport { bylineCreateBody, bylinesListQuery } from \"#api/schemas.js\";\nimport { invalidateBylineCache } from \"#bylines/index.js\";\nimport { BylineRepository } from \"#db/repositories/byline.js\";\n\nimport { getI18nConfig } from \"../../../../../i18n/config.js\";\n\nexport const prerender = false;\n\nexport const GET: APIRoute = async ({ url, locals }) => {\n\tconst { emdash, user } = locals;\n\n\tif (!emdash?.db) {\n\t\treturn apiError(\"NOT_CONFIGURED\", \"EmDash is not initialized\", 500);\n\t}\n\n\tconst denied = requirePerm(user, \"bylines:read\");\n\tif (denied) return denied;\n\n\tconst query = parseQuery(url, bylinesListQuery);\n\tif (isParseError(query)) return query;\n\n\tconst i18n = getI18nConfig();\n\tif (query.locale && i18n && !i18n.locales.includes(query.locale)) {\n\t\treturn apiError(\n\t\t\t\"VALIDATION_ERROR\",\n\t\t\t`Locale \"${query.locale}\" is not configured for this site`,\n\t\t\t400,\n\t\t);\n\t}\n\n\ttry {\n\t\tconst repo = new BylineRepository(emdash.db);\n\t\tconst result = await repo.findMany({\n\t\t\tsearch: query.search,\n\t\t\tisGuest: query.isGuest,\n\t\t\tuserId: query.userId,\n\t\t\tlocale: query.locale,\n\t\t\tcursor: query.cursor,\n\t\t\tlimit: query.limit,\n\t\t});\n\n\t\treturn apiSuccess(result);\n\t} catch (error) {\n\t\treturn handleError(error, \"Failed to list bylines\", \"BYLINE_LIST_ERROR\");\n\t}\n};\n\nexport const POST: APIRoute = async ({ request, locals }) => {\n\tconst { emdash, user } = locals;\n\n\tif (!emdash?.db) {\n\t\treturn apiError(\"NOT_CONFIGURED\", \"EmDash is not initialized\", 500);\n\t}\n\n\tconst denied = requirePerm(user, \"bylines:manage\");\n\tif (denied) return denied;\n\n\tconst body = await parseBody(request, bylineCreateBody);\n\tif (isParseError(body)) return body;\n\n\ttry {\n\t\tconst result = await handleBylineCreate(emdash.db, {\n\t\t\tslug: body.slug,\n\t\t\tdisplayName: body.displayName,\n\t\t\tbio: body.bio ?? null,\n\t\t\tavatarMediaId: body.avatarMediaId ?? null,\n\t\t\twebsiteUrl: body.websiteUrl ?? null,\n\t\t\tuserId: body.userId ?? null,\n\t\t\tisGuest: body.isGuest,\n\t\t\tlocale: body.locale,\n\t\t\ttranslationOf: body.translationOf,\n\t\t});\n\n\t\tif (result.success) invalidateBylineCache();\n\t\treturn unwrapResult(result, 201);\n\t} catch (error) {\n\t\treturn handleError(error, \"Failed to create byline\", \"BYLINE_CREATE_ERROR\");\n\t}\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../../../../../src/astro/routes/api/admin/bylines/index.ts"],"sourcesContent":["import type { APIRoute } from \"astro\";\n\nimport { requirePerm } from \"#api/authorize.js\";\nimport { apiError, apiSuccess, handleError, unwrapResult } from \"#api/error.js\";\nimport { handleBylineCreate } from \"#api/handlers/bylines.js\";\nimport { isParseError, parseBody, parseQuery } from \"#api/parse.js\";\nimport { bylineCreateBody, bylinesListQuery } from \"#api/schemas.js\";\nimport { invalidateBylineCache } from \"#bylines/index.js\";\nimport { BylineRepository } from \"#db/repositories/byline.js\";\n\nimport { getI18nConfig } from \"../../../../../i18n/config.js\";\n\nexport const prerender = false;\n\nexport const GET: APIRoute = async ({ url, locals }) => {\n\tconst { emdash, user } = locals;\n\n\tif (!emdash?.db) {\n\t\treturn apiError(\"NOT_CONFIGURED\", \"EmDash is not initialized\", 500);\n\t}\n\n\tconst denied = requirePerm(user, \"bylines:read\");\n\tif (denied) return denied;\n\n\tconst query = parseQuery(url, bylinesListQuery);\n\tif (isParseError(query)) return query;\n\n\tconst i18n = getI18nConfig();\n\tif (query.locale && i18n && !i18n.locales.includes(query.locale)) {\n\t\treturn apiError(\n\t\t\t\"VALIDATION_ERROR\",\n\t\t\t`Locale \"${query.locale}\" is not configured for this site`,\n\t\t\t400,\n\t\t);\n\t}\n\n\ttry {\n\t\tconst repo = new BylineRepository(emdash.db);\n\t\tconst result = await repo.findMany({\n\t\t\tsearch: query.search,\n\t\t\tisGuest: query.isGuest,\n\t\t\tuserId: query.userId,\n\t\t\tlocale: query.locale,\n\t\t\tcursor: query.cursor,\n\t\t\tlimit: query.limit,\n\t\t});\n\n\t\treturn apiSuccess(result);\n\t} catch (error) {\n\t\treturn handleError(error, \"Failed to list bylines\", \"BYLINE_LIST_ERROR\");\n\t}\n};\n\nexport const POST: APIRoute = async ({ request, locals }) => {\n\tconst { emdash, user } = locals;\n\n\tif (!emdash?.db) {\n\t\treturn apiError(\"NOT_CONFIGURED\", \"EmDash is not initialized\", 500);\n\t}\n\n\tconst denied = requirePerm(user, \"bylines:manage\");\n\tif (denied) return denied;\n\n\tconst body = await parseBody(request, bylineCreateBody);\n\tif (isParseError(body)) return body;\n\n\ttry {\n\t\tconst result = await handleBylineCreate(emdash.db, {\n\t\t\tslug: body.slug,\n\t\t\tdisplayName: body.displayName,\n\t\t\tbio: body.bio ?? null,\n\t\t\tavatarMediaId: body.avatarMediaId ?? null,\n\t\t\twebsiteUrl: body.websiteUrl ?? null,\n\t\t\tuserId: body.userId ?? null,\n\t\t\tisGuest: body.isGuest,\n\t\t\tlocale: body.locale,\n\t\t\ttranslationOf: body.translationOf,\n\t\t\tcustomFields: body.customFields,\n\t\t});\n\n\t\tif (result.success) invalidateBylineCache();\n\t\treturn unwrapResult(result, 201);\n\t} catch (error) {\n\t\treturn handleError(error, \"Failed to create byline\", \"BYLINE_CREATE_ERROR\");\n\t}\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAYA,MAAa,YAAY;AAEzB,MAAa,MAAgB,OAAO,EAAE,KAAK,aAAa;CACvD,MAAM,EAAE,QAAQ,SAAS;AAEzB,KAAI,CAAC,QAAQ,GACZ,QAAO,SAAS,kBAAkB,6BAA6B,IAAI;CAGpE,MAAM,SAAS,YAAY,MAAM,eAAe;AAChD,KAAI,OAAQ,QAAO;CAEnB,MAAM,QAAQ,WAAW,KAAK,iBAAiB;AAC/C,KAAI,aAAa,MAAM,CAAE,QAAO;CAEhC,MAAM,OAAO,eAAe;AAC5B,KAAI,MAAM,UAAU,QAAQ,CAAC,KAAK,QAAQ,SAAS,MAAM,OAAO,CAC/D,QAAO,SACN,oBACA,WAAW,MAAM,OAAO,oCACxB,IACA;AAGF,KAAI;AAWH,SAAO,WATQ,MADF,IAAI,iBAAiB,OAAO,GAAG,CAClB,SAAS;GAClC,QAAQ,MAAM;GACd,SAAS,MAAM;GACf,QAAQ,MAAM;GACd,QAAQ,MAAM;GACd,QAAQ,MAAM;GACd,OAAO,MAAM;GACb,CAAC,CAEuB;UACjB,OAAO;AACf,SAAO,YAAY,OAAO,0BAA0B,oBAAoB;;;AAI1E,MAAa,OAAiB,OAAO,EAAE,SAAS,aAAa;CAC5D,MAAM,EAAE,QAAQ,SAAS;AAEzB,KAAI,CAAC,QAAQ,GACZ,QAAO,SAAS,kBAAkB,6BAA6B,IAAI;CAGpE,MAAM,SAAS,YAAY,MAAM,iBAAiB;AAClD,KAAI,OAAQ,QAAO;CAEnB,MAAM,OAAO,MAAM,UAAU,SAAS,iBAAiB;AACvD,KAAI,aAAa,KAAK,CAAE,QAAO;AAE/B,KAAI;EACH,MAAM,SAAS,MAAM,mBAAmB,OAAO,IAAI;GAClD,MAAM,KAAK;GACX,aAAa,KAAK;GAClB,KAAK,KAAK,OAAO;GACjB,eAAe,KAAK,iBAAiB;GACrC,YAAY,KAAK,cAAc;GAC/B,QAAQ,KAAK,UAAU;GACvB,SAAS,KAAK;GACd,QAAQ,KAAK;GACb,eAAe,KAAK;GACpB,cAAc,KAAK;GACnB,CAAC;AAEF,MAAI,OAAO,QAAS,wCAAuB;AAC3C,SAAO,aAAa,QAAQ,IAAI;UACxB,OAAO;AACf,SAAO,YAAY,OAAO,2BAA2B,sBAAsB"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import "../../../../../../base64-CqR-7kqF.mjs";
|
|
2
|
-
import "../../../../../../types-
|
|
3
|
-
import "../../../../../../comment-
|
|
2
|
+
import "../../../../../../types-SF1DwGf2.mjs";
|
|
3
|
+
import "../../../../../../comment-Cd29aktf.mjs";
|
|
4
4
|
import "../../../../../../options-BL4X94qY.mjs";
|
|
5
|
-
import { a as unwrapResult, i as requireDb, n as apiSuccess, r as handleError, t as apiError } from "../../../../../../error-
|
|
6
|
-
import { n as parseBody, t as isParseError } from "../../../../../../parse-
|
|
7
|
-
import { vt as commentStatusBody } from "../../../../../../redirects-
|
|
8
|
-
import "../../../../../../
|
|
5
|
+
import { a as unwrapResult, i as requireDb, n as apiSuccess, r as handleError, t as apiError } from "../../../../../../error-npZWBSb7.mjs";
|
|
6
|
+
import { n as parseBody, t as isParseError } from "../../../../../../parse-4zO5Y2DL.mjs";
|
|
7
|
+
import { vt as commentStatusBody } from "../../../../../../redirects-C0L9JUk4.mjs";
|
|
8
|
+
import "../../../../../../byline-fields-Dr-xcb6S.mjs";
|
|
9
9
|
import "../../../../../../api/schemas/index.mjs";
|
|
10
|
-
import { n as requirePerm } from "../../../../../../authorize-
|
|
11
|
-
import { a as handleCommentGet } from "../../../../../../comments-
|
|
12
|
-
import { t as getSiteBaseUrl } from "../../../../../../site-url-
|
|
13
|
-
import { i as sendCommentNotification, n as moderateComment, r as lookupContentAuthor } from "../../../../../../service-
|
|
10
|
+
import { n as requirePerm } from "../../../../../../authorize-_wWM_44T.mjs";
|
|
11
|
+
import { a as handleCommentGet } from "../../../../../../comments-B7ufhkxN.mjs";
|
|
12
|
+
import { t as getSiteBaseUrl } from "../../../../../../site-url-Cm8-sJy7.mjs";
|
|
13
|
+
import { i as sendCommentNotification, n as moderateComment, r as lookupContentAuthor } from "../../../../../../service-Cn-kIfZn.mjs";
|
|
14
14
|
|
|
15
15
|
//#region src/astro/routes/api/admin/comments/[id]/status.ts
|
|
16
16
|
const prerender = false;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "../../../../../base64-CqR-7kqF.mjs";
|
|
2
|
-
import "../../../../../types-
|
|
3
|
-
import "../../../../../comment-
|
|
4
|
-
import { a as unwrapResult, i as requireDb, r as handleError, t as apiError } from "../../../../../error-
|
|
5
|
-
import { n as requirePerm } from "../../../../../authorize-
|
|
6
|
-
import { a as handleCommentGet, i as handleCommentDelete } from "../../../../../comments-
|
|
2
|
+
import "../../../../../types-SF1DwGf2.mjs";
|
|
3
|
+
import "../../../../../comment-Cd29aktf.mjs";
|
|
4
|
+
import { a as unwrapResult, i as requireDb, r as handleError, t as apiError } from "../../../../../error-npZWBSb7.mjs";
|
|
5
|
+
import { n as requirePerm } from "../../../../../authorize-_wWM_44T.mjs";
|
|
6
|
+
import { a as handleCommentGet, i as handleCommentDelete } from "../../../../../comments-B7ufhkxN.mjs";
|
|
7
7
|
|
|
8
8
|
//#region src/astro/routes/api/admin/comments/[id].ts
|
|
9
9
|
const prerender = false;
|