Skip to main content

Uplinks

uplink jẹ ọna asopọ pẹlu ibi iforukọsilẹ ti ita ti o n pese iwọle si awọn akojọ ti ita.

Uplinks

Ilo

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 the following properties:

Ohun iniIruTi o niloApẹẹrẹAtilẹyinApejuweAtilẹwa
urlokunBẹẹnihttps://registry.npmjs.org/gbogbourl ibi iforukọsilẹ naanpmjs
caokunRara~./ssl/client.crt'gbogboiwe ẹri ipa ọna SSLKosi atilẹda
akoko idawọdurookunRara100msgbogboṣeto akoko idawọduro tuntun fun ìbéèrè naa30s
maxageokunRara10mgbogboakoko aala si apo iranti naa fẹsẹmulẹ2m
fail_timeoutokunRara10mgbogbon ṣe asọye akoko gigaju nigba ti ìbéèrè ma di ikuna5m
max_failsnọmbaRara2gbogbose adinku iye ibeere ikuna to pọju2
apo irantibooleanRara[otitọ, irọ]>= 2.1ko gbogbo awọn tarball ọna jijin si ipamọ apo irantiotitọ
authakojọRarawo isalẹ>= 2.5n yan akọle 'Authorization' naa alaye siwaju siio ti jẹ yiyọkuro
awọn akọleakojọRaraauthorization: "Bearer SecretJWToken=="gbogboakojọ awọn akọle akanṣe fun uplink naao ti jẹ yiyọkuro
strict_sslbooleanRara[otitọ, irọ]>= 3.0To ba jẹ otitọ, o nilo ki awọn iwe ẹri SSL fẹsẹmulẹ.otitọ
agent_optionsobjectRaramaxSockets: 10>= 4.0.2options for the HTTP or HTTPS Agent responsible for managing uplink connection persistence and reuse more infoKosi atilẹda

Ohun ini Auth

The auth property allows you to use an auth token with an uplink. Using the default environment variable:

uplinks:
private:
url: https://private-registry.domain.com/registry
auth:
type: bearer
token_env: true # defaults to `process.env['NPM_TOKEN']`

tabi nipasẹ iyipada ayika to jẹ yiyan:

uplinks:
private:
url: https://private-registry.domain.com/registry
auth:
type: bearer
token_env: FOO_TOKEN

token_env: FOO_TOKENlabẹnu ma lo process.env['FOO_TOKEN']

tabi nipa yiyan aami kan taarata:

uplinks:
private:
url: https://private-registry.domain.com/registry
auth:
type: bearer
token: "token"

Akiyesi: token ṣe pataki ju token_env lọ

O Gbọdọ Mọ

  • Uplinks must be registries compatible with the npm endpoints. Eg: verdaccio, sinopia@1.4.0, npmjs registry, yarn registry, JFrog, Nexus and more.
  • Setting cache to false will help to save space in your hard drive. This will avoid store tarballs but it will keep metadata in folders.
  • Titayọ pẹlu ọpọlọpọ uplinks le mu ifasẹyin ba isawari awọn akopọ rẹ ti o ti yẹ fun ibeere kọọkan ti onibara npm kan ṣe, verdaccio n ṣe ipe 1 fun uplink kọọkan.
  • Ilana (timeout, maxage and fail_timeout) tẹle awọn odiwọn iwọn NGINX