New Crowdin translations (#456)

* New translations ansible.md (Chinese Simplified)

* New translations packages.md (Chinese Simplified)

* New translations windows.md (Chinese Simplified)

* New translations web.md (Chinese Simplified)

* New translations use-cases.md (Chinese Simplified)

* New translations uplinks.md (Chinese Simplified)

* New translations test.md (Chinese Simplified)

* New translations ssl.md (Chinese Simplified)

* New translations server.md (Chinese Simplified)

* New translations reverse-proxy.md (Chinese Simplified)

* New translations repositories.md (Chinese Simplified)

* New translations protect-your-dependencies.md (Chinese Simplified)

* New translations plugins.md (Chinese Simplified)

* New translations notifications.md (Chinese Simplified)

* New translations auth.md (Chinese Simplified)

* New translations logger.md (Chinese Simplified)

* New translations kubernetes.md (Chinese Simplified)

* New translations install.md (Chinese Simplified)

* New translations index.md (Chinese Simplified)

* New translations iis-server.md (Chinese Simplified)

* New translations home.md (Chinese Simplified)

* New translations docker.md (Chinese Simplified)

* New translations dev-plugins.md (Chinese Simplified)

* New translations contributing.md (Chinese Simplified)

* New translations config.md (Chinese Simplified)

* New translations cli.md (Chinese Simplified)

* New translations build.md (Chinese Simplified)

* New translations en.json (Chinese Simplified)

* New translations en.json (Chinese Simplified)

* New translations en.json (Chinese Simplified)

* New translations en.json (Chinese Simplified)

* New translations install.md (Chinese Simplified)

* New translations install.md (Chinese Simplified)

* New translations home.md (Chinese Simplified)

* New translations cli.md (Chinese Simplified)

* New translations config.md (Chinese Simplified)

* New translations config.md (Chinese Simplified)

* New translations config.md (Chinese Simplified)

* New translations auth.md (Chinese Simplified)

* New translations config.md (Chinese Simplified)

* New translations auth.md (Chinese Simplified)

* New translations auth.md (Chinese Simplified)

* New translations config.md (Chinese Simplified)

* New translations en.json (Spanish)

* New translations en.json (Spanish)

* New translations en.json (Spanish)

* New translations en.json (Spanish)

* New translations en.json (Spanish)

* New translations config.md (Chinese Simplified)

* New translations config.md (Spanish)

* New translations config.md (Urdu (Pakistan))

* New translations config.md (Chinese Traditional, Hong Kong)

* New translations config.md (Portuguese, Brazilian)

* New translations config.md (Chinese Traditional)
This commit is contained in:
verdacciobot 2018-01-08 20:45:03 +01:00 committed by Juan Picado @jotadeveloper
parent 4937537386
commit cfb169be0f
34 changed files with 1978 additions and 53 deletions

View File

@ -1,58 +1,58 @@
{
"_comment": "This file is auto-generated by write-translations.js",
"_comment": "Este archivo es auto generado por write-translations.js",
"localized-strings": {
"next": "Next",
"previous": "Previous",
"tagline": "A lightweight private npm proxy registry",
"ansible": "Installing with Ansible",
"authentification": "Authentification",
"build": "Build the source code",
"cli": "Command Line Tool",
"configuration": "Configuration File",
"contributing": "Contributing Verdaccio",
"dev-plugins": "Developing Plugins",
"next": "Siguiente",
"previous": "Anterior",
"tagline": "Un repositorio y proxy de npm privado",
"ansible": "Instalar con Ansible",
"authentification": "Autentificación",
"build": "Construir el código fuente",
"cli": "Herramienta de línea de comando",
"configuration": "Archivo de Configuración",
"contributing": "Contribuye a Verdaccio",
"dev-plugins": "Desarrollando Extensiones",
"docker": "Docker",
"home": "Verdaccio npm proxy private registry",
"iss-server": "Installing on IIS server",
"index1": "Docs Home",
"installation": "Installation",
"home": "Verdaccio registro y proxy privado de npm",
"iss-server": "Instalando en un servidor IIS",
"index1": "Inicio Documentación",
"installation": "Instalación",
"kubernetes": "Kubernetes",
"logger": "Logger",
"notifications": "Notifications",
"packages": "Package Access",
"plugins": "Plugins",
"protect-your-dependencies": "Protecting packages",
"source-code": "Source Code",
"reverse-proxy": "Reverse Proxy Setup",
"server-configuration": "Server Configuration",
"ssl": "Set up the SSL Certificates",
"unit-testing": "Unit Testing",
"uplinks": "Uplinks",
"use-cases": "Use Cases",
"webui": "Web User Interface",
"windows": "Installing As a Windows Service",
"Docs": "Docs",
"Help": "Help",
"notifications": "Notificaciones",
"packages": "Acceso a paquetes",
"plugins": "Extensiones",
"protect-your-dependencies": "Protegiendo paquetes",
"source-code": "Código fuente",
"reverse-proxy": "Configuración de proxy inverso",
"server-configuration": "Configuración del Servidor",
"ssl": "Configurar certificados SSL",
"unit-testing": "Tests Unitario",
"uplinks": "Enlaces externos",
"use-cases": "Casos de Uso",
"webui": "Interfaz de Usuario Web",
"windows": "Instalando como Servicio en Windows",
"Docs": "Documentación",
"Help": "Ayuda",
"Blog": "Blog",
"Introduction": "Introduction",
"Configuration": "Configuration",
"Server": "Server",
"Plugins": "Plugins",
"Introduction": "Introducción",
"Configuration": "Configuración",
"Server": "Servidor",
"Plugins": "Extensiones",
"DevOps": "DevOps",
"Development": "Development",
"Guides": "Guides"
"Development": "Desarrollo",
"Guides": "Guías"
},
"pages-strings": {
"Learn more using the [documentation on this site.](/test-site/docs/en/doc1.html)|no description given": "Learn more using the [documentation on this site.](/test-site/docs/en/doc1.html)",
"Browse Docs|no description given": "Browse Docs",
"Ask questions about the documentation and project|no description given": "Ask questions about the documentation and project",
"Join the community|no description given": "Join the community",
"Find out what's new with this project|no description given": "Find out what's new with this project",
"Stay up to date|no description given": "Stay up to date",
"Need help?|no description given": "Need help?",
"Browse Docs|no description given": "Navegar Documentación",
"Ask questions about the documentation and project|no description given": "Haz preguntas sobre la documentación y el proyecto",
"Join the community|no description given": "Únete a la comunidad",
"Find out what's new with this project|no description given": "Entérate que hay de nuevo en este proyecto",
"Stay up to date|no description given": "Mantente actualizado",
"Need help?|no description given": "Necesitas ayuda?",
"This project is maintained by a dedicated group of people.|statement made to reader": "This project is maintained by a dedicated group of people.",
"Help Translate|recruit community translators for your project": "Help Translate",
"Edit this Doc|recruitment message asking to edit the doc source": "Edit",
"Translate this Doc|recruitment message asking to translate the docs": "Translate"
"Help Translate|recruit community translators for your project": "Ayuda con traducciones",
"Edit this Doc|recruitment message asking to edit the doc source": "Editar",
"Translate this Doc|recruitment message asking to translate the docs": "Traducir"
}
}

58
website/i18n/zh-CN.json Normal file
View File

@ -0,0 +1,58 @@
{
"_comment": "这个文件由 write-translations.js 生成",
"localized-strings": {
"next": "下一个",
"previous": "上一个",
"tagline": "一个轻量级的私有 npm 代理仓库",
"ansible": "使用 Ansible 安装",
"authentification": "认证",
"build": "编译源代码",
"cli": "命令行工具",
"configuration": "配置文件",
"contributing": "参与贡献 Verdaccio",
"dev-plugins": "插件开发",
"docker": "Docker",
"home": "Verdaccio 私有 npm 代理仓库",
"iss-server": "在 IIS 上安装",
"index1": "文档首页",
"installation": "安装",
"kubernetes": "Kubernetes",
"logger": "日志",
"notifications": "通知",
"packages": "npm 包访问权限",
"plugins": "插件",
"protect-your-dependencies": "保护 npm 包",
"source-code": "源代码",
"reverse-proxy": "反向代理配置",
"server-configuration": "服务器配置",
"ssl": "设置 SSL 证书",
"unit-testing": "单元测试",
"uplinks": "Uplinks",
"use-cases": "使用场景",
"webui": "Web 界面",
"windows": "作为 Windows 服务安装",
"Docs": "文档",
"Help": "帮助",
"Blog": "博客",
"Introduction": "介绍",
"Configuration": "配置",
"Server": "服务器",
"Plugins": "插件",
"DevOps": "DevOps",
"Development": "开发",
"Guides": "使用指南"
},
"pages-strings": {
"Learn more using the [documentation on this site.](/test-site/docs/en/doc1.html)|no description given": "通过 [站内文档](/test-site/docs/en/doc1.html) 了解更多信息",
"Browse Docs|no description given": "浏览文档",
"Ask questions about the documentation and project|no description given": "询问有关于文档或项目的问题",
"Join the community|no description given": "加入社区",
"Find out what's new with this project|no description given": "了解项目中新增的内容",
"Stay up to date|no description given": "保持最新版本",
"Need help?|no description given": "需要帮助?",
"This project is maintained by a dedicated group of people.|statement made to reader": "This project is maintained by a dedicated group of people.",
"Help Translate|recruit community translators for your project": "帮助翻译",
"Edit this Doc|recruitment message asking to edit the doc source": "编辑",
"Translate this Doc|recruitment message asking to translate the docs": "翻译"
}
}

View File

@ -34,17 +34,17 @@ logs:
Las siguientes secciones explican que significa cada propiedad y las diferentes configuraciones posibles.
### Storage
### Almacenamiento
Is the location of the default storage. **Verdaccio is by default based on local file system**.
Es la localización por defecto del almacenamiento. **Verdaccio esta basado por defecto en archivos locales de sistema**.
```yaml
storage: ./storage
```
### Authentification
### Autentificación
The authentification set up is done here, the default auth is based on `htpasswd` and is build-in. You can modify this behaviour via [plugins](plugins.md). For more information about this section read the [auth page](auth.md).
The authentification set up is done here, the default auth is based on `htpasswd` and is built-in. Puedes modificar el comportamiento por defecto vía [extensiones](plugins.md). For more information about this section read the [auth page](auth.md).
```yaml
auth:

View File

@ -44,7 +44,7 @@ storage: ./storage
### Authentification
The authentification set up is done here, the default auth is based on `htpasswd` and is build-in. You can modify this behaviour via [plugins](plugins.md). For more information about this section read the [auth page](auth.md).
The authentification set up is done here, the default auth is based on `htpasswd` and is built-in. You can modify this behaviour via [plugins](plugins.md). For more information about this section read the [auth page](auth.md).
```yaml
auth:

View File

@ -44,7 +44,7 @@ storage: ./storage
### Authentification
The authentification set up is done here, the default auth is based on `htpasswd` and is build-in. You can modify this behaviour via [plugins](plugins.md). For more information about this section read the [auth page](auth.md).
The authentification set up is done here, the default auth is based on `htpasswd` and is built-in. You can modify this behaviour via [plugins](plugins.md). For more information about this section read the [auth page](auth.md).
```yaml
auth:

View File

@ -44,7 +44,7 @@ storage: ./storage
### Authentification
The authentification set up is done here, the default auth is based on `htpasswd` and is build-in. You can modify this behaviour via [plugins](plugins.md). For more information about this section read the [auth page](auth.md).
The authentification set up is done here, the default auth is based on `htpasswd` and is built-in. You can modify this behaviour via [plugins](plugins.md). For more information about this section read the [auth page](auth.md).
```yaml
auth:

View File

@ -0,0 +1,13 @@
---
id: ansible
date: 2017-07-10T23:36:56.503Z
title: Installing with Ansible
---
We have a customised solution for `verdaccio` in our organization.
<https://github.com/verdaccio/ansible-verdaccio>
#### Other options
* Ansible role for Gentoo users: [jirutka/ansible-role-sinopia](https://github.com/jirutka/ansible-role-sinopia).
* Ansible role for Ubuntu users: [jagregory/sinopia-ansible](https://github.com/jagregory/sinopia-ansible).

View File

@ -0,0 +1,56 @@
---
id: authentification
date: 2017-07-10T23:36:56.503Z
title: 认证
---
认证部分设置与 "Auth" [ 插件 ](plugins.md)息息相关。包的访问限制也同时通过 [ 包访问权限](packages.md) 控制。
客户端的认证流程由 `npm` 自行处理,在你通过以下命令登陆后:
```bash
npm adduser --registry http://localhost:4873
```
`npm` 会将 Verdaccio 返回的 Token 保存在配置文件中,它存放于您的用户主目录下。 如需了解更多有关于 `npm 配置 (.npmrc)` 相关的内容,请查阅 [官方文档](https://docs.npmjs.com/files/npmrc).
```bash
cat .npmrc
registry=http://localhost:5555/
//localhost:5555/:_authToken="secretVerdaccioToken"
//registry.npmjs.org/:_authToken=secretNpmjsToken
```
#### 匿名发布包
`Verdaccio` 提供了匿名发布功能, 使用此功能需要正确配置 [包访问权限](packages.md).
例如:
```yaml
'my-company-*':
access: $anonymous
publish: $anonymous
proxy: npmjs
```
如 [Issue #212](https://github.com/verdaccio/verdaccio/issues/212#issuecomment-308578500) 所述,截至 `npm@5.3.0` 你仍然 **无法在没有 Token 的情况下发布包**`yarn` 没有此限制。
## 默认 htpasswd
为了简化安装配置步骤, `Verdaccio` 提供了一个基于 `htpasswd` 的内置认证插件.
```yaml
auth:
htpasswd:
file: ./htpasswd
# Maximum amount of users allowed to register, defaults to "+inf".
# You can set this to -1 to disable registration.
#max_users: 1000
```
| 属性 | 类型 | 必填 | 示例 | 支持 | 描述 |
| --------- | ------ | -- | ---------- | ---- | ---------------------- |
| file | string | 是 | ./htpasswd | 任意路径 | 存储了加密认证信息的 htpasswd 文件 |
| max_users | number | 否 | 1000 | 任意数字 | 最大的用户数量 |
如果需要禁止新用户注册,可将配置修改为 `max_users: -1`.

View File

@ -0,0 +1,68 @@
---
id: build
title: Build the source code
---
Verdaccio relies on `yarn` instead `npm` to download depenedencies.
*Note: the current build only will build with `➜ yarn` latest.*
```bash
yarn install
```
## Scripts
We have a list of scripts that you will use for diferent kind of tasks, in the following section we describe all posible task based on branches. (yes
#### Master branch (2.x)
On master branch the unique part we have to build is the UI which is based on React.js, webpack and CSS Modules.
### Scripts
| script | Description |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| release | this script is used to generate changelog and raise up the version according the commits messages |
| prepublish | it ensures before publish the new ui is being generated |
| test | run all the test |
| pre:ci | specific task for CI, build the UI required for test |
| test:ci | run test generating coverage |
| test:only | run only test |
| test:coverage | run `nyc` as a wrapper to generate coverage with mocha test |
| coverage:html | run `nyc` to generate coverage reports |
| coverage:publish | publish on `codecov` the coverage (don't use it) |
| lint | run the linting for javascript code. |
| lint:css | run the linter for `css` |
| dev:webui | run a `webpack` server with hot reloading enabled `http://localhost:4872/#/` it requires a `verdaccio` server running in port `4873`. |
| pre:webpack | prepare the field for webpack (it a substask of `build:webui`) |
| build:webui | create the static assets for the UI with `webpack` |
| build:docker | create a local docker image with `verdaccio` |
| build:rpi | create a local docker for raspberry pi image with `verdaccio` **(experimental with no support)** |
#### Branch (3.x)
The next major version is based on `babel` and `flow`. If you switch from master ensure to run `yarn install` again.
*Note: Only new scripts in bold*
### Scripts
| script | Description |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| **flow** | run flow check |
| **dev:start** | run `babel-node` and transpile code on memory |
| **code:build** | transpile `verdaccio` with `babel` and copy transpiled code to `build/` |
| release | this script is used to generate changelog and raise up the version according the commits messages |
| prepublish | it ensures before publish the new ui is being generated |
| test | run all the test `jest` |
| pre:ci | specific task for CI, build the UI required for test |
| test:ci | run test generating coverage |
| test:only | run only test |
| coverage:publish | publish on `codecov` the coverage (don't use it) |
| lint | run the linting for javascript code. |
| lint:css | run the linter for `css` |
| dev:webui | run a `webpack` server with hot reloading enabled `http://localhost:4872/#/` it requires a `verdaccio` server running in port `4873`. |
| pre:webpack | prepare the field for webpack (it a substask of `build:webui`) |
| build:webui | create the static assets for the UI with `webpack` |
| build:docker | create a local docker image with `verdaccio` |
| build:rpi | create a local docker for raspberry pi image with `verdaccio` **(experimental with no support)** |

View File

@ -0,0 +1,17 @@
---
id: cli
date: 2017-07-10T23:36:56.503Z
title: 命令行工具
---
Verdaccio 命令行是启动和控制此应用的工具
## 命令
```bash
$ verdaccio --listen 4000 --config ./config.yaml
```
| 参数 | 默认值 | 示例 | 描述 |
| ------------------ | ---------------------------------------- | -------------------- | --------- |
| --listen \ **-l** | 4873 | -p 7000 | HTTP 监听端口 |
| --config \ **-c** | ~/home/user/.local/verdaccio/config.yaml | /foo/bar/config.yaml | 配置文件路径 |

View File

@ -0,0 +1,153 @@
---
id: configuration
date: 2017-07-10T23:36:56.503Z
title: 配置文件
---
此文件是 Verdaccio 的重要部分, 您可以在其中修改默认行为, 启用插件并扩展功能。
一个默认的配置文件已经在您首次运行 ` Verdaccio ` 时创建。
## 默认配置
默认配置支持 ** 私有(scoped) ** 包, 并允许匿名访问非私有包, 但只有 ** 已登陆用户才能发布包**。
```yaml
storage: ./storage
auth:
htpasswd:
file: ./htpasswd
uplinks:
npmjs:
url: https://registry.npmjs.org/
packages:
'@*/*':
access: $all
publish: $authenticated
proxy: npmjs
'**':
proxy: npmjs
logs:
- {type: stdout, format: pretty, level: http}
```
## 模块
以下各章节解释了每一个选项的作用和可用的值
### 存储
是默认的存储方式。** Verdaccio 默认使用内置本地文件模式存储 **
```yaml
storage: ./storage
```
### 认证
The authentification set up is done here, the default auth is based on `htpasswd` and is built-in. 您可以通过 [ 插件 ](plugins.md) 修改此行为。 如需了解更多信息,请阅读文档中的 ["认证" 部分](auth.md)
```yaml
auth:
htpasswd:
file: ./htpasswd
max_users: 1000
```
### Web UI
这个选项允许你定制 Web UI 的外观. 如需了解更多信息,请阅读文档中的 ["Web UI" 部分](web.md).
```yaml
web:
enable: true
title: Verdaccio
logo: logo.png
```
### Uplinks
通过配置 Uplinks Verdaccio 可以从远程的仓库中获取本地尚未缓存的包。 如需了解更多信息,请阅读文档中的 ["Uplinks" 部分](uplinks.md)
```yaml
uplinks:
npmjs:
url: https://registry.npmjs.org/
```
### 包
"包" 部分定义了用户访问仓库中的包的权限。如需了解更多信息,请阅读文档中的 [ "包" 部分](packages.md).
```yaml
packages:
'@*/*':
access: $all
publish: $authenticated
proxy: npmjs
```
## 高级设置
### 离线发布
`Verdaccio` 默认不允许在与 Uplinks 断开连接后发布任何包,但是通过设置以下选项为 *ture* 来允许离线发布
```yaml
publish:
allow_offline: false
```
<small>最低版本: <em> v2.3.6 </em> 由于 <a href="https://github.com/verdaccio/verdaccio/pull/223"> #223 </a></small>
### URL 前缀
```yaml
url_prefix: https://dev.company.local/verdaccio/
```
最低版本: * v2.3.6 * 由于 [ #197 ](https://github.com/verdaccio/verdaccio/pull/197)
### 最大 Body 尺寸
默认的 JSON 请求 Body 尺寸为 `1MB`,如果你遇到了错误提示 `"request entity too large"` ,可以尝试增大这个值
```yaml
max_body_size: 1mb
```
### 监听端口
`Verdaccio` 默认使用 `4873` 端口. 可以通过 [命令行传递参数](cli.md) 或修改配置文件,以下格式是有效的
```yaml
listen:
# - localhost:4873 # 默认
# - http://localhost:4873 # 同上
# - 0.0.0.0:4873 # 监听所有 IP 地址 (INADDR_ANY)
# - https://example.org:4873 # if you want to use https
# - [::1]:4873 # ipv6
# - unix:/tmp/verdaccio.sock # unix socket
```
### HTTPS
可通过在 `listen` 的域名前增加 *https://* 并设置证书路径来启用 `Verdaccio` 的 HTTPS 支持。 如需了解更多信息,请阅读文档中的 ["SSL" 部分](ssl.md)
```yaml
https:
key: path/to/server.key
cert: path/to/server.crt
ca: path/to/server.pem
```
### 通知
可以通过启用 "通知" 功能来调用第三方工具的 Web Hooks。如需了解更多信息请阅读文档中的 ["通知" 部分](notifications.md)
```yaml
notify:
method: POST
headers: [{'Content-Type': 'application/json'}]
endpoint: https://usagge.hipchat.com/v2/room/3729485/notification?auth_token=mySecretToken
content: '{"color":"green","message":"发布了新的包: * {{ name }}*","notify":true,"message_format":"text"}'
```

View File

@ -0,0 +1,66 @@
---
id: contributing
date: 2017-07-10T23:36:56.503Z
title: Contributing Verdaccio
---
First of all Jumping into an unfamiliar code base is not easy but we are here to help you.
## Comunication Channels
If you are willing for asking, we use two channels for discussions:
* [Public Gitter channel](https://gitter.im/verdaccio/)
* [Contributors Slack channel](https://verdaccio-npm.slack.com) (unfortunately only by email invitation, you might ask in Gitter to be included)
## Getting started
As a first glance verdaccio is a single repository, but there are many ways you might contribute and a variety of technologies to practice.
### Finding my spot
All we have different skills, so, let's see where you might feel comfortable.
### I know or I want to learn Node.js
Node.js is the base of `verdaccio`, we use libraries as `express`, `commander`, `request` or `async`. Verdaccio is basically a Rest API that create a communication with `npm` clients compatible, as `yarn`.
We have a long [list of plugins](https://github.com/verdaccio/verdaccio/blob/master/wiki/plugins.md) ready to be used and improved but at the same time [you might create your own](plugin.md).
### I would prefer to work in the User Interface
Recently we have moved to modern techonologies as `React` and `element-react`.
### I feel more confortable improving the stack
Of course, we will be happy to help us improving the stack, you can upgrade dependencies as `eslint`, `stylelint`, `webpack`. You migt merely improve the `webpack` configuration would be great. Any suggestion is very welcome. Furthermore whether you have experience with **Yeoman** you might help us with the [verdaccio generator](https://github.com/verdaccio/generator-verdaccio-plugin).
Here some ideas:
* Create a common eslint rules to be used across all dependencies or plugins
* Improve Flow types definitions delivery
* Moving to Webpack 4
* Update to React 16
* Improve hot reload with Webpack
* We use babel and webpack across all dependencies, why not a common preset?
### I do great Documentation
Many contributors find typos and grammar issues, that also helps to improve the overall experience for troubleshooting.
### I am a Designer
We have a frontend website <http://www.verdaccio.org/> that will be happy to see your ideas.
### I am a DevOps
We have a widely popular Docker image <https://hub.docker.com/r/verdaccio/verdaccio/> that need maintenance and pretty likely huge improvements, we need your knowledge for the benefits of all users.
We have support for **Kubernetes**, **Puppet**, **Ansible** and **Cheff** and we need help in those fields, feel free to see all repositories.
## I'm ready to contribute
If you are thinking *"I've seen already the [repositories](repositories.md) and I'm willing to start right away"* then I have good news for you, that's the next step.
You will need learn how to build, [we have prepared a guide just for that](build.md).
Once you have played around with all scripts and you know how to use them, we are ready to go to the next step, run the [**Unit Test**](test.md).

View File

@ -0,0 +1,67 @@
---
id: dev-plugins
date: 2017-07-10T23:36:56.503Z
title: Developing Plugins
---
There are many ways to extend `verdaccio`, currently we only support `authentication plugins`
## Authentication Plugins
This section will describe how it looks like a Verdaccio plugin in a ES5 way. Basically we have to return an object with a single method called `authenticate` that will recieve 3 arguments (`user, password, callback`). Once the authentication has been executed there is 2 options to give a response to `verdaccio`.
##### OnError
Either something bad happened or auth was unsuccessful.
callback(null, false)
##### OnSuccess
The auth was successful.
`groups` is an array of strings where the user is part of.
callback(null, groups);
### Example
```javascript
function Auth(config, stuff) {
var self = Object.create(Auth.prototype);
self._users = {};
// config for this module
self._config = config;
// verdaccio logger
self._logger = stuff.logger;
// pass verdaccio logger to ldapauth
self._config.client_options.log = stuff.logger;
return self;
}
Auth.prototype.authenticate = function (user, password, callback) {
var LdapClient = new LdapAuth(self._config.client_options);
....
LdapClient.authenticate(user, password, function (err, ldapUser) {
...
var groups;
...
callback(null, groups);
});
};
module.exports = Auth;
```
## Storage Plugins
// in progress
## Middleware Integration
// in progress

View File

@ -0,0 +1,143 @@
---
id: docker
date: 2017-07-10T23:36:56.503Z
title: Docker
---
To pull the latest pre-built [docker image](https://hub.docker.com/r/verdaccio/verdaccio/):
`docker pull verdaccio/verdaccio`
## Tagged Versions
Since version `v2.x` you can pull docker images by [tag](https://hub.docker.com/r/verdaccio/verdaccio/tags/), as follows:
For a major version:
```bash
docker pull verdaccio/verdaccio:2
```
For a minor version:
```bash
docker pull verdaccio/verdaccio:2.1
```
For a specific (patch) version:
```bash
docker pull verdaccio/verdaccio:2.1.7
```
For the next major release using the `beta` version.
```bash
docker pull verdaccio/verdaccio:beta
```
The Canary version (master branch) is tagged as `next`
```bash
docker pull verdaccio/verdaccio:next
```
# Running verdaccio using Docker
To run the docker container:
```bash
docker run -it --rm --name verdaccio -p 4873:4873 verdaccio/verdaccio
```
The last argument defines which image to use. The above line will pull the latest prebuilt image from dockerhub, if you haven't done that already.
If you have [build an image locally](#build-your-own-docker-image) use `verdaccio` as the last argument.
You can use `-v` to mount `conf` and `storage` to the hosts filesystem:
```bash
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 \
verdaccio/verdaccio
```
## Docker and custom port configuration
Any `host:port` configured in `conf/config.yaml` under `listen` is currently ignored when using docker.
If you want to reach verdaccio docker instance under different port, lets say `5000` in your `docker run` command replace `-p 4873:4873` with `-p 5000:4873`.
In case you need to specify which port to listen to **in the docker container**, since version 2.?.? you can do so by providing additional arguments to `docker run`: `--env PORT=5000` This changes which port the docker container exposes and the port verdaccio listens to.
Of course the numbers you give to `-p` paremeter need to match, so assuming you want them to all be the same this is what you could copy, paste and adopt:
```bash
PORT=5000; docker run -it --rm --name verdaccio \
--env PORT -p $PORT:$PORT
verdaccio/verdaccio
```
## Using HTTPS with Docker
You can configure the protocol verdaccio is going to listen on, similarly to the port configuration. You have to overwrite the default value("http") of the `PROTOCOL` environment variable to "https", after you specified the certificates in the config.yaml.
```bash
PROTOCOL=https; docker run -it --rm --name verdaccio \
--env PROTOCOL -p 4873:4873
verdaccio/verdaccio
```
## Using docker-compose
1. Get the latest version of [docker-compose](https://github.com/docker/compose).
2. Build and run the container:
```bash
$ docker-compose up --build
```
You can set the port to use (for both container and host) by prefixing the above command with `PORT=5000`.
Docker will generate a named volume in which to store persistent application data. You can use `docker inspect` or `docker volume inspect` to reveal the physical location of the volume and edit the configuration, such as:
$ docker volume inspect verdaccio_verdaccio
[
{
"Name": "verdaccio_verdaccio",
"Driver": "local",
"Mountpoint": "/var/lib/docker/volumes/verdaccio_verdaccio/_data",
"Labels": null,
"Scope": "local"
}
]
# Build your own Docker image
```bash
docker build -t verdaccio .
```
There is also an npm script for building the docker image, so you can also do:
```bash
npm run build:docker
```
Note: The first build takes some minutes to build because it needs to run `npm install`, and it will take that long again whenever you change any file that is not listed in `.dockerignore`.
If you want to use the docker image on a rpi or a compatible device there is also a dockerfile available. To build the docker image for raspberry pi execute:
```bash
npm run build:docker:rpi
```
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`.
# Docker Examples
There is a separate repository that hosts multiple configurations to compose Docker images with `verdaccio`, for instance, as reverse proxy:
https://github.com/verdaccio/docker-examples

View File

@ -0,0 +1,100 @@
---
id: home
date: 2017-07-10T23:36:56.503Z
title: Verdaccio 私有 npm 代理仓库
---
<div class="top-section-home">
<div class="logo-section"></div>
<div class="title-section">
site.title
</div>
<div class="subtitle-section">
site.description
</div>
<div class="badges">
<span>
<a href="https://github.com/verdaccio/verdaccio">
<img src="https://img.shields.io/github/stars/verdaccio/verdaccio.svg?style=social&label=Star&maxAge=3600" style="max-width:100%;">
</a>
</span>
<span>
<a href="https://www.npmjs.org/package/verdaccio">
<img src="https://img.shields.io/npm/v/verdaccio.svg" alt="npm 版本徽章">
</a>
</span>
<span>
<a href="https://www.npmjs.org/package/verdaccio">
<img src="https://camo.githubusercontent.com/81e53cc0a99c3ae97709fa66232a5807c346c61e/687474703a2f2f696d672e736869656c64732e696f2f6e706d2f646d2f76657264616363696f2e737667" alt="下载数量徽章" data-canonical-src="http://img.shields.io/npm/dm/verdaccio.svg" style="max-width:100%;">
</a>
</span>
</div>
<div class="link-section">
<a href="https://github.com/verdaccio" title="Github verdaccio page">GitHub</a>
<a href="https://github.com/verdaccio/verdaccio/tree/master/wiki" title="Documentation">文档</a>
</div>
</div>
## 快速上手
一条命令即可完成安装
```sh
$> npm install --global verdaccio
# or
$> yarn global add verdaccio
```
## 易于设置
将 npm 默认仓库指向为你的 Verdaccio 实例
```sh
<br />$> npm set registry http://localhost:4873
$> npm adduser --registry http://localhost:4873
```
## 易于使用
在命令行终端中执行
```sh
<br />$> verdaccio
warn --- config file - /home/.config/verdaccio/config.yaml
warn --- http address - http://localhost:4873/ - verdaccio/2.2.0
```
#### 就这么简单! 开始使用你的 **私有 npm 仓库吧**
##### 支持所有主流的 npm 客户端
<div class="client-support">
<div class="client">
<img src="css/icon/npm-logo.svg" alt="Docker 支持" width="200"/>
</div>
<div class="client">
<img src="css/icon/yarn-logo.svg" alt="Docker 支持" width="200"/>
</div>
</div>
<div class="section">
<h1>
Docker Ready
</h1>
<a href="https://github.com/verdaccio/verdaccio/blob/master/wiki/docker.md" target="_blank">
<img src="css/icon/docker.jpeg" alt="Docker 支持" width="200"/>
</a>
</div>

View File

@ -0,0 +1,99 @@
---
id: iss-server
date: 2017-07-10T23:36:56.503Z
title: Installing on IIS server
---
These instructions were written for Windows Server 2012, IIS 8, [Node.js 0.12.3](https://nodejs.org/), [iisnode 0.2.16](https://github.com/tjanczuk/iisnode) and [verdaccio 2.1.0](https://github.com/verdaccio/verdaccio).
* Install IIS Install [iisnode](https://github.com/tjanczuk/iisnode). Make sure you install prerequisites (Url Rewrite Module & node) as explained in the instructions for iisnode.
* Create a new folder in Explorer where you want to host verdaccio. For example `C:\verdaccio`. Save [package.json](https://github.com/verdaccio/verdaccio/wiki/Installing-on-IIS-server#packagejson), [start.js](https://github.com/verdaccio/verdaccio/wiki/Installing-on-IIS-server#startjs) and [web.config](https://github.com/verdaccio/verdaccio/wiki/Installing-on-IIS-server#webconfig) in this folder.
* Create a new site in Internet Information Services Manager. You can name it whatever you want. I'll call it verdaccio in these [instructions](http://www.iis.net/learn/manage/configuring-security/application-pool-identities). Specify the path to where you saved all files and a port number.
* Go back to Explorer and give the user that runs the application pool modify rights to the folder you just created. If you've named the new site verdaccio and did not change the app pool, it's running under an ApplicationPoolIdentity and you should give the user IIS AppPool\verdaccio modify rights see instructions if you need help. (You can restrict access later if you want so that it only has modify rights on the iisnode and verdaccio\storage)
* Start a command prompt and execute the commands below to download verdaccio:
cd c:\verdaccio
npm install
* Make sure you have an inbound rule accepting TCP traffic to the port in Windows Firewall
* Thats it! Now you can navigate to the host and port that you specified
I wanted the `verdaccio` site to be the default site in IIS so I did the following:
* I made sure the .npmrc file in `c:\users{yourname}` had the registry set to `"registry=http://localhost/"`
* I stopped the "Default Web Site" and only start the site "verdaccio" site in IIS
* I set the bindings to "http", ip address "All Unassigned" on port 80, ok any warning or prompts
These instructions are based on [Host Sinopia in IIS on Windows](https://gist.github.com/HCanber/4dd8409f79991a09ac75). I had to tweak my web config as per below but you may find the original from the for mentioned link works better
A default configuration file will be created `c:\verdaccio\verdaccio\config.yaml`
### package.json
```json
{
"name": "iisnode-verdaccio",
"version": "1.0.0",
"description": "Hosts verdaccio in iisnode",
"main": "start.js",
"dependencies": {
"verdaccio": "^2.1.0"
}
}
```
### start.js
```bash
process.argv.push('-l', 'unix:' + process.env.PORT);
require('./node_modules/verdaccio/src/lib/cli.js');
```
### web.config
```xml
<configuration>
<system.webServer>
<modules>
<remove name="WebDAVModule" />
</modules>
<!-- indicates that the start.js file is a node.js application
to be handled by the iisnode module -->
<handlers>
<remove name="WebDAV" />
<add name="iisnode" path="start.js" verb="*" modules="iisnode" resourceType="Unspecified" requireAccess="Execute" />
<add name="WebDAV" path="*" verb="*" modules="WebDAVModule" resourceType="Unspecified" requireAccess="Execute" />
</handlers>
<rewrite>
<rules>
<!-- iisnode folder is where iisnode stores it's logs. These should
never be rewritten -->
<rule name="iisnode" stopProcessing="true">
<match url="iisnode*" />
<action type="None" />
</rule>
<!-- Rewrite all other urls in order for verdaccio to handle these -->
<rule name="verdaccio">
<match url="/*" />
<action type="Rewrite" url="start.js" />
</rule>
</rules>
</rewrite>
<!-- exclude node_modules directory and subdirectories from serving
by IIS since these are implementation details of node.js applications -->
<security>
<requestFiltering>
<hiddenSegments>
<add segment="node_modules" />
</hiddenSegments>
</requestFiltering>
</security>
</system.webServer>
</configuration>
```

View File

@ -0,0 +1,83 @@
---
id: index1
date: 2017-07-10T23:36:56.503Z
title: Docs Home
---
`verdaccio` is a fork of **sinopia** and it's backwards compatible.
## Why should I use verdaccio?
* I am/was **sinopia** user and need an **easy migration**.
* I need a lightweight and free solution
* I need long-term support and help when I got stuck.
* I want a product compatible with the newer tools as **Yarn** and **DevOps (Docker, Ansible, Puppet, etc)** tools.
* An evolving plugabble product, not only for **Authentification**, also for **Storage** and more in the future.
* An active community
* Integration with **Nexus**, **Artifactoy** and any other npm compatible registry.
A bunch more of reasons [you might be interested](https://medium.com/@jotadeveloper/five-use-cases-where-a-npm-private-proxy-fits-in-your-workflow-632a81779c14).
### Why we forked from Sinopia?
It [appeared that sinopia maintenance had stalled and the author had abandoned it](https://github.com/rlidwka/sinopia/issues/376), so there was a suggestion that the sinopia-using community would benefit from a fresh look at the code and the outstanding issues. So here we are The last step about the [detach from sinopia](https://github.com/verdaccio/verdaccio/issues/38).
### Near Future
`verdaccio` aims to be compatible with sinopia along the time preserving the main features, a lightweight app based on local file system and easy installation but being able to be pluggable and built over a modern tool stack.
## Getting Started
### Installation
* [Installation](/docs/installation)
### Usage
* [Command Line](/docs/cli)
### Configuration
* [The configuration file](/docs/configuration)
* [Setting up *uplinks*](/docs/uplinks)
* [Packages Access](/docs/packages)
* [Authorization and Access](/docs/authentication)
* [Enable Notifications](/docs/notifications)
* [Custom Logs](/docs/logger)
### UI Customization
* [Configure the Web](/docs/webui)
## Server Configurations
* [Advanced Server Configuration](/docs/server)
* [Reverse Proxy](/docs/reverse-proxy)
* [SSL Certificates](/docs/ssl)
### Windows Specific Settings
* [Installing As a Windows Service](/docs/windows)
* [Installing on IIS server](/docs/iis-server)
## Extend Verdaccio
* [Installing Plugins](/docs/plugins)
## DevOps
* [Configure with Ansible](/docs/ansible)
* [Using Docker Image](/docs/docker)
* [Using Kubernetes](/docs/kubernetes)
## Guides && Recipes
* [Learn how to protect your packages](/docs/recipes/protect-your-dependencies)
## Development
* [I want to to contribute](/docs/dev/contributing)
* [Build verdaccio](/docs/dev/build)
* [Create plugins](/docs/dev/plugins)
* [Repositories](/docs/dev/repositories)
* [Unit Testing](/docs/dev/unit-test)

View File

@ -0,0 +1,49 @@
---
id: installation
date: 2017-07-10T23:36:56.503Z
title: 安装
---
Verdaccio 是一个基于 Web 技术的跨平台应用,在安装它之前你需要确保满足以下前提条件
#### 最低要求:
1. Node.js 版本
- Verdaccio *2.x*: 不低于 **4.6.1**
- Verdaccio *3.x* 不低于 **6.12.0**
2. npm *>=3.x* 或 yarn
## 安装
`Verdaccio` 必须通过以下任一方式作为全局模块安装
使用 `npm`
```bash
npm install -g verdaccio
```
或使用 `yarn`
```bash
yarn global add verdaccio
```
> 警告: Verdaccio 目前不支持 PM2 的 Cluster 多进程模式,通过此方式运行可能造成未知后果
## 基本使用
安装后只需要通过命令行启动即可使用
```bash
$> verdaccio
warn --- config file - /home/.config/verdaccio/config.yaml
warn --- http address - http://localhost:5555/ - verdaccio/3.0.0
```
![](https://cdn-images-1.medium.com/max/720/1*jDHnZ7_68u5s1lFK2cygnA.gif)
阅读 [命令行文档](cli.md) 以了解更多信息。
## Docker 镜像
`Verdaccio` 提供了官方 Docker 镜像可供使用, 默认配置可以满足大多数用户的使用需求,如果希望了解更多有关于如何安装和使用 Docker 镜像的信息,请 [阅读文档中的 Docker 部分](docker.md).

View File

@ -0,0 +1,81 @@
---
id: kubernetes
date: 2017-07-10T23:36:56.503Z
title: Kubernetes
---
You can find instructions to deploy Verdaccio on a Kubernetes cluster on the [verdaccio/docker-example](https://github.com/verdaccio/docker-examples/tree/master/kubernetes-example) repository. However, the recommended method to install Verdaccio on a Kubernetes cluster is to use [Helm](https://helm.sh). Helm is a [Kubernetes](https://kubernetes.io) package manager which bring multiple advantages.
## Helm
### Setup Helm
If you haven't used Helm before, you need to setup the Helm controller called Tiller:
```bash
helm init
```
### Install
Deploy the Helm [stable/verdaccio](https://github.com/kubernetes/charts/tree/master/stable/verdaccio) chart. In this example we use `npm` as release name:
```bash
helm install --name npm stable/verdaccio
```
### Deploy a specific version
```bash
helm install --name npm --set image.tag=2.6.5 stable/verdaccio
```
### Upgrading Verdaccio
```bash
helm upgrade npm stable/verdaccio
```
### Uninstalling
```bash
helm del --purge npm
```
**Note:** this command delete all the resources, including packages that you may have previously published to the registry.
### Custom Verdaccio configuration
You can customize the Verdaccio configuration using a Kubernetes *configMap*.
#### Prepare
Copy the [existing configuration](https://github.com/verdaccio/verdaccio/blob/master/conf/full.yaml) and adapt it for your use case:
```bash
wget https://github.com/verdaccio/verdaccio/blob/master/conf/full.yaml -O config.yaml
```
**Note:** Make sure you are using the right path for the storage that is used for persistency:
```yaml
storage: /verdaccio/storage/data
auth:
htpasswd:
file: /verdaccio/storage/htpasswd
```
#### Deploy the configMap
Deploy the `configMap` to the cluster
```bash
kubectl create configmap verdaccio-config --from-file ./config.yaml
```
#### Deploy Verdaccio
Now you can deploy the Verdaccio Helm chart and specify which configuration to use:
```bash
helm install --name npm --set customConfigMap=verdaccio-config stable/verdaccio
```

View File

@ -0,0 +1,25 @@
---
id: logger
date: 2017-07-10T23:36:56.503Z
title: Logger
---
As any web application, verdaccio has a customisable built-in logger. You can define multiple types of outputs.
```yaml
logs:
# console output
- {type: stdout, format: pretty, level: http}
# file output
- {type: file, path: verdaccio.log, level: info}
```
Use `SIGUSR2` to notify the application, the log-file was rotated and it needs to reopen it.
### Configuration
| Property | Type | Required | Example | Support | Description |
| -------- | ------ | -------- | ---------------------------------------------- | ------- | ------------------------------------------------- |
| type | string | No | [stdout, file] | all | define the output |
| path | string | No | verdaccio.log | all | if type is file, define the location of that file |
| format | string | No | [pretty, pretty-timestamped] | all | output format |
| level | string | No | [fatal, error, warn, http, info, debug, trace] | all | verbose level |

View File

@ -0,0 +1,54 @@
---
id: notifications
date: 2017-07-10T23:36:56.503Z
title: Notifications
---
Notify was built primarily to use with Slack's Incoming webhooks, but will also deliver a simple payload to any endpoint. Currently only active for `publish` / `create` commands.
## Usage
An example with a **hipchat** hook:
#### Single notification
```yaml
notify:
method: POST
headers: [{'Content-Type': 'application/json'}]
endpoint: https://usagge.hipchat.com/v2/room/3729485/notification?auth_token=mySecretToken
content: '{"color":"green","message":"New package published: * {{ name }}*","notify":true,"message_format":"text"}'
```
#### Multiple notification
```yaml
notify:
'example-package-1'
method: POST
headers: [{'Content-Type': 'application/json'}]
endpoint: https://usagge.hipchat.com/v2/room/3729485/notification?auth_token=mySecretToken
content: '{"color":"green","message":"New package published: * {{ name }}*","notify":true,"message_format":"text"}'
'example-package-2'
method: POST
headers: [{'Content-Type': 'application/json'}]
endpoint: https://usagge.hipchat.com/v2/room/3729485/notification?auth_token=mySecretToken
content: '{"color":"green","message":"New package published: * {{ name }}*","notify":true,"message_format":"text"}'
'example-package-3'
method: POST
headers: [{'Content-Type': 'application/json'}]
endpoint: https://usagge.hipchat.com/v2/room/3729485/notification?auth_token=mySecretToken
content: '{"color":"green","message":"New package published: * {{ name }}*","notify":true,"message_format":"text"}'
```
## Configuration
| Property | Type | Required | Support | Default | Description |
| ------------------- | ------------ | -------- | ------- | ------------------------------------------------ | -------------------------------------------------------------------------------------------- |
| method | string | No | all | | HTTP verb |
| packagePattern | string | No | all | | Only run this notification if the package name matches the regular expression |
| packagePatternFlags | string | No | | Any flags to be used with the regular expression | |
| headers | array/object | Yes | all | | If this endpoint requires specific headers, set them here as an array of key: value objects. |
| endpoint | string | Yes | all | | set the URL endpoint for this call |
| content | string | Yes | all | | any Handlebar expressions |

View File

@ -0,0 +1,117 @@
---
id: packages
date: 2017-07-10T23:36:56.503Z
title: Package Access
---
It's a series of contrains that allow or restrict access to the local storage based in specific criteria.
The security constraints remains on shoulders of the plugin being used, by default `verdaccio` uses the `htpasswd` plugin. If you use a different plugin the behaviour might be different. The default plugin `htpasswd` does not handles by itself `allow_access` and `allow_publish`, it's use an internal fallback in case the plugin is not ready for it. For more information about permissions visit [the authentification section in the wiki](auth.md).
### Usage
```yalm
packages:
# scoped packages
'@scope/*':
allow_access: all
allow_publish: all
proxy: server2
'private-*':
access: all
publish: all
proxy_access: uplink1
'**':
# allow all users (including non-authenticated users) to read and
# publish all packages
allow_access: all
allow_publish: all
proxy_access: uplink2
```
if none is specified, the default one remains
```yaml
packages:
'**':
access: all
publish: $authenticated
```
The list of valid groups according the default plugins are
```js
'$all', '$anonymous', '@all', '@anonymous', 'all', 'undefined', 'anonymous'
```
All users recieves all those set of permissions independently of is anonymous or not plus the groups provided by the plugin, in case of `htpasswd` return the username as a group. For instance, if you are logged as `npmUser` the list of groups will be.
```js
// groups without '$' are going to be deprecated eventually
'$all', '$anonymous', '@all', '@anonymous', 'all', 'undefined', 'anonymous', 'npmUser'
```
If you want to protect specific set packages under your group, you need todo something like this. Let's use a `Regex` that covers all prefixed `npmuser-` packages. We recomend use a prefix for your packages, in that way it'd be easier to protect them.
```yaml
packages:
'npmuser-*':
access: npmuser
publish: npmuser
```
Restart `verdaccio` and in your console try to install `npmuser-core`.
```bash
$ npm install npmuser-core
npm install npmuser-core
npm ERR! code E403
npm ERR! 403 Forbidden: npmuser-core@latest
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/user/.npm/_logs/2017-07-02T12_20_14_834Z-debug.log
```
You can change the existing behaviour using a different plugin authentication. `verdaccio` just check whether the user that try to access or publish specific package belongs to the right group.
#### Set multiple groups
Define multiple access groups is fairly easy, just define them with a white space between them.
```yaml
'company-*':
allow_access: admin internal
allow_publish: admin
proxy_access: server1
'supersecret-*':
allow_access: secret super-secret-area ultra-secret-area
allow_publish: secret ultra-secret-area
proxy_access: server1
```
#### Blocking access to set of packages
If you want to block the acccess/publish to a specific group of packages. Just, do not define `access` and `publish`.
```yaml
packages:
'old-*':
'**':
access: all
publish: $authenticated
```
### Configuration
You can define mutiple `packages` and each of them must have an unique `Regex`.
| Property | Type | Required | Example | Support | Description |
| --------------------- | ------- | -------- | -------------- | ------- | ------------------------------------------- |
| allow_access/access | string | No | $all | all | define groups allowed to access the package |
| allow_publish/publish | string | No | $authenticated | all | define groups allowed to publish |
| proxy_access/proxy | string | No | npmjs | all | limit look ups for specific uplink |
| storage | boolean | No | [true,false] | all | TODO |
We higlight recommend do not use **allow_access**/**allow_publish** and **proxy_access** anymore, those are deprecated, please use the short version of each of those (**access**/**publish**/**proxy**

View File

@ -0,0 +1,92 @@
---
id: plugins
date: 2017-07-10T23:36:56.503Z
title: Plugins
---
Verdaccio is an plugabble aplication. Currently supports multiple plugins only for [Authentication](auth.md) but there are plans to [improve the plugin system](https://github.com/verdaccio/verdaccio/issues/169). If you are interested to develop your own plugin, read the [development](development.md) section.
## Usage
### Installation
```bash
$> npm install --global verdaccio-activedirectory
```
`verdaccio` as a sinopia fork it has backward compability with plugins that are compatible with `sinopia@1.4.0`. In such case the installation is the same.
&> npm install --global sinopia-memory
### Configuration
Open the `config.yaml` file and update the `auth` section as follows:
The default configuration looks like this, due we use a build-in `htpasswd` plugin by default that you can disable just commenting out the following lines.
```yaml
htpasswd:
file: ./htpasswd
# Maximum amount of users allowed to register, defaults to "+inf".
# You can set this to -1 to disable registration.
#max_users: 1000
```
and replacing them with (in case you decide to use a `ldap` plugin.
```yaml
auth:
activedirectory:
url: "ldap://10.0.100.1"
baseDN: 'dc=sample,dc=local'
domainSuffix: 'sample.local'
```
### Multiple Auth plugins
This is tecnically possible, the plugins order becames important, the the credentials will resolved in order.
```yaml
auth:
htpasswd:
file: ./htpasswd
# Maximum amount of users allowed to register, defaults to "+inf".
# You can set this to -1 to disable registration.
#max_users: 1000
activedirectory:
url: "ldap://10.0.100.1"
baseDN: 'dc=sample,dc=local'
domainSuffix: 'sample.local'
```
This is a list of plugins compatible with **Verdaccio**.
## Sinopia Legacy Plugins
* [sinopia-npm](https://www.npmjs.com/package/sinopia-npm): auth plugin for sinopia supporting an npm registry.
* [sinopia-memory](https://www.npmjs.com/package/sinopia-memory): auth plugin for sinopia that keeps users in memory.
* [sinopia-github-oauth-cli](https://www.npmjs.com/package/sinopia-github-oauth-cli).
* [sinopia-crowd](https://www.npmjs.com/package/sinopia-crowd): auth plugin for sinopia supporting atlassian crowd.
* [sinopia-activedirectory](https://www.npmjs.com/package/sinopia-activedirectory): Active Directory authentication plugin for sinopia.
* [sinopia-github-oauth](https://www.npmjs.com/package/sinopia-github-oauth): authentication plugin for sinopia2, supporting github oauth web flow.
* [sinopia-delegated-auth](https://www.npmjs.com/package/sinopia-delegated-auth): Sinopia authentication plugin that delegates authentication to another HTTP URL
* [sinopia-altldap](https://www.npmjs.com/package/sinopia-altldap): Alternate LDAP Auth plugin for Sinopia
* [sinopia-request](https://www.npmjs.com/package/sinopia-request): An easy and fully auth-plugin with configuration to use an external API.
* [sinopia-htaccess-gpg-email](https://www.npmjs.com/package/sinopia-htaccess-gpg-email): Generate password in htaccess format, encrypt with GPG and send via MailGun API to users.
* [sinopia-mongodb](https://www.npmjs.com/package/sinopia-mongodb): An easy and fully auth-plugin with configuration to use a mongodb database.
* [sinopia-htpasswd](https://www.npmjs.com/package/sinopia-htpasswd): auth plugin for sinopia supporting htpasswd format.
* [sinopia-leveldb](https://www.npmjs.com/package/sinopia-leveldb): a leveldb backed auth plugin for sinopia private npm.
* [sinopia-gitlabheres](https://www.npmjs.com/package/sinopia-gitlabheres): Gitlab authentication plugin for sinopia.
* [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.
## Verdaccio Plugins (since 2.1.x)
* [verdaccio-bitbucket](https://github.com/idangozlan/verdaccio-bitbucket): Bitbucket authentication plugin for verdaccio.
* [verdaccio-ldap](https://www.npmjs.com/package/verdaccio-ldap): LDAP auth plugin for verdaccio.
* [verdaccio-active-directory](https://github.com/nowhammies/verdaccio-activedirectory): Active Directory authentication plugin for verdaccio
* [verdaccio-gitlab](https://github.com/bufferoverflow/verdaccio-gitlab): use GitLab Personal Access Token to authenticate
## Caveats
Not all these plugins are been tested continuously, some of them might not work at all. Please if you found any issue feel free to notify the owner of each plugin.

View File

@ -0,0 +1,46 @@
---
id: protect-your-dependencies
date: 2017-07-10T23:36:56.503Z
title: Protecting packages
---
`verdaccio` allows you protect publish, to achieve that you will need to set up correctly your [packages acces](packages).
### Package configuration
Let's see for instance the following set up. You have a set of dependencies what are prefixed with `my-company-*` and you need to protect them from anonymous or another logged user without right credentials.
```yaml
'my-company-*':
access: admin teamA teamB teamC
publish: admin teamA
proxy: npmjs
```
With this configuration, basically we allow to groups **admin** and **teamA** to * publish* and **teamA** **teamB** **teamC** *access* to such dependencies.
### Use case: teamD try to access the dependency
So, if I am logged as **teamD**. I shouldn't be able to access all dependencies that match with `my-company-*` pattern.
```bash
➜ npm whoami
teamD
```
I won't have access to such dependencies and also won't be visible via web for user **teamD**. If I try to access the following will happen.
```bash
➜ npm install my-company-core
npm ERR! code E403
npm ERR! 403 Forbidden: webpack-1@latest
```
or with `yarn`
```bash
➜ yarn add my-company-core
yarn add v0.24.6
info No lockfile found.
[1/4]
error An unexpected error occurred: "http://localhost:5555/webpack-1: unregistered users are not allowed to access package my-company-core".
```

View File

@ -0,0 +1,29 @@
---
id: source-code
date: 2017-07-10T23:36:56.503Z
title: Source Code
---
`verdaccio` is composed or multiple repositories you might contribute. Look into the **issues** tab whether there is a ticket waiting for you
| Repository | Usage | Stack |
| -------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- |
| <https://github.com/verdaccio/verdaccio> | The main repository | Node, Express, async, React, Babel, ES6, Mocha, Markdown, HTML, Sass |
| <https://github.com/verdaccio/streams> | Small library to handle streams | ES6, Babel, *Soon: Flow* |
| <https://github.com/verdaccio/file-locking> | Small library to handle locked files | ES6, Babel, *Soon: Flow* |
| <https://github.com/verdaccio/local-storage> | Default dependency for verdaccio to handle local file system storage (since `v3.x`) | ES6, Babel, Flow |
| <https://github.com/verdaccio/flow-types> | `flow` type definitions for verdaccio and sub dependencies. | Flow, flow-typed |
| <https://github.com/verdaccio/verdaccio.github.io> | Public `verdaccio` website and future documentation page. | Markdown, HTML, Sass, Github Pages |
| <https://github.com/verdaccio/docker-examples> | Docker examples with `docker-compose` to play around with integrations, (nginx, kubernetes, apache, ldap, etc..) | Docker Compose, Docker |
| <https://github.com/verdaccio/puppet-verdaccio> | Puppet support | Puppet |
| <https://github.com/verdaccio/ansible-verdaccio> | Ansible support | Ansible |
| <https://github.com/verdaccio/verdaccio-cookbook> | Chef support | Chef |
## Experimental Repos
The following repositories aims to be part of the future infraestructure of `verdaccio` and are just PoC looking for active colaborators.
| Repository | Usage | Stack |
| ------------------------------------------------------------- | ---------------------------------------------- | ------------------ |
| <https://github.com/verdaccio/verdaccio-plugin-auth-htpasswd> | Default authentification plugin based on Babel | ES6, Babel, Flow |
| <https://github.com/verdaccio/generator-verdaccio-plugin> | Yeoman generators for future verdaccio plugins | ES6, Babel, Yeoman |
| <https://github.com/verdaccio/blog> | Any article related with verdaccio | Markdown |

View File

@ -0,0 +1,89 @@
---
id: reverse-proxy
date: 2017-07-10T23:36:56.503Z
title: Reverse Proxy Setup
---
## Apache
Apache and mod_proxy should not decode/encode slashes and leave them as they are:
<VirtualHost *:80>
AllowEncodedSlashes NoDecode
ProxyPass /npm http://127.0.0.1:4873 nocanon
ProxyPassReverse /npm http://127.0.0.1:4873
</VirtualHost>
### Configuration with SSL
config.yaml
```yaml
url_prefix: https://npm.your.domain.com
```
Apache virtual server configuration
apacheconfig
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName npm.your.domain.com
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/npm.your.domain.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/npm.your.domain.com/privkey.pem
SSLProxyEngine On
ProxyRequests Off
ProxyPreserveHost On
AllowEncodedSlashes NoDecode
ProxyPass / http://127.0.0.1:4873 nocanon
ProxyPassReverse / http://127.0.0.1:4873
</VirtualHost>
</IfModule>
## Nginx
server {
listen 80 default_server;
location / {
proxy_pass http://127.0.0.1:4873/;
proxy_set_header Host $host;
}
}
## Run behind reverse proxy with different domain and port
If you run verdaccio behind reverse proxy, you may noticed all resource file served as relaticve path, like `http://127.0.0.1:4873/-/static`
To resolve this issue, you should send real domain and port to verdaccio with `Host` heade
Nginx configure should look like this:
```nginx
location / {
proxy_pass http://127.0.0.1:4873/;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
}
```
For this case, `url_prefix` should NOT set in verdaccio config
* * *
or a sub-directory installation:
```nginx
location ~ ^/verdaccio/(.*)$ {
proxy_pass http://127.0.0.1:4873/$1;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
}
```
For this case, `url_prefix` should set to `/verdaccio/`
> Note: There is a Slash after install path (`https://your-domain:port/vardaccio/`)!

View File

@ -0,0 +1,74 @@
---
id: server-configuration
date: 2017-07-10T23:36:56.503Z
title: Server Configuration
---
This is mostly basic linux server configuration stuff but I felt it important to document and share the steps I took to get verdaccio running permanently on my server. You will need root (or sudo) permissions for the following.
## Running as a separate user
First create the verdaccio user:
```bash
$ sudo adduser --disabled-login --gecos 'Verdaccio NPM mirror' verdaccio
```
You create a shell as the verdaccio user using the following command:
```bash
$ sudo su verdaccio
$ cd ~
```
The 'cd ~' command send you to the home directory of the verdaccio user. Make sure you run verdaccio at least once to generate the config file. Edit it according to your needs.
## Listening on all addresses
If you want to listen to every external address set the listen directive in the config to:
```yaml
# you can specify listen address (or simply a port)
listen: 0.0.0.0:4873
```
If you are running `verdaccio` in a Amazon EC2 Instance, [you will need set the listen in change your config file](https://github.com/verdaccio/verdaccio/issues/314#issuecomment-327852203) as is described above.
> Apache configure? Please check out the [Reverse Proxy Setup](reverse-proxy.md)
## Keeping verdaccio running forever
We can use the node package called 'forever' to keep verdaccio running all the time. https://github.com/nodejitsu/forever
First install forever globally:
```bash
$ sudo npm install -g forever
```
Make sure you've started verdaccio at least once to generate the config file and write down the created admin user. You can then use the following command to start verdaccio:
```bash
$ forever start `which verdaccio`
```
You can check the documentation for more information on how to use forever.
## Surviving server restarts
We can use crontab and forever together to restart verdaccio after a server reboot. When you're logged in as the verdaccio user do the following:
```bash
$ crontab -e
```
This might ask you to choose an editor. Pick your favorite and proceed. Add the following entry to the file:
@reboot /usr/bin/forever start /usr/lib/node_modules/verdaccio/bin/verdaccio
The locations may vary depending on your server setup. If you want to know where your files are you can use the 'which' command:
```bash
$ which forever
$ which verdaccio
```

View File

@ -0,0 +1,46 @@
---
id: ssl
date: 2017-07-10T23:36:56.503Z
title: Set up the SSL Certificates
---
Follow this instructions to configure a SSL certificate to serve NPM registry under HTTPS.
* Update the listen property in your `~/.config/verdaccio/config.yaml`:
listen: 'https://your.domain.com/'
Once you update the listen and try to run verdaccio again will ask for certificates.
* Generate your certificates
$ openssl genrsa -out ~/.config/verdaccio/verdaccio-key.pem 2048
$ openssl req -new -sha256 -key ~/.config/verdaccio/verdaccio-key.pem -out ~/.config/verdaccio/verdaccio-csr.pem
$ openssl x509 -req -in ~/.config/verdaccio/verdaccio-csr.pem -signkey ~/.config/verdaccio/verdaccio-key.pem -out ~/.config/verdaccio/verdaccio-cert.pem
````
* Edit your config file `~/.config/verdaccio/config.yaml` and add the following section
https: key: ~/.config/verdaccio/server.key cert: ~/.config/verdaccio/server.crt ca: ~/.config/verdaccio/server.ca
<br />Alternatively, if you have a certificate as `server.pfx` format, you can add the following configuration section. The passphrase is optional and only needed, if your certificate is encrypted.
https: pfx: ~/.config/verdaccio/server.pfx passphrase: 'secret' ````
More info on the `key`, `cert`, `ca`, `pfx` and `passphrase` arguments on the [Node documentation](https://nodejs.org/api/tls.html#tls_tls_createsecurecontext_options)
* Run `verdaccio` in your command line.
* Open the browser and load `https://your.domain.com:port/`
This instructions are mostly valid under OSX and Linux, on Windows the paths will vary but, the steps are the same.
## Docker
If you are using the Docker image, you have to set the `PROTOCOL` environment variable to `https` as the `listen` argument is provided on the [Dockerfile](https://github.com/verdaccio/verdaccio/blob/master/Dockerfile#L43), and thus ignored from your config file.
You can also set the `PORT` environment variable if you are using a different port than `4873`.

View File

@ -0,0 +1,156 @@
---
id: unit-testing
date: 2017-07-10T23:36:56.503Z
title: Unit Testing
---
All tests are split in three folders:
- `test/unit` - Tests that cover functions that transform data in an non-trivial way. These tests simply `require()` a few files and run code in there, so they are very fast.
- `test/functional` - Tests that launch a verdaccio instance and perform a series of requests to it over http. They are slower than unit tests.
- `test/integration` - Tests that launch a verdaccio instance and do requests to it using npm. They are really slow and can hit a real npm registry. **This actually has not been tested or
Unit and functional tests are executed automatically by running `npm test` from the project's root directory. Integration tests are supposed to be executed manually from time to time.
We use `jest` for all test.
## The npm Script
To run the test script you can use either `npm` or `yarn`.
yarn run test
That will trigger only two first groups of test, unit and functional.
### Using test/unit
The following is just an example how a unit test should looks like. Basically follow the `mocha` standard. Try to describe what exactly does the unit test in a single sentence in the header of the `it` section.
```javacript
'use strict';
let assert = require('assert');
let parseInterval = require('../../src/lib/utils').parseInterval;
describe('Parse interval', function() {
before(function(done) {
..... some magic stuff before the show
});
it('server should respond on /', function(done) {
... this is an async test
});});
```
### Using test/functional
Funtional testing in verdaccio has a bit more of complextity that needs a deep explanation in order to success in your experience.
All starts in the `index.js` file. Let's dive in into it.
```javascript
// create 3 server instances
require('./lib/startup');
...
describe('functional test verdaccio', function() {
// recover the server instances
const server = process.server;
const server2 = process.server2;
const server3 = process.server3;
// On start initialise 3 verdaccio servers
before(function(done) {
Promise.all([
require('./lib/startup').start('./store/test-storage', '/store/config-1.yaml'),
require('./lib/startup').start('./store/test-storage2', '/store/config-2.yaml'),
require('./lib/startup').start('./store/test-storage3', '/store/config-3.yaml'),
]).then(() => {
done();
}).catch(function(error) {
console.error("error on start servers", error);
});
});
before(function() {
return Promise.all([server, server2, server3].map(function(server) {
// save a lsof -p output in order to compare on finish on finish all test
}));
});
..........
// here is the unique line you should add, the new functional test.
require('./my-functional-test.js')();
// On finish kill all server
after(function(done) {
Promise.all([check(server), check(server2), check(server3)]).then(function() {
done();
}, (reason) => {
assert.equal(reason, null);
done();
});
});
});
```
Perhaps this is not he best approach, but, it's how works right now. So, you just learnt how the bootstrap works and how to add a new group of functional tests.
#### The lib/server.js
The server class is just a wrapper that simulates a `npm` client and provides a simple API for the funtional test.
As we mention in the previous section, we are creating 3 process servers that are accessible in each process as `process.server;`, `process.server2;` and ``process.server3;`.
Using such reference you will be able to send request to any of the 3 instance running.
#### The lib/startup.js
The startup file is the responsable to create the 3 verdaccio instances and inject them to the `process.x` global variable.
#### The lib/request.js
This module holds a `PromiseAssert` which extends from `Promise` adding methods to handle all request from `lib/server.js`.
### Usage
Here we are gonna describe how it looks like an usual functional test, check inline for more detail information.
```javascript
'use strict';
module.exports = function() {
// you can access the 3 instance through process global variables
const server = process.server;
const server2 = process.server2;
describe('my-functional-group-test', function() {
before(function() {
// create a raw emtpy package
const pkg = require('./fixtures/package')('new-package');
return server.putPackage('new-package', pkg)
// check whether was uploaded correctly
.status(201)
// check whether body response is ok
.body_ok(/created new package/);
});
// since before are not registred, we use emtpy it to display before putPackage was success
it('creating new package / srv1', function() {});
it('should do something else here ..... ', function() {
// this should fails since fakeVersion does not exist
// note we use server2 because is an uplink of server 1
return server2.getTarball('new-package', 'fakeVersion')
.status(404)
.body_error(/no such file/);
});
});
};
```
### Test/integration
These section never has been used, but we are looking for help to make it run properly. All new ideas are very welcome.

View File

@ -0,0 +1,43 @@
---
id: uplinks
date: 2017-07-10T23:36:56.503Z
title: Uplinks
---
An *uplink* is a link with an external registry that provides acccess to external packages.
### Usage
```yaml
uplinks:
npmjs:
url: https://registry.npmjs.org/
server2:
url: http://mirror.local.net/
timeout: 100ms
server3:
url: http://mirror2.local.net:9000/
baduplink:
url: http://localhost:55666/
```
### Configuration
You can define mutiple uplinks and each of them must have an unique name (key). They can have two properties:
| Property | Type | Required | Example | Support | Description | Default |
| ------------ | ------- | -------- | ----------------------------------------------------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------ | ------- |
| url | string | Yes | https://registry.npmjs.org/ | all | The registry url | |
| timeout | string | No | 100ms | all | set new timeout for the request | 30s |
| maxage | string | No | 10m | all | limit maximun failure request | 2m |
| fail_timeout | string | No | 10m | all | defines max time when a request becomes a failure | 5m |
| max_fails | number | No | 2 | all | limit maximun failure request | 2 |
| cache | boolean | No | [true,false] | >= 2.1 | avoid cache tarballs | true |
| auth | list | No | type: [bearer,basic], [token: "token",token_env: [true,\<get name process.env\>]] | >= 2.5 | assigns the header 'Authorization' see: http://blog.npmjs.org/post/118393368555/deploying-with-npm-private-modules | |
| headers | list | No | authorization: "Basic YourBase64EncodedCredentials==" | all | list of custom headers for the uplink | |
### You Must know
* Uplinks must be registries compatible with the `npm` endpoints. Eg: *verdaccio*, *sinopia@1.4.0*, *npmjs registry*, *yarn registry* and more.
* Setting `cache` to false will help to save space in your hard drive.
* Exceed with multiple uplinks might slow down the lookup of your packages due for each request a npm client does, verdaccio does 1 call for each uplink.
* The (timeout, maxage and fail_timeout) format follow the [NGINX measurement units](http://nginx.org/en/docs/syntax.html)

View File

@ -0,0 +1,32 @@
---
id: use-cases
date: 2017-07-10T23:36:56.503Z
title: Use Cases
---
## Using private packages
You can add users and manage which users can access which packages.
It is recommended that you define a prefix for your private packages, for example "local", so all your private things will look like this: `local-foo`. This way you can clearly separate public packages from private ones.
## Using public packages from npmjs.org
If some package doesn't exist in the storage, server will try to fetch it from npmjs.org. If npmjs.org is down, it serves packages from cache pretending that no other packages exist. Verdaccio will download only what's needed (= requested by clients), and this information will be cached, so if client will ask the same thing second time, it can be served without asking npmjs.org for it.
Example: if you successfully request express@3.0.1 from this server once, you'll able to do that again (with all it's dependencies) anytime even if npmjs.org is down. But say express@3.0.0 will not be downloaded until it's actually needed by somebody. And if npmjs.org is offline, this server would say that only express@3.0.1 (= only what's in the cache) is published, but nothing else.
## Override public packages
If you want to use a modified version of some public package `foo`, you can just publish it to your local server, so when your type `npm install foo`, it'll consider installing your version.
There's two options here:
1. You want to create a separate fork and stop synchronizing with public version.
If you want to do that, you should modify your configuration file so verdaccio won't make requests regarding this package to npmjs anymore. Add a separate entry for this package to *config.yaml* and remove `npmjs` from `proxy` list and restart the server.
When you publish your package locally, you should probably start with version string higher than existing one, so it won't conflict with existing package in the cache.
2. You want to temporarily use your version, but return to public one as soon as it's updated.
In order to avoid version conflicts, you should use a custom pre-release suffix of the next patch version. For example, if a public package has version 0.1.2, you can upload 0.1.3-my-temp-fix. This way your package will be used until its original maintainer updates his public package to 0.1.3.

View File

@ -0,0 +1,21 @@
---
id: webui
date: 2017-07-10T23:36:56.503Z
title: Web User Interface
---
Verdaccio has a web user interface to display only the private packges and can be customisable.
```yaml
web:
enable: true
title: Verdaccio
logo: logo.png
```
### Configuration
| Property | Type | Required | Example | Support | Description |
| -------- | ------- | -------- | ------------------------------ | ------- | ---------------------------------- |
| enable | boolean | No | true/false | all | allow to display the web interface |
| title | string | No | $authenticated | all | HTML head title description |
| logo | string | No | http://my.logo.domain/logo.png | all | a URI where logo is located |

View File

@ -0,0 +1,48 @@
---
id: windows
date: 2017-07-10T23:36:56.503Z
title: Installing As a Windows Service
---
Loosely based upon the instructions found [here](http://asysadmin.tumblr.com/post/32941224574/running-nginx-on-windows-as-a-service). I crafted the following and it provided me with a fully working verdaccio service installation:
1. Create a directory for verdaccio
* mkdir `c:\verdaccio`
* cd `c:\verdaccio`
2. Install verdaccio locally (I ran into npm issues with global installs)
* npm install verdaccio
3. Create your `config.yaml` file in this location `(c:\verdaccio\config.yaml)`
4. Windows Service Setup
## Using NSSM
ALTERNATIVE METHOD: (WinSW package was missing when I tried to download it)
* Download [NSSM](https://www.nssm.cc/download/) and extract
* Add the path that contains nssm.exe to the PATH
* Open an administrative command
* Run nssm install verdaccio At a minimum you must fill in the Application tab Path, Startup directory and Arguments fields. Assuming an install with node in the system path and a location of c:\verdaccio the below values will work:
* Path: `node`
* Startup directory: `c:\verdaccio`
* Arguments: `c:\verdaccio\node_modules\verdaccio\src\lib\cli.js -c c:\verdaccio\config.yaml`
You can adjust other service settings under other tabs as desired. When you are done, click Install service button
* Start the service sc start verdaccio
## Using WinSW
* As of 2015-10-27, WinSW is no longer available at the below location. Please follow the Using NSSM instructions above.
* Download [WinSW](http://repo.jenkins-ci.org/releases/com/sun/winsw/winsw/)
* Place the executable (e.g. `winsw-1.9-bin.exe`) into this folder (`c:\verdaccio`) and rename it to `verdaccio-winsw.exe`
* Create a configuration file in `c:\verdaccio`, named `verdaccio-winsw.xml` with the following configuration `xml verdaccio verdaccio verdaccio node c:\verdaccio\node_modules\verdaccio\src\lib\cli.js -c c:\verdaccio\config.yaml roll c:\verdaccio`.
* Install your service
* `cd c:\verdaccio`
* `verdaccio-winsw.exe install`
* Start your service
* `verdaccio-winsw.exe start`
Some of the above config is more verbose than I had expected, it appears as though 'workingdirectory' is ignored, but other than that, this works for me and allows my verdaccio instance to persist between restarts of the server, and also restart itself should there be any crashes of the verdaccio process.

View File

@ -44,7 +44,7 @@ storage: ./storage
### Authentification
The authentification set up is done here, the default auth is based on `htpasswd` and is build-in. You can modify this behaviour via [plugins](plugins.md). For more information about this section read the [auth page](auth.md).
The authentification set up is done here, the default auth is based on `htpasswd` and is built-in. You can modify this behaviour via [plugins](plugins.md). For more information about this section read the [auth page](auth.md).
```yaml
auth: