MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / readProjectConfig

Function readProjectConfig

packages/cli/src/utils/projectConfig.ts:50–59  ·  view source on GitHub ↗
(projectDir: string)

Source from the content-addressed store, hash-verified

48
49/** Read `hyperframes.json` from a project directory. */
50export function readProjectConfig(projectDir: string): ProjectConfig | undefined {
51 const path = projectConfigPath(projectDir);
52 try {
53 const parsed = JSON.parse(readFileSync(path, "utf-8")) as Partial<ProjectConfig>;
54 return normalizeConfig(parsed);
55 } catch {
56 // Missing file or corrupt JSON → no config.
57 return undefined;
58 }
59}
60
61/**
62 * Return a valid config — fills in any missing fields with defaults. Used

Callers 2

loadProjectConfigFunction · 0.85

Calls 2

projectConfigPathFunction · 0.85
normalizeConfigFunction · 0.85

Tested by

no test coverage detected