Fix cli log next.js color (#56448)
The color of "Next.js <version>" in CLI was changed to `magenta` accidentally in #55992 , this PR added the original color back
This commit is contained in:
parent
ae1b89984d
commit
ad42b610c2
2 changed files with 5 additions and 6 deletions
|
@ -65,6 +65,9 @@ export const green = enabled ? formatter('\x1b[32m', '\x1b[39m') : String
|
||||||
export const yellow = enabled ? formatter('\x1b[33m', '\x1b[39m') : String
|
export const yellow = enabled ? formatter('\x1b[33m', '\x1b[39m') : String
|
||||||
export const blue = enabled ? formatter('\x1b[34m', '\x1b[39m') : String
|
export const blue = enabled ? formatter('\x1b[34m', '\x1b[39m') : String
|
||||||
export const magenta = enabled ? formatter('\x1b[35m', '\x1b[39m') : String
|
export const magenta = enabled ? formatter('\x1b[35m', '\x1b[39m') : String
|
||||||
|
export const purple = enabled
|
||||||
|
? formatter('\x1b[38;2;173;127;168m', '\x1b[39m')
|
||||||
|
: String
|
||||||
export const cyan = enabled ? formatter('\x1b[36m', '\x1b[39m') : String
|
export const cyan = enabled ? formatter('\x1b[36m', '\x1b[39m') : String
|
||||||
export const white = enabled ? formatter('\x1b[37m', '\x1b[39m') : String
|
export const white = enabled ? formatter('\x1b[37m', '\x1b[39m') : String
|
||||||
export const gray = enabled ? formatter('\x1b[90m', '\x1b[39m') : String
|
export const gray = enabled ? formatter('\x1b[90m', '\x1b[39m') : String
|
||||||
|
|
|
@ -18,7 +18,7 @@ import { formatHostname } from './format-hostname'
|
||||||
import { initialize } from './router-server'
|
import { initialize } from './router-server'
|
||||||
import { checkIsNodeDebugging } from './is-node-debugging'
|
import { checkIsNodeDebugging } from './is-node-debugging'
|
||||||
import { CONFIG_FILES } from '../../shared/lib/constants'
|
import { CONFIG_FILES } from '../../shared/lib/constants'
|
||||||
import { bold, magenta } from '../../lib/picocolors'
|
import { bold, purple } from '../../lib/picocolors'
|
||||||
|
|
||||||
const debug = setupDebug('next:start-server')
|
const debug = setupDebug('next:start-server')
|
||||||
|
|
||||||
|
@ -92,11 +92,7 @@ function logStartInfo({
|
||||||
formatDurationText: string
|
formatDurationText: string
|
||||||
}) {
|
}) {
|
||||||
Log.bootstrap(
|
Log.bootstrap(
|
||||||
bold(
|
bold(purple(`${Log.prefixes.ready} Next.js ${process.env.__NEXT_VERSION}`))
|
||||||
magenta(
|
|
||||||
`${`${Log.prefixes.ready} Next.js`} ${process.env.__NEXT_VERSION}`
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
Log.bootstrap(`- Local: ${appUrl}`)
|
Log.bootstrap(`- Local: ${appUrl}`)
|
||||||
if (hostname) {
|
if (hostname) {
|
||||||
|
|
Loading…
Reference in a new issue