@anirudw/repolens 0.2.2 → 0.2.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.
- package/dist/index.js +8 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1012,22 +1012,23 @@ 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);
|
|
1015
1016
|
const topCoreDeps = nodes.sort((a, b) => b.ca - a.ca).slice(0, 5).filter((n) => n.ca > 0);
|
|
1016
1017
|
const topUnstable = nodes.sort((a, b) => b.instability - a.instability).slice(0, 5).filter((n) => n.instability > 0);
|
|
1017
|
-
console.log(
|
|
1018
|
+
console.log("\n=== Architectural Health Metrics ===\n");
|
|
1019
|
+
console.log("Core deps count:", topCoreDeps.length);
|
|
1020
|
+
console.log("Unstable count:", topUnstable.length);
|
|
1018
1021
|
if (topCoreDeps.length > 0) {
|
|
1019
|
-
console.log(
|
|
1022
|
+
console.log("\nTop 5 Core Dependencies:");
|
|
1020
1023
|
for (const node of topCoreDeps) {
|
|
1021
|
-
console.log(` ${
|
|
1024
|
+
console.log(` ${node.relativePath}: ${node.ca} dependents`);
|
|
1022
1025
|
}
|
|
1023
|
-
console.log();
|
|
1024
1026
|
}
|
|
1025
1027
|
if (topUnstable.length > 0) {
|
|
1026
|
-
console.log(
|
|
1028
|
+
console.log("\nTop 5 Unstable Files:");
|
|
1027
1029
|
for (const node of topUnstable) {
|
|
1028
|
-
console.log(` ${
|
|
1030
|
+
console.log(` ${node.relativePath}: ${node.instability.toFixed(3)} instability`);
|
|
1029
1031
|
}
|
|
1030
|
-
console.log();
|
|
1031
1032
|
}
|
|
1032
1033
|
process.exit(0);
|
|
1033
1034
|
}
|