$83 GRAYBYTE WORDPRESS FILE MANAGER $41

SERVER : vnpttt-amd7f72-h1.vietnix.vn #1 SMP Fri May 24 12:42:50 UTC 2024
SERVER IP : 103.200.23.149 | ADMIN IP 216.73.216.22
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/alt/alt-nodejs10/root/usr/lib/node_modules/npm/node_modules.bundled/pacote/

HOME
Current File : /opt/alt/alt-nodejs10/root/usr/lib/node_modules/npm/node_modules.bundled/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)
        }))
    }))
}

Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
31 Aug 2024 8.02 AM
root / root
0755
lib
--
31 Aug 2024 8.02 AM
root / root
0755
node_modules
--
31 Aug 2024 8.02 AM
root / root
0755
CHANGELOG.md
43.395 KB
22 Mar 2023 5.59 PM
root / root
0644
LICENSE
1.077 KB
22 Mar 2023 5.59 PM
root / root
0644
README.md
9.603 KB
22 Mar 2023 5.59 PM
root / root
0644
extract.js
2.992 KB
22 Mar 2023 5.59 PM
root / root
0644
index.js
0.256 KB
22 Mar 2023 5.59 PM
root / root
0644
manifest.js
1.12 KB
22 Mar 2023 5.59 PM
root / root
0644
package.json
3.35 KB
22 Mar 2023 5.59 PM
root / root
0644
packument.js
0.803 KB
22 Mar 2023 5.59 PM
root / root
0644
prefetch.js
1.932 KB
22 Mar 2023 5.59 PM
root / root
0644
tarball.js
1.975 KB
22 Mar 2023 5.59 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF