@oclif/multi-stage-output 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.d.ts CHANGED
@@ -1 +1 @@
1
- export { MultiStageOutput } from './multi-stage-output.js';
1
+ export { MultiStageOutput, MultiStageOutputOptions } from './multi-stage-output.js';
@@ -1,6 +1,6 @@
1
1
  import { KeyValuePair, SimpleMessage, StageInfoBlock } from './components/stages.js';
2
2
  import { Design } from './design.js';
3
- type MultiStageOutputOptions<T extends Record<string, unknown>> = {
3
+ export type MultiStageOutputOptions<T extends Record<string, unknown>> = {
4
4
  /**
5
5
  * Stages to render.
6
6
  */
@@ -41,12 +41,6 @@ type MultiStageOutputOptions<T extends Record<string, unknown>> = {
41
41
  * Data to display in the stages component. This data will be passed to the get function in the info object.
42
42
  */
43
43
  readonly data?: Partial<T>;
44
- /**
45
- * Whether JSON output is enabled. Defaults to false.
46
- *
47
- * Pass in this.jsonEnabled() from the command class to determine if JSON output is enabled.
48
- */
49
- readonly jsonEnabled: boolean;
50
44
  /**
51
45
  * Design options to customize the output.
52
46
  */
@@ -67,7 +61,7 @@ export declare class MultiStageOutput<T extends Record<string, unknown>> impleme
67
61
  private stopped;
68
62
  private readonly timerUnit?;
69
63
  private readonly title?;
70
- constructor({ data, design, jsonEnabled, postStagesBlock, preStagesBlock, showElapsedTime, showStageTime, stageSpecificBlock, stages, timerUnit, title, }: MultiStageOutputOptions<T>);
64
+ constructor({ data, design, postStagesBlock, preStagesBlock, showElapsedTime, showStageTime, stageSpecificBlock, stages, timerUnit, title, }: MultiStageOutputOptions<T>);
71
65
  goto(stage: string, data?: Partial<T>): void;
72
66
  next(data?: Partial<T>): void;
73
67
  stop(error?: Error): void;
@@ -78,4 +72,3 @@ export declare class MultiStageOutput<T extends Record<string, unknown>> impleme
78
72
  private generateStagesInput;
79
73
  private update;
80
74
  }
81
- export {};
@@ -144,7 +144,7 @@ export class MultiStageOutput {
144
144
  stopped = false;
145
145
  timerUnit;
146
146
  title;
147
- constructor({ data, design, jsonEnabled, postStagesBlock, preStagesBlock, showElapsedTime, showStageTime, stageSpecificBlock, stages, timerUnit, title, }) {
147
+ constructor({ data, design, postStagesBlock, preStagesBlock, showElapsedTime, showStageTime, stageSpecificBlock, stages, timerUnit, title, }) {
148
148
  this.data = data;
149
149
  this.design = constructDesignParams(design);
150
150
  this.stages = stages;
@@ -156,13 +156,10 @@ export class MultiStageOutput {
156
156
  this.timerUnit = timerUnit ?? 'ms';
157
157
  this.stageTracker = new StageTracker(stages);
158
158
  this.stageSpecificBlock = stageSpecificBlock;
159
- if (jsonEnabled)
160
- return;
161
159
  if (isInCi) {
162
160
  this.ciInstance = new CIMultiStageOutput({
163
161
  data,
164
162
  design,
165
- jsonEnabled,
166
163
  postStagesBlock,
167
164
  preStagesBlock,
168
165
  showElapsedTime,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@oclif/multi-stage-output",
3
3
  "description": "Terminal output for oclif commands with multiple stages",
4
- "version": "0.2.0",
4
+ "version": "0.2.1",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/oclif/multi-stage-output/issues",
7
7
  "dependencies": {