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