emdash 0.16.1 → 0.17.1
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-CuuZG6op.mjs} +93 -31
- package/dist/apply-CuuZG6op.mjs.map +1 -0
- package/dist/astro/index.d.mts +10 -10
- package/dist/astro/index.mjs +28 -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 +140 -32
- 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-Bt52mHXp.mjs} +19 -18
- package/dist/query-Bt52mHXp.mjs.map +1 -0
- 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-ByLlXrv5.mjs} +8 -8
- package/dist/{taxonomies-CcvrMLbR.mjs.map → taxonomies-ByLlXrv5.mjs.map} +1 -1
- package/dist/{taxonomies-4vx0nmMr.mjs → taxonomies-CbO6v7EE.mjs} +4 -4
- package/dist/{taxonomies-4vx0nmMr.mjs.map → taxonomies-CbO6v7EE.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-CWbvq9LG.mjs +7 -0
- package/dist/{version-ITD3PlQd.mjs.map → version-CWbvq9LG.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/integration/vite-config.ts +16 -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/cli/commands/export-seed.ts +174 -12
- 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/query.ts +7 -7
- 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/query-7m6-l0f_.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,29 +1,30 @@
|
|
|
1
|
-
import { r as runMigrations } from "../../../../runner-
|
|
1
|
+
import { r as runMigrations } from "../../../../runner-eAgyIkeg.mjs";
|
|
2
2
|
import "../../../../dialect-helpers-BKCvISIQ.mjs";
|
|
3
|
-
import "../../../../content-
|
|
3
|
+
import "../../../../content-BbqKo3Kc.mjs";
|
|
4
4
|
import "../../../../base64-CqR-7kqF.mjs";
|
|
5
|
-
import "../../../../types-
|
|
6
|
-
import "../../../../media-
|
|
7
|
-
import "../../../../taxonomy-
|
|
5
|
+
import "../../../../types-SF1DwGf2.mjs";
|
|
6
|
+
import "../../../../media-jk_HzzOl.mjs";
|
|
7
|
+
import "../../../../taxonomy-BBK-UAEo.mjs";
|
|
8
8
|
import { t as OptionsRepository } from "../../../../options-BL4X94qY.mjs";
|
|
9
|
-
import "../../../../redirect-
|
|
10
|
-
import "../../../../
|
|
11
|
-
import "../../../../
|
|
12
|
-
import "../../../../
|
|
13
|
-
import "../../../../
|
|
14
|
-
import "../../../../
|
|
15
|
-
import "../../../../
|
|
16
|
-
import "../../../../
|
|
17
|
-
import
|
|
18
|
-
import "../../../../
|
|
19
|
-
import
|
|
20
|
-
import { t as
|
|
21
|
-
import { t as
|
|
22
|
-
import {
|
|
23
|
-
import "../../../../
|
|
24
|
-
import
|
|
25
|
-
import { t as
|
|
26
|
-
import { t as
|
|
9
|
+
import "../../../../redirect-BZUJltlj.mjs";
|
|
10
|
+
import "../../../../request-cache-BYMs-BGX.mjs";
|
|
11
|
+
import "../../../../byline-registry-CxK5g559.mjs";
|
|
12
|
+
import "../../../../byline-BrIVWLm-.mjs";
|
|
13
|
+
import "../../../../fts-manager-DmUAk-kQ.mjs";
|
|
14
|
+
import "../../../../registry-Dn6gsx3L.mjs";
|
|
15
|
+
import "../../../../loader-CJ6lWO0d.mjs";
|
|
16
|
+
import "../../../../settings-ChlQbwU0.mjs";
|
|
17
|
+
import "../../../../ssrf-BsVGIE0Z.mjs";
|
|
18
|
+
import { n as apiSuccess, r as handleError, t as apiError } from "../../../../error-npZWBSb7.mjs";
|
|
19
|
+
import "../../../../ssrf-BvgVcfNQ.mjs";
|
|
20
|
+
import { t as validateSeed } from "../../../../validate-DactmcJG.mjs";
|
|
21
|
+
import { t as applySeed } from "../../../../apply-CuuZG6op.mjs";
|
|
22
|
+
import { t as loadSeed } from "../../../../load-DsoLq7ex.mjs";
|
|
23
|
+
import { n as getPublicOrigin } from "../../../../public-url-egRHCy1m.mjs";
|
|
24
|
+
import "../../../../api-tokens-B6VgoE6M.mjs";
|
|
25
|
+
import { t as handleApiTokenCreate } from "../../../../api-tokens-VrXNiNvV.mjs";
|
|
26
|
+
import { t as escapeHtml } from "../../../../escape-bIyGoW5W.mjs";
|
|
27
|
+
import { t as isSafeRedirect } from "../../../../redirect-Cw3JTlmj.mjs";
|
|
27
28
|
import { ulid } from "ulidx";
|
|
28
29
|
|
|
29
30
|
//#region src/astro/routes/api/setup/dev-bypass.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev-bypass.mjs","names":[],"sources":["../../../../../src/astro/routes/api/setup/dev-bypass.ts"],"sourcesContent":["/**\n * POST /_emdash/api/setup/dev-bypass\n * GET /_emdash/api/setup/dev-bypass\n *\n * Development-only endpoint to bypass the setup wizard.\n * Runs migrations, creates a dev admin user, and marks setup complete.\n *\n * ONLY available when import.meta.env.DEV is true.\n *\n * Usage:\n * - GET with redirect: /_emdash/api/setup/dev-bypass?redirect=/_emdash/admin\n * - POST for API: Returns JSON with setup info\n *\n * For agent/browser testing, navigate to:\n * /_emdash/api/setup/dev-bypass?redirect=/_emdash/admin\n */\n\nimport type { APIRoute } from \"astro\";\n\nexport const prerender = false;\n\nimport { ulid } from \"ulidx\";\n\nimport { apiError, apiSuccess, handleError } from \"#api/error.js\";\nimport { escapeHtml } from \"#api/escape.js\";\nimport { handleApiTokenCreate } from \"#api/handlers/api-tokens.js\";\nimport { getPublicOrigin } from \"#api/public-url.js\";\nimport { isSafeRedirect } from \"#api/redirect.js\";\nimport { runMigrations } from \"#db/migrations/runner.js\";\nimport { OptionsRepository } from \"#db/repositories/options.js\";\nimport { applySeed } from \"#seed/apply.js\";\nimport { loadSeed } from \"#seed/load.js\";\nimport { validateSeed } from \"#seed/validate.js\";\n\n// RBAC role levels (matching @emdash-cms/auth)\nconst ROLE_ADMIN = 50;\n\nconst DEV_USER_EMAIL = \"dev@emdash.local\";\nconst DEV_USER_NAME = \"Dev Admin\";\nconst DEV_SITE_TITLE = \"EmDash Dev Site\";\n\nasync function handleDevBypass(context: Parameters<APIRoute>[0]): Promise<Response> {\n\t// CRITICAL: Only allow in development mode\n\tif (!import.meta.env.DEV) {\n\t\treturn apiError(\"FORBIDDEN\", \"Dev bypass is only available in development mode\", 403);\n\t}\n\n\tconst { locals, url, session } = context;\n\tconst { emdash } = locals;\n\n\tif (!emdash?.db) {\n\t\treturn apiError(\"NOT_CONFIGURED\", \"EmDash is not initialized\", 500);\n\t}\n\n\ttry {\n\t\t// Run migrations\n\t\tconst migrations = await runMigrations(emdash.db);\n\t\tconsole.log(\"[setup-dev-bypass] Migrations applied:\", migrations.applied);\n\n\t\t// Apply seed (user seed or built-in default)\n\t\tconst seed = await loadSeed();\n\t\tconst validation = validateSeed(seed);\n\t\tif (validation.valid) {\n\t\t\tconst seedResult = await applySeed(emdash.db, seed, {\n\t\t\t\tincludeContent: true,\n\t\t\t\tonConflict: \"skip\",\n\t\t\t\tstorage: emdash.storage ?? undefined,\n\t\t\t});\n\t\t\tconsole.log(\n\t\t\t\t`[setup-dev-bypass] Seed applied: ${seedResult.collections.created} collections, ${seedResult.fields.created} fields`,\n\t\t\t);\n\t\t}\n\n\t\tconst options = new OptionsRepository(emdash.db);\n\n\t\t// Find or create dev user (direct DB access to avoid @emdash-cms/auth import issues in dev)\n\t\tconst existingUser = await emdash.db\n\t\t\t.selectFrom(\"users\")\n\t\t\t.selectAll()\n\t\t\t.where(\"email\", \"=\", DEV_USER_EMAIL)\n\t\t\t.executeTakeFirst();\n\n\t\tlet user: { id: string; email: string; name: string; role: number };\n\t\tlet userCreated = false;\n\n\t\tif (!existingUser) {\n\t\t\tconst now = new Date().toISOString();\n\t\t\tconst newUser = {\n\t\t\t\tid: ulid(),\n\t\t\t\temail: DEV_USER_EMAIL,\n\t\t\t\tname: DEV_USER_NAME,\n\t\t\t\trole: ROLE_ADMIN,\n\t\t\t\temail_verified: 1,\n\t\t\t\tcreated_at: now,\n\t\t\t\tupdated_at: now,\n\t\t\t};\n\n\t\t\tawait emdash.db.insertInto(\"users\").values(newUser).execute();\n\n\t\t\tuser = {\n\t\t\t\tid: newUser.id,\n\t\t\t\temail: newUser.email,\n\t\t\t\tname: newUser.name,\n\t\t\t\trole: newUser.role,\n\t\t\t};\n\t\t\tuserCreated = true;\n\t\t\tconsole.log(\"[setup-dev-bypass] Created dev admin user:\", user.email);\n\t\t} else {\n\t\t\tuser = {\n\t\t\t\tid: existingUser.id,\n\t\t\t\temail: existingUser.email,\n\t\t\t\tname: existingUser.name || DEV_USER_NAME,\n\t\t\t\trole: existingUser.role,\n\t\t\t};\n\t\t}\n\n\t\t// Set site title if not already set\n\t\tconst existingTitle = await options.get(\"emdash:site_title\");\n\t\tif (!existingTitle) {\n\t\t\tawait options.set(\"emdash:site_title\", DEV_SITE_TITLE);\n\t\t}\n\n\t\t// Store canonical site URL (used by magic-link/recovery emails)\n\t\tawait options.set(\"emdash:site_url\", getPublicOrigin(url, emdash?.config));\n\n\t\t// Mark setup complete\n\t\tawait options.set(\"emdash:setup_complete\", true);\n\n\t\t// Create session\n\t\tif (session) {\n\t\t\tsession.set(\"user\", { id: user.id });\n\t\t}\n\n\t\t// Optionally create a PAT token (?token=1) for headless/CLI testing.\n\t\tlet token: string | undefined;\n\t\tif (url.searchParams.has(\"token\")) {\n\t\t\tconst result = await handleApiTokenCreate(emdash.db, user.id, {\n\t\t\t\tname: \"dev-bypass-token\",\n\t\t\t\tscopes: [\n\t\t\t\t\t\"content:read\",\n\t\t\t\t\t\"content:write\",\n\t\t\t\t\t\"media:read\",\n\t\t\t\t\t\"media:write\",\n\t\t\t\t\t\"schema:read\",\n\t\t\t\t\t\"schema:write\",\n\t\t\t\t\t\"admin\",\n\t\t\t\t],\n\t\t\t});\n\t\t\tif (result.success) {\n\t\t\t\ttoken = result.data.token;\n\t\t\t}\n\t\t}\n\n\t\t// Check for redirect parameter\n\t\tconst redirect = url.searchParams.get(\"redirect\");\n\n\t\tif (redirect) {\n\t\t\t// Validate redirect is a safe local path (prevent open redirect via //evil.com or /\\evil.com)\n\t\t\tif (!isSafeRedirect(redirect)) {\n\t\t\t\treturn apiError(\"INVALID_REDIRECT\", \"Redirect must be a local path\", 400);\n\t\t\t}\n\n\t\t\t// Return an HTML page with meta-refresh redirect\n\t\t\t// This ensures the session is fully saved before redirect\n\t\t\tconst safeRedirect = escapeHtml(redirect);\n\t\t\tconst html = `<!DOCTYPE html>\n<html>\n<head>\n\t<meta http-equiv=\"refresh\" content=\"0;url=${safeRedirect}\">\n</head>\n<body>Redirecting...</body>\n</html>`;\n\t\t\treturn new Response(html, {\n\t\t\t\tstatus: 200,\n\t\t\t\theaders: { \"Content-Type\": \"text/html\" },\n\t\t\t});\n\t\t}\n\n\t\t// Return JSON response\n\t\treturn apiSuccess({\n\t\t\tsuccess: true,\n\t\t\tmessage: \"Dev setup complete\",\n\t\t\tmigrations: migrations.applied,\n\t\t\tuserCreated,\n\t\t\tuser: {\n\t\t\t\tid: user.id,\n\t\t\t\temail: user.email,\n\t\t\t\tname: user.name,\n\t\t\t\trole: user.role,\n\t\t\t},\n\t\t\t...(token ? { token } : {}),\n\t\t});\n\t} catch (error) {\n\t\treturn handleError(error, \"Dev bypass failed\", \"DEV_BYPASS_ERROR\");\n\t}\n}\n\n// Support both GET and POST\nexport const GET: APIRoute = handleDevBypass;\nexport const POST: APIRoute = handleDevBypass;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"dev-bypass.mjs","names":[],"sources":["../../../../../src/astro/routes/api/setup/dev-bypass.ts"],"sourcesContent":["/**\n * POST /_emdash/api/setup/dev-bypass\n * GET /_emdash/api/setup/dev-bypass\n *\n * Development-only endpoint to bypass the setup wizard.\n * Runs migrations, creates a dev admin user, and marks setup complete.\n *\n * ONLY available when import.meta.env.DEV is true.\n *\n * Usage:\n * - GET with redirect: /_emdash/api/setup/dev-bypass?redirect=/_emdash/admin\n * - POST for API: Returns JSON with setup info\n *\n * For agent/browser testing, navigate to:\n * /_emdash/api/setup/dev-bypass?redirect=/_emdash/admin\n */\n\nimport type { APIRoute } from \"astro\";\n\nexport const prerender = false;\n\nimport { ulid } from \"ulidx\";\n\nimport { apiError, apiSuccess, handleError } from \"#api/error.js\";\nimport { escapeHtml } from \"#api/escape.js\";\nimport { handleApiTokenCreate } from \"#api/handlers/api-tokens.js\";\nimport { getPublicOrigin } from \"#api/public-url.js\";\nimport { isSafeRedirect } from \"#api/redirect.js\";\nimport { runMigrations } from \"#db/migrations/runner.js\";\nimport { OptionsRepository } from \"#db/repositories/options.js\";\nimport { applySeed } from \"#seed/apply.js\";\nimport { loadSeed } from \"#seed/load.js\";\nimport { validateSeed } from \"#seed/validate.js\";\n\n// RBAC role levels (matching @emdash-cms/auth)\nconst ROLE_ADMIN = 50;\n\nconst DEV_USER_EMAIL = \"dev@emdash.local\";\nconst DEV_USER_NAME = \"Dev Admin\";\nconst DEV_SITE_TITLE = \"EmDash Dev Site\";\n\nasync function handleDevBypass(context: Parameters<APIRoute>[0]): Promise<Response> {\n\t// CRITICAL: Only allow in development mode\n\tif (!import.meta.env.DEV) {\n\t\treturn apiError(\"FORBIDDEN\", \"Dev bypass is only available in development mode\", 403);\n\t}\n\n\tconst { locals, url, session } = context;\n\tconst { emdash } = locals;\n\n\tif (!emdash?.db) {\n\t\treturn apiError(\"NOT_CONFIGURED\", \"EmDash is not initialized\", 500);\n\t}\n\n\ttry {\n\t\t// Run migrations\n\t\tconst migrations = await runMigrations(emdash.db);\n\t\tconsole.log(\"[setup-dev-bypass] Migrations applied:\", migrations.applied);\n\n\t\t// Apply seed (user seed or built-in default)\n\t\tconst seed = await loadSeed();\n\t\tconst validation = validateSeed(seed);\n\t\tif (validation.valid) {\n\t\t\tconst seedResult = await applySeed(emdash.db, seed, {\n\t\t\t\tincludeContent: true,\n\t\t\t\tonConflict: \"skip\",\n\t\t\t\tstorage: emdash.storage ?? undefined,\n\t\t\t});\n\t\t\tconsole.log(\n\t\t\t\t`[setup-dev-bypass] Seed applied: ${seedResult.collections.created} collections, ${seedResult.fields.created} fields`,\n\t\t\t);\n\t\t}\n\n\t\tconst options = new OptionsRepository(emdash.db);\n\n\t\t// Find or create dev user (direct DB access to avoid @emdash-cms/auth import issues in dev)\n\t\tconst existingUser = await emdash.db\n\t\t\t.selectFrom(\"users\")\n\t\t\t.selectAll()\n\t\t\t.where(\"email\", \"=\", DEV_USER_EMAIL)\n\t\t\t.executeTakeFirst();\n\n\t\tlet user: { id: string; email: string; name: string; role: number };\n\t\tlet userCreated = false;\n\n\t\tif (!existingUser) {\n\t\t\tconst now = new Date().toISOString();\n\t\t\tconst newUser = {\n\t\t\t\tid: ulid(),\n\t\t\t\temail: DEV_USER_EMAIL,\n\t\t\t\tname: DEV_USER_NAME,\n\t\t\t\trole: ROLE_ADMIN,\n\t\t\t\temail_verified: 1,\n\t\t\t\tcreated_at: now,\n\t\t\t\tupdated_at: now,\n\t\t\t};\n\n\t\t\tawait emdash.db.insertInto(\"users\").values(newUser).execute();\n\n\t\t\tuser = {\n\t\t\t\tid: newUser.id,\n\t\t\t\temail: newUser.email,\n\t\t\t\tname: newUser.name,\n\t\t\t\trole: newUser.role,\n\t\t\t};\n\t\t\tuserCreated = true;\n\t\t\tconsole.log(\"[setup-dev-bypass] Created dev admin user:\", user.email);\n\t\t} else {\n\t\t\tuser = {\n\t\t\t\tid: existingUser.id,\n\t\t\t\temail: existingUser.email,\n\t\t\t\tname: existingUser.name || DEV_USER_NAME,\n\t\t\t\trole: existingUser.role,\n\t\t\t};\n\t\t}\n\n\t\t// Set site title if not already set\n\t\tconst existingTitle = await options.get(\"emdash:site_title\");\n\t\tif (!existingTitle) {\n\t\t\tawait options.set(\"emdash:site_title\", DEV_SITE_TITLE);\n\t\t}\n\n\t\t// Store canonical site URL (used by magic-link/recovery emails)\n\t\tawait options.set(\"emdash:site_url\", getPublicOrigin(url, emdash?.config));\n\n\t\t// Mark setup complete\n\t\tawait options.set(\"emdash:setup_complete\", true);\n\n\t\t// Create session\n\t\tif (session) {\n\t\t\tsession.set(\"user\", { id: user.id });\n\t\t}\n\n\t\t// Optionally create a PAT token (?token=1) for headless/CLI testing.\n\t\tlet token: string | undefined;\n\t\tif (url.searchParams.has(\"token\")) {\n\t\t\tconst result = await handleApiTokenCreate(emdash.db, user.id, {\n\t\t\t\tname: \"dev-bypass-token\",\n\t\t\t\tscopes: [\n\t\t\t\t\t\"content:read\",\n\t\t\t\t\t\"content:write\",\n\t\t\t\t\t\"media:read\",\n\t\t\t\t\t\"media:write\",\n\t\t\t\t\t\"schema:read\",\n\t\t\t\t\t\"schema:write\",\n\t\t\t\t\t\"admin\",\n\t\t\t\t],\n\t\t\t});\n\t\t\tif (result.success) {\n\t\t\t\ttoken = result.data.token;\n\t\t\t}\n\t\t}\n\n\t\t// Check for redirect parameter\n\t\tconst redirect = url.searchParams.get(\"redirect\");\n\n\t\tif (redirect) {\n\t\t\t// Validate redirect is a safe local path (prevent open redirect via //evil.com or /\\evil.com)\n\t\t\tif (!isSafeRedirect(redirect)) {\n\t\t\t\treturn apiError(\"INVALID_REDIRECT\", \"Redirect must be a local path\", 400);\n\t\t\t}\n\n\t\t\t// Return an HTML page with meta-refresh redirect\n\t\t\t// This ensures the session is fully saved before redirect\n\t\t\tconst safeRedirect = escapeHtml(redirect);\n\t\t\tconst html = `<!DOCTYPE html>\n<html>\n<head>\n\t<meta http-equiv=\"refresh\" content=\"0;url=${safeRedirect}\">\n</head>\n<body>Redirecting...</body>\n</html>`;\n\t\t\treturn new Response(html, {\n\t\t\t\tstatus: 200,\n\t\t\t\theaders: { \"Content-Type\": \"text/html\" },\n\t\t\t});\n\t\t}\n\n\t\t// Return JSON response\n\t\treturn apiSuccess({\n\t\t\tsuccess: true,\n\t\t\tmessage: \"Dev setup complete\",\n\t\t\tmigrations: migrations.applied,\n\t\t\tuserCreated,\n\t\t\tuser: {\n\t\t\t\tid: user.id,\n\t\t\t\temail: user.email,\n\t\t\t\tname: user.name,\n\t\t\t\trole: user.role,\n\t\t\t},\n\t\t\t...(token ? { token } : {}),\n\t\t});\n\t} catch (error) {\n\t\treturn handleError(error, \"Dev bypass failed\", \"DEV_BYPASS_ERROR\");\n\t}\n}\n\n// Support both GET and POST\nexport const GET: APIRoute = handleDevBypass;\nexport const POST: APIRoute = handleDevBypass;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBA,MAAa,YAAY;AAgBzB,MAAM,aAAa;AAEnB,MAAM,iBAAiB;AACvB,MAAM,gBAAgB;AACtB,MAAM,iBAAiB;AAEvB,eAAe,gBAAgB,SAAqD;AAEnF,KAAI,CAAC,OAAO,KAAK,IAAI,IACpB,QAAO,SAAS,aAAa,oDAAoD,IAAI;CAGtF,MAAM,EAAE,QAAQ,KAAK,YAAY;CACjC,MAAM,EAAE,WAAW;AAEnB,KAAI,CAAC,QAAQ,GACZ,QAAO,SAAS,kBAAkB,6BAA6B,IAAI;AAGpE,KAAI;EAEH,MAAM,aAAa,MAAM,cAAc,OAAO,GAAG;AACjD,UAAQ,IAAI,0CAA0C,WAAW,QAAQ;EAGzE,MAAM,OAAO,MAAM,UAAU;AAE7B,MADmB,aAAa,KAAK,CACtB,OAAO;GACrB,MAAM,aAAa,MAAM,UAAU,OAAO,IAAI,MAAM;IACnD,gBAAgB;IAChB,YAAY;IACZ,SAAS,OAAO,WAAW;IAC3B,CAAC;AACF,WAAQ,IACP,oCAAoC,WAAW,YAAY,QAAQ,gBAAgB,WAAW,OAAO,QAAQ,SAC7G;;EAGF,MAAM,UAAU,IAAI,kBAAkB,OAAO,GAAG;EAGhD,MAAM,eAAe,MAAM,OAAO,GAChC,WAAW,QAAQ,CACnB,WAAW,CACX,MAAM,SAAS,KAAK,eAAe,CACnC,kBAAkB;EAEpB,IAAI;EACJ,IAAI,cAAc;AAElB,MAAI,CAAC,cAAc;GAClB,MAAM,uBAAM,IAAI,MAAM,EAAC,aAAa;GACpC,MAAM,UAAU;IACf,IAAI,MAAM;IACV,OAAO;IACP,MAAM;IACN,MAAM;IACN,gBAAgB;IAChB,YAAY;IACZ,YAAY;IACZ;AAED,SAAM,OAAO,GAAG,WAAW,QAAQ,CAAC,OAAO,QAAQ,CAAC,SAAS;AAE7D,UAAO;IACN,IAAI,QAAQ;IACZ,OAAO,QAAQ;IACf,MAAM,QAAQ;IACd,MAAM,QAAQ;IACd;AACD,iBAAc;AACd,WAAQ,IAAI,8CAA8C,KAAK,MAAM;QAErE,QAAO;GACN,IAAI,aAAa;GACjB,OAAO,aAAa;GACpB,MAAM,aAAa,QAAQ;GAC3B,MAAM,aAAa;GACnB;AAKF,MAAI,CADkB,MAAM,QAAQ,IAAI,oBAAoB,CAE3D,OAAM,QAAQ,IAAI,qBAAqB,eAAe;AAIvD,QAAM,QAAQ,IAAI,mBAAmB,gBAAgB,KAAK,QAAQ,OAAO,CAAC;AAG1E,QAAM,QAAQ,IAAI,yBAAyB,KAAK;AAGhD,MAAI,QACH,SAAQ,IAAI,QAAQ,EAAE,IAAI,KAAK,IAAI,CAAC;EAIrC,IAAI;AACJ,MAAI,IAAI,aAAa,IAAI,QAAQ,EAAE;GAClC,MAAM,SAAS,MAAM,qBAAqB,OAAO,IAAI,KAAK,IAAI;IAC7D,MAAM;IACN,QAAQ;KACP;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD,CAAC;AACF,OAAI,OAAO,QACV,SAAQ,OAAO,KAAK;;EAKtB,MAAM,WAAW,IAAI,aAAa,IAAI,WAAW;AAEjD,MAAI,UAAU;AAEb,OAAI,CAAC,eAAe,SAAS,CAC5B,QAAO,SAAS,oBAAoB,iCAAiC,IAAI;GAM1E,MAAM,OAAO;;;6CADQ,WAAW,SAAS,CAIc;;;;AAIvD,UAAO,IAAI,SAAS,MAAM;IACzB,QAAQ;IACR,SAAS,EAAE,gBAAgB,aAAa;IACxC,CAAC;;AAIH,SAAO,WAAW;GACjB,SAAS;GACT,SAAS;GACT,YAAY,WAAW;GACvB;GACA,MAAM;IACL,IAAI,KAAK;IACT,OAAO,KAAK;IACZ,MAAM,KAAK;IACX,MAAM,KAAK;IACX;GACD,GAAI,QAAQ,EAAE,OAAO,GAAG,EAAE;GAC1B,CAAC;UACM,OAAO;AACf,SAAO,YAAY,OAAO,qBAAqB,mBAAmB;;;AAKpE,MAAa,MAAgB;AAC7B,MAAa,OAAiB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../../../../base64-CqR-7kqF.mjs";
|
|
2
|
-
import "../../../../types-
|
|
2
|
+
import "../../../../types-SF1DwGf2.mjs";
|
|
3
3
|
import { t as OptionsRepository } from "../../../../options-BL4X94qY.mjs";
|
|
4
|
-
import { n as apiSuccess, r as handleError, t as apiError } from "../../../../error-
|
|
4
|
+
import { n as apiSuccess, r as handleError, t as apiError } from "../../../../error-npZWBSb7.mjs";
|
|
5
5
|
|
|
6
6
|
//#region src/astro/routes/api/setup/dev-reset.ts
|
|
7
7
|
const prerender = false;
|
|
@@ -1,30 +1,31 @@
|
|
|
1
|
-
import { r as runMigrations } from "../../../../runner-
|
|
1
|
+
import { r as runMigrations } from "../../../../runner-eAgyIkeg.mjs";
|
|
2
2
|
import "../../../../dialect-helpers-BKCvISIQ.mjs";
|
|
3
|
-
import "../../../../content-
|
|
3
|
+
import "../../../../content-BbqKo3Kc.mjs";
|
|
4
4
|
import "../../../../base64-CqR-7kqF.mjs";
|
|
5
|
-
import "../../../../types-
|
|
6
|
-
import "../../../../media-
|
|
7
|
-
import "../../../../taxonomy-
|
|
5
|
+
import "../../../../types-SF1DwGf2.mjs";
|
|
6
|
+
import "../../../../media-jk_HzzOl.mjs";
|
|
7
|
+
import "../../../../taxonomy-BBK-UAEo.mjs";
|
|
8
8
|
import { t as OptionsRepository } from "../../../../options-BL4X94qY.mjs";
|
|
9
|
-
import "../../../../redirect-
|
|
10
|
-
import "../../../../
|
|
11
|
-
import "../../../../
|
|
12
|
-
import "../../../../
|
|
13
|
-
import "../../../../
|
|
14
|
-
import "../../../../
|
|
15
|
-
import "../../../../
|
|
16
|
-
import "../../../../
|
|
17
|
-
import
|
|
18
|
-
import { n as
|
|
19
|
-
import "../../../../
|
|
20
|
-
import
|
|
9
|
+
import "../../../../redirect-BZUJltlj.mjs";
|
|
10
|
+
import "../../../../request-cache-BYMs-BGX.mjs";
|
|
11
|
+
import "../../../../byline-registry-CxK5g559.mjs";
|
|
12
|
+
import "../../../../byline-BrIVWLm-.mjs";
|
|
13
|
+
import "../../../../fts-manager-DmUAk-kQ.mjs";
|
|
14
|
+
import "../../../../registry-Dn6gsx3L.mjs";
|
|
15
|
+
import "../../../../loader-CJ6lWO0d.mjs";
|
|
16
|
+
import "../../../../settings-ChlQbwU0.mjs";
|
|
17
|
+
import "../../../../ssrf-BsVGIE0Z.mjs";
|
|
18
|
+
import { n as apiSuccess, r as handleError, t as apiError } from "../../../../error-npZWBSb7.mjs";
|
|
19
|
+
import { n as parseBody, t as isParseError } from "../../../../parse-4zO5Y2DL.mjs";
|
|
20
|
+
import "../../../../redirects-C0L9JUk4.mjs";
|
|
21
|
+
import { d as setupBody } from "../../../../byline-fields-Dr-xcb6S.mjs";
|
|
21
22
|
import "../../../../api/schemas/index.mjs";
|
|
22
|
-
import "../../../../ssrf-
|
|
23
|
-
import { t as validateSeed } from "../../../../validate-
|
|
24
|
-
import { t as applySeed } from "../../../../apply-
|
|
25
|
-
import { t as loadSeed } from "../../../../load-
|
|
26
|
-
import { n as getPublicOrigin } from "../../../../public-url-
|
|
27
|
-
import { t as getAuthMode } from "../../../../mode-
|
|
23
|
+
import "../../../../ssrf-BvgVcfNQ.mjs";
|
|
24
|
+
import { t as validateSeed } from "../../../../validate-DactmcJG.mjs";
|
|
25
|
+
import { t as applySeed } from "../../../../apply-CuuZG6op.mjs";
|
|
26
|
+
import { t as loadSeed } from "../../../../load-DsoLq7ex.mjs";
|
|
27
|
+
import { n as getPublicOrigin } from "../../../../public-url-egRHCy1m.mjs";
|
|
28
|
+
import { t as getAuthMode } from "../../../../mode-BjlXswIw.mjs";
|
|
28
29
|
|
|
29
30
|
//#region src/astro/routes/api/setup/index.ts
|
|
30
31
|
const prerender = false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../../../../../src/astro/routes/api/setup/index.ts"],"sourcesContent":["/**\n * POST /_emdash/api/setup\n *\n * Executes the setup wizard - applies seed file and marks setup complete\n */\n\nimport type { APIRoute } from \"astro\";\n\nexport const prerender = false;\n\nimport { apiError, apiSuccess, handleError } from \"#api/error.js\";\nimport { isParseError, parseBody } from \"#api/parse.js\";\nimport { getPublicOrigin } from \"#api/public-url.js\";\nimport { setupBody } from \"#api/schemas.js\";\nimport { getAuthMode } from \"#auth/mode.js\";\nimport { runMigrations } from \"#db/migrations/runner.js\";\nimport { OptionsRepository } from \"#db/repositories/options.js\";\nimport { applySeed } from \"#seed/apply.js\";\nimport { loadSeed } from \"#seed/load.js\";\nimport { validateSeed } from \"#seed/validate.js\";\n\nexport const POST: APIRoute = async ({ request, url, locals }) => {\n\tconst { emdash } = locals;\n\n\tif (!emdash?.db) {\n\t\treturn apiError(\"NOT_CONFIGURED\", \"EmDash is not initialized\", 500);\n\t}\n\n\ttry {\n\t\t// Guard: reject if setup has already been completed.\n\t\t// The options table may not exist on first-ever setup (pre-migration),\n\t\t// so a query failure means setup hasn't run yet — allow it to proceed.\n\t\ttry {\n\t\t\tconst options = new OptionsRepository(emdash.db);\n\t\t\tconst setupComplete = await options.get(\"emdash:setup_complete\");\n\n\t\t\tif (setupComplete === true || setupComplete === \"true\") {\n\t\t\t\treturn apiError(\"ALREADY_CONFIGURED\", \"Setup has already been completed\", 409);\n\t\t\t}\n\t\t} catch {\n\t\t\t// Options table doesn't exist yet — first-ever setup, allow it\n\t\t}\n\n\t\t// Parse request body\n\t\tconst body = await parseBody(request, setupBody);\n\t\tif (isParseError(body)) return body;\n\n\t\t// 1. Run core migrations\n\t\ttry {\n\t\t\tawait runMigrations(emdash.db);\n\t\t} catch (error) {\n\t\t\treturn handleError(error, \"Failed to run database migrations\", \"MIGRATION_ERROR\");\n\t\t}\n\n\t\t// 2. Load seed file (user seed or built-in default)\n\t\tconst seed = await loadSeed();\n\n\t\t// 3. Override seed settings with form values\n\t\tseed.settings = {\n\t\t\t...seed.settings,\n\t\t\ttitle: body.title,\n\t\t\ttagline: body.tagline,\n\t\t};\n\n\t\t// 4. Apply seed\n\t\tconst validation = validateSeed(seed);\n\t\tif (!validation.valid) {\n\t\t\treturn apiError(\"INVALID_SEED\", `Invalid seed file: ${validation.errors.join(\", \")}`, 400);\n\t\t}\n\n\t\tlet result;\n\t\ttry {\n\t\t\tresult = await applySeed(emdash.db, seed, {\n\t\t\t\tincludeContent: body.includeContent,\n\t\t\t\tonConflict: \"skip\",\n\t\t\t\tstorage: emdash.storage ?? undefined,\n\t\t\t});\n\t\t} catch (error) {\n\t\t\treturn handleError(error, \"Failed to apply seed\", \"SEED_ERROR\");\n\t\t}\n\n\t\t// 5. Store setup state\n\t\t// In external auth mode, mark setup complete immediately (first user to login becomes admin)\n\t\t// Otherwise, setup_complete is set after admin user is created (passkey or auth provider)\n\t\tconst authMode = getAuthMode(emdash.config);\n\t\tconst useExternalAuth = authMode.type === \"external\";\n\n\t\ttry {\n\t\t\tconst options = new OptionsRepository(emdash.db);\n\n\t\t\t// Store the canonical site URL from the setup request.\n\t\t\t// Write-once at the DB level so concurrent setup POSTs can't both\n\t\t\t// observe an empty value and race to write. A spoofed Host header\n\t\t\t// on a later call during the wizard window must not be able to\n\t\t\t// replace the first value.\n\t\t\tconst siteUrl = getPublicOrigin(url, emdash.config);\n\t\t\tawait options.setIfAbsent(\"emdash:site_url\", siteUrl);\n\n\t\t\tif (useExternalAuth) {\n\t\t\t\t// External auth mode: mark setup complete now\n\t\t\t\t// First user to log in via external provider will become admin\n\t\t\t\tawait options.set(\"emdash:setup_complete\", true);\n\t\t\t\tawait options.set(\"emdash:site_title\", body.title);\n\t\t\t\tif (body.tagline) {\n\t\t\t\t\tawait options.set(\"emdash:site_tagline\", body.tagline);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Passkey/provider mode: store state for next step (admin creation)\n\t\t\t\tawait options.set(\"emdash:setup_state\", {\n\t\t\t\t\tstep: \"site_complete\",\n\t\t\t\t\ttitle: body.title,\n\t\t\t\t\ttagline: body.tagline,\n\t\t\t\t});\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tconsole.error(\"Failed to save setup state:\", error);\n\t\t\t// Non-fatal - continue anyway\n\t\t}\n\n\t\t// 6. Return success with result\n\t\treturn apiSuccess({\n\t\t\tsuccess: true,\n\t\t\t// In external auth mode, setup is complete - redirect to admin\n\t\t\tsetupComplete: useExternalAuth,\n\t\t\tresult,\n\t\t});\n\t} catch (error) {\n\t\treturn handleError(error, \"Setup failed\", \"SETUP_ERROR\");\n\t}\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../../../../src/astro/routes/api/setup/index.ts"],"sourcesContent":["/**\n * POST /_emdash/api/setup\n *\n * Executes the setup wizard - applies seed file and marks setup complete\n */\n\nimport type { APIRoute } from \"astro\";\n\nexport const prerender = false;\n\nimport { apiError, apiSuccess, handleError } from \"#api/error.js\";\nimport { isParseError, parseBody } from \"#api/parse.js\";\nimport { getPublicOrigin } from \"#api/public-url.js\";\nimport { setupBody } from \"#api/schemas.js\";\nimport { getAuthMode } from \"#auth/mode.js\";\nimport { runMigrations } from \"#db/migrations/runner.js\";\nimport { OptionsRepository } from \"#db/repositories/options.js\";\nimport { applySeed } from \"#seed/apply.js\";\nimport { loadSeed } from \"#seed/load.js\";\nimport { validateSeed } from \"#seed/validate.js\";\n\nexport const POST: APIRoute = async ({ request, url, locals }) => {\n\tconst { emdash } = locals;\n\n\tif (!emdash?.db) {\n\t\treturn apiError(\"NOT_CONFIGURED\", \"EmDash is not initialized\", 500);\n\t}\n\n\ttry {\n\t\t// Guard: reject if setup has already been completed.\n\t\t// The options table may not exist on first-ever setup (pre-migration),\n\t\t// so a query failure means setup hasn't run yet — allow it to proceed.\n\t\ttry {\n\t\t\tconst options = new OptionsRepository(emdash.db);\n\t\t\tconst setupComplete = await options.get(\"emdash:setup_complete\");\n\n\t\t\tif (setupComplete === true || setupComplete === \"true\") {\n\t\t\t\treturn apiError(\"ALREADY_CONFIGURED\", \"Setup has already been completed\", 409);\n\t\t\t}\n\t\t} catch {\n\t\t\t// Options table doesn't exist yet — first-ever setup, allow it\n\t\t}\n\n\t\t// Parse request body\n\t\tconst body = await parseBody(request, setupBody);\n\t\tif (isParseError(body)) return body;\n\n\t\t// 1. Run core migrations\n\t\ttry {\n\t\t\tawait runMigrations(emdash.db);\n\t\t} catch (error) {\n\t\t\treturn handleError(error, \"Failed to run database migrations\", \"MIGRATION_ERROR\");\n\t\t}\n\n\t\t// 2. Load seed file (user seed or built-in default)\n\t\tconst seed = await loadSeed();\n\n\t\t// 3. Override seed settings with form values\n\t\tseed.settings = {\n\t\t\t...seed.settings,\n\t\t\ttitle: body.title,\n\t\t\ttagline: body.tagline,\n\t\t};\n\n\t\t// 4. Apply seed\n\t\tconst validation = validateSeed(seed);\n\t\tif (!validation.valid) {\n\t\t\treturn apiError(\"INVALID_SEED\", `Invalid seed file: ${validation.errors.join(\", \")}`, 400);\n\t\t}\n\n\t\tlet result;\n\t\ttry {\n\t\t\tresult = await applySeed(emdash.db, seed, {\n\t\t\t\tincludeContent: body.includeContent,\n\t\t\t\tonConflict: \"skip\",\n\t\t\t\tstorage: emdash.storage ?? undefined,\n\t\t\t});\n\t\t} catch (error) {\n\t\t\treturn handleError(error, \"Failed to apply seed\", \"SEED_ERROR\");\n\t\t}\n\n\t\t// 5. Store setup state\n\t\t// In external auth mode, mark setup complete immediately (first user to login becomes admin)\n\t\t// Otherwise, setup_complete is set after admin user is created (passkey or auth provider)\n\t\tconst authMode = getAuthMode(emdash.config);\n\t\tconst useExternalAuth = authMode.type === \"external\";\n\n\t\ttry {\n\t\t\tconst options = new OptionsRepository(emdash.db);\n\n\t\t\t// Store the canonical site URL from the setup request.\n\t\t\t// Write-once at the DB level so concurrent setup POSTs can't both\n\t\t\t// observe an empty value and race to write. A spoofed Host header\n\t\t\t// on a later call during the wizard window must not be able to\n\t\t\t// replace the first value.\n\t\t\tconst siteUrl = getPublicOrigin(url, emdash.config);\n\t\t\tawait options.setIfAbsent(\"emdash:site_url\", siteUrl);\n\n\t\t\tif (useExternalAuth) {\n\t\t\t\t// External auth mode: mark setup complete now\n\t\t\t\t// First user to log in via external provider will become admin\n\t\t\t\tawait options.set(\"emdash:setup_complete\", true);\n\t\t\t\tawait options.set(\"emdash:site_title\", body.title);\n\t\t\t\tif (body.tagline) {\n\t\t\t\t\tawait options.set(\"emdash:site_tagline\", body.tagline);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Passkey/provider mode: store state for next step (admin creation)\n\t\t\t\tawait options.set(\"emdash:setup_state\", {\n\t\t\t\t\tstep: \"site_complete\",\n\t\t\t\t\ttitle: body.title,\n\t\t\t\t\ttagline: body.tagline,\n\t\t\t\t});\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tconsole.error(\"Failed to save setup state:\", error);\n\t\t\t// Non-fatal - continue anyway\n\t\t}\n\n\t\t// 6. Return success with result\n\t\treturn apiSuccess({\n\t\t\tsuccess: true,\n\t\t\t// In external auth mode, setup is complete - redirect to admin\n\t\t\tsetupComplete: useExternalAuth,\n\t\t\tresult,\n\t\t});\n\t} catch (error) {\n\t\treturn handleError(error, \"Setup failed\", \"SETUP_ERROR\");\n\t}\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,MAAa,YAAY;AAazB,MAAa,OAAiB,OAAO,EAAE,SAAS,KAAK,aAAa;CACjE,MAAM,EAAE,WAAW;AAEnB,KAAI,CAAC,QAAQ,GACZ,QAAO,SAAS,kBAAkB,6BAA6B,IAAI;AAGpE,KAAI;AAIH,MAAI;GAEH,MAAM,gBAAgB,MADN,IAAI,kBAAkB,OAAO,GAAG,CACZ,IAAI,wBAAwB;AAEhE,OAAI,kBAAkB,QAAQ,kBAAkB,OAC/C,QAAO,SAAS,sBAAsB,oCAAoC,IAAI;UAExE;EAKR,MAAM,OAAO,MAAM,UAAU,SAAS,UAAU;AAChD,MAAI,aAAa,KAAK,CAAE,QAAO;AAG/B,MAAI;AACH,SAAM,cAAc,OAAO,GAAG;WACtB,OAAO;AACf,UAAO,YAAY,OAAO,qCAAqC,kBAAkB;;EAIlF,MAAM,OAAO,MAAM,UAAU;AAG7B,OAAK,WAAW;GACf,GAAG,KAAK;GACR,OAAO,KAAK;GACZ,SAAS,KAAK;GACd;EAGD,MAAM,aAAa,aAAa,KAAK;AACrC,MAAI,CAAC,WAAW,MACf,QAAO,SAAS,gBAAgB,sBAAsB,WAAW,OAAO,KAAK,KAAK,IAAI,IAAI;EAG3F,IAAI;AACJ,MAAI;AACH,YAAS,MAAM,UAAU,OAAO,IAAI,MAAM;IACzC,gBAAgB,KAAK;IACrB,YAAY;IACZ,SAAS,OAAO,WAAW;IAC3B,CAAC;WACM,OAAO;AACf,UAAO,YAAY,OAAO,wBAAwB,aAAa;;EAOhE,MAAM,kBADW,YAAY,OAAO,OAAO,CACV,SAAS;AAE1C,MAAI;GACH,MAAM,UAAU,IAAI,kBAAkB,OAAO,GAAG;GAOhD,MAAM,UAAU,gBAAgB,KAAK,OAAO,OAAO;AACnD,SAAM,QAAQ,YAAY,mBAAmB,QAAQ;AAErD,OAAI,iBAAiB;AAGpB,UAAM,QAAQ,IAAI,yBAAyB,KAAK;AAChD,UAAM,QAAQ,IAAI,qBAAqB,KAAK,MAAM;AAClD,QAAI,KAAK,QACR,OAAM,QAAQ,IAAI,uBAAuB,KAAK,QAAQ;SAIvD,OAAM,QAAQ,IAAI,sBAAsB;IACvC,MAAM;IACN,OAAO,KAAK;IACZ,SAAS,KAAK;IACd,CAAC;WAEK,OAAO;AACf,WAAQ,MAAM,+BAA+B,MAAM;;AAKpD,SAAO,WAAW;GACjB,SAAS;GAET,eAAe;GACf;GACA,CAAC;UACM,OAAO;AACf,SAAO,YAAY,OAAO,gBAAgB,cAAc"}
|
|
@@ -1,8 +1,8 @@
|
|
|
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 loadUserSeed } from "../../../../load-
|
|
5
|
-
import { t as getAuthMode } from "../../../../mode-
|
|
2
|
+
import "../../../../types-SF1DwGf2.mjs";
|
|
3
|
+
import { n as apiSuccess, r as handleError, t as apiError } from "../../../../error-npZWBSb7.mjs";
|
|
4
|
+
import { n as loadUserSeed } from "../../../../load-DsoLq7ex.mjs";
|
|
5
|
+
import { t as getAuthMode } from "../../../../mode-BjlXswIw.mjs";
|
|
6
6
|
|
|
7
7
|
//#region src/astro/routes/api/setup/status.ts
|
|
8
8
|
const prerender = false;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "../../../base64-CqR-7kqF.mjs";
|
|
2
|
-
import "../../../types-
|
|
2
|
+
import "../../../types-SF1DwGf2.mjs";
|
|
3
3
|
import "../../../options-BL4X94qY.mjs";
|
|
4
|
-
import { n as apiSuccess, r as handleError, t as apiError } from "../../../error-
|
|
5
|
-
import { n as getPublicOrigin } from "../../../public-url-
|
|
6
|
-
import { i as resolveSecretsCached } from "../../../secrets-
|
|
7
|
-
import { n as requirePerm } from "../../../authorize-
|
|
4
|
+
import { n as apiSuccess, r as handleError, t as apiError } from "../../../error-npZWBSb7.mjs";
|
|
5
|
+
import { n as getPublicOrigin } from "../../../public-url-egRHCy1m.mjs";
|
|
6
|
+
import { i as resolveSecretsCached } from "../../../secrets-YYbTgB1w.mjs";
|
|
7
|
+
import { n as requirePerm } from "../../../authorize-_wWM_44T.mjs";
|
|
8
8
|
import { sql } from "kysely";
|
|
9
9
|
|
|
10
10
|
//#region src/api/handlers/snapshot.ts
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import "../../../../../../../dialect-helpers-BKCvISIQ.mjs";
|
|
2
2
|
import "../../../../../../../base64-CqR-7kqF.mjs";
|
|
3
|
-
import "../../../../../../../types-
|
|
4
|
-
import "../../../../../../../taxonomy-
|
|
5
|
-
import "../../../../../../../request-cache-
|
|
6
|
-
import "../../../../../../../loader-
|
|
7
|
-
import "../../../../../../../resolve-
|
|
8
|
-
import "../../../../../../../taxonomies-
|
|
9
|
-
import { a as handleTermGet, r as handleTermCreate, s as handleTermTranslations } from "../../../../../../../taxonomies-
|
|
10
|
-
import { a as unwrapResult, i as requireDb, r as handleError, t as apiError } from "../../../../../../../error-
|
|
11
|
-
import { i as parseQuery, n as parseBody, t as isParseError } from "../../../../../../../parse-
|
|
12
|
-
import { Mn as localeFilterQuery } from "../../../../../../../redirects-
|
|
13
|
-
import "../../../../../../../
|
|
3
|
+
import "../../../../../../../types-SF1DwGf2.mjs";
|
|
4
|
+
import "../../../../../../../taxonomy-BBK-UAEo.mjs";
|
|
5
|
+
import "../../../../../../../request-cache-BYMs-BGX.mjs";
|
|
6
|
+
import "../../../../../../../loader-CJ6lWO0d.mjs";
|
|
7
|
+
import "../../../../../../../resolve-BqYMVG0D.mjs";
|
|
8
|
+
import "../../../../../../../taxonomies-ByLlXrv5.mjs";
|
|
9
|
+
import { a as handleTermGet, r as handleTermCreate, s as handleTermTranslations } from "../../../../../../../taxonomies-CbO6v7EE.mjs";
|
|
10
|
+
import { a as unwrapResult, i as requireDb, 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 { Mn as localeFilterQuery } from "../../../../../../../redirects-C0L9JUk4.mjs";
|
|
13
|
+
import "../../../../../../../byline-fields-Dr-xcb6S.mjs";
|
|
14
14
|
import "../../../../../../../api/schemas/index.mjs";
|
|
15
|
-
import { n as requirePerm } from "../../../../../../../authorize-
|
|
15
|
+
import { n as requirePerm } from "../../../../../../../authorize-_wWM_44T.mjs";
|
|
16
16
|
import { z } from "zod";
|
|
17
17
|
|
|
18
18
|
//#region src/astro/routes/api/taxonomies/[name]/terms/[slug]/translations.ts
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import "../../../../../../dialect-helpers-BKCvISIQ.mjs";
|
|
2
2
|
import "../../../../../../base64-CqR-7kqF.mjs";
|
|
3
|
-
import "../../../../../../types-
|
|
4
|
-
import "../../../../../../taxonomy-
|
|
5
|
-
import "../../../../../../request-cache-
|
|
6
|
-
import "../../../../../../loader-
|
|
7
|
-
import "../../../../../../resolve-
|
|
8
|
-
import "../../../../../../taxonomies-
|
|
9
|
-
import { a as handleTermGet, c as handleTermUpdate, i as handleTermDelete } from "../../../../../../taxonomies-
|
|
10
|
-
import { a as unwrapResult, i as requireDb, r as handleError, t as apiError } from "../../../../../../error-
|
|
11
|
-
import { i as parseQuery, n as parseBody, t as isParseError } from "../../../../../../parse-
|
|
12
|
-
import { Mn as localeFilterQuery, Q as updateTermBody } from "../../../../../../redirects-
|
|
13
|
-
import "../../../../../../
|
|
3
|
+
import "../../../../../../types-SF1DwGf2.mjs";
|
|
4
|
+
import "../../../../../../taxonomy-BBK-UAEo.mjs";
|
|
5
|
+
import "../../../../../../request-cache-BYMs-BGX.mjs";
|
|
6
|
+
import "../../../../../../loader-CJ6lWO0d.mjs";
|
|
7
|
+
import "../../../../../../resolve-BqYMVG0D.mjs";
|
|
8
|
+
import "../../../../../../taxonomies-ByLlXrv5.mjs";
|
|
9
|
+
import { a as handleTermGet, c as handleTermUpdate, i as handleTermDelete } from "../../../../../../taxonomies-CbO6v7EE.mjs";
|
|
10
|
+
import { a as unwrapResult, i as requireDb, 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 { Mn as localeFilterQuery, Q as updateTermBody } from "../../../../../../redirects-C0L9JUk4.mjs";
|
|
13
|
+
import "../../../../../../byline-fields-Dr-xcb6S.mjs";
|
|
14
14
|
import "../../../../../../api/schemas/index.mjs";
|
|
15
|
-
import { n as requirePerm } from "../../../../../../authorize-
|
|
15
|
+
import { n as requirePerm } from "../../../../../../authorize-_wWM_44T.mjs";
|
|
16
16
|
|
|
17
17
|
//#region src/astro/routes/api/taxonomies/[name]/terms/[slug].ts
|
|
18
18
|
const prerender = false;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import "../../../../../../dialect-helpers-BKCvISIQ.mjs";
|
|
2
2
|
import "../../../../../../base64-CqR-7kqF.mjs";
|
|
3
|
-
import "../../../../../../types-
|
|
4
|
-
import "../../../../../../taxonomy-
|
|
5
|
-
import "../../../../../../request-cache-
|
|
6
|
-
import "../../../../../../loader-
|
|
7
|
-
import "../../../../../../resolve-
|
|
8
|
-
import "../../../../../../taxonomies-
|
|
9
|
-
import { o as handleTermList, r as handleTermCreate } from "../../../../../../taxonomies-
|
|
10
|
-
import { a as unwrapResult, i as requireDb, r as handleError, t as apiError } from "../../../../../../error-
|
|
11
|
-
import { i as parseQuery, n as parseBody, t as isParseError } from "../../../../../../parse-
|
|
12
|
-
import { H as createTermBody, Mn as localeFilterQuery } from "../../../../../../redirects-
|
|
13
|
-
import "../../../../../../
|
|
3
|
+
import "../../../../../../types-SF1DwGf2.mjs";
|
|
4
|
+
import "../../../../../../taxonomy-BBK-UAEo.mjs";
|
|
5
|
+
import "../../../../../../request-cache-BYMs-BGX.mjs";
|
|
6
|
+
import "../../../../../../loader-CJ6lWO0d.mjs";
|
|
7
|
+
import "../../../../../../resolve-BqYMVG0D.mjs";
|
|
8
|
+
import "../../../../../../taxonomies-ByLlXrv5.mjs";
|
|
9
|
+
import { o as handleTermList, r as handleTermCreate } from "../../../../../../taxonomies-CbO6v7EE.mjs";
|
|
10
|
+
import { a as unwrapResult, i as requireDb, 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 { H as createTermBody, Mn as localeFilterQuery } from "../../../../../../redirects-C0L9JUk4.mjs";
|
|
13
|
+
import "../../../../../../byline-fields-Dr-xcb6S.mjs";
|
|
14
14
|
import "../../../../../../api/schemas/index.mjs";
|
|
15
|
-
import { n as requirePerm } from "../../../../../../authorize-
|
|
15
|
+
import { n as requirePerm } from "../../../../../../authorize-_wWM_44T.mjs";
|
|
16
16
|
|
|
17
17
|
//#region src/astro/routes/api/taxonomies/[name]/terms/index.ts
|
|
18
18
|
const prerender = false;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import "../../../../dialect-helpers-BKCvISIQ.mjs";
|
|
2
2
|
import "../../../../base64-CqR-7kqF.mjs";
|
|
3
|
-
import "../../../../types-
|
|
4
|
-
import "../../../../taxonomy-
|
|
5
|
-
import "../../../../request-cache-
|
|
6
|
-
import "../../../../loader-
|
|
7
|
-
import "../../../../resolve-
|
|
8
|
-
import "../../../../taxonomies-
|
|
9
|
-
import { n as handleTaxonomyList, t as handleTaxonomyCreate } from "../../../../taxonomies-
|
|
10
|
-
import { a as unwrapResult, i as requireDb, r as handleError } from "../../../../error-
|
|
11
|
-
import { i as parseQuery, n as parseBody, t as isParseError } from "../../../../parse-
|
|
12
|
-
import { Mn as localeFilterQuery, V as createTaxonomyDefBody } from "../../../../redirects-
|
|
13
|
-
import "../../../../
|
|
3
|
+
import "../../../../types-SF1DwGf2.mjs";
|
|
4
|
+
import "../../../../taxonomy-BBK-UAEo.mjs";
|
|
5
|
+
import "../../../../request-cache-BYMs-BGX.mjs";
|
|
6
|
+
import "../../../../loader-CJ6lWO0d.mjs";
|
|
7
|
+
import "../../../../resolve-BqYMVG0D.mjs";
|
|
8
|
+
import "../../../../taxonomies-ByLlXrv5.mjs";
|
|
9
|
+
import { n as handleTaxonomyList, t as handleTaxonomyCreate } from "../../../../taxonomies-CbO6v7EE.mjs";
|
|
10
|
+
import { a as unwrapResult, i as requireDb, r as handleError } from "../../../../error-npZWBSb7.mjs";
|
|
11
|
+
import { i as parseQuery, n as parseBody, t as isParseError } from "../../../../parse-4zO5Y2DL.mjs";
|
|
12
|
+
import { Mn as localeFilterQuery, V as createTaxonomyDefBody } from "../../../../redirects-C0L9JUk4.mjs";
|
|
13
|
+
import "../../../../byline-fields-Dr-xcb6S.mjs";
|
|
14
14
|
import "../../../../api/schemas/index.mjs";
|
|
15
|
-
import { n as requirePerm } from "../../../../authorize-
|
|
15
|
+
import { n as requirePerm } from "../../../../authorize-_wWM_44T.mjs";
|
|
16
16
|
|
|
17
17
|
//#region src/astro/routes/api/taxonomies/index.ts
|
|
18
18
|
const prerender = false;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "../../../../base64-CqR-7kqF.mjs";
|
|
2
|
-
import "../../../../types-
|
|
2
|
+
import "../../../../types-SF1DwGf2.mjs";
|
|
3
3
|
import "../../../../options-BL4X94qY.mjs";
|
|
4
|
-
import { n as apiSuccess, t as apiError } from "../../../../error-
|
|
5
|
-
import { n as getPublicOrigin } from "../../../../public-url-
|
|
6
|
-
import { i as resolveSecretsCached } from "../../../../secrets-
|
|
7
|
-
import { n as requirePerm } from "../../../../authorize-
|
|
4
|
+
import { n as apiSuccess, t as apiError } from "../../../../error-npZWBSb7.mjs";
|
|
5
|
+
import { n as getPublicOrigin } from "../../../../public-url-egRHCy1m.mjs";
|
|
6
|
+
import { i as resolveSecretsCached } from "../../../../secrets-YYbTgB1w.mjs";
|
|
7
|
+
import { n as requirePerm } from "../../../../authorize-_wWM_44T.mjs";
|
|
8
8
|
|
|
9
9
|
//#region src/astro/routes/api/themes/preview.ts
|
|
10
10
|
const prerender = false;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../../../base64-CqR-7kqF.mjs";
|
|
2
|
-
import "../../../types-
|
|
3
|
-
import { n as apiSuccess, r as handleError, t as apiError } from "../../../error-
|
|
2
|
+
import "../../../types-SF1DwGf2.mjs";
|
|
3
|
+
import { n as apiSuccess, r as handleError, t as apiError } from "../../../error-npZWBSb7.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/astro/routes/api/typegen.ts
|
|
6
6
|
const prerender = false;
|
|
@@ -19,7 +19,7 @@ async function safeListCollections(registry) {
|
|
|
19
19
|
* Generate types content and metadata from the current schema.
|
|
20
20
|
*/
|
|
21
21
|
async function generateTypes(registry) {
|
|
22
|
-
const { generateTypesFile, generateSchemaHash } = await import("../../../zod-generator-
|
|
22
|
+
const { generateTypesFile, generateSchemaHash } = await import("../../../zod-generator-BNAObjSt.mjs").then((n) => n.r);
|
|
23
23
|
const collections = await safeListCollections(registry);
|
|
24
24
|
const collectionsWithFields = await Promise.all(collections.map(async (c) => {
|
|
25
25
|
const fields = await registry.listFields(c.id);
|
|
@@ -42,7 +42,7 @@ const GET = async ({ locals }) => {
|
|
|
42
42
|
const { emdash } = locals;
|
|
43
43
|
if (!emdash?.db) return apiError("NOT_CONFIGURED", "EmDash not configured", 500);
|
|
44
44
|
try {
|
|
45
|
-
const { SchemaRegistry } = await import("../../../registry-
|
|
45
|
+
const { SchemaRegistry } = await import("../../../registry-Dn6gsx3L.mjs").then((n) => n.r);
|
|
46
46
|
const { types } = await generateTypes(new SchemaRegistry(emdash.db));
|
|
47
47
|
return new Response(types, {
|
|
48
48
|
status: 200,
|
|
@@ -66,7 +66,7 @@ const POST = async ({ locals }) => {
|
|
|
66
66
|
const { emdash } = locals;
|
|
67
67
|
if (!emdash?.db) return apiError("NOT_CONFIGURED", "EmDash not configured", 500);
|
|
68
68
|
try {
|
|
69
|
-
const { SchemaRegistry } = await import("../../../registry-
|
|
69
|
+
const { SchemaRegistry } = await import("../../../registry-Dn6gsx3L.mjs").then((n) => n.r);
|
|
70
70
|
return apiSuccess(await generateTypes(new SchemaRegistry(emdash.db)));
|
|
71
71
|
} catch (error) {
|
|
72
72
|
return handleError(error, "Typegen failed", "TYPEGEN_ERROR");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as OptionsRepository } from "../../../../options-BL4X94qY.mjs";
|
|
2
|
-
import { t as getAuthMode } from "../../../../mode-
|
|
2
|
+
import { t as getAuthMode } from "../../../../mode-BjlXswIw.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/astro/routes/api/well-known/auth.ts
|
|
5
5
|
const prerender = false;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as getPublicOrigin } from "../../../../public-url-
|
|
2
|
-
import { n as VALID_SCOPES } from "../../../../api-tokens-
|
|
1
|
+
import { n as getPublicOrigin } from "../../../../public-url-egRHCy1m.mjs";
|
|
2
|
+
import { n as VALID_SCOPES } from "../../../../api-tokens-B6VgoE6M.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/astro/routes/api/well-known/oauth-authorization-server.ts
|
|
5
5
|
const prerender = false;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as getPublicOrigin } from "../../../../public-url-
|
|
2
|
-
import { n as VALID_SCOPES } from "../../../../api-tokens-
|
|
1
|
+
import { n as getPublicOrigin } from "../../../../public-url-egRHCy1m.mjs";
|
|
2
|
+
import { n as VALID_SCOPES } from "../../../../api-tokens-B6VgoE6M.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/astro/routes/api/well-known/oauth-protected-resource.ts
|
|
5
5
|
const prerender = false;
|
|
@@ -1,11 +1,11 @@
|
|
|
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 { h as reorderWidgetsBody } 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 { h as reorderWidgetsBody } from "../../../../../redirects-C0L9JUk4.mjs";
|
|
6
|
+
import "../../../../../byline-fields-Dr-xcb6S.mjs";
|
|
7
7
|
import "../../../../../api/schemas/index.mjs";
|
|
8
|
-
import { n as requirePerm } from "../../../../../authorize-
|
|
8
|
+
import { n as requirePerm } from "../../../../../authorize-_wWM_44T.mjs";
|
|
9
9
|
|
|
10
10
|
//#region src/astro/routes/api/widget-areas/[name]/reorder.ts
|
|
11
11
|
const prerender = false;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import "../../../../../../dialect-helpers-BKCvISIQ.mjs";
|
|
2
2
|
import "../../../../../../base64-CqR-7kqF.mjs";
|
|
3
|
-
import "../../../../../../types-
|
|
4
|
-
import "../../../../../../loader-
|
|
5
|
-
import { n as apiSuccess, r as handleError, t as apiError } from "../../../../../../error-
|
|
6
|
-
import { n as parseBody, t as isParseError } from "../../../../../../parse-
|
|
7
|
-
import { g as updateWidgetBody } from "../../../../../../redirects-
|
|
8
|
-
import "../../../../../../
|
|
3
|
+
import "../../../../../../types-SF1DwGf2.mjs";
|
|
4
|
+
import "../../../../../../loader-CJ6lWO0d.mjs";
|
|
5
|
+
import { 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 { g as updateWidgetBody } from "../../../../../../redirects-C0L9JUk4.mjs";
|
|
8
|
+
import "../../../../../../byline-fields-Dr-xcb6S.mjs";
|
|
9
9
|
import "../../../../../../api/schemas/index.mjs";
|
|
10
|
-
import { i as rowToWidget } from "../../../../../../widgets-
|
|
11
|
-
import { n as requirePerm } from "../../../../../../authorize-
|
|
10
|
+
import { i as rowToWidget } from "../../../../../../widgets-DG-1jxnz.mjs";
|
|
11
|
+
import { n as requirePerm } from "../../../../../../authorize-_wWM_44T.mjs";
|
|
12
12
|
|
|
13
13
|
//#region src/astro/routes/api/widget-areas/[name]/widgets/[id].ts
|
|
14
14
|
const prerender = false;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import "../../../../../dialect-helpers-BKCvISIQ.mjs";
|
|
2
2
|
import "../../../../../base64-CqR-7kqF.mjs";
|
|
3
|
-
import "../../../../../types-
|
|
4
|
-
import "../../../../../loader-
|
|
5
|
-
import { n as apiSuccess, r as handleError, t as apiError } from "../../../../../error-
|
|
6
|
-
import { n as parseBody, t as isParseError } from "../../../../../parse-
|
|
7
|
-
import { m as createWidgetBody } from "../../../../../redirects-
|
|
8
|
-
import "../../../../../
|
|
3
|
+
import "../../../../../types-SF1DwGf2.mjs";
|
|
4
|
+
import "../../../../../loader-CJ6lWO0d.mjs";
|
|
5
|
+
import { 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 { m as createWidgetBody } from "../../../../../redirects-C0L9JUk4.mjs";
|
|
8
|
+
import "../../../../../byline-fields-Dr-xcb6S.mjs";
|
|
9
9
|
import "../../../../../api/schemas/index.mjs";
|
|
10
|
-
import { i as rowToWidget } from "../../../../../widgets-
|
|
11
|
-
import { n as requirePerm } from "../../../../../authorize-
|
|
10
|
+
import { i as rowToWidget } from "../../../../../widgets-DG-1jxnz.mjs";
|
|
11
|
+
import { n as requirePerm } from "../../../../../authorize-_wWM_44T.mjs";
|
|
12
12
|
import { ulid } from "ulidx";
|
|
13
13
|
|
|
14
14
|
//#region src/astro/routes/api/widget-areas/[name]/widgets.ts
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "../../../../dialect-helpers-BKCvISIQ.mjs";
|
|
2
2
|
import "../../../../base64-CqR-7kqF.mjs";
|
|
3
|
-
import "../../../../types-
|
|
4
|
-
import "../../../../loader-
|
|
5
|
-
import { n as apiSuccess, r as handleError, t as apiError } from "../../../../error-
|
|
6
|
-
import { i as rowToWidget } from "../../../../widgets-
|
|
7
|
-
import { n as requirePerm } from "../../../../authorize-
|
|
3
|
+
import "../../../../types-SF1DwGf2.mjs";
|
|
4
|
+
import "../../../../loader-CJ6lWO0d.mjs";
|
|
5
|
+
import { n as apiSuccess, r as handleError, t as apiError } from "../../../../error-npZWBSb7.mjs";
|
|
6
|
+
import { i as rowToWidget } from "../../../../widgets-DG-1jxnz.mjs";
|
|
7
|
+
import { n as requirePerm } from "../../../../authorize-_wWM_44T.mjs";
|
|
8
8
|
|
|
9
9
|
//#region src/astro/routes/api/widget-areas/[name].ts
|
|
10
10
|
const prerender = false;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import "../../../../dialect-helpers-BKCvISIQ.mjs";
|
|
2
2
|
import "../../../../base64-CqR-7kqF.mjs";
|
|
3
|
-
import "../../../../types-
|
|
4
|
-
import "../../../../loader-
|
|
5
|
-
import { n as apiSuccess, r as handleError, t as apiError } from "../../../../error-
|
|
6
|
-
import { n as parseBody, t as isParseError } from "../../../../parse-
|
|
7
|
-
import { p as createWidgetAreaBody } from "../../../../redirects-
|
|
8
|
-
import "../../../../
|
|
3
|
+
import "../../../../types-SF1DwGf2.mjs";
|
|
4
|
+
import "../../../../loader-CJ6lWO0d.mjs";
|
|
5
|
+
import { 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 { p as createWidgetAreaBody } from "../../../../redirects-C0L9JUk4.mjs";
|
|
8
|
+
import "../../../../byline-fields-Dr-xcb6S.mjs";
|
|
9
9
|
import "../../../../api/schemas/index.mjs";
|
|
10
|
-
import { i as rowToWidget } from "../../../../widgets-
|
|
11
|
-
import { n as requirePerm } from "../../../../authorize-
|
|
10
|
+
import { i as rowToWidget } from "../../../../widgets-DG-1jxnz.mjs";
|
|
11
|
+
import { n as requirePerm } from "../../../../authorize-_wWM_44T.mjs";
|
|
12
12
|
import { ulid } from "ulidx";
|
|
13
13
|
|
|
14
14
|
//#region src/astro/routes/api/widget-areas/index.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../../../base64-CqR-7kqF.mjs";
|
|
2
|
-
import "../../../types-
|
|
3
|
-
import { n as apiSuccess, r as handleError } from "../../../error-
|
|
4
|
-
import { t as getWidgetComponents } from "../../../components-
|
|
2
|
+
import "../../../types-SF1DwGf2.mjs";
|
|
3
|
+
import { n as apiSuccess, r as handleError } from "../../../error-npZWBSb7.mjs";
|
|
4
|
+
import { t as getWidgetComponents } from "../../../components-CTfpu3PZ.mjs";
|
|
5
5
|
|
|
6
6
|
//#region src/astro/routes/api/widget-components.ts
|
|
7
7
|
const prerender = false;
|