[6a3a178] | 1 | const { get } = require('./fetcher.js')
|
---|
| 2 | const GitFetcher = require('./git.js')
|
---|
| 3 | const RegistryFetcher = require('./registry.js')
|
---|
| 4 | const FileFetcher = require('./file.js')
|
---|
| 5 | const DirFetcher = require('./dir.js')
|
---|
| 6 | const RemoteFetcher = require('./remote.js')
|
---|
| 7 |
|
---|
| 8 | module.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 | }
|
---|
| 20 | module.exports.tarball.stream = (spec, handler, opts) =>
|
---|
| 21 | get(spec, opts).tarballStream(handler)
|
---|
| 22 | module.exports.tarball.file = (spec, dest, opts) =>
|
---|
| 23 | get(spec, opts).tarballFile(dest)
|
---|