0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2025-01-06 22:40:26 -05:00
verdaccio/website/versioned_docs/version-6.x/api/config/modules.md
2023-10-10 18:54:30 +02:00

9.4 KiB

id title sidebar_label sidebar_position custom_edit_url
modules @verdaccio/config Exports 0.5 null

Classes

Interfaces

Type Aliases

SetupDirectory

Ƭ SetupDirectory: Object

Type declaration

Name Type
path string
type string

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

Name Type
ALL string
SCOPE string

Defined in

package-access.ts:23


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

package-access.ts:12


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

Name Type
max number
windowMs number

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

Name Type
name string
pluginGroups string[]

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

Name Type
configPath? string

Returns

string

the config file path

Defined in

config-path.ts:30


fromJStoYAML

fromJStoYAML(config): string | null

Parameters

Name Type
config Partial<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

Name Type Default value
fileName string 'default.yaml'

Returns

ConfigYaml & { configPath: string ; config_path: string }

Defined in

conf/index.ts:5


getUserAgent

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

Parameters

Name Type
customUserAgent? string | boolean
version? string
name? string

Returns

string

Defined in

agent.ts:3


hasProxyTo

hasProxyTo(pkg, upLink, packages): boolean

Parameters

Name Type
pkg string
upLink string
packages PackageList

Returns

boolean

Defined in

uplinks.ts:51


normalisePackageAccess

normalisePackageAccess(packages): LegacyPackageList

Parameters

Name Type
packages LegacyPackageList

Returns

LegacyPackageList

Defined in

package-access.ts:50


normalizeUserList

normalizeUserList(groupsList): any

Parameters

Name Type
groupsList any

Returns

any

Defined in

package-access.ts:28


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

parse.ts:17


readDefaultConfig

readDefaultConfig(): Buffer

Returns

Buffer

Defined in

config-path.ts:66


sanityCheckNames

sanityCheckNames(item, users): any

Parameters

Name Type
item string
users any

Returns

any

Defined in

uplinks.ts:61


sanityCheckUplinksProps

sanityCheckUplinksProps(configUpLinks): UpLinksConfList

Parameters

Name Type
configUpLinks UpLinksConfList

Returns

UpLinksConfList

Defined in

uplinks.ts:37


uplinkSanityCheck

uplinkSanityCheck(uplinks, users?): UpLinksConfList

Parameters

Name Type Default value
uplinks UpLinksConfList undefined
users any BLACKLIST

Returns

UpLinksConfList

Defined in

uplinks.ts:18