loadRegistry function
Loads the registry from the core directory
Implementation
Registry loadRegistry() {
final registryPath = getCoreFilePath('registery.json');
if (!File(registryPath).existsSync()) {
throw Exception('Registry file not found: $registryPath');
}
try {
final content = File(registryPath).readAsStringSync();
final json = jsonDecode(content) as Map<String, dynamic>;
return Registry.fromJson(json);
} catch (e) {
throw Exception('Failed to read registry: $e');
}
}