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

Function uniqueSocketPath

__tests__/daemon-proof.test.ts:147–150  ·  view source on GitHub ↗

A socket or named-pipe path no other test uses.

()

Source from the content-addressed store, hash-verified

145
146/** A socket or named-pipe path no other test uses. */
147function uniqueSocketPath(): string {
148 const id = randomBytes(6).toString('hex');
149 return posix ? path.join(tempDir('cg-proofsock-'), `d-${id}.sock`) : `\\\\.\\pipe\\codegraph-prooftest-${id}`;
150}
151
152/** Read lines off `socket` as they come. */
153function lineReader(socket: net.Socket): () => Promise<string> {

Callers 1

Calls 2

tempDirFunction · 0.70
joinMethod · 0.45

Tested by

no test coverage detected