(repoUrl: string)
| 20 | } |
| 21 | |
| 22 | function normalizeRepoUrl(repoUrl: string): string { |
| 23 | const trimmed = repoUrl |
| 24 | .trim() |
| 25 | .replace(/\/$/, "") |
| 26 | .replace(/\.git$/, ""); |
| 27 | return trimmed || HYPERFRAMES_REPO_URL; |
| 28 | } |
| 29 | |
| 30 | function truncate(value: string, max: number): string { |
| 31 | return value.length > max ? `${value.slice(0, max - 1)}…` : value; |