@vibgrate/cli 1.0.2 → 1.0.3
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.
|
@@ -301,24 +301,6 @@ function formatText(artifact) {
|
|
|
301
301
|
lines.push(chalk.bold.cyan("\u2551 Vibgrate Drift Report \u2551"));
|
|
302
302
|
lines.push(chalk.bold.cyan("\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D"));
|
|
303
303
|
lines.push("");
|
|
304
|
-
const scoreColor = artifact.drift.score >= 70 ? chalk.green : artifact.drift.score >= 40 ? chalk.yellow : chalk.red;
|
|
305
|
-
lines.push(chalk.bold(" Drift Score: ") + scoreColor.bold(`${artifact.drift.score}/100`));
|
|
306
|
-
lines.push(chalk.bold(" Risk Level: ") + riskBadge(artifact.drift.riskLevel));
|
|
307
|
-
lines.push(chalk.bold(" Projects: ") + `${artifact.projects.length}`);
|
|
308
|
-
if (artifact.vcs) {
|
|
309
|
-
const vcsParts = [artifact.vcs.type];
|
|
310
|
-
if (artifact.vcs.branch) vcsParts.push(artifact.vcs.branch);
|
|
311
|
-
if (artifact.vcs.shortSha) vcsParts.push(chalk.dim(artifact.vcs.shortSha));
|
|
312
|
-
lines.push(chalk.bold(" VCS: ") + vcsParts.join(" "));
|
|
313
|
-
}
|
|
314
|
-
lines.push("");
|
|
315
|
-
const m = new Set(artifact.drift.measured ?? ["runtime", "framework", "dependency", "eol"]);
|
|
316
|
-
lines.push(chalk.bold.underline(" Score Breakdown"));
|
|
317
|
-
lines.push(` Runtime: ${m.has("runtime") ? scoreBar(artifact.drift.components.runtimeScore) : chalk.dim("n/a")}`);
|
|
318
|
-
lines.push(` Frameworks: ${m.has("framework") ? scoreBar(artifact.drift.components.frameworkScore) : chalk.dim("n/a")}`);
|
|
319
|
-
lines.push(` Dependencies: ${m.has("dependency") ? scoreBar(artifact.drift.components.dependencyScore) : chalk.dim("n/a")}`);
|
|
320
|
-
lines.push(` EOL Risk: ${m.has("eol") ? scoreBar(artifact.drift.components.eolScore) : chalk.dim("n/a")}`);
|
|
321
|
-
lines.push("");
|
|
322
304
|
for (const project of artifact.projects) {
|
|
323
305
|
lines.push(chalk.bold(` \u2500\u2500 ${project.name} `) + chalk.dim(`(${project.type}) ${project.path}`));
|
|
324
306
|
if (project.runtime) {
|
|
@@ -383,6 +365,28 @@ function formatText(artifact) {
|
|
|
383
365
|
lines.push("");
|
|
384
366
|
}
|
|
385
367
|
}
|
|
368
|
+
const scoreColor = artifact.drift.score >= 70 ? chalk.green : artifact.drift.score >= 40 ? chalk.yellow : chalk.red;
|
|
369
|
+
lines.push(chalk.bold.cyan("\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557"));
|
|
370
|
+
lines.push(chalk.bold.cyan("\u2551 Drift Score Summary \u2551"));
|
|
371
|
+
lines.push(chalk.bold.cyan("\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D"));
|
|
372
|
+
lines.push("");
|
|
373
|
+
lines.push(chalk.bold(" Drift Score: ") + scoreColor.bold(`${artifact.drift.score}/100`));
|
|
374
|
+
lines.push(chalk.bold(" Risk Level: ") + riskBadge(artifact.drift.riskLevel));
|
|
375
|
+
lines.push(chalk.bold(" Projects: ") + `${artifact.projects.length}`);
|
|
376
|
+
if (artifact.vcs) {
|
|
377
|
+
const vcsParts = [artifact.vcs.type];
|
|
378
|
+
if (artifact.vcs.branch) vcsParts.push(artifact.vcs.branch);
|
|
379
|
+
if (artifact.vcs.shortSha) vcsParts.push(chalk.dim(artifact.vcs.shortSha));
|
|
380
|
+
lines.push(chalk.bold(" VCS: ") + vcsParts.join(" "));
|
|
381
|
+
}
|
|
382
|
+
lines.push("");
|
|
383
|
+
const m = new Set(artifact.drift.measured ?? ["runtime", "framework", "dependency", "eol"]);
|
|
384
|
+
lines.push(chalk.bold.underline(" Score Breakdown"));
|
|
385
|
+
lines.push(` Runtime: ${m.has("runtime") ? scoreBar(artifact.drift.components.runtimeScore) : chalk.dim("n/a")}`);
|
|
386
|
+
lines.push(` Frameworks: ${m.has("framework") ? scoreBar(artifact.drift.components.frameworkScore) : chalk.dim("n/a")}`);
|
|
387
|
+
lines.push(` Dependencies: ${m.has("dependency") ? scoreBar(artifact.drift.components.dependencyScore) : chalk.dim("n/a")}`);
|
|
388
|
+
lines.push(` EOL Risk: ${m.has("eol") ? scoreBar(artifact.drift.components.eolScore) : chalk.dim("n/a")}`);
|
|
389
|
+
lines.push("");
|
|
386
390
|
const scannedParts = [`Scanned at ${artifact.timestamp}`];
|
|
387
391
|
if (artifact.durationMs !== void 0) {
|
|
388
392
|
const secs = (artifact.durationMs / 1e3).toFixed(1);
|
package/dist/cli.js
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-VXZT34Y5.js";
|
|
5
5
|
import {
|
|
6
6
|
baselineCommand
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-LFLJ2AXJ.js";
|
|
8
8
|
import {
|
|
9
9
|
VERSION,
|
|
10
10
|
dsnCommand,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
readJsonFile,
|
|
16
16
|
scanCommand,
|
|
17
17
|
writeDefaultConfig
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-5YYLI4QL.js";
|
|
19
19
|
|
|
20
20
|
// src/cli.ts
|
|
21
21
|
import { Command as Command4 } from "commander";
|
|
@@ -38,7 +38,7 @@ var initCommand = new Command("init").description("Initialize vibgrate in a proj
|
|
|
38
38
|
console.log(chalk.green("\u2714") + ` Created ${chalk.bold("vibgrate.config.ts")}`);
|
|
39
39
|
}
|
|
40
40
|
if (opts.baseline) {
|
|
41
|
-
const { runBaseline } = await import("./baseline-
|
|
41
|
+
const { runBaseline } = await import("./baseline-F7SZ4GYH.js");
|
|
42
42
|
await runBaseline(rootDir);
|
|
43
43
|
}
|
|
44
44
|
console.log("");
|
package/dist/index.js
CHANGED