()
| 65 | * 返回 Promise 以便调用者可以获取结果 |
| 66 | */ |
| 67 | export async function checkForUpdatesOnStartup(): Promise<UpdateCheckResult> { |
| 68 | // 延迟 2 秒后检查,避免影响启动速度 |
| 69 | return new Promise((resolve) => { |
| 70 | setTimeout(async () => { |
| 71 | const result = await checkForUpdates(); |
| 72 | resolve(result); |
| 73 | }, 2000); |
| 74 | }); |
| 75 | } |
no test coverage detected