bpmnlint-plugin-camunda-compat 2.23.0 → 2.24.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.
Files changed (58) hide show
  1. package/LICENSE +20 -20
  2. package/README.md +39 -39
  3. package/index.js +242 -237
  4. package/package.json +53 -53
  5. package/rules/camunda-cloud/called-element.js +42 -42
  6. package/rules/camunda-cloud/collapsed-subprocess.js +40 -40
  7. package/rules/camunda-cloud/connector-properties/config.js +90 -90
  8. package/rules/camunda-cloud/connector-properties/index.js +47 -47
  9. package/rules/camunda-cloud/duplicate-execution-listeners.js +33 -33
  10. package/rules/camunda-cloud/duplicate-task-headers.js +58 -58
  11. package/rules/camunda-cloud/element-type/config.js +66 -66
  12. package/rules/camunda-cloud/element-type/index.js +133 -133
  13. package/rules/camunda-cloud/error-reference.js +71 -71
  14. package/rules/camunda-cloud/escalation-boundary-event-attached-to-ref.js +48 -48
  15. package/rules/camunda-cloud/escalation-reference.js +66 -66
  16. package/rules/camunda-cloud/event-based-gateway-target.js +38 -38
  17. package/rules/camunda-cloud/executable-process.js +61 -61
  18. package/rules/camunda-cloud/execution-listener.js +34 -34
  19. package/rules/camunda-cloud/feel.js +82 -82
  20. package/rules/camunda-cloud/implementation/config.js +16 -16
  21. package/rules/camunda-cloud/implementation/index.js +218 -218
  22. package/rules/camunda-cloud/inclusive-gateway.js +35 -35
  23. package/rules/camunda-cloud/link-event.js +142 -142
  24. package/rules/camunda-cloud/loop-characteristics.js +66 -66
  25. package/rules/camunda-cloud/message-reference.js +60 -60
  26. package/rules/camunda-cloud/no-binding-type.js +43 -43
  27. package/rules/camunda-cloud/no-candidate-users.js +38 -38
  28. package/rules/camunda-cloud/no-execution-listeners.js +21 -21
  29. package/rules/camunda-cloud/no-expression.js +173 -173
  30. package/rules/camunda-cloud/no-loop.js +316 -316
  31. package/rules/camunda-cloud/no-multiple-none-start-events.js +41 -41
  32. package/rules/camunda-cloud/no-priority-definition.js +19 -0
  33. package/rules/camunda-cloud/no-propagate-all-parent-variables.js +44 -44
  34. package/rules/camunda-cloud/no-signal-event-sub-process.js +45 -45
  35. package/rules/camunda-cloud/no-task-schedule.js +18 -18
  36. package/rules/camunda-cloud/no-template.js +23 -23
  37. package/rules/camunda-cloud/no-zeebe-properties.js +18 -18
  38. package/rules/camunda-cloud/no-zeebe-user-task.js +27 -27
  39. package/rules/camunda-cloud/priority-definition.js +62 -0
  40. package/rules/camunda-cloud/secrets.js +119 -119
  41. package/rules/camunda-cloud/sequence-flow-condition.js +56 -56
  42. package/rules/camunda-cloud/signal-reference.js +64 -64
  43. package/rules/camunda-cloud/start-event-form.js +97 -97
  44. package/rules/camunda-cloud/subscription.js +65 -65
  45. package/rules/camunda-cloud/task-schedule.js +67 -67
  46. package/rules/camunda-cloud/timer/config.js +46 -46
  47. package/rules/camunda-cloud/timer/index.js +183 -183
  48. package/rules/camunda-cloud/user-task-definition.js +24 -24
  49. package/rules/camunda-cloud/user-task-form.js +142 -142
  50. package/rules/camunda-cloud/wait-for-completion.js +46 -46
  51. package/rules/camunda-platform/history-time-to-live.js +19 -19
  52. package/rules/utils/cron.js +95 -95
  53. package/rules/utils/element.js +533 -533
  54. package/rules/utils/error-types.js +25 -25
  55. package/rules/utils/iso8601.js +52 -52
  56. package/rules/utils/reporter.js +37 -37
  57. package/rules/utils/rule.js +46 -46
  58. package/rules/utils/version.js +4 -4
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2021-present bpmn.io Contributors
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2021-present bpmn.io Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
21
  THE SOFTWARE.
package/README.md CHANGED
@@ -1,39 +1,39 @@
1
- # bpmnlint-plugin-camunda-compat
2
-
3
- [![CI](https://github.com/camunda/bpmnlint-plugin-camunda-compat/workflows/CI/badge.svg)](https://github.com/camunda/bpmnlint-plugin-camunda-compat/actions?query=workflow%3ACI)
4
-
5
- A [bpmnlint](https://github.com/bpmn-io/bpmnlint) plug-in that checks whether a given BPMN process can be executed with [Camunda](https://camunda.com/).
6
-
7
-
8
- ## Usage
9
-
10
- Add configuration corresponding to your execution platform and version to your [`.bpmnlintrc` configuration](https://github.com/bpmn-io/bpmnlint#configuration):
11
-
12
- ```json
13
- {
14
- "extends": [
15
- "bpmnlint:recommended",
16
- "plugin:camunda-compat/camunda-cloud-8-0"
17
- ],
18
- "rules": {
19
- "camunda-compat/timer": "off"
20
- }
21
- }
22
- ```
23
-
24
- Use [`@camunda/linting`](https://github.com/camunda/linting) to configure the linter dynamically based on the [execution platform and version](https://github.com/camunda/modeler-moddle).
25
-
26
-
27
- ## Resources
28
-
29
- * [Issues](https://github.com/camunda/bpmnlint-plugin-camunda-compat/issues)
30
-
31
-
32
- ## Related
33
-
34
- * BPMN coverage for [Camunda 8](https://docs.camunda.io/docs/reference/bpmn-processes/bpmn-coverage/) and [Camunda 7](https://docs.camunda.org/manual/latest/reference/bpmn20/)
35
-
36
-
37
- ## License
38
-
39
- MIT
1
+ # bpmnlint-plugin-camunda-compat
2
+
3
+ [![CI](https://github.com/camunda/bpmnlint-plugin-camunda-compat/workflows/CI/badge.svg)](https://github.com/camunda/bpmnlint-plugin-camunda-compat/actions?query=workflow%3ACI)
4
+
5
+ A [bpmnlint](https://github.com/bpmn-io/bpmnlint) plug-in that checks whether a given BPMN process can be executed with [Camunda](https://camunda.com/).
6
+
7
+
8
+ ## Usage
9
+
10
+ Add configuration corresponding to your execution platform and version to your [`.bpmnlintrc` configuration](https://github.com/bpmn-io/bpmnlint#configuration):
11
+
12
+ ```json
13
+ {
14
+ "extends": [
15
+ "bpmnlint:recommended",
16
+ "plugin:camunda-compat/camunda-cloud-8-0"
17
+ ],
18
+ "rules": {
19
+ "camunda-compat/timer": "off"
20
+ }
21
+ }
22
+ ```
23
+
24
+ Use [`@camunda/linting`](https://github.com/camunda/linting) to configure the linter dynamically based on the [execution platform and version](https://github.com/camunda/modeler-moddle).
25
+
26
+
27
+ ## Resources
28
+
29
+ * [Issues](https://github.com/camunda/bpmnlint-plugin-camunda-compat/issues)
30
+
31
+
32
+ ## Related
33
+
34
+ * BPMN coverage for [Camunda 8](https://docs.camunda.io/docs/reference/bpmn-processes/bpmn-coverage/) and [Camunda 7](https://docs.camunda.org/manual/latest/reference/bpmn20/)
35
+
36
+
37
+ ## License
38
+
39
+ MIT
package/index.js CHANGED
@@ -1,238 +1,243 @@
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-propagate-all-parent-variables': 'error',
21
- 'no-task-schedule': 'error',
22
- 'no-template': 'error',
23
- 'no-zeebe-properties': 'error',
24
- 'no-zeebe-user-task': 'error',
25
- 'sequence-flow-condition': 'error',
26
- 'start-event-form': 'error',
27
- 'subscription': 'error',
28
- 'timer': 'error',
29
- 'user-task-definition': 'warn',
30
- 'user-task-form': 'error',
31
- 'feel': 'error'
32
- }, { version: '1.0' });
33
-
34
- const camundaCloud11Rules = withConfig(camundaCloud10Rules, { version: '1.1' });
35
-
36
- const camundaCloud12Rules = withConfig(camundaCloud11Rules, { version: '1.2' });
37
-
38
- const camundaCloud13Rules = withConfig(camundaCloud12Rules, { version: '1.3' });
39
-
40
- const camundaCloud80Rules = withConfig({
41
- ...omit(camundaCloud13Rules, 'no-template'),
42
- 'connector-properties': 'warn'
43
- }, { version: '8.0' });
44
-
45
- const camundaCloud81Rules = withConfig({
46
- ...omit(camundaCloud80Rules, 'no-zeebe-properties'),
47
- 'inclusive-gateway': 'error'
48
- }, { version: '8.1' });
49
-
50
- const camundaCloud82Rules = withConfig({
51
- ...omit(camundaCloud81Rules, [
52
- 'no-candidate-users',
53
- 'no-propagate-all-parent-variables',
54
- 'no-task-schedule'
55
- ]),
56
- 'escalation-boundary-event-attached-to-ref': 'error',
57
- 'escalation-reference': 'error',
58
- 'link-event': 'error',
59
- 'no-signal-event-sub-process': 'error',
60
- 'task-schedule': 'error'
61
- }, { version: '8.2' });
62
-
63
- const camundaCloud83Rules = withConfig({
64
- ...omit(camundaCloud82Rules, 'no-signal-event-sub-process'),
65
- 'secrets': 'warn',
66
- 'signal-reference': 'error'
67
- }, { version: '8.3' });
68
-
69
- const camundaCloud84Rules = withConfig(
70
- omit(camundaCloud83Rules, 'collapsed-subprocess'), { version: '8.4' });
71
-
72
- const camundaCloud85Rules = withConfig({
73
- ...omit(camundaCloud83Rules, [
74
- 'collapsed-subprocess',
75
- 'no-zeebe-user-task'
76
- ]),
77
- 'wait-for-completion': 'error'
78
- }, { version: '8.5' });
79
-
80
- const camundaCloud86Rules = withConfig({
81
- ...omit(camundaCloud85Rules, [
82
- 'inclusive-gateway',
83
- 'no-binding-type',
84
- 'no-execution-listeners'
85
- ]),
86
- 'duplicate-execution-listeners': 'error',
87
- 'execution-listener': 'error'
88
- }, { version: '8.6' });
89
-
90
- const camundaPlatform719Rules = withConfig({
91
- 'history-time-to-live': 'info'
92
- }, {
93
- platform: 'camunda-platform',
94
- version: '7.19'
95
- });
96
-
97
- const camundaPlatform720Rules = withConfig(camundaPlatform719Rules, {
98
- platform: 'camunda-platform',
99
- version: '7.20'
100
- });
101
-
102
- const camundaPlatform721Rules = withConfig(camundaPlatform720Rules, {
103
- platform: 'camunda-platform',
104
- version: '7.21'
105
- });
106
-
107
- const camundaPlatform722Rules = withConfig(camundaPlatform721Rules, {
108
- platform: 'camunda-platform',
109
- version: '7.22'
110
- });
111
-
112
- const rules = {
113
- 'element-type': './rules/camunda-cloud/element-type',
114
- 'called-element': './rules/camunda-cloud/called-element',
115
- 'collapsed-subprocess': './rules/camunda-cloud/collapsed-subprocess',
116
- 'connector-properties': './rules/camunda-cloud/connector-properties',
117
- 'duplicate-execution-listeners': './rules/camunda-cloud/duplicate-execution-listeners',
118
- 'duplicate-task-headers': './rules/camunda-cloud/duplicate-task-headers',
119
- 'error-reference': './rules/camunda-cloud/error-reference',
120
- 'escalation-boundary-event-attached-to-ref': './rules/camunda-cloud/escalation-boundary-event-attached-to-ref',
121
- 'escalation-reference': './rules/camunda-cloud/escalation-reference',
122
- 'event-based-gateway-target': './rules/camunda-cloud/event-based-gateway-target',
123
- 'executable-process': './rules/camunda-cloud/executable-process',
124
- 'execution-listener': './rules/camunda-cloud/execution-listener',
125
- 'feel': './rules/camunda-cloud/feel',
126
- 'history-time-to-live': './rules/camunda-platform/history-time-to-live',
127
- 'implementation': './rules/camunda-cloud/implementation',
128
- 'inclusive-gateway': './rules/camunda-cloud/inclusive-gateway',
129
- 'link-event': './rules/camunda-cloud/link-event',
130
- 'loop-characteristics': './rules/camunda-cloud/loop-characteristics',
131
- 'message-reference': './rules/camunda-cloud/message-reference',
132
- 'no-binding-type': './rules/camunda-cloud/no-binding-type',
133
- 'no-candidate-users': './rules/camunda-cloud/no-candidate-users',
134
- 'no-execution-listeners': './rules/camunda-cloud/no-execution-listeners',
135
- 'no-expression': './rules/camunda-cloud/no-expression',
136
- 'no-loop': './rules/camunda-cloud/no-loop',
137
- 'no-multiple-none-start-events': './rules/camunda-cloud/no-multiple-none-start-events',
138
- 'no-propagate-all-parent-variables': './rules/camunda-cloud/no-propagate-all-parent-variables',
139
- 'no-signal-event-sub-process': './rules/camunda-cloud/no-signal-event-sub-process',
140
- 'no-task-schedule': './rules/camunda-cloud/no-task-schedule',
141
- 'no-template': './rules/camunda-cloud/no-template',
142
- 'no-zeebe-properties': './rules/camunda-cloud/no-zeebe-properties',
143
- 'no-zeebe-user-task': './rules/camunda-cloud/no-zeebe-user-task',
144
- 'secrets': './rules/camunda-cloud/secrets',
145
- 'sequence-flow-condition': './rules/camunda-cloud/sequence-flow-condition',
146
- 'signal-reference': './rules/camunda-cloud/signal-reference',
147
- 'start-event-form': './rules/camunda-cloud/start-event-form',
148
- 'subscription': './rules/camunda-cloud/subscription',
149
- 'task-schedule': './rules/camunda-cloud/task-schedule',
150
- 'timer': './rules/camunda-cloud/timer',
151
- 'user-task-definition': './rules/camunda-cloud/user-task-definition',
152
- 'user-task-form': './rules/camunda-cloud/user-task-form',
153
- 'wait-for-completion': './rules/camunda-cloud/wait-for-completion'
154
- };
155
-
156
- const configs = {
157
- 'camunda-cloud-1-0': {
158
- rules: camundaCloud10Rules
159
- },
160
- 'camunda-cloud-1-1': {
161
- rules: camundaCloud11Rules
162
- },
163
- 'camunda-cloud-1-2': {
164
- rules: camundaCloud12Rules
165
- },
166
- 'camunda-cloud-1-3': {
167
- rules: camundaCloud13Rules
168
- },
169
- 'camunda-cloud-8-0': {
170
- rules: camundaCloud80Rules
171
- },
172
- 'camunda-cloud-8-1': {
173
- rules: camundaCloud81Rules
174
- },
175
- 'camunda-cloud-8-2': {
176
- rules: camundaCloud82Rules
177
- },
178
- 'camunda-cloud-8-3': {
179
- rules: camundaCloud83Rules
180
- },
181
- 'camunda-cloud-8-4': {
182
- rules: camundaCloud84Rules
183
- },
184
- 'camunda-cloud-8-5': {
185
- rules: camundaCloud85Rules
186
- },
187
- 'camunda-cloud-8-6': {
188
- rules: camundaCloud86Rules
189
- },
190
- 'camunda-platform-7-19': {
191
- rules: camundaPlatform719Rules
192
- },
193
- 'camunda-platform-7-20': {
194
- rules: camundaPlatform720Rules
195
- },
196
- 'camunda-platform-7-21': {
197
- rules: camundaPlatform721Rules
198
- },
199
- 'camunda-platform-7-22': {
200
- rules: camundaPlatform722Rules
201
- }
202
- };
203
-
204
- module.exports = {
205
- configs: {
206
- ...configs,
207
- 'all': {
208
- rules: Object.keys(rules).reduce((allRules, rule) => {
209
- return {
210
- ...allRules,
211
- [ rule ]: Object.values(configs).reduce((type, { rules }) => {
212
- if (type) {
213
- return type;
214
- }
215
-
216
- if (rules[ rule ]) {
217
- return Array.isArray(rules[ rule ]) ? rules[ rule ][0] : rules[ rule ];
218
- }
219
-
220
- return type;
221
- }, null)
222
- };
223
- }, {})
224
- }
225
- },
226
- rules
227
- };
228
-
229
- function withConfig(rules, config) {
230
- let rulesWithConfig = {};
231
-
232
- for (let name in rules) {
233
- const type = Array.isArray(rules[ name ]) ? rules[ name ][0] : rules[ name ];
234
- rulesWithConfig[ name ] = [ type, config ];
235
- }
236
-
237
- return rulesWithConfig;
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-zeebe-properties': 'error',
25
+ 'no-zeebe-user-task': 'error',
26
+ 'sequence-flow-condition': 'error',
27
+ 'start-event-form': 'error',
28
+ 'subscription': 'error',
29
+ 'timer': 'error',
30
+ 'user-task-definition': 'warn',
31
+ 'user-task-form': 'error',
32
+ 'feel': 'error'
33
+ }, { version: '1.0' });
34
+
35
+ const camundaCloud11Rules = withConfig(camundaCloud10Rules, { version: '1.1' });
36
+
37
+ const camundaCloud12Rules = withConfig(camundaCloud11Rules, { version: '1.2' });
38
+
39
+ const camundaCloud13Rules = withConfig(camundaCloud12Rules, { version: '1.3' });
40
+
41
+ const camundaCloud80Rules = withConfig({
42
+ ...omit(camundaCloud13Rules, 'no-template'),
43
+ 'connector-properties': 'warn'
44
+ }, { version: '8.0' });
45
+
46
+ const camundaCloud81Rules = withConfig({
47
+ ...omit(camundaCloud80Rules, 'no-zeebe-properties'),
48
+ 'inclusive-gateway': 'error'
49
+ }, { version: '8.1' });
50
+
51
+ const camundaCloud82Rules = withConfig({
52
+ ...omit(camundaCloud81Rules, [
53
+ 'no-candidate-users',
54
+ 'no-propagate-all-parent-variables',
55
+ 'no-task-schedule'
56
+ ]),
57
+ 'escalation-boundary-event-attached-to-ref': 'error',
58
+ 'escalation-reference': 'error',
59
+ 'link-event': 'error',
60
+ 'no-signal-event-sub-process': 'error',
61
+ 'task-schedule': 'error'
62
+ }, { version: '8.2' });
63
+
64
+ const camundaCloud83Rules = withConfig({
65
+ ...omit(camundaCloud82Rules, 'no-signal-event-sub-process'),
66
+ 'secrets': 'warn',
67
+ 'signal-reference': 'error'
68
+ }, { version: '8.3' });
69
+
70
+ const camundaCloud84Rules = withConfig(
71
+ omit(camundaCloud83Rules, 'collapsed-subprocess'), { version: '8.4' });
72
+
73
+ const camundaCloud85Rules = withConfig({
74
+ ...omit(camundaCloud83Rules, [
75
+ 'collapsed-subprocess',
76
+ 'no-zeebe-user-task'
77
+ ]),
78
+ 'wait-for-completion': 'error'
79
+ }, { version: '8.5' });
80
+
81
+ const camundaCloud86Rules = withConfig({
82
+ ...omit(camundaCloud85Rules, [
83
+ 'inclusive-gateway',
84
+ 'no-binding-type',
85
+ 'no-execution-listeners',
86
+ 'no-priority-definition'
87
+ ]),
88
+ 'duplicate-execution-listeners': 'error',
89
+ 'execution-listener': 'error',
90
+ 'priority-definition': 'error'
91
+ }, { version: '8.6' });
92
+
93
+ const camundaPlatform719Rules = withConfig({
94
+ 'history-time-to-live': 'info'
95
+ }, {
96
+ platform: 'camunda-platform',
97
+ version: '7.19'
98
+ });
99
+
100
+ const camundaPlatform720Rules = withConfig(camundaPlatform719Rules, {
101
+ platform: 'camunda-platform',
102
+ version: '7.20'
103
+ });
104
+
105
+ const camundaPlatform721Rules = withConfig(camundaPlatform720Rules, {
106
+ platform: 'camunda-platform',
107
+ version: '7.21'
108
+ });
109
+
110
+ const camundaPlatform722Rules = withConfig(camundaPlatform721Rules, {
111
+ platform: 'camunda-platform',
112
+ version: '7.22'
113
+ });
114
+
115
+ const rules = {
116
+ 'element-type': './rules/camunda-cloud/element-type',
117
+ 'called-element': './rules/camunda-cloud/called-element',
118
+ 'collapsed-subprocess': './rules/camunda-cloud/collapsed-subprocess',
119
+ 'connector-properties': './rules/camunda-cloud/connector-properties',
120
+ 'duplicate-execution-listeners': './rules/camunda-cloud/duplicate-execution-listeners',
121
+ 'duplicate-task-headers': './rules/camunda-cloud/duplicate-task-headers',
122
+ 'error-reference': './rules/camunda-cloud/error-reference',
123
+ 'escalation-boundary-event-attached-to-ref': './rules/camunda-cloud/escalation-boundary-event-attached-to-ref',
124
+ 'escalation-reference': './rules/camunda-cloud/escalation-reference',
125
+ 'event-based-gateway-target': './rules/camunda-cloud/event-based-gateway-target',
126
+ 'executable-process': './rules/camunda-cloud/executable-process',
127
+ 'execution-listener': './rules/camunda-cloud/execution-listener',
128
+ 'feel': './rules/camunda-cloud/feel',
129
+ 'history-time-to-live': './rules/camunda-platform/history-time-to-live',
130
+ 'implementation': './rules/camunda-cloud/implementation',
131
+ 'inclusive-gateway': './rules/camunda-cloud/inclusive-gateway',
132
+ 'link-event': './rules/camunda-cloud/link-event',
133
+ 'loop-characteristics': './rules/camunda-cloud/loop-characteristics',
134
+ 'message-reference': './rules/camunda-cloud/message-reference',
135
+ 'no-binding-type': './rules/camunda-cloud/no-binding-type',
136
+ 'no-candidate-users': './rules/camunda-cloud/no-candidate-users',
137
+ 'no-execution-listeners': './rules/camunda-cloud/no-execution-listeners',
138
+ 'no-expression': './rules/camunda-cloud/no-expression',
139
+ 'no-loop': './rules/camunda-cloud/no-loop',
140
+ 'no-multiple-none-start-events': './rules/camunda-cloud/no-multiple-none-start-events',
141
+ 'no-priority-definition': './rules/camunda-cloud/no-priority-definition',
142
+ 'no-propagate-all-parent-variables': './rules/camunda-cloud/no-propagate-all-parent-variables',
143
+ 'no-signal-event-sub-process': './rules/camunda-cloud/no-signal-event-sub-process',
144
+ 'no-task-schedule': './rules/camunda-cloud/no-task-schedule',
145
+ 'no-template': './rules/camunda-cloud/no-template',
146
+ 'no-zeebe-properties': './rules/camunda-cloud/no-zeebe-properties',
147
+ 'no-zeebe-user-task': './rules/camunda-cloud/no-zeebe-user-task',
148
+ 'priority-definition': './rules/camunda-cloud/priority-definition',
149
+ 'secrets': './rules/camunda-cloud/secrets',
150
+ 'sequence-flow-condition': './rules/camunda-cloud/sequence-flow-condition',
151
+ 'signal-reference': './rules/camunda-cloud/signal-reference',
152
+ 'start-event-form': './rules/camunda-cloud/start-event-form',
153
+ 'subscription': './rules/camunda-cloud/subscription',
154
+ 'task-schedule': './rules/camunda-cloud/task-schedule',
155
+ 'timer': './rules/camunda-cloud/timer',
156
+ 'user-task-definition': './rules/camunda-cloud/user-task-definition',
157
+ 'user-task-form': './rules/camunda-cloud/user-task-form',
158
+ 'wait-for-completion': './rules/camunda-cloud/wait-for-completion'
159
+ };
160
+
161
+ const configs = {
162
+ 'camunda-cloud-1-0': {
163
+ rules: camundaCloud10Rules
164
+ },
165
+ 'camunda-cloud-1-1': {
166
+ rules: camundaCloud11Rules
167
+ },
168
+ 'camunda-cloud-1-2': {
169
+ rules: camundaCloud12Rules
170
+ },
171
+ 'camunda-cloud-1-3': {
172
+ rules: camundaCloud13Rules
173
+ },
174
+ 'camunda-cloud-8-0': {
175
+ rules: camundaCloud80Rules
176
+ },
177
+ 'camunda-cloud-8-1': {
178
+ rules: camundaCloud81Rules
179
+ },
180
+ 'camunda-cloud-8-2': {
181
+ rules: camundaCloud82Rules
182
+ },
183
+ 'camunda-cloud-8-3': {
184
+ rules: camundaCloud83Rules
185
+ },
186
+ 'camunda-cloud-8-4': {
187
+ rules: camundaCloud84Rules
188
+ },
189
+ 'camunda-cloud-8-5': {
190
+ rules: camundaCloud85Rules
191
+ },
192
+ 'camunda-cloud-8-6': {
193
+ rules: camundaCloud86Rules
194
+ },
195
+ 'camunda-platform-7-19': {
196
+ rules: camundaPlatform719Rules
197
+ },
198
+ 'camunda-platform-7-20': {
199
+ rules: camundaPlatform720Rules
200
+ },
201
+ 'camunda-platform-7-21': {
202
+ rules: camundaPlatform721Rules
203
+ },
204
+ 'camunda-platform-7-22': {
205
+ rules: camundaPlatform722Rules
206
+ }
207
+ };
208
+
209
+ module.exports = {
210
+ configs: {
211
+ ...configs,
212
+ 'all': {
213
+ rules: Object.keys(rules).reduce((allRules, rule) => {
214
+ return {
215
+ ...allRules,
216
+ [ rule ]: Object.values(configs).reduce((type, { rules }) => {
217
+ if (type) {
218
+ return type;
219
+ }
220
+
221
+ if (rules[ rule ]) {
222
+ return Array.isArray(rules[ rule ]) ? rules[ rule ][0] : rules[ rule ];
223
+ }
224
+
225
+ return type;
226
+ }, null)
227
+ };
228
+ }, {})
229
+ }
230
+ },
231
+ rules
232
+ };
233
+
234
+ function withConfig(rules, config) {
235
+ let rulesWithConfig = {};
236
+
237
+ for (let name in rules) {
238
+ const type = Array.isArray(rules[ name ]) ? rules[ name ][0] : rules[ name ];
239
+ rulesWithConfig[ name ] = [ type, config ];
240
+ }
241
+
242
+ return rulesWithConfig;
238
243
  }