[cli] Remove boxen for warnings (#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">
This commit is contained in:
Steven
2022-06-10 16:28:00 -04:00
committed by GitHub
parent b095031292
commit 17cb5f1bc6
2 changed files with 5 additions and 29 deletions

View File

@@ -150,17 +150,7 @@ export default async function inspect(
`This Domain is not configured properly. To configure it you should either:`, `This Domain is not configured properly. To configure it you should either:`,
null, null,
null, null,
null, null
{
boxen: {
margin: {
left: 2,
right: 0,
bottom: 0,
top: 0,
},
},
}
); );
output.print( output.print(
` ${chalk.grey('a)')} ` + ` ${chalk.grey('a)')} ` +

View File

@@ -1,5 +1,4 @@
import chalk from 'chalk'; import chalk from 'chalk';
import boxen from 'boxen';
import renderLink from './link'; import renderLink from './link';
import wait, { StopSpinner } from './wait'; import wait, { StopSpinner } from './wait';
import { Writable } from 'stream'; import { Writable } from 'stream';
@@ -51,28 +50,15 @@ export class Output {
str: string, str: string,
slug: string | null = null, slug: string | null = null,
link: string | null = null, link: string | null = null,
action: string | null = 'Learn More', action: string | null = 'Learn More'
options?: {
boxen?: boxen.Options;
}
) => { ) => {
const details = slug ? `https://err.sh/vercel/${slug}` : link; const details = slug ? `https://err.sh/vercel/${slug}` : link;
this.print( this.print(
boxen( chalk.yellow(
chalk.bold.yellow('WARN! ') + chalk.bold('WARN! ') +
str + str +
(details ? `\n${action}: ${renderLink(details)}` : ''), (details ? `\n${action}: ${renderLink(details)}` : '')
{
padding: {
top: 0,
bottom: 0,
left: 1,
right: 1,
},
borderColor: 'yellow',
...options?.boxen,
}
) )
); );
this.print('\n'); this.print('\n');