Run the real check and persist the result to the cache.
()
| 35 | |
| 36 | /** Run the real check and persist the result to the cache. */ |
| 37 | async function refreshSkillsCache(): Promise<SkillsUpdateMeta> { |
| 38 | const result = await checkSkills(); |
| 39 | // Only record a meaningful check when skills were actually found. |
| 40 | if (result.location) { |
| 41 | const config = readConfig(); |
| 42 | config.lastSkillsCheck = new Date().toISOString(); |
| 43 | config.skillsUpdateAvailable = result.updateAvailable; |
| 44 | config.skillsOutdatedCount = result.summary.outdated; |
| 45 | config.skillsMissingCount = result.summary.missing; |
| 46 | writeConfig(config); |
| 47 | } |
| 48 | return { |
| 49 | updateAvailable: result.updateAvailable, |
| 50 | outdated: result.summary.outdated, |
| 51 | missing: result.summary.missing, |
| 52 | }; |
| 53 | } |
| 54 | |
| 55 | /** |
| 56 | * Refresh the skills freshness cache if it is older than 24h. Best-effort: |
no test coverage detected