Skip to main content
Version: Next

Class: Config

Coordinates the application configuration

Implements

  • Config

Constructors

constructor

new Config(config, configOptions?)

Parameters

NameTypeDefault value
configConfigYaml & { config_path: string }undefined
configOptionsObjectundefined
configOptions.forceEnhancedLegacySignaturebooleantrue

Defined in

config.ts:64

Properties

auth

auth: any

Implementation of

AppConfig.auth

Defined in

config.ts:47


configOptions

Private configOptions: Object

Type declaration

NameType
forceEnhancedLegacySignatureboolean

Defined in

config.ts:63


configPath

configPath: string

Implementation of

AppConfig.configPath

Defined in

config.ts:49


flags

flags: FlagsConfig

Implementation of

AppConfig.flags

Defined in

config.ts:61


packages

packages: PackageList

Implementation of

AppConfig.packages

Defined in

config.ts:45


plugins

plugins: null | string | void

Implementation of

AppConfig.plugins

Defined in

config.ts:56


secret

secret: string

Implementation of

AppConfig.secret

Defined in

config.ts:60


security

security: Security

Implementation of

AppConfig.security

Defined in

config.ts:57


self_path

self_path: string

Deprecated

use configPath or config.getConfigPath();

Implementation of

AppConfig.self_path

Defined in

config.ts:53


serverSettings

serverSettings: ServerSettingsConf

Defined in

config.ts:58


server_id

server_id: string

Implementation of

AppConfig.server_id

Defined in

config.ts:48


storage

storage: string | void

Implementation of

AppConfig.storage

Defined in

config.ts:54


uplinks: any

Implementation of

AppConfig.uplinks

Defined in

config.ts:44


userRateLimit

userRateLimit: RateLimit

Implementation of

AppConfig.userRateLimit

Defined in

config.ts:62


user_agent

user_agent: undefined | string

Implementation of

AppConfig.user_agent

Defined in

config.ts:43


users

users: any

Defined in

config.ts:46

Methods

checkSecretKey

checkSecretKey(secret?): string

Store or create whether receive a secret key

Secret

external secret key

Parameters

NameType
secret?string

Returns

string

Implementation of

AppConfig.checkSecretKey

Defined in

config.ts:164


getConfigPath

getConfigPath(): string

Returns

string

Defined in

config.ts:148


getEnhancedLegacySignature

getEnhancedLegacySignature(): boolean

Returns

boolean

Defined in

config.ts:138


getMatchedPackagesSpec

getMatchedPackagesSpec(pkgName): void | PackageAccess

Check for package spec

Parameters

NameType
pkgNamestring

Returns

void | PackageAccess

Implementation of

AppConfig.getMatchedPackagesSpec

Defined in

config.ts:155