@camunda/linting 3.17.0 → 3.18.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.
@@ -63,7 +63,8 @@ const rules = {
63
63
  "camunda-compat/task-schedule": "error",
64
64
  "camunda-compat/timer": "error",
65
65
  "camunda-compat/user-task-definition": "warn",
66
- "camunda-compat/user-task-form": "error"
66
+ "camunda-compat/user-task-form": "error",
67
+ "camunda-compat/wait-for-completion": "error"
67
68
  };
68
69
 
69
70
  const config = {
@@ -217,4 +218,8 @@ cache['bpmnlint-plugin-camunda-compat/user-task-definition'] = rule_33;
217
218
 
218
219
  import rule_34 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/user-task-form';
219
220
 
220
- cache['bpmnlint-plugin-camunda-compat/user-task-form'] = rule_34;
221
+ cache['bpmnlint-plugin-camunda-compat/user-task-form'] = rule_34;
222
+
223
+ import rule_35 from 'bpmnlint-plugin-camunda-compat/rules/camunda-cloud/wait-for-completion';
224
+
225
+ cache['bpmnlint-plugin-camunda-compat/wait-for-completion'] = rule_35;
@@ -126,7 +126,7 @@ export function getErrorMessage(report, executionPlatform, executionPlatformVers
126
126
  }
127
127
 
128
128
  if (type === ERROR_TYPES.PROPERTY_VALUE_REQUIRED) {
129
- return getPropertyValueRequiredErrorMessage(report);
129
+ return getPropertyValueRequiredErrorMessage(report, executionPlatform, executionPlatformVersion);
130
130
  }
131
131
 
132
132
  if (type === ERROR_TYPES.EXPRESSION_REQUIRED) {
@@ -228,13 +228,14 @@ function getPropertyValueDuplicatedErrorMessage(report) {
228
228
  return message;
229
229
  }
230
230
 
231
- function getPropertyValueRequiredErrorMessage(report) {
231
+ function getPropertyValueRequiredErrorMessage(report, executionPlatform, executionPlatformVersion) {
232
232
  const {
233
233
  data,
234
234
  message
235
235
  } = report;
236
236
 
237
237
  const {
238
+ allowedVersion,
238
239
  node,
239
240
  property,
240
241
  parentNode
@@ -248,6 +249,12 @@ function getPropertyValueRequiredErrorMessage(report) {
248
249
  }
249
250
  }
250
251
 
252
+ const typeString = getTypeString(parentNode || node);
253
+
254
+ if (is(node, 'bpmn:CompensateEventDefinition') && property === 'waitForCompletion') {
255
+ return getSupportedMessage(`${ getIndefiniteArticle(typeString) } <${ typeString }> with <Wait for completion> disabled`, executionPlatform, executionPlatformVersion, allowedVersion);
256
+ }
257
+
251
258
  return message;
252
259
  }
253
260
 
@@ -312,6 +312,10 @@ export function getEntryIds(report) {
312
312
  return [ 'linkName' ];
313
313
  }
314
314
 
315
+ if (isPropertyError(data, 'waitForCompletion', 'bpmn:CompensateEventDefinition')) {
316
+ return [ 'waitForCompletion' ];
317
+ }
318
+
315
319
  return [];
316
320
  }
317
321
 
@@ -515,6 +519,10 @@ export function getErrorMessage(id, report) {
515
519
  return 'Must be defined.';
516
520
  }
517
521
  }
522
+
523
+ if (id === 'waitForCompletion') {
524
+ return 'Must wait for completion.';
525
+ }
518
526
  }
519
527
 
520
528
  function isExtensionElementNotAllowedError(data, extensionElement, type) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/linting",
3
- "version": "3.17.0",
3
+ "version": "3.18.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.17.0",
35
+ "bpmnlint-plugin-camunda-compat": "^2.18.0",
36
36
  "bpmnlint-utils": "^1.0.2",
37
37
  "camunda-bpmn-moddle": "^7.0.1",
38
38
  "clsx": "^2.0.0",