Skip to main content

@backstage/config-loader

Home > @backstage/config-loader

Config loading functionality used by Backstage backend, and CLI

Classes

Class

Description

ConfigSources

A collection of utilities for working with and creating ConfigSources.

EnvConfigSource

A config source that reads configuration from the environment.

FileConfigSource

A config source that loads configuration from a local file.

MutableConfigSource

A config source that can be updated with new data.

RemoteConfigSource

A config source that loads configuration from a remote URL.

StaticConfigSource

A configuration source that reads from a static object, promise, iterable, or observable.

Functions

Function

Description

loadConfig(options)

Load configuration data.

loadConfigSchema(options)

Loads config schema for a Backstage instance.

mergeConfigSchemas(schemas)

Given a list of configuration schemas from packages, merge them into a single json schema.

readEnvConfig(env)

Read runtime configuration from the environment.

Interfaces

Interface

Description

BaseConfigSourcesOptions

Common options for the default Backstage configuration sources.

ClosableConfig

A config implementation that can be closed.

ConfigSource

A source of configuration data.

ConfigSourceData

The data returned by ConfigSource.readConfigData().

ConfigSourcesDefaultForTargetsOptions

Options for ConfigSources.defaultForTargets().

ConfigSourcesDefaultOptions

Options for ConfigSources.default().

EnvConfigSourceOptions

Options for EnvConfigSource.create().

FileConfigSourceOptions

Options for FileConfigSource.create().

MutableConfigSourceOptions

Options for MutableConfigSource.create().

ReadConfigDataOptions

Options for ConfigSource.readConfigData().

RemoteConfigSourceOptions

Options for RemoteConfigSource.create().

StaticConfigSourceOptions

Options for StaticConfigSource.create().

Type Aliases

Type Alias

Description

AsyncConfigSourceGenerator

The the generator returned by ConfigSource.readConfigData().

ConfigSchema

A loaded configuration schema that is ready to process configuration data.

ConfigSchemaProcessingOptions

Options used to process configuration data with a schema.

ConfigSourceTarget

A target to read configuration from.

ConfigTarget

ConfigVisibility

A type representing the possible configuration value visibilities

EnvFunc

A custom function to be used for substitution withing configuration files.

LoadConfigOptions

Options that control the loading of configuration files in the backend.

LoadConfigOptionsRemote

LoadConfigOptionsWatch

LoadConfigResult

Results of loading configuration files.

LoadConfigSchemaOptions

Options that control the loading of configuration schema files in the backend.

Parser

A custom function to be used for parsing configuration content.

TransformFunc

A function used to transform primitive configuration values.

The "path" in the context is a JQ-style path to the current value from within the original object passed to filterByVisibility(). For example, "field.list[2]" would refer to: { field: [ "foo", "bar", "baz" -- this one ] }