WiserSolutions/quadro

Configs: Base configs are overwritten by plugin configs

ankurjain86 opened this issue · 1 comments

Brief issue description

This we encountered when we were developing the plugin that has external API configs. In this case, the external config of the main service was overwritten with the plugin config.

This happens because we load the plugin configs after the main configs are loaded and its overwritten by

https://github.com/WisePricer/quadro/blob/0e0919e8edd27f78dbdae758d7c9b75bcb26ed2b/lib/config/config.js#L124

Ideally, it should be

this[name] = _.merge(this[name]||{}, ...configs)

Expected outcome

The service should be able to access all the required configs and all the APIs from the plugin as well as main service are created

Actual outcome

Only external APIs from the plugins are created and the main service one is ignored.

Fixed in 8e9702f