bpmnlint-plugin-camunda-compat 2.22.0 → 2.23.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 (56) hide show
  1. package/LICENSE +20 -20
  2. package/README.md +39 -39
  3. package/index.js +237 -231
  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 +44 -0
  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-propagate-all-parent-variables.js +44 -44
  33. package/rules/camunda-cloud/no-signal-event-sub-process.js +45 -45
  34. package/rules/camunda-cloud/no-task-schedule.js +18 -18
  35. package/rules/camunda-cloud/no-template.js +23 -23
  36. package/rules/camunda-cloud/no-zeebe-properties.js +18 -18
  37. package/rules/camunda-cloud/no-zeebe-user-task.js +27 -27
  38. package/rules/camunda-cloud/secrets.js +119 -119
  39. package/rules/camunda-cloud/sequence-flow-condition.js +56 -56
  40. package/rules/camunda-cloud/signal-reference.js +64 -64
  41. package/rules/camunda-cloud/start-event-form.js +97 -97
  42. package/rules/camunda-cloud/subscription.js +65 -65
  43. package/rules/camunda-cloud/task-schedule.js +67 -67
  44. package/rules/camunda-cloud/timer/config.js +46 -46
  45. package/rules/camunda-cloud/timer/index.js +183 -183
  46. package/rules/camunda-cloud/user-task-definition.js +24 -24
  47. package/rules/camunda-cloud/user-task-form.js +142 -142
  48. package/rules/camunda-cloud/wait-for-completion.js +46 -46
  49. package/rules/camunda-platform/history-time-to-live.js +19 -19
  50. package/rules/utils/cron.js +95 -95
  51. package/rules/utils/element.js +533 -533
  52. package/rules/utils/error-types.js +25 -25
  53. package/rules/utils/iso8601.js +52 -52
  54. package/rules/utils/reporter.js +37 -37
  55. package/rules/utils/rule.js +46 -46
  56. 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,232 +1,238 @@
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-candidate-users': 'error',
15
- 'no-execution-listeners': 'error',
16
- 'no-expression': 'error',
17
- 'no-loop': 'error',
18
- 'no-multiple-none-start-events': 'error',
19
- 'no-propagate-all-parent-variables': 'error',
20
- 'no-task-schedule': 'error',
21
- 'no-template': 'error',
22
- 'no-zeebe-properties': 'error',
23
- 'no-zeebe-user-task': 'error',
24
- 'sequence-flow-condition': 'error',
25
- 'start-event-form': 'error',
26
- 'subscription': 'error',
27
- 'timer': 'error',
28
- 'user-task-definition': 'warn',
29
- 'user-task-form': 'error',
30
- 'feel': 'error'
31
- }, { version: '1.0' });
32
-
33
- const camundaCloud11Rules = withConfig(camundaCloud10Rules, { version: '1.1' });
34
-
35
- const camundaCloud12Rules = withConfig(camundaCloud11Rules, { version: '1.2' });
36
-
37
- const camundaCloud13Rules = withConfig(camundaCloud12Rules, { version: '1.3' });
38
-
39
- const camundaCloud80Rules = withConfig({
40
- ...omit(camundaCloud13Rules, 'no-template'),
41
- 'connector-properties': 'warn'
42
- }, { version: '8.0' });
43
-
44
- const camundaCloud81Rules = withConfig({
45
- ...omit(camundaCloud80Rules, 'no-zeebe-properties'),
46
- 'inclusive-gateway': 'error'
47
- }, { version: '8.1' });
48
-
49
- const camundaCloud82Rules = withConfig({
50
- ...omit(camundaCloud81Rules, [
51
- 'no-candidate-users',
52
- 'no-propagate-all-parent-variables',
53
- 'no-task-schedule'
54
- ]),
55
- 'escalation-boundary-event-attached-to-ref': 'error',
56
- 'escalation-reference': 'error',
57
- 'link-event': 'error',
58
- 'no-signal-event-sub-process': 'error',
59
- 'task-schedule': 'error'
60
- }, { version: '8.2' });
61
-
62
- const camundaCloud83Rules = withConfig({
63
- ...omit(camundaCloud82Rules, 'no-signal-event-sub-process'),
64
- 'secrets': 'warn',
65
- 'signal-reference': 'error'
66
- }, { version: '8.3' });
67
-
68
- const camundaCloud84Rules = withConfig(
69
- omit(camundaCloud83Rules, 'collapsed-subprocess'), { version: '8.4' });
70
-
71
- const camundaCloud85Rules = withConfig({
72
- ...omit(camundaCloud83Rules, [
73
- 'collapsed-subprocess',
74
- 'no-zeebe-user-task'
75
- ]),
76
- 'wait-for-completion': 'error'
77
- }, { version: '8.5' });
78
-
79
- const camundaCloud86Rules = withConfig({
80
- ...omit(camundaCloud85Rules, [ 'inclusive-gateway', 'no-execution-listeners' ]),
81
- 'duplicate-execution-listeners': 'error',
82
- 'execution-listener': 'error'
83
- }, { version: '8.6' });
84
-
85
- const camundaPlatform719Rules = withConfig({
86
- 'history-time-to-live': 'info'
87
- }, {
88
- platform: 'camunda-platform',
89
- version: '7.19'
90
- });
91
-
92
- const camundaPlatform720Rules = withConfig(camundaPlatform719Rules, {
93
- platform: 'camunda-platform',
94
- version: '7.20'
95
- });
96
-
97
- const camundaPlatform721Rules = withConfig(camundaPlatform720Rules, {
98
- platform: 'camunda-platform',
99
- version: '7.21'
100
- });
101
-
102
- const camundaPlatform722Rules = withConfig(camundaPlatform721Rules, {
103
- platform: 'camunda-platform',
104
- version: '7.22'
105
- });
106
-
107
- const rules = {
108
- 'element-type': './rules/camunda-cloud/element-type',
109
- 'called-element': './rules/camunda-cloud/called-element',
110
- 'collapsed-subprocess': './rules/camunda-cloud/collapsed-subprocess',
111
- 'connector-properties': './rules/camunda-cloud/connector-properties',
112
- 'duplicate-execution-listeners': './rules/camunda-cloud/duplicate-execution-listeners',
113
- 'duplicate-task-headers': './rules/camunda-cloud/duplicate-task-headers',
114
- 'error-reference': './rules/camunda-cloud/error-reference',
115
- 'escalation-boundary-event-attached-to-ref': './rules/camunda-cloud/escalation-boundary-event-attached-to-ref',
116
- 'escalation-reference': './rules/camunda-cloud/escalation-reference',
117
- 'event-based-gateway-target': './rules/camunda-cloud/event-based-gateway-target',
118
- 'executable-process': './rules/camunda-cloud/executable-process',
119
- 'execution-listener': './rules/camunda-cloud/execution-listener',
120
- 'feel': './rules/camunda-cloud/feel',
121
- 'history-time-to-live': './rules/camunda-platform/history-time-to-live',
122
- 'implementation': './rules/camunda-cloud/implementation',
123
- 'inclusive-gateway': './rules/camunda-cloud/inclusive-gateway',
124
- 'link-event': './rules/camunda-cloud/link-event',
125
- 'loop-characteristics': './rules/camunda-cloud/loop-characteristics',
126
- 'message-reference': './rules/camunda-cloud/message-reference',
127
- 'no-candidate-users': './rules/camunda-cloud/no-candidate-users',
128
- 'no-execution-listeners': './rules/camunda-cloud/no-execution-listeners',
129
- 'no-expression': './rules/camunda-cloud/no-expression',
130
- 'no-loop': './rules/camunda-cloud/no-loop',
131
- 'no-multiple-none-start-events': './rules/camunda-cloud/no-multiple-none-start-events',
132
- 'no-propagate-all-parent-variables': './rules/camunda-cloud/no-propagate-all-parent-variables',
133
- 'no-signal-event-sub-process': './rules/camunda-cloud/no-signal-event-sub-process',
134
- 'no-task-schedule': './rules/camunda-cloud/no-task-schedule',
135
- 'no-template': './rules/camunda-cloud/no-template',
136
- 'no-zeebe-properties': './rules/camunda-cloud/no-zeebe-properties',
137
- 'no-zeebe-user-task': './rules/camunda-cloud/no-zeebe-user-task',
138
- 'secrets': './rules/camunda-cloud/secrets',
139
- 'sequence-flow-condition': './rules/camunda-cloud/sequence-flow-condition',
140
- 'signal-reference': './rules/camunda-cloud/signal-reference',
141
- 'start-event-form': './rules/camunda-cloud/start-event-form',
142
- 'subscription': './rules/camunda-cloud/subscription',
143
- 'task-schedule': './rules/camunda-cloud/task-schedule',
144
- 'timer': './rules/camunda-cloud/timer',
145
- 'user-task-definition': './rules/camunda-cloud/user-task-definition',
146
- 'user-task-form': './rules/camunda-cloud/user-task-form',
147
- 'wait-for-completion': './rules/camunda-cloud/wait-for-completion'
148
- };
149
-
150
- const configs = {
151
- 'camunda-cloud-1-0': {
152
- rules: camundaCloud10Rules
153
- },
154
- 'camunda-cloud-1-1': {
155
- rules: camundaCloud11Rules
156
- },
157
- 'camunda-cloud-1-2': {
158
- rules: camundaCloud12Rules
159
- },
160
- 'camunda-cloud-1-3': {
161
- rules: camundaCloud13Rules
162
- },
163
- 'camunda-cloud-8-0': {
164
- rules: camundaCloud80Rules
165
- },
166
- 'camunda-cloud-8-1': {
167
- rules: camundaCloud81Rules
168
- },
169
- 'camunda-cloud-8-2': {
170
- rules: camundaCloud82Rules
171
- },
172
- 'camunda-cloud-8-3': {
173
- rules: camundaCloud83Rules
174
- },
175
- 'camunda-cloud-8-4': {
176
- rules: camundaCloud84Rules
177
- },
178
- 'camunda-cloud-8-5': {
179
- rules: camundaCloud85Rules
180
- },
181
- 'camunda-cloud-8-6': {
182
- rules: camundaCloud86Rules
183
- },
184
- 'camunda-platform-7-19': {
185
- rules: camundaPlatform719Rules
186
- },
187
- 'camunda-platform-7-20': {
188
- rules: camundaPlatform720Rules
189
- },
190
- 'camunda-platform-7-21': {
191
- rules: camundaPlatform721Rules
192
- },
193
- 'camunda-platform-7-22': {
194
- rules: camundaPlatform722Rules
195
- }
196
- };
197
-
198
- module.exports = {
199
- configs: {
200
- ...configs,
201
- 'all': {
202
- rules: Object.keys(rules).reduce((allRules, rule) => {
203
- return {
204
- ...allRules,
205
- [ rule ]: Object.values(configs).reduce((type, { rules }) => {
206
- if (type) {
207
- return type;
208
- }
209
-
210
- if (rules[ rule ]) {
211
- return Array.isArray(rules[ rule ]) ? rules[ rule ][0] : rules[ rule ];
212
- }
213
-
214
- return type;
215
- }, null)
216
- };
217
- }, {})
218
- }
219
- },
220
- rules
221
- };
222
-
223
- function withConfig(rules, config) {
224
- let rulesWithConfig = {};
225
-
226
- for (let name in rules) {
227
- const type = Array.isArray(rules[ name ]) ? rules[ name ][0] : rules[ name ];
228
- rulesWithConfig[ name ] = [ type, config ];
229
- }
230
-
231
- 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-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;
232
238
  }