1 | import { IExcludeType, IFocusType, IIncludeOnlyType } from "./filter-types";
|
2 |
|
3 | export interface IReporterOptions {
|
4 | /**
|
5 | * Options to tweak the output of the anonymous reporter
|
6 | */
|
7 | anon?: IAnonReporterOptions;
|
8 | /**
|
9 | * Options to tweak the output of the archi/ cdot reporter
|
10 | */
|
11 | archi?: IDotReporterOptions;
|
12 | /**
|
13 | * Options to tweak the output of the dot reporter
|
14 | */
|
15 | dot?: IDotReporterOptions;
|
16 | /**
|
17 | * Options to tweak the output of the dot reporter
|
18 | */
|
19 | ddot?: IDotReporterOptions;
|
20 | }
|
21 |
|
22 | export interface IReporterFiltersType {
|
23 | exclude: IExcludeType;
|
24 | includeOnly: IIncludeOnlyType;
|
25 | focus: IFocusType;
|
26 | }
|
27 |
|
28 | export interface IAnonReporterOptions {
|
29 | /**
|
30 | * List of words to use to replace path elements of file names in the output
|
31 | * with so the output isn't directly traceable to its intended purpose.
|
32 | * When the list is exhausted, the anon reporter will use random strings
|
33 | * patterned after the original file name in stead. The list is empty
|
34 | * by default.
|
35 | *
|
36 | * Read more in https://github.com/sverweij/dependency-cruiser/blob/develop/doc/cli.md#anon---obfuscated-json",
|
37 | */
|
38 | wordlist?: string[];
|
39 | }
|
40 |
|
41 | export interface IDotReporterOptions {
|
42 | /**
|
43 | * Regular expressions to collapse to. For the "dot" reporter defaults
|
44 | * to null, but "node_modules/[^/]+" is recommended for most use cases.
|
45 | */
|
46 | collapsePattern?: string | string[];
|
47 | /**
|
48 | * filters to apply to the reporter before rendering it (e.g. to leave
|
49 | * out details from the graphical output that are not relevant for the
|
50 | * goal of the report)
|
51 | */
|
52 | filters?: IReporterFiltersType;
|
53 | /**
|
54 | * A bunch of criteria to (conditionally) theme the dot output
|
55 | */
|
56 | theme?: IDotTheme;
|
57 | }
|
58 |
|
59 | export interface IDotTheme {
|
60 | /**
|
61 | * If passed with the value 'true', the passed theme replaces the default
|
62 | * one. In all other cases it extends the default theme
|
63 | */
|
64 | replace?: boolean;
|
65 | /**
|
66 | * Name- value pairs of GraphViz dot (global) attributes.
|
67 | */
|
68 | graph?: any;
|
69 | /**
|
70 | * Name- value pairs of GraphViz dot node attributes.
|
71 | */
|
72 | node?: any;
|
73 | /**
|
74 | * Name- value pairs of GraphViz dot edge attributes.
|
75 | */
|
76 | edge?: any;
|
77 | /**
|
78 | * List of criteria and attributes to apply for modules when the criteria are
|
79 | * met. Conditions can use any module attribute. Attributes can be any
|
80 | * that are valid in GraphViz dot nodes.
|
81 | */
|
82 | modules?: IDotThemeEntry[];
|
83 | /**
|
84 | * List of criteria and attributes to apply for dependencies when the criteria
|
85 | * are met. Conditions can use any dependency attribute. Attributes can be any
|
86 | * that are valid in GraphViz dot edges.
|
87 | */
|
88 | dependencies?: IDotThemeEntry[];
|
89 | }
|
90 |
|
91 | export interface IDotThemeEntry {
|
92 | criteria: any;
|
93 | attributes: any;
|
94 | }
|