init(subarg(cli.input, options)._, cli.flags).catch(error => { console.error(error); process.exit(1); });
inquirer.prompt(questions, answers => { const files = answers.files || cli.input; if (!files.length) { return; } const scripts = utils.selectScripts(codemods, answers.currentVersion, answers.nextVersion); runScripts(scripts, globby.sync(files)); });
(async () => { await replaceInFiles(cli.input, { find: [ ...arrify(cli.flags.string), ...arrify(cli.flags.regex).map(regexString => new RegExp(regexString, 'g')) ], replacement: cli.flags.replacement, ignoreCase: cli.flags.ignoreCase, glob: cli.flags.glob }); })();
quote(cli.input[0]) .then(result => { console.log( chalk.cyan(chalk.yellow(result.quote.body) + ' - ' + result.quote.author) ); process.exit(0); }) .catch(err => { console.log(chalk.bold.red(err)); process.exit(1); });
setTimeout(() => { content = content.trim() let address = (content || '0') const check = cli.flags.check const chainId = cli.flags.chain if (!content) { address = cli.input[0] } run(address, check, chainId) }, 10)
(async () => { if (config.get('username') === undefined || config.get('bearer') === undefined) { let authorization = await auth(); } singlespotify(cli.input[0], cli.flags); })()
(async () => { const bits = cli.input[0]; const seed = (bits ? dogeSeed(Number(bits)) : dogeSeed()) .split(' ') .map(x => chalk[randomColor()](x)) .join(' '); const seedBox = boxen(seed, { float: 'center', padding: 1, borderStyle: 'round', borderColor: 'yellow', dimBorder: true }); if (isIterm) { termImg(dogeImage, {width: '100%'}); } else { console.log(await terminalImage.file(dogeImage)); } console.log(seedBox, '\n\n\n'); })();
const run = () => { const cmd = cli.input[0]
(async () => { try { const mapPath = cli.input[0]; if (!mapPath) cli.showHelp(); const mapContent = JSON.parse(await fs.readFile(mapPath, 'utf-8'));
lockfile.lock(fileLock, err => { if (err) { console.log(chalk.red(err.message)) console.log( chalk.cyan( ` There is probably another borgjs runnign process. You should either wait for it to finish or remove the following lock file. ${chalk.yellow(fileLock + '.lock')} ` ) ) process.exit(1) } if (!semver.satisfies(process.version, '>=6')) { console.log(chalk.red('Your node version must be >=6.')) process.exit(1) } run(config, cli.input[0]) .then(() => { console.log(chalk.green('Backup succesfully executed.')) process.exit(0) }) .catch(err => { console.log(chalk.red('An error has occurred: ', err)) process.exit(1) }) })
const run = async () => { const input = cli.input[0] const { list, remove, copy } = cli.flags