mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-15 18:13:38 +08:00
feat(@schematics/update): import user-agent from NPM config
Configuration of the user-agent header in requests is a commonly available feature; previous versions of angular-cli do not pull this value from NPM.
This commit is contained in:
parent
4cca3a10e8
commit
6ca9efffe6
@ -195,6 +195,7 @@ export function getNpmPackageJson(
|
||||
getNpmConfigOption('strict-ssl'),
|
||||
getNpmConfigOption('cafile'),
|
||||
getNpmConfigOption('_auth'),
|
||||
getNpmConfigOption('user-agent'),
|
||||
getNpmConfigOption('_authToken', registryKey),
|
||||
getNpmConfigOption('username', registryKey, true),
|
||||
getNpmConfigOption('password', registryKey, true),
|
||||
@ -209,6 +210,7 @@ export function getNpmPackageJson(
|
||||
strictSsl,
|
||||
cafile,
|
||||
token,
|
||||
userAgent,
|
||||
authToken,
|
||||
username,
|
||||
password,
|
||||
@ -264,6 +266,7 @@ export function getNpmPackageJson(
|
||||
const client = new RegistryClient({
|
||||
proxy: { http, https },
|
||||
ssl: sslOptions,
|
||||
...(userAgent && {userAgent: userAgent}),
|
||||
});
|
||||
client.log.level = 'silent';
|
||||
const params = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user