ng-di-graph 0.5.0 → 0.6.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 +48 -9
- package/dist/cli/index.cjs +132 -6
- package/dist/cli/index.cjs.map +1 -1
- package/dist/core/parser.d.ts +8 -0
- package/dist/formatters/text-formatter.d.ts +9 -0
- package/dist/types/index.d.ts +18 -1
- package/package.json +1 -1
package/dist/core/parser.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export declare class AngularParser {
|
|
|
7
7
|
private _project?;
|
|
8
8
|
private _typeResolutionCache;
|
|
9
9
|
private _circularTypeRefs;
|
|
10
|
+
private _processingStats;
|
|
10
11
|
private _structuredWarnings;
|
|
11
12
|
constructor(_options: CliOptions, _logger?: Logger | undefined);
|
|
12
13
|
private verboseInfo;
|
|
@@ -22,6 +23,13 @@ export declare class AngularParser {
|
|
|
22
23
|
* @returns StructuredWarnings object with categorized warnings
|
|
23
24
|
*/
|
|
24
25
|
getStructuredWarnings(): StructuredWarnings;
|
|
26
|
+
/**
|
|
27
|
+
* Get file processing stats from the most recent parse run.
|
|
28
|
+
*/
|
|
29
|
+
getProcessingStats(): {
|
|
30
|
+
processedFileCount: number;
|
|
31
|
+
skippedFileCount: number;
|
|
32
|
+
};
|
|
25
33
|
/**
|
|
26
34
|
* Add structured warning to collection (Task 3.3)
|
|
27
35
|
* Includes global deduplication for both structured warnings and console output
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type Logger } from '../core/logger';
|
|
2
|
+
import type { Graph, TextFormatContext } from '../types';
|
|
3
|
+
export declare class TextFormatter {
|
|
4
|
+
private readonly _context;
|
|
5
|
+
private readonly _logger?;
|
|
6
|
+
constructor(context?: TextFormatContext, logger?: Logger);
|
|
7
|
+
format(graph: Graph): string;
|
|
8
|
+
private getDependencyGroups;
|
|
9
|
+
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -3,9 +3,15 @@
|
|
|
3
3
|
* Based on PRD requirements in @docs/prd/mvp-requirements.md
|
|
4
4
|
*/
|
|
5
5
|
export type NodeKind = 'service' | 'component' | 'directive' | 'unknown';
|
|
6
|
+
export interface NodeSource {
|
|
7
|
+
filePath: string;
|
|
8
|
+
line: number;
|
|
9
|
+
column: number;
|
|
10
|
+
}
|
|
6
11
|
export interface Node {
|
|
7
12
|
id: string;
|
|
8
13
|
kind: NodeKind;
|
|
14
|
+
source?: NodeSource;
|
|
9
15
|
}
|
|
10
16
|
export interface EdgeFlags {
|
|
11
17
|
optional?: boolean;
|
|
@@ -31,7 +37,7 @@ export interface CliOptions {
|
|
|
31
37
|
* When provided, only these files are parsed
|
|
32
38
|
*/
|
|
33
39
|
files?: string[];
|
|
34
|
-
format: 'json' | 'mermaid';
|
|
40
|
+
format: 'json' | 'mermaid' | 'text';
|
|
35
41
|
entry?: string[];
|
|
36
42
|
direction: 'upstream' | 'downstream' | 'both';
|
|
37
43
|
includeDecorators: boolean;
|
|
@@ -42,6 +48,7 @@ export interface ParsedClass {
|
|
|
42
48
|
name: string;
|
|
43
49
|
kind: NodeKind;
|
|
44
50
|
filePath: string;
|
|
51
|
+
source: NodeSource;
|
|
45
52
|
dependencies: ParsedDependency[];
|
|
46
53
|
}
|
|
47
54
|
export interface ParsedDependency {
|
|
@@ -100,6 +107,16 @@ export interface StructuredWarnings {
|
|
|
100
107
|
};
|
|
101
108
|
totalCount: number;
|
|
102
109
|
}
|
|
110
|
+
export interface TextFormatContext {
|
|
111
|
+
projectPath?: string;
|
|
112
|
+
direction?: 'upstream' | 'downstream' | 'both';
|
|
113
|
+
entry?: string[];
|
|
114
|
+
processedFileCount?: number;
|
|
115
|
+
skippedFileCount?: number;
|
|
116
|
+
warningCount?: number;
|
|
117
|
+
warnings?: Warning[];
|
|
118
|
+
circularDependencyCount?: number;
|
|
119
|
+
}
|
|
103
120
|
export interface TypeValidationResult {
|
|
104
121
|
isValid: boolean;
|
|
105
122
|
token: string | null;
|