( pages?: Record<string, string> )
| 748 | } |
| 749 | |
| 750 | async function dbReadPageFlags( |
| 751 | pages?: Record<string, string> |
| 752 | ): Promise<Record<string, boolean> | undefined> { |
| 753 | if (!pages || Object.keys(pages).length === 0) return undefined |
| 754 | const flags: Record<string, boolean> = {} |
| 755 | await Promise.all( |
| 756 | Object.entries(pages).map(async ([rowId, notePath]) => { |
| 757 | const text = await readFileTextOrNull(notePath) |
| 758 | if (text !== null) flags[rowId] = dbNoteHasBody(text) |
| 759 | }) |
| 760 | ) |
| 761 | return flags |
| 762 | } |
| 763 | |
| 764 | async function primaryNotesAtRoot(): Promise<boolean> { |
| 765 | try { |
no test coverage detected