File tree Expand file tree Collapse file tree 3 files changed +13
-2
lines changed
Expand file tree Collapse file tree 3 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @eventcatalog/core " : patch
3+ ---
4+
5+ chore(core): auth is now more explict opt in
Original file line number Diff line number Diff line change @@ -51,9 +51,10 @@ export const isMarkdownDownloadEnabled = () => config?.llmsTxt?.enabled ?? false
5151export const isLLMSTxtEnabled = ( ) => ( config ?. llmsTxt ?. enabled || isEventCatalogChatEnabled ( ) ) ?? false ;
5252
5353export const isAuthEnabled = ( ) => {
54+ const isAuthEnabledInCatalog = config ?. auth ?. enabled ?? false ;
5455 const directory = process . env . PROJECT_DIR || process . cwd ( ) ;
55- const hasAuthConfig = fs . existsSync ( join ( directory , 'eventcatalog.auth.js' ) ) ;
56- return ( hasAuthConfig && isSSR ( ) && isEventCatalogScaleEnabled ( ) ) || false ;
56+ const hasAuthConfigurationFile = fs . existsSync ( join ( directory , 'eventcatalog.auth.js' ) ) ;
57+ return ( isAuthEnabledInCatalog && hasAuthConfigurationFile && isSSR ( ) && isEventCatalogScaleEnabled ( ) ) || false ;
5758} ;
5859
5960export const isSSR = ( ) => config ?. output === 'server' ;
Original file line number Diff line number Diff line change @@ -51,6 +51,10 @@ type PagesConfiguration = {
5151 pages ?: string [ ] ;
5252} ;
5353
54+ type AuthConfig = {
55+ enabled : boolean ;
56+ } ;
57+
5458export interface Config {
5559 title : string ;
5660 tagline : false ;
@@ -64,6 +68,7 @@ export interface Config {
6468 host ?: string ;
6569 trailingSlash ?: boolean ;
6670 output ?: 'server' | 'static' ;
71+ auth ?: AuthConfig ;
6772 rss ?: {
6873 enabled : boolean ;
6974 limit : number ;
You can’t perform that action at this time.
0 commit comments