Skip to content

Commit 17cb5f1

Browse files
authored
[cli] Remove boxen for warnings (vercel#7944)
This never worked correctly and its too verbose. Lets remove boxen in favor of yellow text. ## Before <img width="1432" alt="before" src="https://user-images.githubusercontent.com/229881/173138338-1cd1c81c-f294-4752-a08f-f80466fbd21c.png" /> ## After <img width="1432" alt="after" src="https://user-images.githubusercontent.com/229881/173138813-f9ff4de1-5bb7-4b60-8609-6abdd0e86fa0.png">
1 parent b095031 commit 17cb5f1

File tree

2 files changed

+5
-29
lines changed

2 files changed

+5
-29
lines changed

packages/cli/src/commands/domains/inspect.ts

+1-11
Original file line numberDiff line numberDiff line change
@@ -150,17 +150,7 @@ export default async function inspect(
150150
`This Domain is not configured properly. To configure it you should either:`,
151151
null,
152152
null,
153-
null,
154-
{
155-
boxen: {
156-
margin: {
157-
left: 2,
158-
right: 0,
159-
bottom: 0,
160-
top: 0,
161-
},
162-
},
163-
}
153+
null
164154
);
165155
output.print(
166156
` ${chalk.grey('a)')} ` +

packages/cli/src/util/output/create-output.ts

+4-18
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import chalk from 'chalk';
2-
import boxen from 'boxen';
32
import renderLink from './link';
43
import wait, { StopSpinner } from './wait';
54
import { Writable } from 'stream';
@@ -51,28 +50,15 @@ export class Output {
5150
str: string,
5251
slug: string | null = null,
5352
link: string | null = null,
54-
action: string | null = 'Learn More',
55-
options?: {
56-
boxen?: boxen.Options;
57-
}
53+
action: string | null = 'Learn More'
5854
) => {
5955
const details = slug ? `https://err.sh/vercel/${slug}` : link;
6056

6157
this.print(
62-
boxen(
63-
chalk.bold.yellow('WARN! ') +
58+
chalk.yellow(
59+
chalk.bold('WARN! ') +
6460
str +
65-
(details ? `\n${action}: ${renderLink(details)}` : ''),
66-
{
67-
padding: {
68-
top: 0,
69-
bottom: 0,
70-
left: 1,
71-
right: 1,
72-
},
73-
borderColor: 'yellow',
74-
...options?.boxen,
75-
}
61+
(details ? `\n${action}: ${renderLink(details)}` : '')
7662
)
7763
);
7864
this.print('\n');

0 commit comments

Comments
 (0)