// storage/sentry-store.ts — Sentry integration persistence (SPEC-435)
import { readFile, writeFile, mkdir } from 'node:fs/promises';
import { join, dirname } from 'node:path';
import { safeJsonParse } from './base-store.js';
function sentryConfigPath(projectPath) {
    return join(projectPath, 'data', 'sentry', 'config.json');
}
export async function getSentryConfig(projectPath) {
    try {
        const raw = await readFile(sentryConfigPath(projectPath), 'utf-8');
        return safeJsonParse(raw, null);
    }
    catch {
        return null;
    }
}
export async function saveSentryConfig(projectPath, config) {
    const filePath = sentryConfigPath(projectPath);
    await mkdir(dirname(filePath), { recursive: true });
    await writeFile(filePath, JSON.stringify(config, null, 2), 'utf-8');
}
//# sourceMappingURL=sentry-store.js.map