()
| 269 | let authCachePromise: Promise<McpAuthCacheData> | null = null |
| 270 | |
| 271 | function getMcpAuthCache(): Promise<McpAuthCacheData> { |
| 272 | if (!authCachePromise) { |
| 273 | authCachePromise = readFile(getMcpAuthCachePath(), 'utf-8') |
| 274 | .then(data => jsonParse(data) as McpAuthCacheData) |
| 275 | .catch(() => ({})) |
| 276 | } |
| 277 | return authCachePromise |
| 278 | } |
| 279 | |
| 280 | async function isMcpAuthCached(serverId: string): Promise<boolean> { |
| 281 | const cache = await getMcpAuthCache() |
no test coverage detected