@amadeus-it-group/kassette
Version:
Development server, used mainly for testing, which proxies requests and is able to easily manage local mocks.
20 lines (19 loc) • 1.06 kB
TypeScript
import { RunOptions } from '../server';
import { ConfigurationSpec, GetConfigurationProps, IMergedConfiguration, ConfigurationPropertySpec, ConfigurationPropertySource } from './model';
export * from './model';
/**
* Returns the configuration merged from the CLI input and the file input
* (retrieved from the path).
*/
export declare function getConfiguration({ cliConfiguration, configurationPath, apiConfiguration, fileConfigurationContext, }: RunOptions): Promise<IMergedConfiguration>;
/**
* Retrieves the configuration input from the file pointed by the path given in constructor.
* If no path was given, returns null.
*
* Throws an error if the path was specified but getting the configuration input failed.
*/
export declare function getFileConfiguration(path: string, arg: GetConfigurationProps): Promise<ConfigurationSpec>;
export declare function buildProperty<PropertyType>({ cliValue, fileValue, apiValue, defaultValue, }: ConfigurationPropertySpec<PropertyType>): {
origin: ConfigurationPropertySource;
value: PropertyType;
};