How to use the npmlog.pause function in npmlog

To help you get started, we’ve selected a few npmlog 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 lerna / lerna / core / command / lib / log-package-error.js View on Github external
function directLog(message) {
  log.pause();
  console.error(message); // eslint-disable-line no-console
  log.resume();
}
github lerna / lerna / core / prompt / index.js View on Github external
function confirm(message) {
  log.pause();

  return inquirer
    .prompt([
      {
        type: "expand",
        name: "confirm",
        message,
        default: 2, // default to help in order to avoid clicking straight through
        choices: [
          { key: "y", name: "Yes", value: true },
          { key: "n", name: "No", value: false },
        ],
      },
    ])
    .then(answers => {
      log.resume();
github angelozerr / tern.java / eclipse / tern.eclipse.ide.server.nodejs.embed.linux.gtk.x86 / nodejs / node-v0.10.22-linux-x86 / lib / node_modules / npm / lib / utils / lifecycle.js View on Github external
function runCmd (note, cmd, pkg, env, stage, wd, unsafe, cb) {
  if (running) {
    queue.push([note, cmd, pkg, env, stage, wd, unsafe, cb])
    return
  }

  running = true
  log.pause()
  var user = unsafe ? null : npm.config.get("user")
    , group = unsafe ? null : npm.config.get("group")

  console.log(note)
  log.verbose("unsafe-perm in lifecycle", unsafe)

  if (process.platform === "win32") {
    unsafe = true
  }

  if (unsafe) {
    runCmd_(cmd, pkg, env, wd, stage, unsafe, 0, 0, cb)
  } else {
    uidNumber(user, group, function (er, uid, gid) {
      runCmd_(cmd, pkg, env, wd, stage, unsafe, uid, gid, cb)
    })
github ShieldBattery / ShieldBattery / deps / node / deps / npm / lib / utils / lifecycle.js View on Github external
function runCmd (note, cmd, pkg, env, stage, wd, unsafe, cb) {
  if (running) {
    queue.push([note, cmd, pkg, env, stage, wd, unsafe, cb])
    return
  }

  running = true
  log.pause()
  var user = unsafe ? null : npm.config.get("user")
    , group = unsafe ? null : npm.config.get("group")

  if (log.level !== 'silent') {
    if (npm.spinner.int) {
      npm.config.get("logstream").write("\r \r")
    }
    console.log(note)
  }
  log.verbose("unsafe-perm in lifecycle", unsafe)

  if (process.platform === "win32") {
    unsafe = true
  }

  if (unsafe) {
github nullivex / nodist / bin / node_modules / npm / lib / utils / lifecycle.js View on Github external
function runCmd (note, cmd, pkg, env, stage, wd, unsafe, cb) {
  if (running) {
    queue.push([note, cmd, pkg, env, stage, wd, unsafe, cb])
    return
  }

  running = true
  log.pause()
  var user = unsafe ? null : npm.config.get("user")
    , group = unsafe ? null : npm.config.get("group")

  console.log(note)
  log.verbose("unsafe-perm in lifecycle", unsafe)

  if (process.platform === "win32") {
    unsafe = true
  }

  if (unsafe) {
    runCmd_(cmd, pkg, env, wd, stage, unsafe, 0, 0, cb)
  } else {
    uidNumber(user, group, function (er, uid, gid) {
      runCmd_(cmd, pkg, env, wd, stage, unsafe, uid, gid, cb)
    })
github liquidg3 / altair / node_modules / npm / lib / utils / lifecycle.js View on Github external
function runCmd (note, cmd, pkg, env, stage, wd, unsafe, cb) {
  if (running) {
    queue.push([note, cmd, pkg, env, stage, wd, unsafe, cb])
    return
  }

  running = true
  log.pause()
  var user = unsafe ? null : npm.config.get("user")
    , group = unsafe ? null : npm.config.get("group")

  if (log.level !== 'silent') {
    console.log(note)
  }
  log.verbose("unsafe-perm in lifecycle", unsafe)

  if (process.platform === "win32") {
    unsafe = true
  }

  if (unsafe) {
    runCmd_(cmd, pkg, env, wd, stage, unsafe, 0, 0, cb)
  } else {
    uidNumber(user, group, function (er, uid, gid) {
github davidhealey / waistline / node_modules / npm / lib / utils / lifecycle.js View on Github external
function runCmd (note, cmd, pkg, env, stage, wd, unsafe, cb) {
  if (running) {
    queue.push([note, cmd, pkg, env, stage, wd, unsafe, cb])
    return
  }

  running = true
  log.pause()
  var user = unsafe ? null : npm.config.get("user")
    , group = unsafe ? null : npm.config.get("group")

  if (log.level !== 'silent') {
    if (npm.spinner.int) {
      npm.config.get("logstream").write("\r \r")
    }
    console.log(note)
  }
  log.verbose("unsafe-perm in lifecycle", unsafe)

  if (process.platform === "win32") {
    unsafe = true
  }

  if (unsafe) {
github lerna / lerna / core / prompt / index.js View on Github external
function input(message, { filter, validate } = {}) {
  log.pause();

  return inquirer
    .prompt([
      {
        type: "input",
        name: "input",
        message,
        filter,
        validate,
      },
    ])
    .then(answers => {
      log.resume();

      return answers.input;
    });