Current Path: > > usr > lib > node_modules > npm > > node_modules > pacote > > lib
Operation : Linux host59.registrar-servers.com 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64 Software : Apache Server IP : 198.54.126.42 | Your IP: 216.73.216.8 Domains : 1034 Domain(s) Permission : [ 0755 ]
Name | Type | Size | Last Modified | Actions |
---|---|---|---|---|
fetchers | Directory | - | - | |
util | Directory | - | - | |
extract-stream.js | File | 2506 bytes | March 10 2021 14:36:37. | |
fetch.js | File | 2170 bytes | March 10 2021 14:36:37. | |
finalize-manifest.js | File | 8535 bytes | March 10 2021 14:36:37. | |
with-tarball-stream.js | File | 4845 bytes | March 10 2021 14:36:37. |
'use strict' const duck = require('protoduck') const Fetcher = duck.define(['spec', 'opts', 'manifest'], { packument: ['spec', 'opts'], manifest: ['spec', 'opts'], tarball: ['spec', 'opts'], fromManifest: ['manifest', 'spec', 'opts'], clearMemoized () {} }, { name: 'Fetcher' }) module.exports = Fetcher module.exports.packument = packument function packument (spec, opts) { const fetcher = getFetcher(spec.type) return fetcher.packument(spec, opts) } module.exports.manifest = manifest function manifest (spec, opts) { const fetcher = getFetcher(spec.type) return fetcher.manifest(spec, opts) } module.exports.tarball = tarball function tarball (spec, opts) { return getFetcher(spec.type).tarball(spec, opts) } module.exports.fromManifest = fromManifest function fromManifest (manifest, spec, opts) { return getFetcher(spec.type).fromManifest(manifest, spec, opts) } const fetchers = {} module.exports.clearMemoized = clearMemoized function clearMemoized () { Object.keys(fetchers).forEach(k => { fetchers[k].clearMemoized() }) } function getFetcher (type) { if (!fetchers[type]) { // This is spelled out both to prevent sketchy stuff and to make life // easier for bundlers/preprocessors. switch (type) { case 'alias': fetchers[type] = require('./fetchers/alias') break case 'directory': fetchers[type] = require('./fetchers/directory') break case 'file': fetchers[type] = require('./fetchers/file') break case 'git': fetchers[type] = require('./fetchers/git') break case 'hosted': fetchers[type] = require('./fetchers/hosted') break case 'range': fetchers[type] = require('./fetchers/range') break case 'remote': fetchers[type] = require('./fetchers/remote') break case 'tag': fetchers[type] = require('./fetchers/tag') break case 'version': fetchers[type] = require('./fetchers/version') break default: throw new Error(`Invalid dependency type requested: ${type}`) } } return fetchers[type] }
SILENT KILLER Tool