(l1: string, v1: string, l2: string, v2: string)
| 1104 | const COL2_START = 40; |
| 1105 | const COL2_LABEL_WIDTH = 18; |
| 1106 | const row = (l1: string, v1: string, l2: string, v2: string): string => { |
| 1107 | // Build column 1: label + value |
| 1108 | const label1 = (l1 + ':').padEnd(COL1_LABEL_WIDTH); |
| 1109 | const col1PlainLen = label1.length + v1.length; |
| 1110 | |
| 1111 | // Calculate spaces needed between col1 value and col2 label |
| 1112 | const spaceBetween = Math.max(2, COL2_START - col1PlainLen); |
| 1113 | |
| 1114 | // Build column 2: label + value |
| 1115 | const label2 = (l2 + ':').padEnd(COL2_LABEL_WIDTH); |
| 1116 | |
| 1117 | // Assemble with colors applied to values only |
| 1118 | return label1 + h(v1) + ' '.repeat(spaceBetween) + label2 + h(v2); |
| 1119 | }; |
| 1120 | |
| 1121 | // Heatmap - use fixed width for screenshot (56 = 52 weeks + 4 for day labels) |
| 1122 | if (stats.dailyActivity.length > 0) { |
no test coverage detected