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