(csvRel: string, pages: Record<string, string>)
| 700 | ) |
| 701 | } |
| 702 | function dbPagesToRelative(csvRel: string, pages: Record<string, string>): Record<string, string> { |
| 703 | const formDir = formDirFromCsvPath(dbToPosix(csvRel)) |
| 704 | if (!formDir) return pages |
| 705 | const prefix = `${formDir}/` |
| 706 | return Object.fromEntries( |
| 707 | Object.entries(pages).map(([id, p]) => [id, p.startsWith(prefix) ? p.slice(prefix.length) : p]) |
| 708 | ) |
| 709 | } |
| 710 | |
| 711 | function dbHydrate( |
| 712 | csvPath: string, |
no test coverage detected