@gefyra/complies-with-eu 1.3.0 → 1.3.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/CHANGELOG.md +6 -0
- package/README.md +3 -3
- package/package.json +2 -2
- package/src/lib/javaValidator.js +9 -3
- package/src/lib/validatorOutput.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.3.1] - 2026-11-15
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- Profiles that validate without any error were reported as an operational error ("produced no result summary", exit code 2) instead of PASS. HL7 FHIR Validator 7.x prints the success summary as `Success: …` without asterisks, which the output parser did not recognise. Package mode (`validate-batch <package>`) was not affected.
|
|
15
|
+
|
|
10
16
|
## [1.3.0] - 2026-11-15
|
|
11
17
|
|
|
12
18
|
### Added
|
package/README.md
CHANGED
|
@@ -404,7 +404,7 @@ With `--json`, stdout contains only the JSON document (progress goes to stderr);
|
|
|
404
404
|
"package": "hl7.fhir.uv.ips@2.0.0",
|
|
405
405
|
"canonical": "http://hl7.org/fhir/uv/ips/StructureDefinition/Patient-uv-ips",
|
|
406
406
|
"reportPath": "/home/me/.complies-with-eu/workdir/hl7_org_fhir_uv_ips_StructureDefinition_Patient-uv-ips-report.md",
|
|
407
|
-
"tool": { "name": "@gefyra/complies-with-eu", "version": "1.3.
|
|
407
|
+
"tool": { "name": "@gefyra/complies-with-eu", "version": "1.3.1", "validatorVersion": "7.0.5" },
|
|
408
408
|
"validator": { "mode": "local", "summary": "…" },
|
|
409
409
|
"euPackages": [ { "packageName": "hl7.fhir.eu.base", "version": "2.0.1" } ]
|
|
410
410
|
}
|
|
@@ -499,9 +499,9 @@ jobs:
|
|
|
499
499
|
path: |
|
|
500
500
|
~/.complies-with-eu/tools
|
|
501
501
|
~/.fhir/packages
|
|
502
|
-
key: complies-with-eu-${{ runner.os }}-1.3.
|
|
502
|
+
key: complies-with-eu-${{ runner.os }}-1.3.1
|
|
503
503
|
|
|
504
|
-
- run: npm install -g @gefyra/complies-with-eu@1.3.
|
|
504
|
+
- run: npm install -g @gefyra/complies-with-eu@1.3.1
|
|
505
505
|
- run: complies-with-eu init
|
|
506
506
|
|
|
507
507
|
- name: Validate
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gefyra/complies-with-eu",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"description": "CLI that checks whether FHIR profiles comply with the HL7 Europe (EU) profiles, using the compliesWithProfile extension and the HL7 FHIR validator",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"fhir",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"author": "Gefyra GmbH <js@gefyra.de>",
|
|
28
28
|
"type": "commonjs",
|
|
29
29
|
"bin": {
|
|
30
|
-
"complies-with-eu": "
|
|
30
|
+
"complies-with-eu": "bin/complies-with-eu.js"
|
|
31
31
|
},
|
|
32
32
|
"files": [
|
|
33
33
|
"bin/",
|
package/src/lib/javaValidator.js
CHANGED
|
@@ -35,12 +35,18 @@ async function mapSettled(items, limit, fn) {
|
|
|
35
35
|
return results;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
+
// "*FAILURE*: ...", "*SUCCESS*: ..." or "Success: ..." (validator 7.x prints the
|
|
39
|
+
// success summary without asterisks). Anchored at column 0, so issue lines
|
|
40
|
+
// (indented) never match.
|
|
41
|
+
const SUMMARY_LINE = /^\*?(FAILURE|SUCCESS)\*?:\s*(.+)/i;
|
|
42
|
+
|
|
38
43
|
/**
|
|
39
44
|
* Parses the Java Validator console output into structured issues.
|
|
40
45
|
*
|
|
41
46
|
* Expected line formats:
|
|
42
47
|
* *FAILURE*: 6 errors, 18 warnings, 12 notes
|
|
43
|
-
* *SUCCESS*: ...
|
|
48
|
+
* *SUCCESS*: ... (older validators)
|
|
49
|
+
* Success: 0 errors, ... (validator 7.x when there are no errors)
|
|
44
50
|
* Severity @ Location (line X, colY): Message {MSG_ID}
|
|
45
51
|
* Severity @ Location: Message {MSG_ID}
|
|
46
52
|
* sub-detail line
|
|
@@ -56,9 +62,9 @@ function parseValidatorOutput(output) {
|
|
|
56
62
|
|
|
57
63
|
for (const line of lines) {
|
|
58
64
|
// Summary line
|
|
59
|
-
const summaryMatch = line.match(
|
|
65
|
+
const summaryMatch = line.match(SUMMARY_LINE);
|
|
60
66
|
if (summaryMatch) {
|
|
61
|
-
summary = { result: summaryMatch[1], text: summaryMatch[2].trim() };
|
|
67
|
+
summary = { result: summaryMatch[1].toUpperCase(), text: summaryMatch[2].trim() };
|
|
62
68
|
currentIssue = null;
|
|
63
69
|
continue;
|
|
64
70
|
}
|
|
@@ -61,7 +61,7 @@ function extractResultInfo(rawOutput) {
|
|
|
61
61
|
let doneLine = null;
|
|
62
62
|
let summaryCount = 0;
|
|
63
63
|
for (const line of stripAnsi(rawOutput).split(/\r\n|\r|\n/)) {
|
|
64
|
-
if (
|
|
64
|
+
if (/^\*?(FAILURE|SUCCESS)\*?:/i.test(line)) {
|
|
65
65
|
summaryLine = line.trim();
|
|
66
66
|
summaryCount++;
|
|
67
67
|
} else if (/^\s*Done\. Times:/.test(line)) {
|