diff --git a/lfet/common/jiraConfig.lfet b/lfet/common/jiraConfig.lfet index dde6a12..78c9e9a 100644 --- a/lfet/common/jiraConfig.lfet +++ b/lfet/common/jiraConfig.lfet @@ -1,6 +1,6 @@ - + @@ -252,12 +252,12 @@ <ActionOccurrence uId="17063950756672961"> <Symbol language="German" value="DOC_USR_PWD"/> <Title language="German" value="username via doc attr and password via env without project key prefix"/> - <SourceCode codeLanguage="JavaScript" sourceCodeType="StmtSeq" value="_$$dtname.auth = 'Basic ' + Buffer.from(doc.getAttribute(`${_prefixDoc}jira-username`) + ':' + process.env[`_${_prefixEnv}JIRA_PASSWORD`]).toString('base64')"/> + <SourceCode codeLanguage="JavaScript" sourceCodeType="StmtSeq" value="_$$dtname.auth = 'Basic ' + Buffer.from(doc.getAttribute(`${_prefixDoc}jira-username`) + ':' + process.env[`${_prefixEnv}JIRA_PASSWORD`]).toString('base64')"/> </ActionOccurrence> <ActionOccurrence uId="17064330930142820"> <Symbol language="German" value="DOC_USR_API"/> <Title language="German" value="username via doc attr and api token via env without project key prefix"/> - <SourceCode codeLanguage="JavaScript" sourceCodeType="StmtSeq" value="_$$dtname.auth = 'Basic ' + Buffer.from(doc.getAttribute(`${_prefixDoc}jira-username`) + ':' + process.env[`_${_prefixEnv}JIRA_APITOKEN`]).toString('base64')"/> + <SourceCode codeLanguage="JavaScript" sourceCodeType="StmtSeq" value="_$$dtname.auth = 'Basic ' + Buffer.from(doc.getAttribute(`${_prefixDoc}jira-username`) + ':' + process.env[`${_prefixEnv}JIRA_APITOKEN`]).toString('base64')"/> </ActionOccurrence> <ActionOccurrence uId="17063951157372964"> <Symbol language="German" value="PENV_USR_PWD"/> diff --git a/lfet/common/jiraConfig.lfet.$bak.zip b/lfet/common/jiraConfig.lfet.$bak.zip index 299ea86..ca9e573 100644 Binary files a/lfet/common/jiraConfig.lfet.$bak.zip and b/lfet/common/jiraConfig.lfet.$bak.zip differ diff --git a/lib/common/jiraConfig.js b/lib/common/jiraConfig.js index 1f1049d..fc3c3a2 100644 --- a/lib/common/jiraConfig.js +++ b/lib/common/jiraConfig.js @@ -1,9 +1,9 @@ // *** WARNING: DO NOT MODIFY *** This is a generated JavaScript source code! // -// Generated by LF-ET 2.3.0 (231102a), https://www.lohrfink.de/lfet +// Generated by LF-ET 2.3.0 (240304A), https://www.lohrfink.de/lfet // From decision table // "/opt/data/github/asciidoctor/asciidoctor-jira/lfet/common/jiraConfig.lfet" -// 28.01.2024 10:43 +// 05.03.2024 11:34 // // Changes to this code resulting from refactorings can be synchronised // with LF-ET using the function "Scrapbook Import". @@ -42,7 +42,7 @@ function jiraConfig (macroName, parent, projectKey, attrs, logger) { // Rule R01 ----> _jiraconfigRuleExecuted = true // Trace ----> - logger.info(`jiraConfig - 20240128.104307 - 1 / 36 - ${JSON.stringify(_jiraConfig)}`) + logger.info(`jiraConfig - 20240305.113409 - 1 / 36 - ${JSON.stringify(_jiraConfig)}`) // Trace <---- // Action A01: append macro name to praefix _prefixDoc = `${macroName.toLowerCase()}-` @@ -55,14 +55,14 @@ function jiraConfig (macroName, parent, projectKey, attrs, logger) { // Rule R02 ----> _jiraconfigRuleExecuted = true // Trace ----> - logger.info(`jiraConfig - 20240128.104307 - 2 / 36 - ${JSON.stringify(_jiraConfig)}`) + logger.info(`jiraConfig - 20240305.113409 - 2 / 36 - ${JSON.stringify(_jiraConfig)}`) // Trace <---- // Action A05/01: next step / + / next step _step++ _exit = false // Rule R02 <---- } - // Condition B01/02: Step / 2 / jira base url information + // Condition B01/02: Step / 2 / jira base url information } else if (_step === 2) { // Condition B03: project key is defined if (projectKey) { @@ -71,7 +71,7 @@ function jiraConfig (macroName, parent, projectKey, attrs, logger) { // Rule R03 ----> _jiraconfigRuleExecuted = true // Trace ----> - logger.info(`jiraConfig - 20240128.104307 - 3 / 36 - ${JSON.stringify(_jiraConfig)}`) + logger.info(`jiraConfig - 20240305.113409 - 3 / 36 - ${JSON.stringify(_jiraConfig)}`) // Trace <---- // Action A02/01: set base url / ATTRS / via macro attrs _jiraConfig.baseUrl = attrs['jira-baseurl'] @@ -79,12 +79,12 @@ function jiraConfig (macroName, parent, projectKey, attrs, logger) { _step++ _exit = false // Rule R03 <---- - // Condition B04/02: base url with project key prefix is defined / DOC / via doc attr + // Condition B04/02: base url with project key prefix is defined / DOC / via doc attr } else if (doc.getAttribute(`${projectKey.toLowerCase()}-${_prefixDoc}jira-baseurl`)) { // Rule R04 ----> _jiraconfigRuleExecuted = true // Trace ----> - logger.info(`jiraConfig - 20240128.104307 - 4 / 36 - ${JSON.stringify(_jiraConfig)}`) + logger.info(`jiraConfig - 20240305.113409 - 4 / 36 - ${JSON.stringify(_jiraConfig)}`) // Trace <---- // Action A02/03: set base url / PDOC / via doc attr and project key praefix _jiraConfig.baseUrl = doc.getAttribute(`${projectKey.toLowerCase()}-${_prefixDoc}jira-baseurl`) @@ -92,12 +92,12 @@ function jiraConfig (macroName, parent, projectKey, attrs, logger) { _step++ _exit = false // Rule R04 <---- - // Condition B04/03: base url with project key prefix is defined / ENV / via env + // Condition B04/03: base url with project key prefix is defined / ENV / via env } else if (process.env[`${projectKey.toUpperCase()}_${_prefixEnv}JIRA_BASEURL`]) { // Rule R05 ----> _jiraconfigRuleExecuted = true // Trace ----> - logger.info(`jiraConfig - 20240128.104307 - 5 / 36 - ${JSON.stringify(_jiraConfig)}`) + logger.info(`jiraConfig - 20240305.113409 - 5 / 36 - ${JSON.stringify(_jiraConfig)}`) // Trace <---- // Action A02/05: set base url / PENV / via env and project key praefix _jiraConfig.baseUrl = process.env[`${projectKey.toUpperCase()}_${_prefixEnv}JIRA_BASEURL`] @@ -111,7 +111,7 @@ function jiraConfig (macroName, parent, projectKey, attrs, logger) { // Rule R06 ----> _jiraconfigRuleExecuted = true // Trace ----> - logger.info(`jiraConfig - 20240128.104307 - 6 / 36 - ${JSON.stringify(_jiraConfig)}`) + logger.info(`jiraConfig - 20240305.113409 - 6 / 36 - ${JSON.stringify(_jiraConfig)}`) // Trace <---- // Action A02/01: set base url / ATTRS / via macro attrs _jiraConfig.baseUrl = attrs['jira-baseurl'] @@ -119,12 +119,12 @@ function jiraConfig (macroName, parent, projectKey, attrs, logger) { _step++ _exit = false // Rule R06 <---- - // Condition B05/02: base url without project key prefix is defined / DOC / via doc attr + // Condition B05/02: base url without project key prefix is defined / DOC / via doc attr } else if (doc.getAttribute(`${_prefixDoc}jira-baseurl`)) { // Rule R07 ----> _jiraconfigRuleExecuted = true // Trace ----> - logger.info(`jiraConfig - 20240128.104307 - 7 / 36 - ${JSON.stringify(_jiraConfig)}`) + logger.info(`jiraConfig - 20240305.113409 - 7 / 36 - ${JSON.stringify(_jiraConfig)}`) // Trace <---- // Action A02/02: set base url / DOC / via doc attr _jiraConfig.baseUrl = doc.getAttribute(`${_prefixDoc}jira-baseurl`) @@ -132,12 +132,12 @@ function jiraConfig (macroName, parent, projectKey, attrs, logger) { _step++ _exit = false // Rule R07 <---- - // Condition B05/03: base url without project key prefix is defined / ENV / via env + // Condition B05/03: base url without project key prefix is defined / ENV / via env } else if (process.env[`${_prefixEnv}JIRA_BASEURL`]) { // Rule R08 ----> _jiraconfigRuleExecuted = true // Trace ----> - logger.info(`jiraConfig - 20240128.104307 - 8 / 36 - ${JSON.stringify(_jiraConfig)}`) + logger.info(`jiraConfig - 20240305.113409 - 8 / 36 - ${JSON.stringify(_jiraConfig)}`) // Trace <---- // Action A02/04: set base url / ENV / via env _jiraConfig.baseUrl = process.env[`${_prefixEnv}JIRA_BASEURL`] @@ -149,7 +149,7 @@ function jiraConfig (macroName, parent, projectKey, attrs, logger) { // Rule R09 ----> _jiraconfigRuleExecuted = true // Trace ----> - logger.info(`jiraConfig - 20240128.104307 - 9 / 36 - ${JSON.stringify(_jiraConfig)}`) + logger.info(`jiraConfig - 20240305.113409 - 9 / 36 - ${JSON.stringify(_jiraConfig)}`) // Trace <---- // Action A04/01: log mandatory information is missing / URL / Jira base url is missing logger.error('Jira base url is missing') @@ -164,7 +164,7 @@ function jiraConfig (macroName, parent, projectKey, attrs, logger) { // Rule R10 ----> _jiraconfigRuleExecuted = true // Trace ----> - logger.info(`jiraConfig - 20240128.104307 - 10 / 36 - ${JSON.stringify(_jiraConfig)}`) + logger.info(`jiraConfig - 20240305.113409 - 10 / 36 - ${JSON.stringify(_jiraConfig)}`) // Trace <---- // Action A02/01: set base url / ATTRS / via macro attrs _jiraConfig.baseUrl = attrs['jira-baseurl'] @@ -172,12 +172,12 @@ function jiraConfig (macroName, parent, projectKey, attrs, logger) { _step++ _exit = false // Rule R10 <---- - // Condition B05/02: base url without project key prefix is defined / DOC / via doc attr + // Condition B05/02: base url without project key prefix is defined / DOC / via doc attr } else if (doc.getAttribute(`${_prefixDoc}jira-baseurl`)) { // Rule R11 ----> _jiraconfigRuleExecuted = true // Trace ----> - logger.info(`jiraConfig - 20240128.104307 - 11 / 36 - ${JSON.stringify(_jiraConfig)}`) + logger.info(`jiraConfig - 20240305.113409 - 11 / 36 - ${JSON.stringify(_jiraConfig)}`) // Trace <---- // Action A02/02: set base url / DOC / via doc attr _jiraConfig.baseUrl = doc.getAttribute(`${_prefixDoc}jira-baseurl`) @@ -185,12 +185,12 @@ function jiraConfig (macroName, parent, projectKey, attrs, logger) { _step++ _exit = false // Rule R11 <---- - // Condition B05/03: base url without project key prefix is defined / ENV / via env + // Condition B05/03: base url without project key prefix is defined / ENV / via env } else if (process.env[`${_prefixEnv}JIRA_BASEURL`]) { // Rule R12 ----> _jiraconfigRuleExecuted = true // Trace ----> - logger.info(`jiraConfig - 20240128.104307 - 12 / 36 - ${JSON.stringify(_jiraConfig)}`) + logger.info(`jiraConfig - 20240305.113409 - 12 / 36 - ${JSON.stringify(_jiraConfig)}`) // Trace <---- // Action A02/04: set base url / ENV / via env _jiraConfig.baseUrl = process.env[`${_prefixEnv}JIRA_BASEURL`] @@ -202,7 +202,7 @@ function jiraConfig (macroName, parent, projectKey, attrs, logger) { // Rule R13 ----> _jiraconfigRuleExecuted = true // Trace ----> - logger.info(`jiraConfig - 20240128.104307 - 13 / 36 - ${JSON.stringify(_jiraConfig)}`) + logger.info(`jiraConfig - 20240305.113409 - 13 / 36 - ${JSON.stringify(_jiraConfig)}`) // Trace <---- // Action A04/01: log mandatory information is missing / URL / Jira base url is missing logger.error('Jira base url is missing') @@ -211,7 +211,7 @@ function jiraConfig (macroName, parent, projectKey, attrs, logger) { // Rule R13 <---- } } - // Condition B01/03: Step / 3 / jira username & password or apitoken information + // Condition B01/03: Step / 3 / jira username & password or apitoken information } else if (_step === 3) { // Condition B03: project key is defined if (projectKey) { @@ -222,7 +222,7 @@ function jiraConfig (macroName, parent, projectKey, attrs, logger) { // Rule R14 ----> _jiraconfigRuleExecuted = true // Trace ----> - logger.info(`jiraConfig - 20240128.104307 - 14 / 36 - ${JSON.stringify(_jiraConfig)}`) + logger.info(`jiraConfig - 20240305.113409 - 14 / 36 - ${JSON.stringify(_jiraConfig)}`) // Trace <---- // Action A03/01: set auth / PDOC_USR_PWD / username via doc attr and password via env with project key prefix _jiraConfig.auth = 'Basic ' + Buffer.from(doc.getAttribute(`${projectKey.toLowerCase()}-${_prefixDoc}jira-username`) + ':' + process.env[`${projectKey.toUpperCase()}_${_prefixEnv}JIRA_PASSWORD`]).toString('base64') @@ -235,7 +235,7 @@ function jiraConfig (macroName, parent, projectKey, attrs, logger) { // Rule R15 ----> _jiraconfigRuleExecuted = true // Trace ----> - logger.info(`jiraConfig - 20240128.104307 - 15 / 36 - ${JSON.stringify(_jiraConfig)}`) + logger.info(`jiraConfig - 20240305.113409 - 15 / 36 - ${JSON.stringify(_jiraConfig)}`) // Trace <---- // Action A03/02: set auth / PDOC_USR_API / username via doc attr and api token via env with project key prefix _jiraConfig.auth = 'Basic ' + Buffer.from(doc.getAttribute(`${projectKey.toLowerCase()}-${_prefixDoc}jira-username`) + ':' + process.env[`${projectKey.toUpperCase()}_${_prefixEnv}JIRA_APITOKEN`]).toString('base64') @@ -246,7 +246,7 @@ function jiraConfig (macroName, parent, projectKey, attrs, logger) { // Rule R16 ----> _jiraconfigRuleExecuted = true // Trace ----> - logger.info(`jiraConfig - 20240128.104307 - 16 / 36 - ${JSON.stringify(_jiraConfig)}`) + logger.info(`jiraConfig - 20240305.113409 - 16 / 36 - ${JSON.stringify(_jiraConfig)}`) // Trace <---- // Action A04/03: log mandatory information is missing / PWD/API / Jira password or api token is missing logger.error('Jira password or api token is missing') @@ -255,14 +255,14 @@ function jiraConfig (macroName, parent, projectKey, attrs, logger) { // Rule R16 <---- } } - // Condition B06/02: username with project key prefix is defined / ENV / via env + // Condition B06/02: username with project key prefix is defined / ENV / via env } else if (process.env[`${projectKey.toUpperCase()}_${_prefixEnv}JIRA_USERNAME`]) { // Condition B08/01: password with project key prefix is defined / ENV / via env if (process.env[`${projectKey.toUpperCase()}_${_prefixEnv}JIRA_PASSWORD`]) { // Rule R17 ----> _jiraconfigRuleExecuted = true // Trace ----> - logger.info(`jiraConfig - 20240128.104307 - 17 / 36 - ${JSON.stringify(_jiraConfig)}`) + logger.info(`jiraConfig - 20240305.113409 - 17 / 36 - ${JSON.stringify(_jiraConfig)}`) // Trace <---- // Action A03/05: set auth / PENV_USR_PWD / username and password via env with project key prefix _jiraConfig.auth = 'Basic ' + Buffer.from(process.env[`${projectKey.toUpperCase()}_${_prefixEnv}JIRA_USERNAME`] + ':' + process.env[`${projectKey.toUpperCase()}_${_prefixEnv}JIRA_PASSWORD`]).toString('base64') @@ -275,7 +275,7 @@ function jiraConfig (macroName, parent, projectKey, attrs, logger) { // Rule R18 ----> _jiraconfigRuleExecuted = true // Trace ----> - logger.info(`jiraConfig - 20240128.104307 - 18 / 36 - ${JSON.stringify(_jiraConfig)}`) + logger.info(`jiraConfig - 20240305.113409 - 18 / 36 - ${JSON.stringify(_jiraConfig)}`) // Trace <---- // Action A03/06: set auth / PENV_USR_API / username and api token via env with project key prefix _jiraConfig.auth = 'Basic ' + Buffer.from(process.env[`${projectKey.toUpperCase()}_${_prefixEnv}JIRA_USERNAME`] + ':' + process.env[`${projectKey.toUpperCase()}_${_prefixEnv}JIRA_APITOKEN`]).toString('base64') @@ -286,7 +286,7 @@ function jiraConfig (macroName, parent, projectKey, attrs, logger) { // Rule R19 ----> _jiraconfigRuleExecuted = true // Trace ----> - logger.info(`jiraConfig - 20240128.104307 - 19 / 36 - ${JSON.stringify(_jiraConfig)}`) + logger.info(`jiraConfig - 20240305.113409 - 19 / 36 - ${JSON.stringify(_jiraConfig)}`) // Trace <---- // Action A04/03: log mandatory information is missing / PWD/API / Jira password or api token is missing logger.error('Jira password or api token is missing') @@ -303,10 +303,10 @@ function jiraConfig (macroName, parent, projectKey, attrs, logger) { // Rule R20 ----> _jiraconfigRuleExecuted = true // Trace ----> - logger.info(`jiraConfig - 20240128.104307 - 20 / 36 - ${JSON.stringify(_jiraConfig)}`) + logger.info(`jiraConfig - 20240305.113409 - 20 / 36 - ${JSON.stringify(_jiraConfig)}`) // Trace <---- // Action A03/03: set auth / DOC_USR_PWD / username via doc attr and password via env without project key prefix - _jiraConfig.auth = 'Basic ' + Buffer.from(doc.getAttribute(`${_prefixDoc}jira-username`) + ':' + process.env[`_${_prefixEnv}JIRA_PASSWORD`]).toString('base64') + _jiraConfig.auth = 'Basic ' + Buffer.from(doc.getAttribute(`${_prefixDoc}jira-username`) + ':' + process.env[`${_prefixEnv}JIRA_PASSWORD`]).toString('base64') // Action A05/02: next step / E / Exit _exit = true // Rule R20 <---- @@ -316,10 +316,10 @@ function jiraConfig (macroName, parent, projectKey, attrs, logger) { // Rule R21 ----> _jiraconfigRuleExecuted = true // Trace ----> - logger.info(`jiraConfig - 20240128.104307 - 21 / 36 - ${JSON.stringify(_jiraConfig)}`) + logger.info(`jiraConfig - 20240305.113409 - 21 / 36 - ${JSON.stringify(_jiraConfig)}`) // Trace <---- // Action A03/04: set auth / DOC_USR_API / username via doc attr and api token via env without project key prefix - _jiraConfig.auth = 'Basic ' + Buffer.from(doc.getAttribute(`${_prefixDoc}jira-username`) + ':' + process.env[`_${_prefixEnv}JIRA_APITOKEN`]).toString('base64') + _jiraConfig.auth = 'Basic ' + Buffer.from(doc.getAttribute(`${_prefixDoc}jira-username`) + ':' + process.env[`${_prefixEnv}JIRA_APITOKEN`]).toString('base64') // Action A05/02: next step / E / Exit _exit = true // Rule R21 <---- @@ -327,7 +327,7 @@ function jiraConfig (macroName, parent, projectKey, attrs, logger) { // Rule R22 ----> _jiraconfigRuleExecuted = true // Trace ----> - logger.info(`jiraConfig - 20240128.104307 - 22 / 36 - ${JSON.stringify(_jiraConfig)}`) + logger.info(`jiraConfig - 20240305.113409 - 22 / 36 - ${JSON.stringify(_jiraConfig)}`) // Trace <---- // Action A04/03: log mandatory information is missing / PWD/API / Jira password or api token is missing logger.error('Jira password or api token is missing') @@ -336,14 +336,14 @@ function jiraConfig (macroName, parent, projectKey, attrs, logger) { // Rule R22 <---- } } - // Condition B07/02: username without project key prefix is defined / ENV / via env + // Condition B07/02: username without project key prefix is defined / ENV / via env } else if (process.env[`${_prefixEnv}JIRA_USERNAME`]) { // Condition B09/01: password without project key prefix is defined / ENV / via env if (process.env[`${_prefixEnv}JIRA_PASSWORD`]) { // Rule R23 ----> _jiraconfigRuleExecuted = true // Trace ----> - logger.info(`jiraConfig - 20240128.104307 - 23 / 36 - ${JSON.stringify(_jiraConfig)}`) + logger.info(`jiraConfig - 20240305.113409 - 23 / 36 - ${JSON.stringify(_jiraConfig)}`) // Trace <---- // Action A03/07: set auth / ENV_USR_PWD / username and password via env without project key prefix _jiraConfig.auth = 'Basic ' + Buffer.from(process.env[`${_prefixEnv}JIRA_USERNAME`] + ':' + process.env[`${_prefixEnv}JIRA_PASSWORD`]).toString('base64') @@ -356,7 +356,7 @@ function jiraConfig (macroName, parent, projectKey, attrs, logger) { // Rule R24 ----> _jiraconfigRuleExecuted = true // Trace ----> - logger.info(`jiraConfig - 20240128.104307 - 24 / 36 - ${JSON.stringify(_jiraConfig)}`) + logger.info(`jiraConfig - 20240305.113409 - 24 / 36 - ${JSON.stringify(_jiraConfig)}`) // Trace <---- // Action A03/08: set auth / ENV_USR_API / username and api token via env without project key prefix _jiraConfig.auth = 'Basic ' + Buffer.from(process.env[`${_prefixEnv}JIRA_USERNAME`] + ':' + process.env[`${_prefixEnv}JIRA_APITOKEN`]).toString('base64') @@ -367,7 +367,7 @@ function jiraConfig (macroName, parent, projectKey, attrs, logger) { // Rule R25 ----> _jiraconfigRuleExecuted = true // Trace ----> - logger.info(`jiraConfig - 20240128.104307 - 25 / 36 - ${JSON.stringify(_jiraConfig)}`) + logger.info(`jiraConfig - 20240305.113409 - 25 / 36 - ${JSON.stringify(_jiraConfig)}`) // Trace <---- // Action A04/03: log mandatory information is missing / PWD/API / Jira password or api token is missing logger.error('Jira password or api token is missing') @@ -382,7 +382,7 @@ function jiraConfig (macroName, parent, projectKey, attrs, logger) { // Rule R26 ----> _jiraconfigRuleExecuted = true // Trace ----> - logger.info(`jiraConfig - 20240128.104307 - 26 / 36 - ${JSON.stringify(_jiraConfig)}`) + logger.info(`jiraConfig - 20240305.113409 - 26 / 36 - ${JSON.stringify(_jiraConfig)}`) // Trace <---- // Action A03/09: set auth / PENV_PAT / personal access token via env with project key prefix _jiraConfig.auth = 'Bearer ' + process.env[`${projectKey.toUpperCase()}_${_prefixEnv}JIRA_PAT`] @@ -395,7 +395,7 @@ function jiraConfig (macroName, parent, projectKey, attrs, logger) { // Rule R27 ----> _jiraconfigRuleExecuted = true // Trace ----> - logger.info(`jiraConfig - 20240128.104307 - 27 / 36 - ${JSON.stringify(_jiraConfig)}`) + logger.info(`jiraConfig - 20240305.113409 - 27 / 36 - ${JSON.stringify(_jiraConfig)}`) // Trace <---- // Action A03/10: set auth / ENV_PAT / personal access token via env without project key prefix _jiraConfig.auth = 'Bearer ' + process.env[`${_prefixEnv}JIRA_PAT`] @@ -406,7 +406,7 @@ function jiraConfig (macroName, parent, projectKey, attrs, logger) { // Rule R28 ----> _jiraconfigRuleExecuted = true // Trace ----> - logger.info(`jiraConfig - 20240128.104307 - 28 / 36 - ${JSON.stringify(_jiraConfig)}`) + logger.info(`jiraConfig - 20240305.113409 - 28 / 36 - ${JSON.stringify(_jiraConfig)}`) // Trace <---- // Action A04/02: log mandatory information is missing / USR/PAT / Jira username or personal access token is missing logger.error('Jira username or personal access token is missing') @@ -425,10 +425,10 @@ function jiraConfig (macroName, parent, projectKey, attrs, logger) { // Rule R29 ----> _jiraconfigRuleExecuted = true // Trace ----> - logger.info(`jiraConfig - 20240128.104307 - 29 / 36 - ${JSON.stringify(_jiraConfig)}`) + logger.info(`jiraConfig - 20240305.113409 - 29 / 36 - ${JSON.stringify(_jiraConfig)}`) // Trace <---- // Action A03/03: set auth / DOC_USR_PWD / username via doc attr and password via env without project key prefix - _jiraConfig.auth = 'Basic ' + Buffer.from(doc.getAttribute(`${_prefixDoc}jira-username`) + ':' + process.env[`_${_prefixEnv}JIRA_PASSWORD`]).toString('base64') + _jiraConfig.auth = 'Basic ' + Buffer.from(doc.getAttribute(`${_prefixDoc}jira-username`) + ':' + process.env[`${_prefixEnv}JIRA_PASSWORD`]).toString('base64') // Action A05/02: next step / E / Exit _exit = true // Rule R29 <---- @@ -438,10 +438,10 @@ function jiraConfig (macroName, parent, projectKey, attrs, logger) { // Rule R30 ----> _jiraconfigRuleExecuted = true // Trace ----> - logger.info(`jiraConfig - 20240128.104307 - 30 / 36 - ${JSON.stringify(_jiraConfig)}`) + logger.info(`jiraConfig - 20240305.113409 - 30 / 36 - ${JSON.stringify(_jiraConfig)}`) // Trace <---- // Action A03/04: set auth / DOC_USR_API / username via doc attr and api token via env without project key prefix - _jiraConfig.auth = 'Basic ' + Buffer.from(doc.getAttribute(`${_prefixDoc}jira-username`) + ':' + process.env[`_${_prefixEnv}JIRA_APITOKEN`]).toString('base64') + _jiraConfig.auth = 'Basic ' + Buffer.from(doc.getAttribute(`${_prefixDoc}jira-username`) + ':' + process.env[`${_prefixEnv}JIRA_APITOKEN`]).toString('base64') // Action A05/02: next step / E / Exit _exit = true // Rule R30 <---- @@ -449,7 +449,7 @@ function jiraConfig (macroName, parent, projectKey, attrs, logger) { // Rule R31 ----> _jiraconfigRuleExecuted = true // Trace ----> - logger.info(`jiraConfig - 20240128.104307 - 31 / 36 - ${JSON.stringify(_jiraConfig)}`) + logger.info(`jiraConfig - 20240305.113409 - 31 / 36 - ${JSON.stringify(_jiraConfig)}`) // Trace <---- // Action A04/03: log mandatory information is missing / PWD/API / Jira password or api token is missing logger.error('Jira password or api token is missing') @@ -458,14 +458,14 @@ function jiraConfig (macroName, parent, projectKey, attrs, logger) { // Rule R31 <---- } } - // Condition B07/02: username without project key prefix is defined / ENV / via env + // Condition B07/02: username without project key prefix is defined / ENV / via env } else if (process.env[`${_prefixEnv}JIRA_USERNAME`]) { // Condition B09/01: password without project key prefix is defined / ENV / via env if (process.env[`${_prefixEnv}JIRA_PASSWORD`]) { // Rule R32 ----> _jiraconfigRuleExecuted = true // Trace ----> - logger.info(`jiraConfig - 20240128.104307 - 32 / 36 - ${JSON.stringify(_jiraConfig)}`) + logger.info(`jiraConfig - 20240305.113409 - 32 / 36 - ${JSON.stringify(_jiraConfig)}`) // Trace <---- // Action A03/07: set auth / ENV_USR_PWD / username and password via env without project key prefix _jiraConfig.auth = 'Basic ' + Buffer.from(process.env[`${_prefixEnv}JIRA_USERNAME`] + ':' + process.env[`${_prefixEnv}JIRA_PASSWORD`]).toString('base64') @@ -478,7 +478,7 @@ function jiraConfig (macroName, parent, projectKey, attrs, logger) { // Rule R33 ----> _jiraconfigRuleExecuted = true // Trace ----> - logger.info(`jiraConfig - 20240128.104307 - 33 / 36 - ${JSON.stringify(_jiraConfig)}`) + logger.info(`jiraConfig - 20240305.113409 - 33 / 36 - ${JSON.stringify(_jiraConfig)}`) // Trace <---- // Action A03/08: set auth / ENV_USR_API / username and api token via env without project key prefix _jiraConfig.auth = 'Basic ' + Buffer.from(process.env[`${_prefixEnv}JIRA_USERNAME`] + ':' + process.env[`${_prefixEnv}JIRA_APITOKEN`]).toString('base64') @@ -489,7 +489,7 @@ function jiraConfig (macroName, parent, projectKey, attrs, logger) { // Rule R34 ----> _jiraconfigRuleExecuted = true // Trace ----> - logger.info(`jiraConfig - 20240128.104307 - 34 / 36 - ${JSON.stringify(_jiraConfig)}`) + logger.info(`jiraConfig - 20240305.113409 - 34 / 36 - ${JSON.stringify(_jiraConfig)}`) // Trace <---- // Action A04/03: log mandatory information is missing / PWD/API / Jira password or api token is missing logger.error('Jira password or api token is missing') @@ -504,7 +504,7 @@ function jiraConfig (macroName, parent, projectKey, attrs, logger) { // Rule R35 ----> _jiraconfigRuleExecuted = true // Trace ----> - logger.info(`jiraConfig - 20240128.104307 - 35 / 36 - ${JSON.stringify(_jiraConfig)}`) + logger.info(`jiraConfig - 20240305.113409 - 35 / 36 - ${JSON.stringify(_jiraConfig)}`) // Trace <---- // Action A03/10: set auth / ENV_PAT / personal access token via env without project key prefix _jiraConfig.auth = 'Bearer ' + process.env[`${_prefixEnv}JIRA_PAT`] @@ -515,7 +515,7 @@ function jiraConfig (macroName, parent, projectKey, attrs, logger) { // Rule R36 ----> _jiraconfigRuleExecuted = true // Trace ----> - logger.info(`jiraConfig - 20240128.104307 - 36 / 36 - ${JSON.stringify(_jiraConfig)}`) + logger.info(`jiraConfig - 20240305.113409 - 36 / 36 - ${JSON.stringify(_jiraConfig)}`) // Trace <---- // Action A04/02: log mandatory information is missing / USR/PAT / Jira username or personal access token is missing logger.error('Jira username or personal access token is missing') @@ -529,11 +529,11 @@ function jiraConfig (macroName, parent, projectKey, attrs, logger) { if (!_jiraconfigRuleExecuted) { // Trace ----> - logger.info(`jiraConfig - 20240128.104307 - 0 / 36 - ${JSON.stringify(_jiraConfig)}`) + logger.info(`jiraConfig - 20240305.113409 - 0 / 36 - ${JSON.stringify(_jiraConfig)}`) // Trace <---- // Error ----> // profile LFET.JavaScript.Error.ini not found - // used LF-ET 2.3.0 (231102a) build in default + // used LF-ET 2.3.0 (240304A) build in default throw new Error("no rule executed in decision table 'jiraConfig'") // Error <---- } @@ -550,4 +550,4 @@ module.exports = { // Epilog Decision Table <---- // End of generated JavaScript source code -// Generated by LF-ET 2.3.0 (231102a), https://www.lohrfink.de/lfet +// Generated by LF-ET 2.3.0 (240304A), https://www.lohrfink.de/lfet