/** * @file * * Reads a plugin's in-repo `demo-vault/` tree into a populate map so a Vitest/Jest global setup can * seed it into the temp vault BEFORE Obsidian opens it. Seeding pre-launch lets Obsidian's startup scan * index every note in one pass, avoiding the file-watcher race that silently drops events under a bulk * post-launch {@link TemporaryVault.populate}. */ import type { PopulateFilesParams } from './temporary-vault.cjs'; /** * Parameters for {@link readDemoVaultTree}. */ export interface ReadDemoVaultTreeParams { /** * Absolute path to the demo vault directory to read. */ readonly demoVaultPath: string; /** * Names (of files or directories, matched at any depth) to skip. Defaults to `.git` and `.obsidian`: * the harness provisions `.obsidian/plugins/` itself, so the vault's own `.obsidian` must not be * copied over it. * * @default `['.git', '.obsidian']` */ readonly excludedNames?: Iterable; } /** * Reads a demo vault directory tree recursively into a {@link PopulateFilesParams} map (vault-relative * POSIX path to file bytes), skipping {@link ReadDemoVaultTreeParams.excludedNames}. * * @param params - The {@link ReadDemoVaultTreeParams}. * @returns The populate map, ready to hand to {@link TemporaryVault.populate} or a global setup's `populate`. */ export declare function readDemoVaultTree(params: ReadDemoVaultTreeParams): PopulateFilesParams;