From 01b25c3464c2855039c2de699c403581d43b6a70 Mon Sep 17 00:00:00 2001 From: cha0s Date: Mon, 14 Mar 2022 13:24:00 -0500 Subject: [PATCH] fix: rewrite aliased config keys --- packages/core/src/server/flecks.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/core/src/server/flecks.js b/packages/core/src/server/flecks.js index 2b1a11f..3b9d112 100644 --- a/packages/core/src/server/flecks.js +++ b/packages/core/src/server/flecks.js @@ -127,6 +127,15 @@ export default class ServerFlecks extends Flecks { }); } } + // Rewrite aliased config keys. + // eslint-disable-next-line no-param-reassign + config = Object.fromEntries( + Object.entries(config) + .map(([key, value]) => { + const index = key.indexOf(':'); + return [-1 !== index ? key.slice(0, index) : key, value]; + }), + ); const paths = Object.keys(resolver); // Load RCs. const rcs = this.loadRcs(resolver);