@@ -10,39 +10,39 @@ import { getTelemetryId } from './redhatTelemetry';
1010 * Represents the configuration settings for the extension.
1111 */
1212class Config {
13- telemetryId : string ;
14- stackAnalysisCommand : string ;
15- trackRecommendationAcceptanceCommand : string ;
16- recommendationsEnabled : boolean ;
17- utmSource : string ;
18- exhortProxyUrl : string ;
19- matchManifestVersions : string ;
20- usePythonVirtualEnvironment : string ;
21- useGoMVS : string ;
22- enablePythonBestEffortsInstallation : string ;
23- usePipDepTree : string ;
24- vulnerabilityAlertSeverity : string ;
25- exhortMvnPath : string ;
26- exhortPreferMvnw : string ;
27- exhortGradlePath : string ;
28- exhortPreferGradlew : string ;
29- exhortNpmPath : string ;
30- exhortPnpmPath : string ;
31- exhortYarnPath : string ;
32- exhortGoPath : string ;
33- exhortPython3Path : string ;
34- exhortPip3Path : string ;
35- exhortPythonPath : string ;
36- exhortPipPath : string ;
37- rhdaReportFilePath : string ;
38- secrets : vscode . SecretStorage ;
39- exhortSyftPath : string ;
40- exhortSyftConfigPath : string ;
41- exhortSkopeoPath : string ;
42- exhortSkopeoConfigPath : string ;
43- exhortDockerPath : string ;
44- exhortPodmanPath : string ;
45- exhortImagePlatform : string ;
13+ telemetryId : string | undefined ;
14+ stackAnalysisCommand ! : string ;
15+ trackRecommendationAcceptanceCommand ! : string ;
16+ recommendationsEnabled ! : boolean ;
17+ utmSource ! : string ;
18+ exhortProxyUrl ! : string ;
19+ matchManifestVersions ! : string ;
20+ usePythonVirtualEnvironment ! : string ;
21+ useGoMVS ! : string ;
22+ enablePythonBestEffortsInstallation ! : string ;
23+ usePipDepTree ! : string ;
24+ vulnerabilityAlertSeverity ! : string ;
25+ exhortMvnPath ! : string ;
26+ exhortPreferMvnw ! : string ;
27+ exhortGradlePath ! : string ;
28+ exhortPreferGradlew ! : string ;
29+ exhortNpmPath ! : string ;
30+ exhortPnpmPath ! : string ;
31+ exhortYarnPath ! : string ;
32+ exhortGoPath ! : string ;
33+ exhortPython3Path ! : string ;
34+ exhortPip3Path ! : string ;
35+ exhortPythonPath ! : string ;
36+ exhortPipPath ! : string ;
37+ rhdaReportFilePath ! : string ;
38+ secrets ! : vscode . SecretStorage ;
39+ exhortSyftPath ! : string ;
40+ exhortSyftConfigPath ! : string ;
41+ exhortSkopeoPath ! : string ;
42+ exhortSkopeoConfigPath ! : string ;
43+ exhortDockerPath ! : string ;
44+ exhortPodmanPath ! : string ;
45+ exhortImagePlatform ! : string ;
4646
4747 private readonly DEFAULT_MVN_EXECUTABLE = 'mvn' ;
4848 private readonly DEFAULT_GRADLE_EXECUTABLE = 'gradle' ;
@@ -208,7 +208,7 @@ class Config {
208208 * Links the secret storage to the configuration object.
209209 * @param context The extension context.
210210 */
211- linkToSecretStorage ( context ) {
211+ linkToSecretStorage ( context : { secrets : vscode . SecretStorage } ) {
212212 this . secrets = context . secrets ;
213213 }
214214
@@ -224,7 +224,7 @@ class Config {
224224 await this . secrets . store ( SNYK_TOKEN_KEY , token ) ;
225225 vscode . window . showInformationMessage ( 'Snyk token has been saved successfully' ) ;
226226 } catch ( error ) {
227- vscode . window . showErrorMessage ( `Failed to save Snyk token to VSCode Secret Storage, Error: ${ error . message } ` ) ;
227+ vscode . window . showErrorMessage ( `Failed to save Snyk token to VSCode Secret Storage, Error: ${ ( error as Error ) . message } ` ) ;
228228 }
229229 }
230230
@@ -237,7 +237,7 @@ class Config {
237237 const token = await this . secrets . get ( SNYK_TOKEN_KEY ) ;
238238 return token || '' ;
239239 } catch ( error ) {
240- vscode . window . showErrorMessage ( `Failed to get Snyk token from VSCode Secret Storage, Error: ${ error . message } ` ) ;
240+ vscode . window . showErrorMessage ( `Failed to get Snyk token from VSCode Secret Storage, Error: ${ ( error as Error ) . message } ` ) ;
241241 await this . clearSnykToken ( false ) ;
242242 return '' ;
243243 }
@@ -254,7 +254,7 @@ class Config {
254254 vscode . window . showInformationMessage ( 'Snyk token has been removed successfully' ) ;
255255 }
256256 } catch ( error ) {
257- const errorMsg = `Failed to delete Snyk token from VSCode Secret Storage, Error: ${ error . message } ` ;
257+ const errorMsg = `Failed to delete Snyk token from VSCode Secret Storage, Error: ${ ( error as Error ) . message } ` ;
258258 if ( notify ) {
259259 vscode . window . showErrorMessage ( errorMsg ) ;
260260 } else {
0 commit comments