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/classes/ConfigBuilder.md
2023-10-10 18:54:30 +02:00

3.9 KiB

id title sidebar_label sidebar_position custom_edit_url
ConfigBuilder Class: ConfigBuilder ConfigBuilder 0 null

Helper configuration builder constructor, used to build the configuration for testing or programatically creating a configuration.

Constructors

constructor

new ConfigBuilder(config?)

Parameters

Name Type
config? Partial<ConfigYaml>

Defined in

builder.ts:21

Properties

config

Private config: ConfigYaml

Defined in

builder.ts:19

Methods

addAuth

addAuth(auth): ConfigBuilder

Parameters

Name Type
auth Partial<any>

Returns

ConfigBuilder

Defined in

builder.ts:46


addLogger

addLogger(log): ConfigBuilder

Parameters

Name Type
log LoggerConfItem

Returns

ConfigBuilder

Defined in

builder.ts:51


addPackageAccess

addPackageAccess(pattern, pkgAccess): ConfigBuilder

Parameters

Name Type
pattern string
pkgAccess PackageAccessYaml

Returns

ConfigBuilder

Defined in

builder.ts:30


addSecurity

addSecurity(security): ConfigBuilder

Parameters

Name Type
security Partial<Security>

Returns

ConfigBuilder

Defined in

builder.ts:41


addStorage

addStorage(storage): ConfigBuilder

Parameters

Name Type
storage string | object

Returns

ConfigBuilder

Defined in

builder.ts:56


addUplink(id, uplink): ConfigBuilder

Parameters

Name Type
id string
uplink UpLinkConf

Returns

ConfigBuilder

Defined in

builder.ts:36


getAsYaml

getAsYaml(): string

Returns

string

Defined in

builder.ts:69


getConfig

getConfig(): ConfigYaml

Returns

ConfigYaml

Defined in

builder.ts:65


build

Static build(config?): ConfigBuilder

Parameters

Name Type
config? Partial<ConfigYaml>

Returns

ConfigBuilder

Defined in

builder.ts:26