Skip to main content
Version: Next

@verdaccio/config

Classes

Interfaces

Type Aliases

SetupDirectory

Ƭ SetupDirectory: Object

Type declaration

NameType
pathstring
typestring

Defined in

config-path.ts:19

Variables

DEFAULT_REGISTRY

Const DEFAULT_REGISTRY: "https://registry.npmjs.org"

Defined in

uplinks.ts:7


Const DEFAULT_UPLINK: "npmjs"

Defined in

uplinks.ts:8


PACKAGE_ACCESS

Const PACKAGE_ACCESS: Object

Type declaration

NameType
ALLstring
SCOPEstring

Defined in

package-access.ts:26


ROLES

Const ROLES: Object

Type declaration

NameType
$ALLstring
$ANONYMOUSstring
$AUTHstring
ALLstring
DEPRECATED_ALLstring
DEPRECATED_ANONYMOUSstring
DEPRECATED_AUTHstring

Defined in

package-access.ts:15


TIME_EXPIRATION_1H

Const TIME_EXPIRATION_1H: "1h"

Defined in

security.ts:4


TOKEN_VALID_LENGTH

Const TOKEN_VALID_LENGTH: 32

Defined in

token.ts:3


WEB_TITLE

Const WEB_TITLE: "Verdaccio"

Defined in

config.ts:31


defaultLoggedUserRoles

Const defaultLoggedUserRoles: string[]

All logged users will have by default the group $all and $authenticate

Defined in

user.ts:8


defaultNonLoggedUserRoles

Const defaultNonLoggedUserRoles: string[]

Defined in

user.ts:18


defaultSecurity

Const defaultSecurity: Security

Defined in

security.ts:18


defaultUserRateLimiting

Const defaultUserRateLimiting: Object

Type declaration

NameType
maxnumber
windowMsnumber

Defined in

config.ts:34

Functions

createAnonymousRemoteUser

createAnonymousRemoteUser(): RemoteUser

Builds an anonymous remote user in case none is logged in.

Returns

RemoteUser

{ name: xx, groups: [], real_groups: [] }

Defined in

user.ts:47


createRemoteUser

createRemoteUser(name, pluginGroups): RemoteUser

Create a RemoteUser object

Parameters

NameType
namestring
pluginGroupsstring[]

Returns

RemoteUser

{ name: xx, pluginGroups: [], real_groups: [] }

Defined in

user.ts:30


findConfigFile

findConfigFile(configPath?): string

Find and get the first config file that match.

Parameters

NameType
configPath?string

Returns

string

the config file path

Defined in

config-path.ts:30


fromJStoYAML

fromJStoYAML(config): string | null

Parameters

NameType
configPartial<ConfigYaml>

Returns

string | null

Defined in

parse.ts:56


generateRandomSecretKey

generateRandomSecretKey(): string

Secret key must have 32 characters.

Returns

string

Defined in

token.ts:8


getDefaultConfig

getDefaultConfig(fileName?): ConfigYaml & { configPath: string ; config_path: string }

Parameters

NameTypeDefault value
fileNamestring'default.yaml'

Returns

ConfigYaml & { configPath: string ; config_path: string }

Defined in

conf/index.ts:5


getUserAgent

getUserAgent(customUserAgent?, version?, name?): string

Parameters

NameType
customUserAgent?string | boolean
version?string
name?string

Returns

string

Defined in

agent.ts:3


hasProxyTo

hasProxyTo(pkg, upLink, packages): boolean

Parameters

NameType
pkgstring
upLinkstring
packagesPackageList

Returns

boolean

Defined in

uplinks.ts:51


normalisePackageAccess

normalisePackageAccess(packages): LegacyPackageList

Parameters

NameType
packagesLegacyPackageList

Returns

LegacyPackageList

Defined in

package-access.ts:53


normalizeUserList

normalizeUserList(groupsList): any

Parameters

NameType
groupsListany

Returns

any

Defined in

package-access.ts:31


parseConfigFile

parseConfigFile(configPath): ConfigYaml & { configPath: string ; config_path: string }

Parse a config file from yaml to JSON.

Parameters

NameTypeDescription
configPathstringthe absolute path of the configuration file

Returns

ConfigYaml & { configPath: string ; config_path: string }

Defined in

parse.ts:17


readDefaultConfig

readDefaultConfig(): Buffer

Returns

Buffer

Defined in

config-path.ts:66


sanityCheckNames

sanityCheckNames(item, users): any

Parameters

NameType
itemstring
usersany

Returns

any

Defined in

uplinks.ts:61


sanityCheckUplinksProps

sanityCheckUplinksProps(configUpLinks): UpLinksConfList

Parameters

NameType
configUpLinksUpLinksConfList

Returns

UpLinksConfList

Defined in

uplinks.ts:37


uplinkSanityCheck

uplinkSanityCheck(uplinks, users?): UpLinksConfList

Parameters

NameTypeDefault value
uplinksUpLinksConfListundefined
usersanyBLACKLIST

Returns

UpLinksConfList

Defined in

uplinks.ts:18