Table of Contents

Class RegistrySettings

Namespace
Nite.Configuration
Assembly
Nite.dll

Which registry serves which package, and which credentials go with which registry. Credentials follow npm's "nerf dart" keys (//npm.example.com/path/:_authToken=…): a request only carries a credential when its URL is under that host and path, so a token never leaks to another host (a tarball on a CDN, say).

public sealed class RegistrySettings
Inheritance
RegistrySettings
Inherited Members

Fields

NpmRegistry

public const string NpmRegistry = "https://registry.npmjs.org/"

Field Value

string

Properties

Default

public static RegistrySettings Default { get; }

Property Value

RegistrySettings

DefaultRegistry

The registry for unscoped packages and scopes without their own, ending in /.

public string DefaultRegistry { get; }

Property Value

string

Scopes

Scope (@mycompany) → registry URL ending in /.

public IReadOnlyDictionary<string, string> Scopes { get; }

Property Value

IReadOnlyDictionary<string, string>

Methods

AuthorizationFor(Uri)

The Authorization header for a URL, from the most specific matching credential, if any.

public AuthenticationHeaderValue? AuthorizationFor(Uri url)

Parameters

url Uri

Returns

AuthenticationHeaderValue

RegistryFor(string)

public string RegistryFor(string packageName)

Parameters

packageName string

Returns

string