@shaclmate/compiler 4.0.14 → 4.0.15
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/Compiler.d.ts +4 -1
- package/dist/Compiler.js +3 -1
- package/dist/ShapesGraphToAstTransformer.d.ts +10 -2
- package/dist/ShapesGraphToAstTransformer.js +72 -1
- package/dist/_ShapesGraphToAstTransformer/nodeShapeIdentifierMintingStrategy.js +14 -13
- package/dist/_ShapesGraphToAstTransformer/shapeNodeKinds.js +18 -17
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstCompoundType.js +6 -2
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstListType.js +8 -8
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstObjectType.js +10 -5
- package/dist/generators/ts/AbstractCollectionType.js +1 -7
- package/dist/generators/ts/AbstractTermType.d.ts +1 -0
- package/dist/generators/ts/AbstractTermType.js +6 -0
- package/dist/generators/ts/AbstractUnionType.d.ts +31 -9
- package/dist/generators/ts/AbstractUnionType.js +252 -126
- package/dist/generators/ts/SetType.d.ts +1 -0
- package/dist/generators/ts/SetType.js +12 -0
- package/dist/input/ShapesGraph.d.ts +38 -21
- package/dist/input/ShapesGraph.js +56 -58
- package/dist/input/generated.d.ts +204 -39
- package/dist/input/generated.js +2281 -676
- package/dist/input/index.d.ts +1 -3
- package/dist/input/index.js +1 -3
- package/package.json +2 -2
- package/dist/input/NodeShape.d.ts +0 -11
- package/dist/input/NodeShape.js +0 -2
- package/dist/input/Shape.d.ts +0 -4
- package/dist/input/Shape.js +0 -2
- package/dist/input/ancestorClassIris.d.ts +0 -4
- package/dist/input/ancestorClassIris.js +0 -24
- package/dist/input/descendantClassIris.d.ts +0 -4
- package/dist/input/descendantClassIris.js +0 -27
package/dist/input/index.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
export { Ontology, PropertyGroup, PropertyShape, } from "./generated.js";
|
|
2
|
-
export * from "./NodeShape.js";
|
|
3
|
-
export * from "./Shape.js";
|
|
1
|
+
export { NodeShape, Ontology, PropertyGroup, PropertyShape, Shape, } from "./generated.js";
|
|
4
2
|
export * from "./ShapesGraph.js";
|
|
5
3
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/input/index.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
export { Ontology, PropertyGroup, PropertyShape, } from "./generated.js";
|
|
2
|
-
export * from "./NodeShape.js";
|
|
3
|
-
export * from "./Shape.js";
|
|
1
|
+
export { NodeShape, Ontology, PropertyGroup, PropertyShape, Shape, } from "./generated.js";
|
|
4
2
|
export * from "./ShapesGraph.js";
|
|
5
3
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"dependencies": {
|
|
3
|
-
"@shaclmate/shacl-ast": "4.0.
|
|
3
|
+
"@shaclmate/shacl-ast": "4.0.15",
|
|
4
4
|
"@rdfjs/data-model": "~2.1.1",
|
|
5
5
|
"@rdfjs/dataset": "~2.0.2",
|
|
6
6
|
"@rdfjs/prefix-map": "~0.1.2",
|
|
@@ -78,5 +78,5 @@
|
|
|
78
78
|
},
|
|
79
79
|
"type": "module",
|
|
80
80
|
"types": "./dist/index.d.ts",
|
|
81
|
-
"version": "4.0.
|
|
81
|
+
"version": "4.0.15"
|
|
82
82
|
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { NamedNode } from "@rdfjs/types";
|
|
2
|
-
import type * as generated from "./generated.js";
|
|
3
|
-
export type NodeShape = generated.NodeShape & Readonly<{
|
|
4
|
-
ancestorClassIris: readonly NamedNode[];
|
|
5
|
-
childClassIris: readonly NamedNode[];
|
|
6
|
-
descendantClassIris: readonly NamedNode[];
|
|
7
|
-
isClass: boolean;
|
|
8
|
-
isList: boolean;
|
|
9
|
-
parentClassIris: readonly NamedNode[];
|
|
10
|
-
}>;
|
|
11
|
-
//# sourceMappingURL=NodeShape.d.ts.map
|
package/dist/input/NodeShape.js
DELETED
package/dist/input/Shape.d.ts
DELETED
package/dist/input/Shape.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import TermSet from "@rdfjs/term-set";
|
|
2
|
-
import { rdfs } from "@tpluscode/rdf-ns-builders";
|
|
3
|
-
export function ancestorClassIris(classResource, maxDepth) {
|
|
4
|
-
const ancestorClassIris = new TermSet();
|
|
5
|
-
function ancestorClassIrisRecursive(classResource, depth) {
|
|
6
|
-
for (const parentClassValue of classResource.values(rdfs.subClassOf)) {
|
|
7
|
-
parentClassValue.toResource().ifRight((parentClassResource) => {
|
|
8
|
-
if (parentClassResource.identifier.termType !== "NamedNode") {
|
|
9
|
-
return;
|
|
10
|
-
}
|
|
11
|
-
if (ancestorClassIris.has(parentClassResource.identifier)) {
|
|
12
|
-
return;
|
|
13
|
-
}
|
|
14
|
-
ancestorClassIris.add(parentClassResource.identifier);
|
|
15
|
-
if (depth < maxDepth) {
|
|
16
|
-
ancestorClassIrisRecursive(parentClassResource, depth + 1);
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
ancestorClassIrisRecursive(classResource, 1);
|
|
22
|
-
return [...ancestorClassIris];
|
|
23
|
-
}
|
|
24
|
-
//# sourceMappingURL=ancestorClassIris.js.map
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import TermSet from "@rdfjs/term-set";
|
|
2
|
-
import { rdfs } from "@tpluscode/rdf-ns-builders";
|
|
3
|
-
export function descendantClassIris(classResource, maxDepth) {
|
|
4
|
-
const descendantClassIris = new TermSet();
|
|
5
|
-
function descendantClassIrisRecursive(classResource, depth) {
|
|
6
|
-
for (const childClassValue of classResource.values({
|
|
7
|
-
path: rdfs.subClassOf,
|
|
8
|
-
termType: "InversePath",
|
|
9
|
-
})) {
|
|
10
|
-
childClassValue.toResource().ifRight((childClassResource) => {
|
|
11
|
-
if (childClassResource.identifier.termType !== "NamedNode") {
|
|
12
|
-
return;
|
|
13
|
-
}
|
|
14
|
-
if (descendantClassIris.has(childClassResource.identifier)) {
|
|
15
|
-
return;
|
|
16
|
-
}
|
|
17
|
-
descendantClassIris.add(childClassResource.identifier);
|
|
18
|
-
if (depth < maxDepth) {
|
|
19
|
-
descendantClassIrisRecursive(childClassResource, depth + 1);
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
descendantClassIrisRecursive(classResource, 1);
|
|
25
|
-
return [...descendantClassIris];
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=descendantClassIris.js.map
|