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