(projectId: string)
| 3 | import type { Project } from '../../shared/desktop-contracts.ts' |
| 4 | |
| 5 | export async function resolveProjectPathForComparison(projectId: string) { |
| 6 | const resolvedProjectId = path.resolve(projectId) |
| 7 | |
| 8 | try { |
| 9 | return await realpath(resolvedProjectId) |
| 10 | } catch (error) { |
| 11 | if ( |
| 12 | typeof error === 'object' && |
| 13 | error !== null && |
| 14 | 'code' in error && |
| 15 | typeof error.code === 'string' && |
| 16 | error.code !== 'ENOENT' |
| 17 | ) { |
| 18 | console.warn(`Failed to resolve project path for shell state: ${resolvedProjectId}`, error) |
| 19 | } |
| 20 | |
| 21 | return resolvedProjectId |
| 22 | } |
| 23 | } |
| 24 | |
| 25 | export async function enrichProjectsWithResolvedIds(projects: Project[]) { |
| 26 | return Promise.all( |
no outgoing calls
no test coverage detected