bpmnlint-plugin-camunda-compat 2.27.0 → 2.28.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
@@ -19,6 +19,7 @@ const camundaCloud10Rules = withConfig({
|
|
19
19
|
'no-multiple-none-start-events': 'error',
|
20
20
|
'no-priority-definition': 'error',
|
21
21
|
'no-propagate-all-parent-variables': 'error',
|
22
|
+
'no-task-listeners': 'error',
|
22
23
|
'no-task-schedule': 'error',
|
23
24
|
'no-template': 'error',
|
24
25
|
'no-version-tag': 'error',
|
@@ -94,8 +95,9 @@ const camundaCloud86Rules = withConfig({
|
|
94
95
|
}, { version: '8.6' });
|
95
96
|
|
96
97
|
const camundaCloud87Rules = withConfig({
|
97
|
-
...camundaCloud86Rules,
|
98
|
-
'zeebe-user-task': 'error'
|
98
|
+
...omit(camundaCloud86Rules, [ 'no-task-listeners' ]),
|
99
|
+
'zeebe-user-task': 'error',
|
100
|
+
'task-listener': 'error'
|
99
101
|
}, { version: '8.7' });
|
100
102
|
|
101
103
|
const camundaPlatform719Rules = withConfig({
|
@@ -155,6 +157,7 @@ const rules = {
|
|
155
157
|
'no-propagate-all-parent-variables': './rules/camunda-cloud/no-propagate-all-parent-variables',
|
156
158
|
'no-signal-event-sub-process': './rules/camunda-cloud/no-signal-event-sub-process',
|
157
159
|
'no-task-schedule': './rules/camunda-cloud/no-task-schedule',
|
160
|
+
'no-task-listeners': './rules/camunda-cloud/no-task-listeners',
|
158
161
|
'no-template': './rules/camunda-cloud/no-template',
|
159
162
|
'no-version-tag': './rules/camunda-cloud/no-version-tag',
|
160
163
|
'no-zeebe-properties': './rules/camunda-cloud/no-zeebe-properties',
|
@@ -165,6 +168,7 @@ const rules = {
|
|
165
168
|
'signal-reference': './rules/camunda-cloud/signal-reference',
|
166
169
|
'start-event-form': './rules/camunda-cloud/start-event-form',
|
167
170
|
'subscription': './rules/camunda-cloud/subscription',
|
171
|
+
'task-listener': './rules/camunda-cloud/task-listener',
|
168
172
|
'task-schedule': './rules/camunda-cloud/task-schedule',
|
169
173
|
'timer': './rules/camunda-cloud/timer',
|
170
174
|
'user-task-definition': './rules/camunda-cloud/user-task-definition',
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "bpmnlint-plugin-camunda-compat",
|
3
|
-
"version": "2.
|
3
|
+
"version": "2.28.0",
|
4
4
|
"description": "A bpmnlint plug-in for Camunda compatibility",
|
5
5
|
"main": "index.js",
|
6
6
|
"scripts": {
|
@@ -34,7 +34,7 @@
|
|
34
34
|
"modeler-moddle": "^0.2.0",
|
35
35
|
"sinon": "^17.0.1",
|
36
36
|
"sinon-chai": "^3.7.0",
|
37
|
-
"zeebe-bpmn-moddle": "^1.
|
37
|
+
"zeebe-bpmn-moddle": "^1.7.0"
|
38
38
|
},
|
39
39
|
"dependencies": {
|
40
40
|
"@bpmn-io/feel-lint": "^1.2.0",
|
@@ -0,0 +1,21 @@
|
|
1
|
+
const { reportErrors } = require('../utils/reporter');
|
2
|
+
|
3
|
+
const { skipInNonExecutableProcess } = require('../utils/rule');
|
4
|
+
|
5
|
+
const { hasNoExtensionElement } = require('../utils/element');
|
6
|
+
|
7
|
+
const ALLOWED_VERSION = '8.7';
|
8
|
+
|
9
|
+
module.exports = skipInNonExecutableProcess(function() {
|
10
|
+
function check(node, reporter) {
|
11
|
+
const errors = hasNoExtensionElement(node, 'zeebe:TaskListeners', node, ALLOWED_VERSION);
|
12
|
+
|
13
|
+
if (errors && errors.length) {
|
14
|
+
reportErrors(node, reporter, errors);
|
15
|
+
}
|
16
|
+
}
|
17
|
+
|
18
|
+
return {
|
19
|
+
check
|
20
|
+
};
|
21
|
+
});
|
@@ -0,0 +1,47 @@
|
|
1
|
+
const { is } = require('bpmnlint-utils');
|
2
|
+
|
3
|
+
const {
|
4
|
+
findExtensionElement,
|
5
|
+
hasProperties,
|
6
|
+
hasExtensionElement
|
7
|
+
} = require('../utils/element');
|
8
|
+
|
9
|
+
const { reportErrors } = require('../utils/reporter');
|
10
|
+
|
11
|
+
const { skipInNonExecutableProcess } = require('../utils/rule');
|
12
|
+
|
13
|
+
|
14
|
+
module.exports = skipInNonExecutableProcess(function() {
|
15
|
+
function check(node, reporter) {
|
16
|
+
if (!is(node, 'bpmn:UserTask')) {
|
17
|
+
return;
|
18
|
+
}
|
19
|
+
|
20
|
+
let errors = hasExtensionElement(node, 'zeebe:UserTask', node);
|
21
|
+
|
22
|
+
if (errors && errors.length) {
|
23
|
+
reportErrors(node, reporter, errors);
|
24
|
+
}
|
25
|
+
|
26
|
+
const taskListeners = findExtensionElement(node, 'zeebe:TaskListeners');
|
27
|
+
|
28
|
+
if (!taskListeners) {
|
29
|
+
return;
|
30
|
+
}
|
31
|
+
|
32
|
+
const listeners = taskListeners.get('listeners');
|
33
|
+
errors = listeners.flatMap(listener => hasProperties(listener, {
|
34
|
+
type: {
|
35
|
+
required: true
|
36
|
+
}
|
37
|
+
}, node));
|
38
|
+
|
39
|
+
if (errors.length) {
|
40
|
+
reportErrors(node, reporter, errors);
|
41
|
+
}
|
42
|
+
}
|
43
|
+
|
44
|
+
return {
|
45
|
+
check
|
46
|
+
};
|
47
|
+
});
|