MCPcopy Index your code
hub / github.com/colbymchenry/codegraph / writeFakeLib

Function writeFakeLib

__tests__/npm-sdk.test.ts:47–53  ·  view source on GitHub ↗
(libDistDir: string, sentinel: string)

Source from the content-addressed store, hash-verified

45// Write a fake compiled library that exports a sentinel, at the given lib/dist
46// root (used both for the platform package and the self-heal cache bundle).
47function writeFakeLib(libDistDir: string, sentinel: string): void {
48 fs.mkdirSync(libDistDir, { recursive: true });
49 fs.writeFileSync(
50 path.join(libDistDir, 'index.js'),
51 `module.exports = { SENTINEL: ${JSON.stringify(sentinel)}, CodeGraph: function CodeGraph() {} };\n`
52 );
53}
54
55function installPlatformPackage(root: string, sentinel: string): void {
56 const pkgRoot = path.join(root, 'node_modules', '@colbymchenry', `codegraph-${target}`);

Callers 2

installPlatformPackageFunction · 0.85
npm-sdk.test.tsFile · 0.85

Calls 1

joinMethod · 0.80

Tested by

no test coverage detected