Skip to content

Commit af10b81

Browse files
committed
feat: different approach
1 parent cb6a98d commit af10b81

File tree

3 files changed

+10
-19
lines changed

3 files changed

+10
-19
lines changed

src/exported.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
export { toHelpSection, parseVarArgs } from './util.js';
99
export { Progress } from './ux/progress.js';
1010
export { Spinner } from './ux/spinner.js';
11-
export { MultiStageOutput } from './ux/multiStageOutput.js';
1211
export { Ux } from './ux/ux.js';
1312
export { StandardColors } from './ux/standardColors.js';
1413

src/sfCommand.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import {
1717
StructuredMessage,
1818
} from '@salesforce/core';
1919
import type { AnyJson } from '@salesforce/ts-types';
20+
import { MultiStageOutput, MultiStageOutputOptions } from '@oclif/multi-stage-output';
2021
import { Progress } from './ux/progress.js';
2122
import { Spinner } from './ux/spinner.js';
2223
import { Ux } from './ux/ux.js';
@@ -314,6 +315,15 @@ export abstract class SfCommand<T> extends Command {
314315
return confirm({ message, ms, defaultAnswer });
315316
}
316317

318+
public initStager<O extends Record<string, unknown>>(options: MultiStageOutputOptions<O>): MultiStageOutput<O> {
319+
const ms = new MultiStageOutput<O>(options);
320+
if (this.jsonEnabled()) {
321+
ms.stop();
322+
}
323+
324+
return ms;
325+
}
326+
317327
public async _run<R>(): Promise<R> {
318328
['SIGINT', 'SIGTERM', 'SIGBREAK', 'SIGHUP'].map((listener) => {
319329
process.on(listener, () => {

src/ux/multiStageOutput.ts

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)