Skip to content

Commit

Permalink
Release 1.1.0 (#16)
Browse files Browse the repository at this point in the history
* bump version

* Update rules.json

* CLOUD-571 - Missed a couple of addErrors

---------

Co-authored-by: GitHub Action <[email protected]>
  • Loading branch information
tsigle and actions-user authored Dec 5, 2024
1 parent 1898501 commit 8b96cd9
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/rules.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{
"name": "@ping-identity/dvlint-base-rule-pack",
"description": "Collection of base rules used to lint DaVinci flows.",
"version": "1.0.9",
"version": "1.1.0",
"rules": [
{
"id": "dv-rule-annotations-001",
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ping-identity/dvlint-base-rule-pack",
"version": "1.0.9",
"version": "1.1.0",
"description": "Collection of base rules used to lint DaVinci flows.",
"main": "RulePack.js",
"scripts": {
Expand Down
2 changes: 2 additions & 0 deletions rules/dv-rule-node-002/DisabledNodeRule.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class DisabledNodeRule extends LintRule {

if (data.isDisabled === true) {
this.addError("dv-er-node-001", {
flowId: flow.flowId,
messageArgs: [`(${data.id})`],
recommendationArgs: [`(${data.id})`],
nodeId: data.id,
Expand All @@ -41,6 +42,7 @@ class DisabledNodeRule extends LintRule {
if (data.status === 'unconfigured') {
const connectorInstanceName = data.name.toLowerCase().includes('connector') ? data.name : data.name + ' connector';
this.addError("dv-er-node-002", {
flowId: flow.flowId,
recommendationArgs: [`${connectorInstanceName}`],
nodeId: data.id,
});
Expand Down
3 changes: 2 additions & 1 deletion rules/dv-rule-pingOneFlow-001/PingOneFlowRule.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class PingOneFlowRule extends LintRule {

// Incorrect ending nodes for PingOne flow
if (targetFlow?.settings?.pingOneFlow) {
const endNodesCapability = ['returnSuccessResponseRedirect', 'returnErrorResponseRedirect'];
const endNodesCapability = ['returnSuccessResponseRedirect', 'returnErrorResponseRedirect'];
const endNodesData = targetFlow.graphData.elements.nodes?.filter(node => endNodesCapability.includes(node.data.capabilityName)) || [];
const nodeIdMap = endNodesData.map(node => node.data.id);
const nodeSourceMap = targetFlow.graphData.elements.edges?.map(edge => edge.data.source) || [];
Expand All @@ -34,6 +34,7 @@ class PingOneFlowRule extends LintRule {
});
if (!validEndNode) {
this.addError("dv-er-pingOneFlow-001", {
flowId: targetFlow.flowId,
messageArgs: [targetFlow.name],
});
}
Expand Down

0 comments on commit 8b96cd9

Please sign in to comment.