import chalk from 'chalk'; import { existsSync } from 'fs'; import { join } from 'path'; import {getEnv} from './Config'; const envColors = { staging: chalk.yellow, production: chalk.red, other: chalk.gray }; export function showEnvironment() { if (existsSync(join(__dirname, '../commands/env'))) { const env = getEnv(); const color = envColors[env as keyof typeof envColors] || envColors['other']; console.log(chalk.gray(`Active environment: ${color(env)}`)); } }