11/*
2- * Copyright 2025 , Salesforce, Inc.
2+ * Copyright 2026 , Salesforce, Inc.
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License");
55 * you may not use this file except in compliance with the License.
@@ -69,7 +69,6 @@ export class PackageBundlesCreate extends SfCommand<BundleSObjects.PackageBundle
6969 } ) ,
7070 } ;
7171
72-
7372 public async run ( ) : Promise < BundleSObjects . PackageBundleVersionCreateRequestResult > {
7473 const { flags } = await this . parse ( PackageBundlesCreate ) ;
7574
@@ -98,7 +97,10 @@ export class PackageBundlesCreate extends SfCommand<BundleSObjects.PackageBundle
9897 // no async methods
9998 // eslint-disable-next-line @typescript-eslint/require-await
10099 async ( data : BundleSObjects . PackageBundleVersionCreateRequestResult & { remainingWaitTime : Duration } ) => {
101- if ( data . RequestStatus !== BundleSObjects . PkgBundleVersionCreateReqStatus . success && data . RequestStatus !== BundleSObjects . PkgBundleVersionCreateReqStatus . error ) {
100+ if (
101+ data . RequestStatus !== BundleSObjects . PkgBundleVersionCreateReqStatus . success &&
102+ data . RequestStatus !== BundleSObjects . PkgBundleVersionCreateReqStatus . error
103+ ) {
102104 const status = messages . getMessage ( 'bundleVersionCreateWaitingStatus' , [
103105 data . remainingWaitTime . minutes ,
104106 data . RequestStatus ,
@@ -123,7 +125,7 @@ export class PackageBundlesCreate extends SfCommand<BundleSObjects.PackageBundle
123125 result = await PackageBundleVersion . create ( {
124126 ...options ,
125127 ...( flags . wait && flags . wait > 0
126- ? { polling : { timeout : Duration . minutes ( flags . wait ) , frequency : Duration . seconds ( 5 ) } }
128+ ? { polling : { timeout : Duration . minutes ( flags . wait ) , frequency : Duration . seconds ( 5 ) } }
127129 : undefined ) ,
128130 } ) ;
129131 } catch ( error ) {
@@ -152,9 +154,8 @@ export class PackageBundlesCreate extends SfCommand<BundleSObjects.PackageBundle
152154 errorMessages . push ( result . ValidationError ) ;
153155 }
154156
155- const errorText = errorMessages . length > 0
156- ? errorMessages . join ( '\n' )
157- : 'Unknown error occurred during bundle version creation' ;
157+ const errorText =
158+ errorMessages . length > 0 ? errorMessages . join ( '\n' ) : 'Unknown error occurred during bundle version creation' ;
158159
159160 throw messages . createError ( 'multipleErrors' , [ errorText ] ) ;
160161 }
@@ -169,5 +170,4 @@ export class PackageBundlesCreate extends SfCommand<BundleSObjects.PackageBundle
169170 }
170171 return result ;
171172 }
172-
173173}
0 commit comments