@verdaccio/tarball 13.0.0-next-8.38 → 13.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +39 -0
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -15,6 +15,45 @@
|
|
|
15
15
|
[](https://hub.docker.com/r/verdaccio/verdaccio)
|
|
16
16
|
[](https://github.com/verdaccio/verdaccio/stargazers)
|
|
17
17
|
|
|
18
|
+
> **Note:** This package is mostly for internal use by Verdaccio and is only intended to be used with Verdaccio 6.x.
|
|
19
|
+
|
|
20
|
+
## Overview
|
|
21
|
+
|
|
22
|
+
The `@verdaccio/tarball` package provides utilities for converting tarball URLs between remote and local registry formats, and for extracting metadata from tarball archives.
|
|
23
|
+
|
|
24
|
+
## Installation
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
npm install @verdaccio/tarball
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Usage
|
|
31
|
+
|
|
32
|
+
```typescript
|
|
33
|
+
import {
|
|
34
|
+
convertDistRemoteToLocalTarballUrls,
|
|
35
|
+
convertDistVersionToLocalTarballsUrl,
|
|
36
|
+
getTarballDetails,
|
|
37
|
+
} from '@verdaccio/tarball';
|
|
38
|
+
|
|
39
|
+
// Convert all remote tarball URLs in a package manifest to local URLs
|
|
40
|
+
const localPkg = convertDistRemoteToLocalTarballUrls(pkg, request, urlPrefix);
|
|
41
|
+
|
|
42
|
+
// Convert a single version's tarball URL
|
|
43
|
+
const localVersion = convertDistVersionToLocalTarballsUrl(name, version, request, urlPrefix);
|
|
44
|
+
|
|
45
|
+
// Extract tarball metadata
|
|
46
|
+
const details = await getTarballDetails(tarballBuffer);
|
|
47
|
+
// { fileCount: 42, unpackedSize: 102400 }
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### API
|
|
51
|
+
|
|
52
|
+
- **`convertDistRemoteToLocalTarballUrls(pkg, request, urlPrefix)`** - Converts all remote tarball URLs in a package manifest to local registry URLs
|
|
53
|
+
- **`convertDistVersionToLocalTarballsUrl(name, version, request, urlPrefix)`** - Converts the tarball URL for a single version
|
|
54
|
+
- **`getLocalRegistryTarballUri(tarballUrl, name, request, urlPrefix)`** - Gets the local tarball URI for a given remote tarball URL
|
|
55
|
+
- **`getTarballDetails(buffer)`** - Extracts file count and unpacked size from a tarball buffer
|
|
56
|
+
|
|
18
57
|
## Donations
|
|
19
58
|
|
|
20
59
|
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.** 😉
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@verdaccio/tarball",
|
|
3
|
-
"version": "13.0.
|
|
3
|
+
"version": "13.0.1",
|
|
4
4
|
"description": "Verdaccio Tarball Utilities",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"private",
|
|
@@ -33,16 +33,16 @@
|
|
|
33
33
|
"access": "public"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@verdaccio/core": "8.
|
|
37
|
-
"@verdaccio/url": "13.0.
|
|
36
|
+
"@verdaccio/core": "8.1.0",
|
|
37
|
+
"@verdaccio/url": "13.0.1",
|
|
38
38
|
"debug": "4.4.3",
|
|
39
39
|
"gunzip-maybe": "1.4.2",
|
|
40
40
|
"tar-stream": "3.1.7"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@verdaccio/types": "13.0.0
|
|
43
|
+
"@verdaccio/types": "13.0.0",
|
|
44
44
|
"node-mocks-http": "1.14.1",
|
|
45
|
-
"vitest": "
|
|
45
|
+
"vitest": "4.1.2"
|
|
46
46
|
},
|
|
47
47
|
"funding": {
|
|
48
48
|
"type": "opencollective",
|