ng-di-graph 0.5.0 → 0.7.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.
@@ -7,6 +7,9 @@ export declare class AngularParser {
7
7
  private _project?;
8
8
  private _typeResolutionCache;
9
9
  private _circularTypeRefs;
10
+ private _angularCoreImportCache;
11
+ private _angularCoreAliasMatchers;
12
+ private _processingStats;
10
13
  private _structuredWarnings;
11
14
  constructor(_options: CliOptions, _logger?: Logger | undefined);
12
15
  private verboseInfo;
@@ -22,6 +25,13 @@ export declare class AngularParser {
22
25
  * @returns StructuredWarnings object with categorized warnings
23
26
  */
24
27
  getStructuredWarnings(): StructuredWarnings;
28
+ /**
29
+ * Get file processing stats from the most recent parse run.
30
+ */
31
+ getProcessingStats(): {
32
+ processedFileCount: number;
33
+ skippedFileCount: number;
34
+ };
25
35
  /**
26
36
  * Add structured warning to collection (Task 3.3)
27
37
  * Includes global deduplication for both structured warnings and console output
@@ -82,6 +92,13 @@ export declare class AngularParser {
82
92
  * @returns Original decorator name if alias found, null otherwise
83
93
  */
84
94
  private resolveDecoratorAlias;
95
+ private cacheAngularCoreAliases;
96
+ private buildAliasMatcher;
97
+ private isAngularCorePathTarget;
98
+ private isAngularCoreModuleSpecifier;
99
+ private getAngularCoreImportMap;
100
+ private resolveDependencyOrigin;
101
+ private normalizeTokenForOrigin;
85
102
  /**
86
103
  * Determine NodeKind from Angular decorator
87
104
  * @param decorator Angular decorator
@@ -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
+ }
@@ -3,9 +3,17 @@
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 type NodeOrigin = 'project' | 'angular-core' | 'external';
7
+ export interface NodeSource {
8
+ filePath: string;
9
+ line: number;
10
+ column: number;
11
+ }
6
12
  export interface Node {
7
13
  id: string;
8
14
  kind: NodeKind;
15
+ origin?: NodeOrigin;
16
+ source?: NodeSource;
9
17
  }
10
18
  export interface EdgeFlags {
11
19
  optional?: boolean;
@@ -31,10 +39,11 @@ export interface CliOptions {
31
39
  * When provided, only these files are parsed
32
40
  */
33
41
  files?: string[];
34
- format: 'json' | 'mermaid';
42
+ format: 'json' | 'mermaid' | 'text';
35
43
  entry?: string[];
36
44
  direction: 'upstream' | 'downstream' | 'both';
37
45
  includeDecorators: boolean;
46
+ includeAngularCore?: boolean;
38
47
  out?: string;
39
48
  verbose: boolean;
40
49
  }
@@ -42,12 +51,14 @@ export interface ParsedClass {
42
51
  name: string;
43
52
  kind: NodeKind;
44
53
  filePath: string;
54
+ source: NodeSource;
45
55
  dependencies: ParsedDependency[];
46
56
  }
47
57
  export interface ParsedDependency {
48
58
  token: string;
49
59
  flags?: EdgeFlags;
50
60
  parameterName: string;
61
+ origin?: NodeOrigin;
51
62
  }
52
63
  export interface ParameterAnalysisResult {
53
64
  token: string;
@@ -100,6 +111,16 @@ export interface StructuredWarnings {
100
111
  };
101
112
  totalCount: number;
102
113
  }
114
+ export interface TextFormatContext {
115
+ projectPath?: string;
116
+ direction?: 'upstream' | 'downstream' | 'both';
117
+ entry?: string[];
118
+ processedFileCount?: number;
119
+ skippedFileCount?: number;
120
+ warningCount?: number;
121
+ warnings?: Warning[];
122
+ circularDependencyCount?: number;
123
+ }
103
124
  export interface TypeValidationResult {
104
125
  isValid: boolean;
105
126
  token: string | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ng-di-graph",
3
- "version": "0.5.0",
3
+ "version": "0.7.0",
4
4
  "description": "Angular DI dependency graph CLI tool",
5
5
  "homepage": "https://github.com/m-yoshiro/ng-di-graph/",
6
6
  "repository": {