DemoVaultCoverageChecker
Reflects a plugin’s public surface from source and checks its in-repo demo-vault/ stays in sync with it.
Every method is a pure query over files under the repo root (the demo corpus is read once and cached), so the checker is trivially unit-testable against a fixture repo and carries no test-framework dependency.
Import:
import { DemoVaultCoverageChecker } from 'obsidian-dev-utils/script-utils/demo-vault-coverage';Signature:
export class DemoVaultCoverageCheckerConstructor
new DemoVaultCoverageChecker(params: DemoVaultCoverageCheckerConstructorParams)Creates a checker rooted at a plugin repo.
Methods
| Method | Returns | Description |
|---|---|---|
| collectDemoNoteRelativePaths() | string[] | Collects the demo notes as paths relative to the demo vault folder (for a non-trivial-surface guard). |
| findStaleReferences(params) | string[] | Finds members that the demo notes reference on a receiver but that no longer exist on it (rename drift). |
| findUndemonstratedMembers(params) | string[] | Finds members that are not demonstrated anywhere in the demo corpus. |
| findUnlinkedFeatureDocs(params) | string[] | Finds feature docs that no demo note links to. |
| getExportedFunctionNames(params) | string[] | Parses the names of the export functions (including async and generator declarations) in a source file. |
| getInterfaceMembers(params) | InterfaceMembers | Parses the members of an export interface, export class, or export enum declared in a source file. |
| readCorpus() | string | Reads and caches the demo corpus — every *.md note in the demo vault joined into one string. |
Links to this page: