@@ -19,6 +19,7 @@ import {
1919import { Flags , SfCommand } from '@salesforce/sf-plugins-core' ;
2020import { Duration } from '@salesforce/kit' ;
2121import terminalLink from 'terminal-link' ;
22+ import { capitalCase } from 'change-case' ;
2223import { buildScratchOrgRequest } from '../../../shared/scratchOrgRequest.js' ;
2324import { ScratchCreateResponse } from '../../../shared/orgTypes.js' ;
2425
@@ -172,7 +173,9 @@ export default class OrgCreateScratch extends SfCommand<ScratchCreateResponse> {
172173 ) ;
173174
174175 const mso = new MultiStageOutput < ScratchOrgLifecycleEvent & { alias : string | undefined } > ( {
175- stages : flags . async ? [ 'prepare request' , 'send request' , 'done' ] : scratchOrgLifecycleStages ,
176+ stages : ( flags . async ? [ 'prepare request' , 'send request' , 'done' ] : scratchOrgLifecycleStages ) . map ( ( stage ) =>
177+ capitalCase ( stage )
178+ ) ,
176179 title : flags . async ? 'Creating Scratch Org (async)' : 'Creating Scratch Org' ,
177180 data : { alias : flags . alias } ,
178181 jsonEnabled : this . jsonEnabled ( ) ,
@@ -207,7 +210,7 @@ export default class OrgCreateScratch extends SfCommand<ScratchCreateResponse> {
207210 } ) ;
208211
209212 lifecycle . on < ScratchOrgLifecycleEvent > ( scratchOrgLifecycleEventName , async ( data ) : Promise < void > => {
210- mso . skipTo ( data . stage , data ) ;
213+ mso . skipTo ( capitalCase ( data . stage ) , data ) ;
211214 if ( data . stage === 'done' ) {
212215 mso . stop ( ) ;
213216 }
@@ -222,7 +225,7 @@ export default class OrgCreateScratch extends SfCommand<ScratchCreateResponse> {
222225 }
223226
224227 if ( flags . async ) {
225- mso . skipTo ( 'done ' , { scratchOrgInfo } ) ;
228+ mso . skipTo ( 'Done ' , { scratchOrgInfo } ) ;
226229 mso . stop ( ) ;
227230 this . info ( messages . getMessage ( 'action.resume' , [ this . config . bin , scratchOrgInfo . Id ] ) ) ;
228231 } else {
0 commit comments