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 | targetRuntime?: string;
|
31 | targetFile?: string;
|
32 | packageManager?: SupportedPackageManagers;
|
33 | meta?: {
|
34 | allSubProjectNames?: string[];
|
35 | versionBuildInfo?: VersionBuildInfo;
|
36 | targetFile?: string;
|
37 | };
|
38 | dockerImageId?: any;
|
39 | imageLayers?: any;
|
40 | packageFormatVersion?: string;
|
41 | }
|
42 | export interface VersionBuildInfo {
|
43 | gradleVersion?: string;
|
44 | metaBuildVersion: {
|
45 | [index: string]: string;
|
46 | };
|
47 | }
|
48 | export interface SinglePackageResult {
|
49 | plugin: PluginMetadata;
|
50 | package?: DepTree;
|
51 | dependencyGraph?: DepGraph;
|
52 | callGraph?: CallGraphResult;
|
53 | meta?: {
|
54 | gradleProjectName?: string;
|
55 | versionBuildInfo?: VersionBuildInfo;
|
56 | };
|
57 | }
|
58 | export interface MultiProjectResult {
|
59 | plugin: PluginMetadata;
|
60 | scannedProjects: ScannedProject[];
|
61 | }
|
62 | export declare function isMultiResult(res: InspectResult): res is MultiProjectResult;
|