@salesforce/b2c-tooling-sdk / config / ConfigSource
Interface: ConfigSource
Defined in: packages/b2c-tooling-sdk/src/config/types.ts:171
A configuration source that can contribute config values.
Implement this interface to create custom configuration sources. Sources are called in order, and later sources can override earlier ones.
Example
import type { ConfigSource, NormalizedConfig, ResolveConfigOptions } from '@salesforce/b2c-tooling-sdk/config';
class MyCustomSource implements ConfigSource {
name = 'my-custom-source';
load(options: ResolveConfigOptions): NormalizedConfig | undefined {
// Load config from your custom source
return { hostname: 'example.com' };
}
}Properties
name
name:
string
Defined in: packages/b2c-tooling-sdk/src/config/types.ts:173
Human-readable name for diagnostics
Methods
getPath()?
optionalgetPath():string|undefined
Defined in: packages/b2c-tooling-sdk/src/config/types.ts:187
Get the path to this source's file (if applicable). Used for diagnostics and source info.
Returns
string | undefined
load()
load(
options):NormalizedConfig|undefined
Defined in: packages/b2c-tooling-sdk/src/config/types.ts:181
Load configuration from this source.
Parameters
options
Resolution options
Returns
NormalizedConfig | undefined
Partial config from this source, or undefined if source not available