import { Runner } from 'oo-cli'; import * as path from 'path'; import { showEnvironment } from './lib/EnvironmentalOutput'; import { checkForUpdate } from './lib/checkForUpdate'; import chalk from 'chalk'; function run() { showEnvironment(); console.log(chalk.red(`DEPRECATION NOTE! opti CLI is deprecated. Use OCP CLI instead. ` + `OCP CLI contains all the features of opti CLI and more. ` + `Run ${chalk.grey('yarn global add @optimizely/ocp-cli')} to install ` + `and then ${chalk.grey('ocp -h')}. OCP CLI will help you to migrate your settings from opti CLI.`)); const manifest = require(path.join(__dirname, './oo-cli.manifest.json')); checkForUpdate(manifest) .then(() => new Runner(__dirname, manifest).run()) .catch((e) => console.log(e.message)); } run();