ClientLibReferenceSource Class — supabase Architecture
Architecture documentation for the ClientLibReferenceSource class in reference-doc.ts from the supabase codebase.
Entity Profile
Relationship Graph
Source Code
apps/docs/scripts/search/sources/reference-doc.ts lines 279–307
export class ClientLibReferenceSource extends ReferenceSource<IFunctionDefinition> {
formatSection(functionDefinition: IFunctionDefinition, refSection: ICommonItem): string {
const { title } = refSection
const { description, title: functionName } = functionDefinition
return JSON.stringify({
title,
description,
functionName,
})
}
extractTitle(): string {
return this.specSection.title
}
extractSubtitle(): string {
return `${this.meta.title}: ${this.refSection.title}`
}
extractIndexedContent(): string {
const { title, description, examples } = this.specSection
const exampleText =
examples
?.map((example) => `### ${example.name ?? ''}\n\n${example.code ?? ''}`)
.join('\n\n') ?? ''
return `# ${this.meta.title ?? ''}\n\n${title ?? ''}\n\n${description ?? ''}\n\n## Examples\n\n${exampleText}`
}
}
Domain
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free