mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-06 04:22:01 +00:00
[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:
@@ -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)')} ` +
|
||||||
|
|||||||
@@ -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');
|
||||||
|
|||||||
Reference in New Issue
Block a user