remote-tarball-fetcher
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

remote-tarball-fetcher allows to fetch tarballs from registries such as npm and GitHub and manage them locally.

✅ npm registry ⚠️ GitHub registry (work in progress)

Fetching tarballs from the npm registry

import { TarballManager, npmFetcher } from "remote-tarball-fetcher";

const manager = new TarballManager(npmFetcher);

Download latest versions available in the registry:

// both tarballs will be stored in a local registry, default to os.tmpdir();
const location1 = await manager.downloadAndStore("lodash");
const location2 = await manager.downloadAndStore("@nodesecure/ci");

// won't be downloaded again as is automatically managed by a local cache
const sameAsLocation1 = await manager.downloadAndStore("lodash");

Or target specific versions using semantic versioning:

const location = await manager.downloadAndStore("skott@0.2.0");

Package Sidebar

Install

npm i remote-tarball-fetcher

Weekly Downloads

1

Version

0.1.0

License

MIT

Unpacked Size

21.5 kB

Total Files

21

Last publish

Collaborators

  • antoine-coulon