mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-11-08 23:25:51 +01:00
chore: update website config 6.x
This commit is contained in:
parent
100421624f
commit
14c1c829e8
@ -415,18 +415,18 @@ module.exports = {
|
||||
}
|
||||
return `https://github.com/verdaccio/verdaccio/edit/master/website/docs/${docPath}`;
|
||||
},
|
||||
lastVersion: '5.x',
|
||||
lastVersion: '6.x',
|
||||
// onlyIncludeVersions: ['next', '5.x', '6.x'],
|
||||
versions: {
|
||||
// current: {
|
||||
// label: `next`,
|
||||
// },
|
||||
'6.x': {
|
||||
label: `6.x`,
|
||||
'7.x': {
|
||||
label: `7.x`,
|
||||
banner: 'unreleased',
|
||||
},
|
||||
'5.x': {
|
||||
label: `5.x`,
|
||||
'6.x': {
|
||||
label: `6.x`,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -1,3 +0,0 @@
|
||||
# 5.x API
|
||||
|
||||
Go to [Node-API](https://verdaccio.org/docs/verdaccio-programmatically).
|
@ -1,16 +1,3 @@
|
||||
---
|
||||
id: 'index'
|
||||
title: '@verdaccio/node-api'
|
||||
sidebar_label: 'Readme'
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
# 5.x API
|
||||
|
||||
# @verdaccio/node-api
|
||||
|
||||
### License
|
||||
|
||||
Verdaccio is [MIT licensed](https://github.com/verdaccio/verdaccio/blob/master/LICENSE)
|
||||
|
||||
The Verdaccio documentation and logos (excluding /thanks, e.g., .md, .png, .sketch) files within the /assets folder) is
|
||||
[Creative Commons licensed](https://github.com/verdaccio/verdaccio/blob/master/LICENSE-docs).
|
||||
Go to [Node-API](https://verdaccio.org/docs/verdaccio-programmatically).
|
||||
|
@ -3,7 +3,7 @@ id: cli-registry
|
||||
title: 'Using a private registry'
|
||||
---
|
||||
|
||||
Setting up a private registry is quite easy on all major Package managers and can be achieved in a few different ways depending on your goals. The following links details how you can achieve this goal for each major package manager.
|
||||
Setting up a private registry is quite easy on all major Package managers and can be achieved in a few different ways depenging on your goals. The following links details how you can achieve this goal for each major package manager.
|
||||
|
||||
- [npm](setup-npm.md)
|
||||
- [yarn](setup-yarn.md)
|
||||
|
@ -31,14 +31,16 @@ Config files should be YAML, JSON or a NodeJS module. YAML format is detected by
|
||||
We use the **$XDG_DATA_HOME** environment by variable default to locate the storage by default which [should be the same](https://askubuntu.com/questions/538526/is-home-local-share-the-default-value-for-xdg-data-home-in-ubuntu-14-04) as $HOME/.local/share.
|
||||
If you are using a custom storage, this location is irrelevant.
|
||||
|
||||
You can use `VERDACCIO_STORAGE_PATH` to define an alternative storage path, read more about `VERDACCIO_STORAGE_PATH` [at the environment variables page](env.md#storage-path).
|
||||
|
||||
## Default database file location {#default-database-file-location}
|
||||
|
||||
The default database file location is in the storage location.
|
||||
Starting with version 4.0.0, the database file name will be **.verdaccio-db.json** for a new installation of Verdaccio.
|
||||
When upgrading an existing Verdaccio server, the file name will remain **.sinopia-db.json**.
|
||||
|
||||
> The database name `sinopia-db.json` is deprecated and support will be removed after v6.x
|
||||
|
||||
## Environment variables {#environment-variables}
|
||||
|
||||
[Full list of environment variables](https://github.com/verdaccio/verdaccio/blob/master/docs/env.variables.md).
|
||||
|
||||
- `VERDACCIO_HANDLE_KILL_SIGNALS` to enable gracefully shutdown (since v4.12.0)
|
||||
[Full list of environment variables](env.md).
|
||||
|
@ -53,6 +53,39 @@ The location of the database is based on the `config.yaml` folder location, for
|
||||
|
||||
If the `config.yaml` is located in `/some_local_path/config.yaml`, the database will be created in `/some_local_path/storage/.verdaccio-db`.
|
||||
|
||||
:::info
|
||||
|
||||
For users who have been using Verdaccio for an extended period and the `.verdaccio-db` file already exist the secret
|
||||
may be **64 characters** long. However, for newer installations, the length will be generated as **32 characters** long.
|
||||
|
||||
If the secret length is **64 characters** long:
|
||||
|
||||
- For users running Verdaccio 5.x on **Node.js 22** or higher, **the application will fail to start** if the secret length **is not** 32 characters long.
|
||||
- For users running Verdaccio 5.x on **Node.js 21** or lower, the application will start, but it will display a deprecation warning at the console.
|
||||
|
||||
#### How to upgrade the token secret at the storage?
|
||||
|
||||
:warning: **If the secret is updated will invalidate all previous generated tokens.**
|
||||
|
||||
##### Option 1: Manually
|
||||
|
||||
Go to the [storage location](cli.md) and edit manually the secret to be 32 characters long.
|
||||
|
||||
##### Option 2: Automatically (since v5.31.0)
|
||||
|
||||
The `migrateToSecureLegacySignature` property is used to generate a new secret token if the length is 64 characters.
|
||||
|
||||
```
|
||||
security:
|
||||
api:
|
||||
migrateToSecureLegacySignature: true
|
||||
```
|
||||
|
||||
The token will be automatically updated to 32 characters long and the application will start without any issues.
|
||||
The property won't have any other effect on the application and could be removed after the secret is updated.
|
||||
|
||||
:::
|
||||
|
||||
_The `.verdaccio-db` file database is only available if user does not use a custom storage_, by default verdaccio uses a tiny database to store private packages the `storage` property is defined in the `config.yaml` file.
|
||||
The location might change based on your operating system. [Read the CLI section](cli.md) for more details about the location of files.
|
||||
|
||||
@ -87,13 +120,7 @@ auth:
|
||||
max_users: 1000
|
||||
```
|
||||
|
||||
### Token signature {#token}
|
||||
|
||||
The default token signature is based on the Advanced Encryption Standard (AES) with the algorithm `aes-256-ctr`, known as _legacy_.
|
||||
It's important to note that legacy tokens are not designed to expire.
|
||||
If expiration functionality is needed, it is recommended to use _JSON Web Tokens (JWT)_ instead.
|
||||
|
||||
#### Security {#security}
|
||||
### Security {#security}
|
||||
|
||||
The security block permits customization of the token signature with two options. The configuration is divided into
|
||||
two sections, `api` and `web`. When using JWT on `api`, it must be defined; otherwise, the legacy token signature (`aes192`) will be utilized.
|
||||
@ -109,13 +136,16 @@ The `legacy` property is used to enable the legacy token signature. **By default
|
||||
|
||||
:::info
|
||||
|
||||
The **migrateToSecureLegacySignature** property is **true** by default on 6.x versions or higher and could be disabled but is not recommended otherwise will cause issues using Node.js 22 or higher.
|
||||
In 5.x versions using Node.js 21 or lower, there will see the warning `[DEP0106] DeprecationWarning: crypto.createDecipher is deprecated`. printed in your terminal.
|
||||
This warning indicates that Node.js has deprecated a function utilized by the legacy signature.
|
||||
|
||||
If verdaccio runs on **Node.js 22** or higher, you will not see this warning since a new modern legacy signature has been implemented.
|
||||
|
||||
The **migrateToSecureLegacySignature** property is only available for versions higher than 5.31.0 and is **false** by default.
|
||||
|
||||
:::info
|
||||
|
||||
```yaml
|
||||
# This configuration is the default one only displayed for reference,
|
||||
# no need to define it in your config file.
|
||||
security:
|
||||
api:
|
||||
legacy: true # by default is true even if this section is not defined
|
||||
@ -149,7 +179,7 @@ security:
|
||||
|
||||
A set of properties to modify the behavior of the server application, specifically the API (Express.js).
|
||||
|
||||
> You can specify HTTP/1.1 server keep alive timeout in seconds for incomming connections.
|
||||
> You can specify HTTP/1.1 server keep alive timeout in seconds for incoming connections.
|
||||
> A value of 0 makes the http server behave similarly to Node.js versions prior to 8.0.0, which did not have a keep-alive timeout.
|
||||
> WORKAROUND: Through given configuration you can workaround following issue https://github.com/verdaccio/verdaccio/issues/301. Set to 0 in case 60 is not enough.
|
||||
|
||||
@ -222,24 +252,9 @@ The new `VERDACCIO_PUBLIC_URL` is intended to be used behind proxies, this varia
|
||||
- Used as base path to serve UI resources as (js, favicon, etc)
|
||||
- Used on return metadata `dist` base path
|
||||
- Ignores `host` and `X-Forwarded-Proto` headers
|
||||
- If `url_prefix` is defined would be appened to the env variable.
|
||||
- If `url_prefix` is defined would be appended to the env variable.
|
||||
|
||||
```
|
||||
VERDACCIO_PUBLIC_URL='https://somedomain.org';
|
||||
url_prefix: '/my_prefix'
|
||||
|
||||
// url -> https://somedomain.org/my_prefix/
|
||||
|
||||
VERDACCIO_PUBLIC_URL='https://somedomain.org';
|
||||
url_prefix: '/'
|
||||
|
||||
// url -> https://somedomain.org/
|
||||
|
||||
VERDACCIO_PUBLIC_URL='https://somedomain.org/first_prefix';
|
||||
url_prefix: '/second_prefix'
|
||||
|
||||
// url -> https://somedomain.org/second_prefix/'
|
||||
```
|
||||
Read more about `VERDACCIO_PUBLIC_URL` [at the environment variables page](env.md#public-url).
|
||||
|
||||
### User Agent {#user-agent}
|
||||
|
||||
@ -337,6 +352,12 @@ notify:
|
||||
|
||||
### Logger {#logger}
|
||||
|
||||
:::warning
|
||||
|
||||
Since v5.22.0 the logger property is renamed to `logs` but `log` still compatible but displaying a warning
|
||||
|
||||
:::
|
||||
|
||||
Two logger types are supported, you may chose only one of them:
|
||||
|
||||
#### console output (the default)
|
||||
@ -366,6 +387,7 @@ a built-in middleware plugin to handle this command.
|
||||
middlewares:
|
||||
audit:
|
||||
enabled: true
|
||||
# timeout: 10000
|
||||
```
|
||||
|
||||
### Experiments {#experiments}
|
||||
|
@ -22,19 +22,19 @@ Since version `v2.x` you can pull docker images by [tag](https://hub.docker.com/
|
||||
For a major version:
|
||||
|
||||
```bash
|
||||
docker pull verdaccio/verdaccio:6
|
||||
docker pull verdaccio/verdaccio:4
|
||||
```
|
||||
|
||||
For a minor version:
|
||||
|
||||
```bash
|
||||
docker pull verdaccio/verdaccio:6.0
|
||||
docker pull verdaccio/verdaccio:4.0
|
||||
```
|
||||
|
||||
For a specific (patch) version:
|
||||
|
||||
```bash
|
||||
docker pull verdaccio/verdaccio:6.0.0
|
||||
docker pull verdaccio/verdaccio:4.0.0
|
||||
```
|
||||
|
||||
> If you are interested on a list of tags, [please visit the Docker Hub website](https://hub.docker.com/r/verdaccio/verdaccio/tags/).
|
||||
@ -54,7 +54,11 @@ If you have [build an image locally](#build-your-own-docker-image) use `verdacci
|
||||
|
||||
You can use `-v` to bind mount `conf`, `storage` and `plugins` to the hosts filesystem (example below).
|
||||
|
||||
Note that if you do mount conf like this, that you will first need to supply a copy of config.yaml in that directory; the Docker container will not start properly if this file is missing. You can copy this file initially from https://github.com/verdaccio/verdaccio/blob/5.x/conf/docker.yaml. However, note the security warnings in that file; you will definitely want to lock it down in production.
|
||||
Note that if you do mount conf like this, that [you first need to supply a copy of config.yaml in that directory](https://github.com/verdaccio/verdaccio/tree/master/docker-examples/v5/plugins/docker-build-install-plugin). The Docker container will not start properly if this file is missing.
|
||||
|
||||
You can copy this file initially from https://github.com/verdaccio/verdaccio/blob/5.x/conf/docker.yaml.
|
||||
|
||||
However, note the security warnings in that file; you will definitely want to lock it down in production.
|
||||
|
||||
```bash
|
||||
V_PATH=/path/for/verdaccio; docker run -it --rm --name verdaccio \
|
||||
@ -72,15 +76,9 @@ V_PATH=/path/for/verdaccio; docker run -it --rm --name verdaccio \
|
||||
> you will get permission errors at runtime.
|
||||
> [Use docker volume](https://docs.docker.com/storage/volumes/) is recommended over using bind mount.
|
||||
|
||||
Verdaccio 4 provides a new set of environment variables to modify either permissions, port or http protocol. Here the complete list:
|
||||
### Environment variables
|
||||
|
||||
| Property | default | Description |
|
||||
| ------------------- | ---------------- | -------------------------------------------------- |
|
||||
| VERDACCIO_APPDIR | `/opt/verdaccio` | the docker working directory |
|
||||
| VERDACCIO_USER_NAME | `verdaccio` | the system user |
|
||||
| VERDACCIO_USER_UID | `10001` | the user id being used to apply folder permissions |
|
||||
| VERDACCIO_PORT | `4873` | the verdaccio port |
|
||||
| VERDACCIO_PROTOCOL | `http` | the default http protocol |
|
||||
Verdaccio provides a new set of environment variables to modify either permissions, port or http protocol, see them at [the environment variables page](env.md#docker).
|
||||
|
||||
### SELinux {#selinux}
|
||||
|
||||
@ -106,23 +104,62 @@ If you want to make the directory accessible only to a specific container, use `
|
||||
|
||||
An alternative solution is to use [z and Z flags](https://docs.docker.com/storage/bind-mounts/#configure-the-selinux-label). To add the `z` flag to the mountpoint `./conf:/verdaccio/conf` simply change it to `./conf:/verdaccio/conf:z`. The `z` flag relabels the directory and makes it accessible by every container while the `Z` flags relables the directory and makes it accessible only to that specific container. However using these flags is dangerous. A small configuration mistake, like mounting `/home/user` or `/var` can mess up the labels on those directories and make the system unbootable.
|
||||
|
||||
### Plugins {#plugins}
|
||||
## Plugins {#plugins}
|
||||
|
||||
Plugins can be installed in a separate directory and mounted using Docker or Kubernetes, however make sure you build plugins with native dependencies using the same base image as the Verdaccio Dockerfile.
|
||||
|
||||
### Creating your own `Dockerfile` using `verdaccio/verdaccio:tag` as base
|
||||
|
||||
If the plugin already exist in some registry, it could be installed globally with `npm` command.
|
||||
|
||||
```docker
|
||||
FROM verdaccio/verdaccio:5
|
||||
ADD docker.yaml /verdaccio/conf/config.yaml
|
||||
USER root
|
||||
RUN npm install --global verdaccio-static-token \
|
||||
&& npm install --global verdaccio-auth-memory
|
||||
USER $VERDACCIO_USER_UID
|
||||
```
|
||||
|
||||
For more detailed plugin example, check the with `docker-examples` [folder](https://github.com/verdaccio/verdaccio/tree/master/docker-examples/v5/plugins/docker-build-install-plugin).
|
||||
|
||||
### Adding plugins with local plugins a `Dockerfile`
|
||||
|
||||
If you don't have the packages available some registry and you want to try out a local plugin, you can use the folder `/verdaccio/plugins` for it, _verdaccio_ will look at this folder for plugins on startup.
|
||||
|
||||
1. Create a base image with multi stage support.
|
||||
2. `ADD` the local plugin into the image
|
||||
3. Install dependencies, required if your plugin has dependencies, you might need to build in case you need a transpilation step (tsc, babel).
|
||||
4. Copying the final folder into the final image and applying permissions so verdaccio can find the folders (verdaccio uses custom user `$VERDACCIO_USER_UID`, read more [here](env.md#docker)).
|
||||
|
||||
```
|
||||
FROM node:lts-alpine as builder
|
||||
RUN mkdir -p /verdaccio/plugins \
|
||||
&& cd /verdaccio/plugins \
|
||||
&& npm install --global-style --no-bin-links --omit=optional verdaccio-auth-memory@latest
|
||||
RUN mkdir -p /verdaccio/plugins
|
||||
ADD plugins/verdaccio-docker-memory /verdaccio/plugins/verdaccio-docker-memory
|
||||
RUN cd /verdaccio/plugins/verdaccio-docker-memory \
|
||||
&& npm install --production
|
||||
FROM verdaccio/verdaccio:5
|
||||
ADD docker.yaml /verdaccio/conf/config.yaml
|
||||
COPY --chown=$VERDACCIO_USER_UID:root --from=builder \
|
||||
/verdaccio/plugins/node_modules/verdaccio-auth-memory \
|
||||
/verdaccio/plugins/verdaccio-auth-memory
|
||||
/verdaccio/plugins/verdaccio-docker-memory \
|
||||
/verdaccio/plugins/verdaccio-docker-memory
|
||||
```
|
||||
|
||||
For more information check real plugin examples with Docker in our [source code](https://github.com/verdaccio/verdaccio/tree/master/docker-examples/v5/plugins).
|
||||
For more detailed plugin example, check the with `docker-examples` [folder](https://github.com/verdaccio/verdaccio/tree/master/docker-examples/v5/plugins/docker-local-plugin).
|
||||
|
||||
### Adding plugins without creating a new image
|
||||
|
||||
1. Using `docker-compose.yaml` [example below](docker.md#using-docker-compose).
|
||||
2. Mapping volumes in docker, verdaccio will look up for plugins at `/verdaccio/plugins` by default.
|
||||
|
||||
```
|
||||
V_PATH=/path/for/verdaccio; docker run -it --rm --name verdaccio \
|
||||
-p 4873:4873 \
|
||||
-v $V_PATH/conf:/verdaccio/conf \
|
||||
-v $V_PATH/storage:/verdaccio/storage \
|
||||
-v $V_PATH/plugins:/verdaccio/plugins \
|
||||
verdaccio/verdaccio
|
||||
```
|
||||
|
||||
### Docker and custom port configuration {#docker-and-custom-port-configuration}
|
||||
|
||||
@ -201,17 +238,19 @@ $ docker volume inspect verdaccio_verdaccio
|
||||
|
||||
## Build your own Docker image {#build-your-own-docker-image}
|
||||
|
||||
Go to the [`5.x` branch](https://github.com/verdaccio/verdaccio/tree/5.x) and run:
|
||||
|
||||
```bash
|
||||
docker build -t verdaccio .
|
||||
```
|
||||
|
||||
There is also an npm script for building the docker image, so you can also do:
|
||||
There is also an yarn script for building the docker image, so you can also do:
|
||||
|
||||
```bash
|
||||
yarn run build:docker
|
||||
```
|
||||
|
||||
Note: The first build takes some minutes to build because it needs to run `npm install`,
|
||||
Note: The first build takes some minutes to build because it needs to run `yarn install`,
|
||||
and it will take that long again whenever you change any file that is not listed in `.dockerignore`.
|
||||
|
||||
Please note that for any of the above docker commands you need to have docker installed on your machine and the docker executable should be available on your `$PATH`.
|
||||
@ -227,6 +266,7 @@ There is a separate repository that hosts multiple configurations to compose Doc
|
||||
> If you have made an image based on Verdaccio, feel free to add it to this list.
|
||||
|
||||
- [docker-verdaccio-multiarch](https://github.com/hertzg/docker-verdaccio-multiarch) Multiarch image mirrors
|
||||
- [docker-verdaccio-gitlab](https://github.com/snics/docker-verdaccio-gitlab)
|
||||
- [docker-verdaccio](https://github.com/deployable/docker-verdaccio)
|
||||
- [docker-verdaccio-s3](https://github.com/asynchrony/docker-verdaccio-s3) Private NPM container that can backup to s3
|
||||
- [docker-verdaccio-ldap](https://github.com/snadn/docker-verdaccio-ldap)
|
||||
@ -237,4 +277,3 @@ There is a separate repository that hosts multiple configurations to compose Doc
|
||||
- [verdaccio-server](https://github.com/andru255/verdaccio-server)
|
||||
- [coldrye-debian-verdaccio](https://github.com/coldrye-docker/coldrye-debian-verdaccio) docker image providing verdaccio from coldrye-debian-nodejs.
|
||||
- [verdaccio-github-oauth-ui](https://github.com/n4bb12/verdaccio-github-oauth-ui/blob/master/Dockerfile)
|
||||
- [verdaccio-auth-gitlab](https://github.com/johanneslosch/verdaccio-auth-gitlab)
|
||||
|
@ -71,7 +71,7 @@ sh -c "npm --registry $local_registry publish"
|
||||
|
||||
- [Hyperledger](https://github.com/hyperledger/fabric-chaincode-node)
|
||||
|
||||
### Programmatically Examples
|
||||
### Programmatic Examples
|
||||
|
||||
- [Storybook ![Stars](https://img.shields.io/github/stars/storybooks/storybook?label=⭐️)](https://github.com/storybooks/storybook)
|
||||
- [Gatsby ![Stars](https://img.shields.io/github/stars/gatsbyjs/gatsby?label=⭐️)](https://github.com/gatsbyjs/gatsby)
|
||||
|
@ -7,9 +7,9 @@ Verdaccio is a Node.js private and proxy registry. To install it, you need a few
|
||||
|
||||
## Prerequisites {#prerequisites}
|
||||
|
||||
1. **Node.js** `v16` or higher.
|
||||
1. **Node.js** `v14` or higher.
|
||||
|
||||
2. Your favorite Node Package Manager `npm`, `pnpm` or `yarn` (classic and modern).
|
||||
2. Your favorite Node Package Manager `npm`, `pnpm` or `yarn` (classic and berry).
|
||||
|
||||
> We highly recommend to use the latest versions of Node Package Manager clients `> npm@6.x | yarn@1.x | | yarn@2.x | pnpm@6.x`. Don't support `npm@5.x` or older.
|
||||
|
||||
@ -17,6 +17,8 @@ Verdaccio is a Node.js private and proxy registry. To install it, you need a few
|
||||
|
||||
> Verdaccio will support latest Node.js version according the [Node.js Release Working Group](https://github.com/nodejs/Release) recomendations.
|
||||
|
||||
Are you still using **Verdaccio 4**?. Check the [migration guide](https://verdaccio.org/blog/2021/04/14/verdaccio-5-migration-guide).
|
||||
|
||||
### Quick Introduction {#quick-introduction}
|
||||
|
||||
Learn the basics before getting started, how to install, where is the location of the configuration file and more.
|
||||
@ -32,34 +34,47 @@ Learn the basics before getting started, how to install, where is the location o
|
||||
Using `npm`
|
||||
|
||||
```bash
|
||||
npm install -g verdaccio@latest-6
|
||||
npm install -g verdaccio
|
||||
```
|
||||
|
||||
or using `yarn@1.x` _classic_,
|
||||
or using `yarn`
|
||||
|
||||
```bash
|
||||
yarn global add verdaccio@latest-6
|
||||
yarn global add verdaccio
|
||||
```
|
||||
|
||||
or using `pnpm`
|
||||
|
||||
```bash
|
||||
pnpm install -g verdaccio@latest-6
|
||||
pnpm install -g verdaccio
|
||||
```
|
||||
|
||||
![install verdaccio](/img/install_verdaccio.gif)
|
||||
|
||||
### Next major release (verdaccio 6 alpha) {#next-major-release}
|
||||
|
||||
Next [major release is under development](https://github.com/verdaccio/verdaccio/discussions/2970), byt can try it out already, either for testing purposes or helping to catch any possible bug, if you find something report it under the label [6.x bugs](https://github.com/verdaccio/verdaccio/labels/6.x%20bugs).
|
||||
|
||||
```bash
|
||||
npm install -g verdaccio@7-next
|
||||
```
|
||||
|
||||
or with the docker image
|
||||
|
||||
```bash
|
||||
docker pull verdaccio/verdaccio:nightly-master
|
||||
```
|
||||
|
||||
> The docker image `verdaccio/verdaccio:nightly-master` is alinged with the latest commits in master branch, while the npmjs version has a longer release cycle. **It is highly recommended don't use alpha versions for production**.
|
||||
|
||||
## Basic Usage {#basic-usage}
|
||||
|
||||
Once it has been installed, you only need to execute the CLI command:
|
||||
|
||||
```bash
|
||||
$> verdaccio
|
||||
info -=- local storage path /Users/user/.local/share/verdaccio/storage/.verdaccio-db.json
|
||||
info --- using htpasswd file: /Users/user/.config/verdaccio/htpasswd
|
||||
info --- http address http://localhost:4873/
|
||||
info --- version: 6.0.0-6-next.48
|
||||
info --- server started
|
||||
warn --- config file - /home/.config/verdaccio/config.yaml
|
||||
warn --- http address - http://localhost:4873/ - verdaccio/5.0.0
|
||||
```
|
||||
|
||||
For more information about the CLI, please [read the cli section](cli.md).
|
||||
@ -103,7 +118,7 @@ If you'd like a broader explanation, don't miss the tutorial created by [thedevl
|
||||
## Docker Image {#docker-image}
|
||||
|
||||
```bash
|
||||
docker run -it --rm --name verdaccio -p 4873:4873 verdaccio/verdaccio:nightly-master
|
||||
docker run -it --rm --name verdaccio -p 4873:4873 verdaccio/verdaccio
|
||||
```
|
||||
|
||||
`Verdaccio` has an official docker image you can use, and in most cases, the default configuration is good enough. For more information about how to install the official image, [read the docker section](docker.md), furthermore you can learn more about combining Docker images in our [docker-examples](https://github.com/verdaccio/verdaccio/tree/master/docker-examples) repository.
|
||||
@ -113,5 +128,17 @@ docker run -it --rm --name verdaccio -p 4873:4873 verdaccio/verdaccio:nightly-ma
|
||||
```bash
|
||||
$ helm repo add verdaccio https://charts.verdaccio.org
|
||||
$ helm repo update
|
||||
$ helm install registry --set image.tag=nightly-master verdaccio/verdaccio
|
||||
$ helm install verdaccio/verdaccio
|
||||
```
|
||||
|
||||
## Cloudron {#cloudron}
|
||||
|
||||
`Verdaccio` is also available as a 1-click install on [Cloudron](https://cloudron.io)
|
||||
|
||||
[![Install](https://cloudron.io/img/button.svg)](https://cloudron.io/button.html?app=org.eggertsson.verdaccio)
|
||||
|
||||
## Heroku with Docker
|
||||
|
||||
For easy deployment you could use [Heroku](https://www.heroku.com/home), the _free_ dyno tier allows you to test their platform using a Docker container, check this example.
|
||||
|
||||
[https://github.com/juanpicado/verdaccio-heroku-example](https://github.com/juanpicado/verdaccio-heroku-example)
|
||||
|
@ -3,9 +3,9 @@ id: logger
|
||||
title: 'Logger'
|
||||
---
|
||||
|
||||
:::info
|
||||
:::warning
|
||||
|
||||
Since v5.22.0 the logger property is renamed from `logs` to `log`, but still compatible with v6 but not recommended to use, could be removed any time.
|
||||
Since v5.22.0 the logger property is renamed from `logs` to `log`, it is still backward compatible but displaying a warning
|
||||
|
||||
:::
|
||||
|
||||
|
@ -3,7 +3,7 @@ id: plugin-middleware
|
||||
title: 'Middleware Plugin'
|
||||
---
|
||||
|
||||
## What's a Middleware Plugin? {#whats-a-middleware-plugin}
|
||||
## What's a middleware plugin? {#whats-a-middleware-plugin}
|
||||
|
||||
Middleware plugins have the capability to modify the API (web and cli) layer, either adding new endpoints or intercepting requests.
|
||||
|
||||
|
@ -3,7 +3,7 @@ id: plugin-storage
|
||||
title: 'Storage Plugin'
|
||||
---
|
||||
|
||||
## What's a Storage Plugin? {#whats-a-storage-plugin}
|
||||
## What's a storage plugin? {#whats-an-storage-plugin}
|
||||
|
||||
Verdaccio by default uses a file system storage plugin [local-storage](https://github.com/verdaccio/verdaccio/tree/master/packages/plugins/local-storage). The default storage can be easily replaced, either using a community plugin or creating one by your own.
|
||||
|
||||
@ -110,7 +110,7 @@ The following list of plugins are implementing the Storage API and might be used
|
||||
|
||||
- [verdaccio-memory](https://github.com/verdaccio/verdaccio-memory) Storage plugin to host packages in Memory
|
||||
- [verdaccio-s3-storage](https://github.com/remitly/verdaccio-s3-storage) Storage plugin to host packages **Amazon S3**
|
||||
- [verdaccio-aws-s3-storage](https://github.com/verdaccio/monorepo/tree/verdaccio-aws-s3-storage%4010.3.0/plugins/aws-s3-storage) Storage plugin to host packages **Amazon S3** (maintained by Verdaccio core team)
|
||||
- [verdaccio-aws-s3-storage](https://github.com/verdaccio/monorepo/tree/master/plugins/aws-s3-storage) Storage plugin to host packages **Amazon S3** (maintained by Verdaccio core team)
|
||||
- [verdaccio-google-cloud](https://github.com/verdaccio/verdaccio-google-cloud) Storage plugin to host packages **Google Cloud Storage**
|
||||
- [verdaccio-minio](https://github.com/barolab/verdaccio-minio) A verdaccio plugin for storing data in Minio
|
||||
- [verdaccio-offline-storage](https://github.com/g3ngar/verdaccio-offline-storage) local-storage plugin BUT with locally available packages as first class citizens.
|
||||
|
@ -134,28 +134,13 @@ theme:
|
||||
option2: bar
|
||||
```
|
||||
|
||||
### Filter Configuration (Experimental) {#filter-configuration}
|
||||
|
||||
A real example from [npm i -g verdaccio-plugin-secfilter](https://github.com/Ansile/verdaccio-plugin-secfilter) filter plugin.
|
||||
|
||||
```yaml
|
||||
filters:
|
||||
plugin-secfilter:
|
||||
block:
|
||||
- scope: @evil # block all packages in scope
|
||||
- package: semvver # block a malicious package
|
||||
- package: @coolauthor/stolen
|
||||
versions: '>2.0.1' # block some malicious versions of previously ok package
|
||||
# uses https://www.npmjs.com/package/semver syntax
|
||||
```
|
||||
|
||||
## Legacy plugins {#legacy-plugins}
|
||||
|
||||
### Sinopia Plugins {#sinopia-plugins}
|
||||
|
||||
:::caution
|
||||
|
||||
After version 6 sinopia plugins are not longer supported due the naming convention.
|
||||
Plugins from sinopia era are deprecated but still available in verdaccio@5.x versions but already removed from next 6.x versions, consider migrate them or stop using them for future updates.
|
||||
|
||||
:::caution
|
||||
|
||||
@ -178,6 +163,3 @@ After version 6 sinopia plugins are not longer supported due the naming conventi
|
||||
- [sinopia-gitlab](https://www.npmjs.com/package/sinopia-gitlab): Gitlab authentication plugin for sinopia
|
||||
- [sinopia-ldap](https://www.npmjs.com/package/sinopia-ldap): LDAP auth plugin for sinopia.
|
||||
- [sinopia-github-oauth-env](https://www.npmjs.com/package/sinopia-github-oauth-env) Sinopia authentication plugin with github oauth web flow.
|
||||
|
||||
> All sinopia plugins should be compatible with all future verdaccio versions. Anyhow, we encourage contributors to migrate them to the
|
||||
> modern verdaccio API and using the prefix as _verdaccio-xx-name_.
|
||||
|
@ -5,5 +5,11 @@ title: 'pnpm'
|
||||
|
||||
### pnpm {#pnpm}
|
||||
|
||||
> This includes 6.x or higher series.
|
||||
|
||||
`pnpm` recognize by default the configuration at `.npmrc` and also the `--registry` value.
|
||||
This means that you can follow the same commands described in [npm](setup-npm.md) replacing `npm` by `pnpm`.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
The most of problems might be resolved with the [npm troubleshooting list](setup-npm.md##troubleshooting) since are highly compatible in most of the commands.
|
||||
|
@ -5,11 +5,11 @@ title: 'yarn'
|
||||
|
||||
# yarn {#yarn}
|
||||
|
||||
#### Yarn (1.x) {#yarn-1x}
|
||||
#### `yarn` classic (1.x) {#yarn-classic-1x}
|
||||
|
||||
> Be aware npm configurations are valid on the classic version
|
||||
> Be aware `.npmrc` file configuration is recognized by yarn classic.
|
||||
|
||||
The classic version is able to regonize the `.npmrc` file, but also provides their own configuration file named `.yarnrc`.
|
||||
The classic version is able to regonise the `.npmrc` file, but also provides their own configuration file named `.yarnrc`.
|
||||
|
||||
To set up a registry, create a file and define a registry.
|
||||
|
||||
@ -18,17 +18,23 @@ To set up a registry, create a file and define a registry.
|
||||
registry "http://localhost:4873"
|
||||
```
|
||||
|
||||
By using this version you should enable `always-auth` in your configuration running:
|
||||
`yarn@1.x` by default does not send the token on every request unless is being opt-in manually, this might causes `403 error` if you have protected the access of your packages.
|
||||
|
||||
To change this behaviour enable `always-auth` in your configuration :
|
||||
|
||||
```
|
||||
always-auth=true
|
||||
```
|
||||
|
||||
or running
|
||||
|
||||
```
|
||||
npm config set always-auth true
|
||||
```
|
||||
|
||||
`yarn@1.x` does not send the authorization header on `yarn install` if your packages requires authentication, by enabling `always-auth` will force yarn do it on each request.
|
||||
#### `yarn` modern (>=2.x) {#yarn-modern-2x}
|
||||
|
||||
#### Yarn Berry (>=2.x) {#yarn-berry-2x}
|
||||
|
||||
> Yarn berry does not recognize `--registry` or `.npmrc` file anymore.
|
||||
> Yarn modern does not recognize `--registry` or `.npmrc` file anymore.
|
||||
|
||||
For defining a registry you must use the `.yarnrc.yml` located in the root of your project or global configuration.
|
||||
|
||||
@ -62,3 +68,10 @@ for logging via CLi use:
|
||||
```
|
||||
yarn npm login --scope my-company
|
||||
```
|
||||
|
||||
## Troubleshooting {#troubleshooting}
|
||||
|
||||
### Known issues
|
||||
|
||||
- `yarn npm login` issues, read [verdaccio#1737](https://github.com/verdaccio/verdaccio/issues/1737) or [yarn-berry#1848](https://github.com/yarnpkg/berry/pull/1848).
|
||||
- `yarn npm publish` does not send README, read [verdaccio#1905](https://github.com/verdaccio/verdaccio/issues/1905) or [yarn-berry#1702](https://github.com/yarnpkg/berry/issues/1702).
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: webui
|
||||
title: 'Web Configuration'
|
||||
title: 'Web User Interface'
|
||||
---
|
||||
|
||||
![Uplinks](https://user-images.githubusercontent.com/558752/52916111-fa4ba980-32db-11e9-8a64-f4e06eb920b3.png)
|
||||
|
16
website/versioned_docs/version-7.x/api/node-api/index.md
Normal file
16
website/versioned_docs/version-7.x/api/node-api/index.md
Normal file
@ -0,0 +1,16 @@
|
||||
---
|
||||
id: 'index'
|
||||
title: '@verdaccio/node-api'
|
||||
sidebar_label: 'Readme'
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
# @verdaccio/node-api
|
||||
|
||||
### License
|
||||
|
||||
Verdaccio is [MIT licensed](https://github.com/verdaccio/verdaccio/blob/master/LICENSE)
|
||||
|
||||
The Verdaccio documentation and logos (excluding /thanks, e.g., .md, .png, .sketch) files within the /assets folder) is
|
||||
[Creative Commons licensed](https://github.com/verdaccio/verdaccio/blob/master/LICENSE-docs).
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user