GRAYBYTE WORDPRESS FILE MANAGER2417

Server IP : 198.54.121.189 / Your IP : 216.73.216.224
System : Linux premium69.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /lib/node_modules/npm/node_modules/pacote/
Upload Files :
Current_dir [ Not Writeable ] Document_root [ Writeable ]

Command :


Current File : /lib/node_modules/npm/node_modules/pacote//tarball.js
'use strict'

const BB = require('bluebird')

const fs = require('fs')
const getStream = require('get-stream')
const mkdirp = BB.promisify(require('mkdirp'))
const npa = require('npm-package-arg')
const optCheck = require('./lib/util/opt-check.js')
const PassThrough = require('stream').PassThrough
const path = require('path')
const rimraf = BB.promisify(require('rimraf'))
const withTarballStream = require('./lib/with-tarball-stream.js')

module.exports = tarball
function tarball (spec, opts) {
  opts = optCheck(opts)
  spec = npa(spec, opts.where)
  return withTarballStream(spec, opts, stream => getStream.buffer(stream))
}

module.exports.stream = tarballStream
function tarballStream (spec, opts) {
  opts = optCheck(opts)
  spec = npa(spec, opts.where)
  const output = new PassThrough()
  let hasTouchedOutput = false
  let lastError = null
  withTarballStream(spec, opts, stream => {
    if (hasTouchedOutput && lastError) {
      throw lastError
    } else if (hasTouchedOutput) {
      throw new Error('abort, abort!')
    } else {
      return new BB((resolve, reject) => {
        stream.on('error', reject)
        output.on('error', reject)
        output.on('error', () => { hasTouchedOutput = true })
        output.on('finish', resolve)
        stream.pipe(output)
        stream.once('data', () => { hasTouchedOutput = true })
      }).catch(err => {
        lastError = err
        throw err
      })
    }
  })
    .catch(err => output.emit('error', err))
  return output
}

module.exports.toFile = tarballToFile
function tarballToFile (spec, dest, opts) {
  opts = optCheck(opts)
  spec = npa(spec, opts.where)
  return mkdirp(path.dirname(dest))
    .then(() => withTarballStream(spec, opts, stream => {
      return rimraf(dest)
        .then(() => new BB((resolve, reject) => {
          const writer = fs.createWriteStream(dest)
          stream.on('error', reject)
          writer.on('error', reject)
          writer.on('close', resolve)
          stream.pipe(writer)
        }))
    }))
}

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
March 03 2024 22:36:29
root / root
0755
lib
--
March 03 2024 22:36:29
root / root
0755
node_modules
--
March 03 2024 22:36:29
root / root
0755
CHANGELOG.md
43.395 KB
March 10 2021 14:36:37
root / root
0644
LICENSE
1.077 KB
March 10 2021 14:36:37
root / root
0644
README.md
9.603 KB
March 10 2021 14:36:37
root / root
0644
extract.js
2.992 KB
March 10 2021 14:36:37
root / root
0644
index.js
0.256 KB
March 10 2021 14:36:37
root / root
0644
manifest.js
1.12 KB
March 10 2021 14:36:37
root / root
0644
package.json
3.35 KB
March 10 2021 14:36:37
root / root
0644
packument.js
0.803 KB
March 10 2021 14:36:37
root / root
0644
prefetch.js
1.932 KB
March 10 2021 14:36:37
root / root
0644
tarball.js
1.975 KB
March 10 2021 14:36:37
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF