From e81c54ee2e95a76e1d078b3715d04c6767deba1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Berkefeld?= Date: Tue, 1 Aug 2023 14:56:17 +0200 Subject: [PATCH] #38: show number of fixed keys across BUs --- lib/index.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/index.js b/lib/index.js index ffc5e0da9..80d9b80f4 100644 --- a/lib/index.js +++ b/lib/index.js @@ -829,6 +829,7 @@ class Mcdev { Util.logger.info(`mcdev:: ${methodName} ${selectedType}`); const properties = await config.getProperties(); let counter_credBu = 0; + let counter_credKeys = 0; if (!(await config.checkProperties(properties))) { // return null here to avoid seeing 2 error messages for the same issue return resultObj; @@ -871,6 +872,7 @@ class Mcdev { for (const cred in properties.credentials) { Util.logger.info(`:: ${lang_present} ${selectedType} on all BUs for ${cred}`); // reset counter per cred + counter_credKeys = 0; counter_credBu = 0; for (const bu in properties.credentials[cred].businessUnits) { resultObj[cred + '/' + bu] = await this.#runOnBU( @@ -881,11 +883,12 @@ class Mcdev { keys ); counter_credBu++; + counter_credKeys += resultObj[cred + '/' + bu].length; Util.startLogger(true); } counter_credTotal += counter_credBu; Util.logger.info( - `:: ${lang_past} ${selectedType} on ${counter_credBu} BUs for ${cred}` + `:: ${lang_past} for ${counter_credKeys} ${selectedType}s on ${counter_credBu} BUs for ${cred}` ); } Util.logger.info( @@ -923,10 +926,11 @@ class Mcdev { keys ); counter_credBu++; + counter_credKeys += resultObj[cred + '/' + bu].length; Util.startLogger(true); } Util.logger.info( - `:: ${lang_past} ${selectedType} on ${counter_credBu} BUs for ${cred}` + `:: ${lang_past} for ${counter_credKeys} ${selectedType}s on ${counter_credBu} BUs for ${cred}` ); } else { // execute runMethod for the entity on one BU only @@ -1101,7 +1105,7 @@ class Mcdev { const keysForDeploy = MetadataTypeInfo[type].getKeysForFixing(metadataMap); if (keysForDeploy.length < 1) { Util.logger.error( - `No items found with a key-name mismatch that match your criteria.` + `No items found with a key-name mismatch that match your criteria.\n` ); return resultArr; }