---
import { registryApps, registryStrategyLabel, type RegistryReferenceSection } from '../data/registry';
interface Props {
name: string;
section: RegistryReferenceSection;
}
const { name, section } = Astro.props;
const app = registryApps.find((item) => item.name === name);
if (!app) throw new Error(`Unknown registry app: ${name}`);
---
{section === 'overview' && (
| Property | Included behavior |
| Registry app | {app.name} (v{app.version}) |
| Install command | bunx chkit add {app.name} |
| Source directory | {app.root} |
| Authentication | {app.authentication?.method ?? 'See provider setup'} |
| Environment variables | {app.authentication?.env.map((env, index) => <>{index > 0 && ', '}{env}>) ?? 'See provider setup'} |
| ClickHouse | {app.clickhouse} |
| Coverage | {app.resources.length} synced resources, {app.views?.length ?? 0} derived views |
| Sync strategy | {app.strategies.map(registryStrategyLabel).join(', ')} |
)}
{section === 'authentication' && app.authentication && (
<>
{app.authentication.setup.map((step) => - {step}
)}
{app.title} credential setup
>
)}
{section === 'scopes' && (
| Resource | Required scopes |
{app.resources.map((resource) => | {resource.title ?? resource.name} | {resource.scopes.length ? resource.scopes.map((scope, index) => <>{index > 0 && ', '}{scope}>) : 'None'} |
)}
)}
{section === 'resources' && (
| Resource | Default ClickHouse table | Records synced | API reference |
{app.resources.map((resource) => (
{resource.title ?? resource.name} ({resource.name}) |
{resource.table ? {resource.table} : 'See source schema'} |
{resource.description} |
{resource.endpoints?.map((endpoint, index) => <>{index > 0 && ', '}{endpoint.method} {endpoint.path}>) ?? 'See provider documentation'} |
))}
)}
{section === 'views' && (
| Derived view | Source resource | Included projection |
{app.views?.map((view) => {view.name} | {view.source} | {view.description} |
)}
)}
{section === 'sync' && app.sync && (
| Behavior | Details |
| Sync | {app.sync.description} |
| Schedule | {app.sync.schedule} |
| Deletions | {app.sync.deletions} |
)}
{section === 'changelog' && app.changelog?.map((release) => (
<>
Version {release.version}
{release.changes.map((change) => - {change}
)}
>
))}