( root: string, options: Options & (TestOptions | MonitorOptions), targetFile?: string, featureFlags: Set<string> = new Set<string>(), )
| 12 | } from '../feature-flags'; |
| 13 | |
| 14 | export async function getSinglePluginResult( |
| 15 | root: string, |
| 16 | options: Options & (TestOptions | MonitorOptions), |
| 17 | targetFile?: string, |
| 18 | featureFlags: Set<string> = new Set<string>(), |
| 19 | ): Promise<pluginApi.InspectResult> { |
| 20 | const plugin: types.Plugin = plugins.loadPlugin(options.packageManager); |
| 21 | const moduleInfo = ModuleInfo(plugin, options.policy); |
| 22 | |
| 23 | // Build final options with any ecosystem-specific configurations/flags injected |
| 24 | const pluginOptions = await buildPluginOptions(options, featureFlags); |
| 25 | |
| 26 | const inspectRes: pluginApi.InspectResult = await moduleInfo.inspect( |
| 27 | root, |
| 28 | targetFile || options.file, |
| 29 | { |
| 30 | ...pluginOptions, |
| 31 | showMavenBuildScope: featureFlags.has(SHOW_MAVEN_BUILD_SCOPE), |
| 32 | showNpmScope: featureFlags.has(SHOW_NPM_SCOPE), |
| 33 | cliDotnetRuntimeResolutionEnabled: featureFlags.has( |
| 34 | CLI_DOTNET_RUNTIME_RESOLUTION, |
| 35 | ), |
| 36 | }, |
| 37 | snykHttpClient, |
| 38 | ); |
| 39 | return inspectRes; |
| 40 | } |
no test coverage detected