import { collectDependencies, hasAnyFile } from '../detection-utils.js';
const TIMESCALE_DEPS = ['timescaledb', 'timescale', 'tsdb'];
const INFLUX_DEPS = [
    '@influxdata/influxdb-client',
    'influxdb-client',
    'influxdb-client-python',
    'influxdb',
    'influxdb2',
    'influxdb-v2',
];
const QUESTDB_DEPS = ['@questdb/nodejs-client', 'questdb', 'questdb-rs'];
export async function detectTimeseriesDb(projectPath) {
    const deps = await collectDependencies(projectPath);
    // TimescaleDB (PostgreSQL extension — check specific deps first)
    if (TIMESCALE_DEPS.some((d) => deps.has(d))) {
        return 'timescaledb';
    }
    if (await hasAnyFile(projectPath, ['timescaledb.conf'])) {
        return 'timescaledb';
    }
    // InfluxDB
    if (INFLUX_DEPS.some((d) => deps.has(d))) {
        return 'influxdb';
    }
    // QuestDB
    if (QUESTDB_DEPS.some((d) => deps.has(d))) {
        return 'questdb';
    }
    return null;
}
//# sourceMappingURL=timeseries-db-detector.js.map