File tree 2 files changed +16
-6
lines changed
2 files changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -76,10 +76,10 @@ export default class DataSeedingGenerate extends SfCommand<DataSeedingGenerateRe
76
76
77
77
// TODO: Cache the jobId so that it can be used by the `--use-most-recent` flag
78
78
79
- const mso = getSeedGenerateMso ( this . jsonEnabled ( ) ) ;
80
- mso . updateData ( { jobId, sourceOrg, targetOrg } ) ;
81
-
82
79
if ( wait && ! async ) {
80
+ const mso = getSeedGenerateMso ( { jsonEnabled : this . jsonEnabled ( ) } ) ;
81
+ mso . updateData ( { jobId, sourceOrg, targetOrg } ) ;
82
+
83
83
const options : PollingClient . Options = {
84
84
poll : async ( ) : Promise < StatusResult > => {
85
85
const response = await pollSeedStatus ( jobId ) ;
@@ -140,9 +140,18 @@ export default class DataSeedingGenerate extends SfCommand<DataSeedingGenerateRe
140
140
} else {
141
141
const response = await pollSeedStatus ( jobId ) ;
142
142
143
+ const mso = getSeedGenerateMso ( {
144
+ jsonEnabled : this . jsonEnabled ( ) ,
145
+ showElapsedTime : false ,
146
+ showStageTime : false
147
+ } ) ;
148
+
143
149
mso . goto ( response . step ) ;
144
150
145
151
mso . updateData ( {
152
+ jobId,
153
+ sourceOrg,
154
+ targetOrg,
146
155
startTime : response . execution_start_time ,
147
156
status : 'Initiated'
148
157
} )
Original file line number Diff line number Diff line change 5
5
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
6
6
*/
7
7
8
- import { MultiStageOutput } from '@oclif/multi-stage-output' ;
8
+ import { MultiStageOutput , MultiStageOutputOptions } from '@oclif/multi-stage-output' ;
9
9
import { StandardColors } from '@salesforce/sf-plugins-core' ;
10
10
11
11
type SeedGenerateMsoData = {
@@ -17,7 +17,7 @@ type SeedGenerateMsoData = {
17
17
status ?: string ;
18
18
} ;
19
19
20
- export const getSeedGenerateMso = ( jsonEnabled : boolean = false ) => new MultiStageOutput < SeedGenerateMsoData > ( {
20
+ export const getSeedGenerateMso = ( overrides : Partial < MultiStageOutputOptions < SeedGenerateMsoData > > = { } ) => new MultiStageOutput ( {
21
21
preStagesBlock : [
22
22
{
23
23
get : ( data ) => data ?. jobId ,
@@ -65,12 +65,13 @@ export const getSeedGenerateMso = (jsonEnabled: boolean = false) => new MultiSta
65
65
label : 'End Time' ,
66
66
}
67
67
] ,
68
- jsonEnabled,
68
+ jsonEnabled : false ,
69
69
stages : [
70
70
'Querying source org' ,
71
71
'Data generation' ,
72
72
'Populating target org' ,
73
73
'Pipeline Finished' ,
74
74
] ,
75
75
title : 'Data Seed Generation' ,
76
+ ...overrides ,
76
77
} ) ;
You can’t perform that action at this time.
0 commit comments