bpmnlint-plugin-camunda-compat 2.25.0 → 2.26.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/index.js +247 -245
- package/package.json +53 -53
- package/rules/camunda-cloud/feel.js +7 -4
- package/rules/camunda-cloud/no-version-tag.js +24 -49
- package/rules/camunda-cloud/version-tag.js +58 -0
package/index.js
CHANGED
@@ -1,246 +1,248 @@
|
|
1
|
-
const { omit } = require('min-dash');
|
2
|
-
|
3
|
-
const camundaCloud10Rules = withConfig({
|
4
|
-
'implementation': 'error',
|
5
|
-
'called-element': 'error',
|
6
|
-
'collapsed-subprocess': 'error',
|
7
|
-
'duplicate-task-headers': 'error',
|
8
|
-
'element-type': 'error',
|
9
|
-
'error-reference': 'error',
|
10
|
-
'event-based-gateway-target': 'error',
|
11
|
-
'executable-process': 'error',
|
12
|
-
'loop-characteristics': 'error',
|
13
|
-
'message-reference': 'error',
|
14
|
-
'no-binding-type': 'error',
|
15
|
-
'no-candidate-users': 'error',
|
16
|
-
'no-execution-listeners': 'error',
|
17
|
-
'no-expression': 'error',
|
18
|
-
'no-loop': 'error',
|
19
|
-
'no-multiple-none-start-events': 'error',
|
20
|
-
'no-priority-definition': 'error',
|
21
|
-
'no-propagate-all-parent-variables': 'error',
|
22
|
-
'no-task-schedule': 'error',
|
23
|
-
'no-template': 'error',
|
24
|
-
'no-version-tag': 'error',
|
25
|
-
'no-zeebe-properties': 'error',
|
26
|
-
'no-zeebe-user-task': 'error',
|
27
|
-
'sequence-flow-condition': 'error',
|
28
|
-
'start-event-form': 'error',
|
29
|
-
'subscription': 'error',
|
30
|
-
'timer': 'error',
|
31
|
-
'user-task-definition': 'warn',
|
32
|
-
'user-task-form': 'error',
|
33
|
-
'feel': 'error'
|
34
|
-
}, { version: '1.0' });
|
35
|
-
|
36
|
-
const camundaCloud11Rules = withConfig(camundaCloud10Rules, { version: '1.1' });
|
37
|
-
|
38
|
-
const camundaCloud12Rules = withConfig(camundaCloud11Rules, { version: '1.2' });
|
39
|
-
|
40
|
-
const camundaCloud13Rules = withConfig(camundaCloud12Rules, { version: '1.3' });
|
41
|
-
|
42
|
-
const camundaCloud80Rules = withConfig({
|
43
|
-
...omit(camundaCloud13Rules, 'no-template'),
|
44
|
-
'connector-properties': 'warn'
|
45
|
-
}, { version: '8.0' });
|
46
|
-
|
47
|
-
const camundaCloud81Rules = withConfig({
|
48
|
-
...omit(camundaCloud80Rules, 'no-zeebe-properties'),
|
49
|
-
'inclusive-gateway': 'error'
|
50
|
-
}, { version: '8.1' });
|
51
|
-
|
52
|
-
const camundaCloud82Rules = withConfig({
|
53
|
-
...omit(camundaCloud81Rules, [
|
54
|
-
'no-candidate-users',
|
55
|
-
'no-propagate-all-parent-variables',
|
56
|
-
'no-task-schedule'
|
57
|
-
]),
|
58
|
-
'escalation-boundary-event-attached-to-ref': 'error',
|
59
|
-
'escalation-reference': 'error',
|
60
|
-
'link-event': 'error',
|
61
|
-
'no-signal-event-sub-process': 'error',
|
62
|
-
'task-schedule': 'error'
|
63
|
-
}, { version: '8.2' });
|
64
|
-
|
65
|
-
const camundaCloud83Rules = withConfig({
|
66
|
-
...omit(camundaCloud82Rules, 'no-signal-event-sub-process'),
|
67
|
-
'secrets': 'warn',
|
68
|
-
'signal-reference': 'error'
|
69
|
-
}, { version: '8.3' });
|
70
|
-
|
71
|
-
const camundaCloud84Rules = withConfig(
|
72
|
-
omit(camundaCloud83Rules, 'collapsed-subprocess'), { version: '8.4' });
|
73
|
-
|
74
|
-
const camundaCloud85Rules = withConfig({
|
75
|
-
...omit(camundaCloud83Rules, [
|
76
|
-
'collapsed-subprocess',
|
77
|
-
'no-zeebe-user-task'
|
78
|
-
]),
|
79
|
-
'wait-for-completion': 'error'
|
80
|
-
}, { version: '8.5' });
|
81
|
-
|
82
|
-
const camundaCloud86Rules = withConfig({
|
83
|
-
...omit(camundaCloud85Rules, [
|
84
|
-
'inclusive-gateway',
|
85
|
-
'no-binding-type',
|
86
|
-
'no-execution-listeners',
|
87
|
-
'no-priority-definition',
|
88
|
-
'no-version-tag'
|
89
|
-
]),
|
90
|
-
'duplicate-execution-listeners': 'error',
|
91
|
-
'execution-listener': 'error',
|
92
|
-
'priority-definition': 'error'
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
'
|
120
|
-
'
|
121
|
-
'
|
122
|
-
'
|
123
|
-
'duplicate-
|
124
|
-
'
|
125
|
-
'
|
126
|
-
'escalation-
|
127
|
-
'
|
128
|
-
'
|
129
|
-
'
|
130
|
-
'
|
131
|
-
'
|
132
|
-
'
|
133
|
-
'
|
134
|
-
'
|
135
|
-
'
|
136
|
-
'
|
137
|
-
'
|
138
|
-
'no-
|
139
|
-
'no-
|
140
|
-
'no-
|
141
|
-
'no-
|
142
|
-
'no-
|
143
|
-
'no-
|
144
|
-
'no-
|
145
|
-
'no-
|
146
|
-
'no-
|
147
|
-
'no-
|
148
|
-
'no-
|
149
|
-
'no-
|
150
|
-
'no-zeebe-
|
151
|
-
'
|
152
|
-
'
|
153
|
-
'
|
154
|
-
'
|
155
|
-
'
|
156
|
-
'
|
157
|
-
'
|
158
|
-
'
|
159
|
-
'
|
160
|
-
'user-task-
|
161
|
-
'
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
}
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
1
|
+
const { omit } = require('min-dash');
|
2
|
+
|
3
|
+
const camundaCloud10Rules = withConfig({
|
4
|
+
'implementation': 'error',
|
5
|
+
'called-element': 'error',
|
6
|
+
'collapsed-subprocess': 'error',
|
7
|
+
'duplicate-task-headers': 'error',
|
8
|
+
'element-type': 'error',
|
9
|
+
'error-reference': 'error',
|
10
|
+
'event-based-gateway-target': 'error',
|
11
|
+
'executable-process': 'error',
|
12
|
+
'loop-characteristics': 'error',
|
13
|
+
'message-reference': 'error',
|
14
|
+
'no-binding-type': 'error',
|
15
|
+
'no-candidate-users': 'error',
|
16
|
+
'no-execution-listeners': 'error',
|
17
|
+
'no-expression': 'error',
|
18
|
+
'no-loop': 'error',
|
19
|
+
'no-multiple-none-start-events': 'error',
|
20
|
+
'no-priority-definition': 'error',
|
21
|
+
'no-propagate-all-parent-variables': 'error',
|
22
|
+
'no-task-schedule': 'error',
|
23
|
+
'no-template': 'error',
|
24
|
+
'no-version-tag': 'error',
|
25
|
+
'no-zeebe-properties': 'error',
|
26
|
+
'no-zeebe-user-task': 'error',
|
27
|
+
'sequence-flow-condition': 'error',
|
28
|
+
'start-event-form': 'error',
|
29
|
+
'subscription': 'error',
|
30
|
+
'timer': 'error',
|
31
|
+
'user-task-definition': 'warn',
|
32
|
+
'user-task-form': 'error',
|
33
|
+
'feel': 'error'
|
34
|
+
}, { version: '1.0' });
|
35
|
+
|
36
|
+
const camundaCloud11Rules = withConfig(camundaCloud10Rules, { version: '1.1' });
|
37
|
+
|
38
|
+
const camundaCloud12Rules = withConfig(camundaCloud11Rules, { version: '1.2' });
|
39
|
+
|
40
|
+
const camundaCloud13Rules = withConfig(camundaCloud12Rules, { version: '1.3' });
|
41
|
+
|
42
|
+
const camundaCloud80Rules = withConfig({
|
43
|
+
...omit(camundaCloud13Rules, 'no-template'),
|
44
|
+
'connector-properties': 'warn'
|
45
|
+
}, { version: '8.0' });
|
46
|
+
|
47
|
+
const camundaCloud81Rules = withConfig({
|
48
|
+
...omit(camundaCloud80Rules, 'no-zeebe-properties'),
|
49
|
+
'inclusive-gateway': 'error'
|
50
|
+
}, { version: '8.1' });
|
51
|
+
|
52
|
+
const camundaCloud82Rules = withConfig({
|
53
|
+
...omit(camundaCloud81Rules, [
|
54
|
+
'no-candidate-users',
|
55
|
+
'no-propagate-all-parent-variables',
|
56
|
+
'no-task-schedule'
|
57
|
+
]),
|
58
|
+
'escalation-boundary-event-attached-to-ref': 'error',
|
59
|
+
'escalation-reference': 'error',
|
60
|
+
'link-event': 'error',
|
61
|
+
'no-signal-event-sub-process': 'error',
|
62
|
+
'task-schedule': 'error'
|
63
|
+
}, { version: '8.2' });
|
64
|
+
|
65
|
+
const camundaCloud83Rules = withConfig({
|
66
|
+
...omit(camundaCloud82Rules, 'no-signal-event-sub-process'),
|
67
|
+
'secrets': 'warn',
|
68
|
+
'signal-reference': 'error'
|
69
|
+
}, { version: '8.3' });
|
70
|
+
|
71
|
+
const camundaCloud84Rules = withConfig(
|
72
|
+
omit(camundaCloud83Rules, 'collapsed-subprocess'), { version: '8.4' });
|
73
|
+
|
74
|
+
const camundaCloud85Rules = withConfig({
|
75
|
+
...omit(camundaCloud83Rules, [
|
76
|
+
'collapsed-subprocess',
|
77
|
+
'no-zeebe-user-task'
|
78
|
+
]),
|
79
|
+
'wait-for-completion': 'error'
|
80
|
+
}, { version: '8.5' });
|
81
|
+
|
82
|
+
const camundaCloud86Rules = withConfig({
|
83
|
+
...omit(camundaCloud85Rules, [
|
84
|
+
'inclusive-gateway',
|
85
|
+
'no-binding-type',
|
86
|
+
'no-execution-listeners',
|
87
|
+
'no-priority-definition',
|
88
|
+
'no-version-tag'
|
89
|
+
]),
|
90
|
+
'duplicate-execution-listeners': 'error',
|
91
|
+
'execution-listener': 'error',
|
92
|
+
'priority-definition': 'error',
|
93
|
+
'version-tag': 'error'
|
94
|
+
}, { version: '8.6' });
|
95
|
+
|
96
|
+
const camundaPlatform719Rules = withConfig({
|
97
|
+
'history-time-to-live': 'info'
|
98
|
+
}, {
|
99
|
+
platform: 'camunda-platform',
|
100
|
+
version: '7.19'
|
101
|
+
});
|
102
|
+
|
103
|
+
const camundaPlatform720Rules = withConfig(camundaPlatform719Rules, {
|
104
|
+
platform: 'camunda-platform',
|
105
|
+
version: '7.20'
|
106
|
+
});
|
107
|
+
|
108
|
+
const camundaPlatform721Rules = withConfig(camundaPlatform720Rules, {
|
109
|
+
platform: 'camunda-platform',
|
110
|
+
version: '7.21'
|
111
|
+
});
|
112
|
+
|
113
|
+
const camundaPlatform722Rules = withConfig(camundaPlatform721Rules, {
|
114
|
+
platform: 'camunda-platform',
|
115
|
+
version: '7.22'
|
116
|
+
});
|
117
|
+
|
118
|
+
const rules = {
|
119
|
+
'element-type': './rules/camunda-cloud/element-type',
|
120
|
+
'called-element': './rules/camunda-cloud/called-element',
|
121
|
+
'collapsed-subprocess': './rules/camunda-cloud/collapsed-subprocess',
|
122
|
+
'connector-properties': './rules/camunda-cloud/connector-properties',
|
123
|
+
'duplicate-execution-listeners': './rules/camunda-cloud/duplicate-execution-listeners',
|
124
|
+
'duplicate-task-headers': './rules/camunda-cloud/duplicate-task-headers',
|
125
|
+
'error-reference': './rules/camunda-cloud/error-reference',
|
126
|
+
'escalation-boundary-event-attached-to-ref': './rules/camunda-cloud/escalation-boundary-event-attached-to-ref',
|
127
|
+
'escalation-reference': './rules/camunda-cloud/escalation-reference',
|
128
|
+
'event-based-gateway-target': './rules/camunda-cloud/event-based-gateway-target',
|
129
|
+
'executable-process': './rules/camunda-cloud/executable-process',
|
130
|
+
'execution-listener': './rules/camunda-cloud/execution-listener',
|
131
|
+
'feel': './rules/camunda-cloud/feel',
|
132
|
+
'history-time-to-live': './rules/camunda-platform/history-time-to-live',
|
133
|
+
'implementation': './rules/camunda-cloud/implementation',
|
134
|
+
'inclusive-gateway': './rules/camunda-cloud/inclusive-gateway',
|
135
|
+
'link-event': './rules/camunda-cloud/link-event',
|
136
|
+
'loop-characteristics': './rules/camunda-cloud/loop-characteristics',
|
137
|
+
'message-reference': './rules/camunda-cloud/message-reference',
|
138
|
+
'no-binding-type': './rules/camunda-cloud/no-binding-type',
|
139
|
+
'no-candidate-users': './rules/camunda-cloud/no-candidate-users',
|
140
|
+
'no-execution-listeners': './rules/camunda-cloud/no-execution-listeners',
|
141
|
+
'no-expression': './rules/camunda-cloud/no-expression',
|
142
|
+
'no-loop': './rules/camunda-cloud/no-loop',
|
143
|
+
'no-multiple-none-start-events': './rules/camunda-cloud/no-multiple-none-start-events',
|
144
|
+
'no-priority-definition': './rules/camunda-cloud/no-priority-definition',
|
145
|
+
'no-propagate-all-parent-variables': './rules/camunda-cloud/no-propagate-all-parent-variables',
|
146
|
+
'no-signal-event-sub-process': './rules/camunda-cloud/no-signal-event-sub-process',
|
147
|
+
'no-task-schedule': './rules/camunda-cloud/no-task-schedule',
|
148
|
+
'no-template': './rules/camunda-cloud/no-template',
|
149
|
+
'no-version-tag': './rules/camunda-cloud/no-version-tag',
|
150
|
+
'no-zeebe-properties': './rules/camunda-cloud/no-zeebe-properties',
|
151
|
+
'no-zeebe-user-task': './rules/camunda-cloud/no-zeebe-user-task',
|
152
|
+
'priority-definition': './rules/camunda-cloud/priority-definition',
|
153
|
+
'secrets': './rules/camunda-cloud/secrets',
|
154
|
+
'sequence-flow-condition': './rules/camunda-cloud/sequence-flow-condition',
|
155
|
+
'signal-reference': './rules/camunda-cloud/signal-reference',
|
156
|
+
'start-event-form': './rules/camunda-cloud/start-event-form',
|
157
|
+
'subscription': './rules/camunda-cloud/subscription',
|
158
|
+
'task-schedule': './rules/camunda-cloud/task-schedule',
|
159
|
+
'timer': './rules/camunda-cloud/timer',
|
160
|
+
'user-task-definition': './rules/camunda-cloud/user-task-definition',
|
161
|
+
'user-task-form': './rules/camunda-cloud/user-task-form',
|
162
|
+
'version-tag': './rules/camunda-cloud/version-tag',
|
163
|
+
'wait-for-completion': './rules/camunda-cloud/wait-for-completion'
|
164
|
+
};
|
165
|
+
|
166
|
+
const configs = {
|
167
|
+
'camunda-cloud-1-0': {
|
168
|
+
rules: camundaCloud10Rules
|
169
|
+
},
|
170
|
+
'camunda-cloud-1-1': {
|
171
|
+
rules: camundaCloud11Rules
|
172
|
+
},
|
173
|
+
'camunda-cloud-1-2': {
|
174
|
+
rules: camundaCloud12Rules
|
175
|
+
},
|
176
|
+
'camunda-cloud-1-3': {
|
177
|
+
rules: camundaCloud13Rules
|
178
|
+
},
|
179
|
+
'camunda-cloud-8-0': {
|
180
|
+
rules: camundaCloud80Rules
|
181
|
+
},
|
182
|
+
'camunda-cloud-8-1': {
|
183
|
+
rules: camundaCloud81Rules
|
184
|
+
},
|
185
|
+
'camunda-cloud-8-2': {
|
186
|
+
rules: camundaCloud82Rules
|
187
|
+
},
|
188
|
+
'camunda-cloud-8-3': {
|
189
|
+
rules: camundaCloud83Rules
|
190
|
+
},
|
191
|
+
'camunda-cloud-8-4': {
|
192
|
+
rules: camundaCloud84Rules
|
193
|
+
},
|
194
|
+
'camunda-cloud-8-5': {
|
195
|
+
rules: camundaCloud85Rules
|
196
|
+
},
|
197
|
+
'camunda-cloud-8-6': {
|
198
|
+
rules: camundaCloud86Rules
|
199
|
+
},
|
200
|
+
'camunda-platform-7-19': {
|
201
|
+
rules: camundaPlatform719Rules
|
202
|
+
},
|
203
|
+
'camunda-platform-7-20': {
|
204
|
+
rules: camundaPlatform720Rules
|
205
|
+
},
|
206
|
+
'camunda-platform-7-21': {
|
207
|
+
rules: camundaPlatform721Rules
|
208
|
+
},
|
209
|
+
'camunda-platform-7-22': {
|
210
|
+
rules: camundaPlatform722Rules
|
211
|
+
}
|
212
|
+
};
|
213
|
+
|
214
|
+
module.exports = {
|
215
|
+
configs: {
|
216
|
+
...configs,
|
217
|
+
'all': {
|
218
|
+
rules: Object.keys(rules).reduce((allRules, rule) => {
|
219
|
+
return {
|
220
|
+
...allRules,
|
221
|
+
[ rule ]: Object.values(configs).reduce((type, { rules }) => {
|
222
|
+
if (type) {
|
223
|
+
return type;
|
224
|
+
}
|
225
|
+
|
226
|
+
if (rules[ rule ]) {
|
227
|
+
return Array.isArray(rules[ rule ]) ? rules[ rule ][0] : rules[ rule ];
|
228
|
+
}
|
229
|
+
|
230
|
+
return type;
|
231
|
+
}, null)
|
232
|
+
};
|
233
|
+
}, {})
|
234
|
+
}
|
235
|
+
},
|
236
|
+
rules
|
237
|
+
};
|
238
|
+
|
239
|
+
function withConfig(rules, config) {
|
240
|
+
let rulesWithConfig = {};
|
241
|
+
|
242
|
+
for (let name in rules) {
|
243
|
+
const type = Array.isArray(rules[ name ]) ? rules[ name ][0] : rules[ name ];
|
244
|
+
rulesWithConfig[ name ] = [ type, config ];
|
245
|
+
}
|
246
|
+
|
247
|
+
return rulesWithConfig;
|
246
248
|
}
|
package/package.json
CHANGED
@@ -1,53 +1,53 @@
|
|
1
|
-
{
|
2
|
-
"name": "bpmnlint-plugin-camunda-compat",
|
3
|
-
"version": "2.
|
4
|
-
"description": "A bpmnlint plug-in for Camunda compatibility",
|
5
|
-
"main": "index.js",
|
6
|
-
"scripts": {
|
7
|
-
"all": "npm run lint && npm test",
|
8
|
-
"dev": "npm run test:watch",
|
9
|
-
"lint": "eslint .",
|
10
|
-
"test": "mocha 'test/**/*.spec.js'",
|
11
|
-
"test:watch": "npm run test -- --watch"
|
12
|
-
},
|
13
|
-
"repository": {
|
14
|
-
"type": "git",
|
15
|
-
"url": "https://github.com/camunda/bpmnlint-plugin-camunda-compat"
|
16
|
-
},
|
17
|
-
"keywords": [
|
18
|
-
"bpmnlint",
|
19
|
-
"plugin"
|
20
|
-
],
|
21
|
-
"author": {
|
22
|
-
"name": "Philipp Fromme",
|
23
|
-
"url": "https://github.com/philippfromme"
|
24
|
-
},
|
25
|
-
"license": "MIT",
|
26
|
-
"devDependencies": {
|
27
|
-
"bpmn-moddle": "^8.1.0",
|
28
|
-
"bpmnlint": "^10.2.0",
|
29
|
-
"camunda-bpmn-moddle": "^7.0.1",
|
30
|
-
"chai": "^4.4.1",
|
31
|
-
"eslint": "^8.56.0",
|
32
|
-
"eslint-plugin-bpmn-io": "^1.0.0",
|
33
|
-
"mocha": "^10.2.0",
|
34
|
-
"modeler-moddle": "^0.2.0",
|
35
|
-
"sinon": "^17.0.1",
|
36
|
-
"sinon-chai": "^3.7.0",
|
37
|
-
"zeebe-bpmn-moddle": "^1.6.0"
|
38
|
-
},
|
39
|
-
"dependencies": {
|
40
|
-
"@bpmn-io/feel-lint": "^1.2.0",
|
41
|
-
"@bpmn-io/moddle-utils": "^0.2.1",
|
42
|
-
"bpmnlint-utils": "^1.0.2",
|
43
|
-
"min-dash": "^4.1.1",
|
44
|
-
"semver-compare": "^1.0.0"
|
45
|
-
},
|
46
|
-
"files": [
|
47
|
-
"rules",
|
48
|
-
"index.js"
|
49
|
-
],
|
50
|
-
"engines": {
|
51
|
-
"node": "*"
|
52
|
-
}
|
53
|
-
}
|
1
|
+
{
|
2
|
+
"name": "bpmnlint-plugin-camunda-compat",
|
3
|
+
"version": "2.26.1",
|
4
|
+
"description": "A bpmnlint plug-in for Camunda compatibility",
|
5
|
+
"main": "index.js",
|
6
|
+
"scripts": {
|
7
|
+
"all": "npm run lint && npm test",
|
8
|
+
"dev": "npm run test:watch",
|
9
|
+
"lint": "eslint .",
|
10
|
+
"test": "mocha 'test/**/*.spec.js'",
|
11
|
+
"test:watch": "npm run test -- --watch"
|
12
|
+
},
|
13
|
+
"repository": {
|
14
|
+
"type": "git",
|
15
|
+
"url": "https://github.com/camunda/bpmnlint-plugin-camunda-compat"
|
16
|
+
},
|
17
|
+
"keywords": [
|
18
|
+
"bpmnlint",
|
19
|
+
"plugin"
|
20
|
+
],
|
21
|
+
"author": {
|
22
|
+
"name": "Philipp Fromme",
|
23
|
+
"url": "https://github.com/philippfromme"
|
24
|
+
},
|
25
|
+
"license": "MIT",
|
26
|
+
"devDependencies": {
|
27
|
+
"bpmn-moddle": "^8.1.0",
|
28
|
+
"bpmnlint": "^10.2.0",
|
29
|
+
"camunda-bpmn-moddle": "^7.0.1",
|
30
|
+
"chai": "^4.4.1",
|
31
|
+
"eslint": "^8.56.0",
|
32
|
+
"eslint-plugin-bpmn-io": "^1.0.0",
|
33
|
+
"mocha": "^10.2.0",
|
34
|
+
"modeler-moddle": "^0.2.0",
|
35
|
+
"sinon": "^17.0.1",
|
36
|
+
"sinon-chai": "^3.7.0",
|
37
|
+
"zeebe-bpmn-moddle": "^1.6.0"
|
38
|
+
},
|
39
|
+
"dependencies": {
|
40
|
+
"@bpmn-io/feel-lint": "^1.2.0",
|
41
|
+
"@bpmn-io/moddle-utils": "^0.2.1",
|
42
|
+
"bpmnlint-utils": "^1.0.2",
|
43
|
+
"min-dash": "^4.1.1",
|
44
|
+
"semver-compare": "^1.0.0"
|
45
|
+
},
|
46
|
+
"files": [
|
47
|
+
"rules",
|
48
|
+
"index.js"
|
49
|
+
],
|
50
|
+
"engines": {
|
51
|
+
"node": "*"
|
52
|
+
}
|
53
|
+
}
|
@@ -1,6 +1,9 @@
|
|
1
1
|
const { isString } = require('min-dash');
|
2
2
|
|
3
|
-
const {
|
3
|
+
const {
|
4
|
+
is,
|
5
|
+
isAny
|
6
|
+
} = require('bpmnlint-utils');
|
4
7
|
|
5
8
|
const { lintExpression } = require('@bpmn-io/feel-lint');
|
6
9
|
|
@@ -18,7 +21,7 @@ module.exports = skipInNonExecutableProcess(function() {
|
|
18
21
|
return;
|
19
22
|
}
|
20
23
|
|
21
|
-
const parentNode =
|
24
|
+
const parentNode = findParentNode(node);
|
22
25
|
|
23
26
|
if (!parentNode) {
|
24
27
|
return;
|
@@ -74,8 +77,8 @@ const isIgnoredProperty = propertyName => {
|
|
74
77
|
return propertyName.startsWith('$');
|
75
78
|
};
|
76
79
|
|
77
|
-
const
|
78
|
-
while (node && !
|
80
|
+
const findParentNode = node => {
|
81
|
+
while (node && !isAny(node, [ 'bpmn:FlowElement', 'bpmn:FlowElementsContainer' ])) {
|
79
82
|
node = node.$parent;
|
80
83
|
}
|
81
84
|
|
@@ -1,50 +1,25 @@
|
|
1
|
-
const { is } = require('bpmnlint-utils');
|
2
|
-
|
3
|
-
const {
|
4
|
-
|
5
|
-
const { reportErrors } = require('../utils/reporter');
|
6
|
-
|
7
|
-
const { skipInNonExecutableProcess } = require('../utils/rule');
|
8
|
-
|
9
|
-
const allowedVersion = '8.6';
|
10
|
-
|
11
|
-
module.exports = skipInNonExecutableProcess(function() {
|
12
|
-
function check(node, reporter) {
|
13
|
-
if (is(node, 'bpmn:Process')) {
|
14
|
-
const errors = hasNoExtensionElement(node, 'zeebe:VersionTag', node, allowedVersion);
|
15
|
-
|
16
|
-
if (errors && errors.length) {
|
17
|
-
reportErrors(node, reporter, errors);
|
18
|
-
}
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
if (is(node, 'bpmn:BusinessRuleTask')) {
|
26
|
-
extensionElement = findExtensionElement(node, 'zeebe:CalledDecision');
|
27
|
-
} else if (is(node, 'bpmn:CallActivity')) {
|
28
|
-
extensionElement = findExtensionElement(node, 'zeebe:CalledElement');
|
29
|
-
} else if (is(node, 'bpmn:UserTask')) {
|
30
|
-
extensionElement = findExtensionElement(node, 'zeebe:FormDefinition');
|
31
|
-
}
|
32
|
-
|
33
|
-
if (extensionElement) {
|
34
|
-
const errors = hasProperties(extensionElement, {
|
35
|
-
versionTag: {
|
36
|
-
allowed: false,
|
37
|
-
allowedVersion
|
38
|
-
}
|
39
|
-
}, node);
|
40
|
-
|
41
|
-
if (errors && errors.length) {
|
42
|
-
reportErrors(node, reporter, errors);
|
43
|
-
}
|
44
|
-
}
|
45
|
-
}
|
46
|
-
|
47
|
-
return {
|
48
|
-
check
|
49
|
-
};
|
1
|
+
const { is } = require('bpmnlint-utils');
|
2
|
+
|
3
|
+
const { hasNoExtensionElement } = require('../utils/element');
|
4
|
+
|
5
|
+
const { reportErrors } = require('../utils/reporter');
|
6
|
+
|
7
|
+
const { skipInNonExecutableProcess } = require('../utils/rule');
|
8
|
+
|
9
|
+
const allowedVersion = '8.6';
|
10
|
+
|
11
|
+
module.exports = skipInNonExecutableProcess(function() {
|
12
|
+
function check(node, reporter) {
|
13
|
+
if (is(node, 'bpmn:Process')) {
|
14
|
+
const errors = hasNoExtensionElement(node, 'zeebe:VersionTag', node, allowedVersion);
|
15
|
+
|
16
|
+
if (errors && errors.length) {
|
17
|
+
reportErrors(node, reporter, errors);
|
18
|
+
}
|
19
|
+
}
|
20
|
+
}
|
21
|
+
|
22
|
+
return {
|
23
|
+
check
|
24
|
+
};
|
50
25
|
});
|
@@ -0,0 +1,58 @@
|
|
1
|
+
const { is } = require('bpmnlint-utils');
|
2
|
+
|
3
|
+
const {
|
4
|
+
findExtensionElement,
|
5
|
+
hasProperties
|
6
|
+
} = require('../utils/element');
|
7
|
+
|
8
|
+
const { reportErrors } = require('../utils/reporter');
|
9
|
+
|
10
|
+
const { skipInNonExecutableProcess } = require('../utils/rule');
|
11
|
+
|
12
|
+
module.exports = skipInNonExecutableProcess(function() {
|
13
|
+
function check(node, reporter) {
|
14
|
+
if (is(node, 'bpmn:Process')) {
|
15
|
+
const versionTag = findExtensionElement(node, 'zeebe:VersionTag');
|
16
|
+
|
17
|
+
if (!versionTag) {
|
18
|
+
return;
|
19
|
+
}
|
20
|
+
|
21
|
+
const errors = hasProperties(versionTag, {
|
22
|
+
value: {
|
23
|
+
required: true
|
24
|
+
}
|
25
|
+
}, node);
|
26
|
+
|
27
|
+
if (errors && errors.length) {
|
28
|
+
reportErrors(node, reporter, errors);
|
29
|
+
}
|
30
|
+
}
|
31
|
+
|
32
|
+
let extensionElement;
|
33
|
+
|
34
|
+
if (is(node, 'bpmn:BusinessRuleTask')) {
|
35
|
+
extensionElement = findExtensionElement(node, 'zeebe:CalledDecision');
|
36
|
+
} else if (is(node, 'bpmn:CallActivity')) {
|
37
|
+
extensionElement = findExtensionElement(node, 'zeebe:CalledElement');
|
38
|
+
} else if (is(node, 'bpmn:UserTask')) {
|
39
|
+
extensionElement = findExtensionElement(node, 'zeebe:FormDefinition');
|
40
|
+
}
|
41
|
+
|
42
|
+
if (extensionElement && extensionElement.get('bindingType') === 'versionTag') {
|
43
|
+
const errors = hasProperties(extensionElement, {
|
44
|
+
versionTag: {
|
45
|
+
required: true
|
46
|
+
}
|
47
|
+
}, node);
|
48
|
+
|
49
|
+
if (errors && errors.length) {
|
50
|
+
reportErrors(node, reporter, errors);
|
51
|
+
}
|
52
|
+
}
|
53
|
+
}
|
54
|
+
|
55
|
+
return {
|
56
|
+
check
|
57
|
+
};
|
58
|
+
});
|