diff --git a/.vscode/settings.json b/.vscode/settings.json index eef0b9cb..da5515c5 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -16,7 +16,7 @@ "**/build/azure-pipelines/**/*.yml": "azure-pipelines" }, "editor.codeActionsOnSave": { - "source.fixAll.eslint": true + "source.fixAll.eslint": "explicit" }, "eslint.validate": ["javascript", "typescript"], diff --git a/packages/node/vrdt-common/src/platform/BaseConfiguration.ts b/packages/node/vrdt-common/src/platform/BaseConfiguration.ts index a8765619..b6db71b7 100644 --- a/packages/node/vrdt-common/src/platform/BaseConfiguration.ts +++ b/packages/node/vrdt-common/src/platform/BaseConfiguration.ts @@ -22,20 +22,19 @@ export abstract class BaseConfiguration { return this.getActiveProfileImpl() } - get pluginSettings(): VrealizeSettings { - return this.vrdev - } - private getActiveProfileImpl(): MavenProfileWrapper { const profileName = this.vrdev.maven.profile if (!profileName) { throw new Error("There is no currently active maven profile. Set the 'vrdev.maven.profile' setting") } + if (!this.allProfiles) { throw new Error("There are no vRO profiles in ~/.m2/settings.xml") } + const profile = this.allProfiles[profileName] + if (!profile) { throw new Error(`Could not find profile '${profileName}' in ~/.m2/settings.xml`) } diff --git a/packages/node/vrdt-common/src/rest/VroRestClient.ts b/packages/node/vrdt-common/src/rest/VroRestClient.ts index 45b1ed15..1147f2cf 100644 --- a/packages/node/vrdt-common/src/rest/VroRestClient.ts +++ b/packages/node/vrdt-common/src/rest/VroRestClient.ts @@ -43,7 +43,7 @@ export class VroRestClient { constructor(private settings: BaseConfiguration) { this.auth = this.getInitialAuth() - this.isCachingEnabled = this.settings?.pluginSettings?.vro?.inventory?.cache ?? false + this.isCachingEnabled = this.settings?.vrdev?.vro?.inventory?.cache ?? false } private get hostname(): string {