How to use the chalk.yellowBright function in chalk

To help you get started, we’ve selected a few chalk 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 cmux / koot / packages / koot / bin / dev.js View on Github external
await fs.writeFile(pathServerStartFlag, contentWaiting);

            // 启动 client webpack-dev-server
            /*const processClient = */ await start('client');

            // 监视 chunkmap 文件,如果修改,进入下一步
            // await Promise.race([
            await checkFileUpdate(pathChunkmap, contentWaiting);
            //     checkFileUpdate(path.resolve(getDirDevTmp(cwd), 'client-error.log'), '')
            //         .then(encounterError)
            // ])
            // waitingSpinner.succeed()
            // eslint-disable-next-line no-console
            console.log(
                chalk.green('√ ') +
                    chalk.yellowBright('[koot/build] ') +
                    __('build.build_complete', {
                        type: chalk.cyanBright(__(`appType.${appType}`)),
                        stage: chalk.green('client'),
                        env: chalk.green('dev')
                    })
            );
            // console.log(processClient[0].process, processClient[0].pid)
            // console.log(
            //     `  [${}]`
            // )

            // 启动 server webpack
            // waitingSpinner = spinner(
            //     chalk.yellowBright('[koot/build] ')
            //     + __('build.build_start', {
            //         type: chalk.cyanBright(appType),
github cmux / koot / core / webpack / defaults / spa.client.prod.js View on Github external
// console.log(path.resolve(outputPath, './index.html'))

            await fs.writeFile(
                path.resolve(dist, 'public/', file),
                ejs.render(
                    process.env.SUPER_HTML_TEMPLATE, {
                        inject: inject({ localeId })
                    }, {

                    }
                ),
                'utf-8'
            )
            console.log(
                chalk.green('√ ')
                + chalk.yellowBright('[super/build] ')
                + 'template output to '
                + chalk.green(`/${file}`)
            )
        })
    ],
github DFEAGILEDEVOPS / MTC / admin / bin / dump-browser-stats.js View on Github external
while (lowCheckId <= checkInfo.max) {
    winston.info(`Fetching ${batchSize} checks for processing starting at ID ${lowCheckId}`)
    const checks = await completedCheckDataService.sqlFind(lowCheckId, batchSize)
    const batch = R.map(getBrowserStats, checks)
    writeCsv(batch)
    // checks are ordered by id
    lowCheckId = parseInt(R.last(checks).id, 10) + 1
    count += R.length(batch)
  }

  if (count > 0) {
    winston.info(chalk.green(`${count} checks processed`))
    winston.info(chalk.green(`Output written to ${outputFilename}`))
  } else {
    winston.info(chalk.yellowBright('No checks processed'))
  }
}
github shesek / bcash-instadump / cli / bcash-instadump.js View on Github external
console.log('\nShapeShift order', C.yellowBright(order.orderId)+':\n')
  console.log('  Payout address  (BTC):', C.yellowBright(order.withdrawal))
  console.log('  Deposit address (BCH):', C.yellowBright(order.deposit))
  console.log('  Refund address  (BCH):', C.yellowBright(order.returnAddress), C.yellow(!args.refund ? '(none provided, defaulted to the address of the first key)' : ''))
  console.log('\n  Fixed fee:', C.yellowBright(order.minerFee, 'BTC'), C.yellow('(charged by ShapeShift)'))
  console.log('\n  '+C.red(C.bold('DUMP'), formatSat(txVal), C.bold('BCH'))+',', C.green(C.bold('GET'), btcs, C.bold('BTC'))+'\n')
  console.log('  Quoted rate: 1 BCH =', C.yellowBright(order.quotedRate), 'BTC', C.yellow('(before ShapeShift\'s fixed fee and mining fees)'))
  console.log('  Actual rate: 1 BCH =', C.yellowBright(rateE), 'BTC', C.yellow('(including ShapeShift\'s fixed fee)'))
  console.log('  Total  rate: 1 BCH =', C.yellowBright(rateF), 'BTC', C.yellow('(including your bcash miner fees, too)'))
  console.log('\n  ' + C.cyan.underline(order.url), args.noproxy ? '' : '\n  '+C.red('(warn)'), C.gray('don\'t forget your proxy when opening links in browser'))
  console.log('\n  ' + C.underline('order expires'), 'in', C.yellowBright(Math.ceil((order.expiration-Date.now())/60000)), 'minutes'
            , '('+C.yellowBright(formatDate(order.expiration))+')')

  console.log('\nTransaction', C.yellowBright(tx.txid())+':\n')
  console.log('  Inputs:', C.yellowBright(formatSat(tx.getInputValue()), 'BCH'), 'from', C.yellowBright(tx.inputs.length+' outpoints')
            , C.yellow('('+tx.inputs.map(inv => [inv.prevout.txid().substr(0, 7), inv.prevout.index].join(':')).join(', ')+')'))
  console.log('  Output:', C.yellowBright(formatSat(tx.getOutputValue()), 'BCH'), 'to', C.yellowBright(tx.outputs[0].getAddress()), C.yellow('(ShapeShift\'s deposit address)'))
  console.log('  Tx size:', C.yellowBright(tx.getVirtualSize()+'b')+',', 'fee:', C.yellowBright(formatSat(tx.getFee()), 'BCH'), '(rate:', C.yellowBright(Math.round(tx.getRate(tx.view)/1000,2)), 'satoshis/byte)')
  if (tx.inputs.length > 1) console.log(' ', C.red('(warn)'), C.gray('merging multiple inputs together could harm your privacy. See README.md for more details.'))

  console.log('\nPlease make sure everything checks out. Once confirmed, this cannot be undone.')
  console.log('Press Y to confirm and dump or N to abort and print the bcash transaction without broadcasting it.\n')

  return confirm('DUMP bcash, HODL bitcoin?')
    .catch(_ => {
      console.log('\n'+C.red('(canceled)'), 'not sending transaction:\n')
      console.log(util.inspect(tx.inspect(), { depth: 5, colors: true })+'\n')
      console.log(C.yellow('(rawtx)'), tx.toRaw().toString('hex')+'\n')
      info('you can send this transaction manually using:\n       $ bcash-broadcast \n')
      return Promise.reject('user aborted')
    })
github samdenty / injectify / src / inject / server.js View on Github external
loadModules((modules, debugModules, count) => {
    state.modules = modules
    state.debugModules = debugModules
    console.log(
      chalk.greenBright('[inject:modules] ') +
      chalk.yellowBright('successfully loaded ') +
      chalk.magentaBright(count) +
      chalk.yellowBright(' modules into memory')
    )
    server.installHandlers(express, { prefix: '/i' })
  })
  return state
github shesek / bcash-instadump / cli / bcash-instadump.js View on Github external
console.log('  Payout address  (BTC):', C.yellowBright(order.withdrawal))
  console.log('  Deposit address (BCH):', C.yellowBright(order.deposit))
  console.log('  Refund address  (BCH):', C.yellowBright(order.returnAddress), C.yellow(!args.refund ? '(none provided, defaulted to the address of the first key)' : ''))
  console.log('\n  Fixed fee:', C.yellowBright(order.minerFee, 'BTC'), C.yellow('(charged by ShapeShift)'))
  console.log('\n  '+C.red(C.bold('DUMP'), formatSat(txVal), C.bold('BCH'))+',', C.green(C.bold('GET'), btcs, C.bold('BTC'))+'\n')
  console.log('  Quoted rate: 1 BCH =', C.yellowBright(order.quotedRate), 'BTC', C.yellow('(before ShapeShift\'s fixed fee and mining fees)'))
  console.log('  Actual rate: 1 BCH =', C.yellowBright(rateE), 'BTC', C.yellow('(including ShapeShift\'s fixed fee)'))
  console.log('  Total  rate: 1 BCH =', C.yellowBright(rateF), 'BTC', C.yellow('(including your bcash miner fees, too)'))
  console.log('\n  ' + C.cyan.underline(order.url), args.noproxy ? '' : '\n  '+C.red('(warn)'), C.gray('don\'t forget your proxy when opening links in browser'))
  console.log('\n  ' + C.underline('order expires'), 'in', C.yellowBright(Math.ceil((order.expiration-Date.now())/60000)), 'minutes'
            , '('+C.yellowBright(formatDate(order.expiration))+')')

  console.log('\nTransaction', C.yellowBright(tx.txid())+':\n')
  console.log('  Inputs:', C.yellowBright(formatSat(tx.getInputValue()), 'BCH'), 'from', C.yellowBright(tx.inputs.length+' outpoints')
            , C.yellow('('+tx.inputs.map(inv => [inv.prevout.txid().substr(0, 7), inv.prevout.index].join(':')).join(', ')+')'))
  console.log('  Output:', C.yellowBright(formatSat(tx.getOutputValue()), 'BCH'), 'to', C.yellowBright(tx.outputs[0].getAddress()), C.yellow('(ShapeShift\'s deposit address)'))
  console.log('  Tx size:', C.yellowBright(tx.getVirtualSize()+'b')+',', 'fee:', C.yellowBright(formatSat(tx.getFee()), 'BCH'), '(rate:', C.yellowBright(Math.round(tx.getRate(tx.view)/1000,2)), 'satoshis/byte)')
  if (tx.inputs.length > 1) console.log(' ', C.red('(warn)'), C.gray('merging multiple inputs together could harm your privacy. See README.md for more details.'))

  console.log('\nPlease make sure everything checks out. Once confirmed, this cannot be undone.')
  console.log('Press Y to confirm and dump or N to abort and print the bcash transaction without broadcasting it.\n')

  return confirm('DUMP bcash, HODL bitcoin?')
    .catch(_ => {
      console.log('\n'+C.red('(canceled)'), 'not sending transaction:\n')
      console.log(util.inspect(tx.inspect(), { depth: 5, colors: true })+'\n')
      console.log(C.yellow('(rawtx)'), tx.toRaw().toString('hex')+'\n')
      info('you can send this transaction manually using:\n       $ bcash-broadcast \n')
      return Promise.reject('user aborted')
    })
    .then(_ => !nearExpiry(order) ? tx : Promise.reject('ShapeShift order expired, aborting transaction. be quicker next time!'))
}
github Cryrivers / magic-type / src / index.ts View on Github external
choices: pluginJson.results.map(item => ({
        name: item.package.name,
        hint: item.package.description
      }))
    });
    const additionalPlugins: string[] = (pluginResult as any).plugins;
    plugins.push(...additionalPlugins);
    if (plugins.length > 0) {
      console.log(
        chalk.yellowBright("\n- 🕹️ Installing additional plugins...\n")
      );
      packageManagerInstall(plugins, mantaStyleVersion);
    }
  }

  console.log(chalk.yellowBright("\n- 📖 Compile Your Type Definitions...\n"));

  const result = build({
    fileName: path.resolve(inputFile),
    destDir: path.resolve(outputDir),
    transpileModule
  });

  console.log(result);

  console.log(
    chalk.yellowBright(
      "\n- 🎉 Done, now you can use your type definitions at runtime. \n"
    )
  );

  generateSuperGuideBasedOnFile(path.resolve(inputFile), plugins);
github shesek / bcash-instadump / lib / changelly.js View on Github external
, login = (email, password) => (
      console.error(chalk.yellow('(info)'), 'attempting to login into changelly as', chalk.yellowBright(email))
    , proxify(request.post('https://changelly.com/auth/login'))
        .send({ email, password, totp: '' })
        .then(r => r.body.result ? Object.assign({}, r.body.user, { session: extractSess(r) }) : Promise.reject(r.body.errors || 'cannot login'))
    )
github kirinnee / CyanPrint / src / group.ts View on Github external
function CreateGroup(key: string, name: string, email: string, readme: string): string {
	const content =
		`# ${name}
*Unique Key*: ${key}

# Author
${email}
`;
	const success = group.Create(key, name, email, readme, content);
	if (success)
		return chalk.greenBright("The Group " + chalk.yellowBright(key) + ` (${name}) has been created!`);
	return chalk.redBright("The Group " + chalk.yellowBright(key) + ` (${name}) already exist!`);
}
github JoshuaKGoldberg / TypeStat / src / initialization / index.ts View on Github external
logger.stdout.write(chalk.reset(` for you.${EOL}`));
    logger.stdout.write(`If you don't know how to answer, that's ok - just select the default answer.${EOL}`);
    logger.stdout.write(chalk.reset(EOL));

    try {
        await runPrompts();
    } catch (error) {
        logger.stderr.write(getQuickErrorSummary(error));
        return ResultStatus.ConfigurationError;
    }

    logger.stdout.write(chalk.reset(`${EOL}Awesome! You're now ready to:${EOL}`));
    logger.stdout.write(chalk.greenBright(`typestat --config ${fileName}`));
    logger.stdout.write(chalk.reset(`${EOL}${EOL}Once you run that, TypeStat will start auto-fixing your typings.${EOL}`));
    logger.stdout.write(chalk.yellow(`Please report any bugs on https://github.com/JoshuaKGoldberg/TypeStat! `));
    logger.stdout.write(chalk.yellowBright("💖"));
    logger.stdout.write(chalk.reset(EOL));

    return ResultStatus.Succeeded;
};