1 | import { DepGraph } from '@snyk/dep-graph';
|
2 | import { legacyPlugin as api } from '@snyk/cli-interface';
|
3 | import { getGradleAttributesPretty } from './gradle-attributes-pretty';
|
4 | export interface GradleInspectOptions {
|
5 | 'configuration-matching'?: string;
|
6 | 'configuration-attributes'?: string;
|
7 | daemon?: boolean;
|
8 | reachableVulns?: boolean;
|
9 | callGraphBuilderTimeout?: number;
|
10 | initScript?: string;
|
11 | gradleAcceptLegacyConfigRoles?: boolean;
|
12 | }
|
13 | declare type Options = api.InspectOptions & GradleInspectOptions;
|
14 | declare type VersionBuildInfo = api.VersionBuildInfo;
|
15 | export declare function inspect(root: string, targetFile: string, options?: api.SingleSubprojectInspectOptions & GradleInspectOptions): Promise<api.SinglePackageResult>;
|
16 | export declare function inspect(root: string, targetFile: string, options: api.MultiSubprojectInspectOptions & GradleInspectOptions): Promise<api.MultiProjectResult>;
|
17 | export interface JsonDepsScriptResult {
|
18 | defaultProject: string;
|
19 | projects: ProjectsDict;
|
20 | allSubProjectNames: string[];
|
21 | versionBuildInfo?: VersionBuildInfo;
|
22 | }
|
23 | interface SnykGraph {
|
24 | name: string;
|
25 | version: string;
|
26 | parentIds: string[];
|
27 | }
|
28 | interface ProjectsDict {
|
29 | [project: string]: GradleProjectInfo;
|
30 | }
|
31 | interface GradleProjectInfo {
|
32 | depGraph?: DepGraph;
|
33 | snykGraph?: {
|
34 | [name: string]: SnykGraph;
|
35 | };
|
36 | targetFile: string;
|
37 | projectVersion: string;
|
38 | }
|
39 | declare function extractJsonFromScriptOutput(stdoutText: string): JsonDepsScriptResult;
|
40 | export declare function buildGraph(snykGraph: {
|
41 | [dependencyId: string]: SnykGraph;
|
42 | }, projectName: string, projectVersion: string): Promise<DepGraph>;
|
43 | declare function getPluginFileName(options: Options): string;
|
44 | declare function getVersionBuildInfo(gradleVersionOutput: string): VersionBuildInfo | undefined;
|
45 | export declare function processProjectsInExtractedJSON(root: string, extractedJSON: JsonDepsScriptResult): Promise<JsonDepsScriptResult>;
|
46 | declare function toCamelCase(input: string): string;
|
47 | export declare function formatArgWithWhiteSpace(arg: string): string;
|
48 | declare function buildArgs(root: string, targetFile: string | null, initGradlePath: string, options: Options): string[];
|
49 | export declare const exportsForTests: {
|
50 | buildArgs: typeof buildArgs;
|
51 | extractJsonFromScriptOutput: typeof extractJsonFromScriptOutput;
|
52 | getVersionBuildInfo: typeof getVersionBuildInfo;
|
53 | toCamelCase: typeof toCamelCase;
|
54 | getGradleAttributesPretty: typeof getGradleAttributesPretty;
|
55 | getPluginFileName: typeof getPluginFileName;
|
56 | };
|
57 | export {};
|