Skip to content

Commit 484a28c

Browse files
authored
Merge pull request #53 from salesforcecli/phale/W-11633216
fix: type on event consumer for pvc
2 parents c4fd20c + d6d508a commit 484a28c

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;
@@ -157,17 +157,10 @@ export class PackageVersionCreateCommand extends SfdxCommand {
157157
const frequency = this.flags.wait && this.flags.skipvalidation ? Duration.seconds(5) : Duration.seconds(30);
158158
// no async methods
159159
// eslint-disable-next-line @typescript-eslint/require-await
160-
Lifecycle.getInstance().on('in-progress', async (data: PackageVersionCreateEventData) => {
161-
if (
162-
data.packageVersionCreateRequestResult.Status !== Package2VersionStatus.success &&
163-
data.packageVersionCreateRequestResult.Status !== Package2VersionStatus.error
164-
) {
160+
Lifecycle.getInstance().on('in-progress', async (data: PackageVersionCreateReportProgress) => {
161+
if (data.Status !== Package2VersionStatus.success && data.Status !== Package2VersionStatus.error) {
165162
this.ux.log(
166-
messages.getMessage('requestInProgress', [
167-
frequency.seconds,
168-
data.timeRemaining.seconds,
169-
data.packageVersionCreateRequestResult.Status,
170-
])
163+
messages.getMessage('requestInProgress', [frequency.seconds, data.remainingWaitTime.seconds, data.Status])
171164
);
172165
}
173166
});

0 commit comments

Comments
 (0)