(ctx: CliFailureContext, fetchedAt: Date = new Date())
| 353 | * lets specs assert the meta shape without touching disk. |
| 354 | */ |
| 355 | export function buildMeta(ctx: CliFailureContext, fetchedAt: Date = new Date()): BundleMeta { |
| 356 | return { |
| 357 | schemaVersion: BUNDLE_SCHEMA_VERSION, |
| 358 | snapshotId: ctx.snapshotId, |
| 359 | testId: ctx.testId, |
| 360 | projectId: ctx.projectId, |
| 361 | codeVersion: ctx.code.codeVersion ?? ctx.result.codeVersion ?? null, |
| 362 | runIdIfAvailable: ctx.result.runIdIfAvailable, |
| 363 | targetUrl: ctx.result.targetUrl, |
| 364 | failedStepIndex: ctx.result.failedStepIndex, |
| 365 | failureKind: ctx.result.failureKind, |
| 366 | capturedAt: ctx.result.finishedAt, |
| 367 | fetchedAt: fetchedAt.toISOString(), |
| 368 | }; |
| 369 | } |
| 370 | |
| 371 | /** |
| 372 | * Top-level bundle writer. The order matters: |
no outgoing calls
no test coverage detected