0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2025-01-06 22:40:26 -05:00

Merge branch 'master' into feat-webui-scope

This commit is contained in:
Juan Picado @jotadeveloper 2018-07-30 07:17:58 +02:00 committed by GitHub
commit 488f4efb9b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 97 additions and 97 deletions

View file

@ -3,12 +3,12 @@
"localized-strings": {
"next": "下一个",
"previous": "上一个",
"tagline": "Verdaccio · A lightweight private npm proxy registry",
"tagline": "Verdaccio · 一个轻量的私有npm proxy registry",
"ansible": "Ansible",
"authentification": "认证",
"build": "编译源代码",
"chef": "Chef Cookbook",
"ci": "Continuous Integration",
"ci": "持续集成",
"cli": "命令行工具",
"configuration": "配置文件",
"contributing": "参与贡献 Verdaccio",
@ -31,7 +31,7 @@
"unit-testing": "单元测试",
"uplinks": "Uplinks",
"use-cases": "使用场景",
"webui": "Web User Interface2",
"webui": "网页用户界面2",
"what-is-verdaccio": "什么是 Verdaccio",
"windows": "作为 Windows 服务安装",
"Docs": "文档",
@ -58,13 +58,13 @@
"Learn more about Verdaccio using the [documentation on this site.](/docs/en/installation.html)|no description given": "通过 [站内文档](/docs/en/installation.html) 了解更多信息",
"You can follow and contact us on|no description given": "您可在这里以关注并联系我们",
"and also you can chat with the Verdaccio community at|no description given": "你也可以在这里与 Verdaccio 社区交流",
"If the documentation is not enough help, you can try browsing into our|no description given": "If the documentation is not enough help, you can try browsing into our",
"If the documentation is not enough help, you can try browsing into our|no description given": "如果此文档无法帮忙,您可以试着浏览我们的",
"This project is maintained by the Verdaccio community.|no description given": "这个项目由 Verdaccio 社区维护。",
"Get Started|no description given": "Get Started",
"Get Started|no description given": "开始",
"Contribute|no description given": "贡献",
"Thats it ! Enjoy your private package manager.|no description given": "就这么简单! 开始使用你的 私有 npm 仓库吧。",
"Many great developers are already enjoying Verdaccio, join the community!|no description given": "Many great developers are already enjoying Verdaccio, join the community!",
"**npm**, **yarn** and **pnpm** are part of any development workflow we try to catch up with the latest updates.|no description given": "**npm**, **yarn** and **pnpm** are part of any development workflow we try to catch up with the latest updates.",
"Many great developers are already enjoying Verdaccio, join the community!|no description given": "很多好的开发人员已经开始享受使用Verdaccio, 请加入社区!",
"**npm**, **yarn** and **pnpm** are part of any development workflow we try to catch up with the latest updates.|no description given": "**npm**, **yarn** 和**pnpm**是任何开发流程的一部分,我们试图在最新版本中赶上。",
"The most popular npm clients are supported|no description given": "支持所有主流的 npm 客户端",
"We have an official **Docker** image ready to use|no description given": "我们有官方的 **Docker** 镜像可供使用",
"and **Kubernetes Helm** support for easy deployment|no description given": "和 ** Kubernetes Helm** 支持, 便于部署",
@ -72,7 +72,7 @@
"Verdaccio is plugin based, authentication, middleware and storage support. Just pick one or create your custom one.|no description given": "Verdaccio 是基于插件的,支持身份验证、中间件和存储插件。只需选择一个现有的即可使用或开发一个属于您自己的。",
"Plugin Support|no description given": "插件支持",
"Who's Using This?|no description given": "谁在用这个?",
"This project is used by all these people|no description given": "This project is used by all these people",
"This project is used by all these people|no description given": "此项目被所有这些人使用",
"More|no description given": "更多",
"Users|no description given": "用户",
"This project is used by many folks|no description given": "这个项目已被许多人采用。",

View file

@ -31,7 +31,7 @@ logs:
## 模块
The following sections explain what each property means and the different options.
以下各模块解释了每个属性的含义以及不同的选项。
### 存储
@ -41,17 +41,17 @@ The following sections explain what each property means and the different option
storage: ./storage
```
### Plugins
### 插件
Is the location of the plugin directory. Useful for Docker/Kubernetes based deployments.
是插件目录的位置。对Docker/Kubernetes 基础上的配置非常有用。
```yaml
plugins: ./plugins
```
### Authentification
### 认证
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).
认证设置在这里完成,默认的授权是基于`htpasswd` 并且是内置的。 您可以通过[plugins](plugins.md)来修改此行为。 有关更多本模块的详细信息,请阅读[auth页面](auth.md)。
```yaml
auth:
@ -62,7 +62,7 @@ auth:
### Web UI
This properties allow you to modify the look and feel of the web UI. For more information about this section read the [web ui page](web.md).
此属性让您可以修改此web UI的外观和感觉。有关更多本模块的详细信息请阅读 [web ui页面](web.md)。
```yaml
web:
@ -71,9 +71,9 @@ web:
logo: logo.png
```
### Uplinks
### 上行链路
Uplinks is the ability of the system to fetch packages from remote registries when those packages are not available locally. For more information about this section read the [uplinks page](uplinks.md).
当包不在本地的时候上行链路可以让系统从远程的registry里获取这些包。 有关更多本模块的详细信息,请阅读[上行链路页面](uplinks.md)。
```yaml
uplinks:
@ -81,9 +81,9 @@ uplinks:
url: https://registry.npmjs.org/
```
### Packages
###
Packages allow the user to control how the packages are gonna be accessed. For more information about this section read the [packages page](packages.md).
包让用户控制访问包的权限。有关更多本模块的详细信息,请阅读[包页面](packages.md)。
```yaml
packages:
@ -95,9 +95,9 @@ packages:
## 高级设置
### Offline Publish
### 脱线发布
By default `verdaccio` does not allow to publish when the client is offline, that behavior can be overridden by setting this to *true*.
`verdaccio`默认不允许客户脱线的时候发布,可以把这设置为*true*来覆盖此行为。
```yaml
publish:
@ -106,7 +106,7 @@ publish:
<small>Since: <code>verdaccio@2.3.6</code> due <a href="https://github.com/verdaccio/verdaccio/pull/223">#223</a></small>
### URL Prefix
### URL 前缀
```yaml
url_prefix: https://dev.company.local/verdaccio/
@ -114,17 +114,17 @@ url_prefix: https://dev.company.local/verdaccio/
Since: `verdaccio@2.3.6` due [#197](https://github.com/verdaccio/verdaccio/pull/197)
### Max Body Size
### 最大正文大小
By default the maximum body size for a JSON document is `10mb`, if you run in errors as `"request entity too large"` you may increase this value.
默认的最大JSON 文件正文大小为`10mb`, 如果遇到`"request entity too large"` 的错误提示,您可以增大此数值。
```yaml
max_body_size: 10mb
```
### Listen Port
### 监听端口
`verdaccio` runs by default in the port `4873`. Changing the port can be done via [cli](cli.md) or in the configuration file, the following options are valid.
`verdaccio` 默认在`4873`端口运行。可以通过[cli](cli.md) 或者在配置文件里更改端口,以下选项有效。
```yaml
listen:
@ -138,7 +138,7 @@ listen:
### HTTPS
To enable `https` in `verdaccio` it's enough to set the `listen` flag with the protocol *https://*. For more information about this section read the [ssl page](ssl.md).
要在 `verdaccio`启用`https`,只要用 *https://*协议来设置`listen` 标志。 有关更多本模块的详细信息,请阅读 [ssl page](ssl.md)。
```yaml
https:
@ -149,11 +149,11 @@ https:
### Proxy
Proxies are special-purpose HTTP servers designed to transfer data from remote servers to local clients.
Proxy是专门把数据从远程服务器传输到本地客户端的HTTP 服务器。
#### http_proxy and https_proxy
If you have a proxy in your network you can set a `X-Forwarded-For` header using the following properties.
如果您的网络里有proxy您可以用以下属性设置`X-Forwarded-For` 页眉。
```yaml
http_proxy: http://something.local/
@ -162,15 +162,15 @@ https_proxy: https://something.local/
#### no_proxy
This variable should contain a comma-separated list of domain extensions proxy should not be used for.
此变量应该包含一个proxy 本不应该用到的以逗号分开的域名扩展列表。
```yaml
no_proxy: localhost,127.0.0.1
```
### Notifications
### 通知
Enabling notifications to third-party tools is fairly easy via web hooks. For more information about this section read the [notifications page](notifications.md).
通过web hooks来启用第三方工具通知是很容易的。有关更多本模块的详细信息请阅读 [notifications page通知页面](notifications.md)。
```yaml
notify:
@ -182,11 +182,11 @@ notify:
> 有关更多配置设置的详细信息,请[核对源代码](https://github.com/verdaccio/verdaccio/tree/master/conf)。
### Audit
### 审核
<small>Since: <code>verdaccio@3.0.0</code></small>
`npm audit` is a new command released with [npm 6.x](https://github.com/npm/npm/releases/tag/v6.1.0). Verdaccio includes a built-in middleware plugin to handle this command.
`npm audit` 是和[npm 6.x](https://github.com/npm/npm/releases/tag/v6.1.0)一起发布的新命令。Verdaccio 包含一个内置的middleware plugin(中间插件)来处理此命令。
> 新安装采用默认版本,但是您可以添加以下代码段到配置文件中

View file

@ -56,7 +56,7 @@ docker run -it --rm --name verdaccio -p 4873:4873 verdaccio/verdaccio
如果您已经用 `verdaccio`作为最后参数[在本地创建一个镜像](#build-your-own-docker-image)。
You can use `-v` to bind mount `conf`, `storage` and `plugins` to the hosts filesystem:
您可以用 `-v`来绑定安装 `conf`, `storage` 和`plugins`到主机文件系统中:
```bash
V_PATH=/path/for/verdaccio; docker run -it --rm --name verdaccio -p 4873:4873 \
@ -68,15 +68,15 @@ V_PATH=/path/for/verdaccio; docker run -it --rm --name verdaccio -p 4873:4873 \
> 请注意Verdaccio 在容器内是作为non-root 用户端 (uid=100, gid=101) 运行, 如果您使用绑定安装来覆盖默认设置, 您需要确保安装目录是被指定到正确的用户端。 在上面的示例里,您要运行 `sudo chown -R 100:101 /opt/verdaccio`,否则在运行的时候您会得到权限错误提醒。 推荐[使用docker卷volume)](https://docs.docker.com/storage/volumes/)来替代绑定安装。
### 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.
插件可以在单独的目录里安装并用Docker或者Kubernetes挂载然而请确保使用与Verdaccio Dockerfile相同的基镜像的本地依赖项来创建插件。
### Docker and custom port configuration
### Docker和自定义端口配置
Any `host:port` configured in `conf/config.yaml` under `listen` is currently ignored when using docker.
任何在 `listen`下的`conf/config.yaml` 里配置的`host:port` 目前在使用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`.
如果您希望在不同的端口获得verdaccio docker instance比如 `docker run` 命令里的`5000`,请用 `-p 5000:4873`来取代`-p 4873: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.

View file

@ -2,9 +2,9 @@
id: plugins
title: "插件"
---
Verdaccio is an plugabble aplication. It can be extended in many ways, either new authentication methods, adding endpoints or using a custom storage.
Verdaccio是一个可插入式应用程序。它可以通过多种方式扩展,可以是新的认证方法,添加端点或者使用定制存储。
> If you are interested to develop your own plugin, read the [development](dev-plugins.md) section.
> 如果您感兴趣开发自己的插件,请阅读[开发](dev-plugins.md)模块。
## 用法
@ -68,7 +68,7 @@ middlewares:
enabled: true
```
> You might follow the [audit middle plugin](https://github.com/verdaccio/verdaccio-audit) as base example.
> 您可以跟着[audit middle plugin审核中间插件](https://github.com/verdaccio/verdaccio-audit)的基本范例。
### 存储插件配置
@ -80,7 +80,7 @@ store:
limit: 1000
```
> If you define a custom store, the property **storage** in the configuration file will be ignored.
> 如果您定义定制存储,配置文件中的**存储**属性将会被忽略。
## 旧式插件
@ -106,7 +106,7 @@ store:
* [sinopia-ldap](https://www.npmjs.com/package/sinopia-ldap)sinopia LDAP认证插件。
* [sinopia-github-oauth-env](https://www.npmjs.com/package/sinopia-github-oauth-env)基于github oauth web flow的Sinopia认证插件。
> 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*.
> 所有sinopia 插件都应该和所有verdaccio将来版本兼容。 无论如何,我们鼓励贡献者们迁移到 modern verdaccio API并使用 *verdaccio-xx-name*为前缀。
## Verdaccio插件
@ -119,7 +119,7 @@ store:
* [verdaccio-active-directory](https://github.com/nowhammies/verdaccio-activedirectory)verdaccio Active Directory认证插件
* [verdaccio-gitlab](https://github.com/bufferoverflow/verdaccio-gitlab)使用Gitlab的Personal Access Token进行认证
* [verdaccio-htpasswd](https://github.com/verdaccio/verdaccio-htpasswd):基于(内置)htpasswd文件插件的verdaccio认证插件
* [verdaccio-github-oauth](https://github.com/aroundus-inc/verdaccio-github-oauth): Github oauth authentication plugin for verdaccio.
* [verdaccio-github-oauth](https://github.com/aroundus-inc/verdaccio-github-oauth): verdaccio 的Github oauth认证插件。
### 中间件插件
@ -137,4 +137,4 @@ store:
## 警告
> 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

@ -1,6 +1,6 @@
---
id: uplinks
title: "Uplinks"
id: uplinks(上行链路)
title: "上行链路"
---
*上行链路* 是指可以访问到外部包的外部注册服务器地址。
@ -81,6 +81,6 @@ uplinks:
* 自版本 `v2.3.0`以来, Verdaccio 不在使用Basic Authentication。verdaccio 所生成的所有令牌都基于 JWT ([JSON Web Token](https://jwt.io/))
* 上行链路必须是兼容`npm`的注册服务器 例如: *verdaccio*, `sinopia@1.4.0`, *npmjs registry*, *yarn registry*, *JFrog*, *Nexus* and more.
* 设置`cache` 为false可以帮助节省你的硬盘空间。 This will avoid store `tarballs` but [it will keep metadata in folders](https://github.com/verdaccio/verdaccio/issues/391).
* 设置`cache` 为false可以帮助节省你的硬盘空间。 这将避免存储 `tarballs`,但是[它将保留元数据在文件夹里](https://github.com/verdaccio/verdaccio/issues/391)。
* 配置过多的上行链路会导致包查询速度变慢这是因为相比较一个npm客户端每发送一次的请求verdaccio却需要向每个上行链路都发送一次这样的请求
* 这些属性(timeout, maxage and fail_timeout) 的配置单位格式参考[NGINX measurement units](http://nginx.org/en/docs/syntax.html)

View file

@ -1,6 +1,6 @@
---
id: use-cases使用-场景
title: "使用场景"
id: use-cases使用-案例
title: "使用案例"
---
## 使用私有包

View file

@ -1,52 +1,52 @@
---
id: what-is-verdaccio
title: "What is Verdaccio?"
id: what-is-verdaccio什么是verdaccio
title: "什么是Verdaccio"
---
Verdaccio is a **lightweight private npm proxy registry** built in **Node.js**
Verdaccio 是一个 **Node.js**创建的**轻量的私有npm proxy registry**
## What's a registry
## 什么是Registry
* A repository for packages that implements the **CommonJS Compliant Package Registry specification** for reading package info
* Provide an API compatible with npm clients **(yarn/npm/pnpm)**
* Follow the semantic Versioning compatible **(semver)**
* 包的资源库,它执行**CommonJS Compliant Package Registry specification** 来阅读包信息
* 提供与npm clients **(yarn/npm/pnpm)**兼容的API
* 跟随Versioning语义兼容**(semver)**
$> verdaccio
![registry](/svg/verdaccio_server.gif)
## Using Verdaccio
## 使用Verdaccio
Using verdaccio with any node package manager client is quite straightforward.
用任何节点包manager client使用 verdaccio是相当简单的。
![registry](/svg/npm_install.gif)
You can use a custom registry either setting globally for all your projects
您要么可以用定制registry全局设置所有项目
npm set registry http://localhost:4873
or by command line as argument `--registry` in npm (slightly different in yarn)
要么把命令行作为npm里的参数`--registry`在yarn里稍微有些不同
npm install lodash --registry http://localhost:4873
## Private
## 私有
All packages that you publish are private and only accessible based in your configuration.
所有您发布的包是私有的并且访问权限仅取决于您的配置。
## Proxy
Verdaccio cache all dependencies by demand and speed up installations in local or private networks.
Verdaccio 按需要缓存所有相关项,并在当地或私有网络下可以加速安装。
## Verdaccio in a nutshell
## Verdaccio是个小容器
* It's a web app based on Node.js
* It's a private npm registry
* It's a local network proxy
* It's a Pluggable application
* It's a fairly easy install and use
* We offer Docker and Kubernetes support
* It is 100% compatible with yarn, npm and pnpm
* It was **forked** based on `sinopia@1.4.0` and 100% **backward compatible**.
* Verdaccio means **A green color popular in late medieval Italy for fresco painting**.
* 它是基于Node.js的网页应用程序
* 它是私有npm registry
* 它是本地网络proxy
* 它是可插入式应用程序
* 它相当容易安装和使用
* 我们提供Docker和Kubernetes支持
* 它与yarn, npm 和pnpm 100% 兼容
* 它**forked**于`sinopia@1.4.0`并且100% **向后兼容**
* Verdaccio 表示**意大利中世纪晚期fresco 绘画中流行的一种绿色**的意思。

View file

@ -1,51 +1,51 @@
---
id: windows
title: "Installing As a Windows Service"
title: "作为 Windows 服务安装"
---
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:
基于的非精确指南请见[这里](http://asysadmin.tumblr.com/post/32941224574/running-nginx-on-windows-as-a-service)。 我制作以下它提供良好运行的verdaccio 服务安装:
1. Create a directory for verdaccio
1. 为 verdaccio创建一个目录
* mkdir `c:\verdaccio`
* cd `c:\verdaccio`
2. Install verdaccio locally (I ran into npm issues with global installs)
2. 当地安装verdaccio我在全局安装的时候出现npm问题
* npm install verdaccio
3. Create your `config.yaml` file in this location `(c:\verdaccio\config.yaml)`
4. Windows Service Setup
3. 在此位置`(c:\verdaccio\config.yaml)`创建`config.yaml`文件
4. Windows服务设置
## Using NSSM
## 使用NSSM
ALTERNATIVE METHOD: (WinSW package was missing when I tried to download it)
替代方法: (当我尝试下载的时候WinSW 包缺失)
* Download [NSSM](https://www.nssm.cc/download/) and extract
* 下载[NSSM](https://www.nssm.cc/download/)并提取
* Add the path that contains nssm.exe to the PATH
* 添加包含nssm.exe 的路径到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:
* 运行nssm install verdaccio至少必须填写应用程序 tab Path选项卡路径启动目录和参数字段。 假设在系统路径中以及c:\verdaccio位置用node安装以下的值将起作用
* Path: `node`
* Startup directory: `c:\verdaccio`
* Arguments: `c:\verdaccio\node_modules\verdaccio\build\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
## 使用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
* 截至2015-10-27, WinSW 不再存在以下位置。请跟随以上使用NSSM指南。
* 下载 [WinSW](http://repo.jenkins-ci.org/releases/com/sun/winsw/winsw/)
* 放置可执行文件(例如`winsw-1.9-bin.exe`)到此文件夹(`c:\verdaccio`) 中并将其重命名为`verdaccio-winsw.exe`
* 在`c:\verdaccio`创建一个配置文件, 命名为`verdaccio-winsw.xml`,它有以下配置`xml verdaccio verdaccio verdaccio node c:\verdaccio\node_modules\verdaccio\src\lib\cli.js -c c:\verdaccio\config.yaml roll c:\verdaccio`
* 安装服务
* `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.
以上的一些配置比我预想的要繁琐,看起来好像忽略了'workingdirectory'但除此以外这对我来说很有效而且让verdaccio instance保持在服务器重启之间并且还在verdaccio 流程出事故的时候可以自我重启。
## Repositories
## 资源库
* [verdaccio-deamon-windows](https://github.com/davidenke/verdaccio-deamon-windows)