bpmnlint-plugin-camunda-compat 2.7.0 → 2.7.1

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/index.js CHANGED
@@ -34,8 +34,7 @@ const camundaCloud12Rules = withConfig(camundaCloud11Rules, { version: '1.2' });
34
34
  const camundaCloud13Rules = withConfig(camundaCloud12Rules, { version: '1.3' });
35
35
 
36
36
  const camundaCloud80Rules = withConfig({
37
- ...omit(camundaCloud13Rules, 'no-template'),
38
- 'secrets': 'error'
37
+ ...omit(camundaCloud13Rules, 'no-template')
39
38
  }, { version: '8.0' });
40
39
 
41
40
  const camundaCloud81Rules = withConfig({
@@ -155,10 +154,11 @@ module.exports = {
155
154
  rules
156
155
  };
157
156
 
158
- function withConfig(rules, config, type = 'error') {
157
+ function withConfig(rules, config) {
159
158
  let rulesWithConfig = {};
160
159
 
161
160
  for (let name in rules) {
161
+ const type = Array.isArray(rules[ name ]) ? rules[ name ][0] : rules[ name ];
162
162
  rulesWithConfig[ name ] = [ type, config ];
163
163
  }
164
164
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bpmnlint-plugin-camunda-compat",
3
- "version": "2.7.0",
3
+ "version": "2.7.1",
4
4
  "description": "A bpmnlint plug-in for Camunda Platform compatibility",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -98,12 +98,12 @@ function getReport(propertyName, node, parentNode) {
98
98
  const path = getPath(node, parentNode);
99
99
 
100
100
  return {
101
- message: `Property <${ propertyName }> is not a valid secret`,
101
+ message: `Property <${ propertyName }> uses deprecated secret expression format`,
102
102
  path: path
103
103
  ? [ ...getPath(node, parentNode), propertyName ]
104
104
  : [ propertyName ],
105
105
  data: {
106
- type: ERROR_TYPES.SECRET_EXPRESSION_INVALID,
106
+ type: ERROR_TYPES.SECRET_EXPRESSION_FORMAT_DEPRECATED,
107
107
  node,
108
108
  parentNode: parentNode,
109
109
  property: propertyName
@@ -20,5 +20,5 @@ module.exports.ERROR_TYPES = Object.freeze({
20
20
  PROPERTY_VALUE_DUPLICATED: 'camunda.propertyValueDuplicated',
21
21
  PROPERTY_VALUE_NOT_ALLOWED: 'camunda.propertyValueNotAllowed',
22
22
  PROPERTY_VALUE_REQUIRED: 'camunda.propertyValueRequired',
23
- SECRET_EXPRESSION_INVALID: 'camunda.secretExpressionInvalid'
23
+ SECRET_EXPRESSION_FORMAT_DEPRECATED: 'camunda.secretExpressionFormatDeprecated'
24
24
  });