()
| 59 | } |
| 60 | |
| 61 | function 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 | |
| 82 | function resolveBundledAxePath(): string | null { |
| 83 | const candidates = new Set<string>(); |
no test coverage detected