Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
log.error("argv", process.argv.map(JSON.stringify).join(" "))
log.error("node", process.version)
log.error("npm ", "v" + npm.version)
; [ "file"
, "path"
, "code"
, "errno"
, "syscall"
].forEach(function (k) {
var v = er[k]
if (v) log.error(k, v)
})
// just a line break
if (log.levels[log.level] <= log.levels.error) console.error("")
switch (er.code) {
case "ECONNREFUSED":
log.error("", er)
log.error("", ["\nIf you are behind a proxy, please make sure that the"
,"'proxy' config is set properly. See: 'npm help config'"
].join("\n"))
break
case "EACCES":
case "EPERM":
log.error("", er)
log.error("", ["\nPlease try running this command again as root/Administrator."
].join("\n"))
break
function doBuild () {
// Enable Verbose build
var verbose = log.levels[log.level] <= log.levels.verbose
var j
if (!win && verbose) {
argv.push('V=1')
}
if (win && !verbose) {
argv.push('/clp:Verbosity=minimal')
}
if (win) {
// Turn off the Microsoft logo on Windows
argv.push('/nologo')
}
// Specify the build type, Release by default
function doBuild () {
// Enable Verbose build
var verbose = log.levels[log.level] <= log.levels.verbose
if (!win && verbose) {
argv.push('V=1')
}
if (win && !verbose) {
argv.push('/clp:Verbosity=minimal')
}
if (win) {
// Turn off the Microsoft logo on Windows
argv.push('/nologo')
}
// Specify the build type, Release by default
if (win) {
var p = arch === 'x64' ? 'x64' : 'Win32'
argv.push('/p:Configuration=' + buildType + ';Platform=' + p)
function doBuild () {
// Enable Verbose build
var verbose = log.levels[log.level] <= log.levels.verbose
if (!win && verbose) {
argv.push('V=1')
}
if (win && !verbose) {
argv.push('/clp:Verbosity=minimal')
}
if (win) {
// Turn off the Microsoft logo on Windows
argv.push('/nologo')
}
// Specify the build type, Release by default
if (win) {
var p = arch === 'x64' ? 'x64' : 'Win32'
argv.push('/p:Configuration=' + buildType + ';Platform=' + p)
function doBuild () {
// Enable Verbose build
var verbose = log.levels[log.level] <= log.levels.verbose
var j
if (!win && verbose) {
argv.push('V=1')
}
if (win && !verbose) {
argv.push('/clp:Verbosity=minimal')
}
if (win) {
// Turn off the Microsoft logo on Windows
argv.push('/nologo')
}
// Specify the build type, Release by default
var header = function(lvl, clientId, options) {
if (npmlog.levels[npmlog.level] <= npmlog.levels[lvl]) {
npmlog.log(lvl, clientId, HEADER_BANNER);
npmlog.log(lvl, clientId, '| IBM MQ Light Node.js Client Module -',
options.title);
npmlog.log(lvl, clientId, HEADER_BANNER);
npmlog.log(lvl, clientId, '| Date/Time :-',
moment().format('ddd MMMM DD YYYY HH:mm:ss.SSS Z'));
npmlog.log(lvl, clientId, '| Host Name :-', os.hostname());
npmlog.log(lvl, clientId, '| Operating System :-',
os.type(), os.release());
npmlog.log(lvl, clientId, '| Architecture :-',
os.platform(), os.arch());
npmlog.log(lvl, clientId, '| Node Version :-', process.version);
npmlog.log(lvl, clientId, '| Node Path :-', process.execPath);
npmlog.log(lvl, clientId, '| Node Arguments :-', process.execArgs);
if (!isWin) {
npmlog.log(lvl, clientId, '| User Id :-', process.getuid());
var child_process = require('child_process')
, exec = child_process.exec
, spawn = child_process.spawn
, fs = require('fs')
, path = require('path')
, log = require('npmlog')
, util = require('util')
;
log.level = log.levels.silly;
function execute (command, args, callback) {
var errors = []
, infos = []
, spawned = spawn (command, args)
;
log.silly(command, args);
spawned.stdout.on('data', function(data) {
var msg = util.format('%s', data.toString());
if (msg.length === 0) return;
log.info(command, msg);
infos.push(msg);
});
logger.log = function(lvl, id, args) {
if (npmlog.levels[npmlog.level] <= npmlog.levels[lvl]) {
npmlog.log.apply(this, arguments);
}
};
var _ = require('lodash')
var emoji = require('node-emoji')
var log = require('npmlog')
var levels = Object.keys(log.levels)
var exports = module.exports = _(log)
.pick(levels)
.value()
exports.levels = levels
exports.raw = log
log.style = {
silly: {inverse: true, bold: true},
verbose: {fg: 'brightBlue', bold: true},
info: {fg: 'brightGreen', bold: true},
http: {fg: 'brightGreen', bold: true},
warn: {fg: 'brightYellow', bold: true},
error: {fg: 'brightRed', bold: true},