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

Function cachedLibrary

scripts/npm-sdk.js:65–75  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

63}
64
65function cachedLibrary() {
66 try {
67 var version = require(path.join(__dirname, 'package.json')).version;
68 var base = process.env.CODEGRAPH_INSTALL_DIR || path.join(os.homedir(), '.codegraph');
69 var lib = path.join(base, 'bundles', target + '-' + version, 'lib', 'dist', 'index.js');
70 if (fs.existsSync(lib)) return lib;
71 } catch (e) {
72 /* no readable cache → caller reports the install guidance */
73 }
74 return null;
75}

Callers 1

resolveLibraryFunction · 0.85

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected