Initial scaffold for Aether Native V3 Electron Launcher

This commit is contained in:
Scott Idem
2026-01-23 13:54:20 -05:00
parent fdbd12b64f
commit 0497f5767b
44 changed files with 537 additions and 7294 deletions

30
src/main/config_loader.ts Normal file
View File

@@ -0,0 +1,30 @@
import * as fs from 'fs';
import * as path from 'path';
import * as os from 'os';
import { SeedConfig } from '../shared/types';
export async function loadSeedConfig(): Promise<SeedConfig | null> {
// For development, we look in the home directory
const configPath = path.join(os.homedir(), 'seed.json');
try {
if (!fs.existsSync(configPath)) {
console.log(`Seed config not found at: ${configPath}`);
return null;
}
const data = fs.readFileSync(configPath, 'utf-8');
const config = JSON.parse(data) as SeedConfig;
// Basic validation
if (!config.event_device_id) {
console.error('Invalid seed config: missing event_device_id');
return null;
}
return config;
} catch (error) {
console.error('Error loading seed config:', error);
return null;
}
}