@camunda/linting 0.7.0 → 0.7.2
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/Linter.js +1 -15
- package/lib/utils/error-messages.js +24 -0
- package/package.json +1 -1
package/lib/Linter.js
CHANGED
|
@@ -10,7 +10,7 @@ import { isString } from 'min-dash';
|
|
|
10
10
|
import modelerModdle from 'modeler-moddle/resources/modeler.json';
|
|
11
11
|
import zeebeModdle from 'zeebe-bpmn-moddle/resources/zeebe.json';
|
|
12
12
|
|
|
13
|
-
import { getErrorMessage } from './utils/error-messages';
|
|
13
|
+
import { getErrorMessage, getExecutionPlatformLabel } from './utils/error-messages';
|
|
14
14
|
import { getEntryIds } from './utils/properties-panel';
|
|
15
15
|
|
|
16
16
|
const moddle = new BpmnModdle({
|
|
@@ -128,20 +128,6 @@ function getConfigName(executionPlatform, executionPlatformVersion) {
|
|
|
128
128
|
].join('-');
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
-
const executionPlatformLabels = {
|
|
132
|
-
'Camunda Cloud': {
|
|
133
|
-
'1.0': 'Camunda 8 (Zeebe 1.0)',
|
|
134
|
-
'1.1': 'Camunda 8 (Zeebe 1.1)',
|
|
135
|
-
'1.2': 'Camunda 8 (Zeebe 1.2)',
|
|
136
|
-
'1.3': 'Camunda 8 (Zeebe 1.3)',
|
|
137
|
-
'8.0': 'Camunda 8'
|
|
138
|
-
}
|
|
139
|
-
};
|
|
140
|
-
|
|
141
|
-
function getExecutionPlatformLabel(executionPlatform, executionPlatformVersion) {
|
|
142
|
-
return executionPlatformLabels[ executionPlatform ] && executionPlatformLabels[ executionPlatform ][ executionPlatformVersion ];
|
|
143
|
-
}
|
|
144
|
-
|
|
145
131
|
function toLowerCase(string) {
|
|
146
132
|
return string.toLowerCase();
|
|
147
133
|
}
|
|
@@ -65,6 +65,30 @@ export function getErrorMessage(report, executionPlatformLabel, modeler = 'deskt
|
|
|
65
65
|
return message;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
+
const executionPlatformLabels = {
|
|
69
|
+
'Camunda Cloud': {
|
|
70
|
+
'defaultPlatformName': 'Camunda',
|
|
71
|
+
'1.0': 'Camunda 8 (Zeebe 1.0)',
|
|
72
|
+
'1.1': 'Camunda 8 (Zeebe 1.1)',
|
|
73
|
+
'1.2': 'Camunda 8 (Zeebe 1.2)',
|
|
74
|
+
'1.3': 'Camunda 8 (Zeebe 1.3)'
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
export function getExecutionPlatformLabel(executionPlatform, executionPlatformVersion) {
|
|
79
|
+
const translatedLabel = executionPlatformLabels[ executionPlatform ] && executionPlatformLabels[ executionPlatform ][ executionPlatformVersion ];
|
|
80
|
+
|
|
81
|
+
if (translatedLabel) {
|
|
82
|
+
return translatedLabel;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
if (executionPlatformLabels[executionPlatform] && executionPlatformLabels[executionPlatform]['defaultPlatformName']) {
|
|
86
|
+
executionPlatform = executionPlatformLabels[executionPlatform]['defaultPlatformName'];
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
return `${ executionPlatform } ${ executionPlatformVersion }`;
|
|
90
|
+
}
|
|
91
|
+
|
|
68
92
|
function getIndefiniteArticle(type) {
|
|
69
93
|
if ([
|
|
70
94
|
'Error',
|