@camunda/linting 3.5.1 → 3.6.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.
- package/lib/compiled-config.js +47 -32
- package/lib/utils/error-messages.js +67 -0
- package/lib/utils/properties-panel.js +33 -2
- package/package.json +6 -6
package/lib/compiled-config.js
CHANGED
|
@@ -42,15 +42,18 @@ const rules = {
|
|
|
42
42
|
"camunda-compat/history-time-to-live": "error",
|
|
43
43
|
"camunda-compat/implementation": "error",
|
|
44
44
|
"camunda-compat/inclusive-gateway": "error",
|
|
45
|
+
"camunda-compat/link-event": "error",
|
|
45
46
|
"camunda-compat/loop-characteristics": "error",
|
|
46
47
|
"camunda-compat/message-reference": "error",
|
|
47
48
|
"camunda-compat/no-candidate-users": "error",
|
|
48
49
|
"camunda-compat/no-expression": "error",
|
|
49
50
|
"camunda-compat/no-multiple-none-start-events": "error",
|
|
51
|
+
"camunda-compat/no-propagate-all-parent-variables": "error",
|
|
50
52
|
"camunda-compat/no-signal-event-sub-process": "error",
|
|
51
53
|
"camunda-compat/no-task-schedule": "error",
|
|
52
54
|
"camunda-compat/no-template": "error",
|
|
53
55
|
"camunda-compat/no-zeebe-properties": "error",
|
|
56
|
+
"camunda-compat/secrets": "error",
|
|
54
57
|
"camunda-compat/sequence-flow-condition": "error",
|
|
55
58
|
"camunda-compat/signal-reference": "error",
|
|
56
59
|
"camunda-compat/start-form": "error",
|
|
@@ -125,66 +128,78 @@ import rule_12 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/inclusiv
|
|
|
125
128
|
|
|
126
129
|
cache['bpmnlint-plugin-camunda-compat/inclusive-gateway'] = rule_12;
|
|
127
130
|
|
|
128
|
-
import rule_13 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/
|
|
131
|
+
import rule_13 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/link-event';
|
|
129
132
|
|
|
130
|
-
cache['bpmnlint-plugin-camunda-compat/
|
|
133
|
+
cache['bpmnlint-plugin-camunda-compat/link-event'] = rule_13;
|
|
131
134
|
|
|
132
|
-
import rule_14 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/
|
|
135
|
+
import rule_14 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/loop-characteristics';
|
|
133
136
|
|
|
134
|
-
cache['bpmnlint-plugin-camunda-compat/
|
|
137
|
+
cache['bpmnlint-plugin-camunda-compat/loop-characteristics'] = rule_14;
|
|
135
138
|
|
|
136
|
-
import rule_15 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/
|
|
139
|
+
import rule_15 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/message-reference';
|
|
137
140
|
|
|
138
|
-
cache['bpmnlint-plugin-camunda-compat/
|
|
141
|
+
cache['bpmnlint-plugin-camunda-compat/message-reference'] = rule_15;
|
|
139
142
|
|
|
140
|
-
import rule_16 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/no-
|
|
143
|
+
import rule_16 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/no-candidate-users';
|
|
141
144
|
|
|
142
|
-
cache['bpmnlint-plugin-camunda-compat/no-
|
|
145
|
+
cache['bpmnlint-plugin-camunda-compat/no-candidate-users'] = rule_16;
|
|
143
146
|
|
|
144
|
-
import rule_17 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/no-
|
|
147
|
+
import rule_17 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/no-expression';
|
|
145
148
|
|
|
146
|
-
cache['bpmnlint-plugin-camunda-compat/no-
|
|
149
|
+
cache['bpmnlint-plugin-camunda-compat/no-expression'] = rule_17;
|
|
147
150
|
|
|
148
|
-
import rule_18 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/no-
|
|
151
|
+
import rule_18 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/no-multiple-none-start-events';
|
|
149
152
|
|
|
150
|
-
cache['bpmnlint-plugin-camunda-compat/no-
|
|
153
|
+
cache['bpmnlint-plugin-camunda-compat/no-multiple-none-start-events'] = rule_18;
|
|
151
154
|
|
|
152
|
-
import rule_19 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/no-
|
|
155
|
+
import rule_19 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/no-propagate-all-parent-variables';
|
|
153
156
|
|
|
154
|
-
cache['bpmnlint-plugin-camunda-compat/no-
|
|
157
|
+
cache['bpmnlint-plugin-camunda-compat/no-propagate-all-parent-variables'] = rule_19;
|
|
155
158
|
|
|
156
|
-
import rule_20 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/no-
|
|
159
|
+
import rule_20 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/no-signal-event-sub-process';
|
|
157
160
|
|
|
158
|
-
cache['bpmnlint-plugin-camunda-compat/no-
|
|
161
|
+
cache['bpmnlint-plugin-camunda-compat/no-signal-event-sub-process'] = rule_20;
|
|
159
162
|
|
|
160
|
-
import rule_21 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/no-
|
|
163
|
+
import rule_21 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/no-task-schedule';
|
|
161
164
|
|
|
162
|
-
cache['bpmnlint-plugin-camunda-compat/no-
|
|
165
|
+
cache['bpmnlint-plugin-camunda-compat/no-task-schedule'] = rule_21;
|
|
163
166
|
|
|
164
|
-
import rule_22 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/
|
|
167
|
+
import rule_22 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/no-template';
|
|
165
168
|
|
|
166
|
-
cache['bpmnlint-plugin-camunda-compat/
|
|
169
|
+
cache['bpmnlint-plugin-camunda-compat/no-template'] = rule_22;
|
|
167
170
|
|
|
168
|
-
import rule_23 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/
|
|
171
|
+
import rule_23 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/no-zeebe-properties';
|
|
169
172
|
|
|
170
|
-
cache['bpmnlint-plugin-camunda-compat/
|
|
173
|
+
cache['bpmnlint-plugin-camunda-compat/no-zeebe-properties'] = rule_23;
|
|
171
174
|
|
|
172
|
-
import rule_24 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/
|
|
175
|
+
import rule_24 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/secrets';
|
|
173
176
|
|
|
174
|
-
cache['bpmnlint-plugin-camunda-compat/
|
|
177
|
+
cache['bpmnlint-plugin-camunda-compat/secrets'] = rule_24;
|
|
175
178
|
|
|
176
|
-
import rule_25 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/
|
|
179
|
+
import rule_25 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/sequence-flow-condition';
|
|
177
180
|
|
|
178
|
-
cache['bpmnlint-plugin-camunda-compat/
|
|
181
|
+
cache['bpmnlint-plugin-camunda-compat/sequence-flow-condition'] = rule_25;
|
|
179
182
|
|
|
180
|
-
import rule_26 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/
|
|
183
|
+
import rule_26 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/signal-reference';
|
|
181
184
|
|
|
182
|
-
cache['bpmnlint-plugin-camunda-compat/
|
|
185
|
+
cache['bpmnlint-plugin-camunda-compat/signal-reference'] = rule_26;
|
|
183
186
|
|
|
184
|
-
import rule_27 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/
|
|
187
|
+
import rule_27 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/start-form';
|
|
185
188
|
|
|
186
|
-
cache['bpmnlint-plugin-camunda-compat/
|
|
189
|
+
cache['bpmnlint-plugin-camunda-compat/start-form'] = rule_27;
|
|
187
190
|
|
|
188
|
-
import rule_28 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/
|
|
191
|
+
import rule_28 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/subscription';
|
|
189
192
|
|
|
190
|
-
cache['bpmnlint-plugin-camunda-compat/
|
|
193
|
+
cache['bpmnlint-plugin-camunda-compat/subscription'] = rule_28;
|
|
194
|
+
|
|
195
|
+
import rule_29 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/task-schedule';
|
|
196
|
+
|
|
197
|
+
cache['bpmnlint-plugin-camunda-compat/task-schedule'] = rule_29;
|
|
198
|
+
|
|
199
|
+
import rule_30 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/timer';
|
|
200
|
+
|
|
201
|
+
cache['bpmnlint-plugin-camunda-compat/timer'] = rule_30;
|
|
202
|
+
|
|
203
|
+
import rule_31 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/user-task-form';
|
|
204
|
+
|
|
205
|
+
cache['bpmnlint-plugin-camunda-compat/user-task-form'] = rule_31;
|
|
@@ -88,6 +88,10 @@ export function getErrorMessage(report, executionPlatform, executionPlatformVers
|
|
|
88
88
|
return getElementCollapsedNotAllowedErrorMessage(report);
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
+
if (type === ERROR_TYPES.ELEMENT_PROPERTY_VALUE_DUPLICATED) {
|
|
92
|
+
return getElementPropertyValueDuplicatedErrorMessage(report);
|
|
93
|
+
}
|
|
94
|
+
|
|
91
95
|
if (type === ERROR_TYPES.ELEMENT_TYPE_NOT_ALLOWED) {
|
|
92
96
|
return getElementTypeNotAllowedErrorMessage(report, executionPlatform, executionPlatformVersion);
|
|
93
97
|
}
|
|
@@ -116,6 +120,10 @@ export function getErrorMessage(report, executionPlatform, executionPlatformVers
|
|
|
116
120
|
return getPropertyValueDuplicatedErrorMessage(report);
|
|
117
121
|
}
|
|
118
122
|
|
|
123
|
+
if (type == ERROR_TYPES.PROPERTY_VALUE_NOT_ALLOWED) {
|
|
124
|
+
return getPropertyValueNotAllowedErrorMessage(report, executionPlatform, executionPlatformVersion, modeler);
|
|
125
|
+
}
|
|
126
|
+
|
|
119
127
|
if (type === ERROR_TYPES.PROPERTY_VALUE_REQUIRED) {
|
|
120
128
|
return getPropertyValueRequiredErrorMessage(report);
|
|
121
129
|
}
|
|
@@ -136,6 +144,10 @@ export function getErrorMessage(report, executionPlatform, executionPlatformVers
|
|
|
136
144
|
return getEventBasedGatewayTargetNotAllowedErrorMessage(report);
|
|
137
145
|
}
|
|
138
146
|
|
|
147
|
+
if (type === ERROR_TYPES.SECRET_EXPRESSION_INVALID) {
|
|
148
|
+
return getSecretExpressionInvalidErrorMessage(report);
|
|
149
|
+
}
|
|
150
|
+
|
|
139
151
|
return message;
|
|
140
152
|
}
|
|
141
153
|
|
|
@@ -490,6 +502,10 @@ function getPropertyRequiredErrorMessage(report, executionPlatform, executionPla
|
|
|
490
502
|
return `${ getIndefiniteArticle(typeString) } <${ typeString }> must have a defined <History time to live>`;
|
|
491
503
|
}
|
|
492
504
|
|
|
505
|
+
if (is(node, 'bpmn:LinkEventDefinition') && requiredProperty === 'name') {
|
|
506
|
+
return `${ getIndefiniteArticle(typeString) } <${ typeString }> must have a defined <Name>`;
|
|
507
|
+
}
|
|
508
|
+
|
|
493
509
|
return message;
|
|
494
510
|
}
|
|
495
511
|
|
|
@@ -593,4 +609,55 @@ function getEventBasedGatewayTargetNotAllowedErrorMessage(report) {
|
|
|
593
609
|
}
|
|
594
610
|
|
|
595
611
|
return report.message;
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
function getPropertyValueNotAllowedErrorMessage(report, executionPlatform, executionPlatformVersion, modeler = 'desktop') {
|
|
615
|
+
const {
|
|
616
|
+
data,
|
|
617
|
+
message
|
|
618
|
+
} = report;
|
|
619
|
+
|
|
620
|
+
const {
|
|
621
|
+
allowedVersion,
|
|
622
|
+
node,
|
|
623
|
+
parentNode,
|
|
624
|
+
property
|
|
625
|
+
} = data;
|
|
626
|
+
|
|
627
|
+
const typeString = getTypeString(parentNode || node);
|
|
628
|
+
|
|
629
|
+
if (is(node, 'zeebe:CalledElement') && property === 'propagateAllParentVariables') {
|
|
630
|
+
return getSupportedMessage(`${ getIndefiniteArticle(typeString) } <${ typeString }> with <Propagate all variables> disabled`, executionPlatform, executionPlatformVersion, allowedVersion);
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
return message;
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
function getSecretExpressionInvalidErrorMessage(report) {
|
|
637
|
+
const { data } = report;
|
|
638
|
+
|
|
639
|
+
const { property } = data;
|
|
640
|
+
|
|
641
|
+
return `Property <${ property }> is not a valid secret`;
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
function getElementPropertyValueDuplicatedErrorMessage(report) {
|
|
645
|
+
const {
|
|
646
|
+
data,
|
|
647
|
+
message
|
|
648
|
+
} = report;
|
|
649
|
+
|
|
650
|
+
const {
|
|
651
|
+
node,
|
|
652
|
+
parentNode,
|
|
653
|
+
duplicatedProperty
|
|
654
|
+
} = data;
|
|
655
|
+
|
|
656
|
+
const typeString = getTypeString(parentNode || node);
|
|
657
|
+
|
|
658
|
+
if (is(node, 'bpmn:LinkEventDefinition') && duplicatedProperty === 'name') {
|
|
659
|
+
return `${ getIndefiniteArticle(typeString) } <${ typeString }> must have a unique <Name>`;
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
return message;
|
|
596
663
|
}
|
|
@@ -229,9 +229,9 @@ export function getEntryIds(report) {
|
|
|
229
229
|
if (hasType(data, type)
|
|
230
230
|
&& getPropertyName(data)) {
|
|
231
231
|
|
|
232
|
-
const index = path[path.length - 2];
|
|
232
|
+
const index = path[ path.length - 2 ];
|
|
233
233
|
|
|
234
|
-
return [ `${ id }-${prefix}-${index}-${ getPropertyName(data) }` ];
|
|
234
|
+
return [ `${ id }-${ prefix }-${ index }-${ getPropertyName(data) }` ];
|
|
235
235
|
}
|
|
236
236
|
}
|
|
237
237
|
|
|
@@ -271,6 +271,15 @@ export function getEntryIds(report) {
|
|
|
271
271
|
return ids;
|
|
272
272
|
}
|
|
273
273
|
|
|
274
|
+
if (isPropertyError(data, 'propagateAllParentVariables', 'zeebe:CalledElement')) {
|
|
275
|
+
return [ 'propagateAllParentVariables' ];
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
if (isPropertyError(data, 'name', 'bpmn:LinkEventDefinition')
|
|
279
|
+
|| isElementPropertyValueDuplicated(data, 'name', 'bpmn:LinkEventDefinition')) {
|
|
280
|
+
return [ 'linkName' ];
|
|
281
|
+
}
|
|
282
|
+
|
|
274
283
|
return [];
|
|
275
284
|
}
|
|
276
285
|
|
|
@@ -289,6 +298,10 @@ export function getErrorMessage(id, report) {
|
|
|
289
298
|
return 'Cannot be an expression.';
|
|
290
299
|
}
|
|
291
300
|
|
|
301
|
+
if (data.type === ERROR_TYPES.SECRET_EXPRESSION_INVALID) {
|
|
302
|
+
return 'Is not a valid secret.';
|
|
303
|
+
}
|
|
304
|
+
|
|
292
305
|
if (id === 'isExecutable') {
|
|
293
306
|
const { parentNode } = data;
|
|
294
307
|
|
|
@@ -446,6 +459,18 @@ export function getErrorMessage(id, report) {
|
|
|
446
459
|
return 'Must be an ISO 8601 date.';
|
|
447
460
|
}
|
|
448
461
|
}
|
|
462
|
+
|
|
463
|
+
if (id === 'propagateAllParentVariables') {
|
|
464
|
+
return 'Not supported.';
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
if (id === 'linkName') {
|
|
468
|
+
if (data.type === ERROR_TYPES.ELEMENT_PROPERTY_VALUE_DUPLICATED) {
|
|
469
|
+
return 'Must be unique.';
|
|
470
|
+
} else {
|
|
471
|
+
return 'Must be defined.';
|
|
472
|
+
}
|
|
473
|
+
}
|
|
449
474
|
}
|
|
450
475
|
|
|
451
476
|
function isExtensionElementNotAllowedError(data, extensionElement, type) {
|
|
@@ -508,6 +533,12 @@ function isExpressionValueNotAllowedError(data, propertyName, type) {
|
|
|
508
533
|
&& (!type || is(data.node, type));
|
|
509
534
|
}
|
|
510
535
|
|
|
536
|
+
function isElementPropertyValueDuplicated(data, propertyName, type) {
|
|
537
|
+
return data.type === ERROR_TYPES.ELEMENT_PROPERTY_VALUE_DUPLICATED
|
|
538
|
+
&& data.duplicatedProperty === propertyName
|
|
539
|
+
&& (!type || is(data.node, type));
|
|
540
|
+
}
|
|
541
|
+
|
|
511
542
|
function getBusinessObject(element) {
|
|
512
543
|
return element.businessObject || element;
|
|
513
544
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camunda/linting",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.6.0",
|
|
4
4
|
"description": "Linting for Camunda Platform",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -32,20 +32,20 @@
|
|
|
32
32
|
"@bpmn-io/diagram-js-ui": "^0.2.2",
|
|
33
33
|
"bpmn-moddle": "^8.0.0",
|
|
34
34
|
"bpmnlint": "^9.2.0",
|
|
35
|
-
"bpmnlint-plugin-camunda-compat": "^2.
|
|
35
|
+
"bpmnlint-plugin-camunda-compat": "^2.6.3",
|
|
36
36
|
"bpmnlint-utils": "^1.0.2",
|
|
37
37
|
"clsx": "^2.0.0",
|
|
38
38
|
"min-dash": "^4.0.0",
|
|
39
39
|
"min-dom": "^4.1.0",
|
|
40
40
|
"modeler-moddle": "^0.2.0",
|
|
41
41
|
"semver-compare": "^1.0.0",
|
|
42
|
-
"zeebe-bpmn-moddle": "^0.
|
|
42
|
+
"zeebe-bpmn-moddle": "^1.0.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"bpmn-js": "^13.2.2",
|
|
46
|
-
"bpmn-js-element-templates": "^1.
|
|
47
|
-
"bpmn-js-properties-panel": "^
|
|
48
|
-
"camunda-bpmn-js-behaviors": "^0.
|
|
46
|
+
"bpmn-js-element-templates": "^1.3.0",
|
|
47
|
+
"bpmn-js-properties-panel": "^5.0.0",
|
|
48
|
+
"camunda-bpmn-js-behaviors": "^1.0.0",
|
|
49
49
|
"chai": "^4.3.7",
|
|
50
50
|
"cross-env": "^7.0.3",
|
|
51
51
|
"eslint": "^8.45.0",
|