@snyk/cli-interface
Advanced tools
Comparing version 1.1.0 to 1.2.0
@@ -15,2 +15,9 @@ export interface DepTreeDep { | ||
}; | ||
labels?: { | ||
[key: string]: string; | ||
}; | ||
targetFile?: string; | ||
policy?: string; | ||
docker?: any; | ||
files?: any; | ||
} | ||
@@ -22,1 +29,2 @@ export interface ScannedProject { | ||
} | ||
export declare type SupportedPackageManagers = 'rubygems' | 'npm' | 'yarn' | 'maven' | 'pip' | 'sbt' | 'gradle' | 'golangdep' | 'govendor' | 'gomodules' | 'nuget' | 'paket' | 'composer'; |
@@ -1,6 +0,6 @@ | ||
import { DepTree, ScannedProject } from './common'; | ||
export interface Inspect { | ||
async(root: string, targetFile: string, options?: SingleRootInspectOptions): Promise<SinglePackageResult>; | ||
async(root: string, targetFile: string, options?: MultiRootsInspectOptions): Promise<MultiProjectResult>; | ||
async(root: string, targetFile: string, options?: SingleRootInspectOptions | MultiRootsInspectOptions): Promise<SinglePackageResult | MultiProjectResult>; | ||
import { DepTree, ScannedProject, SupportedPackageManagers } from './common'; | ||
export interface Plugin { | ||
inspect(root: string, targetFile?: string, options?: SingleSubprojectInspectOptions): Promise<SinglePackageResult>; | ||
inspect(root: string, targetFile?: string, options?: MultiSubprojectInspectOptions): Promise<MultiProjectResult>; | ||
inspect(root: string, targetFile?: string, options?: InspectOptions): Promise<InspectResult>; | ||
} | ||
@@ -11,8 +11,11 @@ export interface BaseInspectOptions { | ||
} | ||
export interface SingleRootInspectOptions extends BaseInspectOptions { | ||
export interface SingleSubprojectInspectOptions extends BaseInspectOptions { | ||
subProject?: string; | ||
} | ||
export interface MultiRootsInspectOptions extends BaseInspectOptions { | ||
export interface MultiSubprojectInspectOptions extends BaseInspectOptions { | ||
allSubProjects: true; | ||
} | ||
export declare type InspectOptions = SingleSubprojectInspectOptions | MultiSubprojectInspectOptions; | ||
export declare type InspectResult = SinglePackageResult | MultiProjectResult; | ||
export declare function isMultiSubProject(options: InspectOptions): options is MultiSubprojectInspectOptions; | ||
export interface PluginMetadata { | ||
@@ -22,5 +25,8 @@ name: string; | ||
targetFile?: string; | ||
meta: { | ||
packageManager?: SupportedPackageManagers; | ||
meta?: { | ||
allSubProjectNames?: string[]; | ||
}; | ||
dockerImageId?: any; | ||
imageLayers?: any; | ||
} | ||
@@ -35,1 +41,2 @@ export interface SinglePackageResult { | ||
} | ||
export declare function isMultiResult(res: InspectResult): res is MultiProjectResult; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
function isMultiSubProject(options) { | ||
return options.allSubProjects; | ||
} | ||
exports.isMultiSubProject = isMultiSubProject; | ||
function isMultiResult(res) { | ||
return !!res.scannedProjects; | ||
} | ||
exports.isMultiResult = isMultiResult; | ||
//# sourceMappingURL=plugin.js.map |
@@ -28,3 +28,3 @@ { | ||
}, | ||
"version": "1.1.0" | ||
"version": "1.2.0" | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17061
120