ng-di-graph 0.6.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.
- package/README.md +2 -0
- package/dist/cli/index.cjs +154 -45
- package/dist/cli/index.cjs.map +1 -1
- package/dist/core/parser.d.ts +9 -0
- package/dist/types/index.d.ts +4 -0
- package/package.json +1 -1
package/dist/core/parser.d.ts
CHANGED
|
@@ -7,6 +7,8 @@ export declare class AngularParser {
|
|
|
7
7
|
private _project?;
|
|
8
8
|
private _typeResolutionCache;
|
|
9
9
|
private _circularTypeRefs;
|
|
10
|
+
private _angularCoreImportCache;
|
|
11
|
+
private _angularCoreAliasMatchers;
|
|
10
12
|
private _processingStats;
|
|
11
13
|
private _structuredWarnings;
|
|
12
14
|
constructor(_options: CliOptions, _logger?: Logger | undefined);
|
|
@@ -90,6 +92,13 @@ export declare class AngularParser {
|
|
|
90
92
|
* @returns Original decorator name if alias found, null otherwise
|
|
91
93
|
*/
|
|
92
94
|
private resolveDecoratorAlias;
|
|
95
|
+
private cacheAngularCoreAliases;
|
|
96
|
+
private buildAliasMatcher;
|
|
97
|
+
private isAngularCorePathTarget;
|
|
98
|
+
private isAngularCoreModuleSpecifier;
|
|
99
|
+
private getAngularCoreImportMap;
|
|
100
|
+
private resolveDependencyOrigin;
|
|
101
|
+
private normalizeTokenForOrigin;
|
|
93
102
|
/**
|
|
94
103
|
* Determine NodeKind from Angular decorator
|
|
95
104
|
* @param decorator Angular decorator
|
package/dist/types/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
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';
|
|
6
7
|
export interface NodeSource {
|
|
7
8
|
filePath: string;
|
|
8
9
|
line: number;
|
|
@@ -11,6 +12,7 @@ export interface NodeSource {
|
|
|
11
12
|
export interface Node {
|
|
12
13
|
id: string;
|
|
13
14
|
kind: NodeKind;
|
|
15
|
+
origin?: NodeOrigin;
|
|
14
16
|
source?: NodeSource;
|
|
15
17
|
}
|
|
16
18
|
export interface EdgeFlags {
|
|
@@ -41,6 +43,7 @@ export interface CliOptions {
|
|
|
41
43
|
entry?: string[];
|
|
42
44
|
direction: 'upstream' | 'downstream' | 'both';
|
|
43
45
|
includeDecorators: boolean;
|
|
46
|
+
includeAngularCore?: boolean;
|
|
44
47
|
out?: string;
|
|
45
48
|
verbose: boolean;
|
|
46
49
|
}
|
|
@@ -55,6 +58,7 @@ export interface ParsedDependency {
|
|
|
55
58
|
token: string;
|
|
56
59
|
flags?: EdgeFlags;
|
|
57
60
|
parameterName: string;
|
|
61
|
+
origin?: NodeOrigin;
|
|
58
62
|
}
|
|
59
63
|
export interface ParameterAnalysisResult {
|
|
60
64
|
token: string;
|