MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / detect

Method detect

src/installer/targets/kiro.ts:64–72  ·  view source on GitHub ↗
(loc: Location)

Source from the content-addressed store, hash-verified

62 }
63
64 detect(loc: Location): DetectionResult {
65 const file = mcpJsonPath(loc);
66 const config = readJsonFile(file);
67 const alreadyConfigured = !!config.mcpServers?.codegraph;
68 const installed = loc === 'global'
69 ? fs.existsSync(configDir('global')) || fs.existsSync(file)
70 : fs.existsSync(file) || fs.existsSync(configDir('local'));
71 return { installed, alreadyConfigured, configPath: file };
72 }
73
74 install(loc: Location, _opts: InstallOptions): WriteResult {
75 const files: WriteResult['files'] = [];

Callers

nothing calls this directly

Calls 3

readJsonFileFunction · 0.90
mcpJsonPathFunction · 0.70
configDirFunction · 0.70

Tested by

no test coverage detected