Skip to content

Commit

Permalink
fix: type on event consumer for pvc
Browse files Browse the repository at this point in the history
@W-11633216@
  • Loading branch information
peternhale committed Aug 23, 2022
1 parent ea53915 commit e4200cc
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions src/commands/force/package/beta/version/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
getPackageIdFromAlias,
INSTALL_URL_BASE,
PackageVersion,
PackageVersionCreateEventData,
PackageVersionCreateReportProgress,
PackagingSObjects,
} from '@salesforce/packaging';
import Package2VersionStatus = PackagingSObjects.Package2VersionStatus;
Expand Down Expand Up @@ -159,17 +159,10 @@ export class PackageVersionCreateCommand extends SfdxCommand {
const frequency = this.flags.wait && this.flags.skipvalidation ? Duration.seconds(5) : Duration.seconds(30);
// no async methods
// eslint-disable-next-line @typescript-eslint/require-await
Lifecycle.getInstance().on('in-progress', async (data: PackageVersionCreateEventData) => {
if (
data.packageVersionCreateRequestResult.Status !== Package2VersionStatus.success &&
data.packageVersionCreateRequestResult.Status !== Package2VersionStatus.error
) {
Lifecycle.getInstance().on('in-progress', async (data: PackageVersionCreateReportProgress) => {
if (data.Status !== Package2VersionStatus.success && data.Status !== Package2VersionStatus.error) {
this.ux.log(
messages.getMessage('requestInProgress', [
frequency.seconds,
data.timeRemaining.seconds,
data.packageVersionCreateRequestResult.Status,
])
messages.getMessage('requestInProgress', [frequency.seconds, data.remainingWaitTime.seconds, data.Status])
);
}
});
Expand Down

0 comments on commit e4200cc

Please sign in to comment.