alias.js 554 B

123456789101112131415161718192021222324
  1. 'use strict'
  2. const Fetcher = require('../fetch')
  3. const fetchRegistry = require('./registry')
  4. const fetchRemote = module.exports = Object.create(null)
  5. Fetcher.impl(fetchRemote, {
  6. packument (spec, opts) {
  7. return fetchRegistry.packument(spec.subSpec, opts)
  8. },
  9. manifest (spec, opts) {
  10. return fetchRegistry.manifest(spec.subSpec, opts)
  11. },
  12. tarball (spec, opts) {
  13. return fetchRegistry.tarball(spec.subSpec, opts)
  14. },
  15. fromManifest (manifest, spec, opts) {
  16. return fetchRegistry.fromManifest(manifest, spec.subSpec, opts)
  17. }
  18. })