* Get project details from provider with caching
(provider: ProviderType, projectId: string)
| 334 | * Get project details from provider with caching |
| 335 | */ |
| 336 | async getProviderProject(provider: ProviderType, projectId: string): Promise<CachedResult<Project>> { |
| 337 | const cacheKey = `${provider}:project:${projectId}`; |
| 338 | const { deploymentCache } = getCache(); |
| 339 | |
| 340 | // Check cache first |
| 341 | const cached = await getCacheValueWithTTL(deploymentCache, cacheKey); |
| 342 | |
| 343 | if (cached) { |
| 344 | return { data: cached.data, remainingTTL: cached.remainingTTL }; |
| 345 | } |
| 346 | |
| 347 | // Fetch from driver |
| 348 | const driver = await this.getDriver(provider); |
| 349 | const project = await driver.getProject(projectId); |
| 350 | |
| 351 | // Store in cache |
| 352 | await setCacheValueWithExpiry(deploymentCache, cacheKey, project, DEPLOYMENT_CACHE_TTL); |
| 353 | |
| 354 | // Return with full TTL (just cached) |
| 355 | return { data: project, remainingTTL: DEPLOYMENT_CACHE_TTL }; |
| 356 | } |
| 357 | |
| 358 | /** |
| 359 | * Dashboard: projects + latest run status + stats |
nothing calls this directly
no test coverage detected