Skip to main content

Plugins

Verdaccio is a pluggable application. It can be extended in many ways, either new authentication methods, adding endpoints or using a custom storage.

Oriṣi awọn asomọ mẹrin lo wa:

Ti o ba nifẹ lati se agbedide asomọ ti ara rẹ, ka abala agbedide.

Ilo

Ifi sori ẹrọ

$> npm install --global verdaccio-activedirectory

verdaccio as a sinopia fork it has backward compatibility with plugins that are compatible with sinopia@1.4.0. In such case the installation is the same.

$> npm install --global sinopia-memory

Configuration

Sii faili config.yaml ki o si ṣe imudojuiwọn abala auth naa bi atẹle yi:

Iṣeto atilẹwa naa dabi iru eyi, nitoripe a lo ohun elo alakọmọ htpasswd ni atilẹwa pe ki o le yọ kuro nipa yiyọ awọn ila wọnyi.

Iṣeto Ifasẹsi

  htpasswd:
file: ./htpasswd
#max_users: 1000

ati rirọpo wọn pẹlu (toba sẹlẹ pe o pinnu lati lo ohun elo ldap.

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

Awọn ohun elo Ifasẹsi ọlọpọlọpọ

Eyi ṣeeṣe pẹlu ọgbọn, ṣiṣe aṣẹ ohun elo naa ni pataki, gẹgẹbi awọn iwe ẹri naa yoo ṣe jẹ yiyanju lẹsẹẹsẹ.

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

Iṣeto Middleware

This is an example how to set up a middleware plugin. All middleware plugins must be defined in the middlewares namespace.

middlewares:
audit:
enabled: true

O le tẹle audit middle plugin bi apẹẹrẹ ipilẹ.

Iṣeto Ibi ipamọ

This is an example how to set up a storage plugin. All storage plugins must be defined in the store namespace.

store:
memory:
limit: 1000

Iṣeto Akori

Verdaccio allows to replace the User Interface with a custom one, we call it theme. By default, uses @verdaccio/ui-theme that comes built-in, but, you can use something different installing your own plugin.


<br />$> npm install --global verdaccio-theme-dark

Orukọ iṣaaju ohun asomọ naa gbọdọ bẹrẹ pẹlu verdaccio-theme, bibẹkọ ohun asomọ naa koni ṣiṣẹ.

O le lo akori kan ṣoṣo ni akoko kan ati ki o kọja laarin awọn aṣayan ti o ba nilo rẹ.

theme:
dark:
option1: foo
option2: bar

Awọn ohun elo Ijogun

Awọn ohun elo Sinopia

Ti o ba ni igbarale lori eyikeyi ohun elo sinopia kankan, ranti pe adinku ti ba iwulo wọn atipe wọn le ma sisẹ mọ lọjọ iwaju.

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.