1 | import { CallGraphResult, DepGraph, DepTree, ScannedProject, SupportedPackageManagers } from './common';
|
2 | export interface SingleSubprojectPlugin {
|
3 | inspect(root: string, targetFile?: string, options?: SingleSubprojectInspectOptions): Promise<SinglePackageResult>;
|
4 | pluginName?(): string;
|
5 | }
|
6 | export interface Plugin extends SingleSubprojectPlugin {
|
7 | inspect(root: string, targetFile?: string, options?: InspectOptions): Promise<InspectResult>;
|
8 | inspect(root: string, targetFile?: string, options?: SingleSubprojectInspectOptions): Promise<SinglePackageResult>;
|
9 | inspect(root: string, targetFile: string | undefined, options: MultiSubprojectInspectOptions): Promise<MultiProjectResult>;
|
10 | }
|
11 | export declare function adaptSingleProjectPlugin(plugin: SingleSubprojectPlugin): Plugin;
|
12 | export interface BaseInspectOptions {
|
13 | dev?: boolean;
|
14 | skipUnresolved?: boolean;
|
15 | args?: string[];
|
16 | useDepGraph?: boolean;
|
17 | }
|
18 | export interface SingleSubprojectInspectOptions extends BaseInspectOptions {
|
19 | subProject?: string;
|
20 | }
|
21 | export interface MultiSubprojectInspectOptions extends BaseInspectOptions {
|
22 | allSubProjects: true;
|
23 | }
|
24 | export declare type InspectOptions = SingleSubprojectInspectOptions | MultiSubprojectInspectOptions;
|
25 | export declare type InspectResult = SinglePackageResult | MultiProjectResult;
|
26 | export declare function isMultiSubProject(options: InspectOptions): options is MultiSubprojectInspectOptions;
|
27 | export interface PluginMetadata {
|
28 | name: string;
|
29 | runtime?: string;
|
30 | targetFile?: string;
|
31 | packageManager?: SupportedPackageManagers;
|
32 | meta?: {
|
33 | allSubProjectNames?: string[];
|
34 | versionBuildInfo?: VersionBuildInfo;
|
35 | targetFile?: string;
|
36 | };
|
37 | dockerImageId?: any;
|
38 | imageLayers?: any;
|
39 | packageFormatVersion?: string;
|
40 | }
|
41 | export interface VersionBuildInfo {
|
42 | gradleVersion?: string;
|
43 | metaBuildVersion: {
|
44 | [index: string]: string;
|
45 | };
|
46 | }
|
47 | export interface SinglePackageResult {
|
48 | plugin: PluginMetadata;
|
49 | package?: DepTree;
|
50 | dependencyGraph?: DepGraph;
|
51 | callGraph?: CallGraphResult;
|
52 | meta?: {
|
53 | gradleProjectName?: string;
|
54 | versionBuildInfo?: VersionBuildInfo;
|
55 | };
|
56 | }
|
57 | export interface MultiProjectResult {
|
58 | plugin: PluginMetadata;
|
59 | scannedProjects: ScannedProject[];
|
60 | }
|
61 | export declare function isMultiResult(res: InspectResult): res is MultiProjectResult;
|