From 68ed34dff03229038fa80bc5f7424d79ccd346c1 Mon Sep 17 00:00:00 2001 From: Terry Sigle Date: Fri, 20 Sep 2024 06:15:06 -0400 Subject: [PATCH] CLOUD-390 - Moving private methods to public to resolve issues with some loaders --- lib/LintResult.js | 6 +++--- lib/LintRulePack.js | 12 ++++++------ lib/PingOneDaVinciLinter.js | 4 ++-- package-lock.json | 4 ++-- package.json | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/lib/LintResult.js b/lib/LintResult.js index afe4800..f6ebbc2 100644 --- a/lib/LintResult.js +++ b/lib/LintResult.js @@ -23,7 +23,7 @@ class LintResult { * message and recommendation arguments into the message and recommendation * strings based on the percent (%) character. */ - #getMessageObj(code, messageArgs, recommendationArgs, nodeId) { + getMessageObj(code, messageArgs, recommendationArgs, nodeId) { const messageObj = { code: code.code, message: sprintf(code?.message, ...messageArgs), @@ -39,7 +39,7 @@ class LintResult { addError(code, props = {}) { if (code) { this.errors.push( - this.#getMessageObj( + this.getMessageObj( code, props.messageArgs || [], props.recommendationArgs || [], @@ -48,7 +48,7 @@ class LintResult { ); } else { this.errors.push( - this.#getMessageObj( + this.getMessageObj( { code: "generic-error", description: diff --git a/lib/LintRulePack.js b/lib/LintRulePack.js index 4109433..5b10632 100644 --- a/lib/LintRulePack.js +++ b/lib/LintRulePack.js @@ -109,7 +109,7 @@ class LintRulePack { }); const config = { - header: this.#getTableHeader(), + header: this.getTableHeader(), columns: { 0: { width: 24 }, 1: { @@ -134,7 +134,7 @@ class LintRulePack { return this.getRules(); } - #getTableHeader() { + getTableHeader() { return { alignment: "center", content: @@ -169,7 +169,7 @@ class LintRulePack { }); const config = { - header: this.#getTableHeader(), + header: this.getTableHeader(), columns: { 2: { wrapWord: true, @@ -191,7 +191,7 @@ class LintRulePack { /** * handleGetTableProps */ - #handleGetTableProps(props) { + handleGetTableProps(props) { if (props?.color === false) { color.disable(); } @@ -203,7 +203,7 @@ class LintRulePack { getResultTable(props) { const data = []; const spanningCells = []; - this.#handleGetTableProps(props); + this.handleGetTableProps(props); let row = 0; // HEADER @@ -276,7 +276,7 @@ class LintRulePack { }); const config = { - header: this.#getTableHeader(), + header: this.getTableHeader(), columns: { 0: { width: 6, diff --git a/lib/PingOneDaVinciLinter.js b/lib/PingOneDaVinciLinter.js index 3971b85..68e7aed 100644 --- a/lib/PingOneDaVinciLinter.js +++ b/lib/PingOneDaVinciLinter.js @@ -69,7 +69,7 @@ class PingOneDaVinciLinter { * * @param {*} flow */ - #setFlow(flow) { + setFlow(flow) { this.allFlows = []; if (!flow) { @@ -142,7 +142,7 @@ class PingOneDaVinciLinter { * @returns */ lintFlow(flow, props = {}) { - this.#setFlow(flow); + this.setFlow(flow); const ruleProps = props; try { diff --git a/package-lock.json b/package-lock.json index 155d871..05b02c6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@ping-identity/dvlint", - "version": "1.0.0", + "version": "1.0.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@ping-identity/dvlint", - "version": "1.0.0", + "version": "1.0.2", "license": "Apache License 2.0", "dependencies": { "colors": "^1.4.0", diff --git a/package.json b/package.json index 74c867e..674431c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ping-identity/dvlint", - "version": "1.0.1", + "version": "1.0.2", "description": "PingOne DaVinci Flow Linter", "homepage": "https://library.pingidentity.com/page/davinci-linter-cli", "main": "lib/index.js",