@shaclmate/compiler 4.0.61 → 4.0.63
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.
|
@@ -42,7 +42,6 @@ export class DiscriminatedUnionType extends AbstractType {
|
|
|
42
42
|
this.synthetic = synthetic;
|
|
43
43
|
this.lazyMembers = () => members.map((member, memberI) => {
|
|
44
44
|
let discriminantValues;
|
|
45
|
-
invariant(this.discriminant.memberValues.length === members.length);
|
|
46
45
|
switch (this.discriminant.kind) {
|
|
47
46
|
case "Extrinsic":
|
|
48
47
|
discriminantValues = [this.discriminant.memberValues[memberI]];
|
|
@@ -54,7 +54,7 @@ export class IdentifierType extends AbstractIdentifierType {
|
|
|
54
54
|
}
|
|
55
55
|
jsonSchema({ includeDiscriminantProperty, }) {
|
|
56
56
|
const discriminantProperty = includeDiscriminantProperty
|
|
57
|
-
? code `, termType: ${this.reusables.imports.z}.enum(${arrayOf(...this.nodeKinds)})`
|
|
57
|
+
? code `, termType: ${this.reusables.imports.z}.enum(${arrayOf(...[...this.nodeKinds].map(NodeKind.toTermType))})`
|
|
58
58
|
: "";
|
|
59
59
|
return code `${this.reusables.imports.z}.object({ "@id": ${this.reusables.imports.z}.string().min(1)${discriminantProperty} })`;
|
|
60
60
|
}
|
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.63",
|
|
4
4
|
"@rdfjs/dataset": "~2.0.2",
|
|
5
5
|
"@rdfjs/prefix-map": "~0.1.2",
|
|
6
6
|
"@rdfjs/term-map": "~2.0.2",
|
|
@@ -721,5 +721,5 @@
|
|
|
721
721
|
},
|
|
722
722
|
"type": "module",
|
|
723
723
|
"types": "./dist/index.d.ts",
|
|
724
|
-
"version": "4.0.
|
|
724
|
+
"version": "4.0.63"
|
|
725
725
|
}
|