UNPKG

1.01 kBTypeScriptView Raw
1import { DepGraph } from '@snyk/dep-graph';
2export interface DepDict {
3 [name: string]: DepTree;
4}
5export interface DepTree {
6 name: string;
7 version?: string;
8 dependencies?: DepDict;
9 packageFormatVersion?: string;
10 _counts?: any;
11 _isProjSubpkg?: boolean;
12}
13interface Options {
14 debug?: boolean;
15 file?: string;
16 args?: string[];
17}
18export declare function inspect(root: any, targetFile: any, options?: Options): Promise<{
19 plugin: {
20 name: string;
21 runtime: string | undefined;
22 targetFile: any;
23 };
24 dependencyGraph: DepGraph | undefined;
25 package?: undefined;
26} | {
27 plugin: {
28 name: string;
29 runtime: string | undefined;
30 targetFile: any;
31 };
32 package: DepTree | undefined;
33 dependencyGraph?: undefined;
34}>;
35export declare function buildDepGraphFromImportsAndModules(root?: string, targetFile?: string, additionalArgs?: string[]): Promise<DepGraph>;
36export declare function jsonParse(s: string): any;
37export {};