Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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),
// 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}`)
)
})
],
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'))
}
}
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')
})
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
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!'))
}
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);
, 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'))
)
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!`);
}
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;
};