This commit is contained in:
Boki 2026-11-26 22:23:07 -05:00
parent c353ddbe01
commit ce9e2df67c
310 changed files with 2550 additions and 36861 deletions

View file

@ -133,13 +133,43 @@ export class EnvLoader implements ConfigLoader {
private shouldPreserveStringForKey(key: string): boolean {
// Keys that should preserve string values even if they look like numbers
const preserveStringKeys = ['QM_WEBMASTER_ID', 'IB_MARKET_DATA_TYPE'];
const preserveStringKeys = [
'QM_WEBMASTER_ID',
'IB_MARKET_DATA_TYPE',
'MONGODB_URI',
'MONGODB_READ_URI',
'MONGODB_PASSWORD',
'POSTGRES_PASSWORD',
'DRAGONFLY_PASSWORD',
'QUESTDB_PASSWORD',
];
return preserveStringKeys.includes(key);
}
private getProviderMapping(envKey: string): { path: string[] } | null {
// Provider-specific and special environment variable mappings
const providerMappings: Record<string, string[]> = {
// Database mappings
MONGODB_URI: ['database', 'mongodb', 'uri'],
MONGODB_READ_URI: ['database', 'mongodb', 'readUri'],
MONGODB_READ_ONLY: ['database', 'mongodb', 'readOnly'],
MONGODB_DATABASE: ['database', 'mongodb', 'database'],
MONGODB_HOST: ['database', 'mongodb', 'host'],
MONGODB_PORT: ['database', 'mongodb', 'port'],
MONGODB_USERNAME: ['database', 'mongodb', 'user'],
MONGODB_PASSWORD: ['database', 'mongodb', 'password'],
POSTGRES_HOST: ['database', 'postgres', 'host'],
POSTGRES_PORT: ['database', 'postgres', 'port'],
POSTGRES_DATABASE: ['database', 'postgres', 'database'],
POSTGRES_USERNAME: ['database', 'postgres', 'user'],
POSTGRES_PASSWORD: ['database', 'postgres', 'password'],
POSTGRES_SSL: ['database', 'postgres', 'ssl'],
DRAGONFLY_HOST: ['database', 'dragonfly', 'host'],
DRAGONFLY_PORT: ['database', 'dragonfly', 'port'],
DRAGONFLY_PASSWORD: ['database', 'dragonfly', 'password'],
QUESTDB_HOST: ['database', 'questdb', 'host'],
QUESTDB_PORT: ['database', 'questdb', 'httpPort'],
// WebShare provider mappings
WEBSHARE_API_KEY: ['webshare', 'apiKey'],
WEBSHARE_API_URL: ['webshare', 'apiUrl'],