xref: /third_party/node/deps/npm/node_modules/pacote/lib/index.js (revision 1cb0ef41)
  • Home
  • History
  • Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/node/deps/npm/node_modules/pacote/lib/
1const { get } = require('./fetcher.js')
2const GitFetcher = require('./git.js')
3const RegistryFetcher = require('./registry.js')
4const FileFetcher = require('./file.js')
5const DirFetcher = require('./dir.js')
6const RemoteFetcher = require('./remote.js')
7
8module.exports = {
9  GitFetcher,
10  RegistryFetcher,
11  FileFetcher,
12  DirFetcher,
13  RemoteFetcher,
14  resolve: (spec, opts) => get(spec, opts).resolve(),
15  extract: (spec, dest, opts) => get(spec, opts).extract(dest),
16  manifest: (spec, opts) => get(spec, opts).manifest(),
17  tarball: (spec, opts) => get(spec, opts).tarball(),
18  packument: (spec, opts) => get(spec, opts).packument(),
19}
20module.exports.tarball.stream = (spec, handler, opts) =>
21  get(spec, opts).tarballStream(handler)
22module.exports.tarball.file = (spec, dest, opts) =>
23  get(spec, opts).tarballFile(dest)
24

Indexes created Thu Nov 07 10:32:03 CST 2024