How to use the npmlog.silly 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 liquidg3 / altair / node_modules / npm / lib / utils / gently-rm.js View on Github external
function isSafeToRm (parent, target, cb) {
  log.silly('gentlyRm', 'parent.path =', parent.path)
  log.silly('gentlyRm', 'parent.managed =',
    parent.managed && parent.managed.target + ' is in ' + parent.managed.path)
  log.silly('gentlyRm', 'target.path = ', target.path)
  log.silly('gentlyRm', 'target.symlink =', target.symlink)
  log.silly('gentlyRm', 'target.managed =',
    target.managed && target.managed.target + ' is in ' + target.managed.path)
  log.silly('gentlyRm', 'target.inParent = ', target.inParent)

  // The parent directory or something it symlinks to must eventually be in
  // a folder that npm maintains.
  if (!parent.managed) {
    log.verbose('gentlyRm', parent.path,
      'is not contained in any diretory npm is known to control or ' +
      'any place they link to')
    return cb(clobberFail(target.path, 'containing path ' + parent.path +
      " isn't under npm's control"))
  }
github davidhealey / waistline / node_modules / npm / lib / utils / gently-rm.js View on Github external
return cb(new Error('May not delete: ' + resolved))
  }

  var options = { log: log.silly.bind(log, 'vacuum-fs') }
  if (npm.config.get('force') || !gently) options.purge = true
  if (base) options.base = normalize(resolve(npm.prefix, base))

  if (!gently) {
    log.verbose('gentlyRm', "don't care about contents; nuking", resolved)
    return vacuum(resolved, options, cb)
  }

  var parent = options.base = normalize(base ? resolve(npm.prefix, base) : npm.prefix)

  // is the parent directory managed by npm?
  log.silly('gentlyRm', 'verifying', parent, 'is an npm working directory')
  some(prefixes, isManaged(parent), function (er, matched) {
    if (er) return cb(er)

    if (!matched) {
      log.error('gentlyRm', 'containing path', parent, "isn't under npm's control")
      return clobberFail(resolved, parent, cb)
    }
    log.silly('gentlyRm', 'containing path', parent, "is under npm's control, in", matched)

    // is the target directly contained within the (now known to be
    // managed) parent?
    if (isInside(resolved, parent)) {
      log.silly('gentlyRm', 'deletion target', resolved, 'is under', parent)
      log.verbose('gentlyRm', 'vacuuming from', resolved, 'up to', parent)
      return vacuum(resolved, options, cb)
    }
github davidhealey / waistline / node_modules / npm / lib / publish.js View on Github external
mapToRegistry(data.name, config, function (er, registryURI, auth, registryBase) {
    if (er) return cb(er)

    var tarballPath = cachedir + ".tgz"

    // we just want the base registry URL in this case
    log.verbose("publish", "registryBase", registryBase)
    log.silly("publish", "uploading", tarballPath)

    data._npmUser = {
      name  : auth.username,
      email : auth.email
    }

    var params = {
      metadata : data,
      body     : createReadStream(tarballPath),
      auth     : auth
    }

    // registry-frontdoor cares about the access level, which is only
    // configurable for scoped packages
    if (config.get("access")) {
      if (!npa(data.name).scope && config.get("access") === "restricted") {
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 / cache.js View on Github external
fs.stat(process.env.HOME, function (er, st) {
    if (er) {
      log.error("makeCacheDir", "homeless?")
      return cb(er)
    }
    cacheStat = st
    log.silly("makeCacheDir", "cache dir uid, gid", [st.uid, st.gid])
    return mkdir(npm.cache, afterMkdir)
  })
github storybookjs / storybook / scripts / hoist-internals.js View on Github external
passingLog(pattern => {
      log.silly(prefix, 'pattern to look for packages: %j', pattern);
    })
  )
github liquidg3 / altair / node_modules / npm / lib / install.js View on Github external
Installer.prototype.loadShrinkwrap = function (cb) {
  validate('F', arguments)
  log.silly('install', 'loadShrinkwrap')
  var installNewModules = !!this.args.length
  if (installNewModules) {
    readShrinkwrap(this.idealTree, cb)
  } else {
    readShrinkwrap.andInflate(this.idealTree, cb)
  }
}
github graalvm / graaljs / deps / npm / node_modules / node-gyp / lib / find-vs2017.js View on Github external
function (err, stdout, stderr) {
    log.silly('find vs2017', 'PS err:', err)
    log.silly('find vs2017', 'PS stdout:', stdout)
    log.silly('find vs2017', 'PS stderr:', stderr)

    if (err)
      return callback(new Error('Could not use PowerShell to find VS2017'))

    var vsSetup
    try {
      vsSetup = JSON.parse(stdout)
    } catch (e) {
      log.silly('find vs2017', e)
      return callback(new Error('Could not use PowerShell to find VS2017'))
    }
    log.silly('find vs2017', 'vsSetup:', vsSetup)

    if (vsSetup && vsSetup.log)
      log.verbose('find vs2017', vsSetup.log.trimRight())
github cmake-js / cmake-js / lib / cmLog.js View on Github external
CMLog.prototype.silly = function(cat, msg) {
    if (this.options.noLog) {
        this.debug(cat + ": " + msg);
    }
    else {
        log.silly(cat, msg);
    }
};
github graalvm / graaljs / deps / npm / lib / cache / add-named.js View on Github external
function next (er, data, json, resp) {
    if (!er) er = errorResponse(name, resp)
    if (er) return cb(er)

    log.silly('addNameTag', 'next cb for', name, 'with tag', tag)

    engineFilter(data)
    if (data['dist-tags'] && data['dist-tags'][tag] &&
        data.versions[data['dist-tags'][tag]]) {
      var ver = data['dist-tags'][tag]
      return addNamed(name, ver, data.versions[ver], cb)
    }
    if (!explicit && Object.keys(data.versions).length) {
      return addNamed(name, '*', data, cb)
    }

    er = installTargetsError(tag, data)
    return cb(er)
  }
}
github justadudewhohacks / npm-opencv-build / build / findMsBuild.js View on Github external
.then(function (stdout) {
        log.silly('find-msbuild', 'find vs2017: ', stdout);
        var vsSetup = JSON.parse(stdout);
        if (!vsSetup || !vsSetup.path || !vsSetup.sdk) {
            return Promise.reject('unexpected powershell output');
        }
        log.silly('find-msbuild', 'found vs2017');
        log.silly('find-msbuild', 'path', vsSetup.path);
        log.silly('find-msbuild', 'sdk', vsSetup.sdk);
        var build = {
            path: path.join(vsSetup.path, 'MSBuild', '15.0', 'Bin', 'MSBuild.exe'),
            version: 15
        };
        log.silly('find-msbuild', 'using following msbuild:');
        log.silly('find-msbuild', 'version:', build.version);
        log.silly('find-msbuild', 'path:', build.path);
        return build;
    });
}