@camunda/linting 1.1.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/utils/error-messages.js +20 -0
- package/package.json +3 -3
|
@@ -123,6 +123,10 @@ export function getErrorMessage(report, executionPlatform, executionPlatformVers
|
|
|
123
123
|
return getExpressionNotAllowedErrorMessage(report);
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
+
if (type === ERROR_TYPES.EVENT_BASED_GATEWAY_TARGET_NOT_ALLOWED) {
|
|
127
|
+
return getEventBasedGatewayTargetNotAllowedErrorMessage(report);
|
|
128
|
+
}
|
|
129
|
+
|
|
126
130
|
return message;
|
|
127
131
|
}
|
|
128
132
|
|
|
@@ -353,6 +357,10 @@ function getPropertyNotAllowedErrorMessage(report, executionPlatform, executionP
|
|
|
353
357
|
return getSupportedMessage(`${ getIndefiniteArticle(typeString) } <${ typeString }> with defined <Candidate users>`, executionPlatform, executionPlatformVersion, allowedVersion);
|
|
354
358
|
}
|
|
355
359
|
|
|
360
|
+
if (is(node, 'bpmn:SequenceFlow') && property === 'conditionExpression') {
|
|
361
|
+
return `${ getIndefiniteArticle(typeString) } <${ typeString }> with <Condition expression> is only supported if the source is an <Exclusive Gateway> or <Inclusive Gateway>`;
|
|
362
|
+
}
|
|
363
|
+
|
|
356
364
|
return message;
|
|
357
365
|
}
|
|
358
366
|
|
|
@@ -555,5 +563,17 @@ function getExpressionNotAllowedErrorMessage(report) {
|
|
|
555
563
|
return 'Error code used in a catch event must be a static value';
|
|
556
564
|
}
|
|
557
565
|
|
|
566
|
+
return report.message;
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
function getEventBasedGatewayTargetNotAllowedErrorMessage(report) {
|
|
570
|
+
const { data } = report;
|
|
571
|
+
|
|
572
|
+
const { node } = data;
|
|
573
|
+
|
|
574
|
+
if (is(node, 'bpmn:ReceiveTask')) {
|
|
575
|
+
return 'A <Receive Task> cannot be the target of an <Event-Based Gateway>';
|
|
576
|
+
}
|
|
577
|
+
|
|
558
578
|
return report.message;
|
|
559
579
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camunda/linting",
|
|
3
|
-
"version": "1.1
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"description": "Linting for Camunda Platform",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -29,10 +29,11 @@
|
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"bpmn-moddle": "^8.0.0",
|
|
31
31
|
"bpmnlint": "^8.0.0",
|
|
32
|
-
"bpmnlint-plugin-camunda-compat": "^1.
|
|
32
|
+
"bpmnlint-plugin-camunda-compat": "^1.2.0",
|
|
33
33
|
"bpmnlint-utils": "^1.0.2",
|
|
34
34
|
"min-dash": "^4.0.0",
|
|
35
35
|
"min-dom": "^4.1.0",
|
|
36
|
+
"modeler-moddle": "^0.2.0",
|
|
36
37
|
"zeebe-bpmn-moddle": "^0.18.0"
|
|
37
38
|
},
|
|
38
39
|
"devDependencies": {
|
|
@@ -52,7 +53,6 @@
|
|
|
52
53
|
"karma-webpack": "^5.0.0",
|
|
53
54
|
"mocha": "^10.2.0",
|
|
54
55
|
"mocha-test-container-support": "^0.2.0",
|
|
55
|
-
"modeler-moddle": "^0.2.0",
|
|
56
56
|
"puppeteer": "^19.5.2",
|
|
57
57
|
"sinon": "^15.0.1",
|
|
58
58
|
"sinon-chai": "^3.7.0",
|