(e: HistoryEntry)
| 17 | } |
| 18 | |
| 19 | function entryLabel(e: HistoryEntry): string { |
| 20 | const short = e.id.length > 12 ? `${e.id.slice(0, 12)}…` : e.id; |
| 21 | const url = entryUrl(e); |
| 22 | const urlShort = url.length > 50 ? `${url.slice(0, 49)}…` : url; |
| 23 | const color = |
| 24 | e.status === "completed" ? chalk.green : e.status === "failed" ? chalk.red : chalk.yellow; |
| 25 | return `${chalk.dim(short)} ${color(e.status)} ${urlShort}`; |
| 26 | } |
| 27 | |
| 28 | function entryHint(e: HistoryEntry): string { |
| 29 | if (!e.createdAt) return ""; |