(workDir: string)
| 184 | } |
| 185 | |
| 186 | export function loadJobFile(workDir: string): JobFile { |
| 187 | const filePath = getJobFilePath(workDir); |
| 188 | if (!fs.existsSync(filePath)) { |
| 189 | return { jobs: [] }; |
| 190 | } |
| 191 | |
| 192 | const raw = fs.readFileSync(filePath, "utf-8"); |
| 193 | const parsed = JSON.parse(raw) as unknown; |
| 194 | validateJobFileShape(parsed, filePath); |
| 195 | return normalizeJobFile(parsed); |
| 196 | } |
| 197 | |
| 198 | export function saveJobFile(workDir: string, jobFile: JobFile): void { |
| 199 | const filePath = getJobFilePath(workDir); |
no test coverage detected