Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return exists(dtsName).then(dtsExists => {
if (!dtsExists) {
console.error(clc.red('Error: ') + clc.magenta(file) + clc.red('. Dts file not found.'));
errors += 1;
return null;
}
return read(dtsName).then(actual => {
return read(expectedFile).then(expected => {
expected = normalize(expected);
actual = normalize(actual);
expected = expected.trim();
if (!suppressAmbientDeclaration) {
actual = actual.split('\n').slice(1, -1).map(l => l.substring(2)/* remove leading whitespace */).join('\n').trim();
} else {
actual = actual.replace(/export declare/g, 'export').trim();
}
test('not empty stack every line break moved to right by 2 spaces', done => {
assert.equal(
utils.getStackTrace('Error:\n at line', true),
clc.magenta('\n Error:\n at line')
);
done();
});
});
'/v/' + c.bold('{version}') +
'/' + c.bold('{path/and/docId}') +
'?lang=' + c.bold('{locale}')))
} else {
console.log(' Valid paths: ' + c.cyan([
`${devRoot}/explore`,
`${devRoot}/glossary`,
`${devRoot}/glossary/project/` + c.bold('{projectSlug}'),
`${devRoot}/languages`,
`${devRoot}/profile/view/` + c.bold('{username}')]
.join('\n ')))
}
console.log(`See also: ${devRoot}/webpack-dev-server`)
console.log('REST requests: ' + c.blue(
`${zanataRoot}/rest (you need to run zanata server)`))
console.log(c.magenta('Watch browser console for actions and errors.'))
console.log(c.red('If you see errors, please fix them before you commit.'))
console.log(c.yellow(
'Wait for "webpack: Compiled successfully." (can take several seconds).'))
})
}
console.log(Object.keys(stats).sort().map(function (port) {
return color.blue('[' + port + '] ') + color.magenta(JSON.stringify(stats[port]));
}).join('\n'));
}
console.log(Object.keys(csums).sort(function (a, b) { return csums[a].length - csums[b].length; }).map(function (csum) {
return color.blue('[' + csums[csum].join(', ') + '] ') + color.magenta(csum + ' (' + csums[csum].length + ')');
}).join(' '));
}
console.log(Object.keys(csums).sort(function (a, b) { return csums[a].length - csums[b].length; }).map(function (csum) {
return color.blue('[' + csums[csum].join(', ') + '] ') + color.magenta(csum + ' (' + csums[csum].length + ')');
}).join(' '));
}
var printTitle = function(){
write(clc.reset + '\n');
write(printf('Started monitoring, checking every %s seconds.\n', secondsInterval));
write('Quit the script with CONTROL-C.\n');
write(clc.magenta('-----------------------------------------------------------\n'));
};
var pkg = require('../package.json');
var api = require('../index');
var doc = [
pkg.description,,
'Usage:',,
' ' + clc.cyan('unity-asset-store-api') + ' [options]',,
'Options:',,
' ' + clc.magenta('-h --help') + ' Show this.',
' ' + clc.magenta('-o , --output ') + ' Write output to file.',
' ' + clc.magenta('-v --version') + ' Show version number.',,
].join('\n');
if (process.argv.length < 3) {
writeDocToStdout();
} else {
var argv = optimist.argv;
if (argv.h || argv.help) {
writeDocToStdout();
} else if (argv.v || argv.version) {
writeVersionToStdout();
} else {
api.get(argv._[0])
.then(JSON.stringify)
.then(function (res) {
var output = argv.o || argv.output;
/**
* Logme - Minimalistic logging.
*
* Author: Veselin Todorov
* Licensed under the MIT License.
*/
var color = require('cli-color');
/**
* Exposing the theme.
*/
module.exports = {
debug: color.magenta('- DEBUG -') + ' :message',
info: color.cyan('- INFO -') + ' :message',
warning: color.yellow('- WARNING -') + ' :message',
error: color.red('- ERROR -') + ' :message',
critical: color.red.bold('- CRITICAL -') + ' :message'
};
rule.selectors.forEach(function (selector) {
var selStr = cliColor.blueBright(selector.replace(/\[/g, cliColor.magenta('[')).replace(/\:hover/g, cliColor.redBright(":hover")).replace(/\:active/g, cliColor.redBright(":active")).replace(/\:visited/g, cliColor.redBright(":visited")).replace(/\:link/g, cliColor.redBright(":link")).replace(/\:after/g, cliColor.redBright(":after")).replace(/\:before/g, cliColor.redBright(":before")).replace(/\./g, cliColor.magenta('.')).replace(/\#/g, cliColor.magenta('.'))
//.replace(/\:/g, cliColor.magenta(':'))
.replace(/\,/g, cliColor.magenta(',')).replace(/\(/g, cliColor.magenta('(')).replace(/\)/g, cliColor.magenta(')')).replace(/\]/g, cliColor.magenta(']')).replace(/\=/g, cliColor.magenta('=')).replace(/\"/g, cliColor.magenta('"')).replace(/\'/g, cliColor.magenta("'")));
sels.push(selStr);
});
cssResult += sels.join(',') + '{\n';