$28 GRAYBYTE WORDPRESS FILE MANAGER $64

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 104.21.43.35 | ADMIN IP 216.73.216.180
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : mail

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

HOME
Current File : /opt/alt/alt-nodejs9/root/usr/lib/node_modules/npm/node_modules.bundled/pacote/lib//fetch.js
'use strict'

const duck = require('protoduck')

const Fetcher = duck.define(['spec', 'opts', 'manifest'], {
  manifest: ['spec', 'opts'],
  tarball: ['spec', 'opts'],
  fromManifest: ['manifest', 'spec', 'opts'],
  clearMemoized () {}
}, {name: 'Fetcher'})
module.exports = Fetcher

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 '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]
}


Current_dir [ NOT WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
1 Jan 1970 12.00 AM
root / root
0
fetchers
--
3 Mar 2024 10.42 PM
root / root
0755
util
--
3 Mar 2024 10.42 PM
root / root
0755
extract-stream.js
1.588 KB
28 Sep 2021 11.28 AM
root / root
0644
fetch.js
1.853 KB
28 Sep 2021 11.28 AM
root / root
0644
finalize-manifest.js
8.059 KB
28 Sep 2021 11.28 AM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF