Skip to content

Commit c84004c

Browse files
committed
Remove direct chalk dependency
1 parent 2b33752 commit c84004c

3 files changed

Lines changed: 6 additions & 9 deletions

File tree

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@
5555
"@napi-rs/keyring": "^1.2.0",
5656
"axios": "^1.13.6",
5757
"cac": "^7.0.0",
58-
"chalk": "^5.6.2",
5958
"cli-table3": "^0.6.5",
6059
"dayjs": "^1.11.20",
6160
"mime-types": "^3.0.2",

pnpm-lock.yaml

Lines changed: 0 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/utils/output.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import chalk from "chalk";
1+
import { styleText } from "node:util";
2+
23
import Table from "cli-table3";
34

45
export interface ExecutionTarget {
@@ -25,17 +26,17 @@ export function printExecutionTarget(target: ExecutionTarget, json = false): voi
2526
return;
2627
}
2728

28-
const badge = chalk.bold.black.bgCyan(" TARGET ");
29-
const location = chalk.bold.cyanBright(target.baseUrl);
29+
const badge = styleText(["bold", "black", "bgCyan"], " TARGET ");
30+
const location = styleText(["bold", "cyanBright"], target.baseUrl);
3031

3132
if (target.profileName) {
3233
process.stdout.write(
33-
`${badge} ${chalk.dim("profile")} ${chalk.bold.white(target.profileName)} ${chalk.dim("->")} ${location}\n\n`,
34+
`${badge} ${styleText("dim", "profile")} ${styleText(["bold", "white"], target.profileName)} ${styleText("dim", "->")} ${location}\n\n`,
3435
);
3536
return;
3637
}
3738

38-
process.stdout.write(`${badge} ${chalk.dim("url")} ${location}\n\n`);
39+
process.stdout.write(`${badge} ${styleText("dim", "url")} ${location}\n\n`);
3940
}
4041

4142
export function printPaginationFooter(options: PaginationFooterOptions): void {

0 commit comments

Comments
 (0)