// tools/generate-tests/generators/database/index.ts
// Entry point for the database test generator module.
// Orchestrates detection, test definitions, and scaffold generation.
import { detectCaching, detectSearchEngine, hasOrm } from './detectors.js';
import { buildTsDatabaseTest } from './ts-scaffold.js';
import { buildPythonDatabaseTest } from './python-scaffold.js';
export function generateDatabaseTestFiles(spec, testDir, framework, language, testExt, autoGenerate, knowledge) {
    const cache = detectCaching(knowledge);
    const search = detectSearchEngine(knowledge);
    const orm = hasOrm(knowledge);
    const db = knowledge.database;
    const isPython = language === 'python';
    const ext = isPython ? 'py' : testExt;
    const fw = isPython ? 'pytest' : framework;
    const content = isPython
        ? buildPythonDatabaseTest(spec.title, db, orm, cache, search)
        : buildTsDatabaseTest(spec.title, db, orm, cache, search);
    return [
        {
            path: `${testDir}/database/${spec.slug}.database.test.${ext}`,
            framework: fw,
            content,
            ready: autoGenerate,
        },
    ];
}
export { detectCaching, detectSearchEngine, hasOrm, isDatabaseTestProject } from './detectors.js';
export { generateDatabaseTestDefs } from './test-defs.js';
//# sourceMappingURL=index.js.map