Skip to content

Commit e4200cc

Browse files
committed
fix: type on event consumer for pvc
@W-11633216@
1 parent ea53915 commit e4200cc

File tree

1 file changed

+4
-11
lines changed
  • src/commands/force/package/beta/version

1 file changed

+4
-11
lines changed

src/commands/force/package/beta/version/create.ts

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import {
1616
getPackageIdFromAlias,
1717
INSTALL_URL_BASE,
1818
PackageVersion,
19-
PackageVersionCreateEventData,
19+
PackageVersionCreateReportProgress,
2020
PackagingSObjects,
2121
} from '@salesforce/packaging';
2222
import Package2VersionStatus = PackagingSObjects.Package2VersionStatus;
@@ -159,17 +159,10 @@ export class PackageVersionCreateCommand extends SfdxCommand {
159159
const frequency = this.flags.wait && this.flags.skipvalidation ? Duration.seconds(5) : Duration.seconds(30);
160160
// no async methods
161161
// eslint-disable-next-line @typescript-eslint/require-await
162-
Lifecycle.getInstance().on('in-progress', async (data: PackageVersionCreateEventData) => {
163-
if (
164-
data.packageVersionCreateRequestResult.Status !== Package2VersionStatus.success &&
165-
data.packageVersionCreateRequestResult.Status !== Package2VersionStatus.error
166-
) {
162+
Lifecycle.getInstance().on('in-progress', async (data: PackageVersionCreateReportProgress) => {
163+
if (data.Status !== Package2VersionStatus.success && data.Status !== Package2VersionStatus.error) {
167164
this.ux.log(
168-
messages.getMessage('requestInProgress', [
169-
frequency.seconds,
170-
data.timeRemaining.seconds,
171-
data.packageVersionCreateRequestResult.Status,
172-
])
165+
messages.getMessage('requestInProgress', [frequency.seconds, data.remainingWaitTime.seconds, data.Status])
173166
);
174167
}
175168
});

0 commit comments

Comments
 (0)