dependency-cruiser 11.2.0 → 11.2.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/package.json +1 -1
- package/src/cli/format.js +0 -1
- package/src/meta.js +1 -1
- package/types/dependency-cruiser.d.ts +2 -3
- package/types/options.d.ts +32 -0
package/package.json
CHANGED
package/src/cli/format.js
CHANGED
package/src/meta.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ICruiseResult } from "./cruise-result";
|
|
2
|
-
import { ICruiseOptions } from "./options";
|
|
3
|
-
import { OutputType } from "./shared-types";
|
|
2
|
+
import { ICruiseOptions, IFormatOptions } from "./options";
|
|
4
3
|
|
|
5
4
|
export * from "./rule-set";
|
|
6
5
|
export * from "./options";
|
|
@@ -128,7 +127,7 @@ export function futureCruise(
|
|
|
128
127
|
*/
|
|
129
128
|
export function format(
|
|
130
129
|
pResult: ICruiseResult,
|
|
131
|
-
|
|
130
|
+
pFormatOptions: IFormatOptions
|
|
132
131
|
): IReporterOutput;
|
|
133
132
|
|
|
134
133
|
/**
|
package/types/options.d.ts
CHANGED
|
@@ -245,3 +245,35 @@ export interface ICruiseOptions {
|
|
|
245
245
|
*/
|
|
246
246
|
metrics?: boolean;
|
|
247
247
|
}
|
|
248
|
+
|
|
249
|
+
export interface IFormatOptions {
|
|
250
|
+
/**
|
|
251
|
+
* regular expression describing which dependencies the function
|
|
252
|
+
* should not cruise
|
|
253
|
+
*/
|
|
254
|
+
exclude?: string | string[] | IExcludeType;
|
|
255
|
+
/**
|
|
256
|
+
* regular expression describing which dependencies the function
|
|
257
|
+
* should cruise - anything not matching this will be skipped
|
|
258
|
+
*/
|
|
259
|
+
includeOnly?: string | string[] | IIncludeOnlyType;
|
|
260
|
+
/**
|
|
261
|
+
* dependency-cruiser will include modules matching this regular expression
|
|
262
|
+
* in its output, as well as their neighbours (direct dependencies and
|
|
263
|
+
* dependents)
|
|
264
|
+
*/
|
|
265
|
+
focus?: string | string[] | IFocusType;
|
|
266
|
+
/**
|
|
267
|
+
* collapse a to a folder depth by passing a single digit (e.g. 2).
|
|
268
|
+
* When passed a regex collapse to that pattern
|
|
269
|
+
*
|
|
270
|
+
* E.g. ^packages/[^/]+/ would collapse to modules/ folders directly under
|
|
271
|
+
* your packages folder.
|
|
272
|
+
*/
|
|
273
|
+
collapse?: string | number;
|
|
274
|
+
/**
|
|
275
|
+
* one of "json", "html", "dot", "csv" or "err". When left
|
|
276
|
+
* out the function will return a javascript object as dependencies
|
|
277
|
+
*/
|
|
278
|
+
outputType?: OutputType;
|
|
279
|
+
}
|