import {cloneDeep, get, has, isNil} from 'lodash'; import * as path from 'path'; const billingConfigPath = 'ls.billing'; export const getLabShareConfiguration = (): any => { if ( !isNil(process.env.CONFIG_FILE)) { return require( path.join(process.cwd(), process.env.CONFIG_FILE)); } const config = get(global, 'LabShare.Config'); if (has(config, billingConfigPath) && !has(config, 'billing')) { config.billing = config[billingConfigPath]; } return config; };