bpmnlint-plugin-camunda-compat 2.37.0 → 2.38.0
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/index.js
CHANGED
|
@@ -11,6 +11,7 @@ const camundaCloud10Rules = withConfig({
|
|
|
11
11
|
'executable-process': 'error',
|
|
12
12
|
'loop-characteristics': 'error',
|
|
13
13
|
'message-reference': 'error',
|
|
14
|
+
'io-mapping': 'error',
|
|
14
15
|
'no-binding-type': 'error',
|
|
15
16
|
'no-candidate-users': 'error',
|
|
16
17
|
'no-execution-listeners': 'error',
|
|
@@ -157,6 +158,7 @@ const rules = {
|
|
|
157
158
|
'inclusive-gateway': './rules/camunda-cloud/inclusive-gateway',
|
|
158
159
|
'link-event': './rules/camunda-cloud/link-event',
|
|
159
160
|
'loop-characteristics': './rules/camunda-cloud/loop-characteristics',
|
|
161
|
+
'io-mapping': './rules/camunda-cloud/io-mapping',
|
|
160
162
|
'message-reference': './rules/camunda-cloud/message-reference',
|
|
161
163
|
'no-binding-type': './rules/camunda-cloud/no-binding-type',
|
|
162
164
|
'no-candidate-users': './rules/camunda-cloud/no-candidate-users',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bpmnlint-plugin-camunda-compat",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.38.0",
|
|
4
4
|
"description": "A bpmnlint plug-in for Camunda compatibility",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -37,8 +37,9 @@
|
|
|
37
37
|
"zeebe-bpmn-moddle": "^1.9.0"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@bpmn-io/feel-lint": "^
|
|
40
|
+
"@bpmn-io/feel-lint": "^2.0.0",
|
|
41
41
|
"@bpmn-io/moddle-utils": "^0.2.1",
|
|
42
|
+
"@camunda/feel-builtins": "^0.2.0",
|
|
42
43
|
"bpmnlint-utils": "^1.1.1",
|
|
43
44
|
"min-dash": "^4.1.1",
|
|
44
45
|
"semver-compare": "^1.0.0"
|
|
@@ -15,6 +15,7 @@ const { ERROR_TYPES } = require('../utils/error-types');
|
|
|
15
15
|
|
|
16
16
|
const { skipInNonExecutableProcess } = require('../utils/rule');
|
|
17
17
|
const { annotateRule } = require('../helper');
|
|
18
|
+
const { camundaBuiltins } = require('@camunda/feel-builtins');
|
|
18
19
|
|
|
19
20
|
module.exports = skipInNonExecutableProcess(function() {
|
|
20
21
|
function check(node, reporter) {
|
|
@@ -37,7 +38,8 @@ module.exports = skipInNonExecutableProcess(function() {
|
|
|
37
38
|
|
|
38
39
|
if (isFeelProperty([ propertyName, propertyValue ])) {
|
|
39
40
|
const lintErrors = lintExpression(propertyValue.substring(1), {
|
|
40
|
-
parserDialect: 'camunda'
|
|
41
|
+
parserDialect: 'camunda',
|
|
42
|
+
builtins: camundaBuiltins
|
|
41
43
|
});
|
|
42
44
|
|
|
43
45
|
// syntax error
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
const { findExtensionElement, hasProperties } = require('../utils/element');
|
|
2
|
+
const { reportErrors } = require('../utils/reporter');
|
|
3
|
+
const { skipInNonExecutableProcess } = require('../utils/rule');
|
|
4
|
+
const { greaterOrEqual } = require('../utils/version');
|
|
5
|
+
|
|
6
|
+
const ALLOWED_VERSION_NO_INPUT_SOURCE = '8.7';
|
|
7
|
+
|
|
8
|
+
module.exports = skipInNonExecutableProcess(function({ version }) {
|
|
9
|
+
function check(node, reporter) {
|
|
10
|
+
const ioMapping = findExtensionElement(node, 'zeebe:IoMapping');
|
|
11
|
+
|
|
12
|
+
if (!ioMapping) {
|
|
13
|
+
return [];
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const errors = [];
|
|
17
|
+
|
|
18
|
+
const inputParameters = ioMapping.get('inputParameters');
|
|
19
|
+
errors.push(...inputParameters.flatMap((parameter) => hasProperties(parameter, {
|
|
20
|
+
source: {
|
|
21
|
+
required: !greaterOrEqual(version, ALLOWED_VERSION_NO_INPUT_SOURCE),
|
|
22
|
+
allowedVersion: ALLOWED_VERSION_NO_INPUT_SOURCE
|
|
23
|
+
},
|
|
24
|
+
target: {
|
|
25
|
+
required: true
|
|
26
|
+
}
|
|
27
|
+
}, node)));
|
|
28
|
+
|
|
29
|
+
const outputParameters = ioMapping.get('outputParameters');
|
|
30
|
+
errors.push(...outputParameters.flatMap((parameter) => hasProperties(parameter, {
|
|
31
|
+
source: {
|
|
32
|
+
required: true
|
|
33
|
+
},
|
|
34
|
+
target: {
|
|
35
|
+
required: true
|
|
36
|
+
}
|
|
37
|
+
}, node)));
|
|
38
|
+
|
|
39
|
+
if (errors.length) {
|
|
40
|
+
reportErrors(node, reporter, errors);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
}
|
|
44
|
+
return { check };
|
|
45
|
+
});
|
|
@@ -13,6 +13,7 @@ const { reportErrors } = require('../utils/reporter');
|
|
|
13
13
|
const { ERROR_TYPES } = require('../utils/error-types');
|
|
14
14
|
|
|
15
15
|
const { skipInNonExecutableProcess } = require('../utils/rule');
|
|
16
|
+
const { annotateRule } = require('../helper');
|
|
16
17
|
|
|
17
18
|
/**
|
|
18
19
|
* @typedef {import('bpmn-moddle').BaseElement} ModdleElement
|
|
@@ -61,9 +62,9 @@ module.exports = skipInNonExecutableProcess(function() {
|
|
|
61
62
|
}
|
|
62
63
|
}
|
|
63
64
|
|
|
64
|
-
return {
|
|
65
|
+
return annotateRule('no-loop', {
|
|
65
66
|
check
|
|
66
|
-
};
|
|
67
|
+
});
|
|
67
68
|
});
|
|
68
69
|
|
|
69
70
|
/**
|
package/rules/helper.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const modelingGuidanceBaseUrl = 'https://docs.camunda.io/docs/
|
|
1
|
+
const modelingGuidanceBaseUrl = 'https://docs.camunda.io/docs/components/modeler/reference/modeling-guidance/rules';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @typedef { any } RuleDefinition
|