git-archaeologist 1.0.0
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/README.md +84 -0
- package/demo.gif +0 -0
- package/dist/analyzers/busFactorAnalyzer.d.ts +6 -0
- package/dist/analyzers/busFactorAnalyzer.d.ts.map +1 -0
- package/dist/analyzers/busFactorAnalyzer.js +82 -0
- package/dist/analyzers/busFactorAnalyzer.js.map +1 -0
- package/dist/analyzers/curseScorer.d.ts +3 -0
- package/dist/analyzers/curseScorer.d.ts.map +1 -0
- package/dist/analyzers/curseScorer.js +53 -0
- package/dist/analyzers/curseScorer.js.map +1 -0
- package/dist/analyzers/ownershipAnalyzer.d.ts +7 -0
- package/dist/analyzers/ownershipAnalyzer.d.ts.map +1 -0
- package/dist/analyzers/ownershipAnalyzer.js +38 -0
- package/dist/analyzers/ownershipAnalyzer.js.map +1 -0
- package/dist/core/gitParser.d.ts +7 -0
- package/dist/core/gitParser.d.ts.map +1 -0
- package/dist/core/gitParser.js +145 -0
- package/dist/core/gitParser.js.map +1 -0
- package/dist/core/orchestrator.d.ts +3 -0
- package/dist/core/orchestrator.d.ts.map +1 -0
- package/dist/core/orchestrator.js +66 -0
- package/dist/core/orchestrator.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +127 -0
- package/dist/index.js.map +1 -0
- package/dist/output/formatter.d.ts +9 -0
- package/dist/output/formatter.d.ts.map +1 -0
- package/dist/output/formatter.js +76 -0
- package/dist/output/formatter.js.map +1 -0
- package/dist/output/htmlReport.d.ts +3 -0
- package/dist/output/htmlReport.d.ts.map +1 -0
- package/dist/output/htmlReport.js +194 -0
- package/dist/output/htmlReport.js.map +1 -0
- package/dist/output/terminalRenderer.d.ts +3 -0
- package/dist/output/terminalRenderer.d.ts.map +1 -0
- package/dist/output/terminalRenderer.js +158 -0
- package/dist/output/terminalRenderer.js.map +1 -0
- package/dist/types.d.ts +67 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +3 -0
- package/dist/types.js.map +1 -0
- package/git-arch-report-express.html +513 -0
- package/package.json +46 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
|
+
};
|
|
39
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
+
const commander_1 = require("commander");
|
|
41
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
42
|
+
const path = __importStar(require("path"));
|
|
43
|
+
const orchestrator_1 = require("./core/orchestrator");
|
|
44
|
+
const terminalRenderer_1 = require("./output/terminalRenderer");
|
|
45
|
+
const htmlReport_1 = require("./output/htmlReport");
|
|
46
|
+
const program = new commander_1.Command();
|
|
47
|
+
program
|
|
48
|
+
.name('git-arch')
|
|
49
|
+
.description(chalk_1.default.hex('#A78BFA')('⛏ Git Archaeologist') +
|
|
50
|
+
' — uncover history, ownership & tech debt in any git repo')
|
|
51
|
+
.version('1.0.0');
|
|
52
|
+
program
|
|
53
|
+
.command('analyze [repoPath]')
|
|
54
|
+
.alias('a')
|
|
55
|
+
.description('Analyze a git repository and print the full report')
|
|
56
|
+
.option('-j, --json', 'Output raw JSON instead of the terminal report')
|
|
57
|
+
.option('-H, --html [outputFile]', 'Generate an HTML report file')
|
|
58
|
+
.action(async (repoPath, options) => {
|
|
59
|
+
const resolvedPath = path.resolve(repoPath ?? '.');
|
|
60
|
+
try {
|
|
61
|
+
const result = await (0, orchestrator_1.analyze)(resolvedPath);
|
|
62
|
+
if (options.json) {
|
|
63
|
+
const serializable = {
|
|
64
|
+
...result,
|
|
65
|
+
fileStats: Object.fromEntries(Array.from(result.fileStats.entries()).map(([k, v]) => [
|
|
66
|
+
k,
|
|
67
|
+
{
|
|
68
|
+
...v,
|
|
69
|
+
uniqueAuthors: Array.from(v.uniqueAuthors),
|
|
70
|
+
authorChanges: Object.fromEntries(v.authorChanges),
|
|
71
|
+
},
|
|
72
|
+
])),
|
|
73
|
+
};
|
|
74
|
+
console.log(JSON.stringify(serializable, null, 2));
|
|
75
|
+
}
|
|
76
|
+
else if (options.html !== undefined) {
|
|
77
|
+
const defaultName = `git-arch-report-${result.repoName}.html`;
|
|
78
|
+
const outFile = typeof options.html === 'string' ? options.html : defaultName;
|
|
79
|
+
const outPath = path.resolve(outFile);
|
|
80
|
+
(0, htmlReport_1.generateHtmlReport)(result, outPath);
|
|
81
|
+
(0, terminalRenderer_1.renderReport)(result);
|
|
82
|
+
console.log(chalk_1.default.hex('#A78BFA')(`\n 📄 HTML report saved → ${outPath}\n`));
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
(0, terminalRenderer_1.renderReport)(result);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
catch (err) {
|
|
89
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
90
|
+
console.error(chalk_1.default.red('\n ✖ Error: ') + message);
|
|
91
|
+
process.exit(1);
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
program
|
|
95
|
+
.command('cursed [repoPath]')
|
|
96
|
+
.alias('c')
|
|
97
|
+
.description('Show only the cursed files ranking')
|
|
98
|
+
.option('-n, --top <number>', 'How many files to show', '10')
|
|
99
|
+
.action(async (repoPath, options) => {
|
|
100
|
+
const resolvedPath = path.resolve(repoPath ?? '.');
|
|
101
|
+
try {
|
|
102
|
+
const result = await (0, orchestrator_1.analyze)(resolvedPath);
|
|
103
|
+
const topN = parseInt(options.top, 10);
|
|
104
|
+
result.cursedFiles = result.cursedFiles.slice(0, topN);
|
|
105
|
+
(0, terminalRenderer_1.renderReport)({ ...result, busFactor: [], ownership: [], coupling: [] });
|
|
106
|
+
}
|
|
107
|
+
catch (err) {
|
|
108
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
109
|
+
console.error(chalk_1.default.red('\n ✖ Error: ') + message);
|
|
110
|
+
process.exit(1);
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
program
|
|
114
|
+
.action(async () => {
|
|
115
|
+
const resolvedPath = path.resolve('.');
|
|
116
|
+
try {
|
|
117
|
+
const result = await (0, orchestrator_1.analyze)(resolvedPath);
|
|
118
|
+
(0, terminalRenderer_1.renderReport)(result);
|
|
119
|
+
}
|
|
120
|
+
catch (err) {
|
|
121
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
122
|
+
console.error(chalk_1.default.red('\n ✖ Error: ') + message);
|
|
123
|
+
process.exit(1);
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
program.parse(process.argv);
|
|
127
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,yCAAoC;AACpC,kDAA0B;AAC1B,2CAA6B;AAE7B,sDAA8C;AAC9C,gEAAyD;AACzD,oDAAyD;AAEzD,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,UAAU,CAAC;KAChB,WAAW,CACV,eAAK,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,sBAAsB,CAAC;IAC5C,2DAA2D,CAC5D;KACA,OAAO,CAAC,OAAO,CAAC,CAAC;AAEpB,OAAO;KACJ,OAAO,CAAC,oBAAoB,CAAC;KAC7B,KAAK,CAAC,GAAG,CAAC;KACV,WAAW,CAAC,oDAAoD,CAAC;KACjE,MAAM,CAAC,YAAY,EAAE,gDAAgD,CAAC;KACtE,MAAM,CAAC,yBAAyB,EAAE,8BAA8B,CAAC;KACjE,MAAM,CAAC,KAAK,EAAE,QAA4B,EAAE,OAAoD,EAAE,EAAE;IACnG,MAAM,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,IAAI,GAAG,CAAC,CAAC;IACnD,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,IAAA,sBAAO,EAAC,YAAY,CAAC,CAAC;QAE3C,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;YACjB,MAAM,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C,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC,CAAC;AAEL,OAAO;KACJ,MAAM,CAAC,KAAK,IAAI,EAAE;IACjB,MAAM,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACvC,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,IAAA,sBAAO,EAAC,YAAY,CAAC,CAAC;QAC3C,IAAA,+BAAY,EAAC,MAAM,CAAC,CAAC;IACvB,CAAC;IAAC,OAAO,GAAY,EAAE,CAAC;QACtB,MAAM,OAAO,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QACjE,OAAO,CAAC,KAAK,CAAC,eAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,GAAG,OAAO,CAAC,CAAC;QACrD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC,CAAC;AAEL,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare function formatPath(filepath: string, maxLen?: number): string;
|
|
2
|
+
export declare function formatDate(timestamp: number): string;
|
|
3
|
+
export declare function formatScore(score: number): string;
|
|
4
|
+
export declare function formatBusFactor(n: number): string;
|
|
5
|
+
export declare function formatOwnershipPercent(pct: number): string;
|
|
6
|
+
export declare function formatCouplingScore(score: number): string;
|
|
7
|
+
export declare function sectionHeader(title: string): string;
|
|
8
|
+
export declare function summaryBox(lines: string[]): string;
|
|
9
|
+
//# sourceMappingURL=formatter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatter.d.ts","sourceRoot":"","sources":["../../src/output/formatter.ts"],"names":[],"mappings":"AAEA,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,GAAE,MAAW,GAAG,MAAM,CAUxE;AAED,wBAAgB,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAEpD;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAKjD;AAED,wBAAgB,eAAe,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAIjD;AAED,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAI1D;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAIzD;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAGnD;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAUlD"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.formatPath = formatPath;
|
|
7
|
+
exports.formatDate = formatDate;
|
|
8
|
+
exports.formatScore = formatScore;
|
|
9
|
+
exports.formatBusFactor = formatBusFactor;
|
|
10
|
+
exports.formatOwnershipPercent = formatOwnershipPercent;
|
|
11
|
+
exports.formatCouplingScore = formatCouplingScore;
|
|
12
|
+
exports.sectionHeader = sectionHeader;
|
|
13
|
+
exports.summaryBox = summaryBox;
|
|
14
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
15
|
+
function formatPath(filepath, maxLen = 55) {
|
|
16
|
+
if (filepath.length <= maxLen)
|
|
17
|
+
return filepath;
|
|
18
|
+
const parts = filepath.split('/');
|
|
19
|
+
if (parts.length <= 2)
|
|
20
|
+
return '...' + filepath.slice(-(maxLen - 3));
|
|
21
|
+
// Keep filename and one parent always visible
|
|
22
|
+
const filename = parts[parts.length - 1];
|
|
23
|
+
const parent = parts[parts.length - 2];
|
|
24
|
+
const prefix = '.../';
|
|
25
|
+
const short = `${prefix}${parent}/${filename}`;
|
|
26
|
+
return short.length <= maxLen ? short : '...' + filename.slice(-(maxLen - 3));
|
|
27
|
+
}
|
|
28
|
+
function formatDate(timestamp) {
|
|
29
|
+
return new Date(timestamp * 1000).toISOString().split('T')[0];
|
|
30
|
+
}
|
|
31
|
+
function formatScore(score) {
|
|
32
|
+
if (score >= 800)
|
|
33
|
+
return chalk_1.default.red.bold(score.toFixed(1));
|
|
34
|
+
if (score >= 400)
|
|
35
|
+
return chalk_1.default.yellow.bold(score.toFixed(1));
|
|
36
|
+
if (score >= 100)
|
|
37
|
+
return chalk_1.default.cyan(score.toFixed(1));
|
|
38
|
+
return chalk_1.default.green(score.toFixed(1));
|
|
39
|
+
}
|
|
40
|
+
function formatBusFactor(n) {
|
|
41
|
+
if (n === 1)
|
|
42
|
+
return chalk_1.default.red.bold('1 ⚠');
|
|
43
|
+
if (n === 2)
|
|
44
|
+
return chalk_1.default.yellow.bold('2 ⚡');
|
|
45
|
+
return chalk_1.default.green.bold(String(n));
|
|
46
|
+
}
|
|
47
|
+
function formatOwnershipPercent(pct) {
|
|
48
|
+
if (pct >= 90)
|
|
49
|
+
return chalk_1.default.magenta.bold(`${pct}%`);
|
|
50
|
+
if (pct >= 70)
|
|
51
|
+
return chalk_1.default.cyan(`${pct}%`);
|
|
52
|
+
return chalk_1.default.white(`${pct}%`);
|
|
53
|
+
}
|
|
54
|
+
function formatCouplingScore(score) {
|
|
55
|
+
if (score >= 80)
|
|
56
|
+
return chalk_1.default.red.bold(`${score}%`);
|
|
57
|
+
if (score >= 50)
|
|
58
|
+
return chalk_1.default.yellow.bold(`${score}%`);
|
|
59
|
+
return chalk_1.default.cyan(`${score}%`);
|
|
60
|
+
}
|
|
61
|
+
function sectionHeader(title) {
|
|
62
|
+
const line = '─'.repeat(70);
|
|
63
|
+
return `\n${chalk_1.default.bold.hex('#A78BFA')(line)}\n ${chalk_1.default.bold.white(title)}\n${chalk_1.default.bold.hex('#A78BFA')(line)}`;
|
|
64
|
+
}
|
|
65
|
+
function summaryBox(lines) {
|
|
66
|
+
const width = 70;
|
|
67
|
+
const top = chalk_1.default.hex('#A78BFA')('╭' + '─'.repeat(width - 2) + '╮');
|
|
68
|
+
const bottom = chalk_1.default.hex('#A78BFA')('╰' + '─'.repeat(width - 2) + '╯');
|
|
69
|
+
const mid = lines.map((l) => {
|
|
70
|
+
const visible = l.replace(/\x1B\[[0-9;]*m/g, '');
|
|
71
|
+
const pad = width - 2 - visible.length;
|
|
72
|
+
return chalk_1.default.hex('#A78BFA')('│') + ' ' + l + ' '.repeat(Math.max(0, pad - 1)) + chalk_1.default.hex('#A78BFA')('│');
|
|
73
|
+
});
|
|
74
|
+
return [top, ...mid, bottom].join('\n');
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=formatter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatter.js","sourceRoot":"","sources":["../../src/output/formatter.ts"],"names":[],"mappings":";;;;;AAEA,gCAUC;AAED,gCAEC;AAED,kCAKC;AAED,0CAIC;AAED,wDAIC;AAED,kDAIC;AAED,sCAGC;AAED,gCAUC;AA1DD,kDAA0B;AAE1B,SAAgB,UAAU,CAAC,QAAgB,EAAE,SAAiB,EAAE;IAC9D,IAAI,QAAQ,CAAC,MAAM,IAAI,MAAM;QAAE,OAAO,QAAQ,CAAC;IAC/C,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAClC,IAAI,KAAK,CAAC,MAAM,IAAI,CAAC;QAAE,OAAO,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;IACpE,8CAA8C;IAC9C,MAAM,QAAQ,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACzC,MAAM,MAAM,GAAG,KAA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MAAM,CAAC,KAAK,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC;IACvE,MAAM,MAAM,GAAG,eAAK,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC;IACvE,MAAM,GAAG,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;QAC1B,MAAM,OAAO,GAAG,CAAC,CAAC,OAAO,CAAC,iBAAiB,EAAE,EAAE,CAAC,CAAC;QACjD,MAAM,GAAG,GAAG,KAAK,GAAG,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC;QACvC,OAAO,eAAK,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,eAAK,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC;IAC5G,CAAC,CAAC,CAAC;IACH,OAAO,CAAC,GAAG,EAAE,GAAG,GAAG,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"htmlReport.d.ts","sourceRoot":"","sources":["../../src/output/htmlReport.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AA6B1C,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI,CAmInF"}
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.generateHtmlReport = generateHtmlReport;
|
|
37
|
+
const fs = __importStar(require("fs"));
|
|
38
|
+
function escapeHtml(str) {
|
|
39
|
+
return str
|
|
40
|
+
.replace(/&/g, '&')
|
|
41
|
+
.replace(/</g, '<')
|
|
42
|
+
.replace(/>/g, '>')
|
|
43
|
+
.replace(/"/g, '"');
|
|
44
|
+
}
|
|
45
|
+
function scoreColor(score) {
|
|
46
|
+
if (score >= 800)
|
|
47
|
+
return '#f87171';
|
|
48
|
+
if (score >= 400)
|
|
49
|
+
return '#fbbf24';
|
|
50
|
+
if (score >= 100)
|
|
51
|
+
return '#34d399';
|
|
52
|
+
return '#6ee7b7';
|
|
53
|
+
}
|
|
54
|
+
function busColor(n) {
|
|
55
|
+
if (n === 1)
|
|
56
|
+
return '#f87171';
|
|
57
|
+
if (n === 2)
|
|
58
|
+
return '#fbbf24';
|
|
59
|
+
return '#34d399';
|
|
60
|
+
}
|
|
61
|
+
function pctColor(p) {
|
|
62
|
+
if (p >= 90)
|
|
63
|
+
return '#c084fc';
|
|
64
|
+
if (p >= 70)
|
|
65
|
+
return '#60a5fa';
|
|
66
|
+
return '#94a3b8';
|
|
67
|
+
}
|
|
68
|
+
function generateHtmlReport(result, outputPath) {
|
|
69
|
+
const from = result.dateRange.from.toISOString().split('T')[0];
|
|
70
|
+
const to = result.dateRange.to.toISOString().split('T')[0];
|
|
71
|
+
const cursedRows = result.cursedFiles.slice(0, 20).map((f, i) => `
|
|
72
|
+
<tr>
|
|
73
|
+
<td class="rank">${i + 1}</td>
|
|
74
|
+
<td class="filepath" title="${escapeHtml(f.filepath)}">${escapeHtml(f.filepath)}</td>
|
|
75
|
+
<td><span class="badge" style="background:${scoreColor(f.curseScore)}">${f.curseScore.toFixed(1)}</span></td>
|
|
76
|
+
<td>${f.totalChanges}</td>
|
|
77
|
+
<td>${f.uniqueAuthors}</td>
|
|
78
|
+
<td class="muted">${escapeHtml(f.reasons.join(', '))}</td>
|
|
79
|
+
</tr>`).join('');
|
|
80
|
+
const busRows = result.busFactor.map((b) => `
|
|
81
|
+
<tr>
|
|
82
|
+
<td>${escapeHtml(b.scope)}</td>
|
|
83
|
+
<td><span class="badge" style="background:${busColor(b.busFactor)}">${b.busFactor}</span></td>
|
|
84
|
+
<td>${b.filesAtRisk}</td>
|
|
85
|
+
<td>${escapeHtml(b.atRiskAuthors.slice(0, 3).join(', '))}</td>
|
|
86
|
+
<td class="muted">${escapeHtml(b.warning.replace(/[⚠️⚡✓]/gu, ''))}</td>
|
|
87
|
+
</tr>`).join('');
|
|
88
|
+
const ownerRows = result.ownership
|
|
89
|
+
.filter((o) => o.ownershipPercent >= 60)
|
|
90
|
+
.slice(0, 20)
|
|
91
|
+
.map((o) => `
|
|
92
|
+
<tr>
|
|
93
|
+
<td class="filepath" title="${escapeHtml(o.filepath)}">${escapeHtml(o.filepath)}</td>
|
|
94
|
+
<td>${escapeHtml(o.owner)}</td>
|
|
95
|
+
<td><span class="badge" style="background:${pctColor(o.ownershipPercent)}">${o.ownershipPercent}%</span></td>
|
|
96
|
+
<td class="muted">${o.contributors.slice(1, 3).map(c => escapeHtml(`${c.name} (${c.percent}%)`)).join(', ') || '—'}</td>
|
|
97
|
+
</tr>`).join('');
|
|
98
|
+
const couplingRows = result.coupling.slice(0, 15).map((c) => `
|
|
99
|
+
<tr>
|
|
100
|
+
<td class="filepath" title="${escapeHtml(c.fileA)}">${escapeHtml(c.fileA)}</td>
|
|
101
|
+
<td class="filepath" title="${escapeHtml(c.fileB)}">${escapeHtml(c.fileB)}</td>
|
|
102
|
+
<td>${c.coChanges}</td>
|
|
103
|
+
<td><span class="badge" style="background:${scoreColor(c.couplingScore * 8)}">${c.couplingScore}%</span></td>
|
|
104
|
+
</tr>`).join('');
|
|
105
|
+
const html = `<!DOCTYPE html>
|
|
106
|
+
<html lang="en">
|
|
107
|
+
<head>
|
|
108
|
+
<meta charset="UTF-8"/>
|
|
109
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
|
110
|
+
<title>⛏ Git Archaeologist — ${escapeHtml(result.repoName)}</title>
|
|
111
|
+
<style>
|
|
112
|
+
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
|
113
|
+
:root {
|
|
114
|
+
--bg: #0f1117; --surface: #1a1d27; --border: #2a2d3a;
|
|
115
|
+
--text: #e2e8f0; --muted: #64748b; --accent: #a78bfa;
|
|
116
|
+
}
|
|
117
|
+
body { background: var(--bg); color: var(--text); font-family: 'Inter', system-ui, sans-serif; font-size: 14px; line-height: 1.6; }
|
|
118
|
+
header { background: var(--surface); border-bottom: 1px solid var(--border); padding: 24px 40px; display: flex; align-items: center; gap: 16px; }
|
|
119
|
+
header h1 { font-size: 20px; font-weight: 600; color: var(--accent); }
|
|
120
|
+
header p { color: var(--muted); font-size: 13px; }
|
|
121
|
+
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; padding: 32px 40px 0; }
|
|
122
|
+
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 16px 20px; }
|
|
123
|
+
.stat-card .label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
|
|
124
|
+
.stat-card .value { font-size: 28px; font-weight: 700; color: var(--accent); }
|
|
125
|
+
.stat-card .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
|
|
126
|
+
main { padding: 32px 40px; display: flex; flex-direction: column; gap: 40px; }
|
|
127
|
+
section h2 { font-size: 15px; font-weight: 600; color: var(--accent); margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
|
|
128
|
+
table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
|
|
129
|
+
th { background: #12151f; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; padding: 10px 14px; text-align: left; font-weight: 500; }
|
|
130
|
+
td { padding: 10px 14px; border-top: 1px solid var(--border); vertical-align: middle; }
|
|
131
|
+
tr:hover td { background: #1e2130; }
|
|
132
|
+
.rank { color: var(--muted); font-size: 12px; width: 40px; }
|
|
133
|
+
.filepath { font-family: 'JetBrains Mono', 'Fira Code', monospace; font-size: 12px; max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
134
|
+
.muted { color: var(--muted); font-size: 12px; }
|
|
135
|
+
.badge { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; color: #0f1117; }
|
|
136
|
+
footer { text-align: center; padding: 32px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--border); }
|
|
137
|
+
</style>
|
|
138
|
+
</head>
|
|
139
|
+
<body>
|
|
140
|
+
<header>
|
|
141
|
+
<div>
|
|
142
|
+
<h1>⛏ Git Archaeologist</h1>
|
|
143
|
+
<p>${escapeHtml(result.repoName)} · ${result.totalCommits.toLocaleString()} commits · ${from} → ${to} · analyzed ${result.analyzedAt.toLocaleString()}</p>
|
|
144
|
+
</div>
|
|
145
|
+
</header>
|
|
146
|
+
|
|
147
|
+
<div class="stats-grid">
|
|
148
|
+
<div class="stat-card"><div class="label">Total Commits</div><div class="value">${result.totalCommits.toLocaleString()}</div></div>
|
|
149
|
+
<div class="stat-card"><div class="label">Files Tracked</div><div class="value">${result.totalFiles.toLocaleString()}</div></div>
|
|
150
|
+
<div class="stat-card"><div class="label">Contributors</div><div class="value">${result.totalAuthors.toLocaleString()}</div></div>
|
|
151
|
+
<div class="stat-card"><div class="label">Cursed Files</div><div class="value" style="color:#f87171">${result.cursedFiles.length}</div><div class="sub">top instability</div></div>
|
|
152
|
+
<div class="stat-card"><div class="label">Bus Factor 1</div><div class="value" style="color:#f87171">${result.busFactor.filter(b => b.busFactor === 1).length}</div><div class="sub">single-owner modules</div></div>
|
|
153
|
+
<div class="stat-card"><div class="label">Coupled Pairs</div><div class="value" style="color:#fbbf24">${result.coupling.length}</div><div class="sub">implicit links</div></div>
|
|
154
|
+
</div>
|
|
155
|
+
|
|
156
|
+
<main>
|
|
157
|
+
<section>
|
|
158
|
+
<h2>💀 Cursed Files — highest instability score</h2>
|
|
159
|
+
<table>
|
|
160
|
+
<thead><tr><th>#</th><th>File</th><th>Score</th><th>Changes</th><th>Authors</th><th>Why</th></tr></thead>
|
|
161
|
+
<tbody>${cursedRows}</tbody>
|
|
162
|
+
</table>
|
|
163
|
+
</section>
|
|
164
|
+
|
|
165
|
+
<section>
|
|
166
|
+
<h2>🚌 Bus Factor — single points of failure</h2>
|
|
167
|
+
<table>
|
|
168
|
+
<thead><tr><th>Module</th><th>Bus Factor</th><th>Files</th><th>Key People</th><th>Risk</th></tr></thead>
|
|
169
|
+
<tbody>${busRows}</tbody>
|
|
170
|
+
</table>
|
|
171
|
+
</section>
|
|
172
|
+
|
|
173
|
+
<section>
|
|
174
|
+
<h2>👑 Ownership — who truly owns each file</h2>
|
|
175
|
+
<table>
|
|
176
|
+
<thead><tr><th>File</th><th>Owner</th><th>Ownership</th><th>Other Contributors</th></tr></thead>
|
|
177
|
+
<tbody>${ownerRows}</tbody>
|
|
178
|
+
</table>
|
|
179
|
+
</section>
|
|
180
|
+
|
|
181
|
+
<section>
|
|
182
|
+
<h2>🔗 Implicit Coupling — files that always change together</h2>
|
|
183
|
+
<table>
|
|
184
|
+
<thead><tr><th>File A</th><th>File B</th><th>Co-changes</th><th>Coupling</th></tr></thead>
|
|
185
|
+
<tbody>${couplingRows}</tbody>
|
|
186
|
+
</table>
|
|
187
|
+
</section>
|
|
188
|
+
</main>
|
|
189
|
+
<footer>Generated by ⛏ Git Archaeologist</footer>
|
|
190
|
+
</body>
|
|
191
|
+
</html>`;
|
|
192
|
+
fs.writeFileSync(outputPath, html, 'utf8');
|
|
193
|
+
}
|
|
194
|
+
//# sourceMappingURL=htmlReport.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"htmlReport.js","sourceRoot":"","sources":["../../src/output/htmlReport.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,gDAmIC;AAlKD,uCAAyB;AAIzB,SAAS,UAAU,CAAC,GAAW;IAC7B,OAAO,GAAG;SACP,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC;SACtB,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC;SACrB,OAAO,CA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AAC,MAAM;;;;;;;;iBAQjH,UAAU;;;;;;;;iBAQV,OAAO;;;;;;;;iBAQP,SAAS;;;;;;;;iBAQT,YAAY;;;;;;QAMrB,CAAC;IAEP,EAAE,CAAC,aAAa,CAAC,UAAU,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AAC7C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"terminalRenderer.d.ts","sourceRoot":"","sources":["../../src/output/terminalRenderer.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAY1C,wBAAgB,YAAY,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI,CAOzD"}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.renderReport = renderReport;
|
|
7
|
+
const cli_table3_1 = __importDefault(require("cli-table3"));
|
|
8
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
9
|
+
const formatter_1 = require("./formatter");
|
|
10
|
+
function renderReport(result) {
|
|
11
|
+
renderSummary(result);
|
|
12
|
+
renderCursedFiles(result);
|
|
13
|
+
renderBusFactor(result);
|
|
14
|
+
renderOwnership(result);
|
|
15
|
+
renderCoupling(result);
|
|
16
|
+
renderFooter();
|
|
17
|
+
}
|
|
18
|
+
function renderSummary(r) {
|
|
19
|
+
console.log('\n');
|
|
20
|
+
const from = (0, formatter_1.formatDate)(Math.floor(r.dateRange.from.getTime() / 1000));
|
|
21
|
+
const to = (0, formatter_1.formatDate)(Math.floor(r.dateRange.to.getTime() / 1000));
|
|
22
|
+
console.log((0, formatter_1.summaryBox)([
|
|
23
|
+
chalk_1.default.bold.white('⛏ Git Archaeologist — Repository Analysis'),
|
|
24
|
+
'',
|
|
25
|
+
` ${chalk_1.default.hex('#A78BFA')('Repo')} ${chalk_1.default.white(r.repoName)}`,
|
|
26
|
+
` ${chalk_1.default.hex('#A78BFA')('Path')} ${chalk_1.default.white(r.repoPath)}`,
|
|
27
|
+
` ${chalk_1.default.hex('#A78BFA')('Analyzed at')} ${chalk_1.default.white(r.analyzedAt.toLocaleString())}`,
|
|
28
|
+
'',
|
|
29
|
+
` ${chalk_1.default.hex('#A78BFA')('Total commits')} ${chalk_1.default.yellow.bold(String(r.totalCommits))}`,
|
|
30
|
+
` ${chalk_1.default.hex('#A78BFA')('Total files')} ${chalk_1.default.yellow.bold(String(r.totalFiles))}`,
|
|
31
|
+
` ${chalk_1.default.hex('#A78BFA')('Total authors')} ${chalk_1.default.yellow.bold(String(r.totalAuthors))}`,
|
|
32
|
+
` ${chalk_1.default.hex('#A78BFA')('Date range')} ${chalk_1.default.white(from)} → ${chalk_1.default.white(to)}`,
|
|
33
|
+
]));
|
|
34
|
+
}
|
|
35
|
+
function renderCursedFiles(r) {
|
|
36
|
+
console.log((0, formatter_1.sectionHeader)('💀 CURSED FILES — highest instability score'));
|
|
37
|
+
const table = new cli_table3_1.default({
|
|
38
|
+
head: [
|
|
39
|
+
chalk_1.default.bold('Rank'),
|
|
40
|
+
chalk_1.default.bold('File'),
|
|
41
|
+
chalk_1.default.bold('Score'),
|
|
42
|
+
chalk_1.default.bold('Changes'),
|
|
43
|
+
chalk_1.default.bold('Authors'),
|
|
44
|
+
chalk_1.default.bold('Last touched'),
|
|
45
|
+
chalk_1.default.bold('Why'),
|
|
46
|
+
],
|
|
47
|
+
colWidths: [6, 42, 10, 9, 9, 14, 38],
|
|
48
|
+
style: { head: [], border: ['grey'] },
|
|
49
|
+
wordWrap: true,
|
|
50
|
+
});
|
|
51
|
+
r.cursedFiles.slice(0, 15).forEach((f, i) => {
|
|
52
|
+
const stats = r.fileStats.get(f.filepath);
|
|
53
|
+
const lastTouched = stats ? (0, formatter_1.formatDate)(stats.lastChanged) : 'unknown';
|
|
54
|
+
table.push([
|
|
55
|
+
chalk_1.default.grey(String(i + 1)),
|
|
56
|
+
(0, formatter_1.formatPath)(f.filepath, 40),
|
|
57
|
+
(0, formatter_1.formatScore)(f.curseScore),
|
|
58
|
+
chalk_1.default.white(String(f.totalChanges)),
|
|
59
|
+
chalk_1.default.white(String(f.uniqueAuthors)),
|
|
60
|
+
chalk_1.default.grey(lastTouched),
|
|
61
|
+
chalk_1.default.grey(f.reasons.join(', ')),
|
|
62
|
+
]);
|
|
63
|
+
});
|
|
64
|
+
console.log(table.toString());
|
|
65
|
+
}
|
|
66
|
+
function renderBusFactor(r) {
|
|
67
|
+
console.log((0, formatter_1.sectionHeader)('🚌 BUS FACTOR — who leaving would hurt the most'));
|
|
68
|
+
const table = new cli_table3_1.default({
|
|
69
|
+
head: [
|
|
70
|
+
chalk_1.default.bold('Module'),
|
|
71
|
+
chalk_1.default.bold('Bus Factor'),
|
|
72
|
+
chalk_1.default.bold('Files'),
|
|
73
|
+
chalk_1.default.bold('Key people'),
|
|
74
|
+
chalk_1.default.bold('Risk'),
|
|
75
|
+
],
|
|
76
|
+
colWidths: [22, 12, 8, 32, 44],
|
|
77
|
+
style: { head: [], border: ['grey'] },
|
|
78
|
+
wordWrap: true,
|
|
79
|
+
});
|
|
80
|
+
r.busFactor.forEach((b) => {
|
|
81
|
+
table.push([
|
|
82
|
+
chalk_1.default.cyan(b.scope),
|
|
83
|
+
(0, formatter_1.formatBusFactor)(b.busFactor),
|
|
84
|
+
chalk_1.default.white(String(b.filesAtRisk)),
|
|
85
|
+
chalk_1.default.white(b.atRiskAuthors.slice(0, 3).join(', ')),
|
|
86
|
+
b.warning,
|
|
87
|
+
]);
|
|
88
|
+
});
|
|
89
|
+
console.log(table.toString());
|
|
90
|
+
}
|
|
91
|
+
function renderOwnership(r) {
|
|
92
|
+
console.log((0, formatter_1.sectionHeader)('👑 OWNERSHIP — who truly owns each file'));
|
|
93
|
+
// Show only files with a dominant owner (>= 60%) — most interesting
|
|
94
|
+
const dominated = r.ownership
|
|
95
|
+
.filter((o) => o.ownershipPercent >= 60)
|
|
96
|
+
.slice(0, 15);
|
|
97
|
+
if (dominated.length === 0) {
|
|
98
|
+
console.log(chalk_1.default.grey(' No files with dominant ownership found (all well-shared).'));
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
const table = new cli_table3_1.default({
|
|
102
|
+
head: [
|
|
103
|
+
chalk_1.default.bold('File'),
|
|
104
|
+
chalk_1.default.bold('Owner'),
|
|
105
|
+
chalk_1.default.bold('Ownership'),
|
|
106
|
+
chalk_1.default.bold('Contributors'),
|
|
107
|
+
],
|
|
108
|
+
colWidths: [42, 22, 12, 42],
|
|
109
|
+
style: { head: [], border: ['grey'] },
|
|
110
|
+
wordWrap: true,
|
|
111
|
+
});
|
|
112
|
+
dominated.forEach((o) => {
|
|
113
|
+
const others = o.contributors
|
|
114
|
+
.slice(1, 3)
|
|
115
|
+
.map((c) => `${c.name} (${c.percent}%)`)
|
|
116
|
+
.join(', ');
|
|
117
|
+
table.push([
|
|
118
|
+
(0, formatter_1.formatPath)(o.filepath, 40),
|
|
119
|
+
chalk_1.default.white(o.owner),
|
|
120
|
+
(0, formatter_1.formatOwnershipPercent)(o.ownershipPercent),
|
|
121
|
+
chalk_1.default.grey(others || '—'),
|
|
122
|
+
]);
|
|
123
|
+
});
|
|
124
|
+
console.log(table.toString());
|
|
125
|
+
}
|
|
126
|
+
function renderCoupling(r) {
|
|
127
|
+
console.log((0, formatter_1.sectionHeader)('🔗 IMPLICIT COUPLING — files that always change together'));
|
|
128
|
+
if (r.coupling.length === 0) {
|
|
129
|
+
console.log(chalk_1.default.grey(' No significant file coupling detected.'));
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
const table = new cli_table3_1.default({
|
|
133
|
+
head: [
|
|
134
|
+
chalk_1.default.bold('File A'),
|
|
135
|
+
chalk_1.default.bold('File B'),
|
|
136
|
+
chalk_1.default.bold('Co-changes'),
|
|
137
|
+
chalk_1.default.bold('Coupling'),
|
|
138
|
+
],
|
|
139
|
+
colWidths: [38, 38, 12, 12],
|
|
140
|
+
style: { head: [], border: ['grey'] },
|
|
141
|
+
wordWrap: true,
|
|
142
|
+
});
|
|
143
|
+
r.coupling.slice(0, 12).forEach((c) => {
|
|
144
|
+
table.push([
|
|
145
|
+
(0, formatter_1.formatPath)(c.fileA, 36),
|
|
146
|
+
(0, formatter_1.formatPath)(c.fileB, 36),
|
|
147
|
+
chalk_1.default.white(String(c.coChanges)),
|
|
148
|
+
(0, formatter_1.formatCouplingScore)(c.couplingScore),
|
|
149
|
+
]);
|
|
150
|
+
});
|
|
151
|
+
console.log(table.toString());
|
|
152
|
+
}
|
|
153
|
+
function renderFooter() {
|
|
154
|
+
console.log('\n' + chalk_1.default.hex('#A78BFA')('─'.repeat(70)));
|
|
155
|
+
console.log(chalk_1.default.grey(' ⛏ Git Archaeologist | github.com/SushantVerma7969/git-archaeologist'));
|
|
156
|
+
console.log(chalk_1.default.hex('#A78BFA')('─'.repeat(70)) + '\n');
|
|
157
|
+
}
|
|
158
|
+
//# sourceMappingURL=terminalRenderer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"terminalRenderer.js","sourceRoot":"","sources":["../../src/output/terminalRenderer.ts"],"names":[],"mappings":";;;;;AAcA,oCAOC;AArBD,4DAA+B;AAC/B,kDAA0B;AAE1B,2CASqB;AAErB,SAAgB,YAAY,CAAC,MAAsB;IACjD,aAAa,CAAC,MAAM,CAAC,CAAC;IACtB,iBAAiB,CAAC,MAAM,CAAC,CAAC;IAC1B,eAAe,CAAC,MAAM,CAAC,CAAC;IACxB,eAAe,CAAC,MAAM,CAAC,CAAC;IACxB,cAAc,CAAC,MAAM,CAAC,CAAC;IACvB,YAAY,EAAE,CAAC;AACjB,CAAC;AAED,SAAS,aAAa,CAAC,CAAiB;IACtC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAClB,MAAM,IAAI,GAAG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