| 270 | } |
| 271 | |
| 272 | function makeInitialManifest(prepared: PreparedBatchRender): BatchManifest { |
| 273 | return { |
| 274 | version: 1, |
| 275 | batchPath: prepared.batchPath, |
| 276 | manifestPath: prepared.manifestPath, |
| 277 | total: prepared.rows.length, |
| 278 | completed: 0, |
| 279 | failed: 0, |
| 280 | skipped: 0, |
| 281 | rows: prepared.rows.map((row) => ({ |
| 282 | index: row.index, |
| 283 | outputPath: row.outputPath, |
| 284 | status: "pending", |
| 285 | durationMs: null, |
| 286 | renderTimeMs: null, |
| 287 | error: null, |
| 288 | startedAt: null, |
| 289 | completedAt: null, |
| 290 | variables: row.variables, |
| 291 | })), |
| 292 | }; |
| 293 | } |
| 294 | |
| 295 | function summarizeManifest(manifest: BatchManifest): void { |
| 296 | manifest.completed = manifest.rows.filter((row) => row.status === "completed").length; |