( deps: ResolvedDoctorDeps, options: DoctorOptions, cwd: string, )
| 135 | } |
| 136 | |
| 137 | async function buildCheckSpecs( |
| 138 | deps: ResolvedDoctorDeps, |
| 139 | options: DoctorOptions, |
| 140 | cwd: string, |
| 141 | ): Promise<CheckSpec[]> { |
| 142 | if (options.target === 'config') { |
| 143 | return [ |
| 144 | makeConfigSpec( |
| 145 | await resolveConfigTargetPath(deps, options.path, cwd), |
| 146 | options.path !== undefined, |
| 147 | deps, |
| 148 | ), |
| 149 | ]; |
| 150 | } |
| 151 | |
| 152 | if (options.target === 'tui') { |
| 153 | return [ |
| 154 | makeTuiSpec( |
| 155 | resolveTuiTargetPath(deps, options.path, cwd), |
| 156 | options.path !== undefined, |
| 157 | ), |
| 158 | ]; |
| 159 | } |
| 160 | |
| 161 | return [ |
| 162 | makeConfigSpec(await deps.defaultConfigPath(), false, deps), |
| 163 | makeTuiSpec(deps.defaultTuiConfigPath(), false), |
| 164 | ]; |
| 165 | } |
| 166 | |
| 167 | function makeConfigSpec( |
| 168 | path: string, |
no test coverage detected