Network & Request Settings
Network settings#
httpsProxy#
- Стандартно: null
- Тип: url**
Проксі-сервер для вихідних HTTPS-запитів. If httpsProxy is unset, pnpm uses
the legacy proxy setting, then the HTTPS_PROXY or https_proxy environment
variable.
Якщо URL-адреса вашого проксі містить імʼя користувача та пароль, переконайтеся, що вони закодовані в URL. Наприклад:
httpsProxy: "https://use%21r:pas%2As@my.proxy:1234/foo"
Не кодуйте двокрапку (:) між іменем користувача та паролем.
An empty value reads as unset. If neither httpsProxy nor proxy is configured, a shell that exports HTTPS_PROXY= disables the proxy. A false or null value in pnpm-workspace.yaml or the .npmrc also reads as unset, so pnpm still falls back to proxy and the environment. To turn proxying off, set proxy to false. On the command line, false and null are ordinary host names, since a flag carries its value verbatim.
httpProxy#
- Стандартно: null
- Тип: url**
Проксі-сервер, який слід використовувати для вихідних HTTP-запитів. If httpProxy is unset, pnpm uses
the proxy resolved for httpsProxy, then the HTTP_PROXY or
http_proxy environment variable, then PROXY or proxy.
Empty, false, and null values behave as described for httpsProxy.
The .npmrc also supports npm's legacy proxy setting, which is used as the fallback for both https-proxy and http-proxy. An empty proxy= reads as unset, so it does not suppress the HTTPS_PROXY environment variable. proxy=false (or proxy: false in pnpm-workspace.yaml) turns proxying off.
noProxy#
- Стандартно: null
- Типи: String
Розділений комами рядок розширень доменів, для яких не слід використовувати проксі-сервер.
If noProxy is unset, pnpm uses noproxy, then the NO_PROXY or no_proxy
environment variable.
An entry may be written with or without a leading dot: both npmjs.org and .npmjs.org bypass the proxy for the domain itself and for its subdomains.
Empty, false, and null values behave as described for httpsProxy.
localAddress#
- Стандартно: undefined
- Тип: IP Address
IP-адреса локального інтерфейсу для підключення до реєстру npm.
Pass --local-address <ip> on the command line to set this value.
maxsockets#
- Default: unset
- Тип: Number
Максимальна кількість зʼєднань, які можна використовувати для одного джерела (комбінація протокол/хост/порт).
When unset, connections through a proxy are limited to 50 per origin, and direct
connections are bounded only by networkConcurrency. Set 0 to remove the limit for proxied connections too.
maxSockets is accepted as an alias. Both spellings are read from
pnpm-workspace.yaml, the global configuration file, the environment, and the
command line, in that increasing order of precedence, so a value passed on the
command line wins even when the two sides spelled the setting differently.
strictSsl#
- Стандартно: true
- Тип: Boolean
Чи потрібно робити перевірку SSL-ключів при запитах до реєстру через HTTPS.
Use --strict-ssl to enable validation or --no-strict-ssl to disable it.
userAgent#
- Default:
pnpm/<version> npm/? node/? <platform> <arch> - Типи: String
The value of the User-Agent header that pnpm sends with every request to the registry.
Request settings#
gitShallowHosts#
- Стандартно: ['github.com', 'gist.github.com', 'gitlab.com', 'bitbucket.com', 'bitbucket.org']
- Тип: string[]
Під час отримання залежностей, які є Git-репозиторіями, якщо хост вказано у цьому параметрі, pnpm використовуватиме неглибоке клонування, щоб отримати лише потрібний комміт, а не всю історію.
networkConcurrency#
- Default: auto (workers × 3 clamped to 64-96)
- Тип: Number
Контролює максимальну кількість запитів HTTP(S) для одночасної обробки.
pnpm selects a value between 64 and 96 based on the number of workers, which is the available parallelism minus one (networkConcurrency = clamp(workers × 3, 64, 96)). Встановіть це значення явно, щоб перезаписати автоматичне масштабування.
If a request times out while other requests to the same host are still in flight, pnpm lowers the limit for that host to one request for the rest of the command. Requests that are already running finish first. Requests to other hosts keep the full limit. Requests sent through the same proxy count as one host.
To limit requests to one registry, set networkConcurrency on its entry in the registries setting.
fetchRetries#
- Стандартно: 2
- Тип: Number
Скільки разів повторити спробу, якщо pnpm не вдається отримати дані з реєстру.
fetchRetryFactor#
- Стандартно: 10
- Тип: Number
Експоненціальний коефіцієнт для повторної спроби.
fetchRetryMintimeout#
- Стандартно: 10000 (10 секунд)
- Тип: Number
The lower bound (in milliseconds) of the retry exponential backoff.
fetchRetryMaxtimeout#
- Стандартно: 60000 (1 хвилина)
- Тип: Number
The upper bound (in milliseconds) of the retry exponential backoff.
fetchTimeout#
- Стандартно: 60000 (1 хвилина)
- Тип: Number
How long an HTTP request may go without making progress. The clock is reset on every chunk pnpm receives, so a large tarball on a slow connection is not cut off while data is still arriving; a stalled request is.
Before v12.4.0, this bounded the whole request, which meant the value had to be large enough to download the largest package over the slowest connection you cared about.
fetchWarnTimeoutMs#
- Стандартно: 10000 ms (10 секунд)
- Тип: Number
Якщо запит метаданих до реєстру триває довше, ніж зазначений поріг (у мілісекундах), виводиться попередження.
fetchMinSpeedKiBps#
- Стандартно: 50 KiB/s
- Тип: Number
Попередження виводиться, якщо швидкість завантаження архіву з реєстру падає нижче заданого порогу (в КіБ/с).
maxTarballUnpackedSize#
Added in: v12.15.0
- Default: 4294967296 (4 GiB)
- Тип: Number
The most bytes the files of one package may unpack to. A package whose files total more fails to install. A package from a tar registry is also held to its dist.unpackedSize.
pnpm checks this as it decodes a tarball, before it can verify the tarball's hash, so a hostile registry cannot make it write more than this much.