File tree 5 files changed +276
-34
lines changed
5 files changed +276
-34
lines changed Original file line number Diff line number Diff line change 47
47
"@inquirer/confirm" : " ^3.1.22" ,
48
48
"@inquirer/password" : " ^2.1.22" ,
49
49
"@oclif/core" : " ^4.0.15" ,
50
+ "@oclif/multi-stage-output" : " ^0.2.1" ,
50
51
"@salesforce/core" : " ^8.2.7" ,
51
52
"@salesforce/kit" : " ^3.2.1" ,
52
53
"@salesforce/ts-types" : " ^2.0.12" ,
Original file line number Diff line number Diff line change 8
8
export { toHelpSection , parseVarArgs } from './util.js' ;
9
9
export { Progress } from './ux/progress.js' ;
10
10
export { Spinner } from './ux/spinner.js' ;
11
+ export { MultiStageOutput } from './ux/multiStageOutput.js' ;
11
12
export { Ux } from './ux/ux.js' ;
12
13
export { StandardColors } from './ux/standardColors.js' ;
13
14
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright (c) 2024, salesforce.com, inc.
3
+ * All rights reserved.
4
+ * Licensed under the BSD 3-Clause license.
5
+ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
6
+ */
7
+
8
+ import { MultiStageOutput as OclifMultiStageOutput , MultiStageOutputOptions } from '@oclif/multi-stage-output' ;
9
+
10
+ /**
11
+ * This class is a light wrapper around MultiStageOutput that allows us to
12
+ * automatically suppress any actions if `--json` flag is present.
13
+ */
14
+ export class MultiStageOutput < T extends Record < string , unknown > > extends OclifMultiStageOutput < T > {
15
+ public constructor ( opts : MultiStageOutputOptions < T > & { outputEnabled : boolean } ) {
16
+ if ( opts . outputEnabled ) super ( opts ) ;
17
+ }
18
+ }
Original file line number Diff line number Diff line change 6
6
*/
7
7
8
8
import ansis from 'ansis' ;
9
- import { ux } from '@oclif/core' ;
9
+ import { ux } from '@oclif/core/ux ' ;
10
10
import { AnyJson } from '@salesforce/ts-types' ;
11
11
import terminalLink from 'terminal-link' ;
12
12
import { UxBase } from './base.js' ;
You can’t perform that action at this time.
0 commit comments