@camunda/linting 3.15.0 → 3.17.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
CHANGED
|
@@ -39,7 +39,7 @@ const rules = {
|
|
|
39
39
|
"camunda-compat/event-based-gateway-target": "error",
|
|
40
40
|
"camunda-compat/executable-process": "error",
|
|
41
41
|
"camunda-compat/feel": "error",
|
|
42
|
-
"camunda-compat/history-time-to-live": "
|
|
42
|
+
"camunda-compat/history-time-to-live": "info",
|
|
43
43
|
"camunda-compat/implementation": "error",
|
|
44
44
|
"camunda-compat/inclusive-gateway": "error",
|
|
45
45
|
"camunda-compat/link-event": "error",
|
|
@@ -54,13 +54,15 @@ const rules = {
|
|
|
54
54
|
"camunda-compat/no-task-schedule": "error",
|
|
55
55
|
"camunda-compat/no-template": "error",
|
|
56
56
|
"camunda-compat/no-zeebe-properties": "error",
|
|
57
|
-
"camunda-compat/
|
|
57
|
+
"camunda-compat/no-zeebe-user-task": "error",
|
|
58
|
+
"camunda-compat/secrets": "warn",
|
|
58
59
|
"camunda-compat/sequence-flow-condition": "error",
|
|
59
60
|
"camunda-compat/signal-reference": "error",
|
|
60
61
|
"camunda-compat/start-event-form": "error",
|
|
61
62
|
"camunda-compat/subscription": "error",
|
|
62
63
|
"camunda-compat/task-schedule": "error",
|
|
63
64
|
"camunda-compat/timer": "error",
|
|
65
|
+
"camunda-compat/user-task-definition": "warn",
|
|
64
66
|
"camunda-compat/user-task-form": "error"
|
|
65
67
|
};
|
|
66
68
|
|
|
@@ -177,34 +179,42 @@ import rule_24 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/no-zeebe
|
|
|
177
179
|
|
|
178
180
|
cache['bpmnlint-plugin-camunda-compat/no-zeebe-properties'] = rule_24;
|
|
179
181
|
|
|
180
|
-
import rule_25 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/
|
|
182
|
+
import rule_25 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/no-zeebe-user-task';
|
|
181
183
|
|
|
182
|
-
cache['bpmnlint-plugin-camunda-compat/
|
|
184
|
+
cache['bpmnlint-plugin-camunda-compat/no-zeebe-user-task'] = rule_25;
|
|
183
185
|
|
|
184
|
-
import rule_26 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/
|
|
186
|
+
import rule_26 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/secrets';
|
|
185
187
|
|
|
186
|
-
cache['bpmnlint-plugin-camunda-compat/
|
|
188
|
+
cache['bpmnlint-plugin-camunda-compat/secrets'] = rule_26;
|
|
187
189
|
|
|
188
|
-
import rule_27 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/
|
|
190
|
+
import rule_27 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/sequence-flow-condition';
|
|
189
191
|
|
|
190
|
-
cache['bpmnlint-plugin-camunda-compat/
|
|
192
|
+
cache['bpmnlint-plugin-camunda-compat/sequence-flow-condition'] = rule_27;
|
|
191
193
|
|
|
192
|
-
import rule_28 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/
|
|
194
|
+
import rule_28 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/signal-reference';
|
|
193
195
|
|
|
194
|
-
cache['bpmnlint-plugin-camunda-compat/
|
|
196
|
+
cache['bpmnlint-plugin-camunda-compat/signal-reference'] = rule_28;
|
|
195
197
|
|
|
196
|
-
import rule_29 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/
|
|
198
|
+
import rule_29 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/start-event-form';
|
|
197
199
|
|
|
198
|
-
cache['bpmnlint-plugin-camunda-compat/
|
|
200
|
+
cache['bpmnlint-plugin-camunda-compat/start-event-form'] = rule_29;
|
|
199
201
|
|
|
200
|
-
import rule_30 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/
|
|
202
|
+
import rule_30 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/subscription';
|
|
201
203
|
|
|
202
|
-
cache['bpmnlint-plugin-camunda-compat/
|
|
204
|
+
cache['bpmnlint-plugin-camunda-compat/subscription'] = rule_30;
|
|
203
205
|
|
|
204
|
-
import rule_31 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/
|
|
206
|
+
import rule_31 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/task-schedule';
|
|
205
207
|
|
|
206
|
-
cache['bpmnlint-plugin-camunda-compat/
|
|
208
|
+
cache['bpmnlint-plugin-camunda-compat/task-schedule'] = rule_31;
|
|
207
209
|
|
|
208
|
-
import rule_32 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/
|
|
210
|
+
import rule_32 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/timer';
|
|
209
211
|
|
|
210
|
-
cache['bpmnlint-plugin-camunda-compat/
|
|
212
|
+
cache['bpmnlint-plugin-camunda-compat/timer'] = rule_32;
|
|
213
|
+
|
|
214
|
+
import rule_33 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/user-task-definition';
|
|
215
|
+
|
|
216
|
+
cache['bpmnlint-plugin-camunda-compat/user-task-definition'] = rule_33;
|
|
217
|
+
|
|
218
|
+
import rule_34 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/user-task-form';
|
|
219
|
+
|
|
220
|
+
cache['bpmnlint-plugin-camunda-compat/user-task-form'] = rule_34;
|
|
@@ -274,6 +274,10 @@ function getExtensionElementNotAllowedErrorMessage(report, executionPlatform, ex
|
|
|
274
274
|
return getSupportedMessage(`${ getIndefiniteArticle(typeString) } <${ typeString }> with <Extension properties>`, executionPlatform, executionPlatformVersion, allowedVersion);
|
|
275
275
|
}
|
|
276
276
|
|
|
277
|
+
if (is(extensionElement, 'zeebe:UserTask')) {
|
|
278
|
+
return getSupportedMessage('A <User Task> with <Implementation: Zeebe user task>', executionPlatform, executionPlatformVersion, allowedVersion);
|
|
279
|
+
}
|
|
280
|
+
|
|
277
281
|
if (is(node, 'bpmn:ScriptTask') && is(extensionElement, 'zeebe:Script')) {
|
|
278
282
|
return getSupportedMessage('A <Script Task> with <Implementation: FEEL expression>', executionPlatform, executionPlatformVersion, allowedVersion);
|
|
279
283
|
}
|
|
@@ -328,7 +332,7 @@ function getExtensionElementRequiredErrorMessage(report) {
|
|
|
328
332
|
}
|
|
329
333
|
|
|
330
334
|
if (requiredExtensionElement === 'zeebe:FormDefinition') {
|
|
331
|
-
return `${ getIndefiniteArticle(typeString) } <${ typeString }>
|
|
335
|
+
return `${ getIndefiniteArticle(typeString) } <${ typeString }> should have a defined <Form>`;
|
|
332
336
|
}
|
|
333
337
|
|
|
334
338
|
return message;
|
|
@@ -500,6 +504,15 @@ function getPropertyRequiredErrorMessage(report, executionPlatform, executionPla
|
|
|
500
504
|
return `${ getIndefiniteArticle(typeString) } <${ typeString }> with <Form type: Custom form key> must have a defined <Form key>`;
|
|
501
505
|
}
|
|
502
506
|
|
|
507
|
+
// Zeebe User Task
|
|
508
|
+
if (is(node, 'zeebe:FormDefinition') && isZeebeUserTask(parentNode)) {
|
|
509
|
+
if (isEmptyString(node.get('externalReference'))) {
|
|
510
|
+
return `${ getIndefiniteArticle(typeString) } <${ typeString }> with <Form type: External reference> must have a defined <External reference>`;
|
|
511
|
+
} else if (isEmptyString(node.get('formId'))) {
|
|
512
|
+
return `${ getIndefiniteArticle(typeString) } <${ typeString }> with <Form type: Camunda Form> must have a defined <Form ID>`;
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
|
|
503
516
|
if (is(node, 'zeebe:FormDefinition') && isArray(requiredProperty) && requiredProperty.includes('formId') && isEmptyString(node.get('formId'))) {
|
|
504
517
|
return `${ getIndefiniteArticle(typeString) } <${ typeString }> with <Form type: Camunda form (linked)> must have a defined <Form ID>`;
|
|
505
518
|
}
|
|
@@ -693,4 +706,10 @@ function getLoopNotAllowedErrorMessage(report) {
|
|
|
693
706
|
|
|
694
707
|
function isEmptyString(value) {
|
|
695
708
|
return isString(value) && value.trim() === '';
|
|
696
|
-
}
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
function isZeebeUserTask(node) {
|
|
712
|
+
return node.get('extensionElements').get('values').some(extensionElement => {
|
|
713
|
+
return is(extensionElement, 'zeebe:UserTask');
|
|
714
|
+
});
|
|
715
|
+
}
|
|
@@ -168,10 +168,14 @@ export function getEntryIds(report) {
|
|
|
168
168
|
requiredProperty
|
|
169
169
|
} = data;
|
|
170
170
|
|
|
171
|
-
if (isArray(requiredProperty)
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
171
|
+
if (isArray(requiredProperty)) {
|
|
172
|
+
if (requiredProperty.includes('formKey') && isEmptyString(node.get('formKey'))) {
|
|
173
|
+
return [ 'customFormKey' ];
|
|
174
|
+
} else if (requiredProperty.includes('formId') && isEmptyString(node.get('formId'))) {
|
|
175
|
+
return [ 'formId' ];
|
|
176
|
+
} else if (requiredProperty.includes('externalReference') && isEmptyString(node.get('externalReference'))) {
|
|
177
|
+
return [ 'externalReference' ];
|
|
178
|
+
}
|
|
175
179
|
}
|
|
176
180
|
}
|
|
177
181
|
|
|
@@ -205,6 +209,10 @@ export function getEntryIds(report) {
|
|
|
205
209
|
});
|
|
206
210
|
}
|
|
207
211
|
|
|
212
|
+
if (isExtensionElementNotAllowedError(data, 'zeebe:UserTask')) {
|
|
213
|
+
return [ 'userTaskImplementation' ];
|
|
214
|
+
}
|
|
215
|
+
|
|
208
216
|
if (isExtensionElementNotAllowedError(data, 'zeebe:FormDefinition', 'bpmn:StartEvent')) {
|
|
209
217
|
return [ 'formType' ];
|
|
210
218
|
}
|
|
@@ -424,6 +432,10 @@ export function getErrorMessage(id, report) {
|
|
|
424
432
|
}
|
|
425
433
|
}
|
|
426
434
|
|
|
435
|
+
if (id === 'externalReference') {
|
|
436
|
+
return 'External reference must be defined.';
|
|
437
|
+
}
|
|
438
|
+
|
|
427
439
|
if (id === 'formConfiguration') {
|
|
428
440
|
return 'Form JSON configuration must be defined.';
|
|
429
441
|
}
|
|
@@ -436,6 +448,10 @@ export function getErrorMessage(id, report) {
|
|
|
436
448
|
return 'Not supported.';
|
|
437
449
|
}
|
|
438
450
|
|
|
451
|
+
if (id === 'userTaskImplementation') {
|
|
452
|
+
return 'Supported only in Camunda 8.5 or newer.';
|
|
453
|
+
}
|
|
454
|
+
|
|
439
455
|
if (id === 'conditionExpression') {
|
|
440
456
|
return 'Condition expression must be defined.';
|
|
441
457
|
}
|
|
@@ -472,10 +488,6 @@ export function getErrorMessage(id, report) {
|
|
|
472
488
|
return 'Not supported.';
|
|
473
489
|
}
|
|
474
490
|
|
|
475
|
-
if (id === 'historyTimeToLive') {
|
|
476
|
-
return 'Time to live must be defined.';
|
|
477
|
-
}
|
|
478
|
-
|
|
479
491
|
if (id === 'taskScheduleDueDate') {
|
|
480
492
|
if (data.type === ERROR_TYPES.EXTENSION_ELEMENT_NOT_ALLOWED) {
|
|
481
493
|
return 'Not supported.';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camunda/linting",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.17.0",
|
|
4
4
|
"description": "Linting for Camunda",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"@bpmn-io/diagram-js-ui": "^0.2.2",
|
|
33
33
|
"bpmn-moddle": "^8.1.0",
|
|
34
34
|
"bpmnlint": "^10.2.0",
|
|
35
|
-
"bpmnlint-plugin-camunda-compat": "^2.
|
|
35
|
+
"bpmnlint-plugin-camunda-compat": "^2.17.0",
|
|
36
36
|
"bpmnlint-utils": "^1.0.2",
|
|
37
37
|
"camunda-bpmn-moddle": "^7.0.1",
|
|
38
38
|
"clsx": "^2.0.0",
|
|
@@ -40,13 +40,13 @@
|
|
|
40
40
|
"min-dom": "^4.1.0",
|
|
41
41
|
"modeler-moddle": "^0.2.0",
|
|
42
42
|
"semver-compare": "^1.0.0",
|
|
43
|
-
"zeebe-bpmn-moddle": "^1.
|
|
43
|
+
"zeebe-bpmn-moddle": "^1.1.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"bpmn-js": "^16.5.0",
|
|
47
47
|
"bpmn-js-element-templates": "^1.13.1",
|
|
48
|
-
"bpmn-js-properties-panel": "^5.
|
|
49
|
-
"camunda-bpmn-js-behaviors": "^1.
|
|
48
|
+
"bpmn-js-properties-panel": "^5.13.0",
|
|
49
|
+
"camunda-bpmn-js-behaviors": "^1.3.0",
|
|
50
50
|
"chai": "^4.4.1",
|
|
51
51
|
"cross-env": "^7.0.3",
|
|
52
52
|
"eslint": "^8.56.0",
|
|
@@ -76,6 +76,7 @@
|
|
|
76
76
|
"files": [
|
|
77
77
|
"assets",
|
|
78
78
|
"lib",
|
|
79
|
+
"index.js",
|
|
79
80
|
"modeler.js"
|
|
80
81
|
],
|
|
81
82
|
"publishConfig": {
|