MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / dbPagesToFull

Function dbPagesToFull

apps/web/src/bridge/http-bridge.ts:694–701  ·  view source on GitHub ↗
(csvRel: string, pages: Record<string, string>)

Source from the content-addressed store, hash-verified

692}
693
694function dbPagesToFull(csvRel: string, pages: Record<string, string>): Record<string, string> {
695 const formDir = formDirFromCsvPath(dbToPosix(csvRel))
696 if (!formDir) return pages
697 const prefix = `${formDir}/`
698 return Object.fromEntries(
699 Object.entries(pages).map(([id, p]) => [id, p.startsWith(prefix) ? p : `${prefix}${p}`])
700 )
701}
702function dbPagesToRelative(csvRel: string, pages: Record<string, string>): Record<string, string> {
703 const formDir = formDirFromCsvPath(dbToPosix(csvRel))
704 if (!formDir) return pages

Callers 1

dbReadSidecarFunction · 0.85

Calls 2

formDirFromCsvPathFunction · 0.90
dbToPosixFunction · 0.85

Tested by

no test coverage detected