bpmnlint-plugin-camunda-compat 2.32.0 → 2.33.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/package.json +3 -3
- package/rules/camunda-cloud/called-element.js +4 -2
- package/rules/camunda-cloud/element-type/index.js +4 -2
- package/rules/camunda-cloud/error-reference.js +3 -2
- package/rules/camunda-cloud/escalation-reference.js +3 -2
- package/rules/camunda-cloud/feel.js +3 -2
- package/rules/camunda-cloud/message-reference.js +3 -2
- package/rules/camunda-cloud/zeebe-user-task.js +5 -0
- package/rules/camunda-platform/history-time-to-live.js +4 -2
- package/rules/helper.js +39 -0
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "bpmnlint-plugin-camunda-compat",
|
3
|
-
"version": "2.
|
3
|
+
"version": "2.33.0",
|
4
4
|
"description": "A bpmnlint plug-in for Camunda compatibility",
|
5
5
|
"main": "index.js",
|
6
6
|
"scripts": {
|
@@ -25,11 +25,11 @@
|
|
25
25
|
"license": "MIT",
|
26
26
|
"devDependencies": {
|
27
27
|
"bpmn-moddle": "^9.0.1",
|
28
|
-
"bpmnlint": "^11.
|
28
|
+
"bpmnlint": "^11.2.0",
|
29
29
|
"camunda-bpmn-moddle": "^7.0.1",
|
30
30
|
"chai": "^4.4.1",
|
31
31
|
"eslint": "^9.20.1",
|
32
|
-
"eslint-plugin-bpmn-io": "^2.
|
32
|
+
"eslint-plugin-bpmn-io": "^2.2.0",
|
33
33
|
"mocha": "^10.2.0",
|
34
34
|
"modeler-moddle": "^0.2.0",
|
35
35
|
"sinon": "^17.0.1",
|
@@ -6,6 +6,8 @@ const {
|
|
6
6
|
hasProperties
|
7
7
|
} = require('../utils/element');
|
8
8
|
|
9
|
+
const { annotateRule } = require('../helper');
|
10
|
+
|
9
11
|
const { reportErrors } = require('../utils/reporter');
|
10
12
|
|
11
13
|
const { skipInNonExecutableProcess } = require('../utils/rule');
|
@@ -37,7 +39,7 @@ module.exports = skipInNonExecutableProcess(function() {
|
|
37
39
|
}
|
38
40
|
}
|
39
41
|
|
40
|
-
return {
|
42
|
+
return annotateRule('called-element', {
|
41
43
|
check
|
42
|
-
};
|
44
|
+
});
|
43
45
|
});
|
@@ -14,6 +14,8 @@ const { reportErrors } = require('../../utils/reporter');
|
|
14
14
|
|
15
15
|
const { skipInNonExecutableProcess } = require('../../utils/rule');
|
16
16
|
|
17
|
+
const { annotateRule } = require('../../helper');
|
18
|
+
|
17
19
|
module.exports = skipInNonExecutableProcess(function({ version }) {
|
18
20
|
function check(node, reporter) {
|
19
21
|
if (!isAny(node, [ 'bpmn:FlowElement', 'bpmn:FlowElementsContainer' ])) {
|
@@ -128,7 +130,7 @@ module.exports = skipInNonExecutableProcess(function({ version }) {
|
|
128
130
|
}
|
129
131
|
}
|
130
132
|
|
131
|
-
return {
|
133
|
+
return annotateRule('element-type', {
|
132
134
|
check
|
133
|
-
};
|
135
|
+
});
|
134
136
|
});
|
@@ -13,6 +13,7 @@ const { reportErrors } = require('../utils/reporter');
|
|
13
13
|
const { skipInNonExecutableProcess } = require('../utils/rule');
|
14
14
|
|
15
15
|
const { greaterOrEqual } = require('../utils/version');
|
16
|
+
const { annotateRule } = require('../helper');
|
16
17
|
|
17
18
|
const noErrorRefAllowedVersion = '8.2';
|
18
19
|
|
@@ -62,9 +63,9 @@ module.exports = skipInNonExecutableProcess(function({ version }) {
|
|
62
63
|
}
|
63
64
|
}
|
64
65
|
|
65
|
-
return {
|
66
|
+
return annotateRule('error-reference', {
|
66
67
|
check
|
67
|
-
};
|
68
|
+
});
|
68
69
|
});
|
69
70
|
|
70
71
|
function isNoErrorRefAllowed(node, version) {
|
@@ -11,6 +11,7 @@ const {
|
|
11
11
|
const { reportErrors } = require('../utils/reporter');
|
12
12
|
|
13
13
|
const { skipInNonExecutableProcess } = require('../utils/rule');
|
14
|
+
const { annotateRule } = require('../helper');
|
14
15
|
|
15
16
|
module.exports = skipInNonExecutableProcess(function() {
|
16
17
|
function check(node, reporter) {
|
@@ -57,9 +58,9 @@ module.exports = skipInNonExecutableProcess(function() {
|
|
57
58
|
}
|
58
59
|
}
|
59
60
|
|
60
|
-
return {
|
61
|
+
return annotateRule('escalation-reference', {
|
61
62
|
check
|
62
|
-
};
|
63
|
+
});
|
63
64
|
});
|
64
65
|
|
65
66
|
function isNoEscalationRefAllowed(node) {
|
@@ -14,6 +14,7 @@ const { reportErrors } = require('../utils/reporter');
|
|
14
14
|
const { ERROR_TYPES } = require('../utils/error-types');
|
15
15
|
|
16
16
|
const { skipInNonExecutableProcess } = require('../utils/rule');
|
17
|
+
const { annotateRule } = require('../helper');
|
17
18
|
|
18
19
|
module.exports = skipInNonExecutableProcess(function() {
|
19
20
|
function check(node, reporter) {
|
@@ -64,9 +65,9 @@ module.exports = skipInNonExecutableProcess(function() {
|
|
64
65
|
}
|
65
66
|
}
|
66
67
|
|
67
|
-
return {
|
68
|
+
return annotateRule('feel', {
|
68
69
|
check
|
69
|
-
};
|
70
|
+
});
|
70
71
|
});
|
71
72
|
|
72
73
|
const isFeelProperty = ([ propertyName, value ]) => {
|
@@ -11,6 +11,7 @@ const {
|
|
11
11
|
const { reportErrors } = require('../utils/reporter');
|
12
12
|
|
13
13
|
const { skipInNonExecutableProcess } = require('../utils/rule');
|
14
|
+
const { annotateRule } = require('../helper');
|
14
15
|
|
15
16
|
module.exports = skipInNonExecutableProcess(function() {
|
16
17
|
function check(node, reporter) {
|
@@ -55,7 +56,7 @@ module.exports = skipInNonExecutableProcess(function() {
|
|
55
56
|
}
|
56
57
|
}
|
57
58
|
|
58
|
-
return {
|
59
|
+
return annotateRule('message-reference', {
|
59
60
|
check
|
60
|
-
};
|
61
|
+
});
|
61
62
|
});
|
@@ -1,5 +1,7 @@
|
|
1
1
|
const { is } = require('bpmnlint-utils');
|
2
2
|
|
3
|
+
const { annotateRule } = require('../helper');
|
4
|
+
|
3
5
|
const { skipInNonExecutableProcess } = require('../utils/rule');
|
4
6
|
|
5
7
|
module.exports = skipInNonExecutableProcess(function() {
|
@@ -14,7 +16,7 @@ module.exports = skipInNonExecutableProcess(function() {
|
|
14
16
|
}
|
15
17
|
}
|
16
18
|
|
17
|
-
return {
|
19
|
+
return annotateRule('history-time-to-live', {
|
18
20
|
check
|
19
|
-
};
|
21
|
+
});
|
20
22
|
});
|
package/rules/helper.js
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
const modelingGuidanceBaseUrl = 'https://docs.camunda.io/docs/next/components/modeler/reference/modeling-guidance/rules';
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @typedef { any } RuleDefinition
|
5
|
+
*/
|
6
|
+
|
7
|
+
/**
|
8
|
+
* Annotate a rule with core information, such as the documentation url.
|
9
|
+
*
|
10
|
+
* @param { string } ruleName
|
11
|
+
* @param { RuleDefinition } options
|
12
|
+
*
|
13
|
+
* @return { RuleDefinition }
|
14
|
+
*/
|
15
|
+
function annotateRule(ruleName, options) {
|
16
|
+
|
17
|
+
const {
|
18
|
+
meta: {
|
19
|
+
documentation = {},
|
20
|
+
...restMeta
|
21
|
+
} = {},
|
22
|
+
...restOptions
|
23
|
+
} = options;
|
24
|
+
|
25
|
+
const documentationUrl = `${modelingGuidanceBaseUrl}/${ruleName}.md`;
|
26
|
+
|
27
|
+
return {
|
28
|
+
meta: {
|
29
|
+
documentation: {
|
30
|
+
url: documentationUrl,
|
31
|
+
...documentation
|
32
|
+
},
|
33
|
+
...restMeta
|
34
|
+
},
|
35
|
+
...restOptions
|
36
|
+
};
|
37
|
+
}
|
38
|
+
|
39
|
+
module.exports.annotateRule = annotateRule;
|