fix(core): avoid imports from tty

This commit is contained in:
alina 🌸 2024-02-20 00:28:12 +03:00
parent 2c6162987d
commit 54c904d3fa
Signed by: teidesu
SSH key fingerprint: SHA256:uNeCpw6aTSU4aIObXLvHfLkDa82HWH9EiOj9AXOIRpI

View file

@ -1,6 +1,4 @@
import { isatty } from 'tty'
const isTty = isatty(process.stdout.fd)
const isTty = typeof process === 'object' && Boolean(process.stdout?.isTTY)
const BASE_FORMAT = isTty ? '%s [%s] [%s%s\x1b[0m] ' : '%s [%s] [%s] '
const LEVEL_NAMES = isTty ?