@verdaccio/config
Classes
Interfaces
Type Aliases
SetupDirectory
Ƭ SetupDirectory: Object
Type declaration
Name | Type |
---|---|
path | string |
type | "xdg" | "win" | "win32" | "def" | "old" |
Defined in
Variables
DEFAULT_REGISTRY
• Const
DEFAULT_REGISTRY: "https://registry.npmjs.org"
Defined in
DEFAULT_UPLINK
• Const
DEFAULT_UPLINK: "npmjs"
Defined in
PACKAGE_ACCESS
• Const
PACKAGE_ACCESS: Object
Type declaration
Name | Type |
---|---|
ALL | string |
SCOPE | string |
Defined in
ROLES
• Const
ROLES: Object
Type declaration
Name | Type |
---|---|
$ALL | string |
$ANONYMOUS | string |
$AUTH | string |
ALL | string |
DEPRECATED_ALL | string |
DEPRECATED_ANONYMOUS | string |
DEPRECATED_AUTH | string |
Defined in
TIME_EXPIRATION_1H
• Const
TIME_EXPIRATION_1H: "1h"
Defined in
TOKEN_VALID_LENGTH
• Const
TOKEN_VALID_LENGTH: 32
Defined in
WEB_TITLE
• Const
WEB_TITLE: "Verdaccio"
Defined in
defaultLoggedUserRoles
• Const
defaultLoggedUserRoles: string
[]
All logged users will have by default the group $all and $authenticate
Defined in
defaultNonLoggedUserRoles
• Const
defaultNonLoggedUserRoles: string
[]
Defined in
defaultSecurity
• Const
defaultSecurity: Security
Defined in
defaultUserRateLimiting
• Const
defaultUserRateLimiting: Object
Type declaration
Name | Type |
---|---|
max | number |
windowMs | number |
Defined in
Functions
createAnonymousRemoteUser
▸ createAnonymousRemoteUser(): RemoteUser
Builds an anonymous remote user in case none is logged in.
Returns
RemoteUser
{ name: xx, groups: [], real_groups: [] }
Defined in
createRemoteUser
▸ createRemoteUser(name
, pluginGroups
): RemoteUser
Create a RemoteUser object
Parameters
Name | Type |
---|---|
name | string |
pluginGroups | string [] |
Returns
RemoteUser
{ name: xx, pluginGroups: [], real_groups: [] }
Defined in
findConfigFile
▸ findConfigFile(configPath?
): string
Find and get the first config file that match.
Parameters
Name | Type |
---|---|
configPath? | string |
Returns
string
the config file path
Defined in
fromJStoYAML
▸ fromJStoYAML(config
): string
| null
Parameters
Name | Type |
---|---|
config | Partial <ConfigYaml > |
Returns
string
| null
Defined in
generateRandomSecretKey
▸ generateRandomSecretKey(): string
Secret key must have 32 characters. // TODO: code duplicated at @verdaccio/signature
Returns
string
Defined in
getDefaultConfig
▸ getDefaultConfig(fileName?
): ConfigYaml
& { configPath
: string
; config_path
: string
}
Parameters
Name | Type | Default value |
---|---|---|
fileName | string | 'default.yaml' |
Returns
ConfigYaml
& { configPath
: string
; config_path
: string
}
Defined in
getUserAgent
▸ getUserAgent(customUserAgent?
, version?
, name?
): string
Parameters
Name | Type |
---|---|
customUserAgent? | string | boolean |
version? | string |
name? | string |
Returns
string
Defined in
hasProxyTo
▸ hasProxyTo(pkg
, upLink
, packages
): boolean
Parameters
Name | Type |
---|---|
pkg | string |
upLink | string |
packages | PackageList |
Returns
boolean
Defined in
isNodeVersionGreaterThan21
▸ isNodeVersionGreaterThan21(): boolean
Returns
boolean
Defined in
normalisePackageAccess
▸ normalisePackageAccess(packages
): LegacyPackageList
Parameters
Name | Type |
---|---|
packages | LegacyPackageList |
Returns
Defined in
normalizeUserList
▸ normalizeUserList(groupsList
): any
Parameters
Name | Type |
---|---|
groupsList | any |
Returns
any
Defined in
parseConfigFile
▸ parseConfigFile(configPath
): ConfigYaml
& { configPath
: string
; config_path
: string
}
Parse a config file from yaml to JSON.
Parameters
Name | Type | Description |
---|---|---|
configPath | string | the absolute path of the configuration file |
Returns
ConfigYaml
& { configPath
: string
; config_path
: string
}
Defined in
readDefaultConfig
▸ readDefaultConfig(): string
Returns
string
Defined in
sanityCheckNames
▸ sanityCheckNames(item
, users
): any
Parameters
Name | Type |
---|---|
item | string |
users | any |
Returns
any
Defined in
sanityCheckUplinksProps
▸ sanityCheckUplinksProps(configUpLinks
): UpLinksConfList
Parameters
Name | Type |
---|---|
configUpLinks | UpLinksConfList |
Returns
UpLinksConfList
Defined in
uplinkSanityCheck
▸ uplinkSanityCheck(uplinks
, users?
): UpLinksConfList
Parameters
Name | Type | Default value |
---|---|---|
uplinks | UpLinksConfList | undefined |
users | any | BLACKLIST |
Returns
UpLinksConfList