GRAYBYTE WORDPRESS FILE MANAGER1716

Server IP : 198.54.121.189 / Your IP : 216.73.216.112
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 : /usr/lib/node_modules/npm/node_modules/pacote/
Upload Files :
Current_dir [ Not Writeable ] Document_root [ Writeable ]

Command :


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

const BB = require('bluebird')

const cacache = require('cacache')
const finished = BB.promisify(require('mississippi').finished)
const optCheck = require('./lib/util/opt-check')
const npa = require('npm-package-arg')

module.exports = prefetch
function prefetch (spec, opts) {
  opts = optCheck(opts)
  spec = npa(spec, opts.where)
  opts.log.warn('prefetch', 'pacote.prefetch() is deprecated. Please use pacote.tarball() instead.')
  const startTime = Date.now()
  if (!opts.cache) {
    opts.log.info('prefetch', 'skipping prefetch: no cache provided')
    return BB.resolve({ spec })
  }
  if (opts.integrity && !opts.preferOnline) {
    opts.log.silly('prefetch', 'checking if', opts.integrity, 'is already cached')
    return cacache.get.hasContent(opts.cache, opts.integrity).then(info => {
      if (info) {
        opts.log.silly('prefetch', `content already exists for ${spec} (${Date.now() - startTime}ms)`)
        return {
          spec,
          integrity: info.integrity,
          size: info.size,
          byDigest: true
        }
      } else {
        return prefetchByManifest(startTime, spec, opts)
      }
    })
  } else {
    opts.log.silly('prefetch', `no integrity hash provided for ${spec} - fetching by manifest`)
    return prefetchByManifest(startTime, spec, opts)
  }
}

let fetch
function prefetchByManifest (start, spec, opts) {
  let manifest
  let integrity
  return BB.resolve().then(() => {
    if (!fetch) {
      fetch = require('./lib/fetch')
    }
    const stream = fetch.tarball(spec, opts)
    if (!stream) { return }
    stream.on('data', function () {})
    stream.on('manifest', m => { manifest = m })
    stream.on('integrity', i => { integrity = i })
    return finished(stream)
  }).then(() => {
    opts.log.silly('prefetch', `${spec} done in ${Date.now() - start}ms`)
    return {
      manifest,
      spec,
      integrity: integrity || (manifest && manifest._integrity),
      byDigest: false
    }
  })
}

[ 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