MCPcopy Index your code
hub / github.com/ChatLab/ChatLab / getDbFileVersion

Function getDbFileVersion

packages/node-runtime/src/cache/analytics-cache.ts:33–44  ·  view source on GitHub ↗
(dbPath: string)

Source from the content-addressed store, hash-verified

31 * actually exists.
32 */
33export function getDbFileVersion(dbPath: string): string {
34 const parts: string[] = []
35 for (const p of [dbPath, `${dbPath}-wal`]) {
36 try {
37 const st = fs.statSync(p)
38 parts.push(`${Math.floor(st.mtimeMs)}:${st.size}`)
39 } catch {
40 parts.push('-')
41 }
42 }
43 return parts.join('|')
44}
45
46/**
47 * Cache-first analytics read with version validation.

Callers 7

withAnalyticsCacheFunction · 0.90
buildContactsSignatureFunction · 0.90
getSessionDbVersionFunction · 0.90
getSessionDbVersionFunction · 0.90
dbWorker.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected