1
0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-11-17 07:45:52 +01:00
verdaccio/website/translated_docs/zh-Hans/plugins.md
verdacciobot f90522e303 New Crowdin translations (#806)
* New translations web.md (Portuguese, Brazilian)
docs(website): new translations

* New translations web.md (Spanish)
docs(website): new translations

* New translations web.md (Chinese Simplified)
docs(website): new translations

* New translations docker.md (Chinese Simplified)
docs(website): new translations

* New translations plugins.md (Spanish)
docs(website): new translations

* New translations plugins.md (Portuguese, Brazilian)
docs(website): new translations

* New translations plugins.md (Chinese Simplified)
docs(website): new translations

* New translations iis-server.md (Chinese Simplified)
docs(website): new translations

* New translations iis-server.md (Chinese Simplified)
docs(website): new translations

* New translations iis-server.md (Chinese Simplified)
docs(website): new translations

* New translations iis-server.md (Chinese Simplified)
docs(website): new translations

* New translations iis-server.md (Chinese Simplified)
docs(website): new translations

* New translations iis-server.md (Chinese Simplified)
docs(website): new translations

* New translations iis-server.md (Chinese Simplified)
docs(website): new translations

* New translations install.md (Chinese Simplified)
docs(website): new translations

* New translations install.md (Chinese Simplified)
docs(website): new translations

* New translations install.md (Chinese Simplified)
docs(website): new translations

* New translations kubernetes.md (Chinese Simplified)
docs(website): new translations

* New translations kubernetes.md (Chinese Simplified)
docs(website): new translations

* New translations kubernetes.md (Chinese Simplified)
docs(website): new translations

* New translations kubernetes.md (Chinese Simplified)
docs(website): new translations

* New translations logger.md (Chinese Simplified)
docs(website): new translations

* New translations logger.md (Chinese Simplified)
docs(website): new translations

* New translations node-api.md (Chinese Simplified)
docs(website): new translations

* New translations notifications.md (Chinese Simplified)
docs(website): new translations

* New translations node-api.md (Chinese Simplified)
docs(website): new translations

* New translations notifications.md (Chinese Simplified)
docs(website): new translations

* New translations notifications.md (Chinese Simplified)
docs(website): new translations

* New translations notifications.md (Chinese Simplified)
docs(website): new translations

* New translations notifications.md (Chinese Simplified)
docs(website): new translations

* New translations node-api.md (Chinese Simplified)
docs(website): new translations

* New translations iis-server.md (Chinese Simplified)
docs(website): new translations

* New translations iis-server.md (Chinese Simplified)
docs(website): new translations

* New translations install.md (Chinese Simplified)
docs(website): new translations

* New translations kubernetes.md (Chinese Simplified)
docs(website): new translations

* New translations kubernetes.md (Chinese Simplified)
docs(website): new translations

* New translations kubernetes.md (Chinese Simplified)
docs(website): new translations

* New translations logger.md (Chinese Simplified)
docs(website): new translations

* New translations notifications.md (Chinese Simplified)
docs(website): new translations
2018-07-17 10:41:31 +02:00

5.9 KiB
Raw Blame History

id title
plugins 插件

Verdaccio是一个可插拔的应用程序。它可以通过多种方式进行扩展例如新的认证方法添加endpoints或者使用自定义存储。

If you are interested to develop your own plugin, read the development section.

用法

安装

$> npm install --global verdaccio-activedirectory

作为一个sinopia的分支项目verdaccio和兼容sinopia@1.4.0的插件具有向后兼容性。在这种情况下,安装方式相同。

$> npm install --global sinopia-memory

配置

打开config.yaml文件并按如下说明更新auth部分:

默认配置如下所示,由于在默认情况下我们使用一个内置的htpasswd插件,我们可以通过注释下面几行代码来禁用它:

Auth插件配置

 htpasswd:
    file: ./htpasswd
    #max_users: 1000

如果你决定使用ldap插件,将上述部分进行替换。

auth:
  activedirectory:
    url: "ldap://10.0.100.1"
    baseDN: 'dc=sample,dc=local'
    domainSuffix: 'sample.local'

多个Auth插件

这在技术上可行,插件的顺序变得非常重要,安全凭据将按顺序获取。

auth:
  htpasswd:
    file: ./htpasswd
    #max_users: 1000
  activedirectory:
    url: "ldap://10.0.100.1"
    baseDN: 'dc=sample,dc=local'
    domainSuffix: 'sample.local'

中间件插件配置

这是一个如何设置中间件插件的示例。所有的中间件插件必须被定义在middlewares命名空间。

middlewares:
  audit:
    enabled: true

存储插件配置

这是一个如何设置存储插件的示例。所有的存储插件必须在store命名空间进行定义。

store:
  memory:
    limit: 1000

如果你定义一个自定义存储,配置文件中的storage属性将会被忽略。

旧式插件

Sinopia插件

(兼容所有版本)

所有的sinopia插件都应该和verdaccio的未来版本兼容。 无论如何我们鼓励贡献者将它们迁移到最新的verdaccio API并且使用verdaccio-xx-name格式的前缀。

Verdaccio插件

(兼容2.1.x及以后版本)

授权插件

中间件插件

  • verdaccio-audit:支持npm audit cli的verdaccio插件(内置) (自3.x版本后兼容)

  • verdaccio-profile-api:该插件支持npm profilecli以及针对基于verdaccio-htpasswd认证的npm profile set password插件。

存储插件

(兼容自3.x及以后版本)

警告

并不是所有这些插件都被持续测试过,其中有些可能不能正常工作。如果你发现任何问题,请和插件的所有者联系。