@notjustcoders/ioc-arise 1.0.0 → 1.0.1
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 +2 -37
- package/dist/commands/visualize.d.ts +3 -0
- package/dist/commands/visualize.d.ts.map +1 -0
- package/dist/commands/visualize.js +60 -0
- package/dist/commands/visualize.js.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/renderer/console-analysis-renderer.d.ts +11 -0
- package/dist/renderer/console-analysis-renderer.d.ts.map +1 -0
- package/dist/renderer/console-analysis-renderer.js +161 -0
- package/dist/renderer/console-analysis-renderer.js.map +1 -0
- package/dist/renderer/index.d.ts +3 -0
- package/dist/renderer/index.d.ts.map +1 -0
- package/dist/renderer/index.js +6 -0
- package/dist/renderer/index.js.map +1 -0
- package/dist/renderer/render-analysis.interface.d.ts +9 -0
- package/dist/renderer/render-analysis.interface.d.ts.map +1 -0
- package/dist/renderer/render-analysis.interface.js +3 -0
- package/dist/renderer/render-analysis.interface.js.map +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,9 +7,6 @@ A command-line tool that automatically generates type-safe IoC (Inversion of Con
|
|
|
7
7
|
- [Features](#features)
|
|
8
8
|
- [Installation](#installation)
|
|
9
9
|
- [Usage](#usage)
|
|
10
|
-
- [Generate Container](#generate-container)
|
|
11
|
-
- [Analyze Project](#analyze-project)
|
|
12
|
-
- [Command Options](#command-options)
|
|
13
10
|
- [Configuration File](#configuration-file)
|
|
14
11
|
- [Config File Location](#config-file-location)
|
|
15
12
|
- [Priority Order](#priority-order)
|
|
@@ -46,46 +43,14 @@ pnpm run build
|
|
|
46
43
|
|
|
47
44
|
## Usage
|
|
48
45
|
|
|
49
|
-
### Generate Container
|
|
50
|
-
|
|
51
46
|
```bash
|
|
52
47
|
# Basic usage
|
|
53
48
|
ioc-arise generate
|
|
54
49
|
|
|
55
|
-
#
|
|
50
|
+
# With custom source and output
|
|
56
51
|
ioc-arise generate --source src --output src/container.gen.ts
|
|
57
|
-
|
|
58
|
-
# Filter by interface pattern
|
|
59
|
-
ioc-arise generate --interface "Service|Repository"
|
|
60
|
-
|
|
61
|
-
# Exclude specific patterns
|
|
62
|
-
ioc-arise generate --exclude "**/*.test.ts" "**/*.spec.ts"
|
|
63
|
-
|
|
64
|
-
# Verbose output
|
|
65
|
-
ioc-arise generate --verbose
|
|
66
52
|
```
|
|
67
53
|
|
|
68
|
-
### Analyze Project
|
|
69
|
-
|
|
70
|
-
```bash
|
|
71
|
-
# Analyze without generating
|
|
72
|
-
ioc-arise analyze
|
|
73
|
-
|
|
74
|
-
# Check for circular dependencies only
|
|
75
|
-
ioc-arise generate --check-cycles
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
### Command Options
|
|
79
|
-
|
|
80
|
-
| Option | Description | Default |
|
|
81
|
-
|--------|-------------|----------|
|
|
82
|
-
| `-s, --source <dir>` | Source directory to scan | `src` |
|
|
83
|
-
| `-o, --output <file>` | Output file path | `container.gen.ts` |
|
|
84
|
-
| `-i, --interface <pattern>` | Interface name pattern (regex) | - |
|
|
85
|
-
| `-e, --exclude <patterns...>` | Exclude file patterns | - |
|
|
86
|
-
| `--check-cycles` | Only check circular dependencies | `false` |
|
|
87
|
-
| `--verbose` | Enable verbose logging | `false` |
|
|
88
|
-
|
|
89
54
|
## Configuration File
|
|
90
55
|
|
|
91
56
|
You can create an `ioc.config.json` file in the same directory as your source code to set default options. CLI arguments will override config file settings.
|
|
@@ -258,7 +223,7 @@ pnpm run start
|
|
|
258
223
|
|
|
259
224
|
- Only detects classes using the `implements` keyword
|
|
260
225
|
- Constructor parameters must be typed
|
|
261
|
-
- Circular dependencies are not
|
|
226
|
+
- Circular dependencies are detected and warned about, but not automatically resolved
|
|
262
227
|
- Only analyzes TypeScript files (`.ts` extension)
|
|
263
228
|
|
|
264
229
|
## Contributing
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"visualize.d.ts","sourceRoot":"","sources":["../../src/commands/visualize.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAQpC,eAAO,MAAM,gBAAgB,SAgDzB,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.visualizeCommand = void 0;
|
|
4
|
+
const commander_1 = require("commander");
|
|
5
|
+
const path_1 = require("path");
|
|
6
|
+
const fs_1 = require("fs");
|
|
7
|
+
const analyser_1 = require("../analyser");
|
|
8
|
+
const generator_1 = require("../generator");
|
|
9
|
+
const console_analysis_renderer_1 = require("../renderer/console-analysis-renderer");
|
|
10
|
+
exports.visualizeCommand = new commander_1.Command('visualize')
|
|
11
|
+
.description('Visualize project dependencies and analysis results')
|
|
12
|
+
.option('-s, --source <dir>', 'Source directory to scan', 'src')
|
|
13
|
+
.option('-i, --interface <pattern>', 'Interface name pattern to match (regex)')
|
|
14
|
+
.option('-e, --exclude <patterns...>', 'Exclude patterns for files')
|
|
15
|
+
.option('-r, --renderer <type>', 'Renderer type (console)', 'console')
|
|
16
|
+
.action(async (options) => {
|
|
17
|
+
try {
|
|
18
|
+
const sourceDir = (0, path_1.resolve)(options.source);
|
|
19
|
+
if (!(0, fs_1.existsSync)(sourceDir)) {
|
|
20
|
+
console.error(`❌ Source directory does not exist: ${sourceDir}`);
|
|
21
|
+
process.exit(1);
|
|
22
|
+
}
|
|
23
|
+
console.log(`🔍 Analyzing directory: ${sourceDir}`);
|
|
24
|
+
// Perform analysis
|
|
25
|
+
const classes = await (0, analyser_1.analyzeProject)(sourceDir, {
|
|
26
|
+
sourceDir,
|
|
27
|
+
interfacePattern: options.interface,
|
|
28
|
+
excludePatterns: options.exclude
|
|
29
|
+
});
|
|
30
|
+
if (classes.length === 0) {
|
|
31
|
+
console.log('⚠️ No classes implementing interfaces found.');
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
// Detect circular dependencies
|
|
35
|
+
const circularDependencies = (0, generator_1.detectCircularDependencies)(classes);
|
|
36
|
+
// Prepare analysis results
|
|
37
|
+
const analysisResults = {
|
|
38
|
+
classes,
|
|
39
|
+
circularDependencies
|
|
40
|
+
};
|
|
41
|
+
// Create renderer based on options
|
|
42
|
+
const renderer = createRenderer(options.renderer);
|
|
43
|
+
// Render the analysis results
|
|
44
|
+
renderer.render(analysisResults);
|
|
45
|
+
}
|
|
46
|
+
catch (error) {
|
|
47
|
+
console.error('❌ Error visualizing project:', error instanceof Error ? error.message : error);
|
|
48
|
+
process.exit(1);
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
function createRenderer(rendererType) {
|
|
52
|
+
switch (rendererType.toLowerCase()) {
|
|
53
|
+
case 'console':
|
|
54
|
+
return new console_analysis_renderer_1.ConsoleAnalysisRenderer();
|
|
55
|
+
default:
|
|
56
|
+
console.warn(`⚠️ Unknown renderer type: ${rendererType}. Falling back to console renderer.`);
|
|
57
|
+
return new console_analysis_renderer_1.ConsoleAnalysisRenderer();
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=visualize.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"visualize.js","sourceRoot":"","sources":["../../src/commands/visualize.ts"],"names":[],"mappings":";;;AAAA,yCAAoC;AACpC,+BAA+B;AAC/B,2BAAgC;AAChC,0CAA6C;AAC7C,4CAA0D;AAC1D,qFAAgF;AAGnE,QAAA,gBAAgB,GAAG,IAAI,mBAAO,CAAC,WAAW,CAAC;KACrD,WAAW,CAAC,qDAAqD,CAAC;KAClE,MAAM,CAAC,oBAAoB,EAAE,0BAA0B,EAAE,KAAK,CAAC;KAC/D,MAAM,CAAC,2BAA2B,EAAE,yCAAyC,CAAC;KAC9E,MAAM,CAAC,6BAA6B,EAAE,4BAA4B,CAAC;KACnE,MAAM,CAAC,uBAAuB,EAAE,yBAAyB,EAAE,SAAS,CAAC;K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CAAC;AACH,CAAC,CAAC,CAAC;AAEL,SAAS,cAAc,CAAC,YAAoB;IAC1C,QAAQ,YAAY,CAAC,WAAW,EAAE,EAAE,CAAC;QACnC,KAAK,SAAS;YACZ,OAAO,IAAI,mDAAuB,EAAE,CAAC;QACvC;YACE,OAAO,CAAC,IAAI,CAAC,8BAA8B,YAAY,qCAAqC,CAAC,CAAC;YAC9F,OAAO,IAAI,mDAAuB,EAAE,CAAC;IACzC,CAAC;AACH,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
const commander_1 = require("commander");
|
|
5
5
|
const generate_1 = require("./commands/generate");
|
|
6
6
|
const analyze_1 = require("./commands/analyze");
|
|
7
|
+
const visualize_1 = require("./commands/visualize");
|
|
7
8
|
const program = new commander_1.Command();
|
|
8
9
|
program
|
|
9
10
|
.name('ioc-arise')
|
|
@@ -12,6 +13,7 @@ program
|
|
|
12
13
|
// Register commands
|
|
13
14
|
program.addCommand(generate_1.generateCommand);
|
|
14
15
|
program.addCommand(analyze_1.analyzeCommand);
|
|
16
|
+
program.addCommand(visualize_1.visualizeCommand);
|
|
15
17
|
program.parse();
|
|
16
18
|
// If no command is provided, show help
|
|
17
19
|
if (!process.argv.slice(2).length) {
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAEA,yCAAoC;AACpC,kDAAsD;AACtD,gDAAoD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAEA,yCAAoC;AACpC,kDAAsD;AACtD,gDAAoD;AACpD,oDAAwD;AAIxD,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,WAAW,CAAC;KACjB,WAAW,CAAC,2DAA2D,CAAC;KACxE,OAAO,CAAC,OAAO,CAAC,CAAC;AAEpB,oBAAoB;AACpB,OAAO,CAAC,UAAU,CAAC,0BAAe,CAAC,CAAC;AACpC,OAAO,CAAC,UAAU,CAAC,wBAAc,CAAC,CAAC;AACnC,OAAO,CAAC,UAAU,CAAC,4BAAgB,CAAC,CAAC;AAErC,OAAO,CAAC,KAAK,EAAE,CAAC;AAEhB,uCAAuC;AACvC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAClC,OAAO,CAAC,UAAU,EAAE,CAAC;AACvB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { RenderAnalysis, AnalysisResults } from './render-analysis.interface';
|
|
2
|
+
export declare class ConsoleAnalysisRenderer implements RenderAnalysis {
|
|
3
|
+
render(results: AnalysisResults): void;
|
|
4
|
+
private renderHeader;
|
|
5
|
+
private renderDependencyGraph;
|
|
6
|
+
private renderCircularDependencies;
|
|
7
|
+
private formatClassName;
|
|
8
|
+
private truncateText;
|
|
9
|
+
private renderFooter;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=console-analysis-renderer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"console-analysis-renderer.d.ts","sourceRoot":"","sources":["../../src/renderer/console-analysis-renderer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAsB9E,qBAAa,uBAAwB,YAAW,cAAc;IAC5D,MAAM,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI;IAOtC,OAAO,CAAC,YAAY;IAuBpB,OAAO,CAAC,qBAAqB;IA8D7B,OAAO,CAAC,0BAA0B;IA2BlC,OAAO,CAAC,eAAe;IAWvB,OAAO,CAAC,YAAY;IAiCpB,OAAO,CAAC,YAAY;CAKrB"}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ConsoleAnalysisRenderer = void 0;
|
|
4
|
+
// ANSI color codes for beautiful console output
|
|
5
|
+
const colors = {
|
|
6
|
+
reset: '\x1b[0m',
|
|
7
|
+
bright: '\x1b[1m',
|
|
8
|
+
dim: '\x1b[2m',
|
|
9
|
+
red: '\x1b[31m',
|
|
10
|
+
green: '\x1b[32m',
|
|
11
|
+
yellow: '\x1b[33m',
|
|
12
|
+
blue: '\x1b[34m',
|
|
13
|
+
magenta: '\x1b[35m',
|
|
14
|
+
cyan: '\x1b[36m',
|
|
15
|
+
white: '\x1b[37m',
|
|
16
|
+
gray: '\x1b[90m',
|
|
17
|
+
bgBlue: '\x1b[44m',
|
|
18
|
+
bgGreen: '\x1b[42m',
|
|
19
|
+
bgRed: '\x1b[41m',
|
|
20
|
+
bgYellow: '\x1b[43m'
|
|
21
|
+
};
|
|
22
|
+
class ConsoleAnalysisRenderer {
|
|
23
|
+
render(results) {
|
|
24
|
+
this.renderHeader(results);
|
|
25
|
+
this.renderDependencyGraph(results.classes);
|
|
26
|
+
this.renderCircularDependencies(results.circularDependencies);
|
|
27
|
+
this.renderFooter();
|
|
28
|
+
}
|
|
29
|
+
renderHeader(results) {
|
|
30
|
+
const width = 60;
|
|
31
|
+
const title = '📊 DEPENDENCY ANALYSIS VISUALIZATION';
|
|
32
|
+
const padding = Math.max(0, Math.floor((width - title.length) / 2));
|
|
33
|
+
console.log('\n' + colors.cyan + '╔' + '═'.repeat(width - 2) + '╗' + colors.reset);
|
|
34
|
+
console.log(colors.cyan + '║' + ' '.repeat(padding) + colors.bright + colors.white + title + colors.reset + colors.cyan + ' '.repeat(width - 2 - padding - title.length) + '║' + colors.reset);
|
|
35
|
+
console.log(colors.cyan + '╠' + '═'.repeat(width - 2) + '╣' + colors.reset);
|
|
36
|
+
const stats = [
|
|
37
|
+
`${colors.blue}📦 Total Classes: ${colors.bright}${results.classes.length}${colors.reset}`,
|
|
38
|
+
`${colors.yellow}🔄 Circular Dependencies: ${results.circularDependencies.length > 0 ? colors.red + colors.bright : colors.green + colors.bright}${results.circularDependencies.length}${colors.reset}`
|
|
39
|
+
];
|
|
40
|
+
stats.forEach(stat => {
|
|
41
|
+
const cleanStat = stat.replace(/\x1b\[[0-9;]*m/g, '');
|
|
42
|
+
const statPadding = Math.max(0, Math.floor((width - 2 - cleanStat.length) / 2));
|
|
43
|
+
console.log(colors.cyan + '║' + ' '.repeat(statPadding) + stat + ' '.repeat(width - 2 - statPadding - cleanStat.length) + colors.cyan + '║' + colors.reset);
|
|
44
|
+
});
|
|
45
|
+
console.log(colors.cyan + '╚' + '═'.repeat(width - 2) + '╝' + colors.reset + '\n');
|
|
46
|
+
}
|
|
47
|
+
renderDependencyGraph(classes) {
|
|
48
|
+
console.log(colors.magenta + colors.bright + '🌐 DEPENDENCY GRAPH' + colors.reset);
|
|
49
|
+
console.log(colors.magenta + '━'.repeat(40) + colors.reset);
|
|
50
|
+
if (classes.length === 0) {
|
|
51
|
+
console.log(colors.gray + ' 📭 No classes found.' + colors.reset + '\n');
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
// Group classes by their dependency count for better visualization
|
|
55
|
+
const classesWithDeps = classes.filter(cls => cls.dependencies.length > 0);
|
|
56
|
+
const classesWithoutDeps = classes.filter(cls => cls.dependencies.length === 0);
|
|
57
|
+
// Render classes without dependencies first (leaf nodes)
|
|
58
|
+
if (classesWithoutDeps.length > 0) {
|
|
59
|
+
console.log('\n' + colors.green + colors.bright + '🍃 Leaf Nodes' + colors.reset + colors.gray + ' (No Dependencies)' + colors.reset);
|
|
60
|
+
console.log(colors.green + '┌' + '─'.repeat(38) + '┐' + colors.reset);
|
|
61
|
+
classesWithoutDeps.forEach((cls, index) => {
|
|
62
|
+
const isLast = index === classesWithoutDeps.length - 1;
|
|
63
|
+
const connector = isLast ? '└─' : '├─';
|
|
64
|
+
const formattedClass = this.formatClassName(cls, 'leaf');
|
|
65
|
+
const truncatedClass = this.truncateText(formattedClass, 34);
|
|
66
|
+
console.log(colors.green + '│ ' + connector + ' ' + colors.reset + truncatedClass);
|
|
67
|
+
});
|
|
68
|
+
console.log(colors.green + '└' + '─'.repeat(38) + '┘' + colors.reset);
|
|
69
|
+
}
|
|
70
|
+
// Render classes with dependencies
|
|
71
|
+
if (classesWithDeps.length > 0) {
|
|
72
|
+
console.log('\n' + colors.blue + colors.bright + '🔗 Dependency Tree' + colors.reset);
|
|
73
|
+
console.log(colors.blue + '┌' + '─'.repeat(38) + '┐' + colors.reset);
|
|
74
|
+
classesWithDeps.forEach((cls, index) => {
|
|
75
|
+
const isLast = index === classesWithDeps.length - 1;
|
|
76
|
+
const prefix = isLast ? '└─' : '├─';
|
|
77
|
+
const formattedClass = this.formatClassName(cls, 'parent');
|
|
78
|
+
const truncatedClass = this.truncateText(formattedClass, 34);
|
|
79
|
+
console.log(colors.blue + '│ ' + prefix + ' ' + colors.reset + truncatedClass);
|
|
80
|
+
cls.dependencies.forEach((dep, depIndex) => {
|
|
81
|
+
const isLastDep = depIndex === cls.dependencies.length - 1;
|
|
82
|
+
const depPrefix = isLast ? ' ' : '│ ';
|
|
83
|
+
const depSymbol = isLastDep ? '└─' : '├─';
|
|
84
|
+
const truncatedDep = this.truncateText(dep, 26);
|
|
85
|
+
console.log(colors.blue + '│ ' + depPrefix + ' ' + colors.cyan + depSymbol + ' 🔗 ' + colors.yellow + truncatedDep + colors.reset);
|
|
86
|
+
});
|
|
87
|
+
if (!isLast && cls.dependencies.length > 0) {
|
|
88
|
+
console.log(colors.blue + '│' + colors.reset);
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
console.log(colors.blue + '└' + '─'.repeat(38) + '┘' + colors.reset);
|
|
92
|
+
}
|
|
93
|
+
console.log('');
|
|
94
|
+
}
|
|
95
|
+
renderCircularDependencies(cycles) {
|
|
96
|
+
console.log(colors.red + colors.bright + '🔄 CIRCULAR DEPENDENCIES' + colors.reset);
|
|
97
|
+
console.log(colors.red + '━'.repeat(40) + colors.reset);
|
|
98
|
+
if (cycles.length === 0) {
|
|
99
|
+
console.log(colors.green + '┌' + '─'.repeat(38) + '┐' + colors.reset);
|
|
100
|
+
console.log(colors.green + '│ ' + colors.bright + '✅ No circular dependencies!' + colors.reset + colors.green + ' │' + colors.reset);
|
|
101
|
+
console.log(colors.green + '└' + '─'.repeat(38) + '┘' + colors.reset + '\n');
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
console.log(colors.red + '┌' + '─'.repeat(38) + '┐' + colors.reset);
|
|
105
|
+
console.log(colors.red + '│ ' + colors.bright + colors.yellow + '⚠️ Found ' + cycles.length + ' cycle(s)' + colors.reset + colors.red + ' │' + colors.reset);
|
|
106
|
+
console.log(colors.red + '├' + '─'.repeat(38) + '┤' + colors.reset);
|
|
107
|
+
cycles.forEach((cycle, index) => {
|
|
108
|
+
const cycleStr = cycle.join(' → ') + ' → ' + cycle[0];
|
|
109
|
+
const truncatedCycle = this.truncateText(cycleStr, 32);
|
|
110
|
+
console.log(colors.red + '│ ' + colors.bright + (index + 1) + '. ' + colors.reset + colors.yellow + '🔄 ' + truncatedCycle + colors.reset);
|
|
111
|
+
if (index < cycles.length - 1) {
|
|
112
|
+
console.log(colors.red + '│' + ' '.repeat(38) + '│' + colors.reset);
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
console.log(colors.red + '└' + '─'.repeat(38) + '┘' + colors.reset + '\n');
|
|
116
|
+
}
|
|
117
|
+
formatClassName(cls, type = 'parent') {
|
|
118
|
+
const className = colors.bright + colors.white + cls.name + colors.reset;
|
|
119
|
+
const interfaceInfo = cls.interfaceName ?
|
|
120
|
+
colors.gray + ' → ' + colors.cyan + cls.interfaceName + colors.reset : '';
|
|
121
|
+
const depCount = cls.dependencies.length > 0 ?
|
|
122
|
+
colors.gray + ' [' + colors.yellow + cls.dependencies.length + colors.gray + ']' + colors.reset : '';
|
|
123
|
+
const icon = type === 'leaf' ? '🌿' : '📦';
|
|
124
|
+
return `${icon} ${className}${interfaceInfo}${depCount}`;
|
|
125
|
+
}
|
|
126
|
+
truncateText(text, maxLength) {
|
|
127
|
+
// Remove ANSI color codes for length calculation
|
|
128
|
+
const cleanText = text.replace(/\x1b\[[0-9;]*m/g, '');
|
|
129
|
+
if (cleanText.length <= maxLength) {
|
|
130
|
+
return text;
|
|
131
|
+
}
|
|
132
|
+
// Find a good truncation point, preserving color codes
|
|
133
|
+
const truncated = cleanText.substring(0, maxLength - 3) + '...';
|
|
134
|
+
// Reconstruct with original color codes up to truncation point
|
|
135
|
+
let result = '';
|
|
136
|
+
let cleanIndex = 0;
|
|
137
|
+
let i = 0;
|
|
138
|
+
while (i < text.length && cleanIndex < maxLength - 3) {
|
|
139
|
+
if (text[i] === '\x1b') {
|
|
140
|
+
// Copy color code
|
|
141
|
+
const colorMatch = text.substring(i).match(/^\x1b\[[0-9;]*m/);
|
|
142
|
+
if (colorMatch) {
|
|
143
|
+
result += colorMatch[0];
|
|
144
|
+
i += colorMatch[0].length;
|
|
145
|
+
continue;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
result += text[i];
|
|
149
|
+
cleanIndex++;
|
|
150
|
+
i++;
|
|
151
|
+
}
|
|
152
|
+
return result + '...' + colors.reset;
|
|
153
|
+
}
|
|
154
|
+
renderFooter() {
|
|
155
|
+
console.log(colors.gray + '─'.repeat(60) + colors.reset);
|
|
156
|
+
console.log(colors.gray + '💡 🌿 = Leaf nodes, 📦 = Classes with deps, 🔗 = Dependencies' + colors.reset);
|
|
157
|
+
console.log(colors.gray + '✨ Analysis complete!' + colors.reset + '\n');
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
exports.ConsoleAnalysisRenderer = ConsoleAnalysisRenderer;
|
|
161
|
+
//# sourceMappingURL=console-analysis-renderer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"console-analysis-renderer.js","sourceRoot":"","sources":["../../src/renderer/console-analysis-renderer.ts"],"names":[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GAAG,CAAC,MAAM,CAAC,IAAI,GAAG,+DAA+D,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;QAC1G,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,GAAG,sBAAsB,GAAG,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC;IAC1E,CAAC;CACF;AAzKD,0DAyKC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/renderer/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AACnF,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ConsoleAnalysisRenderer = void 0;
|
|
4
|
+
var console_analysis_renderer_1 = require("./console-analysis-renderer");
|
|
5
|
+
Object.defineProperty(exports, "ConsoleAnalysisRenderer", { enumerable: true, get: function () { return console_analysis_renderer_1.ConsoleAnalysisRenderer; } });
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/renderer/index.ts"],"names":[],"mappings":";;;AACA,yEAAsE;AAA7D,oIAAA,uBAAuB,OAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ClassInfo } from '../types';
|
|
2
|
+
export interface AnalysisResults {
|
|
3
|
+
classes: ClassInfo[];
|
|
4
|
+
circularDependencies: string[][];
|
|
5
|
+
}
|
|
6
|
+
export interface RenderAnalysis {
|
|
7
|
+
render(results: AnalysisResults): void;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=render-analysis.interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render-analysis.interface.d.ts","sourceRoot":"","sources":["../../src/renderer/render-analysis.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,SAAS,EAAE,CAAC;IACrB,oBAAoB,EAAE,MAAM,EAAE,EAAE,CAAC;CAClC;AAED,MAAM,WAAW,cAAc;IAC7B,MAAM,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI,CAAC;CACxC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render-analysis.interface.js","sourceRoot":"","sources":["../../src/renderer/render-analysis.interface.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED