Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
proc.on('exit', async (code) => {
if (code === 0) {
if (flow) {
try {
await installFlow();
} catch (e) {
spinner.fail('There was an error installing dependencies.');
}
}
spinner.stop();
console.log();
console.log(ls.success, chalk.green('Woohoo! Everything is good to go!'));
console.log('To start your app, just run:');
console.log();
console.log(chalk.cyan(' npm start'));
console.log();
console.log('Happy coding!');
process.exit(); // eslint-disable-line unicorn/no-process-exit
} else {
spinner.fail('There was an error installing dependencies.');
}
});
}
async function startChat(user) {
// replace selector with selected user
let user_chat_selector = selector.user_chat;
user_chat_selector = user_chat_selector.replace('XXX', user);
await page.waitFor(user_chat_selector);
await page.click(user_chat_selector);
await page.click(selector.chat_input);
let name = getCurrentUserName();
if (name) {
console.log(logSymbols.success, chalk.bgGreen('You can chat now :-)'));
console.log(logSymbols.info, chalk.bgRed('Press Ctrl+C twice to exit any time.\n'));
} else {
console.log(logSymbols.warning, 'Could not find specified user "' + user + '"in chat threads\n');
}
}
const getSymbol = (task: TaskStatus, spinners: Spinners) => {
if (spinners[task.id] == null) {
// eslint-disable-next-line
spinners[task.id] = elegantSpinner();
}
const hasSubtasks = task.subtasks != null && task.subtasks.length > 0;
if (task.pending) {
return hasSubtasks ? pointer : chalk.yellow(spinners[task.id]());
}
if (task.complete) {
return logSymbols.success;
}
if (task.error != null) {
return hasSubtasks ? pointer : logSymbols.error;
}
if (task.skipped != null) {
return skipped;
}
return ' ';
};
testCli(['file.unsupported'], ['--skip-unsupported'], function(exitCode, log) {
should.exist(exitCode);
should.exist(log);
exitCode.should.equal(0);
log.should.eql(['', '', ' ' + stripAnsi(logSymbols.success) + ' No todos/fixmes found', '']);
callback();
});
});
require('colors')
var
log,
symbols = require('log-symbols'),
messageTypes = {
success: symbols.success,
error: symbols.error,
info: symbols.info,
warning: symbols.warning,
debug: '[DEBUG]'.gray
}
function showMessage () {
var
array,
args = [].slice.call(arguments)
if (args[0].length === 0) {
return console.log()
}
array = [].slice.call(args[0])
module.exports = async (configurationPath) => {
let data = await configure()
configuration.write(configurationPath, data)
console.log(`\n${logSymbols.success}`, `Configuration written to \`${configurationPath}\`!`)
console.log(`${logSymbols.info}`, "Run `discharge deploy` to deploy your website.")
}
const getSymbol = function (num) {
if (num) {
return logSymbols.error
}
return logSymbols.success
}
osascript(stringify(lib.next.method), function (err) {
var result;
if (err === null) {
result = callback(logSymbols.success + ' Skipped track.');
} else {
result = callback(logSymbols.error + ' ' + chalk.red(err));
}
return result;
});
}
const log = out => logByType('log')(logSymbols.success + ' ' + chalk.green(out))
const info = out => logByType('log')(logSymbols.info + ' ' + chalk.blue(out))
reports.audit.forEach(function (el) {
if (el.result === 'PASS') {
passes += logSymbols.success + ' ' + el.heading + '\n';
}
if (el.result === 'FAIL') {
failures += logSymbols.error + ' ' + el.heading + '\n';
failures += el.elements + '\n\n';
}
});