import { readFile } from 'node:fs/promises' import { join } from 'node:path' import { MDXRemoteBase } from '~/features/docs/MdxBase' import { TabPanel, Tabs } from '~/features/ui/Tabs' import { GENERATED_DIRECTORY } from '~/lib/docs' import { capitalize } from 'lodash-es' interface Lint { path: string content: string } export async function DatabaseAdvisorsIndex() { let lints: Lint[] = [] try { const raw = await readFile(join(GENERATED_DIRECTORY, 'database-advisors.json'), 'utf-8') lints = JSON.parse(raw) } catch (error) { console.warn( '[database-advisors] Failed to read generated advisor docs; rendering without them', error ) } return ( {lints.map((lint) => (
))}
) }