����JFIF��� ( %"1"%)+...383,7(-.- 404 Not Found
Sh3ll
OdayForums


Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20
System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64
User : apache ( 48)
PHP Version : 7.4.20
Disable Function : NONE
Directory :  /home/real/node-v13.0.1/deps/npm/test/tap/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //home/real/node-v13.0.1/deps/npm/test/tap/unpublish-config.js
var fs = require('graceful-fs')
var http = require('http')
var path = require('path')

var mkdirp = require('mkdirp')
var osenv = require('osenv')
var rimraf = require('rimraf')
var test = require('tap').test

var common = require('../common-tap.js')
var pkg = common.pkg
var fixturePath = path.join(pkg, 'fixture_npmrc')

var json = {
  name: 'npm-test-unpublish-config',
  version: '1.2.3',
  publishConfig: { registry: common.registry }
}

test('setup', function (t) {
  mkdirp.sync(pkg)

  fs.writeFileSync(
    path.join(pkg, 'package.json'),
    JSON.stringify(json), 'utf8'
  )
  fs.writeFileSync(
    fixturePath,
    '//localhost:' + common.port + '/:_authToken = beeeeeeeeeeeeef\n' +
      'registry = http://lvh.me:4321/registry/path\n'
  )

  t.end()
})

test('cursory test of unpublishing with config', function (t) {
  var child
  t.plan(4)
  http.createServer(function (req, res) {
    t.pass('got request on the fakey fake registry')
    this.close()
    res.statusCode = 500
    res.end(JSON.stringify({
      error: 'shh no tears, only dreams now'
    }))
    child.kill('SIGINT')
  }).listen(common.port, function () {
    t.pass('server is listening')

    child = common.npm(
      [
        '--userconfig', fixturePath,
        '--loglevel', 'error',
        '--force',
        'unpublish'
      ],
      {
        cwd: pkg,
        stdio: 'inherit',
        env: {
          'npm_config_cache_lock_stale': 1000,
          'npm_config_cache_lock_wait': 1000,
          HOME: process.env.HOME,
          Path: process.env.PATH,
          PATH: process.env.PATH,
          USERPROFILE: osenv.home()
        }
      },
      function (err, code) {
        t.ifError(err, 'publish command finished successfully')
        t.notOk(code, 'npm install exited with code 0')
      }
    )
  })
})

test('cleanup', function (t) {
  process.chdir(osenv.tmpdir())
  rimraf.sync(pkg)
  t.end()
})

ZeroDay Forums Mini