()
| 178 | return installWarnings.map(warning => warning.message); |
| 179 | } |
| 180 | export async function buildInstallationHealthDiagnostics(): Promise<Diagnostic[]> { |
| 181 | const diagnostic = await getDoctorDiagnostic(); |
| 182 | const items: Diagnostic[] = []; |
| 183 | const { |
| 184 | errors: validationErrors |
| 185 | } = getSettingsWithAllErrors(); |
| 186 | if (validationErrors.length > 0) { |
| 187 | const invalidFiles = Array.from(new Set(validationErrors.map(error => error.file))); |
| 188 | const fileList = invalidFiles.join(', '); |
| 189 | items.push(`Found invalid settings files: ${fileList}. They will be ignored.`); |
| 190 | } |
| 191 | |
| 192 | // Add warnings from doctor diagnostic (includes leftover installations, config mismatches, etc.) |
| 193 | diagnostic.warnings.forEach(warning => { |
| 194 | items.push(warning.issue); |
| 195 | }); |
| 196 | if (diagnostic.hasUpdatePermissions === false) { |
| 197 | items.push('No write permissions for auto-updates (requires sudo)'); |
| 198 | } |
| 199 | return items; |
| 200 | } |
| 201 | export function buildAccountProperties(): Property[] { |
| 202 | const accountInfo = getAccountInformation(); |
| 203 | if (!accountInfo) { |
no test coverage detected