UNPKG

snyk-gradle-plugin

Version:
43 lines (42 loc) 2.33 kB
import { DepGraph } from '@snyk/dep-graph'; import { legacyPlugin as api } from '@snyk/cli-interface'; import { getGradleAttributesPretty } from './gradle-attributes-pretty'; import { GradleGraph } from './graph'; import type { GradleInspectOptions, Sha1Map, SnykHttpClient } from './types'; import { CliOptions } from './types'; export declare function debugLog(s: string): void; type Options = api.InspectOptions & GradleInspectOptions & CliOptions; type VersionBuildInfo = api.VersionBuildInfo; export declare function inspect(root: string, targetFile: string, options?: api.SingleSubprojectInspectOptions & GradleInspectOptions & CliOptions, snykHttpClient?: SnykHttpClient): Promise<api.SinglePackageResult>; export declare function inspect(root: string, targetFile: string, options: api.MultiSubprojectInspectOptions & GradleInspectOptions & CliOptions, snykHttpClient?: SnykHttpClient): Promise<api.MultiProjectResult>; export interface JsonDepsScriptResult { defaultProject: string; defaultProjectKey: string; projects: ProjectsDict; allSubProjectNames: string[]; versionBuildInfo?: VersionBuildInfo; sha1Map?: Sha1Map; } interface ProjectsDict { [project: string]: GradleProjectInfo; } interface GradleProjectInfo { depGraph?: DepGraph; gradleGraph?: GradleGraph; targetFile: string; projectVersion: string; } declare function extractJsonFromScriptOutput(stdoutText: string): JsonDepsScriptResult; declare function getVersionBuildInfo(gradleVersionOutput: string): VersionBuildInfo | undefined; export declare function getGradleVersion(root: string, command: string, args?: string[]): Promise<string>; export declare function processProjectsInExtractedJSON(extractedJSON: JsonDepsScriptResult, verbose?: boolean, sha1Map?: Sha1Map): Promise<JsonDepsScriptResult>; declare function toCamelCase(input: string): string; declare function buildArgs(root: string, targetFile: string | null, initGradlePath: string, options: Options, gradleVersion: string): string[]; export declare const exportsForTests: { buildArgs: typeof buildArgs; extractJsonFromScriptOutput: typeof extractJsonFromScriptOutput; getVersionBuildInfo: typeof getVersionBuildInfo; toCamelCase: typeof toCamelCase; getGradleAttributesPretty: typeof getGradleAttributesPretty; }; export {};