bpmnlint-plugin-camunda-compat 0.15.0 → 0.15.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/package.json
CHANGED
@@ -11,27 +11,52 @@ module.exports = function() {
|
|
11
11
|
}
|
12
12
|
|
13
13
|
const rootElements = node.get('rootElements'),
|
14
|
+
collaboration = rootElements.find(rootElement => is(rootElement, 'bpmn:Collaboration')),
|
14
15
|
processes = rootElements.filter(rootElement => is(rootElement, 'bpmn:Process'));
|
15
16
|
|
16
17
|
let errors = [];
|
17
18
|
|
18
19
|
for (const process of processes) {
|
20
|
+
const parentNode = getParentNode(process, collaboration);
|
21
|
+
|
19
22
|
errors = [
|
20
23
|
...errors,
|
21
24
|
...hasProperties(process, {
|
22
25
|
isExecutable: {
|
23
26
|
value: true
|
24
27
|
}
|
25
|
-
},
|
28
|
+
}, parentNode)
|
26
29
|
];
|
27
30
|
}
|
28
31
|
|
29
32
|
if (errors.length > processes.length - 1) {
|
30
|
-
|
33
|
+
errors.forEach(error => {
|
34
|
+
const { data } = error;
|
35
|
+
|
36
|
+
const { node: process } = data;
|
37
|
+
|
38
|
+
reportErrors(getParentNode(process, collaboration), reporter, error);
|
39
|
+
});
|
31
40
|
}
|
32
41
|
}
|
33
42
|
|
34
43
|
return {
|
35
44
|
check
|
36
45
|
};
|
37
|
-
};
|
46
|
+
};
|
47
|
+
|
48
|
+
function getParentNode(process, collaboration) {
|
49
|
+
if (!collaboration) {
|
50
|
+
return process;
|
51
|
+
}
|
52
|
+
|
53
|
+
const participants = collaboration.get('participants');
|
54
|
+
|
55
|
+
const participant = participants.find(participant => participant.get('processRef') === process);
|
56
|
+
|
57
|
+
if (participant) {
|
58
|
+
return participant;
|
59
|
+
}
|
60
|
+
|
61
|
+
return process;
|
62
|
+
}
|
package/rules/utils/iso8601.js
CHANGED
@@ -9,7 +9,7 @@ const ZONE_ID = '(\\[[^\\]]+\\])';
|
|
9
9
|
const TIMEZONE = `(Z|([+-](0[0-9]|1[0-3]):[0-5][0-9]${ZONE_ID}?))`;
|
10
10
|
|
11
11
|
const ISO_DATE_REGEX = new RegExp(`^${DATE}T${HOUR}:${MINUTE}:${SECOND}${TIMEZONE}$`);
|
12
|
-
const ISO_DURATION = 'P(?!$)(\\d+(\\.\\d+)?[Yy])?(\\d+(\\.\\d+)?[Mm])?(\\d+(\\.\\d+)?[Dd])?(T(?!$)(\\d+(\\.\\d+)?[Hh])?(\\d+(\\.\\d+)?[Mm])?(\\d+(\\.\\d+)?[Ss])?)?$';
|
12
|
+
const ISO_DURATION = 'P(?!$)(\\d+(\\.\\d+)?[Yy])?(\\d+(\\.\\d+)?[Mm])?(\\d+(\\.\\d+)?[Ww])?(\\d+(\\.\\d+)?[Dd])?(T(?!$)(\\d+(\\.\\d+)?[Hh])?(\\d+(\\.\\d+)?[Mm])?(\\d+(\\.\\d+)?[Ss])?)?$';
|
13
13
|
const ISO_DURATION_REGEX = new RegExp(`^${ISO_DURATION}$`);
|
14
14
|
const ISO_CYCLE = `R(-1|\\d+)?/${ISO_DURATION}`;
|
15
15
|
const ISO_CYCLE_REGEX = new RegExp(`^${ISO_CYCLE}$`);
|