(lines: string[])
| 102 | } |
| 103 | |
| 104 | function renderCard(lines: string[]): string { |
| 105 | const measuredWidth = Math.max(...lines.map((line) => line.length), 0) |
| 106 | const contentWidth = measuredWidth + EXTRA_CARD_SPACE |
| 107 | const horizontal = `╭${"─".repeat(contentWidth + CARD_PADDING * 2)}╮` |
| 108 | const bottom = `╰${"─".repeat(contentWidth + CARD_PADDING * 2)}╯` |
| 109 | const body = lines.map((line) => { |
| 110 | const padded = line.padEnd(contentWidth, " ") |
| 111 | return `│${" ".repeat(CARD_PADDING)}${padded}${" ".repeat(CARD_PADDING)}│` |
| 112 | }) |
| 113 | return [horizontal, ...body, bottom].join("\n") |
| 114 | } |
| 115 | |
| 116 | function formatAccess(record: UsageRecordSummary): string { |
| 117 | if (record.allowed === false) { |
no outgoing calls
no test coverage detected