tech-debt-visualizer 0.2.19 → 0.2.20

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 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} (${Math.round(cleanlinessScore)}/100, tier ${cleanliness.tier}/5)\n`));
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(` Cleanliness: ${cleanlinessColor(cleanlinessScore)} / 100 (tier ${cleanliness.tier}/5)\n`);
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:
@@ -506,7 +506,7 @@ body.dashboard-page {
506
506
  display: flex;
507
507
  align-items: baseline;
508
508
  justify-content: center;
509
- gap: 0.4rem; /* space between number and "of 100" */
509
+ gap: 0.4rem; /* space between number and "out of 5" */
510
510
  margin-bottom: 0.5rem;
511
511
  }
512
512
 
@@ -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)} — ${scoreNum}/100 ${escapeHtml(cleanliness.label)}" />
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)} — ${scoreNum}/100" />
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 ${scoreNum} of 100">
99
- <span class="dashboard-score-value">${scoreNum}</span>
100
- <span class="dashboard-score-of">/ 100</span>
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">${scoreNum}</span>
118
- <span class="score-of">of 100</span>
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.19",
3
+ "version": "0.2.20",
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",