( options: Options & (TestOptions | MonitorOptions), featureFlags: Set<string> = new Set<string>(), )
| 9 | * plugin-specific configuration injected. |
| 10 | */ |
| 11 | export async function buildPluginOptions( |
| 12 | options: Options & (TestOptions | MonitorOptions), |
| 13 | featureFlags: Set<string> = new Set<string>(), |
| 14 | ): Promise<Options & (TestOptions | MonitorOptions)> { |
| 15 | const pluginOptions: any = { ...options }; |
| 16 | |
| 17 | const isGoPackageManager = |
| 18 | options.packageManager === 'gomodules' || |
| 19 | options.packageManager === 'golangdep'; |
| 20 | |
| 21 | if (isGoPackageManager) { |
| 22 | pluginOptions.configuration = { |
| 23 | ...(pluginOptions.configuration || {}), |
| 24 | includeGoStandardLibraryDeps: featureFlags.has( |
| 25 | INCLUDE_GO_STANDARD_LIBRARY_DEPS_FEATURE_FLAG, |
| 26 | ), |
| 27 | includePackageUrls: !featureFlags.has( |
| 28 | DISABLE_GO_PACKAGE_URLS_IN_CLI_FEATURE_FLAG, |
| 29 | ), |
| 30 | // enable fix for replaced modules. |
| 31 | useReplaceName: true, |
| 32 | } as Options['configuration']; |
| 33 | } |
| 34 | |
| 35 | return pluginOptions; |
| 36 | } |
no outgoing calls
no test coverage detected