diff --git a/src/main/services/config/config-manager.ts b/src/main/services/config/config-manager.ts index 525ee87..98db245 100644 --- a/src/main/services/config/config-manager.ts +++ b/src/main/services/config/config-manager.ts @@ -11,13 +11,6 @@ import { fileURLToPath } from 'url' import { dirname } from 'path' import type { SettingsData, - ErpConfig, - DatabaseConfig, - PathsConfig, - ExtractionConfig, - ValidationConfig, - UiConfig, - ExecutionConfig, DatabaseType, MatchMode, ValidationDataSource @@ -96,7 +89,10 @@ function deepMerge(source: T, target: Partial): T { const sourceValue = result[key] if (isObject(targetValue) && isObject(sourceValue)) { - result[key] = deepMerge(sourceValue, targetValue) + result[key] = deepMerge( + sourceValue as T[Extract], + targetValue as Partial]> + ) } else if (targetValue !== undefined) { result[key] = targetValue as T[Extract] } @@ -113,7 +109,7 @@ function deepMerge(source: T, target: Partial): T { const UI_EDITABLE_FIELDS: string[] = [ 'erp.url', 'erp.username', - 'erp.password', + 'erp.password' // Add more fields as UI expands ]