loadConfig static method
Reads and parses migrator_config.yaml from projectPath.
Returns default config when the file is missing or unparseable.
Implementation
static MigratorConfig loadConfig(String projectPath) {
final configFile = File('$projectPath/migrator_config.yaml');
if (configFile.existsSync()) {
try {
return MigratorConfig.fromYaml(configFile.readAsStringSync());
} catch (e) {
print('⚠️ Error parsing migrator_config.yaml: $e. Using defaults.');
}
}
return MigratorConfig();
}