1 | import { DepGraph } from '@snyk/dep-graph';
|
2 | import { legacyPlugin as api } from '@snyk/cli-interface';
|
3 | import { getGradleAttributesPretty } from './gradle-attributes-pretty';
|
4 | import { GradleGraph } from './graph';
|
5 | import type { CoordinateMap, PomCoords, Sha1Map, SnykHttpClient } from './types';
|
6 | export declare function debugLog(s: string): void;
|
7 | export interface GradleInspectOptions {
|
8 | 'configuration-matching'?: string;
|
9 | 'configuration-attributes'?: string;
|
10 | daemon?: boolean;
|
11 | initScript?: string;
|
12 | gradleNormalizeDeps?: boolean;
|
13 | }
|
14 | type Options = api.InspectOptions & GradleInspectOptions;
|
15 | type VersionBuildInfo = api.VersionBuildInfo;
|
16 | export declare function inspect(root: string, targetFile: string, options?: api.SingleSubprojectInspectOptions & GradleInspectOptions, snykHttpClient?: SnykHttpClient): Promise<api.SinglePackageResult>;
|
17 | export declare function inspect(root: string, targetFile: string, options: api.MultiSubprojectInspectOptions & GradleInspectOptions, snykHttpClient?: SnykHttpClient): Promise<api.MultiProjectResult>;
|
18 | export interface JsonDepsScriptResult {
|
19 | defaultProject: string;
|
20 | defaultProjectKey: string;
|
21 | projects: ProjectsDict;
|
22 | allSubProjectNames: string[];
|
23 | versionBuildInfo?: VersionBuildInfo;
|
24 | sha1Map?: Sha1Map;
|
25 | }
|
26 | interface ProjectsDict {
|
27 | [project: string]: GradleProjectInfo;
|
28 | }
|
29 | interface GradleProjectInfo {
|
30 | depGraph?: DepGraph;
|
31 | gradleGraph?: GradleGraph;
|
32 | targetFile: string;
|
33 | projectVersion: string;
|
34 | }
|
35 | declare function extractJsonFromScriptOutput(stdoutText: string): JsonDepsScriptResult;
|
36 | declare function getVersionBuildInfo(gradleVersionOutput: string): VersionBuildInfo | undefined;
|
37 | export declare function getGradleVersion(root: string, command: string, args?: string[]): Promise<string>;
|
38 | export declare function generateWrapperProcessArgs(commandPath: string, args: string[]): {
|
39 | command: string;
|
40 | args: string[];
|
41 | };
|
42 | declare function splitCoordinate(coordinate: string): Partial<PomCoords>;
|
43 | export declare function processProjectsInExtractedJSON(extractedJSON: JsonDepsScriptResult, coordinateMap?: CoordinateMap): Promise<JsonDepsScriptResult>;
|
44 | declare function toCamelCase(input: string): string;
|
45 | declare function buildArgs(root: string, targetFile: string | null, initGradlePath: string, options: Options, gradleVersion: string): string[];
|
46 | export declare const exportsForTests: {
|
47 | buildArgs: typeof buildArgs;
|
48 | extractJsonFromScriptOutput: typeof extractJsonFromScriptOutput;
|
49 | getVersionBuildInfo: typeof getVersionBuildInfo;
|
50 | toCamelCase: typeof toCamelCase;
|
51 | getGradleAttributesPretty: typeof getGradleAttributesPretty;
|
52 | splitCoordinate: typeof splitCoordinate;
|
53 | };
|
54 | export {};
|