@pnpm/pnpr 0.0.0-26052601 → 0.0.0-26052901
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 +62 -4
- package/package.json +9 -9
package/README.md
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
# @pnpm/pnpr
|
|
2
2
|
|
|
3
|
-
A pnpm-compatible npm registry server, written in Rust.
|
|
3
|
+
A pnpm-compatible npm registry server, written in Rust. Speaks the npm
|
|
4
|
+
registry protocol, so any npm-compatible client (pnpm, npm, yarn) can
|
|
5
|
+
talk to it. Proxies packages from a configured upstream like
|
|
6
|
+
npmjs.org and serves them with its own auth and access controls.
|
|
4
7
|
|
|
5
|
-
Lives in the [pnpm monorepo](https://github.com/pnpm/pnpm) under
|
|
8
|
+
Lives in the [pnpm monorepo](https://github.com/pnpm/pnpm) under
|
|
9
|
+
[`pnpr/`](https://github.com/pnpm/pnpm/tree/main/pnpr).
|
|
6
10
|
|
|
7
11
|
## Install
|
|
8
12
|
|
|
@@ -11,10 +15,64 @@ pnpm add -g @pnpm/pnpr
|
|
|
11
15
|
```
|
|
12
16
|
|
|
13
17
|
The wrapper resolves to the native binary published under
|
|
14
|
-
`@pnpm/pnpr.<platform>-<arch>` (e.g. `@pnpm/pnpr.linux-x64`).
|
|
18
|
+
`@pnpm/pnpr.<platform>-<arch>` (e.g. `@pnpm/pnpr.linux-x64`). Prebuilt
|
|
19
|
+
binaries are available for `linux-x64`, `linux-arm64`, `darwin-x64`,
|
|
20
|
+
`darwin-arm64`, `win32-x64`, and `win32-arm64`.
|
|
15
21
|
|
|
16
22
|
## Usage
|
|
17
23
|
|
|
24
|
+
Start the server with the bundled default config:
|
|
25
|
+
|
|
26
|
+
```sh
|
|
27
|
+
pnpr
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
It listens on `127.0.0.1:4873` and proxies `https://registry.npmjs.org/`
|
|
31
|
+
by default. Point a client at it with:
|
|
32
|
+
|
|
33
|
+
```sh
|
|
34
|
+
pnpm config set registry http://127.0.0.1:4873/
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## CLI flags
|
|
38
|
+
|
|
39
|
+
| Flag | Description |
|
|
40
|
+
| --- | --- |
|
|
41
|
+
| `-c, --config <path>` | Path to a verdaccio-shaped YAML config. When omitted, the bundled default is used. |
|
|
42
|
+
| `--listen <addr>` | Address to bind to. Defaults to `127.0.0.1:4873`. |
|
|
43
|
+
| `--storage <path>` | Override the storage directory from the loaded config. |
|
|
44
|
+
| `--public-url <url>` | URL clients should use to reach the server, used when rewriting `dist.tarball` in served packuments. Defaults to `http://<listen>`. |
|
|
45
|
+
| `--packument-ttl-secs <n>` | Seconds before a cached packument is considered stale and refetched. |
|
|
46
|
+
|
|
47
|
+
Log level is controlled via the standard `RUST_LOG` environment
|
|
48
|
+
variable (e.g. `RUST_LOG=debug pnpr`).
|
|
49
|
+
|
|
50
|
+
## Configuration
|
|
51
|
+
|
|
52
|
+
`pnpr` uses a [verdaccio](https://verdaccio.org/docs/configuration)-shaped
|
|
53
|
+
YAML config. A minimal example:
|
|
54
|
+
|
|
55
|
+
```yaml
|
|
56
|
+
storage: ./storage
|
|
57
|
+
|
|
58
|
+
uplinks:
|
|
59
|
+
npmjs:
|
|
60
|
+
url: https://registry.npmjs.org/
|
|
61
|
+
|
|
62
|
+
packages:
|
|
63
|
+
'@*/*':
|
|
64
|
+
access: $all
|
|
65
|
+
publish: $authenticated
|
|
66
|
+
proxy: npmjs
|
|
67
|
+
|
|
68
|
+
'**':
|
|
69
|
+
access: $all
|
|
70
|
+
publish: $authenticated
|
|
71
|
+
proxy: npmjs
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Pass it with `-c`:
|
|
75
|
+
|
|
18
76
|
```sh
|
|
19
|
-
pnpr
|
|
77
|
+
pnpr -c ./pnpr.yaml
|
|
20
78
|
```
|
package/package.json
CHANGED
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
"registry"
|
|
8
8
|
],
|
|
9
9
|
"license": "MIT",
|
|
10
|
-
"homepage": "https://github.com/pnpm/pnpm/tree/main/
|
|
10
|
+
"homepage": "https://github.com/pnpm/pnpm/tree/main/pnpr",
|
|
11
11
|
"bugs": "https://github.com/pnpm/pnpm/issues",
|
|
12
12
|
"repository": {
|
|
13
13
|
"type": "git",
|
|
14
14
|
"url": "https://github.com/pnpm/pnpm",
|
|
15
|
-
"directory": "
|
|
15
|
+
"directory": "pnpr/npm/pnpr"
|
|
16
16
|
},
|
|
17
17
|
"engines": {
|
|
18
18
|
"node": ">=18.*"
|
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
"files": [
|
|
21
21
|
"bin/pnpr"
|
|
22
22
|
],
|
|
23
|
-
"version": "0.0.0-
|
|
23
|
+
"version": "0.0.0-26052901",
|
|
24
24
|
"optionalDependencies": {
|
|
25
|
-
"@pnpm/pnpr.win32-x64": "0.0.0-
|
|
26
|
-
"@pnpm/pnpr.win32-arm64": "0.0.0-
|
|
27
|
-
"@pnpm/pnpr.darwin-x64": "0.0.0-
|
|
28
|
-
"@pnpm/pnpr.darwin-arm64": "0.0.0-
|
|
29
|
-
"@pnpm/pnpr.linux-x64": "0.0.0-
|
|
30
|
-
"@pnpm/pnpr.linux-arm64": "0.0.0-
|
|
25
|
+
"@pnpm/pnpr.win32-x64": "0.0.0-26052901",
|
|
26
|
+
"@pnpm/pnpr.win32-arm64": "0.0.0-26052901",
|
|
27
|
+
"@pnpm/pnpr.darwin-x64": "0.0.0-26052901",
|
|
28
|
+
"@pnpm/pnpr.darwin-arm64": "0.0.0-26052901",
|
|
29
|
+
"@pnpm/pnpr.linux-x64": "0.0.0-26052901",
|
|
30
|
+
"@pnpm/pnpr.linux-arm64": "0.0.0-26052901"
|
|
31
31
|
},
|
|
32
32
|
"bin": {
|
|
33
33
|
"pnpr": "bin/pnpr"
|