[ Th3_Err0r Bypassed ]




Upload:

Command:

liwaavux@216.73.216.150: ~ $
'use strict'
var validate = require('aproba')
var asyncMap = require('slide').asyncMap
var chain = require('slide').chain
var npmInstallChecks = require('npm-install-checks')
var iferr = require('iferr')
var checkEngine = npmInstallChecks.checkEngine
var checkPlatform = npmInstallChecks.checkPlatform
var npm = require('../npm.js')

module.exports = function (idealTree, args, next) {
  validate('OAF', arguments)
  var force = npm.config.get('force')

  asyncMap(args, function (pkg, done) {
    chain([
      [checkSelf, idealTree, pkg, force],
      [isInstallable, pkg]
    ], done)
  }, next)
}

function getWarnings (pkg) {
  while (pkg.parent) pkg = pkg.parent
  if (!pkg.warnings) pkg.warnings = []
  return pkg.warnings
}

var isInstallable = module.exports.isInstallable = function (pkg, next) {
  var force = npm.config.get('force')
  var nodeVersion = npm.config.get('node-version')
  if (/-/.test(nodeVersion)) {
    // for the purposes of validation, if the node version is a prerelease,
    // strip that. We check and warn about this sceanrio over in validate-tree.
    nodeVersion = nodeVersion.replace(/-.*/, '')
  }
  var strict = npm.config.get('engine-strict')
  checkEngine(pkg, npm.version, nodeVersion, force, strict, iferr(next, thenWarnEngineIssues))
  function thenWarnEngineIssues (warn) {
    if (warn) getWarnings(pkg).push(warn)
    checkPlatform(pkg, force, next)
  }
}

function checkSelf (idealTree, pkg, force, next) {
  if (idealTree.package && idealTree.package.name !== pkg.name) return next()
  if (force) {
    var warn = new Error("Wouldn't install " + pkg.name + ' as a dependency of itself, but being forced')
    warn.code = 'ENOSELF'
    idealTree.warnings.push(warn)
    next()
  } else {
    var er = new Error('Refusing to install ' + pkg.name + ' as a dependency of itself')
    er.code = 'ENOSELF'
    next(er)
  }
}

Filemanager

Name Type Size Permission Actions
action Folder 0755
access-error.js File 202 B 0644
actions.js File 4.97 KB 0644
and-add-parent-to-errors.js File 324 B 0644
and-finish-tracker.js File 360 B 0644
and-ignore-errors.js File 204 B 0644
build-path.js File 243 B 0644
check-permissions.js File 1.85 KB 0644
copy-tree.js File 625 B 0644
decompose-actions.js File 1.54 KB 0644
deps.js File 23.23 KB 0644
diff-trees.js File 5.01 KB 0644
exists.js File 775 B 0644
filter-invalid-actions.js File 1 KB 0644
flatten-tree.js File 1023 B 0644
inflate-bundled.js File 492 B 0644
inflate-shrinkwrap.js File 3.65 KB 0644
is-dev-dep.js File 175 B 0644
is-extraneous.js File 889 B 0644
is-fs-access-available.js File 763 B 0644
is-opt-dep.js File 185 B 0644
is-prod-dep.js File 172 B 0644
is-registry-specifier.js File 172 B 0644
mutate-into-logical-tree.js File 4.22 KB 0644
node.js File 1.43 KB 0644
read-shrinkwrap.js File 884 B 0644
realize-shrinkwrap-specifier.js File 661 B 0644
report-optional-failure.js File 1.02 KB 0644
save.js File 6.38 KB 0644
update-package-json.js File 1.52 KB 0644
validate-args.js File 1.82 KB 0644
validate-tree.js File 2.55 KB 0644
writable.js File 1 KB 0644