Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 1.0.6 #10

Merged
merged 1 commit into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions 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.5",
"version": "1.0.6",
"rules": [
{
"id": "dv-rule-annotations-001",
Expand Down Expand Up @@ -150,7 +150,7 @@
"description": "All success/error JSON nodes should proper colors",
"message": "Incorrect node color [%] - %",
"type": "best-practice",
"recommendation": "The [%] - % is not using the correct color. To ensure consistency, use the recommended color: [%].",
"recommendation": "The <%> is not using the correct color. To ensure consistency, use the recommended color: [%].",
"code": "dv-bp-node-002"
},
"dv-bp-node-003": {
Expand Down Expand Up @@ -201,7 +201,7 @@
"description": "Incorrect ending nodes for PingOne flow.",
"message": "Incorrect ending nodes for PingOne flow.",
"type": "error",
"recommendation": "This PingOne-enabled flow is missing an appropriate ending node. These flows should conclude with either a 'Return a Success Response' node or a 'Return an Error Response' node.",
"recommendation": "This PingOne-enabled flow is missing appropriate ending nodes. These flows should conclude with either a 'Return Success Response (Redirect Flows)' node or a 'Return Error Response (Redirect Flows)' node of the PingOne Authentication connector.",
"code": "dv-er-pingOneFlow-001"
}
},
Expand All @@ -227,8 +227,8 @@
"code": "dv-er-subflow-002"
},
"dv-er-subflow-003": {
"description": "Missing Input schema values.",
"message": "Input Schema values '%' for '%' subflow is not configured in main flow.",
"description": "Missing Input schema values",
"message": "Input Schema values for '%' subflow is not configured.",
"type": "error",
"recommendation": "The input schema values for the '%' subflow are not currently configured. Configure the schema in the subflow.",
"code": "dv-er-subflow-003"
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.

4 changes: 2 additions & 2 deletions 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.5",
"version": "1.0.6",
"description": "Collection of base rules used to lint DaVinci flows.",
"main": "RulePack.js",
"scripts": {
Expand Down Expand Up @@ -37,4 +37,4 @@
"dependencies": {
"@ping-identity/dvlint": "^1.0.3"
}
}
}
4 changes: 2 additions & 2 deletions rules/dv-rule-node-001/NodeRule.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class NodeRule extends LintRule {
description: "All success/error JSON nodes should proper colors",
message: "Incorrect node color [%] - %",
type: "best-practice",
recommendation: "The [%] - % is not using the correct color. To ensure consistency, use the recommended color: [%].",
recommendation: "The <%> is not using the correct color. To ensure consistency, use the recommended color: [%].",
});
this.addCode("dv-bp-node-003", {
description: "All nodes should have a description",
Expand Down Expand Up @@ -95,7 +95,7 @@ class NodeRule extends LintRule {
data.properties?.backgroundColor?.value.toLowerCase(),
`${data.name} (${data.id}) - ${data.capabilityName}`,
],
recommendationArgs: [backgroundColor[connectorCapability], `${data.name} (${data.id}) - ${data.capabilityName}`],
recommendationArgs: [`${data.name} (${data.id}) - ${data.capabilityName}`, backgroundColor[connectorCapability]],
nodeId: data.id,
});
}
Expand Down
4 changes: 2 additions & 2 deletions rules/dv-rule-pingOneFlow-001/PingOneFlowRule.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class PingOneFlowRule extends LintRule {
description: "Incorrect ending nodes for PingOne flow.",
message: "Incorrect ending nodes for PingOne flow.",
type: "error",
recommendation: "This PingOne-enabled flow is missing an appropriate ending node. These flows should conclude with either a 'Return a Success Response' node or a 'Return an Error Response' node."
recommendation: "This PingOne-enabled flow is missing appropriate ending nodes. These flows should conclude with either a 'Return Success Response (Redirect Flows)' node or a 'Return Error Response (Redirect Flows)' node of the PingOne Authentication connector."
});
}

Expand All @@ -22,7 +22,7 @@ class PingOneFlowRule extends LintRule {

// Incorrect ending nodes for PingOne flow
if (targetFlow?.settings?.pingOneFlow) {
const endNodesCapability = ['createErrorResponse', 'createSuccessResponse'];
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 Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"code": "dv-er-pingOneFlow-001",
"message": "Incorrect ending nodes for PingOne flow.",
"type": "error",
"recommendation": "This PingOne-enabled flow is missing an appropriate ending node. These flows should conclude with either a 'Return a Success Response' node or a 'Return an Error Response' node."
"recommendation": "This PingOne-enabled flow is missing appropriate ending nodes. These flows should conclude with either a 'Return Success Response (Redirect Flows)' node or a 'Return Error Response (Redirect Flows)' node of the PingOne Authentication connector."
}
],
"rulesApplied": [
Expand All @@ -34,7 +34,7 @@
"code": "dv-er-pingOneFlow-001",
"message": "Incorrect ending nodes for PingOne flow.",
"type": "error",
"recommendation": "This PingOne-enabled flow is missing an appropriate ending node. These flows should conclude with either a 'Return a Success Response' node or a 'Return an Error Response' node."
"recommendation": "This PingOne-enabled flow is missing appropriate ending nodes. These flows should conclude with either a 'Return Success Response (Redirect Flows)' node or a 'Return Error Response (Redirect Flows)' node of the PingOne Authentication connector."
}
]
}
Expand Down
Loading