From 54b2ef15060465d4404b1447e058311f02d1af40 Mon Sep 17 00:00:00 2001 From: azlam-abdulsalam Date: Tue, 29 Mar 2022 10:36:21 +1100 Subject: [PATCH] refactor(install-package): fix for readability in artifact installation setter --- .../core/src/package/packageInstallers/InstallPackage.ts | 8 ++++---- packages/sfpowerscripts-cli/src/impl/deploy/DeployImpl.ts | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/core/src/package/packageInstallers/InstallPackage.ts b/packages/core/src/package/packageInstallers/InstallPackage.ts index 4a801e75d..31a3a6737 100644 --- a/packages/core/src/package/packageInstallers/InstallPackage.ts +++ b/packages/core/src/package/packageInstallers/InstallPackage.ts @@ -19,7 +19,7 @@ export abstract class InstallPackage { protected packageDescriptor; protected packageDirectory; protected org: SFPOrg; - private isArtifactToBeCommitted: boolean = true; + private _isArtifactToBeCommittedInOrg: boolean = true; public constructor( protected sfdxPackage: string, @@ -141,12 +141,12 @@ export abstract class InstallPackage { } //Set this to disable whethere info about the artifact has to be recorded in the org - public set disableArtifactCommit(disableArtifactCommit: boolean) { - this.isArtifactToBeCommitted = !disableArtifactCommit; + public set isArtifactToBeCommittedInOrg(toCommit: boolean) { + this._isArtifactToBeCommittedInOrg = toCommit; } private async commitPackageInstallationStatus() { - if (this.isArtifactToBeCommitted) { + if (this._isArtifactToBeCommittedInOrg) { try { await this.org.updateArtifactInOrg(this.logger, this.packageMetadata); } catch (error) { diff --git a/packages/sfpowerscripts-cli/src/impl/deploy/DeployImpl.ts b/packages/sfpowerscripts-cli/src/impl/deploy/DeployImpl.ts index 679d12b6c..cf2cba962 100644 --- a/packages/sfpowerscripts-cli/src/impl/deploy/DeployImpl.ts +++ b/packages/sfpowerscripts-cli/src/impl/deploy/DeployImpl.ts @@ -630,7 +630,7 @@ export default class DeployImpl { this.props.packageLogger, this.props.isDryRun ); - installUnlockedPackageImpl.disableArtifactCommit = this.props.disableArtifactCommit; + installUnlockedPackageImpl.isArtifactToBeCommittedInOrg = !this.props.disableArtifactCommit; return installUnlockedPackageImpl.exec(); } @@ -658,7 +658,7 @@ export default class DeployImpl { : DeploymentType.MDAPI_DEPLOY, this.props.isDryRun ); - installSourcePackageImpl.disableArtifactCommit = this.props.disableArtifactCommit; + installSourcePackageImpl.isArtifactToBeCommittedInOrg = !this.props.disableArtifactCommit; return installSourcePackageImpl.exec(); } @@ -679,7 +679,7 @@ export default class DeployImpl { LoggerLevel.INFO, this.props.isDryRun ); - installDataPackageImpl.disableArtifactCommit = this.props.disableArtifactCommit; + installDataPackageImpl.isArtifactToBeCommittedInOrg = !this.props.disableArtifactCommit; return installDataPackageImpl.exec(); }