/** * Determines if the given yaml document should be used with regard to the * given profile. This provides similar functionality to spring profiles. * * @param {Document} document The yaml doc to check. * @param {string[]} activeProfiles The current profile names to filter docs by. * @returns {boolean} True if the given yaml doc applies to the given profiles. */ export declare const shouldUseDocument: (document: Record | undefined, activeProfiles?: string[] | undefined) => boolean; /** * Reads the yaml file at the given relative path and merges multiple docs into a single object. * If 'profile' is specified then this method expects to filter the yaml for docs based on doc.profiles. * If no profile is specified, then only docs without an 'env' property will be read from the yaml. * * @param {string} relativePath Relative path of the file to read. * @param {string[]} activeProfiles Profiles to filter the yaml documents on. * @returns {Document} Object representation of the given yaml file. */ export declare const readYaml: (relativePath: string, activeProfiles?: string[] | undefined) => Record; /** * Turns an array of key segments and value into a nested object. * Example: ['spring','profiles','active'], 'dev' -> { 'spring': { 'profiles': { 'active': 'dev' }}} * * @param {string[]} propertyKeys The key segments for the given property * @param {*} propertyValue The value associated with the given property * @returns {any} */ export declare const createObjectForProperty: (propertyKeys: string[], propertyValue: any) => any; /** * Parses the dot-separated key-value pairs of an object into deeply nested Objects. * Example: 'spring.profiles.active': 'dev' -> 'spring': 'profiles': 'active': 'dev' * * @param {object} propertiesObject Object containing properties to be parsed * @returns {object} Object of deeply nested properties (not dot-separated) */ export declare const parsePropertiesToObjects: (propertiesObject: object | undefined) => object; /** * Reads the yaml document and parses any dot-separated property keys into objects. * * @param {string} relativePath Relative path of the file to read. * @param {string[]} activeProfiles Profiles to filter the yaml documents on. * @returns {Document} Object representation of the given yaml file. */ export declare const readYamlAsDocument: (relativePath: string, activeProfiles: string[]) => Record; /** * Takes an array of objects and merges their properties in order, from index 0 to length-1. * Identical properties in later objects will override those in previous objects. * This method does handle deeply nested property keys, like: { 'spring': { 'profiles': { 'active': 'local' }}} * * @param {object[]} objects Array of Objects containing properties to be merged * @returns {object} Object containing the merged properties */ export declare const mergeProperties: = any>(objects: object[]) => T;