Salta al contenuto principale
Versione: Successivo

@verdaccio/config

Classes

Interfaces

Type Aliases

SetupDirectory

Ƭ SetupDirectory: Object

Type declaration

NameType
pathstring
type"xdg" | "win" | "win32" | "def" | "old"

Defined in

config-path.ts:16

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:4


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:19


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:27


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. // TODO: code duplicated at @verdaccio/signature

Returns

string

Defined in

token.ts:10


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


isNodeVersionGreaterThan21

isNodeVersionGreaterThan21(): boolean

Returns

boolean

Defined in

config.ts:39


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(): string

Returns

string

Defined in

config-path.ts:67


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