emdash 0.7.0 → 0.9.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-Di31kZ28.d.mts → adapters-DoNJiveC.d.mts} +1 -1
- package/dist/{adapters-Di31kZ28.d.mts.map → adapters-DoNJiveC.d.mts.map} +1 -1
- package/dist/{apply-5uslYdUu.mjs → apply-BzltprvY.mjs} +90 -139
- package/dist/apply-BzltprvY.mjs.map +1 -0
- package/dist/astro/index.d.mts +6 -6
- package/dist/astro/index.d.mts.map +1 -1
- package/dist/astro/index.mjs +194 -17
- package/dist/astro/index.mjs.map +1 -1
- package/dist/astro/middleware/auth.d.mts +6 -7
- package/dist/astro/middleware/auth.d.mts.map +1 -1
- package/dist/astro/middleware/auth.mjs +34 -57
- package/dist/astro/middleware/auth.mjs.map +1 -1
- package/dist/astro/middleware/redirect.d.mts.map +1 -1
- package/dist/astro/middleware/redirect.mjs +17 -12
- package/dist/astro/middleware/redirect.mjs.map +1 -1
- package/dist/astro/middleware/request-context.d.mts.map +1 -1
- package/dist/astro/middleware/request-context.mjs +9 -6
- package/dist/astro/middleware/request-context.mjs.map +1 -1
- package/dist/astro/middleware/setup.mjs +1 -1
- package/dist/astro/middleware.d.mts.map +1 -1
- package/dist/astro/middleware.mjs +301 -165
- package/dist/astro/middleware.mjs.map +1 -1
- package/dist/astro/types.d.mts +34 -10
- package/dist/astro/types.d.mts.map +1 -1
- package/dist/{base64-MBPo9ozB.mjs → base64-BRICGH2l.mjs} +1 -1
- package/dist/{base64-MBPo9ozB.mjs.map → base64-BRICGH2l.mjs.map} +1 -1
- package/dist/{byline-C4OVd8b3.mjs → byline-BSaNL1w7.mjs} +5 -5
- package/dist/byline-BSaNL1w7.mjs.map +1 -0
- package/dist/bylines-CvJ3PYz2.mjs +113 -0
- package/dist/bylines-CvJ3PYz2.mjs.map +1 -0
- package/dist/cache-C6N_hhN7.mjs +65 -0
- package/dist/cache-C6N_hhN7.mjs.map +1 -0
- package/dist/{chunks-HGz06Soa.mjs → chunks-NBQVDOci.mjs} +8 -2
- package/dist/{chunks-HGz06Soa.mjs.map → chunks-NBQVDOci.mjs.map} +1 -1
- package/dist/cli/index.mjs +229 -31
- package/dist/cli/index.mjs.map +1 -1
- package/dist/client/cf-access.d.mts +1 -1
- package/dist/client/index.d.mts +1 -1
- package/dist/client/index.mjs +3 -3
- package/dist/client/index.mjs.map +1 -1
- package/dist/{config-BXwuX8Bx.mjs → config-BI0V3ICQ.mjs} +1 -1
- package/dist/{config-BXwuX8Bx.mjs.map → config-BI0V3ICQ.mjs.map} +1 -1
- package/dist/{content-D7J5y73J.mjs → content-8lOYF0pr.mjs} +43 -28
- package/dist/content-8lOYF0pr.mjs.map +1 -0
- package/dist/db/index.d.mts +3 -3
- package/dist/db/index.mjs +2 -2
- package/dist/db/libsql.d.mts +1 -1
- package/dist/db/libsql.d.mts.map +1 -1
- package/dist/db/libsql.mjs +7 -2
- package/dist/db/libsql.mjs.map +1 -1
- package/dist/db/postgres.d.mts +1 -1
- package/dist/db/sqlite.d.mts +1 -1
- package/dist/db/sqlite.d.mts.map +1 -1
- package/dist/db/sqlite.mjs +8 -3
- package/dist/db/sqlite.mjs.map +1 -1
- package/dist/{db-errors-D0UT85nC.mjs → db-errors-WRezodiz.mjs} +1 -1
- package/dist/{db-errors-D0UT85nC.mjs.map → db-errors-WRezodiz.mjs.map} +1 -1
- package/dist/{default-CME5YdZ3.mjs → default-D8ksjWhO.mjs} +1 -1
- package/dist/{default-CME5YdZ3.mjs.map → default-D8ksjWhO.mjs.map} +1 -1
- package/dist/{dialect-helpers-DhTzaUxP.mjs → dialect-helpers-BKCvISIQ.mjs} +19 -2
- package/dist/dialect-helpers-BKCvISIQ.mjs.map +1 -0
- package/dist/{error-CiYn9yDu.mjs → error-D_-tqP-I.mjs} +1 -1
- package/dist/error-D_-tqP-I.mjs.map +1 -0
- package/dist/{index-De6_Xv3v.d.mts → index-BFRaVcD6.d.mts} +243 -40
- package/dist/index-BFRaVcD6.d.mts.map +1 -0
- package/dist/index.d.mts +11 -11
- package/dist/index.mjs +29 -25
- package/dist/{load-CBcmDIot.mjs → load-DDqMMvZL.mjs} +2 -2
- package/dist/{load-CBcmDIot.mjs.map → load-DDqMMvZL.mjs.map} +1 -1
- package/dist/{loader-DeiBJEMe.mjs → loader-CKLbBnhK.mjs} +32 -10
- package/dist/loader-CKLbBnhK.mjs.map +1 -0
- package/dist/{manifest-schema-V30qsMft.mjs → manifest-schema-DqWNC3lM.mjs} +45 -3
- package/dist/manifest-schema-DqWNC3lM.mjs.map +1 -0
- package/dist/media/index.d.mts +1 -1
- package/dist/media/index.mjs +1 -1
- package/dist/media/local-runtime.d.mts +7 -7
- package/dist/media/local-runtime.mjs +3 -3
- package/dist/{media-DqHVh136.mjs → media-BW32b4gi.mjs} +4 -7
- package/dist/media-BW32b4gi.mjs.map +1 -0
- package/dist/{mode-CpNnGkPz.mjs → mode-ier8jbBk.mjs} +1 -1
- package/dist/mode-ier8jbBk.mjs.map +1 -0
- package/dist/options-BVp3UsTS.mjs +117 -0
- package/dist/options-BVp3UsTS.mjs.map +1 -0
- package/dist/page/index.d.mts +2 -2
- package/dist/{placeholder-tzpqGWII.d.mts → placeholder-BE4o_2dc.d.mts} +1 -1
- package/dist/{placeholder-tzpqGWII.d.mts.map → placeholder-BE4o_2dc.d.mts.map} +1 -1
- package/dist/{placeholder-C-fk5hYI.mjs → placeholder-CIJejMlK.mjs} +1 -1
- package/dist/placeholder-CIJejMlK.mjs.map +1 -0
- package/dist/plugins/adapt-sandbox-entry.d.mts +5 -5
- package/dist/plugins/adapt-sandbox-entry.d.mts.map +1 -1
- package/dist/plugins/adapt-sandbox-entry.mjs +6 -5
- package/dist/plugins/adapt-sandbox-entry.mjs.map +1 -1
- package/dist/public-url-DByxYjUw.mjs +51 -0
- package/dist/public-url-DByxYjUw.mjs.map +1 -0
- package/dist/{query-g4Ug-9j9.mjs → query-Cg9ZKRQ0.mjs} +114 -16
- package/dist/query-Cg9ZKRQ0.mjs.map +1 -0
- package/dist/{redirect-CN0Rt9Ob.mjs → redirect-BhUBKRc1.mjs} +13 -8
- package/dist/redirect-BhUBKRc1.mjs.map +1 -0
- package/dist/{registry-Ci3WxVAr.mjs → registry-Dw70ChxB.mjs} +69 -11
- package/dist/registry-Dw70ChxB.mjs.map +1 -0
- package/dist/{request-cache-DiR961CV.mjs → request-cache-B-bmkipQ.mjs} +1 -1
- package/dist/request-cache-B-bmkipQ.mjs.map +1 -0
- package/dist/runner-Bnoj7vjK.d.mts +44 -0
- package/dist/runner-Bnoj7vjK.d.mts.map +1 -0
- package/dist/{runner-tQ7BJ4T7.mjs → runner-C7ADox5q.mjs} +185 -55
- package/dist/{runner-tQ7BJ4T7.mjs.map → runner-C7ADox5q.mjs.map} +1 -1
- package/dist/runtime.d.mts +6 -6
- package/dist/runtime.mjs +4 -4
- package/dist/{search-B0effn3j.mjs → search-dOGEccMa.mjs} +341 -152
- package/dist/search-dOGEccMa.mjs.map +1 -0
- package/dist/secrets-CW3reAnU.mjs +314 -0
- package/dist/secrets-CW3reAnU.mjs.map +1 -0
- package/dist/seed/index.d.mts +2 -2
- package/dist/seed/index.mjs +15 -14
- package/dist/seo/index.d.mts +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.d.mts.map +1 -1
- package/dist/storage/s3.mjs +4 -4
- package/dist/storage/s3.mjs.map +1 -1
- package/dist/{taxonomies-K2z0Uhnj.mjs → taxonomies-ZlRtD6AG.mjs} +14 -7
- package/dist/taxonomies-ZlRtD6AG.mjs.map +1 -0
- package/dist/{tokens-BFPFx3CA.mjs → tokens-D7zMmWi2.mjs} +2 -2
- package/dist/{tokens-BFPFx3CA.mjs.map → tokens-D7zMmWi2.mjs.map} +1 -1
- package/dist/{transport-BykRfpyy.mjs → transport-BeMCmin1.mjs} +6 -5
- package/dist/{transport-BykRfpyy.mjs.map → transport-BeMCmin1.mjs.map} +1 -1
- package/dist/{transport-H4Iwx7tC.d.mts → transport-DNEfeMaU.d.mts} +1 -1
- package/dist/{transport-H4Iwx7tC.d.mts.map → transport-DNEfeMaU.d.mts.map} +1 -1
- package/dist/types-4fVtCIm0.mjs +68 -0
- package/dist/types-4fVtCIm0.mjs.map +1 -0
- package/dist/{types-CnZYHyLW.d.mts → types-BSyXeCFW.d.mts} +24 -2
- package/dist/{types-CnZYHyLW.d.mts.map → types-BSyXeCFW.d.mts.map} +1 -1
- package/dist/{types-DgrIP0tF.d.mts → types-BuBIptGk.d.mts} +80 -106
- package/dist/types-BuBIptGk.d.mts.map +1 -0
- package/dist/{types-BH2L167P.mjs → types-CDbKp7ND.mjs} +1 -1
- package/dist/{types-BH2L167P.mjs.map → types-CDbKp7ND.mjs.map} +1 -1
- package/dist/{types-DDS4MxsT.mjs → types-CIOg5AR8.mjs} +1 -1
- package/dist/{types-DDS4MxsT.mjs.map → types-CIOg5AR8.mjs.map} +1 -1
- package/dist/{types-6CUZRrZP.d.mts → types-CJsYGpco.d.mts} +24 -2
- package/dist/{types-6CUZRrZP.d.mts.map → types-CJsYGpco.d.mts.map} +1 -1
- package/dist/types-CRxNbK-Z.mjs +68 -0
- package/dist/types-CRxNbK-Z.mjs.map +1 -0
- package/dist/{types-C2v0c34j.d.mts → types-CrtWgIvl.d.mts} +1 -1
- package/dist/{types-C2v0c34j.d.mts.map → types-CrtWgIvl.d.mts.map} +1 -1
- package/dist/{types-CFWjXmus.d.mts → types-M78DQ1lx.d.mts} +1 -1
- package/dist/{types-CFWjXmus.d.mts.map → types-M78DQ1lx.d.mts.map} +1 -1
- package/dist/{validate-CqsNItbt.mjs → validate-Baqf0slj.mjs} +3 -3
- package/dist/{validate-CqsNItbt.mjs.map → validate-Baqf0slj.mjs.map} +1 -1
- package/dist/{validate-kM8Pjuf7.d.mts → validate-BfQh_C_y.d.mts} +4 -4
- package/dist/{validate-kM8Pjuf7.d.mts.map → validate-BfQh_C_y.d.mts.map} +1 -1
- package/dist/validation-BfEI7tNe.mjs +144 -0
- package/dist/validation-BfEI7tNe.mjs.map +1 -0
- package/dist/version-DoxrVdYf.mjs +7 -0
- package/dist/{version-BnTKdfam.mjs.map → version-DoxrVdYf.mjs.map} +1 -1
- package/dist/zod-generator-CC0xNe_K.mjs +132 -0
- package/dist/zod-generator-CC0xNe_K.mjs.map +1 -0
- package/locals.d.ts +1 -6
- package/package.json +21 -7
- package/src/api/auth-storage.ts +37 -0
- package/src/api/error.ts +6 -0
- package/src/api/errors.ts +8 -0
- package/src/api/handlers/comments.ts +19 -4
- package/src/api/handlers/content.ts +151 -4
- package/src/api/handlers/device-flow.ts +5 -0
- package/src/api/handlers/index.ts +2 -0
- package/src/api/handlers/marketplace.ts +11 -4
- package/src/api/handlers/media.ts +8 -1
- package/src/api/handlers/menus.ts +160 -21
- package/src/api/handlers/oauth-authorization.ts +72 -33
- package/src/api/handlers/redirects.ts +16 -3
- package/src/api/handlers/revision.ts +23 -14
- package/src/api/handlers/sections.ts +8 -1
- package/src/api/handlers/taxonomies.ts +131 -22
- package/src/api/handlers/validation.ts +212 -0
- package/src/api/openapi/document.ts +4 -1
- package/src/api/public-url.ts +54 -5
- package/src/api/route-utils.ts +14 -0
- package/src/api/schemas/comments.ts +2 -2
- package/src/api/schemas/common.ts +1 -1
- package/src/api/schemas/content.ts +17 -0
- package/src/api/schemas/sections.ts +3 -3
- package/src/api/schemas/setup.ts +8 -0
- package/src/api/schemas/users.ts +1 -1
- package/src/api/schemas/widgets.ts +12 -10
- package/src/api/setup-complete.ts +40 -0
- package/src/api/types.ts +5 -1
- package/src/astro/integration/index.ts +30 -2
- package/src/astro/integration/routes.ts +28 -0
- package/src/astro/integration/runtime.ts +49 -1
- package/src/astro/integration/virtual-modules.ts +73 -2
- package/src/astro/integration/vite-config.ts +49 -13
- package/src/astro/middleware/auth.ts +34 -6
- package/src/astro/middleware/redirect.ts +29 -16
- package/src/astro/middleware/request-context.ts +15 -5
- package/src/astro/middleware.ts +41 -10
- package/src/astro/routes/PluginRegistry.tsx +10 -1
- package/src/astro/routes/api/auth/invite/complete.ts +6 -1
- package/src/astro/routes/api/auth/mode.ts +57 -0
- package/src/astro/routes/api/auth/oauth/[provider]/callback.ts +23 -3
- package/src/astro/routes/api/auth/oauth/[provider].ts +10 -4
- package/src/astro/routes/api/auth/passkey/register/verify.ts +6 -1
- package/src/astro/routes/api/auth/passkey/verify.ts +6 -1
- package/src/astro/routes/api/auth/signup/complete.ts +6 -1
- package/src/astro/routes/api/comments/[collection]/[contentId]/index.ts +2 -2
- package/src/astro/routes/api/content/[collection]/[id]/discard-draft.ts +4 -2
- package/src/astro/routes/api/content/[collection]/[id]/preview-url.ts +34 -12
- package/src/astro/routes/api/content/[collection]/[id]/publish.ts +32 -2
- package/src/astro/routes/api/content/[collection]/[id]/restore.ts +4 -2
- package/src/astro/routes/api/content/[collection]/[id]/revisions.ts +3 -2
- package/src/astro/routes/api/content/[collection]/[id]/terms/[taxonomy].ts +8 -4
- package/src/astro/routes/api/content/[collection]/[id]/translations.ts +1 -1
- package/src/astro/routes/api/content/[collection]/[id].ts +12 -0
- package/src/astro/routes/api/content/[collection]/index.ts +1 -9
- package/src/astro/routes/api/import/wordpress/execute.ts +3 -1
- package/src/astro/routes/api/import/wordpress/media.ts +2 -7
- package/src/astro/routes/api/import/wordpress/prepare.ts +9 -0
- package/src/astro/routes/api/import/wordpress-plugin/execute.ts +3 -1
- package/src/astro/routes/api/manifest.ts +62 -45
- package/src/astro/routes/api/media/[id]/confirm.ts +10 -1
- package/src/astro/routes/api/media/providers/[providerId]/index.ts +12 -3
- package/src/astro/routes/api/openapi.json.ts +27 -10
- package/src/astro/routes/api/redirects/404s/index.ts +10 -4
- package/src/astro/routes/api/redirects/404s/summary.ts +4 -2
- package/src/astro/routes/api/redirects/[id].ts +10 -4
- package/src/astro/routes/api/redirects/index.ts +7 -3
- package/src/astro/routes/api/revisions/[revisionId]/index.ts +1 -1
- package/src/astro/routes/api/schema/collections/[slug]/fields/[fieldSlug].ts +0 -2
- package/src/astro/routes/api/schema/collections/[slug]/fields/index.ts +0 -1
- package/src/astro/routes/api/schema/collections/[slug]/fields/reorder.ts +0 -1
- package/src/astro/routes/api/schema/collections/[slug]/index.ts +2 -2
- package/src/astro/routes/api/schema/collections/index.ts +1 -1
- package/src/astro/routes/api/search/index.ts +10 -2
- package/src/astro/routes/api/sections/[slug].ts +10 -4
- package/src/astro/routes/api/sections/index.ts +7 -3
- package/src/astro/routes/api/settings/email.ts +4 -9
- package/src/astro/routes/api/setup/admin-verify.ts +6 -1
- package/src/astro/routes/api/setup/admin.ts +8 -2
- package/src/astro/routes/api/setup/index.ts +2 -2
- package/src/astro/routes/api/setup/status.ts +3 -1
- package/src/astro/routes/api/snapshot.ts +44 -18
- package/src/astro/routes/api/taxonomies/index.ts +0 -1
- package/src/astro/routes/api/themes/preview.ts +11 -5
- package/src/astro/routes/api/widget-areas/[name]/widgets/[id].ts +4 -1
- package/src/astro/routes/api/widget-areas/[name]/widgets.ts +4 -1
- package/src/astro/routes/api/widget-areas/[name].ts +4 -1
- package/src/astro/routes/api/widget-areas/index.ts +4 -1
- package/src/astro/types.ts +32 -3
- package/src/auth/allowed-origins.ts +168 -0
- package/src/auth/mode.ts +15 -3
- package/src/auth/passkey-config.ts +35 -13
- package/src/auth/providers/github-admin.tsx +29 -0
- package/src/auth/providers/github.ts +31 -0
- package/src/auth/providers/google-admin.tsx +44 -0
- package/src/auth/providers/google.ts +31 -0
- package/src/auth/types.ts +114 -4
- package/src/bylines/index.ts +37 -88
- package/src/cli/commands/auth.ts +28 -6
- package/src/cli/commands/bundle-utils.ts +11 -2
- package/src/cli/commands/bundle.ts +31 -9
- package/src/cli/commands/content.ts +13 -0
- package/src/cli/commands/login.ts +8 -1
- package/src/cli/commands/publish.ts +24 -0
- package/src/cli/commands/secrets.ts +183 -0
- package/src/cli/credentials.ts +1 -1
- package/src/cli/index.ts +5 -1
- package/src/client/index.ts +4 -4
- package/src/client/transport.ts +17 -7
- package/src/components/Break.astro +2 -2
- package/src/components/EmDashHead.astro +18 -13
- package/src/components/EmDashImage.astro +7 -6
- package/src/components/Embed.astro +1 -1
- package/src/components/Gallery.astro +6 -4
- package/src/components/Image.astro +9 -4
- package/src/components/InlinePortableTextEditor.tsx +106 -19
- package/src/components/LiveSearch.astro +5 -14
- package/src/config/secrets.ts +528 -0
- package/src/database/dialect-helpers.ts +50 -0
- package/src/database/migrations/034_published_at_index.ts +1 -1
- package/src/database/migrations/035_bounded_404_log.ts +56 -39
- package/src/database/migrations/runner.ts +156 -23
- package/src/database/repositories/audit.ts +6 -8
- package/src/database/repositories/byline.ts +6 -8
- package/src/database/repositories/comment.ts +12 -16
- package/src/database/repositories/content.ts +76 -52
- package/src/database/repositories/index.ts +1 -1
- package/src/database/repositories/media.ts +10 -13
- package/src/database/repositories/plugin-storage.ts +4 -6
- package/src/database/repositories/redirect.ts +26 -19
- package/src/database/repositories/taxonomy.ts +40 -3
- package/src/database/repositories/types.ts +57 -8
- package/src/database/repositories/user.ts +6 -8
- package/src/db/libsql.ts +1 -3
- package/src/db/sqlite.ts +2 -5
- package/src/emdash-runtime.ts +388 -247
- package/src/index.ts +14 -1
- package/src/loader.ts +30 -6
- package/src/mcp/server.ts +781 -141
- package/src/media/normalize.ts +1 -1
- package/src/media/url.ts +78 -0
- package/src/page/site-identity.ts +58 -0
- package/src/plugins/adapt-sandbox-entry.ts +22 -10
- package/src/plugins/context.ts +13 -10
- package/src/plugins/define-plugin.ts +40 -12
- package/src/plugins/email-console.ts +10 -3
- package/src/plugins/hooks.ts +34 -19
- package/src/plugins/index.ts +9 -0
- package/src/plugins/manifest-schema.ts +49 -2
- package/src/plugins/types.ts +174 -13
- package/src/preview/urls.ts +23 -3
- package/src/query.ts +149 -6
- package/src/redirects/cache.ts +38 -18
- package/src/request-cache.ts +3 -0
- package/src/schema/registry.ts +97 -5
- package/src/schema/zod-generator.ts +27 -5
- package/src/search/fts-manager.ts +0 -2
- package/src/search/query.ts +111 -26
- package/src/search/types.ts +8 -1
- package/src/sections/index.ts +7 -9
- package/src/seed/apply.ts +2 -0
- package/src/settings/index.ts +80 -6
- package/src/settings/types.ts +23 -1
- package/src/storage/s3.ts +12 -6
- package/src/taxonomies/index.ts +11 -1
- package/src/virtual-modules.d.ts +21 -1
- package/src/widgets/index.ts +1 -1
- package/dist/apply-5uslYdUu.mjs.map +0 -1
- package/dist/byline-C4OVd8b3.mjs.map +0 -1
- package/dist/bylines-hPTW79hw.mjs +0 -157
- package/dist/bylines-hPTW79hw.mjs.map +0 -1
- package/dist/cache-BkKBuIvS.mjs +0 -56
- package/dist/cache-BkKBuIvS.mjs.map +0 -1
- package/dist/chunk-ClPoSABd.mjs +0 -21
- package/dist/content-D7J5y73J.mjs.map +0 -1
- package/dist/dialect-helpers-DhTzaUxP.mjs.map +0 -1
- package/dist/error-CiYn9yDu.mjs.map +0 -1
- package/dist/index-De6_Xv3v.d.mts.map +0 -1
- package/dist/loader-DeiBJEMe.mjs.map +0 -1
- package/dist/manifest-schema-V30qsMft.mjs.map +0 -1
- package/dist/media-DqHVh136.mjs.map +0 -1
- package/dist/mode-CpNnGkPz.mjs.map +0 -1
- package/dist/placeholder-C-fk5hYI.mjs.map +0 -1
- package/dist/query-g4Ug-9j9.mjs.map +0 -1
- package/dist/redirect-CN0Rt9Ob.mjs.map +0 -1
- package/dist/registry-Ci3WxVAr.mjs.map +0 -1
- package/dist/request-cache-DiR961CV.mjs.map +0 -1
- package/dist/runner-BR2xKwhn.d.mts +0 -34
- package/dist/runner-BR2xKwhn.d.mts.map +0 -1
- package/dist/search-B0effn3j.mjs.map +0 -1
- package/dist/taxonomies-K2z0Uhnj.mjs.map +0 -1
- package/dist/types-CMMN0pNg.mjs +0 -31
- package/dist/types-CMMN0pNg.mjs.map +0 -1
- package/dist/types-DgrIP0tF.d.mts.map +0 -1
- package/dist/version-BnTKdfam.mjs +0 -7
package/dist/astro/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as defaultSeed } from "../default-
|
|
2
|
-
import { n as VERSION, t as COMMIT } from "../version-
|
|
1
|
+
import { t as defaultSeed } from "../default-D8ksjWhO.mjs";
|
|
2
|
+
import { n as VERSION, t as COMMIT } from "../version-DoxrVdYf.mjs";
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
4
|
import { fontProviders } from "astro/config";
|
|
5
|
-
import { dirname, resolve } from "node:path";
|
|
5
|
+
import { dirname, isAbsolute, relative, resolve } from "node:path";
|
|
6
6
|
import { fileURLToPath } from "node:url";
|
|
7
7
|
import { existsSync, readFileSync } from "node:fs";
|
|
8
8
|
|
|
@@ -64,6 +64,84 @@ function local(config) {
|
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
+
//#endregion
|
|
68
|
+
//#region src/auth/allowed-origins.ts
|
|
69
|
+
/**
|
|
70
|
+
* Validate per-entry shape rules (no `siteUrl` needed):
|
|
71
|
+
* - parses as `URL`
|
|
72
|
+
* - protocol is `http:` or `https:`
|
|
73
|
+
* - hostname has no trailing dot (`example.com.` rejected)
|
|
74
|
+
* - hostname has no empty labels (`foo..example.com` rejected)
|
|
75
|
+
*
|
|
76
|
+
* Returns the deduplicated, normalized origin form (`URL.origin`) of every
|
|
77
|
+
* input, in input order. Throws on the first violation with a source-tagged
|
|
78
|
+
* error message.
|
|
79
|
+
*/
|
|
80
|
+
function validateOriginShape(tagged) {
|
|
81
|
+
const normalized = [];
|
|
82
|
+
const seen = /* @__PURE__ */ new Set();
|
|
83
|
+
for (const { origin, source } of tagged) {
|
|
84
|
+
let parsed;
|
|
85
|
+
try {
|
|
86
|
+
parsed = new URL(origin);
|
|
87
|
+
} catch (e) {
|
|
88
|
+
throw configError(source, `invalid URL: "${origin}"`, e);
|
|
89
|
+
}
|
|
90
|
+
if (parsed.protocol !== "http:" && parsed.protocol !== "https:") throw configError(source, `origin must be http or https: "${origin}" (got ${parsed.protocol})`);
|
|
91
|
+
if (parsed.hostname.endsWith(".")) throw configError(source, `hostname has a trailing dot: "${origin}". Remove the trailing dot — assertion origins from the browser do not include it.`);
|
|
92
|
+
if (parsed.hostname.split(".").includes("")) throw configError(source, `hostname has empty labels: "${origin}"`);
|
|
93
|
+
if (!seen.has(parsed.origin)) {
|
|
94
|
+
seen.add(parsed.origin);
|
|
95
|
+
normalized.push(parsed.origin);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
return normalized;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Validate the effective merged allowedOrigins set against `siteUrl`.
|
|
102
|
+
*
|
|
103
|
+
* Performs `validateOriginShape()` plus the siteUrl-dependent rules:
|
|
104
|
+
* - Rule A: non-empty origins ⇒ `siteUrl` is set
|
|
105
|
+
* - `siteUrl` hostname is not an IP literal (multi-origin requires a domain)
|
|
106
|
+
* - `siteUrl` hostname has no trailing dot (cannot match assertion origins)
|
|
107
|
+
* - Rule B: each origin's hostname is `siteHost` exactly or a subdomain
|
|
108
|
+
*
|
|
109
|
+
* Throws on first violation. Returns the deduplicated normalized origins.
|
|
110
|
+
*
|
|
111
|
+
* Use this at the runtime chokepoint (where config + env are merged into the
|
|
112
|
+
* effective set). At Astro integration init, prefer `validateOriginShape()`
|
|
113
|
+
* for shape-only checks on `config.allowedOrigins`, since `siteUrl` may be
|
|
114
|
+
* supplied at runtime via `EMDASH_SITE_URL`.
|
|
115
|
+
*/
|
|
116
|
+
function validateAllowedOrigins(siteUrl, tagged) {
|
|
117
|
+
const normalized = validateOriginShape(tagged);
|
|
118
|
+
if (normalized.length === 0) return normalized;
|
|
119
|
+
if (!siteUrl) throw new Error(`EmDash config error: allowedOrigins is set (${normalized.length} ${normalized.length === 1 ? "entry" : "entries"}) but siteUrl is not. Without a canonical siteUrl, rpId is derived from the request hostname, defeating multi-origin passkeys. Set siteUrl in astro.config.mjs or via EMDASH_SITE_URL.`);
|
|
120
|
+
let siteHost;
|
|
121
|
+
try {
|
|
122
|
+
siteHost = new URL(siteUrl).hostname;
|
|
123
|
+
} catch (e) {
|
|
124
|
+
throw new Error(`EmDash config error: siteUrl is not a valid URL: "${siteUrl}"`, { cause: e });
|
|
125
|
+
}
|
|
126
|
+
if (siteHost.endsWith(".")) throw new Error(`EmDash config error: siteUrl "${siteUrl}" has a trailing-dot hostname, which cannot match assertion origins. Remove the trailing dot when using allowedOrigins.`);
|
|
127
|
+
if (isIPLiteralHostname(siteHost)) throw new Error(`EmDash config error: siteUrl "${siteUrl}" uses an IP-literal hostname. Multi-origin passkeys require a domain-based siteUrl — IP addresses cannot have valid subdomains for WebAuthn rpId.`);
|
|
128
|
+
for (const { origin, source } of tagged) {
|
|
129
|
+
const h = new URL(origin).hostname;
|
|
130
|
+
if (h !== siteHost && !h.endsWith("." + siteHost)) throw configError(source, `"${origin}" is not a subdomain of siteUrl "${siteUrl}". Allowed origins must be the same hostname as siteUrl or a subdomain of it.`);
|
|
131
|
+
}
|
|
132
|
+
return normalized;
|
|
133
|
+
}
|
|
134
|
+
function configError(source, detail, cause) {
|
|
135
|
+
const err = /* @__PURE__ */ new Error(`EmDash config error in ${source}: ${detail}`);
|
|
136
|
+
if (cause !== void 0) err.cause = cause;
|
|
137
|
+
return err;
|
|
138
|
+
}
|
|
139
|
+
const IPV4_DOTTED_DECIMAL_RE = /^\d+(\.\d+){3}$/;
|
|
140
|
+
function isIPLiteralHostname(h) {
|
|
141
|
+
if (h.startsWith("[")) return true;
|
|
142
|
+
return IPV4_DOTTED_DECIMAL_RE.test(h);
|
|
143
|
+
}
|
|
144
|
+
|
|
67
145
|
//#endregion
|
|
68
146
|
//#region src/astro/integration/font-provider.ts
|
|
69
147
|
/**
|
|
@@ -220,6 +298,10 @@ function injectCoreRoutes(injectRoute) {
|
|
|
220
298
|
pattern: "/_emdash/api/manifest",
|
|
221
299
|
entrypoint: resolveRoute("api/manifest.ts")
|
|
222
300
|
});
|
|
301
|
+
injectRoute({
|
|
302
|
+
pattern: "/_emdash/api/auth/mode",
|
|
303
|
+
entrypoint: resolveRoute("api/auth/mode.ts")
|
|
304
|
+
});
|
|
223
305
|
injectRoute({
|
|
224
306
|
pattern: "/_emdash/api/dashboard",
|
|
225
307
|
entrypoint: resolveRoute("api/dashboard.ts")
|
|
@@ -748,6 +830,18 @@ function injectMcpRoute(injectRoute) {
|
|
|
748
830
|
});
|
|
749
831
|
}
|
|
750
832
|
/**
|
|
833
|
+
* Injects routes from pluggable auth providers.
|
|
834
|
+
*
|
|
835
|
+
* Each provider declares the routes it needs in its `AuthProviderDescriptor.routes` array.
|
|
836
|
+
* Routes are injected at build time so Vite can bundle them.
|
|
837
|
+
*/
|
|
838
|
+
function injectAuthProviderRoutes(injectRoute, providers) {
|
|
839
|
+
for (const provider of providers) if (provider.routes) for (const route of provider.routes) injectRoute({
|
|
840
|
+
pattern: route.pattern,
|
|
841
|
+
entrypoint: route.entrypoint
|
|
842
|
+
});
|
|
843
|
+
}
|
|
844
|
+
/**
|
|
751
845
|
* Injects passkey/oauth/magic-link auth routes.
|
|
752
846
|
* Only used when NOT using external auth.
|
|
753
847
|
*/
|
|
@@ -864,6 +958,8 @@ const VIRTUAL_SANDBOXED_PLUGINS_ID = "virtual:emdash/sandboxed-plugins";
|
|
|
864
958
|
const RESOLVED_VIRTUAL_SANDBOXED_PLUGINS_ID = "\0" + VIRTUAL_SANDBOXED_PLUGINS_ID;
|
|
865
959
|
const VIRTUAL_AUTH_ID = "virtual:emdash/auth";
|
|
866
960
|
const RESOLVED_VIRTUAL_AUTH_ID = "\0" + VIRTUAL_AUTH_ID;
|
|
961
|
+
const VIRTUAL_AUTH_PROVIDERS_ID = "virtual:emdash/auth-providers";
|
|
962
|
+
const RESOLVED_VIRTUAL_AUTH_PROVIDERS_ID = "\0" + VIRTUAL_AUTH_PROVIDERS_ID;
|
|
867
963
|
const VIRTUAL_MEDIA_PROVIDERS_ID = "virtual:emdash/media-providers";
|
|
868
964
|
const RESOLVED_VIRTUAL_MEDIA_PROVIDERS_ID = "\0" + VIRTUAL_MEDIA_PROVIDERS_ID;
|
|
869
965
|
const VIRTUAL_BLOCK_COMPONENTS_ID = "virtual:emdash/block-components";
|
|
@@ -931,6 +1027,34 @@ export const authenticate = _authenticate;
|
|
|
931
1027
|
`;
|
|
932
1028
|
}
|
|
933
1029
|
/**
|
|
1030
|
+
* Generates the auth providers module.
|
|
1031
|
+
*
|
|
1032
|
+
* Statically imports each auth provider's `adminEntry` module and exports
|
|
1033
|
+
* a registry keyed by provider ID. The admin UI uses this to render
|
|
1034
|
+
* provider-specific login buttons/forms and setup steps.
|
|
1035
|
+
*
|
|
1036
|
+
* Follows the same pattern as `generateAdminRegistryModule()` for plugins.
|
|
1037
|
+
*/
|
|
1038
|
+
function generateAuthProvidersModule(descriptors) {
|
|
1039
|
+
const withAdmin = descriptors.filter((d) => d.adminEntry);
|
|
1040
|
+
if (withAdmin.length === 0) return `export const authProviders = {};`;
|
|
1041
|
+
const imports = [];
|
|
1042
|
+
const entries = [];
|
|
1043
|
+
withAdmin.forEach((descriptor, index) => {
|
|
1044
|
+
const varName = `authProvider${index}`;
|
|
1045
|
+
imports.push(`import * as ${varName} from ${JSON.stringify(descriptor.adminEntry)};`);
|
|
1046
|
+
entries.push(` ${JSON.stringify(descriptor.id)}: { ...${varName}, id: ${JSON.stringify(descriptor.id)}, label: ${JSON.stringify(descriptor.label)} },`);
|
|
1047
|
+
});
|
|
1048
|
+
return `
|
|
1049
|
+
// Auto-generated auth provider registry
|
|
1050
|
+
${imports.join("\n")}
|
|
1051
|
+
|
|
1052
|
+
export const authProviders = {
|
|
1053
|
+
${entries.join("\n")}
|
|
1054
|
+
};
|
|
1055
|
+
`;
|
|
1056
|
+
}
|
|
1057
|
+
/**
|
|
934
1058
|
* Generates the plugins module.
|
|
935
1059
|
* Imports and instantiates all plugins at runtime.
|
|
936
1060
|
*
|
|
@@ -1101,9 +1225,20 @@ function generateWaitUntilModule(adapterName) {
|
|
|
1101
1225
|
* Reads the user's seed file at build time (in Node context) and embeds it,
|
|
1102
1226
|
* so the runtime doesn't need filesystem access (required for workerd).
|
|
1103
1227
|
*
|
|
1228
|
+
* Search order:
|
|
1229
|
+
* 1. `.emdash/seed.json`
|
|
1230
|
+
* 2. `package.json` → `emdash.seed` reference
|
|
1231
|
+
* 3. `seed/seed.json` (conventional template path)
|
|
1232
|
+
*
|
|
1104
1233
|
* Exports `userSeed` (user's seed or null) and `seed` (user's seed or default).
|
|
1234
|
+
*
|
|
1235
|
+
* When no user seed is found, falls back to the built-in default seed and
|
|
1236
|
+
* (if `warnOnFallback` is true) logs a warning so misconfiguration is visible
|
|
1237
|
+
* during `astro dev`. Build/preview/sync stay silent so sites that
|
|
1238
|
+
* intentionally use the default seed (e.g. the blank template) don't
|
|
1239
|
+
* generate noisy logs.
|
|
1105
1240
|
*/
|
|
1106
|
-
function generateSeedModule(projectRoot) {
|
|
1241
|
+
function generateSeedModule(projectRoot, warnOnFallback = false) {
|
|
1107
1242
|
let userSeedJson = null;
|
|
1108
1243
|
try {
|
|
1109
1244
|
const content = readFileSync(resolve(projectRoot, ".emdash", "seed.json"), "utf-8");
|
|
@@ -1119,7 +1254,13 @@ function generateSeedModule(projectRoot) {
|
|
|
1119
1254
|
userSeedJson = content;
|
|
1120
1255
|
}
|
|
1121
1256
|
} catch {}
|
|
1257
|
+
if (!userSeedJson) try {
|
|
1258
|
+
const content = readFileSync(resolve(projectRoot, "seed", "seed.json"), "utf-8");
|
|
1259
|
+
JSON.parse(content);
|
|
1260
|
+
userSeedJson = content;
|
|
1261
|
+
} catch {}
|
|
1122
1262
|
if (userSeedJson) return [`export const userSeed = ${userSeedJson};`, `export const seed = userSeed;`].join("\n");
|
|
1263
|
+
if (warnOnFallback) console.warn("[emdash] No user seed found at .emdash/seed.json, package.json#emdash.seed, or seed/seed.json. Falling back to the built-in default seed; the setup wizard will not offer demo content for this site.");
|
|
1123
1264
|
return [`export const userSeed = null;`, `export const seed = ${JSON.stringify(defaultSeed)};`].join("\n");
|
|
1124
1265
|
}
|
|
1125
1266
|
/**
|
|
@@ -1224,15 +1365,24 @@ function resolveAdminDist() {
|
|
|
1224
1365
|
return dirname(createRequire(import.meta.url).resolve("@emdash-cms/admin"));
|
|
1225
1366
|
}
|
|
1226
1367
|
/**
|
|
1368
|
+
* Check whether child is inside parent without relying on simple prefix checks.
|
|
1369
|
+
*/
|
|
1370
|
+
function isInside(parent, child) {
|
|
1371
|
+
const relativePath = relative(parent, child);
|
|
1372
|
+
return relativePath === "" || !relativePath.startsWith("..") && !isAbsolute(relativePath);
|
|
1373
|
+
}
|
|
1374
|
+
/**
|
|
1227
1375
|
* Resolve path to the admin package source directory.
|
|
1228
|
-
* In dev mode, we alias @emdash-cms/admin to the source so
|
|
1229
|
-
* directly — giving instant HMR instead of requiring a
|
|
1376
|
+
* In dev mode inside this repo, we alias @emdash-cms/admin to the source so
|
|
1377
|
+
* Vite processes it directly — giving instant HMR instead of requiring a
|
|
1378
|
+
* rebuild + restart. External apps should use the built package surface.
|
|
1230
1379
|
*/
|
|
1231
|
-
function resolveAdminSource() {
|
|
1380
|
+
function resolveAdminSource(projectRoot) {
|
|
1232
1381
|
const packageRoot = resolve(dirname(createRequire(import.meta.url).resolve("@emdash-cms/admin")), "..");
|
|
1382
|
+
const repoRoot = resolve(packageRoot, "..", "..");
|
|
1233
1383
|
const srcEntry = resolve(packageRoot, "src", "index.ts");
|
|
1234
1384
|
try {
|
|
1235
|
-
if (existsSync(srcEntry)) return resolve(packageRoot, "src");
|
|
1385
|
+
if (existsSync(srcEntry) && isInside(repoRoot, projectRoot)) return resolve(packageRoot, "src");
|
|
1236
1386
|
} catch {}
|
|
1237
1387
|
}
|
|
1238
1388
|
/**
|
|
@@ -1240,8 +1390,12 @@ function resolveAdminSource() {
|
|
|
1240
1390
|
*/
|
|
1241
1391
|
function createVirtualModulesPlugin(options) {
|
|
1242
1392
|
const { serializableConfig, resolvedConfig, pluginDescriptors, astroConfig } = options;
|
|
1393
|
+
let viteCommand;
|
|
1243
1394
|
return {
|
|
1244
1395
|
name: "emdash-virtual-modules",
|
|
1396
|
+
configResolved(config) {
|
|
1397
|
+
viteCommand = config.command;
|
|
1398
|
+
},
|
|
1245
1399
|
resolveId(id) {
|
|
1246
1400
|
if (id === VIRTUAL_CONFIG_ID) return RESOLVED_VIRTUAL_CONFIG_ID;
|
|
1247
1401
|
if (id === VIRTUAL_DIALECT_ID) return RESOLVED_VIRTUAL_DIALECT_ID;
|
|
@@ -1251,6 +1405,7 @@ function createVirtualModulesPlugin(options) {
|
|
|
1251
1405
|
if (id === VIRTUAL_SANDBOX_RUNNER_ID) return RESOLVED_VIRTUAL_SANDBOX_RUNNER_ID;
|
|
1252
1406
|
if (id === VIRTUAL_SANDBOXED_PLUGINS_ID) return RESOLVED_VIRTUAL_SANDBOXED_PLUGINS_ID;
|
|
1253
1407
|
if (id === VIRTUAL_AUTH_ID) return RESOLVED_VIRTUAL_AUTH_ID;
|
|
1408
|
+
if (id === VIRTUAL_AUTH_PROVIDERS_ID) return RESOLVED_VIRTUAL_AUTH_PROVIDERS_ID;
|
|
1254
1409
|
if (id === VIRTUAL_MEDIA_PROVIDERS_ID) return RESOLVED_VIRTUAL_MEDIA_PROVIDERS_ID;
|
|
1255
1410
|
if (id === VIRTUAL_BLOCK_COMPONENTS_ID) return RESOLVED_VIRTUAL_BLOCK_COMPONENTS_ID;
|
|
1256
1411
|
if (id === VIRTUAL_SEED_ID) return RESOLVED_VIRTUAL_SEED_ID;
|
|
@@ -1276,9 +1431,10 @@ function createVirtualModulesPlugin(options) {
|
|
|
1276
1431
|
if (!authDescriptor || !("entrypoint" in authDescriptor)) return generateAuthModule(void 0);
|
|
1277
1432
|
return generateAuthModule(authDescriptor.entrypoint);
|
|
1278
1433
|
}
|
|
1434
|
+
if (id === RESOLVED_VIRTUAL_AUTH_PROVIDERS_ID) return generateAuthProvidersModule(resolvedConfig.authProviders ?? []);
|
|
1279
1435
|
if (id === RESOLVED_VIRTUAL_MEDIA_PROVIDERS_ID) return generateMediaProvidersModule(resolvedConfig.mediaProviders ?? []);
|
|
1280
1436
|
if (id === RESOLVED_VIRTUAL_BLOCK_COMPONENTS_ID) return generateBlockComponentsModule(pluginDescriptors);
|
|
1281
|
-
if (id === RESOLVED_VIRTUAL_SEED_ID) return generateSeedModule(fileURLToPath(astroConfig.root));
|
|
1437
|
+
if (id === RESOLVED_VIRTUAL_SEED_ID) return generateSeedModule(fileURLToPath(astroConfig.root), viteCommand === "serve");
|
|
1282
1438
|
if (id === RESOLVED_VIRTUAL_WAIT_UNTIL_ID) return generateWaitUntilModule(astroConfig.adapter?.name);
|
|
1283
1439
|
}
|
|
1284
1440
|
};
|
|
@@ -1309,7 +1465,8 @@ function createViteConfig(options, command) {
|
|
|
1309
1465
|
const adminDistPath = resolveAdminDist();
|
|
1310
1466
|
const cloudflare = isCloudflareAdapter(options.astroConfig);
|
|
1311
1467
|
const isDev = command === "dev";
|
|
1312
|
-
const
|
|
1468
|
+
const projectRoot = fileURLToPath(options.astroConfig.root);
|
|
1469
|
+
const adminSourcePath = isDev ? resolveAdminSource(projectRoot) : void 0;
|
|
1313
1470
|
const useSource = adminSourcePath !== void 0;
|
|
1314
1471
|
return {
|
|
1315
1472
|
define: {
|
|
@@ -1323,13 +1480,24 @@ function createViteConfig(options, command) {
|
|
|
1323
1480
|
"react",
|
|
1324
1481
|
"react-dom"
|
|
1325
1482
|
],
|
|
1326
|
-
alias: [
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1483
|
+
alias: [
|
|
1484
|
+
{
|
|
1485
|
+
find: "@emdash-cms/admin/styles.css",
|
|
1486
|
+
replacement: resolve(adminDistPath, "styles.css")
|
|
1487
|
+
},
|
|
1488
|
+
{
|
|
1489
|
+
find: "@emdash-cms/admin",
|
|
1490
|
+
replacement: useSource ? adminSourcePath : adminDistPath
|
|
1491
|
+
},
|
|
1492
|
+
{
|
|
1493
|
+
find: "use-sync-external-store/shim/index.js",
|
|
1494
|
+
replacement: "use-sync-external-store"
|
|
1495
|
+
},
|
|
1496
|
+
{
|
|
1497
|
+
find: "use-sync-external-store/shim",
|
|
1498
|
+
replacement: "use-sync-external-store"
|
|
1499
|
+
}
|
|
1500
|
+
]
|
|
1333
1501
|
},
|
|
1334
1502
|
plugins: [createVirtualModulesPlugin(options), ...useSource ? [linguiMacroPlugin(adminSourcePath, adminDistPath)] : []],
|
|
1335
1503
|
ssr: cloudflare ? {
|
|
@@ -1451,6 +1619,13 @@ function emdash(config = {}) {
|
|
|
1451
1619
|
throw e;
|
|
1452
1620
|
}
|
|
1453
1621
|
}
|
|
1622
|
+
if (resolvedConfig.allowedOrigins?.length) {
|
|
1623
|
+
const tagged = resolvedConfig.allowedOrigins.map((origin) => ({
|
|
1624
|
+
origin,
|
|
1625
|
+
source: "config.allowedOrigins"
|
|
1626
|
+
}));
|
|
1627
|
+
resolvedConfig.allowedOrigins = resolvedConfig.siteUrl ? validateAllowedOrigins(resolvedConfig.siteUrl, tagged) : validateOriginShape(tagged);
|
|
1628
|
+
}
|
|
1454
1629
|
const pluginDescriptors = resolvedConfig.plugins ?? [];
|
|
1455
1630
|
const sandboxedDescriptors = resolvedConfig.sandboxed ?? [];
|
|
1456
1631
|
for (const descriptor of [...pluginDescriptors, ...sandboxedDescriptors]) if (descriptor.format === "standard") {
|
|
@@ -1462,6 +1637,7 @@ function emdash(config = {}) {
|
|
|
1462
1637
|
database: resolvedConfig.database,
|
|
1463
1638
|
storage: resolvedConfig.storage,
|
|
1464
1639
|
auth: resolvedConfig.auth,
|
|
1640
|
+
authProviders: resolvedConfig.authProviders,
|
|
1465
1641
|
marketplace: resolvedConfig.marketplace,
|
|
1466
1642
|
siteUrl: resolvedConfig.siteUrl,
|
|
1467
1643
|
trustedProxyHeaders: resolvedConfig.trustedProxyHeaders,
|
|
@@ -1520,6 +1696,7 @@ function emdash(config = {}) {
|
|
|
1520
1696
|
}, command)
|
|
1521
1697
|
});
|
|
1522
1698
|
injectCoreRoutes(injectRoute);
|
|
1699
|
+
if (resolvedConfig.authProviders?.length) injectAuthProviderRoutes(injectRoute, resolvedConfig.authProviders);
|
|
1523
1700
|
if (!useExternalAuth) injectBuiltinAuthRoutes(injectRoute);
|
|
1524
1701
|
if (resolvedConfig.mcp !== false) injectMcpRoute(injectRoute);
|
|
1525
1702
|
if (resolvedConfig.playground) addMiddleware({
|