@shaclmate/compiler 4.0.75 → 4.0.77
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/ShapesGraphToAstTransformer.d.ts +1 -1
- package/dist/ShapesGraphToAstTransformer.js +1 -1
- package/dist/ast/StructCompoundType.js +1 -1
- package/dist/generators/ts/AbstractCollectionType.js +2 -2
- package/dist/generators/ts/IdentifierType.js +1 -1
- package/dist/generators/ts/Imports.js +1 -1
- package/dist/generators/ts/IriType.js +6 -2
- package/dist/generators/ts/ListType.js +2 -2
- package/dist/generators/ts/ObjectType.d.ts +1 -1
- package/dist/generators/ts/ObjectType.js +11 -8
- package/dist/generators/ts/SetType.js +8 -4
- package/dist/generators/ts/Snippets.d.ts +7 -0
- package/dist/generators/ts/Snippets.js +49 -0
- package/dist/generators/ts/TypeFactory.js +1 -2
- package/dist/generators/ts/_ObjectType/ObjectType_IdentifierProperty.js +5 -4
- package/dist/generators/ts/_ObjectType/ObjectType_ShaclProperty.js +3 -2
- package/dist/generators/ts/_ObjectType/ObjectType_createFunctionExpression.js +3 -2
- package/dist/generators/ts/_snippets/snippets_ConversionFunction.js +2 -2
- package/dist/generators/ts/_snippets/snippets_NamespaceBuilder.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_NamespaceBuilder.js +9 -0
- package/dist/generators/ts/_snippets/snippets_convertToArraySet.js +2 -4
- package/dist/generators/ts/_snippets/snippets_convertToBlankNode.js +2 -2
- package/dist/generators/ts/_snippets/snippets_convertToBlankNodeIdentifierProperty.js +2 -2
- package/dist/generators/ts/_snippets/snippets_convertToIdentifier.js +3 -3
- package/dist/generators/ts/_snippets/snippets_convertToIdentifierProperty.js +3 -3
- package/dist/generators/ts/_snippets/snippets_convertToInIri.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_convertToInIri.js +11 -0
- package/dist/generators/ts/_snippets/snippets_convertToInIriIdentifierProperty.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_convertToInIriIdentifierProperty.js +17 -0
- package/dist/generators/ts/_snippets/snippets_convertToIri.js +3 -3
- package/dist/generators/ts/_snippets/snippets_convertToIriIdentifierProperty.js +3 -3
- package/dist/generators/ts/_snippets/snippets_convertToLangString.js +2 -2
- package/dist/generators/ts/_snippets/snippets_convertToLazy.js +2 -2
- package/dist/generators/ts/_snippets/snippets_convertToLazyOption.js +2 -2
- package/dist/generators/ts/_snippets/snippets_convertToLazySet.js +2 -2
- package/dist/generators/ts/_snippets/snippets_convertToList.js +2 -3
- package/dist/generators/ts/_snippets/snippets_convertToLiteral.js +1 -1
- package/dist/generators/ts/_snippets/snippets_convertToMaybe.js +3 -3
- package/dist/generators/ts/_snippets/snippets_convertToMutableArraySet.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_convertToMutableArraySet.js +6 -0
- package/dist/generators/ts/_snippets/snippets_convertToMutableList.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_convertToMutableList.js +6 -0
- package/dist/generators/ts/_snippets/snippets_convertToMutableScalarSet.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_convertToMutableScalarSet.js +14 -0
- package/dist/generators/ts/_snippets/snippets_convertToScalarSet.js +5 -6
- package/dist/generators/ts/_snippets/snippets_convertWithDefaultValue.js +3 -3
- package/dist/generators/ts/_snippets/snippets_identityConversionFunction.js +2 -2
- package/dist/generators/ts/_snippets/snippets_validateArray.js +4 -5
- package/dist/generators/ts/_snippets/snippets_validateMutableArray.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_validateMutableArray.js +12 -0
- package/dist/input/ShapesGraph.d.ts +1 -1
- package/package.json +22 -15
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import TermMap from "@
|
|
1
|
+
import { TermMap } from "@rdfx/collection";
|
|
2
2
|
import { Either } from "purify-ts";
|
|
3
3
|
import { ShapeStack } from "./_ShapesGraphToAstTransformer/ShapeStack.js";
|
|
4
4
|
import { transformShapeToAstType } from "./_ShapesGraphToAstTransformer/transformShapeToAstType.js";
|
|
@@ -7,7 +7,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
import { Maybe } from "purify-ts";
|
|
8
8
|
import { Memoize } from "typescript-memoize";
|
|
9
9
|
import { AbstractContainerType } from "./AbstractContainerType.js";
|
|
10
|
-
import { code
|
|
10
|
+
import { code } from "./ts-poet-wrapper.js";
|
|
11
11
|
/**
|
|
12
12
|
* Abstract base class for ListType and SetType.
|
|
13
13
|
*/
|
|
@@ -41,7 +41,7 @@ export class AbstractCollectionType extends AbstractContainerType {
|
|
|
41
41
|
return code `${this.reusables.snippets.CollectionSchema}<${this.itemType.schemaType}>`;
|
|
42
42
|
}
|
|
43
43
|
get validationFunction() {
|
|
44
|
-
return Maybe.of(code `${this.reusables.snippets.validateArray}(${this.itemType.validationFunction.orDefault(this.itemValidationFunctionDefault)}
|
|
44
|
+
return Maybe.of(code `${this._mutable ? this.reusables.snippets.validateMutableArray : this.reusables.snippets.validateArray}(${this.itemType.validationFunction.orDefault(this.itemValidationFunctionDefault)})`);
|
|
45
45
|
}
|
|
46
46
|
get inlineExpression() {
|
|
47
47
|
return code `${!this._mutable ? "readonly " : ""}(${this.itemType.expression})[]`;
|
|
@@ -24,7 +24,7 @@ export class IdentifierType extends AbstractIdentifierType {
|
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
// To NamedNode
|
|
27
|
-
expression: code `string`,
|
|
27
|
+
expression: code `(keyof ${this.configuration.syntheticNamePrefix}DefaultNamespaceT & string)`,
|
|
28
28
|
jsType: { typeof: "string" },
|
|
29
29
|
},
|
|
30
30
|
{
|
|
@@ -4,7 +4,7 @@ export class Imports {
|
|
|
4
4
|
BlankNode = imp("BlankNode@@rdfjs/types");
|
|
5
5
|
dataFactory = imp("dataFactory=@rdfx/data-factory");
|
|
6
6
|
DatasetCore = imp("DatasetCore@@rdfjs/types");
|
|
7
|
-
datasetFactory = imp("datasetFactory
|
|
7
|
+
datasetFactory = imp("datasetFactory@@rdfx/collection");
|
|
8
8
|
Either = imp("Either@purify-ts");
|
|
9
9
|
EitherAsync = imp("EitherAsync@purify-ts");
|
|
10
10
|
GraphQLBigInt = imp("BigInt:GraphQLBigInt@graphql-scalars");
|
|
@@ -19,10 +19,14 @@ export class IriType extends AbstractIdentifierType {
|
|
|
19
19
|
get conversionFunction() {
|
|
20
20
|
invariant(this.jsTypes.length === 1);
|
|
21
21
|
return Maybe.of({
|
|
22
|
-
code:
|
|
22
|
+
code: this.in_.length > 0
|
|
23
|
+
? code `${this.reusables.snippets.convertToInIri}<${this.valueTypeExpression}>`
|
|
24
|
+
: code `${this.reusables.snippets.convertToIri}`,
|
|
23
25
|
sourceTypes: [
|
|
24
26
|
{
|
|
25
|
-
expression: this.
|
|
27
|
+
expression: this.in_.length > 0
|
|
28
|
+
? this.valueTypeExpression
|
|
29
|
+
: code `(keyof ${this.configuration.syntheticNamePrefix}DefaultNamespaceT & string)`,
|
|
26
30
|
jsType: { typeof: "string" },
|
|
27
31
|
},
|
|
28
32
|
{
|
|
@@ -8,7 +8,7 @@ import { rdf } from "@tpluscode/rdf-ns-builders";
|
|
|
8
8
|
import { Maybe } from "purify-ts";
|
|
9
9
|
import { Memoize } from "typescript-memoize";
|
|
10
10
|
import { AbstractCollectionType } from "./AbstractCollectionType.js";
|
|
11
|
-
import { code, joinCode
|
|
11
|
+
import { code, joinCode } from "./ts-poet-wrapper.js";
|
|
12
12
|
export class ListType extends AbstractCollectionType {
|
|
13
13
|
identifierNodeKind;
|
|
14
14
|
toRdfTypes;
|
|
@@ -24,7 +24,7 @@ export class ListType extends AbstractCollectionType {
|
|
|
24
24
|
get conversionFunction() {
|
|
25
25
|
const itemConversionFunction = this.itemType.conversionFunction.orDefault(this.itemConversionFunctionDefault);
|
|
26
26
|
return Maybe.of({
|
|
27
|
-
code: code `${this.reusables.snippets.convertToList}(${itemConversionFunction.code}
|
|
27
|
+
code: code `${this._mutable ? this.reusables.snippets.convertToMutableList : this.reusables.snippets.convertToList}(${itemConversionFunction.code})`,
|
|
28
28
|
sourceTypes: [
|
|
29
29
|
{
|
|
30
30
|
expression: code `readonly (${joinCode(itemConversionFunction.sourceTypes.map((itemSourceType) => code `${itemSourceType.expression}`), { on: " | " })})[]`,
|
|
@@ -88,13 +88,14 @@ export class ObjectType extends AbstractType {
|
|
|
88
88
|
let staticModuleDeclarations = {
|
|
89
89
|
...super.staticModuleDeclarations(name),
|
|
90
90
|
};
|
|
91
|
+
const syntheticNamePrefix = this.configuration.syntheticNamePrefix;
|
|
91
92
|
// create
|
|
92
93
|
if (this.configuration.features.has("Object.create")) {
|
|
93
94
|
staticModuleDeclarations["create"] =
|
|
94
|
-
code `export const create
|
|
95
|
+
code `export const create = ${ObjectType_createFunctionExpression.call(this)};`;
|
|
95
96
|
staticModuleDeclarations["createUnsafe"] =
|
|
96
|
-
code `export function createUnsafe(${this.constructorParameters.signature}): ${this.expression} {
|
|
97
|
-
return create(
|
|
97
|
+
code `export function createUnsafe<${syntheticNamePrefix}DefaultNamespaceT extends ${this.reusables.snippets.NamespaceBuilder} = ${this.reusables.snippets.NamespaceBuilder}>(${this.constructorParameters.signature}): ${this.expression} {
|
|
98
|
+
return create(${this.constructorParameters.variable}).unsafeCoerce();
|
|
98
99
|
}`;
|
|
99
100
|
}
|
|
100
101
|
// equals
|
|
@@ -213,8 +214,8 @@ export class ObjectType extends AbstractType {
|
|
|
213
214
|
}
|
|
214
215
|
// toString / toStringRecord
|
|
215
216
|
if (this.configuration.features.has("Object.toString")) {
|
|
216
|
-
staticModuleDeclarations[`${
|
|
217
|
-
code `export const ${
|
|
217
|
+
staticModuleDeclarations[`${syntheticNamePrefix}toString`] =
|
|
218
|
+
code `export const ${syntheticNamePrefix}toString: (${this.thisVariable}: ${this.expression}) => string = ${ObjectType_toStringFunctionExpression.call(this)};`;
|
|
218
219
|
staticModuleDeclarations["toStringRecord"] =
|
|
219
220
|
code `export const toStringRecord: (${this.thisVariable}: ${this.expression}) => Record<string, string> = ${ObjectType_toStringRecordFunctionExpression.call(this)};`;
|
|
220
221
|
}
|
|
@@ -323,7 +324,10 @@ export class ObjectType extends AbstractType {
|
|
|
323
324
|
}
|
|
324
325
|
get constructorParameters() {
|
|
325
326
|
let hasQuestionToken = true;
|
|
326
|
-
const
|
|
327
|
+
const syntheticNamePrefix = this.configuration.syntheticNamePrefix;
|
|
328
|
+
const propertySignatures = [
|
|
329
|
+
code `readonly ${syntheticNamePrefix}defaultNamespace?: ${syntheticNamePrefix}DefaultNamespaceT;`,
|
|
330
|
+
];
|
|
327
331
|
for (const property of this.properties) {
|
|
328
332
|
property.constructorParameter.ifJust((propertyConstructorParameter) => {
|
|
329
333
|
hasQuestionToken =
|
|
@@ -331,7 +335,6 @@ export class ObjectType extends AbstractType {
|
|
|
331
335
|
propertySignatures.push(propertyConstructorParameter.signature);
|
|
332
336
|
});
|
|
333
337
|
}
|
|
334
|
-
invariant(propertySignatures.length > 0);
|
|
335
338
|
const typeExpression = code `{ ${joinCode(propertySignatures)} }`;
|
|
336
339
|
return {
|
|
337
340
|
hasQuestionToken,
|
|
@@ -339,7 +342,7 @@ export class ObjectType extends AbstractType {
|
|
|
339
342
|
type: {
|
|
340
343
|
expression: typeExpression,
|
|
341
344
|
},
|
|
342
|
-
variable:
|
|
345
|
+
variable: code `parameters`,
|
|
343
346
|
};
|
|
344
347
|
}
|
|
345
348
|
get createFunction() {
|
|
@@ -8,7 +8,7 @@ import { Maybe } from "purify-ts";
|
|
|
8
8
|
import { invariant } from "ts-invariant";
|
|
9
9
|
import { Memoize } from "typescript-memoize";
|
|
10
10
|
import { AbstractCollectionType } from "./AbstractCollectionType.js";
|
|
11
|
-
import { code, joinCode
|
|
11
|
+
import { code, joinCode } from "./ts-poet-wrapper.js";
|
|
12
12
|
export class SetType extends AbstractCollectionType {
|
|
13
13
|
graphqlArgs = Maybe.empty();
|
|
14
14
|
jsTypes = [
|
|
@@ -30,10 +30,14 @@ export class SetType extends AbstractCollectionType {
|
|
|
30
30
|
const sourceTypes = [];
|
|
31
31
|
if (itemConversionFunction.sourceTypes.some((sourceType) => sourceType.jsType.typeof === "object" &&
|
|
32
32
|
sourceType.jsType.instanceof === "Array")) {
|
|
33
|
-
conversionFunction = this.
|
|
33
|
+
conversionFunction = this._mutable
|
|
34
|
+
? this.reusables.snippets.convertToMutableArraySet
|
|
35
|
+
: this.reusables.snippets.convertToArraySet;
|
|
34
36
|
}
|
|
35
37
|
else {
|
|
36
|
-
conversionFunction = this.
|
|
38
|
+
conversionFunction = this._mutable
|
|
39
|
+
? this.reusables.snippets.convertToMutableScalarSet
|
|
40
|
+
: this.reusables.snippets.convertToScalarSet;
|
|
37
41
|
// Convert from a single item
|
|
38
42
|
sourceTypes.push(...itemConversionFunction.sourceTypes);
|
|
39
43
|
}
|
|
@@ -50,7 +54,7 @@ export class SetType extends AbstractCollectionType {
|
|
|
50
54
|
});
|
|
51
55
|
}
|
|
52
56
|
return Maybe.of({
|
|
53
|
-
code: code `${conversionFunction}(${itemConversionFunction.code}
|
|
57
|
+
code: code `${conversionFunction}(${itemConversionFunction.code})`,
|
|
54
58
|
sourceTypes,
|
|
55
59
|
});
|
|
56
60
|
}
|
|
@@ -43,6 +43,7 @@ export declare class Snippets {
|
|
|
43
43
|
get LiteralSchema(): Snippet;
|
|
44
44
|
get MaybeFilter(): Snippet;
|
|
45
45
|
get MaybeSchema(): Snippet;
|
|
46
|
+
get NamespaceBuilder(): Snippet;
|
|
46
47
|
get NumericFilter(): Snippet;
|
|
47
48
|
get NumericSchema(): Snippet;
|
|
48
49
|
get PropertyPath(): Snippet;
|
|
@@ -80,6 +81,8 @@ export declare class Snippets {
|
|
|
80
81
|
get convertToBlankNodeIdentifierProperty(): Snippet;
|
|
81
82
|
get convertToIdentifier(): Snippet;
|
|
82
83
|
get convertToIdentifierProperty(): Snippet;
|
|
84
|
+
get convertToInIri(): Snippet;
|
|
85
|
+
get convertToInIriIdentifierProperty(): Snippet;
|
|
83
86
|
get convertToIri(): Snippet;
|
|
84
87
|
get convertToIriIdentifierProperty(): Snippet;
|
|
85
88
|
get convertToLangString(): Snippet;
|
|
@@ -89,6 +92,9 @@ export declare class Snippets {
|
|
|
89
92
|
get convertToList(): Snippet;
|
|
90
93
|
get convertToLiteral(): Snippet;
|
|
91
94
|
get convertToMaybe(): Snippet;
|
|
95
|
+
get convertToMutableArraySet(): Snippet;
|
|
96
|
+
get convertToMutableList(): Snippet;
|
|
97
|
+
get convertToMutableScalarSet(): Snippet;
|
|
92
98
|
get convertToScalarSet(): Snippet;
|
|
93
99
|
get convertWithDefaultValue(): Snippet;
|
|
94
100
|
get dateEquals(): Snippet;
|
|
@@ -175,6 +181,7 @@ export declare class Snippets {
|
|
|
175
181
|
get toIsoDateString(): Snippet;
|
|
176
182
|
get validateArray(): Snippet;
|
|
177
183
|
get validateMaybe(): Snippet;
|
|
184
|
+
get validateMutableArray(): Snippet;
|
|
178
185
|
get wrap_FromRdfResourceFunction(): Snippet;
|
|
179
186
|
get wrap_ToRdfResourceFunction(): Snippet;
|
|
180
187
|
protected get snippets(): Snippets;
|
|
@@ -32,6 +32,8 @@ import { snippets_convertToBlankNode } from "./_snippets/snippets_convertToBlank
|
|
|
32
32
|
import { snippets_convertToBlankNodeIdentifierProperty } from "./_snippets/snippets_convertToBlankNodeIdentifierProperty.js";
|
|
33
33
|
import { snippets_convertToIdentifier } from "./_snippets/snippets_convertToIdentifier.js";
|
|
34
34
|
import { snippets_convertToIdentifierProperty } from "./_snippets/snippets_convertToIdentifierProperty.js";
|
|
35
|
+
import { snippets_convertToInIri } from "./_snippets/snippets_convertToInIri.js";
|
|
36
|
+
import { snippets_convertToInIriIdentifierProperty } from "./_snippets/snippets_convertToInIriIdentifierProperty.js";
|
|
35
37
|
import { snippets_convertToIri } from "./_snippets/snippets_convertToIri.js";
|
|
36
38
|
import { snippets_convertToIriIdentifierProperty } from "./_snippets/snippets_convertToIriIdentifierProperty.js";
|
|
37
39
|
import { snippets_convertToLangString } from "./_snippets/snippets_convertToLangString.js";
|
|
@@ -41,6 +43,9 @@ import { snippets_convertToLazySet } from "./_snippets/snippets_convertToLazySet
|
|
|
41
43
|
import { snippets_convertToList } from "./_snippets/snippets_convertToList.js";
|
|
42
44
|
import { snippets_convertToLiteral } from "./_snippets/snippets_convertToLiteral.js";
|
|
43
45
|
import { snippets_convertToMaybe } from "./_snippets/snippets_convertToMaybe.js";
|
|
46
|
+
import { snippets_convertToMutableArraySet } from "./_snippets/snippets_convertToMutableArraySet.js";
|
|
47
|
+
import { snippets_convertToMutableList } from "./_snippets/snippets_convertToMutableList.js";
|
|
48
|
+
import { snippets_convertToMutableScalarSet } from "./_snippets/snippets_convertToMutableScalarSet.js";
|
|
44
49
|
import { snippets_convertToScalarSet } from "./_snippets/snippets_convertToScalarSet.js";
|
|
45
50
|
import { snippets_convertWithDefaultValue } from "./_snippets/snippets_convertWithDefaultValue.js";
|
|
46
51
|
import { snippets_DateFilter } from "./_snippets/snippets_DateFilter.js";
|
|
@@ -121,6 +126,7 @@ import { snippets_maybeSparqlWherePatterns } from "./_snippets/snippets_maybeSpa
|
|
|
121
126
|
import { snippets_monkeyPatchObject } from "./_snippets/snippets_monkeyPatchObject.js";
|
|
122
127
|
import { snippets_mutableListFromRdfResourceValues } from "./_snippets/snippets_mutableListFromRdfResourceValues.js";
|
|
123
128
|
import { snippets_mutableSetFromRdfResourceValues } from "./_snippets/snippets_mutableSetFromRdfResourceValues.js";
|
|
129
|
+
import { snippets_NamespaceBuilder } from "./_snippets/snippets_NamespaceBuilder.js";
|
|
124
130
|
import { snippets_NumericFilter } from "./_snippets/snippets_NumericFilter.js";
|
|
125
131
|
import { snippets_NumericSchema } from "./_snippets/snippets_NumericSchema.js";
|
|
126
132
|
import { snippets_normalizeSparqlWherePatterns } from "./_snippets/snippets_normalizeSparqlWherePatterns.js";
|
|
@@ -168,6 +174,7 @@ import { snippets_ValueSparqlConstructTriplesFunction } from "./_snippets/snippe
|
|
|
168
174
|
import { snippets_ValueSparqlWherePatternsFunction } from "./_snippets/snippets_ValueSparqlWherePatternsFunction.js";
|
|
169
175
|
import { snippets_validateArray } from "./_snippets/snippets_validateArray.js";
|
|
170
176
|
import { snippets_validateMaybe } from "./_snippets/snippets_validateMaybe.js";
|
|
177
|
+
import { snippets_validateMutableArray } from "./_snippets/snippets_validateMutableArray.js";
|
|
171
178
|
import { snippets_wrap_FromRdfResourceFunction } from "./_snippets/snippets_wrap_FromRdfResourceFunction.js";
|
|
172
179
|
import { snippets_wrap_ToRdfResourceFunction } from "./_snippets/snippets_wrap_ToRdfResourceFunction.js";
|
|
173
180
|
import { rdfjsTermExpression } from "./rdfjsTermExpression.js";
|
|
@@ -274,6 +281,9 @@ export class Snippets {
|
|
|
274
281
|
get MaybeSchema() {
|
|
275
282
|
return this.snippet(snippets_MaybeSchema);
|
|
276
283
|
}
|
|
284
|
+
get NamespaceBuilder() {
|
|
285
|
+
return this.snippet(snippets_NamespaceBuilder);
|
|
286
|
+
}
|
|
277
287
|
get NumericFilter() {
|
|
278
288
|
return this.snippet(snippets_NumericFilter);
|
|
279
289
|
}
|
|
@@ -385,6 +395,12 @@ export class Snippets {
|
|
|
385
395
|
get convertToIdentifierProperty() {
|
|
386
396
|
return this.snippet(snippets_convertToIdentifierProperty);
|
|
387
397
|
}
|
|
398
|
+
get convertToInIri() {
|
|
399
|
+
return this.snippet(snippets_convertToInIri);
|
|
400
|
+
}
|
|
401
|
+
get convertToInIriIdentifierProperty() {
|
|
402
|
+
return this.snippet(snippets_convertToInIriIdentifierProperty);
|
|
403
|
+
}
|
|
388
404
|
get convertToIri() {
|
|
389
405
|
return this.snippet(snippets_convertToIri);
|
|
390
406
|
}
|
|
@@ -412,6 +428,15 @@ export class Snippets {
|
|
|
412
428
|
get convertToMaybe() {
|
|
413
429
|
return this.snippet(snippets_convertToMaybe);
|
|
414
430
|
}
|
|
431
|
+
get convertToMutableArraySet() {
|
|
432
|
+
return this.snippet(snippets_convertToMutableArraySet);
|
|
433
|
+
}
|
|
434
|
+
get convertToMutableList() {
|
|
435
|
+
return this.snippet(snippets_convertToMutableList);
|
|
436
|
+
}
|
|
437
|
+
get convertToMutableScalarSet() {
|
|
438
|
+
return this.snippet(snippets_convertToMutableScalarSet);
|
|
439
|
+
}
|
|
415
440
|
get convertToScalarSet() {
|
|
416
441
|
return this.snippet(snippets_convertToScalarSet);
|
|
417
442
|
}
|
|
@@ -686,6 +711,9 @@ export class Snippets {
|
|
|
686
711
|
get validateMaybe() {
|
|
687
712
|
return this.snippet(snippets_validateMaybe);
|
|
688
713
|
}
|
|
714
|
+
get validateMutableArray() {
|
|
715
|
+
return this.snippet(snippets_validateMutableArray);
|
|
716
|
+
}
|
|
689
717
|
get wrap_FromRdfResourceFunction() {
|
|
690
718
|
return this.snippet(snippets_wrap_FromRdfResourceFunction);
|
|
691
719
|
}
|
|
@@ -803,6 +831,9 @@ __decorate([
|
|
|
803
831
|
__decorate([
|
|
804
832
|
Memoize()
|
|
805
833
|
], Snippets.prototype, "MaybeSchema", null);
|
|
834
|
+
__decorate([
|
|
835
|
+
Memoize()
|
|
836
|
+
], Snippets.prototype, "NamespaceBuilder", null);
|
|
806
837
|
__decorate([
|
|
807
838
|
Memoize()
|
|
808
839
|
], Snippets.prototype, "NumericFilter", null);
|
|
@@ -914,6 +945,12 @@ __decorate([
|
|
|
914
945
|
__decorate([
|
|
915
946
|
Memoize()
|
|
916
947
|
], Snippets.prototype, "convertToIdentifierProperty", null);
|
|
948
|
+
__decorate([
|
|
949
|
+
Memoize()
|
|
950
|
+
], Snippets.prototype, "convertToInIri", null);
|
|
951
|
+
__decorate([
|
|
952
|
+
Memoize()
|
|
953
|
+
], Snippets.prototype, "convertToInIriIdentifierProperty", null);
|
|
917
954
|
__decorate([
|
|
918
955
|
Memoize()
|
|
919
956
|
], Snippets.prototype, "convertToIri", null);
|
|
@@ -941,6 +978,15 @@ __decorate([
|
|
|
941
978
|
__decorate([
|
|
942
979
|
Memoize()
|
|
943
980
|
], Snippets.prototype, "convertToMaybe", null);
|
|
981
|
+
__decorate([
|
|
982
|
+
Memoize()
|
|
983
|
+
], Snippets.prototype, "convertToMutableArraySet", null);
|
|
984
|
+
__decorate([
|
|
985
|
+
Memoize()
|
|
986
|
+
], Snippets.prototype, "convertToMutableList", null);
|
|
987
|
+
__decorate([
|
|
988
|
+
Memoize()
|
|
989
|
+
], Snippets.prototype, "convertToMutableScalarSet", null);
|
|
944
990
|
__decorate([
|
|
945
991
|
Memoize()
|
|
946
992
|
], Snippets.prototype, "convertToScalarSet", null);
|
|
@@ -1196,6 +1242,9 @@ __decorate([
|
|
|
1196
1242
|
__decorate([
|
|
1197
1243
|
Memoize()
|
|
1198
1244
|
], Snippets.prototype, "validateMaybe", null);
|
|
1245
|
+
__decorate([
|
|
1246
|
+
Memoize()
|
|
1247
|
+
], Snippets.prototype, "validateMutableArray", null);
|
|
1199
1248
|
__decorate([
|
|
1200
1249
|
Memoize()
|
|
1201
1250
|
], Snippets.prototype, "wrap_FromRdfResourceFunction", null);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import TermMap from "@
|
|
2
|
-
import TermSet from "@rdfjs/term-set";
|
|
1
|
+
import { TermMap, TermSet } from "@rdfx/collection";
|
|
3
2
|
import { literalDatatypeDefinitions } from "@rdfx/literal";
|
|
4
3
|
import base62 from "@sindresorhus/base62";
|
|
5
4
|
import { rdf } from "@tpluscode/rdf-ns-builders";
|
|
@@ -109,13 +109,14 @@ export class ObjectType_IdentifierProperty extends ObjectType_AbstractProperty {
|
|
|
109
109
|
if (nodeKinds.has("BlankNode")) {
|
|
110
110
|
conversionFunction = code `${this.reusables.snippets.convertToBlankNodeIdentifierProperty}`;
|
|
111
111
|
}
|
|
112
|
+
else if (this.type.in_.length > 0) {
|
|
113
|
+
conversionFunction = code `${this.reusables.snippets.convertToInIriIdentifierProperty}<${joinCode(this.type.in_.map((in_) => code `${literalOf(in_.value)}`), { on: " | " })}>`;
|
|
114
|
+
}
|
|
112
115
|
else {
|
|
113
|
-
conversionFunction = code `${this.reusables.snippets.convertToIriIdentifierProperty}
|
|
114
|
-
? joinCode(this.type.in_.map((in_) => code `${literalOf(in_.value)}`), { on: " | " })
|
|
115
|
-
: "string"}>`;
|
|
116
|
+
conversionFunction = code `${this.reusables.snippets.convertToIriIdentifierProperty}`;
|
|
116
117
|
}
|
|
117
118
|
}
|
|
118
|
-
return Maybe.of(code `${this.name}: ${conversionFunction}(${variables.parameters}.${this.name})`);
|
|
119
|
+
return Maybe.of(code `${this.name}: ${conversionFunction}(${variables.parameters}.${this.name}, ${variables.parameters}.${this.configuration.syntheticNamePrefix}defaultNamespace)`);
|
|
119
120
|
}
|
|
120
121
|
fromJsonInitializer({ variables, }) {
|
|
121
122
|
return Maybe.of(code `${this.name}: ${this.type.fromJsonExpression({
|
|
@@ -143,14 +143,15 @@ export class ObjectType_ShaclProperty extends ObjectType_AbstractProperty {
|
|
|
143
143
|
}
|
|
144
144
|
constructorInitializer({ variables, }) {
|
|
145
145
|
const parameterVariable = code `${variables.parameters}.${this.name}`;
|
|
146
|
+
const defaultNamespaceVariable = code `${variables.parameters}.${this.configuration.syntheticNamePrefix}defaultNamespace`;
|
|
146
147
|
const conversionFunction = this.type.conversionFunction.extract()?.code;
|
|
147
148
|
const validationFunction = this.type.validationFunction.extract();
|
|
148
149
|
let rhs;
|
|
149
150
|
if (conversionFunction && validationFunction) {
|
|
150
|
-
rhs = code `${conversionFunction}(${parameterVariable}).chain(value => ${validationFunction}(${this.typeSchemaVariable}, value))`;
|
|
151
|
+
rhs = code `${conversionFunction}(${parameterVariable}, ${defaultNamespaceVariable}).chain(value => ${validationFunction}(${this.typeSchemaVariable}, value))`;
|
|
151
152
|
}
|
|
152
153
|
else if (conversionFunction) {
|
|
153
|
-
rhs = code `${conversionFunction}(${parameterVariable})`;
|
|
154
|
+
rhs = code `${conversionFunction}(${parameterVariable}, ${defaultNamespaceVariable})`;
|
|
154
155
|
}
|
|
155
156
|
else if (validationFunction) {
|
|
156
157
|
rhs = code `${validationFunction}(${this.typeSchemaVariable}, ${parameterVariable})`;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { invariant } from "ts-invariant";
|
|
2
2
|
import { code, joinCode, literalOf } from "../ts-poet-wrapper.js";
|
|
3
3
|
export function ObjectType_createFunctionExpression() {
|
|
4
|
-
const parametersVariable = code
|
|
4
|
+
const parametersVariable = code `${this.constructorParameters.variable}${this.constructorParameters.hasQuestionToken ? "?" : ""}`;
|
|
5
5
|
const propertyInitializers = this.properties.flatMap((property) => property
|
|
6
6
|
.constructorInitializer({
|
|
7
7
|
variables: { parameters: parametersVariable },
|
|
@@ -23,6 +23,7 @@ export function ObjectType_createFunctionExpression() {
|
|
|
23
23
|
if (Object.keys(monkeyPatchMethods).length > 0) {
|
|
24
24
|
returnExpression = code `${returnExpression}.map(object => ${this.reusables.snippets.monkeyPatchObject}(object, ${monkeyPatchMethods}))`;
|
|
25
25
|
}
|
|
26
|
-
|
|
26
|
+
const syntheticNamePrefix = this.configuration.syntheticNamePrefix;
|
|
27
|
+
return code `(<${syntheticNamePrefix}DefaultNamespaceT extends ${this.reusables.snippets.NamespaceBuilder} = ${this.reusables.snippets.NamespaceBuilder}>(${parametersVariable}: ${this.constructorParameters.type.expression})${this.name.map((name) => code `: ${this.reusables.imports.Either}<Error, ${name}>`).orDefault(code ``)} => ${returnExpression})`;
|
|
27
28
|
}
|
|
28
29
|
//# sourceMappingURL=ObjectType_createFunctionExpression.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
2
|
-
export const snippets_ConversionFunction = ({ imports, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}ConversionFunction`, code `\
|
|
3
|
-
type ${syntheticNamePrefix}ConversionFunction<SourceT, TargetT> = (source: SourceT) => ${imports.Either}<Error, TargetT>;`);
|
|
2
|
+
export const snippets_ConversionFunction = ({ imports, snippets, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}ConversionFunction`, code `\
|
|
3
|
+
type ${syntheticNamePrefix}ConversionFunction<SourceT, TargetT, DefaultNamespaceT extends ${snippets.NamespaceBuilder} = ${snippets.NamespaceBuilder}> = (source: SourceT, defaultNamespace?: DefaultNamespaceT) => ${imports.Either}<Error, TargetT>;`);
|
|
4
4
|
//# sourceMappingURL=snippets_ConversionFunction.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
2
|
+
export const snippets_NamespaceBuilder = ({ imports, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}NamespaceBuilder`, code `\
|
|
3
|
+
/**
|
|
4
|
+
* NamespaceBuilder type excerpted from @rdfjs/namespace (MIT license) in lieu of a type import.
|
|
5
|
+
*/
|
|
6
|
+
type ${syntheticNamePrefix}NamespaceBuilder<TermNames extends string = any> = Record<TermNames, NamedNode> & {
|
|
7
|
+
(property?: TemplateStringsArray | TermNames): ${imports.NamedNode};
|
|
8
|
+
};`);
|
|
9
|
+
//# sourceMappingURL=snippets_NamespaceBuilder.js.map
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
2
2
|
export const snippets_convertToArraySet = ({ imports, snippets, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}convertToArraySet`, code `\
|
|
3
|
-
function ${syntheticNamePrefix}convertToArraySet<ItemSourceT, ItemTargetT
|
|
4
|
-
|
|
5
|
-
return (value: readonly ItemSourceT[] | undefined): ${imports.Either}<Error, ItemTargetArrayT> =>
|
|
6
|
-
(typeof value === "undefined" ? ${imports.Either}.of([]) : ${imports.Either}.sequence(value.map(convertToItem))) as ${imports.Either}<Error, ItemTargetArrayT>;
|
|
3
|
+
function ${syntheticNamePrefix}convertToArraySet<DefaultNamespaceT extends ${snippets.NamespaceBuilder}, ItemSourceT, ItemTargetT>(convertToItem: ${snippets.ConversionFunction}<ItemSourceT, ItemTargetT, DefaultNamespaceT>): ${snippets.ConversionFunction}<readonly ItemSourceT[] | undefined, readonly ItemTargetT[], DefaultNamespaceT> {
|
|
4
|
+
return (value, defaultNamespace) => (typeof value === "undefined" ? ${imports.Either}.of([]) : ${imports.Either}.sequence(value.map(value => convertToItem(value, defaultNamespace)))) as ${imports.Either}<Error, readonly ItemTargetT[]>;
|
|
7
5
|
}`);
|
|
8
6
|
//# sourceMappingURL=snippets_convertToArraySet.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
2
|
-
export const snippets_convertToBlankNode = ({ imports, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}convertToBlankNode`, code `\
|
|
3
|
-
|
|
2
|
+
export const snippets_convertToBlankNode = ({ imports, snippets, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}convertToBlankNode`, code `\
|
|
3
|
+
const ${syntheticNamePrefix}convertToBlankNode: ${snippets.ConversionFunction}<${imports.BlankNode} | undefined, ${imports.BlankNode}> = (value) => {
|
|
4
4
|
switch (typeof value) {
|
|
5
5
|
case "object":
|
|
6
6
|
return ${imports.Either}.of(value);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
2
|
-
export const snippets_convertToBlankNodeIdentifierProperty = ({ imports, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}convertToBlankNodeIdentifierProperty`, code `\
|
|
3
|
-
|
|
2
|
+
export const snippets_convertToBlankNodeIdentifierProperty = ({ imports, snippets, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}convertToBlankNodeIdentifierProperty`, code `\
|
|
3
|
+
const ${syntheticNamePrefix}convertToBlankNodeIdentifierProperty: ${snippets.ConversionFunction}<(() => ${imports.BlankNode}) | ${imports.BlankNode} | undefined, () => ${imports.BlankNode}> = (identifier) => {
|
|
4
4
|
switch (typeof identifier) {
|
|
5
5
|
case "function":
|
|
6
6
|
return ${imports.Either}.of(identifier);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
2
|
-
export const snippets_convertToIdentifier = ({ imports, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}convertToIdentifier`, code `\
|
|
3
|
-
function ${syntheticNamePrefix}convertToIdentifier(value: ${imports.BlankNode} | ${imports.NamedNode} | string | undefined): ${imports.Either}<Error, ${imports.BlankNode} | ${imports.NamedNode}> {
|
|
2
|
+
export const snippets_convertToIdentifier = ({ imports, snippets, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}convertToIdentifier`, code `\
|
|
3
|
+
function ${syntheticNamePrefix}convertToIdentifier<DefaultNamespaceT extends ${snippets.NamespaceBuilder} = ${snippets.NamespaceBuilder}>(value: ${imports.BlankNode} | ${imports.NamedNode} | (keyof DefaultNamespaceT & string) | undefined, defaultNamespace?: DefaultNamespaceT): ${imports.Either}<Error, ${imports.BlankNode} | ${imports.NamedNode}> {
|
|
4
4
|
switch (typeof value) {
|
|
5
5
|
case "object":
|
|
6
6
|
return ${imports.Either}.of(value);
|
|
7
7
|
case "string":
|
|
8
|
-
return ${imports.Either}.of(${imports.dataFactory}.namedNode(value));
|
|
8
|
+
return ${imports.Either}.of(defaultNamespace ? defaultNamespace(value) : ${imports.dataFactory}.namedNode(value));
|
|
9
9
|
case "undefined":
|
|
10
10
|
return ${imports.Either}.of(${imports.dataFactory}.blankNode());
|
|
11
11
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
2
|
-
export const snippets_convertToIdentifierProperty = ({ imports, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}convertToIdentifierProperty`, code `\
|
|
3
|
-
function ${syntheticNamePrefix}convertToIdentifierProperty(identifier: (() => ${imports.BlankNode} | ${imports.NamedNode}) | ${imports.BlankNode} | ${imports.NamedNode} | string | undefined): ${imports.Either}<Error, (
|
|
2
|
+
export const snippets_convertToIdentifierProperty = ({ imports, snippets, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}convertToIdentifierProperty`, code `\
|
|
3
|
+
function ${syntheticNamePrefix}convertToIdentifierProperty<DefaultNamespaceT extends ${snippets.NamespaceBuilder} = ${snippets.NamespaceBuilder}>(identifier: (() => ${imports.BlankNode} | ${imports.NamedNode}) | ${imports.BlankNode} | ${imports.NamedNode} | (keyof DefaultNamespaceT & string) | undefined, defaultNamespace?: DefaultNamespaceT): ${imports.Either}<Error, () => ${imports.BlankNode} | ${imports.NamedNode}> {
|
|
4
4
|
switch (typeof identifier) {
|
|
5
5
|
case "function":
|
|
6
6
|
return ${imports.Either}.of(identifier);
|
|
@@ -9,7 +9,7 @@ function ${syntheticNamePrefix}convertToIdentifierProperty(identifier: (() => ${
|
|
|
9
9
|
return ${imports.Either}.of(() => captureIdentifier);
|
|
10
10
|
}
|
|
11
11
|
case "string": {
|
|
12
|
-
const captureIdentifier = ${imports.dataFactory}.namedNode(identifier);
|
|
12
|
+
const captureIdentifier = defaultNamespace ? defaultNamespace(identifier) : ${imports.dataFactory}.namedNode(identifier);
|
|
13
13
|
return ${imports.Either}.of(() => captureIdentifier);
|
|
14
14
|
}
|
|
15
15
|
case "undefined": {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
2
|
+
export const snippets_convertToInIri = ({ imports, snippets, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}convertToInIri`, code `\
|
|
3
|
+
function ${syntheticNamePrefix}convertToInIri<IriT extends string>(value: IriT | ${imports.NamedNode}<IriT>, _defaultNamespace?: ${snippets.NamespaceBuilder}): ${imports.Either}<Error, ${imports.NamedNode}<IriT>> {
|
|
4
|
+
switch (typeof value) {
|
|
5
|
+
case "object":
|
|
6
|
+
return ${imports.Either}.of(value);
|
|
7
|
+
case "string":
|
|
8
|
+
return ${imports.Either}.of(${imports.dataFactory}.namedNode<IriT>(value));
|
|
9
|
+
}
|
|
10
|
+
}`);
|
|
11
|
+
//# sourceMappingURL=snippets_convertToInIri.js.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
2
|
+
export const snippets_convertToInIriIdentifierProperty = ({ imports, snippets, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}convertToInIriIdentifierProperty`, code `\
|
|
3
|
+
function ${syntheticNamePrefix}convertToInIriIdentifierProperty<InIriT extends string>(identifier: (() => ${imports.NamedNode}<InIriT>) | ${imports.NamedNode}<InIriT> | InIriT, _defaultNamespace?: ${snippets.NamespaceBuilder}): ${imports.Either}<Error, (() => ${imports.NamedNode}<InIriT>)> {
|
|
4
|
+
switch (typeof identifier) {
|
|
5
|
+
case "function":
|
|
6
|
+
return ${imports.Either}.of(identifier);
|
|
7
|
+
case "object": {
|
|
8
|
+
const captureIdentifier = identifier;
|
|
9
|
+
return ${imports.Either}.of(() => captureIdentifier);
|
|
10
|
+
}
|
|
11
|
+
case "string": {
|
|
12
|
+
const captureIdentifier = ${imports.dataFactory}.namedNode<InIriT>(identifier);
|
|
13
|
+
return ${imports.Either}.of(() => captureIdentifier);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}`);
|
|
17
|
+
//# sourceMappingURL=snippets_convertToInIriIdentifierProperty.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
2
|
-
export const snippets_convertToIri = ({ imports, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}convertToIri`, code `\
|
|
3
|
-
function ${syntheticNamePrefix}convertToIri<
|
|
2
|
+
export const snippets_convertToIri = ({ imports, snippets, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}convertToIri`, code `\
|
|
3
|
+
function ${syntheticNamePrefix}convertToIri<DefaultNamespaceT extends ${snippets.NamespaceBuilder} = ${snippets.NamespaceBuilder}>(value: ${imports.NamedNode} | (keyof DefaultNamespaceT & string), defaultNamespace?: DefaultNamespaceT): ${imports.Either}<Error, ${imports.NamedNode}> {
|
|
4
4
|
switch (typeof value) {
|
|
5
5
|
case "object":
|
|
6
6
|
return ${imports.Either}.of(value);
|
|
7
7
|
case "string":
|
|
8
|
-
return ${imports.Either}.of(${imports.dataFactory}.namedNode
|
|
8
|
+
return ${imports.Either}.of(defaultNamespace ? defaultNamespace(value) : ${imports.dataFactory}.namedNode(value));
|
|
9
9
|
}
|
|
10
10
|
}`);
|
|
11
11
|
//# sourceMappingURL=snippets_convertToIri.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
2
|
-
export const snippets_convertToIriIdentifierProperty = ({ imports, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}convertToIriIdentifierProperty`, code `\
|
|
3
|
-
function ${syntheticNamePrefix}convertToIriIdentifierProperty<
|
|
2
|
+
export const snippets_convertToIriIdentifierProperty = ({ imports, snippets, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}convertToIriIdentifierProperty`, code `\
|
|
3
|
+
function ${syntheticNamePrefix}convertToIriIdentifierProperty<DefaultNamespaceT extends ${snippets.NamespaceBuilder} = ${snippets.NamespaceBuilder}>(identifier: (() => ${imports.NamedNode}) | ${imports.NamedNode} | (keyof DefaultNamespaceT & string), defaultNamespace?: DefaultNamespaceT): ${imports.Either}<Error, (() => ${imports.NamedNode})> {
|
|
4
4
|
switch (typeof identifier) {
|
|
5
5
|
case "function":
|
|
6
6
|
return ${imports.Either}.of(identifier);
|
|
@@ -9,7 +9,7 @@ function ${syntheticNamePrefix}convertToIriIdentifierProperty<IriT extends strin
|
|
|
9
9
|
return ${imports.Either}.of(() => captureIdentifier);
|
|
10
10
|
}
|
|
11
11
|
case "string": {
|
|
12
|
-
const captureIdentifier = ${imports.dataFactory}.namedNode
|
|
12
|
+
const captureIdentifier = defaultNamespace ? defaultNamespace(identifier) : ${imports.dataFactory}.namedNode(identifier);
|
|
13
13
|
return ${imports.Either}.of(() => captureIdentifier);
|
|
14
14
|
}
|
|
15
15
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { rdf } from "@tpluscode/rdf-ns-builders";
|
|
2
2
|
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
3
|
-
export const snippets_convertToLangString = ({ imports, rdfjsTermExpression, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}convertToLangString`, code `\
|
|
4
|
-
|
|
3
|
+
export const snippets_convertToLangString = ({ imports, rdfjsTermExpression, snippets, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}convertToLangString`, code `\
|
|
4
|
+
const ${syntheticNamePrefix}convertToLangString: ${snippets.ConversionFunction}<${imports.Literal}, ${imports.Literal}> = (value) => {
|
|
5
5
|
if (!value.datatype.equals(${rdfjsTermExpression(rdf.langString)})) {
|
|
6
6
|
return ${imports.Left}(new Error(\`expected Literal to have rdf:langString datatype, not \${value.datatype.value}\`));
|
|
7
7
|
}
|
|
@@ -3,8 +3,8 @@ export const snippets_convertToLazy = ({ imports, snippets, syntheticNamePrefix,
|
|
|
3
3
|
function ${syntheticNamePrefix}convertToLazy<PartialT, ResolvedT>(
|
|
4
4
|
isPartial: (object: PartialT | ResolvedT) => object is PartialT,
|
|
5
5
|
resolvedToPartial: (resolved: ResolvedT) => PartialT
|
|
6
|
-
) {
|
|
7
|
-
return (value
|
|
6
|
+
): ${snippets.ConversionFunction}<${snippets.Lazy}<PartialT, ResolvedT> | PartialT | ResolvedT, ${snippets.Lazy}<PartialT, ResolvedT>> {
|
|
7
|
+
return (value) => {
|
|
8
8
|
if (value instanceof ${snippets.Lazy}) {
|
|
9
9
|
return ${imports.Either}.of(value);
|
|
10
10
|
}
|
|
@@ -3,8 +3,8 @@ export const snippets_convertToLazyOption = ({ imports, snippets, syntheticNameP
|
|
|
3
3
|
function ${syntheticNamePrefix}convertToLazyOption<PartialT, ResolvedT>(
|
|
4
4
|
isPartial: (object: PartialT | ResolvedT) => object is PartialT,
|
|
5
5
|
resolvedToPartial: (resolved: ResolvedT) => PartialT
|
|
6
|
-
) {
|
|
7
|
-
return (value
|
|
6
|
+
): ${snippets.ConversionFunction}<${snippets.LazyOption}<PartialT, ResolvedT> | ${imports.Maybe}<PartialT> | ${imports.Maybe}<ResolvedT> | PartialT | ResolvedT | undefined, ${snippets.LazyOption}<PartialT, ResolvedT>> {
|
|
7
|
+
return (value) => {
|
|
8
8
|
if (value instanceof ${snippets.LazyOption}) {
|
|
9
9
|
return ${imports.Either}.of(value);
|
|
10
10
|
}
|
|
@@ -3,8 +3,8 @@ export const snippets_convertToLazySet = ({ imports, snippets, syntheticNamePref
|
|
|
3
3
|
function ${syntheticNamePrefix}convertToLazySet<PartialT, ResolvedT>(
|
|
4
4
|
isPartial: (object: PartialT | ResolvedT) => object is PartialT,
|
|
5
5
|
resolvedToPartial: (resolved: ResolvedT) => PartialT
|
|
6
|
-
) {
|
|
7
|
-
return (value
|
|
6
|
+
): ${snippets.ConversionFunction}<${snippets.LazySet}<PartialT, ResolvedT> | readonly PartialT[] | readonly ResolvedT[] | PartialT | ResolvedT | undefined, ${snippets.LazySet}<PartialT, ResolvedT>> {
|
|
7
|
+
return (value) => {
|
|
8
8
|
if (typeof value === "undefined") {
|
|
9
9
|
return ${imports.Either}.of(new ${snippets.LazySet}<PartialT, ResolvedT>({
|
|
10
10
|
partials: [],
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
2
2
|
export const snippets_convertToList = ({ imports, snippets, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}convertToList`, code `\
|
|
3
|
-
function ${syntheticNamePrefix}convertToList<ItemSourceT, ItemTargetT
|
|
4
|
-
|
|
5
|
-
return (value: readonly ItemSourceT[]): ${imports.Either}<Error, ItemTargetArrayT> => ${imports.Either}.sequence(value.map(convertToItem)) as ${imports.Either}<Error, ItemTargetArrayT>;
|
|
3
|
+
function ${syntheticNamePrefix}convertToList<DefaultNamespaceT extends ${snippets.NamespaceBuilder}, ItemSourceT, ItemTargetT>(convertToItem: ${snippets.ConversionFunction}<ItemSourceT, ItemTargetT, DefaultNamespaceT>): ${snippets.ConversionFunction}<readonly ItemSourceT[], readonly ItemTargetT[], DefaultNamespaceT> {
|
|
4
|
+
return (value, defaultNamespace) => ${imports.Either}.sequence(value.map(value => convertToItem(value, defaultNamespace))) as ${imports.Either}<Error, readonly ItemTargetT[]>;
|
|
6
5
|
}`);
|
|
7
6
|
//# sourceMappingURL=snippets_convertToList.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
2
2
|
export const snippets_convertToLiteral = ({ imports, snippets, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}convertToLiteral`, code `\
|
|
3
|
-
|
|
3
|
+
const ${syntheticNamePrefix}convertToLiteral: ${snippets.ConversionFunction}<bigint | boolean | Date | number | string | ${imports.Literal}, ${imports.Literal}> = (value) => {
|
|
4
4
|
if (typeof value === "object") {
|
|
5
5
|
if (value instanceof Date) {
|
|
6
6
|
return ${imports.Either}.of(${snippets.literalFactory}.date(value));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
2
2
|
export const snippets_convertToMaybe = ({ imports, snippets, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}convertToMaybe`, code `\
|
|
3
|
-
function ${syntheticNamePrefix}convertToMaybe<ItemSourceT, ItemTargetT>(convertToItem: ${snippets.ConversionFunction}<ItemSourceT, ItemTargetT>) {
|
|
4
|
-
return (value
|
|
3
|
+
function ${syntheticNamePrefix}convertToMaybe<DefaultNamespaceT extends ${snippets.NamespaceBuilder}, ItemSourceT, ItemTargetT>(convertToItem: ${snippets.ConversionFunction}<ItemSourceT, ItemTargetT, DefaultNamespaceT>): ${snippets.ConversionFunction}<ItemSourceT | ${imports.Maybe}<ItemTargetT> | undefined, ${imports.Maybe}<ItemTargetT>, DefaultNamespaceT> {
|
|
4
|
+
return (value, defaultNamespace) => {
|
|
5
5
|
switch (typeof value) {
|
|
6
6
|
case "object": {
|
|
7
7
|
if (${imports.Maybe}.isMaybe(value)) {
|
|
@@ -13,7 +13,7 @@ function ${syntheticNamePrefix}convertToMaybe<ItemSourceT, ItemTargetT>(convertT
|
|
|
13
13
|
return ${imports.Either}.of(${imports.Maybe}.empty());
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
return convertToItem(value).map(${imports.Maybe}.of);
|
|
16
|
+
return convertToItem(value, defaultNamespace).map(${imports.Maybe}.of);
|
|
17
17
|
}
|
|
18
18
|
}`);
|
|
19
19
|
//# sourceMappingURL=snippets_convertToMaybe.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
2
|
+
export const snippets_convertToMutableArraySet = ({ imports, snippets, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}convertToMutableArraySet`, code `\
|
|
3
|
+
function ${syntheticNamePrefix}convertToMutableArraySet<DefaultNamespaceT extends ${snippets.NamespaceBuilder}, ItemSourceT, ItemTargetT>(convertToItem: ${snippets.ConversionFunction}<ItemSourceT, ItemTargetT>): ${snippets.ConversionFunction}<readonly ItemSourceT[] | undefined, ItemTargetT[], DefaultNamespaceT> {
|
|
4
|
+
return (value, defaultNamespace) => (typeof value === "undefined" ? ${imports.Either}.of([]) : ${imports.Either}.sequence(value.map(value => convertToItem(value, defaultNamespace)))) as ${imports.Either}<Error, ItemTargetT[]>;
|
|
5
|
+
}`);
|
|
6
|
+
//# sourceMappingURL=snippets_convertToMutableArraySet.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
2
|
+
export const snippets_convertToMutableList = ({ imports, snippets, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}convertToMutableList`, code `\
|
|
3
|
+
function ${syntheticNamePrefix}convertToMutableList<DefaultNamespaceT extends ${snippets.NamespaceBuilder}, ItemSourceT, ItemTargetT>(convertToItem: ${snippets.ConversionFunction}<ItemSourceT, ItemTargetT, DefaultNamespaceT>): ${snippets.ConversionFunction}<readonly ItemSourceT[], ItemTargetT[], DefaultNamespaceT> {
|
|
4
|
+
return (value, defaultNamespace) => ${imports.Either}.sequence(value.map(value => convertToItem(value, defaultNamespace))) as ${imports.Either}<Error, ItemTargetT[]>;
|
|
5
|
+
}`);
|
|
6
|
+
//# sourceMappingURL=snippets_convertToMutableList.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
2
|
+
export const snippets_convertToMutableScalarSet = ({ imports, snippets, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}convertToMutableScalarSet`, code `\
|
|
3
|
+
function ${syntheticNamePrefix}convertToMutableScalarSet<DefaultNamespaceT extends ${snippets.NamespaceBuilder}, ItemSourceT, ItemTargetT>(convertToItem: ${snippets.ConversionFunction}<ItemSourceT, ItemTargetT, DefaultNamespaceT>): ${snippets.ConversionFunction}<ItemSourceT | readonly ItemSourceT[] | undefined, ItemTargetT[], DefaultNamespaceT> {
|
|
4
|
+
return (value, defaultNamespace) => {
|
|
5
|
+
if (typeof value === "undefined") {
|
|
6
|
+
return ${imports.Either}.of<Error, ItemTargetT[]>([] as unknown as ItemTargetT[]);
|
|
7
|
+
}
|
|
8
|
+
if (Array.isArray(value)) {
|
|
9
|
+
return ${imports.Either}.sequence(value.map(value => convertToItem(value, defaultNamespace))) as ${imports.Either}<Error, ItemTargetT[]>;
|
|
10
|
+
}
|
|
11
|
+
return convertToItem(value as ItemSourceT, defaultNamespace).map(value => [value]) as ${imports.Either}<Error, ItemTargetT[]>;
|
|
12
|
+
};
|
|
13
|
+
}`);
|
|
14
|
+
//# sourceMappingURL=snippets_convertToMutableScalarSet.js.map
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
2
2
|
export const snippets_convertToScalarSet = ({ imports, snippets, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}convertToScalarSet`, code `\
|
|
3
|
-
function ${syntheticNamePrefix}convertToScalarSet<ItemSourceT, ItemTargetT
|
|
4
|
-
|
|
5
|
-
return (value: ItemSourceT | readonly ItemSourceT[] | undefined): ${imports.Either}<Error, ItemTargetArrayT> => {
|
|
3
|
+
function ${syntheticNamePrefix}convertToScalarSet<DefaultNamespaceT extends ${snippets.NamespaceBuilder}, ItemSourceT, ItemTargetT>(convertToItem: ${snippets.ConversionFunction}<ItemSourceT, ItemTargetT, DefaultNamespaceT>): ${snippets.ConversionFunction}<ItemSourceT | readonly ItemSourceT[] | undefined, readonly ItemTargetT[], DefaultNamespaceT> {
|
|
4
|
+
return (value, defaultNamespace) => {
|
|
6
5
|
if (typeof value === "undefined") {
|
|
7
|
-
return ${imports.Either}.of<Error,
|
|
6
|
+
return ${imports.Either}.of<Error, readonly ItemTargetT[]>([] as unknown as readonly ItemTargetT[]);
|
|
8
7
|
}
|
|
9
8
|
if (Array.isArray(value)) {
|
|
10
|
-
return ${imports.Either}.sequence(value.map(convertToItem)) as ${imports.Either}<Error,
|
|
9
|
+
return ${imports.Either}.sequence(value.map(value => convertToItem(value, defaultNamespace))) as ${imports.Either}<Error, readonly ItemTargetT[]>;
|
|
11
10
|
}
|
|
12
|
-
return convertToItem(value as ItemSourceT).map(value => [value]) as ${imports.Either}<Error,
|
|
11
|
+
return convertToItem(value as ItemSourceT).map(value => [value]) as ${imports.Either}<Error, readonly ItemTargetT[]>;
|
|
13
12
|
};
|
|
14
13
|
}`);
|
|
15
14
|
//# sourceMappingURL=snippets_convertToScalarSet.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
2
|
-
export const snippets_convertWithDefaultValue = ({
|
|
3
|
-
function ${syntheticNamePrefix}convertWithDefaultValue<ItemSourceT, ItemTargetT>(convertToItem: ${snippets.ConversionFunction}<ItemSourceT, ItemTargetT>, defaultValue: ItemSourceT) {
|
|
4
|
-
return (value
|
|
2
|
+
export const snippets_convertWithDefaultValue = ({ snippets, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}convertWithDefaultValue`, code `\
|
|
3
|
+
function ${syntheticNamePrefix}convertWithDefaultValue<ItemSourceT, ItemTargetT>(convertToItem: ${snippets.ConversionFunction}<ItemSourceT, ItemTargetT>, defaultValue: ItemSourceT): ${snippets.ConversionFunction}<ItemSourceT | undefined, ItemTargetT> {
|
|
4
|
+
return (value) => {
|
|
5
5
|
if (typeof value === "undefined") {
|
|
6
6
|
return convertToItem(defaultValue);
|
|
7
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
2
|
-
export const snippets_identityConversionFunction = ({ imports, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}identityConversionFunction`, code `\
|
|
3
|
-
function ${syntheticNamePrefix}identityConversionFunction<T>(value: T): ${imports.Either}<Error, T> {
|
|
2
|
+
export const snippets_identityConversionFunction = ({ imports, snippets, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}identityConversionFunction`, code `\
|
|
3
|
+
function ${syntheticNamePrefix}identityConversionFunction<T>(value: T, _defaultNamespace?: ${snippets.NamespaceBuilder}): ${imports.Either}<Error, T> {
|
|
4
4
|
return ${imports.Either}.of(value);
|
|
5
5
|
}`);
|
|
6
6
|
//# sourceMappingURL=snippets_identityConversionFunction.js.map
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
2
2
|
export const snippets_validateArray = ({ imports, snippets, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}validateArray`, code `\
|
|
3
|
-
function ${syntheticNamePrefix}validateArray<ItemSchemaT, ItemValueT
|
|
4
|
-
|
|
5
|
-
return (schema: ${snippets.CollectionSchema}<ItemSchemaT>, valueArray: readonly ItemValueT[]): ${imports.Either}<Error, EitherR> => {
|
|
3
|
+
function ${syntheticNamePrefix}validateArray<ItemSchemaT, ItemValueT>(validateItem: ${snippets.ValidationFunction}<ItemSchemaT, ItemValueT>): ${snippets.ValidationFunction}<${snippets.CollectionSchema}<ItemSchemaT>, readonly ItemValueT[]> {
|
|
4
|
+
return (schema, valueArray) => {
|
|
6
5
|
if (schema.minCount !== undefined && valueArray.length < schema.minCount) {
|
|
7
|
-
return ${imports.Left}(new Error(\`value array has length (\${valueArray.length}) less than minCount (\${schema.minCount})\`)) as ${imports.Either}<Error,
|
|
6
|
+
return ${imports.Left}(new Error(\`value array has length (\${valueArray.length}) less than minCount (\${schema.minCount})\`)) as ${imports.Either}<Error, readonly ItemValueT[]>;
|
|
8
7
|
}
|
|
9
8
|
|
|
10
|
-
return ${imports.Either}.sequence(valueArray.map(value => validateItem(schema.itemType, value))) as ${imports.Either}<Error,
|
|
9
|
+
return ${imports.Either}.sequence(valueArray.map(value => validateItem(schema.itemType, value))) as ${imports.Either}<Error, readonly ItemValueT[]>;
|
|
11
10
|
}
|
|
12
11
|
}`);
|
|
13
12
|
//# sourceMappingURL=snippets_validateArray.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
2
|
+
export const snippets_validateMutableArray = ({ imports, snippets, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}validateMutableArray`, code `\
|
|
3
|
+
function ${syntheticNamePrefix}validateMutableArray<ItemSchemaT, ItemValueT>(validateItem: ${snippets.ValidationFunction}<ItemSchemaT, ItemValueT>): ${snippets.ValidationFunction}<${snippets.CollectionSchema}<ItemSchemaT>, ItemValueT[]> {
|
|
4
|
+
return (schema, valueArray) => {
|
|
5
|
+
if (schema.minCount !== undefined && valueArray.length < schema.minCount) {
|
|
6
|
+
return ${imports.Left}(new Error(\`value array has length (\${valueArray.length}) less than minCount (\${schema.minCount})\`)) as ${imports.Either}<Error, ItemValueT[]>;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
return ${imports.Either}.sequence(valueArray.map(value => validateItem(schema.itemType, value))) as ${imports.Either}<Error, ItemValueT[]>;
|
|
10
|
+
}
|
|
11
|
+
}`);
|
|
12
|
+
//# sourceMappingURL=snippets_validateMutableArray.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type PrefixMap from "@rdfjs/prefix-map/PrefixMap.js";
|
|
2
1
|
import type { DatasetCore } from "@rdfjs/types";
|
|
2
|
+
import type { PrefixMap } from "@rdfx/collection";
|
|
3
3
|
import { AbstractShapesGraph } from "@shaclmate/shacl-ast";
|
|
4
4
|
import type { Either } from "purify-ts";
|
|
5
5
|
import type { Logger } from "ts-log";
|
package/package.json
CHANGED
|
@@ -1,20 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"dependencies": {
|
|
3
|
-
"@shaclmate/shacl-ast": "4.0.
|
|
4
|
-
"@rdfjs/dataset": "~2.0.2",
|
|
5
|
-
"@rdfjs/prefix-map": "~0.1.2",
|
|
6
|
-
"@rdfjs/term-map": "~2.0.2",
|
|
7
|
-
"@rdfjs/term-set": "~2.0.3",
|
|
3
|
+
"@shaclmate/shacl-ast": "4.0.77",
|
|
8
4
|
"@rdfjs/types": "~2.0.1",
|
|
9
|
-
"@rdfx/
|
|
10
|
-
"@rdfx/
|
|
11
|
-
"@rdfx/
|
|
5
|
+
"@rdfx/collection": "0.0.42",
|
|
6
|
+
"@rdfx/data-factory": "0.0.42",
|
|
7
|
+
"@rdfx/literal": "0.0.42",
|
|
8
|
+
"@rdfx/resource": "0.0.42",
|
|
12
9
|
"@sindresorhus/base62": "~0.1.0",
|
|
13
10
|
"@tpluscode/rdf-ns-builders": "~4.3.0",
|
|
14
|
-
"@types/rdfjs__dataset": "~2.0.7",
|
|
15
|
-
"@types/rdfjs__prefix-map": "~0.1.5",
|
|
16
|
-
"@types/rdfjs__term-map": "~2.0.10",
|
|
17
|
-
"@types/rdfjs__term-set": "~2.0.9",
|
|
18
11
|
"change-case": "~5.4.4",
|
|
19
12
|
"decimal.js": "~10.6.0",
|
|
20
13
|
"plur": "~5.1.0",
|
|
@@ -26,8 +19,8 @@
|
|
|
26
19
|
"typescript-memoize": "~1.1.1"
|
|
27
20
|
},
|
|
28
21
|
"devDependencies": {
|
|
29
|
-
"@rdfx/fs": "0.0.
|
|
30
|
-
"@rdfx/serializers": "0.0.
|
|
22
|
+
"@rdfx/fs": "0.0.42",
|
|
23
|
+
"@rdfx/serializers": "0.0.42"
|
|
31
24
|
},
|
|
32
25
|
"files": [
|
|
33
26
|
"dist/Compiler.d.ts",
|
|
@@ -416,6 +409,8 @@
|
|
|
416
409
|
"dist/generators/ts/_snippets/snippets_MaybeFilter.js",
|
|
417
410
|
"dist/generators/ts/_snippets/snippets_MaybeSchema.d.ts",
|
|
418
411
|
"dist/generators/ts/_snippets/snippets_MaybeSchema.js",
|
|
412
|
+
"dist/generators/ts/_snippets/snippets_NamespaceBuilder.d.ts",
|
|
413
|
+
"dist/generators/ts/_snippets/snippets_NamespaceBuilder.js",
|
|
419
414
|
"dist/generators/ts/_snippets/snippets_NumericFilter.d.ts",
|
|
420
415
|
"dist/generators/ts/_snippets/snippets_NumericFilter.js",
|
|
421
416
|
"dist/generators/ts/_snippets/snippets_NumericSchema.d.ts",
|
|
@@ -490,6 +485,10 @@
|
|
|
490
485
|
"dist/generators/ts/_snippets/snippets_convertToIdentifier.js",
|
|
491
486
|
"dist/generators/ts/_snippets/snippets_convertToIdentifierProperty.d.ts",
|
|
492
487
|
"dist/generators/ts/_snippets/snippets_convertToIdentifierProperty.js",
|
|
488
|
+
"dist/generators/ts/_snippets/snippets_convertToInIri.d.ts",
|
|
489
|
+
"dist/generators/ts/_snippets/snippets_convertToInIri.js",
|
|
490
|
+
"dist/generators/ts/_snippets/snippets_convertToInIriIdentifierProperty.d.ts",
|
|
491
|
+
"dist/generators/ts/_snippets/snippets_convertToInIriIdentifierProperty.js",
|
|
493
492
|
"dist/generators/ts/_snippets/snippets_convertToIri.d.ts",
|
|
494
493
|
"dist/generators/ts/_snippets/snippets_convertToIri.js",
|
|
495
494
|
"dist/generators/ts/_snippets/snippets_convertToIriIdentifierProperty.d.ts",
|
|
@@ -508,6 +507,12 @@
|
|
|
508
507
|
"dist/generators/ts/_snippets/snippets_convertToLiteral.js",
|
|
509
508
|
"dist/generators/ts/_snippets/snippets_convertToMaybe.d.ts",
|
|
510
509
|
"dist/generators/ts/_snippets/snippets_convertToMaybe.js",
|
|
510
|
+
"dist/generators/ts/_snippets/snippets_convertToMutableArraySet.d.ts",
|
|
511
|
+
"dist/generators/ts/_snippets/snippets_convertToMutableArraySet.js",
|
|
512
|
+
"dist/generators/ts/_snippets/snippets_convertToMutableList.d.ts",
|
|
513
|
+
"dist/generators/ts/_snippets/snippets_convertToMutableList.js",
|
|
514
|
+
"dist/generators/ts/_snippets/snippets_convertToMutableScalarSet.d.ts",
|
|
515
|
+
"dist/generators/ts/_snippets/snippets_convertToMutableScalarSet.js",
|
|
511
516
|
"dist/generators/ts/_snippets/snippets_convertToScalarSet.d.ts",
|
|
512
517
|
"dist/generators/ts/_snippets/snippets_convertToScalarSet.js",
|
|
513
518
|
"dist/generators/ts/_snippets/snippets_convertWithDefaultValue.d.ts",
|
|
@@ -678,6 +683,8 @@
|
|
|
678
683
|
"dist/generators/ts/_snippets/snippets_validateArray.js",
|
|
679
684
|
"dist/generators/ts/_snippets/snippets_validateMaybe.d.ts",
|
|
680
685
|
"dist/generators/ts/_snippets/snippets_validateMaybe.js",
|
|
686
|
+
"dist/generators/ts/_snippets/snippets_validateMutableArray.d.ts",
|
|
687
|
+
"dist/generators/ts/_snippets/snippets_validateMutableArray.js",
|
|
681
688
|
"dist/generators/ts/_snippets/snippets_wrap_FromRdfResourceFunction.d.ts",
|
|
682
689
|
"dist/generators/ts/_snippets/snippets_wrap_FromRdfResourceFunction.js",
|
|
683
690
|
"dist/generators/ts/_snippets/snippets_wrap_ToRdfResourceFunction.d.ts",
|
|
@@ -722,5 +729,5 @@
|
|
|
722
729
|
},
|
|
723
730
|
"type": "module",
|
|
724
731
|
"types": "./dist/index.d.ts",
|
|
725
|
-
"version": "4.0.
|
|
732
|
+
"version": "4.0.77"
|
|
726
733
|
}
|