// tools/generate-tests/generators/database/detectors.ts
// Signal constants and detection helpers for database-related tech stack.
const CACHE_SIGNALS = ['redis', 'memcached', 'node-cache', 'caffeine', 'ehcache', 'valkey'];
const SEARCH_SIGNALS = [
    'elasticsearch',
    'meilisearch',
    'algolia',
    'opensearch',
    'solr',
    'typesense',
];
export function detectCaching(knowledge) {
    const stackLower = knowledge.stack.map((s) => s.toLowerCase());
    for (const sig of CACHE_SIGNALS) {
        if (stackLower.some((s) => s.includes(sig))) {
            return sig;
        }
    }
    return null;
}
export function detectSearchEngine(knowledge) {
    const stackLower = knowledge.stack.map((s) => s.toLowerCase());
    for (const sig of SEARCH_SIGNALS) {
        if (stackLower.some((s) => s.includes(sig))) {
            return sig;
        }
    }
    return null;
}
export function hasOrm(knowledge) {
    return knowledge.orm !== null && knowledge.orm !== 'unknown';
}
export function isDatabaseTestProject(knowledge) {
    return knowledge.database !== 'unknown';
}
//# sourceMappingURL=detectors.js.map