@snyk/cli-interface
Advanced tools
Comparing version 1.2.0 to 1.3.0
@@ -7,2 +7,7 @@ import { DepTree, ScannedProject, SupportedPackageManagers } from './common'; | ||
} | ||
export interface SingleSubprojectPlugin { | ||
inspect(root: string, targetFile?: string, options?: SingleSubprojectInspectOptions): Promise<SinglePackageResult>; | ||
pluginName(): string; | ||
} | ||
export declare function adaptSingleProjectPlugin(plugin: SingleSubprojectPlugin): Plugin; | ||
export interface BaseInspectOptions { | ||
@@ -9,0 +14,0 @@ dev?: boolean; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
function adaptSingleProjectPlugin(plugin) { | ||
return { inspect: (root, targetFile, options) => { | ||
if (options && isMultiSubProject(options)) { | ||
throw new Error(`Plugin ${plugin.pluginName()} does not support scanning multiple sub-projects`); | ||
} | ||
else { | ||
return plugin.inspect(root, targetFile, options); | ||
} | ||
} }; | ||
} | ||
exports.adaptSingleProjectPlugin = adaptSingleProjectPlugin; | ||
function isMultiSubProject(options) { | ||
@@ -4,0 +15,0 @@ return options.allSubProjects; |
@@ -28,3 +28,3 @@ { | ||
}, | ||
"version": "1.2.0" | ||
"version": "1.3.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
18139
136