diff --git a/.gitignore b/.gitignore index ca299d6..0d59aaf 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,10 @@ node_modules/ dist/ build/ .next/ +*.js +*.js.map +*.d.ts + # Environment variables .env @@ -28,6 +32,7 @@ pids *.pid *.seed *.pid.lock +*.tsbuildinfo # Coverage directory used by tools like istanbul coverage/ diff --git a/libs/shared-types/src/config/config.ts b/libs/shared-types/src/config/config.ts deleted file mode 100644 index b8b1045..0000000 --- a/libs/shared-types/src/config/config.ts +++ /dev/null @@ -1,69 +0,0 @@ -// Configuration Types -export interface DatabaseConfig { - questdb: { - host: string; - port: number; - database: string; - }; - postgres: { - host: string; - port: number; - database: string; - username: string; - password: string; - }; - dragonfly: { - host: string; - port: number; - password?: string; - }; - mongodb?: { - uri: string; - database: string; - }; -} - -export interface BrokerConfig { - name: string; - apiKey: string; - secretKey: string; - baseUrl: string; - sandbox: boolean; - rateLimit?: { - maxRequestsPerSecond: number; - maxRequestsPerMinute: number; - }; -} - -export interface DataProviderConfig { - name: string; - apiKey: string; - baseUrl: string; - rateLimits: { - requestsPerSecond: number; - requestsPerDay: number; - }; -} - -export interface LoggingConfig { - level: 'debug' | 'info' | 'warn' | 'error'; - format: 'json' | 'text'; - destination: 'console' | 'file' | 'both'; - filePath?: string; -} - -export interface SystemConfig { - databases: DatabaseConfig; - brokers: BrokerConfig[]; - dataProviders: DataProviderConfig[]; - logging: LoggingConfig; - services: { - [key: string]: ServiceConfig; - }; -} - -interface ServiceConfig { - port: number; - host: string; - dependencies: string[]; -} diff --git a/libs/shared-types/src/index.ts b/libs/shared-types/src/index.ts index 647d277..c93664b 100644 --- a/libs/shared-types/src/index.ts +++ b/libs/shared-types/src/index.ts @@ -15,6 +15,3 @@ export * from './events/events'; // API Types export * from './api/api'; - -// Configuration Types -export * from './config/config'; diff --git a/libs/utils/tsconfig.json b/libs/utils/tsconfig.json index 7ce1614..7f9b0b2 100644 --- a/libs/utils/tsconfig.json +++ b/libs/utils/tsconfig.json @@ -8,5 +8,8 @@ "include": [ "src/**/*" ], - "exclude": ["node_modules", "dist", "**/*.test.ts", "**/*.spec.ts"] + "exclude": ["node_modules", "dist", "**/*.test.ts", "**/*.spec.ts"], + "references": [ + { "path": "../config" } + ] } diff --git a/tsconfig.json b/tsconfig.json index 39a3fec..6f7686d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -26,15 +26,27 @@ "resolveJsonModule": true, "sourceMap": true, "declaration": true, + "disableReferencedProjectLoad": true, + "disableSourceOfProjectReferenceRedirect": false, // Paths and output "baseUrl": ".", "paths": { "@stock-bot/*": ["libs/*/src"] } + }, "exclude": [ "node_modules", "dist" + ], + "references": [ + { "path": "./libs/api-client" }, + { "path": "./libs/config" }, + { "path": "./libs/event-bus" }, + { "path": "./libs/http-client" }, + { "path": "./libs/shared-types" }, + { "path": "./libs/utils" }, ] + }