@lionweb/core 0.6.13-beta.7 → 0.7.0-alpha.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/CHANGELOG.md +29 -7
- package/dist/deserializer.d.ts +18 -9
- package/dist/deserializer.d.ts.map +1 -1
- package/dist/deserializer.js +40 -43
- package/dist/deserializer.js.map +1 -1
- package/dist/dynamic-facade.d.ts +15 -6
- package/dist/dynamic-facade.d.ts.map +1 -1
- package/dist/dynamic-facade.js +13 -5
- package/dist/dynamic-facade.js.map +1 -1
- package/dist/extraction.d.ts +15 -0
- package/dist/extraction.d.ts.map +1 -0
- package/dist/extraction.js +17 -0
- package/dist/extraction.js.map +1 -0
- package/dist/functions.d.ts +4 -3
- package/dist/functions.d.ts.map +1 -1
- package/dist/functions.js +1 -1
- package/dist/functions.js.map +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/m1/reference-utils.d.ts +7 -7
- package/dist/m1/reference-utils.d.ts.map +1 -1
- package/dist/m1/reference-utils.js +10 -10
- package/dist/m1/reference-utils.js.map +1 -1
- package/dist/m3/builtins.d.ts +38 -17
- package/dist/m3/builtins.d.ts.map +1 -1
- package/dist/m3/builtins.js +66 -44
- package/dist/m3/builtins.js.map +1 -1
- package/dist/m3/constraints.d.ts.map +1 -1
- package/dist/m3/constraints.js +10 -5
- package/dist/m3/constraints.js.map +1 -1
- package/dist/m3/deserializer.d.ts +3 -3
- package/dist/m3/deserializer.d.ts.map +1 -1
- package/dist/m3/deserializer.js +4 -4
- package/dist/m3/deserializer.js.map +1 -1
- package/dist/m3/facade.d.ts +13 -4
- package/dist/m3/facade.d.ts.map +1 -1
- package/dist/m3/facade.js +17 -9
- package/dist/m3/facade.js.map +1 -1
- package/dist/m3/factory.d.ts +2 -2
- package/dist/m3/factory.d.ts.map +1 -1
- package/dist/m3/factory.js.map +1 -1
- package/dist/m3/functions.d.ts +33 -12
- package/dist/m3/functions.d.ts.map +1 -1
- package/dist/m3/functions.js +32 -14
- package/dist/m3/functions.js.map +1 -1
- package/dist/m3/index.d.ts +1 -0
- package/dist/m3/index.d.ts.map +1 -1
- package/dist/m3/index.js +1 -0
- package/dist/m3/index.js.map +1 -1
- package/dist/m3/lioncore.d.ts +2 -0
- package/dist/m3/lioncore.d.ts.map +1 -1
- package/dist/m3/lioncore.js +25 -60
- package/dist/m3/lioncore.js.map +1 -1
- package/dist/m3/reference-checker.d.ts.map +1 -1
- package/dist/m3/reference-checker.js +2 -2
- package/dist/m3/reference-checker.js.map +1 -1
- package/dist/m3/serializer.d.ts +2 -2
- package/dist/m3/serializer.d.ts.map +1 -1
- package/dist/m3/serializer.js +3 -3
- package/dist/m3/serializer.js.map +1 -1
- package/dist/m3/types.d.ts +26 -21
- package/dist/m3/types.d.ts.map +1 -1
- package/dist/m3/types.js +9 -4
- package/dist/m3/types.js.map +1 -1
- package/dist/reading.d.ts +45 -0
- package/dist/reading.d.ts.map +1 -0
- package/dist/reading.js +2 -0
- package/dist/reading.js.map +1 -0
- package/dist/references.d.ts +3 -3
- package/dist/references.d.ts.map +1 -1
- package/dist/serializer.d.ts +31 -10
- package/dist/serializer.d.ts.map +1 -1
- package/dist/serializer.js +111 -109
- package/dist/serializer.js.map +1 -1
- package/dist/symbol-table.d.ts +15 -15
- package/dist/symbol-table.d.ts.map +1 -1
- package/dist/symbol-table.js +2 -9
- package/dist/symbol-table.js.map +1 -1
- package/dist/types.d.ts +2 -10
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +1 -6
- package/dist/types.js.map +1 -1
- package/dist/writing.d.ts +49 -0
- package/dist/writing.d.ts.map +1 -0
- package/dist/writing.js +30 -0
- package/dist/writing.js.map +1 -0
- package/package.json +13 -7
- package/dist/facade.d.ts +0 -84
- package/dist/facade.d.ts.map +0 -1
- package/dist/facade.js +0 -41
- package/dist/facade.js.map +0 -1
- package/dist/serialization.d.ts +0 -52
- package/dist/serialization.d.ts.map +0 -1
- package/dist/serialization.js +0 -7
- package/dist/serialization.js.map +0 -1
- package/dist/utils/array-helpers.d.ts +0 -14
- package/dist/utils/array-helpers.d.ts.map +0 -1
- package/dist/utils/array-helpers.js +0 -15
- package/dist/utils/array-helpers.js.map +0 -1
- package/dist/utils/cycles.d.ts +0 -8
- package/dist/utils/cycles.d.ts.map +0 -1
- package/dist/utils/cycles.js +0 -26
- package/dist/utils/cycles.js.map +0 -1
- package/dist/utils/index.d.ts +0 -7
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/index.js +0 -7
- package/dist/utils/index.js.map +0 -1
- package/dist/utils/map-helpers.d.ts +0 -26
- package/dist/utils/map-helpers.d.ts.map +0 -1
- package/dist/utils/map-helpers.js +0 -41
- package/dist/utils/map-helpers.js.map +0 -1
- package/dist/utils/recursion.d.ts +0 -13
- package/dist/utils/recursion.d.ts.map +0 -1
- package/dist/utils/recursion.js +0 -21
- package/dist/utils/recursion.js.map +0 -1
- package/dist/utils/sorting.d.ts +0 -7
- package/dist/utils/sorting.d.ts.map +0 -1
- package/dist/utils/sorting.js +0 -7
- package/dist/utils/sorting.js.map +0 -1
- package/dist/utils/string-mapping.d.ts +0 -6
- package/dist/utils/string-mapping.d.ts.map +0 -1
- package/dist/utils/string-mapping.js +0 -10
- package/dist/utils/string-mapping.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reference-utils.d.ts","sourceRoot":"","sources":["../../src/m1/reference-utils.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"reference-utils.d.ts","sourceRoot":"","sources":["../../src/m1/reference-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AACtC,OAAO,EAAiB,SAAS,EAAE,MAAM,gBAAgB,CAAA;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAGlC;;;GAGG;AACH,qBAAa,cAAc,CAAC,EAAE,SAAS,IAAI;aAEnB,UAAU,EAAE,EAAE;aACd,UAAU,EAAE,EAAE;aACd,SAAS,EAAE,SAAS;aACpB,KAAK,EAAE,MAAM,GAAG,IAAI;gBAHpB,UAAU,EAAE,EAAE,EACd,UAAU,EAAE,EAAE,EACd,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,MAAM,GAAG,IAAI;CAE3C;AAGD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,eAAe,4EA4B3B,CAAA;AAGD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,kBAAkB,0GAQ9B,CAAA;AAGD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,2BAA2B,4EAK4C,CAAA"}
|
|
@@ -20,24 +20,24 @@ export class ReferenceValue {
|
|
|
20
20
|
* even if the scope passed contains duplicate nodes.
|
|
21
21
|
*
|
|
22
22
|
* @param scope - the {@link Node nodes} that are searched for references
|
|
23
|
-
* @param
|
|
23
|
+
* @param reader - a {@link Reader} to reflect on nodes.
|
|
24
24
|
* _Note_ that it's assumed that its {@link getFeatureValue} function doesn't throw.
|
|
25
25
|
*/
|
|
26
|
-
export const referenceValues = (scope,
|
|
26
|
+
export const referenceValues = (scope, reader) => {
|
|
27
27
|
const visit = (sourceNode, reference) => {
|
|
28
28
|
if (reference.multiple) {
|
|
29
|
-
const targetNodes = (
|
|
29
|
+
const targetNodes = (reader.getFeatureValue(sourceNode, reference) ?? []);
|
|
30
30
|
return targetNodes
|
|
31
31
|
.map((targetNode, index) => new ReferenceValue(sourceNode, targetNode, reference, index));
|
|
32
32
|
}
|
|
33
|
-
const targetNode =
|
|
33
|
+
const targetNode = reader.getFeatureValue(sourceNode, reference);
|
|
34
34
|
if (targetNode !== undefined) {
|
|
35
35
|
return [new ReferenceValue(sourceNode, targetNode, reference, null)];
|
|
36
36
|
}
|
|
37
37
|
return [];
|
|
38
38
|
};
|
|
39
39
|
return [...new Set(scope)] // ~ .distinct()
|
|
40
|
-
.flatMap((sourceNode) => allFeaturesOf(
|
|
40
|
+
.flatMap((sourceNode) => allFeaturesOf(reader.classifierOf(sourceNode))
|
|
41
41
|
.filter((feature) => feature instanceof Reference)
|
|
42
42
|
.map((feature) => feature)
|
|
43
43
|
.flatMap((reference) => visit(sourceNode, reference)));
|
|
@@ -53,12 +53,12 @@ export const referenceValues = (scope, extractionFacade) => {
|
|
|
53
53
|
*
|
|
54
54
|
* @param targetNodeOrNodes - one or more target {@link Node nodes} for which the incoming references are searched
|
|
55
55
|
* @param scope - the {@link Node nodes} that are searched for references
|
|
56
|
-
* @param
|
|
56
|
+
* @param reader - a {@link Reader} to reflect on nodes.
|
|
57
57
|
* _Note_ that it's assumed that its {@link getFeatureValue} function doesn't throw.
|
|
58
58
|
*/
|
|
59
|
-
export const incomingReferences = (targetNodeOrNodes, scope,
|
|
59
|
+
export const incomingReferences = (targetNodeOrNodes, scope, reader) => {
|
|
60
60
|
const targetNodes = Array.isArray(targetNodeOrNodes) ? targetNodeOrNodes : [targetNodeOrNodes];
|
|
61
|
-
return referenceValues(scope,
|
|
61
|
+
return referenceValues(scope, reader)
|
|
62
62
|
.filter((referenceValue) => targetNodes.indexOf(referenceValue.targetNode) > -1);
|
|
63
63
|
};
|
|
64
64
|
/**
|
|
@@ -70,9 +70,9 @@ export const incomingReferences = (targetNodeOrNodes, scope, extractionFacade) =
|
|
|
70
70
|
* even if the given scope contains duplicate nodes.
|
|
71
71
|
*
|
|
72
72
|
* @param scope - the {@link Node nodes} that form the scope of “reachable” nodes
|
|
73
|
-
* @param
|
|
73
|
+
* @param reader - a {@link Reader} to reflect on nodes.
|
|
74
74
|
* _Note_ that it's assumed that its {@link getFeatureValue} function doesn't throw.
|
|
75
75
|
*/
|
|
76
|
-
export const referencesToOutOfScopeNodes = (scope,
|
|
76
|
+
export const referencesToOutOfScopeNodes = (scope, reader) => referenceValues(scope, reader)
|
|
77
77
|
.filter((referenceValue) => scope.indexOf(referenceValue.targetNode) === -1);
|
|
78
78
|
//# sourceMappingURL=reference-utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reference-utils.js","sourceRoot":"","sources":["../../src/m1/reference-utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"reference-utils.js","sourceRoot":"","sources":["../../src/m1/reference-utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAIzD;;;GAGG;AACH,MAAM,OAAO,cAAc;IACvB,YACoB,UAAc,EACd,UAAc,EACd,SAAoB,EACpB,KAAoB;QAHpB,eAAU,GAAV,UAAU,CAAI;QACd,eAAU,GAAV,UAAU,CAAI;QACd,cAAS,GAAT,SAAS,CAAW;QACpB,UAAK,GAAL,KAAK,CAAe;IACrC,CAAC;CACP;AAGD;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAC3B,KAAW,EACX,MAAkB,EACE,EAAE;IACtB,MAAM,KAAK,GAAG,CAAC,UAAc,EAAE,SAAoB,EAAwB,EAAE;QACzE,IAAI,SAAS,CAAC,QAAQ,EAAE,CAAC;YACrB,MAAM,WAAW,GAAG,CAAC,MAAM,CAAC,eAAe,CAAC,UAAU,EAAE,SAAS,CAAC,IAAI,EAAE,CAAS,CAAA;YACjF,OAAO,WAAW;iBACb,GAAG,CAAC,CAAC,UAAU,EAAE,KAAK,EAAE,EAAE,CACvB,IAAI,cAAc,CAAK,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,KAAK,CAAC,CACnE,CAAA;QACT,CAAC;QAED,MAAM,UAAU,GAAG,MAAM,CAAC,eAAe,CAAC,UAAU,EAAE,SAAS,CAAqB,CAAA;QACpF,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;YAC3B,OAAO,CAAC,IAAI,cAAc,CAAK,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC,CAAA;QAC5E,CAAC;QAED,OAAO,EAAE,CAAA;IACb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-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { PropertyValueDeserializer } from "../deserializer.js";
|
|
2
|
+
import { PropertyValueSerializer } from "../serializer.js";
|
|
3
|
+
import { Classifier, Concept, DataType, Property } from "./types.js";
|
|
4
4
|
/**
|
|
5
5
|
* Definition of a LionCore language that serves as a standard library of built-in primitive types.
|
|
6
6
|
*/
|
|
7
7
|
declare const lioncoreBuiltins: import("./types.js").Language;
|
|
8
8
|
declare const isBuiltinNodeConcept: (classifier: Classifier) => boolean;
|
|
9
|
-
type BuiltinPrimitive = string | boolean | number | Record<string, unknown> | Array<unknown>;
|
|
10
|
-
type PrimitiveTypeValue = BuiltinPrimitive | unknown;
|
|
11
|
-
type SpecificPrimitiveTypeDeserializer = (value: string) => PrimitiveTypeValue;
|
|
12
|
-
type SpecificPrimitiveTypeSerializer = (value: unknown) => string;
|
|
13
9
|
declare const builtinPrimitives: {
|
|
10
|
+
stringDataType: import("./types.js").PrimitiveType;
|
|
11
|
+
booleanDataType: import("./types.js").PrimitiveType;
|
|
12
|
+
integerDataType: import("./types.js").PrimitiveType;
|
|
13
|
+
jsonDataType: import("./types.js").PrimitiveType;
|
|
14
|
+
/**
|
|
15
|
+
* Misspelled alias of {@link stringDataType}, kept for backward compatibility, and to be deprecated and removed later.
|
|
16
|
+
*/
|
|
14
17
|
stringDatatype: import("./types.js").PrimitiveType;
|
|
18
|
+
/**
|
|
19
|
+
* Misspelled alias of {@link booleanDataType}, kept for backward compatibility, and to be deprecated and removed later.
|
|
20
|
+
*/
|
|
15
21
|
booleanDatatype: import("./types.js").PrimitiveType;
|
|
22
|
+
/**
|
|
23
|
+
* Misspelled alias of {@link integerDataType}, kept for backward compatibility, and to be deprecated and removed later.
|
|
24
|
+
*/
|
|
16
25
|
integerDatatype: import("./types.js").PrimitiveType;
|
|
26
|
+
/**
|
|
27
|
+
* Misspelled alias of {@link jsonDataType}, kept for backward compatibility, and to be deprecated and removed later.
|
|
28
|
+
*/
|
|
17
29
|
jsonDatatype: import("./types.js").PrimitiveType;
|
|
18
30
|
};
|
|
19
31
|
declare const builtinClassifiers: {
|
|
@@ -24,22 +36,31 @@ declare const builtinFeatures: {
|
|
|
24
36
|
inamed_name: Property;
|
|
25
37
|
};
|
|
26
38
|
/**
|
|
27
|
-
* Determines whether two
|
|
39
|
+
* Determines whether two data types should be structurally equal based on equality of: meta type, key, and language's key.
|
|
28
40
|
*/
|
|
29
|
-
declare const shouldBeIdentical: (left:
|
|
30
|
-
declare abstract class
|
|
41
|
+
declare const shouldBeIdentical: (left: DataType, right: DataType) => boolean;
|
|
42
|
+
declare abstract class DataTypeRegister<T> {
|
|
31
43
|
private map;
|
|
32
|
-
register(
|
|
33
|
-
protected byType(
|
|
44
|
+
register(dataType: DataType, t: T): void;
|
|
45
|
+
protected byType(targetDataType: DataType): T | undefined;
|
|
34
46
|
}
|
|
35
|
-
export declare class
|
|
47
|
+
export declare class BuiltinPropertyValueDeserializer extends DataTypeRegister<(value: string) => unknown> implements PropertyValueDeserializer {
|
|
36
48
|
constructor();
|
|
37
|
-
deserializeValue(value: string | undefined, property: Property):
|
|
49
|
+
deserializeValue(value: string | undefined, property: Property): unknown | undefined;
|
|
38
50
|
}
|
|
39
|
-
|
|
51
|
+
/**
|
|
52
|
+
* Misspelled alias of {@link BuiltinPropertyValueDeserializer}, kept for backward compatibility, and to be deprecated and removed later.
|
|
53
|
+
*/
|
|
54
|
+
export declare class DefaultPrimitiveTypeDeserializer extends BuiltinPropertyValueDeserializer {
|
|
55
|
+
}
|
|
56
|
+
export declare class BuiltinPropertyValueSerializer extends DataTypeRegister<(value: unknown) => string> implements PropertyValueSerializer {
|
|
40
57
|
constructor();
|
|
41
|
-
serializeValue(value: unknown | undefined, property: Property): string |
|
|
58
|
+
serializeValue(value: unknown | undefined, property: Property): string | null;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Misspelled alias of {@link BuiltinPropertyValueSerializer}, kept for backward compatibility, and to be deprecated and removed later.
|
|
62
|
+
*/
|
|
63
|
+
export declare class DefaultPrimitiveTypeSerializer extends BuiltinPropertyValueSerializer {
|
|
42
64
|
}
|
|
43
|
-
export type { BuiltinPrimitive };
|
|
44
65
|
export { builtinPrimitives, builtinClassifiers, builtinFeatures, isBuiltinNodeConcept, lioncoreBuiltins, shouldBeIdentical };
|
|
45
66
|
//# sourceMappingURL=builtins.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builtins.d.ts","sourceRoot":"","sources":["../../src/m3/builtins.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"builtins.d.ts","sourceRoot":"","sources":["../../src/m3/builtins.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAA;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAA;AAG1D,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAuB,QAAQ,EAAE,MAAM,YAAY,CAAA;AAczF;;GAEG;AACH,QAAA,MAAM,gBAAgB,+BAAmB,CAAA;AASzC,QAAA,MAAM,oBAAoB,eAAgB,UAAU,YAKhB,CAAA;AAMpC,QAAA,MAAM,iBAAiB;;;;;IAKnB;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;CAEN,CAAA;AAED,QAAA,MAAM,kBAAkB;;;CAGvB,CAAA;AAED,QAAA,MAAM,eAAe;;CAEpB,CAAA;AAED;;GAEG;AACH,QAAA,MAAM,iBAAiB,SAAU,QAAQ,SAAS,QAAQ,KAAG,OACiD,CAAA;AAE9G,uBAAe,gBAAgB,CAAC,CAAC;IAC7B,OAAO,CAAC,GAAG,CAAyB;IAE7B,QAAQ,CAAC,QAAQ,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC;IAIxC,SAAS,CAAC,MAAM,CAAC,cAAc,EAAE,QAAQ,GAAG,CAAC,GAAG,SAAS;CAQ5D;AAED,qBAAa,gCACT,SAAQ,gBAAgB,CAAC,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CACnD,YAAW,yBAAyB;;IAUpC,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,QAAQ,EAAE,QAAQ,GAAG,OAAO,GAAG,SAAS;CAkBvF;AAED;;GAEG;AACH,qBAAa,gCAAiC,SAAQ,gCAAgC;CAAG;AAGzF,qBAAa,8BAA+B,SAAQ,gBAAgB,CAAC,CAAC,KAAK,EAAE,OAAO,KAAK,MAAM,CAAE,YAAW,uBAAuB;;IAS/H,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,SAAS,EAAE,QAAQ,EAAE,QAAQ,GAAG,MAAM,GAAG,IAAI;CAkBhF;AAED;;GAEG;AACH,qBAAa,8BAA+B,SAAQ,8BAA8B;CAAG;AAErF,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,eAAe,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,CAAA"}
|
package/dist/m3/builtins.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { currentReleaseVersion } from "../version.js";
|
|
1
2
|
import { LanguageFactory } from "./factory.js";
|
|
2
3
|
import { Concept, lioncoreBuiltinsKey } from "./types.js";
|
|
3
|
-
import { currentReleaseVersion } from "../version.js";
|
|
4
4
|
const lioncoreBuiltinsIdAndKeyGenerator = (...names) => [lioncoreBuiltinsKey, ...names.slice(1)].join("-");
|
|
5
5
|
const factory = new LanguageFactory("LionCore_builtins", currentReleaseVersion, lioncoreBuiltinsIdAndKeyGenerator, lioncoreBuiltinsIdAndKeyGenerator);
|
|
6
6
|
/*
|
|
@@ -10,24 +10,39 @@ const factory = new LanguageFactory("LionCore_builtins", currentReleaseVersion,
|
|
|
10
10
|
* Definition of a LionCore language that serves as a standard library of built-in primitive types.
|
|
11
11
|
*/
|
|
12
12
|
const lioncoreBuiltins = factory.language;
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const
|
|
13
|
+
const stringDataType = factory.primitiveType("String");
|
|
14
|
+
const booleanDataType = factory.primitiveType("Boolean");
|
|
15
|
+
const integerDataType = factory.primitiveType("Integer");
|
|
16
|
+
const jsonDataType = factory.primitiveType("JSON");
|
|
17
17
|
const node = factory.concept("Node", true);
|
|
18
|
-
const isBuiltinNodeConcept = (classifier) => classifier instanceof Concept
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
const isBuiltinNodeConcept = (classifier) => classifier instanceof Concept &&
|
|
19
|
+
classifier.language.key === lioncoreBuiltinsKey &&
|
|
20
|
+
classifier.language.version === currentReleaseVersion &&
|
|
21
|
+
classifier.key === builtinClassifiers.node.key &&
|
|
22
|
+
classifier.abstract;
|
|
23
23
|
const inamed = factory.interface("INamed");
|
|
24
|
-
const inamed_name = factory.property(inamed, "name")
|
|
25
|
-
.ofType(stringDatatype);
|
|
24
|
+
const inamed_name = factory.property(inamed, "name").ofType(stringDataType);
|
|
26
25
|
const builtinPrimitives = {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
stringDataType,
|
|
27
|
+
booleanDataType,
|
|
28
|
+
integerDataType,
|
|
29
|
+
jsonDataType,
|
|
30
|
+
/**
|
|
31
|
+
* Misspelled alias of {@link stringDataType}, kept for backward compatibility, and to be deprecated and removed later.
|
|
32
|
+
*/
|
|
33
|
+
stringDatatype: stringDataType,
|
|
34
|
+
/**
|
|
35
|
+
* Misspelled alias of {@link booleanDataType}, kept for backward compatibility, and to be deprecated and removed later.
|
|
36
|
+
*/
|
|
37
|
+
booleanDatatype: booleanDataType,
|
|
38
|
+
/**
|
|
39
|
+
* Misspelled alias of {@link integerDataType}, kept for backward compatibility, and to be deprecated and removed later.
|
|
40
|
+
*/
|
|
41
|
+
integerDatatype: integerDataType,
|
|
42
|
+
/**
|
|
43
|
+
* Misspelled alias of {@link jsonDataType}, kept for backward compatibility, and to be deprecated and removed later.
|
|
44
|
+
*/
|
|
45
|
+
jsonDatatype: jsonDataType
|
|
31
46
|
};
|
|
32
47
|
const builtinClassifiers = {
|
|
33
48
|
node,
|
|
@@ -37,83 +52,90 @@ const builtinFeatures = {
|
|
|
37
52
|
inamed_name
|
|
38
53
|
};
|
|
39
54
|
/**
|
|
40
|
-
* Determines whether two
|
|
55
|
+
* Determines whether two data types should be structurally equal based on equality of: meta type, key, and language's key.
|
|
41
56
|
*/
|
|
42
|
-
const shouldBeIdentical = (left, right) => left.key === right.key
|
|
43
|
-
|
|
44
|
-
&& left.metaType() === right.metaType();
|
|
45
|
-
class DatatypeRegister {
|
|
57
|
+
const shouldBeIdentical = (left, right) => left.key === right.key && left.language.key === right.language.key && left.metaType() === right.metaType();
|
|
58
|
+
class DataTypeRegister {
|
|
46
59
|
constructor() {
|
|
47
60
|
this.map = new Map();
|
|
48
61
|
}
|
|
49
|
-
register(
|
|
50
|
-
this.map.set(
|
|
62
|
+
register(dataType, t) {
|
|
63
|
+
this.map.set(dataType, t);
|
|
51
64
|
}
|
|
52
|
-
byType(
|
|
53
|
-
for (const
|
|
54
|
-
|
|
55
|
-
if (shouldBeIdentical(targetDatatype, datatype)) {
|
|
65
|
+
byType(targetDataType) {
|
|
66
|
+
for (const [dataType, t] of this.map.entries()) {
|
|
67
|
+
if (shouldBeIdentical(targetDataType, dataType)) {
|
|
56
68
|
return t;
|
|
57
69
|
}
|
|
58
70
|
}
|
|
59
71
|
return undefined;
|
|
60
72
|
}
|
|
61
73
|
}
|
|
62
|
-
export class
|
|
74
|
+
export class BuiltinPropertyValueDeserializer extends DataTypeRegister {
|
|
63
75
|
constructor() {
|
|
64
76
|
super();
|
|
65
|
-
this.register(
|
|
66
|
-
this.register(
|
|
67
|
-
this.register(
|
|
68
|
-
this.register(
|
|
77
|
+
this.register(stringDataType, value => value);
|
|
78
|
+
this.register(booleanDataType, value => JSON.parse(value));
|
|
79
|
+
this.register(integerDataType, value => Number(value));
|
|
80
|
+
this.register(jsonDataType, value => JSON.parse(value));
|
|
69
81
|
}
|
|
70
82
|
deserializeValue(value, property) {
|
|
71
83
|
if (value === undefined) {
|
|
72
84
|
if (property.optional) {
|
|
73
85
|
return undefined;
|
|
74
86
|
}
|
|
75
|
-
throw new Error(`can't deserialize undefined as the value of
|
|
87
|
+
throw new Error(`can't deserialize undefined as the value of required property "${property.name}" (on classifier "${property.classifier.name}" in language "${property.classifier.language.name}")`);
|
|
76
88
|
}
|
|
77
89
|
const { type } = property;
|
|
78
90
|
if (type == null) {
|
|
79
|
-
throw new Error(`
|
|
91
|
+
throw new Error(`can't deserialize property "${property.name}" (on classifier "${property.classifier.name}" in language "${property.classifier.language.name}") with unspecified type`);
|
|
80
92
|
}
|
|
81
93
|
const specificDeserializer = this.byType(type);
|
|
82
94
|
if (specificDeserializer != undefined) {
|
|
83
95
|
return specificDeserializer(value);
|
|
84
96
|
}
|
|
85
97
|
else {
|
|
86
|
-
throw new Error(`can't deserialize value of type "${type.name}": ${value}`);
|
|
98
|
+
throw new Error(`can't deserialize value of property "${property.name}" (on classifier "${property.classifier.name}" in language "${property.classifier.language.name}") of type "${type.name}": ${value}`);
|
|
87
99
|
}
|
|
88
100
|
}
|
|
89
101
|
}
|
|
90
|
-
|
|
102
|
+
/**
|
|
103
|
+
* Misspelled alias of {@link BuiltinPropertyValueDeserializer}, kept for backward compatibility, and to be deprecated and removed later.
|
|
104
|
+
*/
|
|
105
|
+
export class DefaultPrimitiveTypeDeserializer extends BuiltinPropertyValueDeserializer {
|
|
106
|
+
}
|
|
107
|
+
export class BuiltinPropertyValueSerializer extends DataTypeRegister {
|
|
91
108
|
constructor() {
|
|
92
109
|
super();
|
|
93
|
-
this.register(
|
|
94
|
-
this.register(
|
|
95
|
-
this.register(
|
|
96
|
-
this.register(
|
|
110
|
+
this.register(stringDataType, value => value);
|
|
111
|
+
this.register(booleanDataType, value => `${value}`);
|
|
112
|
+
this.register(integerDataType, value => `${value}`);
|
|
113
|
+
this.register(jsonDataType, value => JSON.stringify(value, null));
|
|
97
114
|
}
|
|
98
115
|
serializeValue(value, property) {
|
|
99
116
|
if (value === undefined) {
|
|
100
117
|
if (property.optional) {
|
|
101
|
-
return
|
|
118
|
+
return null;
|
|
102
119
|
}
|
|
103
|
-
throw new Error(`can't serialize undefined as the value of
|
|
120
|
+
throw new Error(`can't serialize undefined as the value of required property "${property.name}" (on classifier "${property.classifier.name}" in language "${property.classifier.language.name}")`);
|
|
104
121
|
}
|
|
105
122
|
const { type } = property;
|
|
106
123
|
if (type == null) {
|
|
107
|
-
throw new Error(`
|
|
124
|
+
throw new Error(`can't serialize property "${property.name}" (on classifier "${property.classifier.name}" in language "${property.classifier.language.name}") with unspecified type`);
|
|
108
125
|
}
|
|
109
126
|
const specificSerializer = this.byType(type);
|
|
110
127
|
if (specificSerializer != undefined) {
|
|
111
128
|
return specificSerializer(value);
|
|
112
129
|
}
|
|
113
130
|
else {
|
|
114
|
-
throw new Error(`can't serialize value of type "${type.name}": ${value}`);
|
|
131
|
+
throw new Error(`can't serialize value of property "${property.name}" (on classifier "${property.classifier.name}" in language "${property.classifier.language.name}") of type "${type.name}": ${value}`);
|
|
115
132
|
}
|
|
116
133
|
}
|
|
117
134
|
}
|
|
135
|
+
/**
|
|
136
|
+
* Misspelled alias of {@link BuiltinPropertyValueSerializer}, kept for backward compatibility, and to be deprecated and removed later.
|
|
137
|
+
*/
|
|
138
|
+
export class DefaultPrimitiveTypeSerializer extends BuiltinPropertyValueSerializer {
|
|
139
|
+
}
|
|
118
140
|
export { builtinPrimitives, builtinClassifiers, builtinFeatures, isBuiltinNodeConcept, lioncoreBuiltins, shouldBeIdentical };
|
|
119
141
|
//# sourceMappingURL=builtins.js.map
|
package/dist/m3/builtins.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builtins.js","sourceRoot":"","sources":["../../src/m3/builtins.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"builtins.js","sourceRoot":"","sources":["../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I,IAAI,IAAI,IAAI,EAAE,CAAC;YACf,MAAM,IAAI,KAAK,CAAC,6BAA6B,QAAQ,CAAC,IAAI,qBAAqB,QAAQ,CAAC,UAAU,CAAC,IAAI,kBAAkB,QAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,0BAA0B,CAAC,CAAA;QACzL,CAAC;QACD,MAAM,kBAAkB,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;QAC5C,IAAI,kBAAkB,IAAI,SAAS,EAAE,CAAC;YAClC,OAAO,kBAAkB,CAAC,KAAK,CAAC,CAAA;QACpC,CAAC;aAAM,CAAC;YACJ,MAAM,IAAI,KAAK,CAAC,sCAAsC,QAAQ,CAAC,IAAI,qBAAqB,QAAQ,CAAC,UAAU,CAAC,IAAI,kBAAkB,QAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,eAAe,IAAK,CAAC,IAAI,MAAM,KAAK,EAAE,CAAC,CAAA;QAC9M,CAAC;IACL,CAAC;CACJ;AAED;;GAEG;AACH,MAAM,OAAO,8BAA+B,SAAQ,8BAA8B;CAAG;AAErF,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,eAAe,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constraints.d.ts","sourceRoot":"","sources":["../../src/m3/constraints.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"constraints.d.ts","sourceRoot":"","sources":["../../src/m3/constraints.ts"],"names":[],"mappings":"AAGA,OAAO,EAAwB,QAAQ,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAGtE;;;GAGG;AACH,MAAM,MAAM,KAAK,GAAG;IAChB,QAAQ,EAAE,SAAS,CAAA;IACnB,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,EAAE,SAAS,EAAE,CAAA;CAC3B,CAAA;AAcD;;;GAGG;AACH,eAAO,MAAM,cAAc,aAAc,QAAQ,KAAG,KAAK,EAsEpD,CAAA"}
|
package/dist/m3/constraints.js
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { allContaineds, flatMap, inheritedCycleWith, keyOf, namedsOf, qualifiedNameOf } from "./functions.js";
|
|
1
|
+
import { duplicatesAmong } from "@lionweb/ts-utils";
|
|
3
2
|
import { idOf } from "../functions.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { allContaineds, flatMap, inheritanceCycleWith, keyOf, namedsOf, qualifiedNameOf } from "./functions.js";
|
|
4
|
+
import { Classifier, isINamed, Language } from "./types.js";
|
|
6
5
|
// TODO back this type with an M2
|
|
6
|
+
const base64urlRegex = /^[A-Za-z0-9_-]+$/;
|
|
7
|
+
/**
|
|
8
|
+
* @return whether the given string is a valid identifier according to the LionWeb specification – see [here](https://github.com/LionWeb-io/specification/blob/main/2023.1/metametamodel/metametamodel.adoc#identifiers) for the relevant part.
|
|
9
|
+
* This is essentially whether the given string is a valid, non-empty [Base64url](https://en.wikipedia.org/wiki/Base64#Variants_summary_table) string.
|
|
10
|
+
*/
|
|
11
|
+
const isValidIdentifier = (str) => base64urlRegex.test(str);
|
|
7
12
|
/**
|
|
8
13
|
* Computes the {@link Issue issues} (i.e., constraint violations) for the given language.
|
|
9
14
|
* (This computation is resilient against e.g. inheritance cycles.)
|
|
@@ -41,7 +46,7 @@ export const issuesLanguage = (language) => [
|
|
|
41
46
|
}
|
|
42
47
|
// The classifier should not inherit from itself (directly or indirectly)
|
|
43
48
|
if (t instanceof Classifier) {
|
|
44
|
-
const cycle =
|
|
49
|
+
const cycle = inheritanceCycleWith(t);
|
|
45
50
|
(cycle.length > 0) && issue(`A ${t.constructor.name} can't inherit (directly or indirectly) from itself, but ${qualifiedNameOf(t)} does so through the following cycle: ${cycle.map((t) => qualifiedNameOf(t)).join(" -> ")}`);
|
|
46
51
|
// TODO check whether it needs to be "a" or "an", or just say "An instance of ..."
|
|
47
52
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constraints.js","sourceRoot":"","sources":["../../src/m3/constraints.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"constraints.js","sourceRoot":"","sources":["../../src/m3/constraints.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AACtC,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,oBAAoB,EAAE,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAC/G,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAa,MAAM,YAAY,CAAA;AAYtE,kCAAkC;AAGlC,MAAM,cAAc,GAAG,kBAAkB,CAAA;AAEzC;;;GAGG;AACH,MAAM,iBAAiB,GAAG,CAAC,GAAW,EAAW,EAAE,CAC/C,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AAG5B;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,QAAkB,EAAW,EAAE,CAC1D;IACI,GAAG,OAAO,CACN,QAAQ,EACR,CAAC,CAAC,EAAE,EAAE;QAEF,MAAM,MAAM,GAAY,EAAE,CAAA;QAC1B,MAAM,KAAK,GAAG,CAAC,OAAe,EAAE,WAAyB,EAAQ,EAAE;YAC/D,MAAM,CAAC,IAAI,CAAC;gBACR,QAAQ,EAAE,CAAC;gBACX,OAAO;gBACP,WAAW,EAAE,WAAW,IAAI,EAAE;aACjC,CAAC,CAAA;QACN,CAAC,CAAA;QAED,gGAAgG;QAChG,MAAM,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC,IAAI,EAAE,CAAA;QACtB,CAAC,iBAAiB,CAAC,EAAE,CAAC,IAAI,KAAK,CAAC,kGAAkG,CAAC,CAAA;QAEnI,iGAAiG;QACjG,MAA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AAE,QAAQ,EAAE,CAAC,EAAE,OAAO,EAAE,0DAA0D,GAAG,0BAA0B,EAAE,WAAW,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,KAAK,MAAM,CAAC,EAAE,CAAC,CAC/K,CACJ;CACR,CAAA;AAGL,iEAAiE;AACjE,mDAAmD;AACnD,uGAAuG"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
+
import { LionWebJsonChunk } from "@lionweb/json";
|
|
1
2
|
import { SimplisticHandler } from "../handler.js";
|
|
2
|
-
import { SerializationChunk } from "../serialization.js";
|
|
3
3
|
import { Language } from "./types.js";
|
|
4
4
|
/**
|
|
5
5
|
* Deserializes languages that have been serialized into the LionWeb serialization JSON format
|
|
6
6
|
* as an instance of the LionCore metametamodel, using {@link _M3Concept these type definitions}.
|
|
7
7
|
*/
|
|
8
|
-
export declare const deserializeLanguages: (serializationChunk:
|
|
8
|
+
export declare const deserializeLanguages: (serializationChunk: LionWebJsonChunk, ...dependentLanguages: Language[]) => Language[];
|
|
9
9
|
/**
|
|
10
10
|
* Deserializes languages that have been serialized into the LionWeb serialization JSON format
|
|
11
11
|
* as an instance of the LionCore metametamodel, using {@link _M3Concept these type definitions}.
|
|
12
12
|
* This function takes a handler to be able to see what problems occurred.
|
|
13
13
|
*/
|
|
14
|
-
export declare const deserializeLanguagesWithHandler: (serializationChunk:
|
|
14
|
+
export declare const deserializeLanguagesWithHandler: (serializationChunk: LionWebJsonChunk, handler: SimplisticHandler, ...dependentLanguages: Language[]) => Language[];
|
|
15
15
|
//# sourceMappingURL=deserializer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deserializer.d.ts","sourceRoot":"","sources":["../../src/m3/deserializer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"deserializer.d.ts","sourceRoot":"","sources":["../../src/m3/deserializer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAGhD,OAAO,EAA4B,iBAAiB,EAAE,MAAM,eAAe,CAAA;AAI3E,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAGrC;;;GAGG;AACH,eAAO,MAAM,oBAAoB,uBAAwB,gBAAgB,yBAAyB,QAAQ,EAAE,KAAG,QAAQ,EACf,CAAA;AAExG;;;;GAIG;AACH,eAAO,MAAM,+BAA+B,uBACpB,gBAAgB,WAC3B,iBAAiB,yBACH,QAAQ,EAAE,KAClC,QAAQ,EAU0E,CAAA"}
|
package/dist/m3/deserializer.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { deserializeSerializationChunk } from "../deserializer.js";
|
|
2
|
-
import { nodesExtractorUsing } from "../
|
|
2
|
+
import { nodesExtractorUsing } from "../extraction.js";
|
|
3
3
|
import { defaultSimplisticHandler } from "../handler.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { BuiltinPropertyValueDeserializer, lioncoreBuiltins } from "./builtins.js";
|
|
5
|
+
import { lioncoreReader, lioncoreWriter } from "./facade.js";
|
|
6
6
|
import { lioncore } from "./lioncore.js";
|
|
7
7
|
import { Language } from "./types.js";
|
|
8
8
|
/**
|
|
@@ -15,7 +15,7 @@ export const deserializeLanguages = (serializationChunk, ...dependentLanguages)
|
|
|
15
15
|
* as an instance of the LionCore metametamodel, using {@link _M3Concept these type definitions}.
|
|
16
16
|
* This function takes a handler to be able to see what problems occurred.
|
|
17
17
|
*/
|
|
18
|
-
export const deserializeLanguagesWithHandler = (serializationChunk, handler, ...dependentLanguages) => deserializeSerializationChunk(serializationChunk,
|
|
18
|
+
export const deserializeLanguagesWithHandler = (serializationChunk, handler, ...dependentLanguages) => deserializeSerializationChunk(serializationChunk, lioncoreWriter, [lioncore, ...dependentLanguages], [lioncoreBuiltins, ...dependentLanguages].flatMap(nodesExtractorUsing(lioncoreReader)), new BuiltinPropertyValueDeserializer(), handler)
|
|
19
19
|
.filter((rootNode) => rootNode instanceof Language)
|
|
20
20
|
.map((language) => language.dependingOn(...dependentLanguages));
|
|
21
21
|
//# sourceMappingURL=deserializer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deserializer.js","sourceRoot":"","sources":["../../src/m3/deserializer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"deserializer.js","sourceRoot":"","sources":["../../src/m3/deserializer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAA;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AACtD,OAAO,EAAE,wBAAwB,EAAqB,MAAM,eAAe,CAAA;AAC3E,OAAO,EAAE,gCAAgC,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAClF,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAGrC;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,kBAAoC,EAAE,GAAG,kBAA8B,EAAc,EAAE,CACxH,+BAA+B,CAAC,kBAAkB,EAAE,wBAAwB,EAAE,GAAG,kBAAkB,CAAC,CAAA;AAExG;;;;GAIG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAC3C,kBAAoC,EACpC,OAA0B,EAC1B,GAAG,kBAA8B,EACvB,EAAE,CACZ,6BAA6B,CACzB,kBAAkB,EAClB,cAAc,EACd,CAAC,QAAQ,EAAE,GAAG,kBAAkB,CAAC,EACjC,CAAC,gBAAgB,EAAE,GAAG,kBAAkB,CAAC,CAAC,OAAO,CAAC,mBAAmB,CAAC,cAAc,CAAC,CAAC,EACtF,IAAI,gCAAgC,EAAE,EACtC,OAAO,CACV;KACI,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,YAAY,QAAQ,CAAC;KAClD,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAE,QAAqB,CAAC,WAAW,CAAC,GAAG,kBAAkB,CAAC,CAAC,CAAA"}
|
package/dist/m3/facade.d.ts
CHANGED
|
@@ -1,8 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Reader } from "../reading.js";
|
|
2
2
|
import { M3Concept } from "./types.js";
|
|
3
|
-
|
|
3
|
+
import { Writer } from "../writing.js";
|
|
4
|
+
export declare const lioncoreReader: Reader<M3Concept>;
|
|
4
5
|
/**
|
|
5
|
-
*
|
|
6
|
+
* Alias for {@link lioncoreReader}, kept for backward compatibility, and to be deprecated and removed later.
|
|
6
7
|
*/
|
|
7
|
-
export declare const
|
|
8
|
+
export declare const lioncoreExtractionFacade: Reader<M3Concept>;
|
|
9
|
+
/**
|
|
10
|
+
* @return An implementation of {@link Writer} for instances of the LionCore M3 (so M2s).
|
|
11
|
+
*/
|
|
12
|
+
export declare const lioncoreWriter: Writer<M3Concept>;
|
|
13
|
+
/**
|
|
14
|
+
* Alias for {@link lioncoreWriter}, kept for backward compatibility, and to be deprecated and removed later.
|
|
15
|
+
*/
|
|
16
|
+
export declare const lioncoreInstantationFacade: Writer<M3Concept, M3Concept>;
|
|
8
17
|
//# sourceMappingURL=facade.d.ts.map
|
package/dist/m3/facade.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"facade.d.ts","sourceRoot":"","sources":["../../src/m3/facade.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"facade.d.ts","sourceRoot":"","sources":["../../src/m3/facade.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AACtC,OAAO,EASH,SAAS,EAIZ,MAAM,YAAY,CAAA;AACnB,OAAO,EAA2B,MAAM,EAAE,MAAM,eAAe,CAAA;AAK/D,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,SAAS,CAM5C,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,wBAAwB,mBAAiB,CAAA;AAEtD;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,SAAS,CAoF5C,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,0BAA0B,8BAAiB,CAAA"}
|
package/dist/m3/facade.js
CHANGED
|
@@ -1,21 +1,25 @@
|
|
|
1
|
-
import { updateSettingsNameBased } from "../facade.js";
|
|
2
|
-
import { Annotation, Concept, Containment, Enumeration, EnumerationLiteral, Interface, Language, PrimitiveType, Property, Reference } from "./types.js";
|
|
3
1
|
import { builtinFeatures } from "./builtins.js";
|
|
4
|
-
import { lioncore, metaConcepts, metaFeatures } from "./lioncore.js";
|
|
5
2
|
import { metaTypedBasedClassifierDeducerFor, qualifiedNameOf } from "./functions.js";
|
|
3
|
+
import { lioncore, metaConcepts, metaFeatures } from "./lioncore.js";
|
|
4
|
+
import { Annotation, Concept, Containment, Enumeration, EnumerationLiteral, Interface, Language, PrimitiveType, Property, Reference } from "./types.js";
|
|
5
|
+
import { updateSettingsNameBased } from "../writing.js";
|
|
6
6
|
const { inamed_name } = builtinFeatures;
|
|
7
7
|
const { ikeyed_key } = metaFeatures;
|
|
8
|
-
export const
|
|
8
|
+
export const lioncoreReader = {
|
|
9
9
|
classifierOf: metaTypedBasedClassifierDeducerFor(lioncore),
|
|
10
10
|
getFeatureValue: (node, feature) =>
|
|
11
11
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
12
12
|
node[feature.name], // (mirrors name-based update of settings)
|
|
13
13
|
enumerationLiteralFrom: (value, _) => value
|
|
14
|
-
}
|
|
14
|
+
};
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
16
|
+
* Alias for {@link lioncoreReader}, kept for backward compatibility, and to be deprecated and removed later.
|
|
17
17
|
*/
|
|
18
|
-
export const
|
|
18
|
+
export const lioncoreExtractionFacade = lioncoreReader;
|
|
19
|
+
/**
|
|
20
|
+
* @return An implementation of {@link Writer} for instances of the LionCore M3 (so M2s).
|
|
21
|
+
*/
|
|
22
|
+
export const lioncoreWriter = {
|
|
19
23
|
nodeFor: (parent, classifier, id, propertySettings) => {
|
|
20
24
|
switch (classifier.key) {
|
|
21
25
|
case metaConcepts.annotation.key:
|
|
@@ -45,6 +49,10 @@ export const lioncoreInstantiationFacade = ({
|
|
|
45
49
|
setFeatureValue: (node, feature, value) => {
|
|
46
50
|
updateSettingsNameBased(node, feature, value);
|
|
47
51
|
},
|
|
48
|
-
encodingOf:
|
|
49
|
-
}
|
|
52
|
+
encodingOf: literal => literal
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Alias for {@link lioncoreWriter}, kept for backward compatibility, and to be deprecated and removed later.
|
|
56
|
+
*/
|
|
57
|
+
export const lioncoreInstantationFacade = lioncoreWriter;
|
|
50
58
|
//# sourceMappingURL=facade.js.map
|
package/dist/m3/facade.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"facade.js","sourceRoot":"","sources":["../../src/m3/facade.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"facade.js","sourceRoot":"","sources":["../../src/m3/facade.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAC/C,OAAO,EAAE,kCAAkC,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AACpF,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAEpE,OAAO,EACH,UAAU,EAEV,OAAO,EACP,WAAW,EACX,WAAW,EACX,kBAAkB,EAClB,SAAS,EACT,QAAQ,EAER,aAAa,EACb,QAAQ,EACR,SAAS,EACZ,MAAM,YAAY,CAAA;AACnB,OAAO,EAAE,uBAAuB,EAAU,MAAM,eAAe,CAAA;AAE/D,MAAM,EAAE,WAAW,EAAE,GAAG,eAAe,CAAA;AACvC,MAAM,EAAE,UAAU,EAAE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C,GAAG;gBAC3B,OAAO,IAAI,SAAS,CAChB,MAAoB,EACpB,gBAAgB,CAAC,WAAW,CAAC,GAAG,CAAW,EAC3C,gBAAgB,CAAC,UAAU,CAAC,GAAG,CAAW,EAC1C,EAAE,CACL,CAAA;YACL;gBACI,MAAM,IAAI,KAAK,CACX,gCAAgC,eAAe,CAAC,UAAU,CAAC,aAAa,UAAU,CAAC,GAAG,4BAA4B,CACrH,CAAA;QACT,CAAC;IACL,CAAC;IACD,eAAe,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE;QACtC,uBAAuB,CAAC,IAA0C,EAAE,OAAO,EAAE,KAAK,CAAC,CAAA;IACvF,CAAC;IACD,UAAU,EAAE,OAAO,CAAC,EAAE,CAAC,OAAO;CACjC,CAAA;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,cAAc,CAAA"}
|
package/dist/m3/factory.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { StringsMapper } from "@lionweb/ts-utils";
|
|
2
2
|
import { SingleRef } from "../references.js";
|
|
3
|
-
import {
|
|
3
|
+
import { Annotation, Classifier, Concept, Containment, Enumeration, EnumerationLiteral, Interface, Language, PrimitiveType, Property, Reference } from "./types.js";
|
|
4
4
|
/**
|
|
5
5
|
* A factory that produces a {@link Language} instance,
|
|
6
6
|
* as well as {@link LanguageEntity entities} contained by that instance
|