MCPcopy
hub / github.com/colbymchenry/codegraph / readConfig

Method readConfig

src/telemetry/index.ts:338–347  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

336 }
337
338 private readConfig(): ConfigFile | null {
339 if (this.configCache !== undefined) return this.configCache;
340 try {
341 const raw = JSON.parse(fs.readFileSync(this.configPath, 'utf8')) as ConfigFile;
342 this.configCache = typeof raw.machine_id === 'string' && typeof raw.enabled === 'boolean' ? raw : null;
343 } catch {
344 this.configCache = null;
345 }
346 return this.configCache;
347 }
348
349 private writeConfig(config: ConfigFile): void {
350 try {

Callers 5

getStatusMethod · 0.95
setEnabledMethod · 0.95
hasStoredChoiceMethod · 0.95
firstRunNoticeMethod · 0.95
sendMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected