@verdaccio/tarball
v13.0.0
Published
Verdaccio Tarball Utilities
Readme
@verdaccio/tarball - Verdaccio Tarball Utilities
Note: This package is mostly for internal use by Verdaccio and is only intended to be used with Verdaccio 6.x.
Overview
The @verdaccio/tarball package provides utilities for converting tarball URLs between remote and local registry formats, and for extracting metadata from tarball archives.
Installation
npm install @verdaccio/tarballUsage
import {
convertDistRemoteToLocalTarballUrls,
convertDistVersionToLocalTarballsUrl,
getTarballDetails,
} from '@verdaccio/tarball';
// Convert all remote tarball URLs in a package manifest to local URLs
const localPkg = convertDistRemoteToLocalTarballUrls(pkg, request, urlPrefix);
// Convert a single version's tarball URL
const localVersion = convertDistVersionToLocalTarballsUrl(name, version, request, urlPrefix);
// Extract tarball metadata
const details = await getTarballDetails(tarballBuffer);
// { fileCount: 42, unpackedSize: 102400 }API
convertDistRemoteToLocalTarballUrls(pkg, request, urlPrefix)- Converts all remote tarball URLs in a package manifest to local registry URLsconvertDistVersionToLocalTarballsUrl(name, version, request, urlPrefix)- Converts the tarball URL for a single versiongetLocalRegistryTarballUri(tarballUrl, name, request, urlPrefix)- Gets the local tarball URI for a given remote tarball URLgetTarballDetails(buffer)- Extracts file count and unpacked size from a tarball buffer
Donations
Verdaccio is run by volunteers; nobody is working full-time on it. If you find this project to be useful and would like to support its development, consider making a donation - your logo might end up in this readme. 😉
Donate 💵👍🏻 starting from $1/month or just one single contribution.
Report a vulnerability
If you want to report a security vulnerability, please follow the steps which we have defined for you in our security policy.
Open Collective Sponsors
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]
Open Collective Backers
Thank you to all our backers! 🙏 [Become a backer]
Special Thanks
Thanks to the following companies to help us to achieve our goals providing free open source licenses.
Contributors
This project exists thanks to all the people who contribute. [Contribute].
FAQ / Contact / Troubleshoot
If you have any issue you can try the following options. Do not hesitate to ask or check our issues database. Perhaps someone has asked already what you are looking for.
License
Verdaccio is MIT licensed
The Verdaccio documentation and logos (excluding /thanks, e.g., .md, .png, .sketch files within the /assets folder) are Creative Commons licensed.


