@oclif/multi-stage-output 0.4.3-dev.1 → 0.5.0

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/README.md CHANGED
@@ -23,7 +23,7 @@ You can see examples of how to use it in the [examples](./examples/) directory.
23
23
  You can run any of these with the following:
24
24
 
25
25
  ```
26
- node --loader=ts-node/esm examples/basic.ts
26
+ tsx examples/basic.ts
27
27
  ```
28
28
 
29
29
  # Usage
@@ -63,7 +63,7 @@ const ms = new MultiStageOutput<{message: string; staticValue: string; dynamicVa
63
63
  jsonEnabled: false,
64
64
  stages: ['stage 1', 'stage 2', 'stage 3'],
65
65
  // preStagesBlock will be displayed BEFORE the list of stages
66
- postStagesBlock: [
66
+ preStagesBlock: [
67
67
  {
68
68
  get: (data) => data?.message,
69
69
  type: 'message',
package/lib/design.d.ts CHANGED
@@ -40,6 +40,10 @@ export type Design = {
40
40
  * Icon to display for an async stage. Defaults to magenta '▶'
41
41
  */
42
42
  async?: IconProps;
43
+ /**
44
+ * Icon to display for a warning. Defaults to yellow '⚠'
45
+ */
46
+ warning?: IconProps;
43
47
  };
44
48
  title?: {
45
49
  /**
package/lib/design.js CHANGED
@@ -65,6 +65,13 @@ export function constructDesignParams(design) {
65
65
  paddingRight: 1,
66
66
  ...design?.icons?.skipped,
67
67
  },
68
+ warning: {
69
+ color: 'yellow',
70
+ figure: figures.warning,
71
+ paddingLeft: 0,
72
+ paddingRight: 0,
73
+ ...design?.icons?.warning,
74
+ },
68
75
  },
69
76
  spinners: {
70
77
  info: process.platform === 'win32' ? 'line' : 'arc',
@@ -1,4 +1,4 @@
1
- export type StageStatus = 'aborted' | 'async' | 'completed' | 'current' | 'failed' | 'paused' | 'pending' | 'skipped';
1
+ export type StageStatus = 'aborted' | 'async' | 'completed' | 'current' | 'failed' | 'paused' | 'pending' | 'skipped' | 'warning';
2
2
  export declare class StageTracker {
3
3
  private stages;
4
4
  current: string | undefined;
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.4.3-dev.1",
4
+ "version": "0.5.0",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/oclif/multi-stage-output/issues",
7
7
  "dependencies": {