@shaclmate/shacl-ast 4.0.63 → 4.0.64

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.
@@ -179,7 +179,7 @@ export declare namespace NodeShape {
179
179
  const parse: (value: string) => Either<Error, import("@rdfx/string/dist/Identifier.js").Identifier>;
180
180
  const stringify: typeof NTriplesTerm.stringify;
181
181
  }
182
- function isNodeShape(object: $Object): object is NodeShape;
182
+ const isNodeShape: (object: $Object) => object is NodeShape;
183
183
  const schema: {
184
184
  readonly fromRdfType: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#NodeShape">;
185
185
  readonly properties: {
@@ -586,7 +586,7 @@ export declare namespace Ontology {
586
586
  const parse: (value: string) => Either<Error, import("@rdfx/string/dist/Identifier.js").Identifier>;
587
587
  const stringify: typeof NTriplesTerm.stringify;
588
588
  }
589
- function isOntology(object: $Object): object is Ontology;
589
+ const isOntology: (object: $Object) => object is Ontology;
590
590
  const schema: {
591
591
  readonly fromRdfType: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/2002/07/owl#Ontology">;
592
592
  readonly properties: {
@@ -650,7 +650,7 @@ export declare namespace PropertyGroup {
650
650
  const parse: (value: string) => Either<Error, import("@rdfx/string/dist/Identifier.js").Identifier>;
651
651
  const stringify: typeof NTriplesTerm.stringify;
652
652
  }
653
- function isPropertyGroup(object: $Object): object is PropertyGroup;
653
+ const isPropertyGroup: (object: $Object) => object is PropertyGroup;
654
654
  const schema: {
655
655
  readonly fromRdfType: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#PropertyGroup">;
656
656
  readonly properties: {
@@ -846,7 +846,7 @@ export declare namespace PropertyShape {
846
846
  const parse: (value: string) => Either<Error, import("@rdfx/string/dist/Identifier.js").Identifier>;
847
847
  const stringify: typeof NTriplesTerm.stringify;
848
848
  }
849
- function isPropertyShape(object: $Object): object is PropertyShape;
849
+ const isPropertyShape: (object: $Object) => object is PropertyShape;
850
850
  const schema: {
851
851
  readonly fromRdfType: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#PropertyShape">;
852
852
  readonly properties: {
@@ -1370,7 +1370,7 @@ export declare namespace ValidationReport {
1370
1370
  const parse: (value: string) => Either<Error, import("@rdfx/string/dist/Identifier.js").Identifier>;
1371
1371
  const stringify: typeof NTriplesTerm.stringify;
1372
1372
  }
1373
- function isValidationReport(object: $Object): object is ValidationReport;
1373
+ const isValidationReport: (object: $Object) => object is ValidationReport;
1374
1374
  const schema: {
1375
1375
  readonly fromRdfType: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#ValidationReport">;
1376
1376
  readonly properties: {
@@ -1541,7 +1541,7 @@ export declare namespace ValidationResult {
1541
1541
  const parse: (value: string) => Either<Error, import("@rdfx/string/dist/Identifier.js").Identifier>;
1542
1542
  const stringify: typeof NTriplesTerm.stringify;
1543
1543
  }
1544
- function isValidationResult(object: $Object): object is ValidationResult;
1544
+ const isValidationResult: (object: $Object) => object is ValidationResult;
1545
1545
  const schema: {
1546
1546
  readonly fromRdfType: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#ValidationResult">;
1547
1547
  readonly properties: {
@@ -1645,7 +1645,7 @@ export declare namespace Shape {
1645
1645
  }
1646
1646
  function isShape(object: $Object): object is Shape;
1647
1647
  const schema: {
1648
- readonly kind: "ObjectUnion";
1648
+ readonly kind: "ObjectDiscriminatedUnion";
1649
1649
  readonly members: {
1650
1650
  readonly NodeShape: {
1651
1651
  readonly discriminantValues: readonly ["NodeShape"];
@@ -2850,7 +2850,7 @@ export declare namespace $Object {
2850
2850
  const stringify: typeof NTriplesTerm.stringify;
2851
2851
  }
2852
2852
  const schema: {
2853
- readonly kind: "ObjectUnion";
2853
+ readonly kind: "ObjectDiscriminatedUnion";
2854
2854
  readonly members: {
2855
2855
  readonly NodeShape: {
2856
2856
  readonly discriminantValues: readonly ["NodeShape"];
@@ -146,7 +146,7 @@ function $listFromRdfResourceValues(itemFromRdfResourceValues) {
146
146
  }
147
147
  const $literalFactory = new LiteralFactory({ dataFactory: dataFactory });
148
148
  function $literalFromRdfResourceValues(values, options) {
149
- return $termLikeFromRdfResourceValues(values, options).chain((values) => values.chainMap((value) => value.toLiteral()));
149
+ return $termLikeFromRdfResourceValues(values, options).chain((values) => values.chainMap((value) => value.toLiteral(options.schema.in)));
150
150
  }
151
151
  function $maybeFromRdfResourceValues(itemFromRdfResourceValues) {
152
152
  return (values, options) => itemFromRdfResourceValues(values, {
@@ -202,6 +202,7 @@ var $RdfVocabularies;
202
202
  (function ($RdfVocabularies) {
203
203
  $RdfVocabularies.rdf = {
204
204
  first: dataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#first"),
205
+ langString: dataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"),
205
206
  nil: dataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"),
206
207
  rest: dataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"),
207
208
  subject: dataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#subject"),
@@ -286,7 +287,7 @@ function $termFromRdfResourceValues(values, options) {
286
287
  if (!schema.types.some((type) => term.termType === type)) {
287
288
  return Left(new Resource.MistypedValueError({
288
289
  actualValue: term,
289
- expectedValueType: "Term types",
290
+ expectedValueType: "BlankNode | Literal | NamedNode",
290
291
  focusResource,
291
292
  propertyPath,
292
293
  }));
@@ -691,10 +692,7 @@ export var NodeShape;
691
692
  Identifier.parse = $parseIdentifier;
692
693
  Identifier.stringify = NTriplesTerm.stringify;
693
694
  })(Identifier = NodeShape.Identifier || (NodeShape.Identifier = {}));
694
- function isNodeShape(object) {
695
- return object.$type === "NodeShape";
696
- }
697
- NodeShape.isNodeShape = isNodeShape;
695
+ NodeShape.isNodeShape = (object) => object.$type === "NodeShape";
698
696
  NodeShape.schema = {
699
697
  fromRdfType: dataFactory.namedNode("http://www.w3.org/ns/shacl#NodeShape"),
700
698
  properties: {
@@ -1245,10 +1243,7 @@ export var Ontology;
1245
1243
  Identifier.parse = $parseIdentifier;
1246
1244
  Identifier.stringify = NTriplesTerm.stringify;
1247
1245
  })(Identifier = Ontology.Identifier || (Ontology.Identifier = {}));
1248
- function isOntology(object) {
1249
- return object.$type === "Ontology";
1250
- }
1251
- Ontology.isOntology = isOntology;
1246
+ Ontology.isOntology = (object) => object.$type === "Ontology";
1252
1247
  Ontology.schema = {
1253
1248
  fromRdfType: dataFactory.namedNode("http://www.w3.org/2002/07/owl#Ontology"),
1254
1249
  properties: {
@@ -1344,10 +1339,7 @@ export var PropertyGroup;
1344
1339
  Identifier.parse = $parseIdentifier;
1345
1340
  Identifier.stringify = NTriplesTerm.stringify;
1346
1341
  })(Identifier = PropertyGroup.Identifier || (PropertyGroup.Identifier = {}));
1347
- function isPropertyGroup(object) {
1348
- return object.$type === "PropertyGroup";
1349
- }
1350
- PropertyGroup.isPropertyGroup = isPropertyGroup;
1342
+ PropertyGroup.isPropertyGroup = (object) => object.$type === "PropertyGroup";
1351
1343
  PropertyGroup.schema = {
1352
1344
  fromRdfType: dataFactory.namedNode("http://www.w3.org/ns/shacl#PropertyGroup"),
1353
1345
  properties: {
@@ -1795,10 +1787,7 @@ export var PropertyShape;
1795
1787
  Identifier.parse = $parseIdentifier;
1796
1788
  Identifier.stringify = NTriplesTerm.stringify;
1797
1789
  })(Identifier = PropertyShape.Identifier || (PropertyShape.Identifier = {}));
1798
- function isPropertyShape(object) {
1799
- return object.$type === "PropertyShape";
1800
- }
1801
- PropertyShape.isPropertyShape = isPropertyShape;
1790
+ PropertyShape.isPropertyShape = (object) => object.$type === "PropertyShape";
1802
1791
  PropertyShape.schema = {
1803
1792
  fromRdfType: dataFactory.namedNode("http://www.w3.org/ns/shacl#PropertyShape"),
1804
1793
  properties: {
@@ -2469,10 +2458,7 @@ export var ValidationReport;
2469
2458
  Identifier.parse = $parseIdentifier;
2470
2459
  Identifier.stringify = NTriplesTerm.stringify;
2471
2460
  })(Identifier = ValidationReport.Identifier || (ValidationReport.Identifier = {}));
2472
- function isValidationReport(object) {
2473
- return object.$type === "ValidationReport";
2474
- }
2475
- ValidationReport.isValidationReport = isValidationReport;
2461
+ ValidationReport.isValidationReport = (object) => object.$type === "ValidationReport";
2476
2462
  ValidationReport.schema = {
2477
2463
  fromRdfType: dataFactory.namedNode("http://www.w3.org/ns/shacl#ValidationReport"),
2478
2464
  properties: {
@@ -2631,10 +2617,7 @@ export var ValidationResult;
2631
2617
  Identifier.parse = $parseIdentifier;
2632
2618
  Identifier.stringify = NTriplesTerm.stringify;
2633
2619
  })(Identifier = ValidationResult.Identifier || (ValidationResult.Identifier = {}));
2634
- function isValidationResult(object) {
2635
- return object.$type === "ValidationResult";
2636
- }
2637
- ValidationResult.isValidationResult = isValidationResult;
2620
+ ValidationResult.isValidationResult = (object) => object.$type === "ValidationResult";
2638
2621
  ValidationResult.schema = {
2639
2622
  fromRdfType: dataFactory.namedNode("http://www.w3.org/ns/shacl#ValidationResult"),
2640
2623
  properties: {
@@ -2789,7 +2772,7 @@ export var Shape;
2789
2772
  }
2790
2773
  Shape.isShape = isShape;
2791
2774
  Shape.schema = {
2792
- kind: "ObjectUnion",
2775
+ kind: "ObjectDiscriminatedUnion",
2793
2776
  members: {
2794
2777
  NodeShape: { discriminantValues: ["NodeShape"], type: NodeShape.schema },
2795
2778
  PropertyShape: {
@@ -3166,7 +3149,7 @@ export var $Object;
3166
3149
  Identifier.stringify = NTriplesTerm.stringify;
3167
3150
  })(Identifier = $Object.Identifier || ($Object.Identifier = {}));
3168
3151
  $Object.schema = {
3169
- kind: "ObjectUnion",
3152
+ kind: "ObjectDiscriminatedUnion",
3170
3153
  members: {
3171
3154
  NodeShape: { discriminantValues: ["NodeShape"], type: NodeShape.schema },
3172
3155
  Ontology: { discriminantValues: ["Ontology"], type: Ontology.schema },
package/package.json CHANGED
@@ -58,5 +58,5 @@
58
58
  },
59
59
  "type": "module",
60
60
  "types": "./dist/index.d.ts",
61
- "version": "4.0.63"
61
+ "version": "4.0.64"
62
62
  }