REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 1.93 KB
Close
//usr/lib/node_modules/npm/node_modules/pacote/prefetch.js
Text
Base64
'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 } }) }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 2 × Files: 10
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
lib
DIR
-
drwxr-xr-x
2024-03-03 22:36:29
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
node_modules
DIR
-
drwxr-xr-x
2024-03-03 22:36:29
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
CHANGELOG.md
43.39 KB
lrw-r--r--
2021-03-10 14:36:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
extract.js
2.99 KB
lrw-r--r--
2021-03-10 14:36:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
index.js
262 B
lrw-r--r--
2021-03-10 14:36:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
LICENSE
1.08 KB
lrw-r--r--
2021-03-10 14:36:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
manifest.js
1.12 KB
lrw-r--r--
2021-03-10 14:36:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
package.json
3.35 KB
lrw-r--r--
2021-03-10 14:36:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
packument.js
822 B
lrw-r--r--
2021-03-10 14:36:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
prefetch.js
1.93 KB
lrw-r--r--
2021-03-10 14:36:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
README.md
9.60 KB
lrw-r--r--
2021-03-10 14:36:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
tarball.js
1.97 KB
lrw-r--r--
2021-03-10 14:36:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).