()
| 899 | } |
| 900 | |
| 901 | async function listDatabases(): Promise<DatabaseSummary[]> { |
| 902 | const [folders, atRoot] = await Promise.all([listFolders(), primaryNotesAtRoot()]) |
| 903 | const out: DatabaseSummary[] = [] |
| 904 | for (const f of folders) { |
| 905 | if (!isFormDirName(f.subpath)) continue |
| 906 | // The folder subpath is folder-relative; reconstruct the vault-relative path. |
| 907 | const csv = csvPathForFormDir(vaultRelDir(f.folder, f.subpath, atRoot)) |
| 908 | out.push({ path: csv, title: dbTitleFromPath(csv) }) |
| 909 | } |
| 910 | return out.sort((a, b) => a.title.localeCompare(b.title)) |
| 911 | } |
| 912 | |
| 913 | // -------------------------------------------------------------------- |
| 914 | // Demo tour |
nothing calls this directly
no test coverage detected