feat(cli): add terminal stats dashboard and solution detection utilities

This commit is contained in:
Prad Nukala
2026-08-31 18:56:42 -04:00
parent 7bae7b2920
commit b86f36daf1
6 changed files with 784 additions and 5 deletions
+3 -1
View File
@@ -21,6 +21,7 @@
*/
import { join } from "node:path";
import { SRS_API } from "./api.ts";
import { github } from "./github.ts";
import { markdownTable, printTable, writeStepSummary } from "./report.ts";
import { isImplemented } from "./source.ts";
@@ -162,7 +163,8 @@ for (const num of [...work.keys()].sort((a, b) => a - b)) {
// rung named, so the whole implemented set can go over on every push (a total
// recompute that backfills whatever earlier runs missed) and re-runs write
// nothing.
const SRS_API = process.env.SRS_API ?? "https://srs-api.prdlk.workers.dev";
// SRS_API (apps/cli/api.ts) is the switch that points this at a wrangler dev
// instance instead of production.
const solved = [...work.entries()]
.flatMap(([lc, entry]) => [...entry.solved].sort().map((bucket) => ({ lc, bucket })))
.sort((a, b) => a.lc - b.lc || a.bucket - b.bucket);