tech-debt-visualizer 0.2.19 → 0.2.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +2 -11
- package/dist/llm.js +1 -1
- package/dist/reports/assets/report.css +66 -29
- package/dist/reports/html.js +7 -7
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -195,7 +195,7 @@ function printCliReport(run, ci) {
|
|
|
195
195
|
process.stdout.write(chalk.bold.dim(" Technical Debt Cleanliness Score\n"));
|
|
196
196
|
process.stdout.write(" " + "—".repeat(52) + "\n");
|
|
197
197
|
const tierColor = cleanlinessTierColor(cleanliness.tier);
|
|
198
|
-
process.stdout.write(tierColor(` ${cleanliness.label} (${
|
|
198
|
+
process.stdout.write(tierColor(` ${cleanliness.label} (${cleanliness.tier} out of 5)\n`));
|
|
199
199
|
process.stdout.write(tierColor(` ${cleanliness.description}\n`));
|
|
200
200
|
process.stdout.write(" " + "—".repeat(52) + "\n\n");
|
|
201
201
|
process.stdout.write(chalk.bold(" Summary\n"));
|
|
@@ -205,8 +205,7 @@ function printCliReport(run, ci) {
|
|
|
205
205
|
if (run.debtTrend && run.debtTrend.length > 0) {
|
|
206
206
|
process.stdout.write(` Recent commits: ${chalk.cyan(String(run.debtTrend.length))}\n`);
|
|
207
207
|
}
|
|
208
|
-
process.stdout.write(`
|
|
209
|
-
process.stdout.write(chalk.dim(" 0 = most debt, 100 = least debt\n\n"));
|
|
208
|
+
process.stdout.write(` Score: ${tierColor(`${cleanliness.tier} out of 5`)}\n\n`);
|
|
210
209
|
const bySeverity = { critical: 0, high: 0, medium: 0, low: 0 };
|
|
211
210
|
for (const d of debtItems) {
|
|
212
211
|
bySeverity[d.severity]++;
|
|
@@ -296,14 +295,6 @@ function severityColor(score) {
|
|
|
296
295
|
return chalk.yellow(String(score));
|
|
297
296
|
return chalk.green(String(score));
|
|
298
297
|
}
|
|
299
|
-
function cleanlinessColor(cleanlinessScore) {
|
|
300
|
-
const n = Math.round(cleanlinessScore);
|
|
301
|
-
if (n >= 70)
|
|
302
|
-
return chalk.green(String(n));
|
|
303
|
-
if (n >= 40)
|
|
304
|
-
return chalk.yellow(String(n));
|
|
305
|
-
return chalk.red(String(n));
|
|
306
|
-
}
|
|
307
298
|
function cleanlinessTierColor(tier) {
|
|
308
299
|
switch (tier) {
|
|
309
300
|
case 5:
|
package/dist/llm.js
CHANGED
|
@@ -328,7 +328,7 @@ All files in this codebase: ${allFiles.join(", ")}
|
|
|
328
328
|
Top risk files (by hotspot): ${topFiles.join(", ")}
|
|
329
329
|
|
|
330
330
|
Output only:
|
|
331
|
-
1. A single paragraph of
|
|
331
|
+
1. A single paragraph of 5–8 sentences that gives full context for the whole codebase. Cover ALL files: briefly note which files or areas are in good shape, which have issues, and how they fit together. Include strengths, main concerns, and the single most important improvement. Write for someone who needs to understand the entire codebase, not just the problematic parts. No code block unless absolutely necessary.
|
|
332
332
|
2. On the next line write only one word: critical, high, medium, low, or none (overall codebase technical debt severity).
|
|
333
333
|
3. On the line after that write only a number 0-100 (0 = most debt, 100 = least debt / cleanest).
|
|
334
334
|
No preamble.`;
|
|
@@ -146,14 +146,20 @@ body.dashboard-page {
|
|
|
146
146
|
}
|
|
147
147
|
|
|
148
148
|
.dashboard-score-value { font-size: 1.25rem; line-height: 1; }
|
|
149
|
-
.dashboard-score-of { font-size: 0.85rem; font-weight: 500;
|
|
149
|
+
.dashboard-score-of { font-size: 0.85rem; font-weight: 500; }
|
|
150
150
|
.dashboard-score-label { font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; margin-left: 0.35rem; opacity: 0.95; }
|
|
151
151
|
|
|
152
|
-
|
|
153
|
-
.dashboard-score.tier-
|
|
154
|
-
.dashboard-score.tier-
|
|
155
|
-
.dashboard-score.tier-
|
|
156
|
-
.dashboard-score.tier-
|
|
152
|
+
/* Match hero score panel tier colors (1=worst, 5=best) */
|
|
153
|
+
.dashboard-score.tier-1 { background: rgba(255, 107, 107, 0.2); color: #ff6b6b; font-weight: 700; }
|
|
154
|
+
.dashboard-score.tier-1 .dashboard-score-of { color: rgba(255, 107, 107, 0.9); }
|
|
155
|
+
.dashboard-score.tier-2 { background: rgba(255, 107, 53, 0.2); color: #ff6b35; font-weight: 700; }
|
|
156
|
+
.dashboard-score.tier-2 .dashboard-score-of { color: rgba(255, 107, 53, 0.95); }
|
|
157
|
+
.dashboard-score.tier-3 { background: rgba(255, 179, 71, 0.2); color: #ffd23f; font-weight: 700; }
|
|
158
|
+
.dashboard-score.tier-3 .dashboard-score-of { color: rgba(255, 210, 63, 0.95); }
|
|
159
|
+
.dashboard-score.tier-4 { background: rgba(78, 205, 196, 0.2); color: #4ecdc4; font-weight: 700; }
|
|
160
|
+
.dashboard-score.tier-4 .dashboard-score-of { color: rgba(78, 205, 196, 0.95); }
|
|
161
|
+
.dashboard-score.tier-5 { background: rgba(6, 255, 165, 0.2); color: #06ffa5; font-weight: 700; }
|
|
162
|
+
.dashboard-score.tier-5 .dashboard-score-of { color: rgba(6, 255, 165, 0.95); }
|
|
157
163
|
|
|
158
164
|
.dashboard-date {
|
|
159
165
|
font-size: 12px;
|
|
@@ -506,7 +512,7 @@ body.dashboard-page {
|
|
|
506
512
|
display: flex;
|
|
507
513
|
align-items: baseline;
|
|
508
514
|
justify-content: center;
|
|
509
|
-
gap: 0.4rem; /* space between number and "of
|
|
515
|
+
gap: 0.4rem; /* space between number and "out of 5" */
|
|
510
516
|
margin-bottom: 0.5rem;
|
|
511
517
|
}
|
|
512
518
|
|
|
@@ -550,20 +556,59 @@ body.dashboard-page {
|
|
|
550
556
|
font-weight: 600;
|
|
551
557
|
}
|
|
552
558
|
|
|
553
|
-
/* ——— Hero-style score panel (
|
|
559
|
+
/* ——— Hero-style score panel: colors tied to tier (1=worst, 5=best) ——— */
|
|
554
560
|
.panel-score-pop {
|
|
561
|
+
--score-accent-a: #ff6b35;
|
|
562
|
+
--score-accent-b: #ff3366;
|
|
563
|
+
--score-glow: rgba(255, 107, 53, 0.35);
|
|
555
564
|
border: 2px solid rgba(255, 107, 53, 0.3);
|
|
556
|
-
box-shadow: var(--glow), 0 20px 60px rgba(0, 0, 0, 0.4);
|
|
565
|
+
box-shadow: 0 0 30px var(--score-glow), 0 20px 60px rgba(0, 0, 0, 0.4);
|
|
557
566
|
background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--surface-hover) 100%);
|
|
558
567
|
}
|
|
559
568
|
|
|
569
|
+
.panel-score-pop[data-tier="1"] {
|
|
570
|
+
--score-accent-a: #ff6b6b;
|
|
571
|
+
--score-accent-b: #e53935;
|
|
572
|
+
--score-glow: rgba(229, 57, 53, 0.35);
|
|
573
|
+
border-color: rgba(229, 57, 53, 0.4);
|
|
574
|
+
box-shadow: 0 0 30px var(--score-glow), 0 20px 60px rgba(0, 0, 0, 0.4);
|
|
575
|
+
}
|
|
576
|
+
.panel-score-pop[data-tier="2"] {
|
|
577
|
+
--score-accent-a: #ff6b35;
|
|
578
|
+
--score-accent-b: #ff3366;
|
|
579
|
+
--score-glow: rgba(255, 107, 53, 0.35);
|
|
580
|
+
border-color: rgba(255, 107, 53, 0.4);
|
|
581
|
+
box-shadow: 0 0 30px var(--score-glow), 0 20px 60px rgba(0, 0, 0, 0.4);
|
|
582
|
+
}
|
|
583
|
+
.panel-score-pop[data-tier="3"] {
|
|
584
|
+
--score-accent-a: #ffb347;
|
|
585
|
+
--score-accent-b: #ffd23f;
|
|
586
|
+
--score-glow: rgba(255, 210, 63, 0.3);
|
|
587
|
+
border-color: rgba(255, 210, 63, 0.4);
|
|
588
|
+
box-shadow: 0 0 30px var(--score-glow), 0 20px 60px rgba(0, 0, 0, 0.4);
|
|
589
|
+
}
|
|
590
|
+
.panel-score-pop[data-tier="4"] {
|
|
591
|
+
--score-accent-a: #4ecdc4;
|
|
592
|
+
--score-accent-b: #29b6f6;
|
|
593
|
+
--score-glow: rgba(78, 205, 196, 0.3);
|
|
594
|
+
border-color: rgba(78, 205, 196, 0.4);
|
|
595
|
+
box-shadow: 0 0 30px var(--score-glow), 0 20px 60px rgba(0, 0, 0, 0.4);
|
|
596
|
+
}
|
|
597
|
+
.panel-score-pop[data-tier="5"] {
|
|
598
|
+
--score-accent-a: #06ffa5;
|
|
599
|
+
--score-accent-b: #43a047;
|
|
600
|
+
--score-glow: rgba(6, 255, 165, 0.3);
|
|
601
|
+
border-color: rgba(6, 255, 165, 0.4);
|
|
602
|
+
box-shadow: 0 0 30px var(--score-glow), 0 20px 60px rgba(0, 0, 0, 0.4);
|
|
603
|
+
}
|
|
604
|
+
|
|
560
605
|
.panel-score-pop::before {
|
|
561
606
|
display: none;
|
|
562
607
|
}
|
|
563
608
|
|
|
564
609
|
.panel-score-pop:hover {
|
|
565
610
|
transform: none;
|
|
566
|
-
box-shadow: var(--glow), 0 20px 60px rgba(0, 0, 0, 0.4);
|
|
611
|
+
box-shadow: 0 0 30px var(--score-glow), 0 20px 60px rgba(0, 0, 0, 0.4);
|
|
567
612
|
}
|
|
568
613
|
|
|
569
614
|
.panel-score-pop .panel-body-score {
|
|
@@ -587,22 +632,22 @@ body.dashboard-page {
|
|
|
587
632
|
font-size: 3.25rem;
|
|
588
633
|
font-weight: 800;
|
|
589
634
|
line-height: 1;
|
|
590
|
-
background: linear-gradient(180deg, var(--accent-
|
|
635
|
+
background: linear-gradient(180deg, var(--score-accent-a) 0%, var(--score-accent-b) 100%);
|
|
591
636
|
-webkit-background-clip: text;
|
|
592
637
|
-webkit-text-fill-color: transparent;
|
|
593
638
|
background-clip: text;
|
|
594
|
-
filter: drop-shadow(0 0 20px
|
|
639
|
+
filter: drop-shadow(0 0 20px var(--score-glow));
|
|
595
640
|
}
|
|
596
641
|
|
|
597
642
|
.panel-score-pop .score-of {
|
|
598
643
|
font-size: 1.35rem;
|
|
599
644
|
font-weight: 700;
|
|
600
|
-
color: var(--
|
|
645
|
+
color: var(--score-accent-a);
|
|
601
646
|
}
|
|
602
647
|
|
|
603
648
|
.panel-score-pop .score-label {
|
|
604
649
|
display: inline-block;
|
|
605
|
-
background: linear-gradient(135deg, var(--accent-
|
|
650
|
+
background: linear-gradient(135deg, var(--score-accent-a), var(--score-accent-b));
|
|
606
651
|
padding: 0.45rem 1.1rem;
|
|
607
652
|
border-radius: 50px;
|
|
608
653
|
font-family: "Inter", sans-serif;
|
|
@@ -610,12 +655,16 @@ body.dashboard-page {
|
|
|
610
655
|
font-weight: 700;
|
|
611
656
|
letter-spacing: 0.5px;
|
|
612
657
|
text-transform: uppercase;
|
|
613
|
-
box-shadow: 0 6px 18px
|
|
658
|
+
box-shadow: 0 6px 18px var(--score-glow);
|
|
614
659
|
margin-bottom: 0.35rem;
|
|
615
660
|
-webkit-text-fill-color: initial;
|
|
616
661
|
color: #fff;
|
|
617
662
|
}
|
|
618
663
|
|
|
664
|
+
.panel-score-pop[data-tier="3"] .score-label {
|
|
665
|
+
color: #1a1a1a;
|
|
666
|
+
}
|
|
667
|
+
|
|
619
668
|
.panel-score-pop .score-desc {
|
|
620
669
|
font-size: 0.9rem;
|
|
621
670
|
color: var(--text-muted);
|
|
@@ -652,18 +701,6 @@ body.dashboard-page {
|
|
|
652
701
|
flex-wrap: wrap;
|
|
653
702
|
}
|
|
654
703
|
|
|
655
|
-
.panel-score-pop[data-tier="1"] .score-num { --accent-orange: #ff6b6b; --accent-red: #e53935; }
|
|
656
|
-
.panel-score-pop[data-tier="2"] .score-num { --accent-orange: #ff6b35; --accent-red: #ff3366; }
|
|
657
|
-
.panel-score-pop[data-tier="3"] .score-num { --accent-orange: #ffb347; --accent-red: #ffd23f; }
|
|
658
|
-
.panel-score-pop[data-tier="4"] .score-num { --accent-orange: #4ecdc4; --accent-red: #29b6f6; }
|
|
659
|
-
.panel-score-pop[data-tier="5"] .score-num { --accent-orange: #06ffa5; --accent-red: #43a047; }
|
|
660
|
-
|
|
661
|
-
.panel-score-pop[data-tier="1"] .score-label { background: linear-gradient(135deg, #ff6b6b, #e53935); }
|
|
662
|
-
.panel-score-pop[data-tier="2"] .score-label { background: linear-gradient(135deg, var(--accent-orange), var(--accent-red)); }
|
|
663
|
-
.panel-score-pop[data-tier="3"] .score-label { background: linear-gradient(135deg, #ffb347, #ffd23f); color: #1a1a1a; }
|
|
664
|
-
.panel-score-pop[data-tier="4"] .score-label { background: linear-gradient(135deg, #4ecdc4, #29b6f6); }
|
|
665
|
-
.panel-score-pop[data-tier="5"] .score-label { background: linear-gradient(135deg, #06ffa5, #43a047); }
|
|
666
|
-
|
|
667
704
|
/* ——— Description of problems panel (top-right) ——— */
|
|
668
705
|
.panel-empty {
|
|
669
706
|
margin: 0;
|
|
@@ -1091,12 +1128,12 @@ body.dashboard-page {
|
|
|
1091
1128
|
.dashboard-main ::-webkit-scrollbar-thumb,
|
|
1092
1129
|
.panel-body::-webkit-scrollbar-thumb,
|
|
1093
1130
|
.overlay-prompt-wrap::-webkit-scrollbar-thumb {
|
|
1094
|
-
background: var(--
|
|
1131
|
+
background: var(--border);
|
|
1095
1132
|
border-radius: 4px;
|
|
1096
1133
|
}
|
|
1097
1134
|
|
|
1098
1135
|
.dashboard-main ::-webkit-scrollbar-thumb:hover,
|
|
1099
1136
|
.panel-body::-webkit-scrollbar-thumb:hover,
|
|
1100
1137
|
.overlay-prompt-wrap::-webkit-scrollbar-thumb:hover {
|
|
1101
|
-
background: var(--
|
|
1138
|
+
background: var(--text-muted);
|
|
1102
1139
|
}
|
package/dist/reports/html.js
CHANGED
|
@@ -78,11 +78,11 @@ function buildHtml(run, title, darkMode, css, script) {
|
|
|
78
78
|
<meta charset="UTF-8" />
|
|
79
79
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
80
80
|
<title>${escapeHtml(title)}</title>
|
|
81
|
-
<meta property="og:title" content="${escapeHtml(title)} — ${
|
|
81
|
+
<meta property="og:title" content="${escapeHtml(title)} — ${cleanliness.tier} out of 5 ${escapeHtml(cleanliness.label)}" />
|
|
82
82
|
<meta property="og:description" content="${escapeHtml(cleanliness.description)}" />
|
|
83
83
|
<meta property="og:type" content="website" />
|
|
84
84
|
<meta name="twitter:card" content="summary" />
|
|
85
|
-
<meta name="twitter:title" content="${escapeHtml(title)} — ${
|
|
85
|
+
<meta name="twitter:title" content="${escapeHtml(title)} — ${cleanliness.tier} out of 5" />
|
|
86
86
|
<meta name="twitter:description" content="${escapeHtml(cleanliness.label)}: ${escapeHtml(cleanliness.description)}" />
|
|
87
87
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet" />
|
|
88
88
|
<style>${css}</style>
|
|
@@ -95,9 +95,9 @@ function buildHtml(run, title, darkMode, css, script) {
|
|
|
95
95
|
<span class="dashboard-meta">${escapeHtml(run.repoPath)}</span>
|
|
96
96
|
</div>
|
|
97
97
|
<div class="dashboard-header-right">
|
|
98
|
-
<div class="dashboard-score tier-${cleanliness.tier}" aria-label="Score ${
|
|
99
|
-
<span class="dashboard-score-value">${
|
|
100
|
-
<span class="dashboard-score-of"
|
|
98
|
+
<div class="dashboard-score tier-${cleanliness.tier}" aria-label="Score ${cleanliness.tier} out of 5">
|
|
99
|
+
<span class="dashboard-score-value">${cleanliness.tier}</span>
|
|
100
|
+
<span class="dashboard-score-of"> out of 5</span>
|
|
101
101
|
<span class="dashboard-score-label">${escapeHtml(cleanliness.label)}</span>
|
|
102
102
|
</div>
|
|
103
103
|
<button type="button" class="btn-ai-prompts btn-ai-prompts-header" id="btnAiPrompts">AI cleanup prompts</button>
|
|
@@ -114,8 +114,8 @@ function buildHtml(run, title, darkMode, css, script) {
|
|
|
114
114
|
</div>
|
|
115
115
|
<div class="panel-body panel-body-score">
|
|
116
116
|
<div class="score-numeric">
|
|
117
|
-
<span class="score-num">${
|
|
118
|
-
<span class="score-of">of
|
|
117
|
+
<span class="score-num">${cleanliness.tier}</span>
|
|
118
|
+
<span class="score-of"> out of 5</span>
|
|
119
119
|
</div>
|
|
120
120
|
<p class="score-label">${escapeHtml(cleanliness.label)}</p>
|
|
121
121
|
<p class="score-desc">${escapeHtml(cleanliness.description)}</p>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tech-debt-visualizer",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.21",
|
|
4
4
|
"description": "Language-agnostic CLI that analyzes repos and generates interactive technical debt visualizations with AI-powered insights",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|