Merge branch 'master' into 4.x

This commit is contained in:
Juan Picado @jotadeveloper 2018-08-17 12:17:45 +02:00 committed by GitHub
commit f2b2280f19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
35 changed files with 141 additions and 141 deletions

View File

@ -48,7 +48,7 @@ auth:
#### Multiple Auth plugins
This is tecnically possible, the plugins order becames important, the the credentials will resolved in order.
This is tecnically possible, making the plugin order important, as the credentials will be resolved in order.
```yaml
auth:

View File

@ -1,5 +1,5 @@
{
"_comment": "这个文件由 write-translations.js 生成",
"_comment": "此文件由 write-translations.js 自动生成",
"localized-strings": {
"next": "下一个",
"previous": "上一个",
@ -38,8 +38,8 @@
"Blog": "博客",
"Help": "帮助",
"GitHub": "GitHub",
"Team": "Team",
"Donate": "Donate",
"Team": "团队",
"Donate": "捐赠",
"Introduction": "介绍",
"Configuration": "配置",
"Server": "服务器",
@ -56,7 +56,7 @@
"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.",
"This project is maintained by a dedicated group of people.|statement made to reader": "这个项目有专业的组织维护。",
"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 社区交流",

View File

@ -138,7 +138,7 @@ Be **aware that the order of your packages definitions is important and always u
### Configuration
You can define mutiple `packages` and each of them must have an unique `Regex`.
You can define mutiple `packages` and each of them must have an unique `Regex`. The syntax is based on [minimatch glob expressions](https://github.com/isaacs/minimatch).
| Property | Type | Required | Example | Support | Description |
| -------- | ------- | -------- | -------------- | ------- | ------------------------------------------- |

View File

@ -45,7 +45,7 @@ auth:
#### Multiple Auth plugins
This is tecnically possible, the plugins order becames important, the the credentials will resolved in order.
This is tecnically possible, making the plugin order important, as the credentials will be resolved in order.
```yaml
auth:

View File

@ -138,7 +138,7 @@ Be **aware that the order of your packages definitions is important and always u
### Configuration
You can define mutiple `packages` and each of them must have an unique `Regex`.
You can define mutiple `packages` and each of them must have an unique `Regex`. The syntax is based on [minimatch glob expressions](https://github.com/isaacs/minimatch).
| Property | Type | Required | Example | Support | Description |
| -------- | ------- | -------- | -------------- | ------- | ------------------------------------------- |

View File

@ -45,7 +45,7 @@ auth:
#### Multiple Auth plugins
This is tecnically possible, the plugins order becames important, the the credentials will resolved in order.
This is tecnically possible, making the plugin order important, as the credentials will be resolved in order.
```yaml
auth:

View File

@ -138,7 +138,7 @@ Se **consciente que el orden de la definición de los paquetes es importante y s
### Configuración
Puedes definir multiples `paquetes`y cada uno de ellos deben tener un único ` Regex`.
You can define mutiple `packages` and each of them must have an unique `Regex`. The syntax is based on [minimatch glob expressions](https://github.com/isaacs/minimatch).
| Propiedad | Tipo | Requerido | Ejemplo | Soporte | Descripción |
| --------- | ------- | --------- | -------------- | ------- | ---------------------------------------------------------- |

View File

@ -45,7 +45,7 @@ auth:
#### Múltiples Plugins Auth
Esto es técnicamente posible, el orden de los plugins se vuelve importante, las credenciales serán resueltas en orden.
This is tecnically possible, making the plugin order important, as the credentials will be resolved in order.
```yaml
auth:

View File

@ -138,7 +138,7 @@ Be **aware that the order of your packages definitions is important and always u
### Configuration
You can define mutiple `packages` and each of them must have an unique `Regex`.
You can define mutiple `packages` and each of them must have an unique `Regex`. The syntax is based on [minimatch glob expressions](https://github.com/isaacs/minimatch).
| Property | Type | Required | Example | Support | Description |
| -------- | ------- | -------- | -------------- | ------- | ------------------------------------------- |

View File

@ -45,7 +45,7 @@ auth:
#### Multiple Auth plugins
This is tecnically possible, the plugins order becames important, the the credentials will resolved in order.
This is tecnically possible, making the plugin order important, as the credentials will be resolved in order.
```yaml
auth:

View File

@ -138,7 +138,7 @@ Be **aware that the order of your packages definitions is important and always u
### Configuration
You can define mutiple `packages` and each of them must have an unique `Regex`.
You can define mutiple `packages` and each of them must have an unique `Regex`. The syntax is based on [minimatch glob expressions](https://github.com/isaacs/minimatch).
| Property | Type | Required | Example | Support | Description |
| -------- | ------- | -------- | -------------- | ------- | ------------------------------------------- |

View File

@ -45,7 +45,7 @@ auth:
#### Multiple Auth plugins
This is tecnically possible, the plugins order becames important, the the credentials will resolved in order.
This is tecnically possible, making the plugin order important, as the credentials will be resolved in order.
```yaml
auth:

View File

@ -138,7 +138,7 @@ Be **aware that the order of your packages definitions is important and always u
### Configuration
You can define mutiple `packages` and each of them must have an unique `Regex`.
You can define mutiple `packages` and each of them must have an unique `Regex`. The syntax is based on [minimatch glob expressions](https://github.com/isaacs/minimatch).
| Property | Type | Required | Example | Support | Description |
| -------- | ------- | -------- | -------------- | ------- | ------------------------------------------- |

View File

@ -45,7 +45,7 @@ auth:
#### Multiple Auth plugins
This is tecnically possible, the plugins order becames important, the the credentials will resolved in order.
This is tecnically possible, making the plugin order important, as the credentials will be resolved in order.
```yaml
auth:

View File

@ -138,7 +138,7 @@ Be **aware that the order of your packages definitions is important and always u
### Configuration
You can define mutiple `packages` and each of them must have an unique `Regex`.
You can define mutiple `packages` and each of them must have an unique `Regex`. The syntax is based on [minimatch glob expressions](https://github.com/isaacs/minimatch).
| Property | Type | Required | Example | Support | Description |
| -------- | ------- | -------- | -------------- | ------- | ------------------------------------------- |

View File

@ -45,7 +45,7 @@ auth:
#### Multiple Auth plugins
This is tecnically possible, the plugins order becames important, the the credentials will resolved in order.
This is tecnically possible, making the plugin order important, as the credentials will be resolved in order.
```yaml
auth:

View File

@ -138,7 +138,7 @@ Be **aware that the order of your packages definitions is important and always u
### Configuration
You can define mutiple `packages` and each of them must have an unique `Regex`.
You can define mutiple `packages` and each of them must have an unique `Regex`. The syntax is based on [minimatch glob expressions](https://github.com/isaacs/minimatch).
| Property | Type | Required | Example | Support | Description |
| -------- | ------- | -------- | -------------- | ------- | ------------------------------------------- |

View File

@ -45,7 +45,7 @@ auth:
#### Multiple Auth plugins
This is tecnically possible, the plugins order becames important, the the credentials will resolved in order.
This is tecnically possible, making the plugin order important, as the credentials will be resolved in order.
```yaml
auth:

View File

@ -138,7 +138,7 @@ Be **aware that the order of your packages definitions is important and always u
### Configuration
You can define mutiple `packages` and each of them must have an unique `Regex`.
You can define mutiple `packages` and each of them must have an unique `Regex`. The syntax is based on [minimatch glob expressions](https://github.com/isaacs/minimatch).
| Property | Type | Required | Example | Support | Description |
| -------- | ------- | -------- | -------------- | ------- | ------------------------------------------- |

View File

@ -45,7 +45,7 @@ auth:
#### Multiple Auth plugins
This is tecnically possible, the plugins order becames important, the the credentials will resolved in order.
This is tecnically possible, making the plugin order important, as the credentials will be resolved in order.
```yaml
auth:

View File

@ -138,7 +138,7 @@ Be **aware that the order of your packages definitions is important and always u
### Configuration
You can define mutiple `packages` and each of them must have an unique `Regex`.
You can define mutiple `packages` and each of them must have an unique `Regex`. The syntax is based on [minimatch glob expressions](https://github.com/isaacs/minimatch).
| Property | Type | Required | Example | Support | Description |
| -------- | ------- | -------- | -------------- | ------- | ------------------------------------------- |

View File

@ -45,7 +45,7 @@ auth:
#### Multiple Auth plugins
This is tecnically possible, the plugins order becames important, the the credentials will resolved in order.
This is tecnically possible, making the plugin order important, as the credentials will be resolved in order.
```yaml
auth:

View File

@ -138,7 +138,7 @@ Be **aware that the order of your packages definitions is important and always u
### Configuration
You can define mutiple `packages` and each of them must have an unique `Regex`.
You can define mutiple `packages` and each of them must have an unique `Regex`. The syntax is based on [minimatch glob expressions](https://github.com/isaacs/minimatch).
| Property | Type | Required | Example | Support | Description |
| -------- | ------- | -------- | -------------- | ------- | ------------------------------------------- |

View File

@ -45,7 +45,7 @@ auth:
#### Multiple Auth plugins
This is tecnically possible, the plugins order becames important, the the credentials will resolved in order.
This is tecnically possible, making the plugin order important, as the credentials will be resolved in order.
```yaml
auth:

View File

@ -45,7 +45,7 @@ auth:
#### Multiple Auth plugins
This is tecnically possible, the plugins order becames important, the the credentials will resolved in order.
This is technically possible, the plugins order becames important, the the credentials will resolved in order.
```yaml
auth:
@ -132,4 +132,4 @@ store:
## 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.
> 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

@ -32,11 +32,11 @@ Ví dụ:
proxy: npmjs
```
Như đã giải thích t phần [issue #212](https://github.com/verdaccio/verdaccio/issues/212#issuecomment-308578500) đến phần `npm@5.3.0` và trong tất cả các phiên bản phụ ** bạn sẽ không được phép công khai các mã code của mình nếu không có một token nào**. Tuy nhiên đối với công cụ quản lý thư viện `yarn` thì không có yêu cầu này.
Như đã giải thích trong phần [issue #212](https://github.com/verdaccio/verdaccio/issues/212#issuecomment-308578500), kể từ phiên bản `npm@5.3.0` và trong tất cả các phiên bản phụ khác ** bạn sẽ không được phép xuất bản gói mà không có một token nào**. Tuy nhiên đối với công cụ quản lý thư viện `yarn` thì không có yêu cầu này.
## Tự động tạo ra tập tin htpasswd
## Tự động tạo tập tin htpasswd
Để đơn giản hóa quá trình cài đặt, `verdaccio` đã sử dụng plugin dựa vào tập tin `htpasswd`. [Plugin ngoài](https://github.com/verdaccio/verdaccio-htpasswd) đã được cài đặt mặc định trong phiên bản v3.0.x. V2.x trong package (gói) này vẫn là phiên bản tích hợp với plugin này.
Để đơn giản hóa quá trình cài đặt, `verdaccio` đã sử dụng plugin dựa trên tập tin `htpasswd`. [Plugin bên ngoài](https://github.com/verdaccio/verdaccio-htpasswd) đã được cài đặt mặc định trong phiên bản v3.0.x. V2.x của gói này vẫn chứa phiên bản tích hợp của plugin này.
```yaml
auth:
@ -47,9 +47,9 @@ auth:
#max_users: 1000
```
| Lớp Property | Phương thức | Yêu cầu | Ví dụ | Hỗ trợ | Miêu tả |
| ------------ | ----------- | ------- | ---------- | ------ | -------------------------------------------- |
| tập tin | string | Có | ./htpasswd | tất cả | tập tin lưu trữ các thông tin đã được mã hóa |
| max_users | số | Không | 1000 | tất cả | giới hạn người dùng |
| Thuộc tính | Phương thức | Yêu cầu | Ví dụ | Hỗ trợ | Miêu tả |
| ---------- | ----------- | ------- | ---------- | ------ | -------------------------------------------- |
| tập tin | chuỗi | Có | ./htpasswd | tất cả | tập tin lưu trữ các thông tin đã được mã hóa |
| max_users | số | Không | 1000 | tất cả | giới hạn người dùng |
Trường hợp bạn không muốn người dùng đăng nhập, bạn cài đặt `max_users: -1`.

View File

@ -1,13 +1,13 @@
---
id: xây dựng
title: "Xây dựng mã nguồn"
id: tạo
title: "Tạo mã nguồn"
---
Để tải các đối tượng dependency, Verdaccio dùng công cụ `yarn` thay vì dùng `npm`.
Để tải các gói phụ thuộc Verdaccio sử dụng `yarn` thay vì `npm`.
*Lưu ý: Hiện nay việc xây dựng mã nguồn đều dựa vào `➜ yarn@1.x`.
*Xin lưu ý: Mã nguồn hiện tại chỉ có thể được tạo bởi `➜ yarn@1.x`.
```bash
cài đặt yarn
yarn install
```
Để xem đầy đủ danh sách các tập lệnh, [bấm vào đây](https://github.com/verdaccio/verdaccio/wiki/Build-Source-Code).
Để xem đầy đủ danh sách các tập lệnh, hãy [nhấp vào đây](https://github.com/verdaccio/verdaccio/wiki/Build-Source-Code).

View File

@ -2,7 +2,7 @@
id: ci
title: "Tích hợp liên tục"
---
Khi đăng nhập hoặc công khai các mã code của mình, bạn có thể sử dụng verdaccio bằng phương pháp tích hợp liên tục. Có thể bạn sẽ gặp sự cố ngay lập tức vào lần đầu tiên sử dụng NPM để chạy mô-đun chuyên dụng trong môi trường tích hợp liên tục. Lệnh đăng nhập NPM được tạo ra để tạo ra tính tương tác lẫn nhau khi sử dụng. Điều này có thể gây ra sự cố trong CI, tập lệnh, v. v. Dưới đây là cách sử dụng NPM để đăng nhập vào các nền tảng tích hợp liên tục khác nhau.
Khi đăng nhập hoặc phát hành, bạn có thể sử dụng verdaccio để tích hợp liên tục. Có thể bạn sẽ gặp sự cố ngay lập tức vào lần đầu tiên sử dụng NPM để chạy mô-đun chuyên dụng trong môi trường tích hợp liên tục. Lệnh đăng nhập NPM được tạo ra để tạo ra tính tương tác lẫn nhau khi sử dụng. Điều này có thể gây ra sự cố trong CI, tập lệnh, v. v. Dưới đây là cách sử dụng NPM để đăng nhập vào các nền tảng tích hợp liên tục khác nhau.
- [Travis CI](https://remysharp.com/2015/10/26/using-travis-with-private-npm-deps)
- [Circle CI 1.0](https://circleci.com/docs/1.0/npm-login/) or [Circle CI 2.0](https://circleci.com/docs/2.0/deployment-integrations/#npm)

View File

@ -1,14 +1,14 @@
---
id: configuration
title: "Configuration File"
id: cấu hình
title: "Tệp cấu hình"
---
This file is the cornerstone of verdaccio where you can modify the default behaviour, enable plugins and extend features.
Tệp này là một phần quan trọng của Verdaccio, đây là nơi bạn có thể sửa đổi hành vi mặc định, bật plugin và mở rộng các tính năng.
A default configuration file is created the very first time you run `verdaccio`.
Để cài tệp cấu hình mặc định đầu tiên, bạn chạy `verdaccio`.
## Default Configuration
## Cấu hình mặc định
The default configuration has support for **scoped** packages and allow any user to access all packages but only **authenticated users to publish**.
Cấu hình mặc định có hỗ trợ gói **scoped** và cho phép truy cập ẩn danh vào các gói không phải riêng tư, nhưng chỉ ** người dùng đã đăng nhập mới có thể xuất bản gói **.
```yaml
storage: ./storage
@ -29,13 +29,13 @@ logs:
- {type: stdout, format: pretty, level: http}
```
## Sections
## Các nội dung
The following sections explain what each property means and the different options.
Những nội dung sau sẽ giải thích ý nghĩa của từng thuộc tính và các tùy chọn khác nhau.
### Storage
### Kho lưu trữ
Is the location of the default storage. **Verdaccio is by default based on local file system**.
Là nơi lưu trữ mặc định. **Verdaccio sử dụng bộ nhớ chế độ tệp cục bộ tích hợp theo mặc định **.
```yaml
storage: ./storage
@ -43,15 +43,15 @@ storage: ./storage
### Plugins
Is the location of the plugin directory. Useful for Docker/Kubernetes based deployments.
Là vị trí của thư mục của plugin. Rất hữu ích cho cấu hình chạy trên hệ thống Docker / Kubernetes.
```yaml
plugins: ./plugins
```
### Authentification
### Yêu cầu xác thực
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).
Cài đặt yêu cầu xác thực được thực hiện ở đây, sự xác thực mặc đình này chạy trên tệp tin` htpasswd ` và được tích hợp sẵn. Bạn có thể sửa đổi chế độ này bằng [ plugins ](plugins.md). Để biết thêm chi tiết về nội dung này, vui lòng đọc [ trang xác thực](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).
Thuộc tính này cho phép bạn sửa đổi giao diện của web UI. Để biết thêm chi tiết về phần này, vui lòng đọc [ trang web ui ](web.md).
```yaml
web:
@ -74,7 +74,7 @@ web:
### 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).
Khi những gói không phải là cục bộ, uplinks cho phép hệ thống lấy các gói này từ một cơ quan đăng ký từ xa. Để biết thêm chi tiết về nội dung này, vui lòng đọc [ trang Uplink ](uplinks.md).
```yaml
uplinks:
@ -82,9 +82,9 @@ uplinks:
url: https://registry.npmjs.org/
```
### Packages
### Các loại gói
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).
Các gói này cho phép người dùng kiểm soát quyền truy cập vào gói. Để biết thêm chi tiết về mô-đun này, vui lòng đọc [ trang gói ](packages.md).
```yaml
packages:
@ -94,11 +94,11 @@ packages:
proxy: npmjs
```
## Advanced Settings
## Cài đặt nâng cao
### Offline Publish
### Phát hành ngoại tuyến
By default `verdaccio` does not allow to publish when the client is offline, that behavior can be overridden by setting this to *true*.
` verdaccio ` theo mặc định không cho phép khách hàng phát hành khi họ ngoại tuyến. Bạn có thể thay đổi cài đặt này bằng cách cài thành * true*.
```yaml
publish:
@ -107,7 +107,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
### Tiền tố URL
```yaml
url_prefix: https://dev.company.local/verdaccio/
@ -115,17 +115,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
### Thuộc tính 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.
Thuộc tính Maximum body size của tệp JSON mặc định là `10mb ` và bạn có thể tăng giá trị này nếu bạn gặp lỗi như `"đối tượng yêu cầu quá lớn"`.
```yaml
max_body_size: 10mb
```
### Listen Port
### Cổng nghe
`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 ` được chạy mặc định trên cổng `4873 `. Cổng có thể được thay đổi thông qua [ cli ](cli.md) hoặc trong một tập tin cấu hình.
```yaml
listen:
@ -139,7 +139,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).
Để bật `https` trong `verdaccio`, chỉ cần sử dụng giao thức *https://* để đặt cờ `nghe `. Để biết thêm chi tiết về phần này, vui lòng đọc [ trang ssl ](ssl.md).
```yaml
https:
@ -150,11 +150,11 @@ https:
### Proxy
Proxies are special-purpose HTTP servers designed to transfer data from remote servers to local clients.
Proxy là một máy chủ HTTP làm nhiệm vụ chuyển tiếp thông tin và kiểm soát tạo sự an toàn cho việc chuyển dữ liệu từ máy chủ từ xa đến máy khách.
#### 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.
Nếu bạn có một proxy trên mạng của mình, bạn có thể đặt tiêu đề `X-Forwarded-For` với các thuộc tính sau.
```yaml
http_proxy: http://something.local/
@ -163,15 +163,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.
Biến này phải chứa danh sách các tiện ích mở rộng tên được phân cách bằng dấu phẩy không được proxy sử dụng.
```yaml
no_proxy: localhost,127.0.0.1
```
### Notifications
### Những thông báo
Enabling notifications to third-party tools is fairly easy via web hooks. For more information about this section read the [notifications page](notifications.md).
Thật dễ dàng để bật thông báo cho các công cụ của bên thứ ba thông qua các móc nối web. Để biết thêm chi tiết về phần này, vui lòng đọc [ trang thông báo ](notifications.md).
```yaml
notify:
@ -181,15 +181,15 @@ notify:
content: '{"color":"green","message":"New package published: * {{ name }}*","notify":true,"message_format":"text"}'
```
> For more detailed configuration settings, please [check the source code](https://github.com/verdaccio/verdaccio/tree/master/conf).
> Để biết thêm thông tin về cài đặt cấu hình, vui lòng [ kiểm tra mã nguồn ](https://github.com/verdaccio/verdaccio/tree/master/conf).
### Audit
### Đánh giá
<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.
` kiểm tra npm ` là một lệnh mới được phát hành trong phiên bản [ npm 6.x ](https://github.com/npm/npm/releases/tag/v6.1.0). Verdaccio bao gồm một plugin middleware tích hợp (plugin trung gian) để xử lý lệnh này.
> If you have a new installation it comes by default, otherwise you need to add the following props to your config file
> Trong trường hợp bạn muốn cài đặt phiên bản mặc định mới, bạn cần thêm đoạn mã sau vào tệp cấu hình
```yaml
middlewares:

View File

@ -1,80 +1,80 @@
---
id: contributing
title: "Contributing Verdaccio"
id: đóng góp
title: "Tham gia đóng góp Verdaccio"
---
First of all Jumping into an unfamiliar code base is not easy but we are here to help you.
First of all Để có thể sử dụng một cơ sở mã hoàn toàn mới là điều không hề dễ dàng, vì vậy chúng tôi luôn sẵn sàng giúp đỡ bạn.
## Comunication Channels
## Kênh trao đổi
If you are willing for asking, we use two channels for discussions:
Nếu bạn có bất cứ câu hỏi nào, xin hãy gửi cho chúng tôi qua hai kênh sau để cùng thảo luận:
* [Public Discord channel](http://chat.verdaccio.org/)
* [Kênh Discord công khai](http://chat.verdaccio.org/)
## Getting started
## Bắt đầu
As a first glance verdaccio is a single repository, but there are many ways you might contribute and a variety of technologies to practice.
Thoạt nhìn, verdaccio chỉ là một kho lưu trữ đơn giản, nhưng bên trong lại có nhiều cách khác nhau để bạn có thể đóng góp và một loạt các công nghệ để bạn thực hành.
### Finding my spot
### Tìm vị trí phù hợp với tôi
All we have different skills, so, let's see where you might feel comfortable.
Mỗi người đều có các kỹ năng khác nhau, vì vậy hãy xem và cảm nhận phần nào bạn cảm thấy có thể phát huy tối đa kỹ năng của mình.
### I know or I want to learn Node.js
### Tôi biết hoặc tôi muốn tìm hiểu về 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`.
Node.js là một hệ thống phần mềm dựa trên `verdaccio`, chúng tôi sử dụng `express`, `commander `, `request` hoặc `async ` làm thư viện của chương trình. Về cơ bản, Verdaccio là một Rest API, giống như `yarn`, tạo ra giao tiếp tương thích với máy khách `npm`.
We have a long [list of plugins](plugins.md) ready to be used and improved but at the same time [you might create your own](dev-plugins.md).
Chúng tôi có rất nhiều [danh sách plugin](plugins.md) có sẵn và đã được nâng cấp, nhưng đồng thời [bạn cũng có thể tạo plugin của riêng mình](dev-plugins.md).
### I would prefer to work in the User Interface
### Tôi thích làm việc trong giao diện người dùng hơn
Recently we have moved to modern techonologies as `React` and `element-react`. We are looking forward to see new ideas how to improve the UI.
Thời gian gần đây, chúng tôi đã chuyển sang các công nghệ hiện đại như `React``element-react`. Chúng tôi mong được biết đến những ý tưởng mới về cách nâng cấp giao diện người dùng.
### I feel more confortable improving the stack
### Việc nâng cấp ngăn xếp sẽ giúp tôi cảm thấy thoải mái hơn
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).
Tất nhiên, chúng tôi sẽ vui lòng giúp bạn sắp xếp ngăn xếp và bạn có thể nâng cấp các dependency của mình lên `eslint `, `stylelint`, `webpack`. Bạn cũng nên nâng cấp cấu hình `webpack`. Chúng tôi hoan nghênh mọi ý kiến đóng góp của các bạn. Ngoài ra, nếu bạn có trải nghiệm với công cụ tạo khung **Yeoman**, bạn có thể giúp chúng tôi nâng cấp [verdaccio generator ](https://github.com/verdaccio/generator-verdaccio-plugin).
Here some ideas:
Dưới đây là một số ý tưởng:
* Create a common eslint rules to be used across all dependencies or plugins
* Improve Flow types definitions delivery
* Moving to Webpack 4
* Improve hot reload with Webpack
* We use babel and webpack across all dependencies, why not a common preset?
* Improve continous integration delivery
* Tạo quy tắc chung Eslint để sử dụng trong tất cả các dependency hoặc plugin
* Cải thiện việc phân phối các loại quy trình xác định
* Di chuyển sang Webpack 4
* Nâng cấp mức độ thành phần của Webpack
* Chúng tôi sử dụng babel và webpack cho tất cả các dependency, tại sao chúng ta không thể sử dụng một cài đặt phổ biến khác?
* Nâng cấp việc phân phối tích hợp liên tục
### I do great Documentation
### Tôi soạn tài liệu rất giỏi
Many contributors find typos and grammar issues, that also helps to improve the overall experience for troubleshooting.
Một số người đã góp ý cho chúng tôi về lỗi đánh máy và các vấn đề ngữ pháp, điều này đã giúp chúng tôi nâng cấp sự trải nghiệm và khắc phục sự cố chung.
### I am a Designer
### Tôi là một nhà thiết kế
We have a frontend website <http://www.verdaccio.org/> that will be happy to see your ideas.
Chúng tôi có trang web frontend [ http://www.verdaccio.org/](http://www.verdaccio.org/) và sẽ rất vui khi nhận sư chia sẻ những ý tưởng của các bạn.
Our website is based on [Docusaurus](https://docusaurus.io/).
Trang web của chúng tôi dựa trên [Docusaurus](https://docusaurus.io/).
### I am a DevOps
### Tôi là một 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.
Chúng tôi có một hình ảnh Docker được sử dụng rộng rãi [ https://hub.docker.com/r/verdaccio/verdaccio/](https://hub.docker.com/r/verdaccio/verdaccio/), nó cần được bảo trì và có thể cần được nâng cấp khá nhiều, chúng tôi cần kiến thức của bạn để mang lại lợi ích cho tất cả người dùng.
We have support for **Kubernetes**, **Puppet**, **Ansible** and **Chef** and we need help in those fields, feel free to see all repositories.
Chúng tôi hỗ trợ phần ** Kubernetes**, **Puppet **, **Ansible****Chef**, và cần sự đóng góp của các bạn ở những nội dung này, vui lòng kiểm tra tất cả kho tài nguyên.
### I can do translations
### Tôi có thể dịch tài liệu
Verdaccio aims to be multilingual, in order to achieve it **we have the awesome support** of [Crowdin](https://crowdin.com) that is an amazing platform for translations.
Mục tiêu của Verdaccio là đa ngôn ngữ, để đạt được mục tiêu này, **chúng tôi đã nhận được sự giúp đỡ tuyệt vời** từ [ Crowdin ](https://crowdin.com) - một nền tảng hoàn hảo dành cho việc dịch thuật.
<img src="https://d3n8a8pro7vhmx.cloudfront.net/uridu/pages/144/attachments/original/1485948891/Crowdin.png" width="400px" />
We have setup a project where you can choose your favourite language, if you do not find your language feel free to request one [creating a ticket](https://github.com/verdaccio/verdaccio/issues/new).
Chúng tôi đã lập một dự án mà bạn có thể chọn ngôn ngữ yêu thích của mình, nếu bạn không tìm thấy ngôn ngữ mình muốn, vui lòng khởi chạy <a href = "https://github.com/verdaccio/verdaccio/issues/new">Tạo một vé yêu cầu</a>.
[Go to Crowdin Verdaccio](https://crowdin.com/project/verdaccio)
[Tham gia Crowdin Verdaccio](https://crowdin.com/project/verdaccio)
## I'm ready to contribute
## Tôi đã sẵn sàng đóng góp vào bản dịch
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.
Nếu bạn đang nghĩ *"Tôi đã xem [kho lưu trữ ](repositories.md) và sẵn sàng đóng góp vào bản dịch ngay*, thì đó là một tin tốt để bạn có thể tiếp tục bước tiếp theo.
You will need learn how to build, [we have prepared a guide just for that](build.md).
Bạn cần phải tìm hiểu cách đóng góp vào bản dịch, [ chúng tôi đã sẵn sàng hướng dẫn cho bạn ](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).
Khi bạn đã làm quen với tất cả các tập lệnh và biết cách sử dụng, chúng tôi sẵn sàng chuyển sang bước tiếp theo và bắt đầu chạy [**kiểm tra đơn vị**](test.md).
## Full list of contributors. We want to see your face here !
## Dưới đây là danh sách đầy đủ các cộng tác viên. Chúng tôi hy vọng sẽ gặp bạn ở đây!
<a href="graphs/contributors"><img src="https://opencollective.com/verdaccio/contributors.svg?width=890&button=false" /></a>

View File

@ -1,18 +1,18 @@
---
id: dev-plugins
title: "Developing Plugins"
title: "Phát triển các plugin"
---
There are many ways to extend `verdaccio`, the kind of plugins supported are:
Có nhiều cách để mở rộng `verdaccio`. Các loại plugin được hỗ trợ là:
* Authentication plugins
* Middleware plugins (since `v2.7.0`)
* Storage plugins since (`v3.x`)
* Những plugin xác minh
* Plugin Middleware (kể từ phiên bản `v2.7.0`)
* Plugin lưu trữ từ phiên bản (` v3.x `)
> We recommend developing plugins using our [flow type definitions](https://github.com/verdaccio/flow-types).
> Chúng tôi khuyên bạn nên phát triển plugin bằng cách sử dụng [định nghĩa loại luồng ](https://github.com/verdaccio/flow-types) của chúng tôi.
## Authentication Plugin
## Plugin xác minh
Basically we have to return an object with a single method called `authenticate` that will recieve 3 arguments (`user, password, callback`).
Cơ bản chúng ta phải trả về một đối tượng với phương thức được gọi là `authenticate`, và sẽ nhận lại 3 tham số (`user, password, callback`).
### API
@ -26,15 +26,15 @@ interface IPluginAuth extends IPlugin {
}
```
> Only `adduser`, `allow_access` and `allow_publish` are optional, verdaccio provide a fallback in all those cases.
> Chỉ có các tùy chọn là `adduser`, ` allow_access``allow_publish` và verdaccio cung cấp chức năng dự phòng trong tất cả các tùy chọn này.
#### Callback
Once the authentication has been executed there is 2 options to give a response to `verdaccio`.
Khi xác thực được thực hiện, có hai tùy chọn để trả lời `verdaccio`.
###### OnError
Either something bad happened or auth was unsuccessful.
Hiện lỗi này nghĩa là hoặc xảy ra lỗi hoặc xác thực không thành công.
```flow
callback(null, false)
@ -42,14 +42,14 @@ callback(null, false)
###### OnSuccess
The auth was successful.
Xác thực thành công.
`groups` is an array of strings where the user is part of.
`groups` là một tập hợp các chuỗi người dùng.
callback(null, groups);
### Example
### Ví dụ
```javascript
function Auth(config, stuff) {
@ -82,7 +82,7 @@ Auth.prototype.authenticate = function (user, password, callback) {
module.exports = Auth;
```
And the configuration will looks like:
Cấu hình sẽ trông như thế này:
```yaml
auth:
@ -90,11 +90,11 @@ auth:
file: ./htpasswd
```
Where `htpasswd` is the sufix of the plugin name. eg: `verdaccio-htpasswd` and the rest of the body would be the plugin configuration params.
Trong đó `htpasswd` là tên của plugin, ví dụ: hậu tố của `verdaccio-htpasswd`. Các mã còn lại là các tham số của cấu hình plugin.
## Middleware Plugin
## Plugin Middleware
Middleware plugins have the capability to modify the API layer, either adding new endpoints or intercepting requests.
Plugin Middleware có khả năng sửa đổi giao diện API để thêm các điểm cuối mới hoặc chặn các yêu cầu.
```flow
interface verdaccio$IPluginMiddleware extends verdaccio$IPlugin {

View File

@ -138,7 +138,7 @@ Be **aware that the order of your packages definitions is important and always u
### Configuration
You can define mutiple `packages` and each of them must have an unique `Regex`.
You can define mutiple `packages` and each of them must have an unique `Regex`. The syntax is based on [minimatch glob expressions](https://github.com/isaacs/minimatch).
| Property | Type | Required | Example | Support | Description |
| -------- | ------- | -------- | -------------- | ------- | ------------------------------------------- |

View File

@ -45,7 +45,7 @@ auth:
#### Multiple Auth plugins
This is tecnically possible, the plugins order becames important, the the credentials will resolved in order.
This is tecnically possible, making the plugin order important, as the credentials will be resolved in order.
```yaml
auth:

View File

@ -138,7 +138,7 @@ packages:
### 配置
你可以定义多个`packages`,每个包都必须有一个唯一的`Regex`。
You can define mutiple `packages` and each of them must have an unique `Regex`. The syntax is based on [minimatch glob expressions](https://github.com/isaacs/minimatch).
| 属性 | 类型 | 必须的 | 示例 | 支持 | 描述 |
| ------- | ------- | --- | -------------- | --- | --------------- |

View File

@ -45,7 +45,7 @@ auth:
#### 多个Auth插件
这在技术上可行,插件的顺序变得非常重要,安全凭据将按顺序获取。
This is tecnically possible, making the plugin order important, as the credentials will be resolved in order.
```yaml
auth: