����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 :  /proc/self/root/home/real/node-v13.0.1/deps/npm/test/tap/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/self/root/home/real/node-v13.0.1/deps/npm/test/tap/pack-scoped.js
// verify that prepublish runs on pack and publish
var test = require('tap').test
var common = require('../common-tap')
var fs = require('graceful-fs')
var join = require('path').join
var mkdirp = require('mkdirp')
var rimraf = require('rimraf')

var pkg = common.pkg
var manifest = join(pkg, 'package.json')
var tmp = join(pkg, 'tmp')
var cache = common.cache

var data = {
  name: '@scope/generic-package',
  version: '90000.100001.5'
}

test('setup', function (t) {
  var n = 0

  rimraf.sync(pkg)

  mkdirp(pkg, then())
  mkdirp(cache, then())
  mkdirp(tmp, then())

  function then () {
    n++
    return function (er) {
      t.ifError(er)
      if (--n === 0) next()
    }
  }

  function next () {
    fs.writeFile(manifest, JSON.stringify(data), 'ascii', done)
  }

  function done (er) {
    t.ifError(er)

    t.pass('setup done')
    t.end()
  }
})

test('test', function (t) {
  var env = {
    'npm_config_cache': cache,
    'npm_config_tmp': tmp,
    'npm_config_prefix': pkg,
    'npm_config_global': 'false'
  }

  for (var i in process.env) {
    if (!/^npm_config_/.test(i)) env[i] = process.env[i]
  }

  common.npm([
    'pack',
    '--loglevel', 'warn'
  ], {
    cwd: pkg,
    env: env
  }, function (err, code, stdout, stderr) {
    t.ifErr(err, 'npm pack finished without error')
    t.equal(code, 0, 'npm pack exited ok')
    t.notOk(stderr, 'got stderr data: ' + JSON.stringify('' + stderr))
    stdout = stdout.trim()
    var regex = new RegExp('scope-generic-package-90000.100001.5.tgz', 'ig')
    t.ok(stdout.match(regex), 'found package')
    t.end()
  })
})

test('cleanup', function (t) {
  rimraf.sync(pkg)
  t.pass('cleaned up')
  t.end()
})

ZeroDay Forums Mini