( rootDir: string, runId: string, )
| 97 | } |
| 98 | |
| 99 | async function readWorkflowRun( |
| 100 | rootDir: string, |
| 101 | runId: string, |
| 102 | ): Promise<WorkflowRunRecord | null> { |
| 103 | try { |
| 104 | const parsed = safeParseJSON( |
| 105 | await readFile( |
| 106 | join(rootDir, WORKFLOW_RUNS_REL, `${runId}.json`), |
| 107 | 'utf-8', |
| 108 | ), |
| 109 | false, |
| 110 | ) |
| 111 | return normalizeWorkflowRun(parsed) |
| 112 | } catch { |
| 113 | return null |
| 114 | } |
| 115 | } |
| 116 | |
| 117 | export async function listWorkflowRuns( |
| 118 | rootDir: string = getProjectRoot(), |
no test coverage detected