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

Function workerFile

src/ui-server/highlight/bounded-tokenize.ts:40–45  ·  view source on GitHub ↗

* The compiled worker beside us; Vitest loads `src/` but builds `dist/` before * the tests, so it uses that copy. Null when neither exists.

()

Source from the content-addressed store, hash-verified

38 * the tests, so it uses that copy. Null when neither exists.
39 */
40function workerFile(): string | null {
41 const sibling = path.join(__dirname, 'tokenize-worker.js');
42 if (existsSync(sibling)) return sibling;
43 const built = path.resolve(__dirname, '../../../dist/ui-server/highlight/tokenize-worker.js');
44 return existsSync(built) ? built : null;
45}
46
47/** Settle everything waiting on the current worker and forget it. */
48function retire(outcome: BoundedTokenize): void {

Callers 1

tokenizeBoundedFunction · 0.85

Calls 2

resolveMethod · 0.65
joinMethod · 0.45

Tested by

no test coverage detected