@anirudw/repolens 0.2.3 → 0.2.4
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/index.js +7 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1012,23 +1012,22 @@ function createCommand() {
|
|
|
1012
1012
|
graph.calculateHealthMetrics();
|
|
1013
1013
|
if (options.health) {
|
|
1014
1014
|
const nodes = Array.from(graph.getNodes().values());
|
|
1015
|
-
console.log("Total nodes:", nodes.length);
|
|
1016
1015
|
const topCoreDeps = nodes.sort((a, b) => b.ca - a.ca).slice(0, 5).filter((n) => n.ca > 0);
|
|
1017
1016
|
const topUnstable = nodes.sort((a, b) => b.instability - a.instability).slice(0, 5).filter((n) => n.instability > 0);
|
|
1018
|
-
console.log("\n=== Architectural Health Metrics ===\n");
|
|
1019
|
-
console.log("Core deps count:", topCoreDeps.length);
|
|
1020
|
-
console.log("Unstable count:", topUnstable.length);
|
|
1017
|
+
console.log(pc.bold("\n=== Architectural Health Metrics ===\n"));
|
|
1021
1018
|
if (topCoreDeps.length > 0) {
|
|
1022
|
-
console.log("
|
|
1019
|
+
console.log(pc.bold("Top 5 Core Dependencies (Highest Ca - will break most things if changed):"));
|
|
1023
1020
|
for (const node of topCoreDeps) {
|
|
1024
|
-
console.log(` ${node.relativePath}: ${node.ca} dependents`);
|
|
1021
|
+
console.log(` ${pc.red(node.relativePath)}: ${pc.bold(node.ca.toString())} dependents`);
|
|
1025
1022
|
}
|
|
1023
|
+
console.log();
|
|
1026
1024
|
}
|
|
1027
1025
|
if (topUnstable.length > 0) {
|
|
1028
|
-
console.log("
|
|
1026
|
+
console.log(pc.bold("Top 5 Most Unstable Files (Highest I = Ce/(Ca+Ce)):"));
|
|
1029
1027
|
for (const node of topUnstable) {
|
|
1030
|
-
console.log(` ${node.relativePath}: ${node.instability.toFixed(3)} instability`);
|
|
1028
|
+
console.log(` ${pc.yellow(node.relativePath)}: ${pc.bold(node.instability.toFixed(3))} instability`);
|
|
1031
1029
|
}
|
|
1030
|
+
console.log();
|
|
1032
1031
|
}
|
|
1033
1032
|
process.exit(0);
|
|
1034
1033
|
}
|