@odata2ts/odata2ts
Version:
Flexible generator to produce various TypeScript artefacts (from simple model interfaces to complete odata clients) from OData metadata files
26 lines (25 loc) • 1.22 kB
TypeScript
import { CliOptions, ConfigFileOptions, RunOptions } from "./OptionModel.js";
/**
* Provides default values and evaluates the various config file and CLI options.
* This function always returns a list of RunOptions,
* whereby each item represents one generation run / one service.
*
* Configurations are merged in the following order (last one wins):
* - default values
* - config file: base settings
* - config file: service specific settings
* - CLI options
*
* If the CLI options specify source and output, then the service config is completely ignored and only the
* base settings are applied from the config file.
*
* If the CLI options do not specify source and output, but do specify services, then these services must
* exist in the config file and each service must supply values for source and output as a minimum.
*
* If the CLI options neither entail source nor services, then at least one service must be configured in the
* config file. All configured services are returned.
*
* @param cliOpts CLI passed options
* @param configOpts config file options
*/
export declare function evaluateConfigOptions(cliOpts: CliOptions, configOpts: ConfigFileOptions | undefined): Array<RunOptions>;