File tree Expand file tree Collapse file tree 2 files changed +23
-22
lines changed
Expand file tree Collapse file tree 2 files changed +23
-22
lines changed Original file line number Diff line number Diff line change 1+ import * as fs from 'fs' ;
2+ import * as path from 'path' ;
3+
4+ // Branding configuration interface
5+ interface BrandingConfig {
6+ logoPath ?: string ;
7+ title ?: string ;
8+ }
9+
10+ // Load branding configuration from JSON file
11+ export const loadBrandingConfig = ( ) : BrandingConfig => {
12+ const brandingPath = path . join ( __dirname , 'branding.json' ) ;
13+ try {
14+ if ( fs . existsSync ( brandingPath ) ) {
15+ const brandingData = fs . readFileSync ( brandingPath , 'utf8' ) ;
16+ return JSON . parse ( brandingData ) ;
17+ }
18+ } catch ( error ) {
19+ console . warn ( 'Failed to load branding.json, using defaults:' , error ) ;
20+ }
21+ return { } ;
22+ } ;
Original file line number Diff line number Diff line change 11import * as cdk from 'aws-cdk-lib' ;
2- import * as fs from 'fs' ;
3- import * as path from 'path' ;
42import {
53 StackInput ,
64 stackInputSchema ,
75 ProcessedStackInput ,
86} from './lib/stack-input' ;
97import { ModelConfiguration } from 'generative-ai-use-cases' ;
10-
11- // Branding configuration interface
12- interface BrandingConfig {
13- logoPath ?: string ;
14- title ?: string ;
15- }
16-
17- // Load branding configuration from JSON file
18- const loadBrandingConfig = ( ) : BrandingConfig => {
19- const brandingPath = path . join ( __dirname , 'branding.json' ) ;
20- try {
21- if ( fs . existsSync ( brandingPath ) ) {
22- const brandingData = fs . readFileSync ( brandingPath , 'utf8' ) ;
23- return JSON . parse ( brandingData ) ;
24- }
25- } catch ( error ) {
26- console . warn ( 'Failed to load branding.json, using defaults:' , error ) ;
27- }
28- return { } ;
29- } ;
8+ import { loadBrandingConfig } from './branding' ;
309
3110// Get parameters from CDK Context
3211const getContext = ( app : cdk . App ) : StackInput => {
You can’t perform that action at this time.
0 commit comments