|
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 | import os from 'node:os'; |
8 | | -import chalk, { ChalkInstance } from 'chalk'; |
| 8 | +import ansis, { type Ansis } from 'ansis'; |
9 | 9 | import { StandardColors } from '@salesforce/sf-plugins-core'; |
10 | 10 | import { SfError } from '@salesforce/core'; |
11 | 11 |
|
12 | 12 | const compareStages = ([, aValue]: [string, StageAttributes], [, bValue]: [string, StageAttributes]): number => |
13 | 13 | aValue.index - bValue.index; |
14 | 14 |
|
15 | | -export const boldPurple = chalk.rgb(157, 129, 221).bold; |
| 15 | +export const boldPurple = ansis.rgb(157, 129, 221).bold; |
16 | 16 |
|
17 | 17 | export type State = 'inProgress' | 'completed' | 'failed' | 'unknown'; |
18 | 18 |
|
19 | 19 | export type StageAttributes = { |
20 | 20 | state: State; |
21 | 21 | char: string; |
22 | | - color: ChalkInstance; |
| 22 | + color: Ansis; |
23 | 23 | index: number; |
24 | 24 | visited: boolean; |
25 | 25 | }; |
26 | 26 |
|
27 | 27 | export const StateConstants: { [stage: string]: Omit<StageAttributes, 'index'> } = { |
28 | 28 | inProgress: { color: boldPurple, char: '…', visited: false, state: 'inProgress' }, |
29 | 29 | completed: { color: StandardColors.success, char: '✓', visited: false, state: 'completed' }, |
30 | | - failed: { color: chalk.bold.red, char: '✖', visited: false, state: 'failed' }, |
31 | | - unknown: { color: chalk.dim, char: '…', visited: false, state: 'unknown' }, |
| 30 | + failed: { color: ansis.bold.red, char: '✖', visited: false, state: 'failed' }, |
| 31 | + unknown: { color: ansis.dim, char: '…', visited: false, state: 'unknown' }, |
32 | 32 | }; |
33 | 33 |
|
34 | 34 | export type Stage = { |
|
0 commit comments