MCPcopy Index your code
hub / github.com/getsentry/XcodeBuildMCP / resolveAxePathFromSourceConfig

Function resolveAxePathFromSourceConfig

src/utils/axe-helpers.ts:61–80  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

59}
60
61function resolveAxePathFromSourceConfig(): string | null {
62 const value = getConfig().axeSourcePath;
63 if (!value) return null;
64
65 const sourcePath = resolve(value);
66 if (!isDirectory(sourcePath)) {
67 throw new Error(`Configured axeSourcePath does not exist or is not a directory: ${sourcePath}`);
68 }
69
70 const candidates = getAxeSourceBuildCandidates(sourcePath);
71 for (const candidate of candidates) {
72 if (isExecutable(candidate)) {
73 return candidate;
74 }
75 }
76
77 throw new Error(
78 `Configured axeSourcePath does not contain an executable release AXe build. Expected one of: ${candidates.join(', ')}`,
79 );
80}
81
82function resolveBundledAxePath(): string | null {
83 const candidates = new Set<string>();

Callers 1

resolveAxeBinaryFunction · 0.85

Calls 5

getConfigFunction · 0.90
resolveFunction · 0.85
isDirectoryFunction · 0.85
isExecutableFunction · 0.70

Tested by

no test coverage detected