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

Function extractResolver

__tests__/install-ps1-version.test.ts:29–34  ·  view source on GitHub ↗

The resolver exactly as install.ps1 ships it.

()

Source from the content-addressed store, hash-verified

27
28/** The resolver exactly as install.ps1 ships it. */
29function extractResolver(): string {
30 const text = fs.readFileSync(INSTALL_PS1, 'utf8').replace(/\r\n/g, '\n');
31 const m = /# >>> Resolve-CodeGraphVersion\n([\s\S]*?)# <<< Resolve-CodeGraphVersion/.exec(text);
32 if (!m) throw new Error('install.ps1 has no Resolve-CodeGraphVersion block');
33 return m[1]!;
34}
35
36/** A PowerShell single-quoted string literal. */
37const psq = (s: string) => `'${s.replace(/'/g, "''")}'`;

Callers 1

resolveVersionFunction · 0.85

Calls 1

execMethod · 0.65

Tested by

no test coverage detected