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

Function writeFakeLib

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

Source from the content-addressed store, hash-verified

50// Write a fake compiled library that exports a sentinel, at the given lib/dist
51// root (used both for the platform package and the self-heal cache bundle).
52function writeFakeLib(libDistDir: string, sentinel: string): void {
53 fs.mkdirSync(libDistDir, { recursive: true });
54 fs.writeFileSync(
55 path.join(libDistDir, 'index.js'),
56 `module.exports = { SENTINEL: ${JSON.stringify(sentinel)}, CodeGraph: function CodeGraph() {} };\n`
57 );
58}
59
60function installPlatformPackage(root: string, sentinel: string): void {
61 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.45

Tested by

no test coverage detected