@shaclmate/cli 4.0.8 → 4.0.10
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/dist/cli.js +4 -4
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -46,13 +46,13 @@ function generate({ generator, inputFilePaths, outputFilePath, }) {
|
|
|
46
46
|
iriPrefixes.push([prefix, prefixNode]);
|
|
47
47
|
}));
|
|
48
48
|
}
|
|
49
|
-
const
|
|
49
|
+
const prefixMap = new PrefixMap(iriPrefixes, { factory: DataFactory });
|
|
50
50
|
{
|
|
51
51
|
const validationReport = new SHACLValidator(shaclShaclDataset, {}).validate(dataset);
|
|
52
52
|
if (!validationReport.conforms) {
|
|
53
53
|
process.stderr.write("input is not valid SHACL:\n");
|
|
54
54
|
const n3WriterPrefixes = {};
|
|
55
|
-
for (const prefixEntry of
|
|
55
|
+
for (const prefixEntry of prefixMap.entries()) {
|
|
56
56
|
n3WriterPrefixes[prefixEntry[0]] = prefixEntry[1].value;
|
|
57
57
|
}
|
|
58
58
|
const n3Writer = new Writer({
|
|
@@ -66,8 +66,8 @@ function generate({ generator, inputFilePaths, outputFilePath, }) {
|
|
|
66
66
|
return;
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
|
-
ShapesGraph.create({ dataset })
|
|
70
|
-
.chain((shapesGraph) => new Compiler({ generator
|
|
69
|
+
ShapesGraph.create({ dataset, prefixMap })
|
|
70
|
+
.chain((shapesGraph) => new Compiler({ generator }).compile(shapesGraph))
|
|
71
71
|
.ifLeft((error) => {
|
|
72
72
|
throw error;
|
|
73
73
|
})
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"shaclmate": "dist/cli.js"
|
|
4
4
|
},
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@shaclmate/compiler": "4.0.
|
|
6
|
+
"@shaclmate/compiler": "4.0.10",
|
|
7
7
|
"@rdfjs/prefix-map": "~0.1.2",
|
|
8
8
|
"@rdfjs/types": "~2.0.1",
|
|
9
9
|
"@types/n3": "~1.26.0",
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
},
|
|
52
52
|
"type": "module",
|
|
53
53
|
"types": "./dist/index.d.ts",
|
|
54
|
-
"version": "4.0.
|
|
54
|
+
"version": "4.0.10"
|
|
55
55
|
}
|