MCPcopy Create free account
hub / github.com/ReviewStage/stage-cli / getDbPath

Function getDbPath

packages/cli/src/db/path.ts:11–14  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

9const REPO_HASH_LEN = 12;
10
11export function getDbPath(): string {
12 const dir = ensureRepoDir(readRepoRoot());
13 return path.join(dir, DB_FILE);
14}
15
16function ensureRepoDir(repoRoot: string): string {
17 const hash = createHash("sha256").update(repoRoot.trim()).digest("hex").slice(0, REPO_HASH_LEN);

Callers 1

getDbFunction · 0.85

Calls 2

ensureRepoDirFunction · 0.85
readRepoRootFunction · 0.85

Tested by

no test coverage detected