const chalk = require('chalk');
const { clearConsole } = require('../shared-utils/logger');

/**
 * 生成当前版本相关信息
 */
exports.generateTitle = async function (checkUpdate) {
  const current = require(`../../package.json`).version;
  const title = chalk.bold.blue(`kt unity-pc-cli v${current}`);
  return title;
};

exports.clearConsole = async function clearConsoleWithTitle(checkUpdate) {
  const title = await exports.generateTitle(checkUpdate);
  clearConsole(title);
};
