(args: Record<string, unknown>)
| 558 | |
| 559 | // fallow-ignore-next-line complexity |
| 560 | async function runProgress(args: Record<string, unknown>): Promise<void> { |
| 561 | const executionName = args.target as string | undefined; |
| 562 | if (!executionName) { |
| 563 | console.error("[cloudrun progress] usage: hyperframes cloudrun progress <executionName>"); |
| 564 | process.exit(1); |
| 565 | } |
| 566 | const { getRenderProgress } = await import("@hyperframes/gcp-cloud-run/sdk"); |
| 567 | const progress = await getRenderProgress({ executionName }); |
| 568 | if (args.json) { |
| 569 | console.log(JSON.stringify(progress, null, 2)); |
| 570 | return; |
| 571 | } |
| 572 | console.log(`status=${progress.status} progress=${(progress.overallProgress * 100).toFixed(0)}%`); |
| 573 | if (progress.totalFrames) |
| 574 | console.log(`frames=${progress.framesRendered}/${progress.totalFrames}`); |
| 575 | if (progress.outputFile) console.log(`output=${progress.outputFile.gcsUri}`); |
| 576 | console.log(`cost=${progress.costs.displayCost}`); |
| 577 | for (const e of progress.errors) console.error(` error ${e.state}: ${e.cause}`); |
| 578 | } |
| 579 | |
| 580 | // ── render-batch ──────────────────────────────────────────────────────────── |
| 581 |
no test coverage detected