From 177f212284a579c2ebcc1019819a9b8d471fd190 Mon Sep 17 00:00:00 2001 From: Arigbede Moses Date: Mon, 27 Mar 2023 09:15:33 +0100 Subject: [PATCH] Update jsonVariableSubstitutionUtility.ts Removed exposure of secrets --- src/operations/jsonVariableSubstitutionUtility.ts | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/operations/jsonVariableSubstitutionUtility.ts b/src/operations/jsonVariableSubstitutionUtility.ts index eb39abb1..4be9be40 100644 --- a/src/operations/jsonVariableSubstitutionUtility.ts +++ b/src/operations/jsonVariableSubstitutionUtility.ts @@ -16,11 +16,13 @@ export class JsonSubstitution { if(resultNode.isEnd) { switch(typeof(jsonObject[jsonChild])) { case 'number': - console.log('SubstitutingValueonKeyWithNumber', jsonChild , resultNode.value); + //console.log('SubstitutingValueonKeyWithNumber', jsonChild , resultNode.value); + console.log('SubstitutingValueonKeyWithString' , jsonChild); jsonObject[jsonChild] = !isNaN(resultNode.value) ? Number(resultNode.value): resultNode.value; break; case 'boolean': - console.log('SubstitutingValueonKeyWithBoolean' , jsonChild , resultNode.value); + //console.log('SubstitutingValueonKeyWithBoolean' , jsonChild , resultNode.value); + console.log('SubstitutingValueonKeyWithString' , jsonChild); jsonObject[jsonChild] = ( resultNode.value == 'true' ? true : (resultNode.value == 'false' ? false : resultNode.value) ) @@ -28,7 +30,8 @@ export class JsonSubstitution { case 'object': case null: try { - console.log('SubstitutingValueonKeyWithObject' , jsonChild , resultNode.value); + //console.log('SubstitutingValueonKeyWithObject' , jsonChild , resultNode.value); + console.log('SubstitutingValueonKeyWithString' , jsonChild); jsonObject[jsonChild] = JSON.parse(resultNode.value); } catch(exception) { @@ -37,7 +40,8 @@ export class JsonSubstitution { } break; case 'string': - console.log('SubstitutingValueonKeyWithString' , jsonChild , resultNode.value); + //console.log('SubstitutingValueonKeyWithString' , jsonChild , resultNode.value); + console.log('SubstitutingValueonKeyWithString' , jsonChild); jsonObject[jsonChild] = resultNode.value; } isValueChanged = true; @@ -51,4 +55,4 @@ export class JsonSubstitution { } private envTreeUtil: EnvTreeUtility; -} \ No newline at end of file +}