55 * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
66 */
77import { Interfaces } from '@oclif/core' ;
8- import { Messages , Org } from '@salesforce/core' ;
9- import { Flags , SfCommand } from '@salesforce/sf-plugins-core' ;
8+ import { Messages } from '@salesforce/core' ;
9+ import { Flags as SfFlags , SfCommand } from '@salesforce/sf-plugins-core' ;
1010import { HttpRequest } from 'jsforce' ;
1111import { ApiPromoteResponse , AsyncOperationStatus , PipelineStage , PromoteOptions } from '..' ;
1212import { REST_PROMOTE_BASE_URL } from '../constants' ;
@@ -30,19 +30,20 @@ Messages.importMessagesDirectory(__dirname);
3030const messages = Messages . loadMessages ( '@salesforce/plugin-devops-center' , 'project.deploy.pipeline.quick' ) ;
3131
3232export default abstract class QuickPromotionCommand < T extends typeof SfCommand > extends AsyncCommand {
33+ public static readonly enableJsonFlag = true ;
3334 public static baseFlags = {
3435 async,
3536 concise,
3637 verbose,
3738 wait,
3839 'devops-center-username' : requiredDoceOrgFlag ( ) ,
39- 'job-id' : Flags . salesforceId ( {
40+ 'job-id' : SfFlags . salesforceId ( {
4041 char : 'i' ,
4142 description : messages . getMessage ( 'flags.job-id.description' ) ,
4243 summary : messages . getMessage ( 'flags.job-id.summary' ) ,
4344 exactlyOne : [ 'use-most-recent' , 'job-id' ] ,
4445 } ) ,
45- 'use-most-recent' : Flags . boolean ( {
46+ 'use-most-recent' : SfFlags . boolean ( {
4647 char : 'r' ,
4748 description : messages . getMessage ( 'flags.use-most-recent.description' ) ,
4849 summary : messages . getMessage ( 'flags.use-most-recent.summary' ) ,
@@ -59,9 +60,10 @@ export default abstract class QuickPromotionCommand<T extends typeof SfCommand>
5960 const { flags } = await this . parse ( {
6061 flags : this . ctor . flags ,
6162 baseFlags : ( super . ctor as typeof QuickPromotionCommand ) . baseFlags ,
63+ enableJsonFlag : this . ctor . enableJsonFlag ,
6264 } ) ;
6365 this . flags = flags as Flags < T > ;
64- this . targetOrg = this . flags [ 'devops-center-username' ] as Org ;
66+ this . targetOrg = this . flags [ 'devops-center-username' ] ;
6567 }
6668
6769 /**
@@ -79,7 +81,7 @@ export default abstract class QuickPromotionCommand<T extends typeof SfCommand>
7981 this . setOutputService (
8082 new OutputServiceFactory ( ) . forQuickDeployment (
8183 this . flags ,
82- ( this . flags [ 'devops-center-username' ] as Org ) . getConnection ( ) ,
84+ this . flags [ 'devops-center-username' ] . getConnection ( ) ,
8385 this . targetStage . sf_devops__Branch__r . sf_devops__Name__c
8486 )
8587 ) ;
0 commit comments