How to use the @statusfy/common.chalk.red function in @statusfy/common

To help you get started, we’ve selected a few @statusfy/common examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github bazzite / statusfy / packages / @statusfy / cli / index.js View on Github external
require.resolve('@statusfy/editor')
} catch (err) {
  packageError('@statusfy/editor')
  process.exit(1)
}

const pkg = require('@statusfy/core/package.json')
const requiredVersion = pkg.engines.node

if (!satisfies(process.version, requiredVersion)) {
  console.log(chalk.red(
    `Minimum Node version not met:\n` +
    `You are using Node ${process.version}, ` +
    `but Statusfy requires Node ${requiredVersion}.`
  ))
  console.log(chalk.red(`Please upgrade your Node version.`))

  process.exit(1)
}

const {
  init,
  dev,
  build,
  generate,
  start,
  newIncident,
  deleteIncident,
  updateIncident
} = require('@statusfy/core/lib')
const sourceDir = path.resolve('.')
github bazzite / statusfy / packages / @statusfy / cli / index.js View on Github external
.action((cmd) => {
    program.outputHelp()
    console.log(`  ` + chalk.red(`Unknown command ${chalk.yellow(cmd)}.\n`))
  })
github bazzite / statusfy / packages / @statusfy / cli / index.js View on Github external
return fn(...args).catch(err => {
      console.error(chalk.red(err.stack))
      process.exitCode = 1
    })
  }
github bazzite / statusfy / packages / @statusfy / cli / index.js View on Github external
const packageError = (name) => {
  console.log(chalk.red(
    `\n[statusfy] @statusfy/cli ` +
    `requires ${name} to be installed.\n` +
    `${err}`
  ))
}