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

Function uniqueSocketPath

__tests__/proxy-connect.test.ts:39–43  ·  view source on GitHub ↗

A socket path (a named pipe on Windows) no other test uses.

()

Source from the content-addressed store, hash-verified

37
38/** A socket path (a named pipe on Windows) no other test uses. */
39function uniqueSocketPath(): string {
40 const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'cg-proxy-'));
41 cleanups.push(() => { try { fs.rmSync(dir, { recursive: true, force: true }); } catch { /* ignore */ } });
42 return process.platform === 'win32' ? `\\\\.\\pipe\\${path.basename(dir)}-d` : path.join(dir, 'd.sock');
43}
44
45/** Stand up a fake daemon on its own path: a valid hello as `version`, and the proof `proof` says. */
46async function fakeDaemon(version: string, proof: FakeProof = 'valid') {

Callers 2

fakeDaemonFunction · 0.70

Calls 2

pushMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected