@lionweb/core 0.5.0-beta.2 → 0.5.0-beta.5
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 +6 -1
- package/dist/deserializer.d.ts +3 -3
- package/dist/deserializer.d.ts.map +1 -1
- package/dist/deserializer.js +15 -15
- package/dist/deserializer.js.map +1 -1
- package/dist/dynamic-facade.d.ts +28 -0
- package/dist/dynamic-facade.d.ts.map +1 -0
- package/dist/{dynamic-api.js → dynamic-facade.js} +8 -9
- package/dist/dynamic-facade.js.map +1 -0
- package/dist/{api.d.ts → facade.d.ts} +9 -9
- package/dist/facade.d.ts.map +1 -0
- package/dist/{api.js → facade.js} +4 -4
- package/dist/facade.js.map +1 -0
- package/dist/id-generation.d.ts +1 -48
- package/dist/id-generation.d.ts.map +1 -1
- package/dist/id-generation.js +1 -75
- package/dist/id-generation.js.map +1 -1
- package/dist/index.d.ts +5 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -4
- package/dist/index.js.map +1 -1
- package/dist/m3/builtins.d.ts +1 -1
- package/dist/m3/builtins.js +3 -3
- package/dist/m3/builtins.js.map +1 -1
- package/dist/m3/constraints.d.ts.map +1 -1
- package/dist/m3/constraints.js +4 -2
- package/dist/m3/constraints.js.map +1 -1
- package/dist/m3/deserializer.js +3 -3
- package/dist/m3/deserializer.js.map +1 -1
- package/dist/m3/facade.d.ts +16 -0
- package/dist/m3/facade.d.ts.map +1 -0
- package/dist/m3/{api.js → facade.js} +14 -14
- package/dist/m3/facade.js.map +1 -0
- package/dist/m3/factory.d.ts +2 -2
- package/dist/m3/factory.d.ts.map +1 -1
- package/dist/m3/factory.js +3 -3
- package/dist/m3/factory.js.map +1 -1
- package/dist/m3/functions.d.ts +8 -5
- package/dist/m3/functions.d.ts.map +1 -1
- package/dist/m3/functions.js +9 -6
- package/dist/m3/functions.js.map +1 -1
- package/dist/m3/index.d.ts +1 -2
- package/dist/m3/index.d.ts.map +1 -1
- package/dist/m3/index.js +1 -2
- package/dist/m3/index.js.map +1 -1
- package/dist/m3/lioncore.d.ts +2 -2
- package/dist/m3/lioncore.d.ts.map +1 -1
- package/dist/m3/lioncore.js +13 -13
- package/dist/m3/lioncore.js.map +1 -1
- package/dist/m3/serializer.d.ts.map +1 -1
- package/dist/m3/serializer.js +2 -2
- package/dist/m3/serializer.js.map +1 -1
- package/dist/m3/types.d.ts +9 -9
- package/dist/m3/types.d.ts.map +1 -1
- package/dist/m3/types.js +11 -11
- package/dist/m3/types.js.map +1 -1
- package/dist/serialization.d.ts +2 -1
- package/dist/serialization.d.ts.map +1 -1
- package/dist/serialization.js +4 -2
- package/dist/serialization.js.map +1 -1
- package/dist/serializer.d.ts +2 -2
- package/dist/serializer.d.ts.map +1 -1
- package/dist/serializer.js +7 -7
- package/dist/serializer.js.map +1 -1
- package/dist/version.d.ts +5 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +5 -0
- package/dist/version.js.map +1 -0
- package/package.json +3 -3
- package/dist/api.d.ts.map +0 -1
- package/dist/api.js.map +0 -1
- package/dist/dynamic-api.d.ts +0 -19
- package/dist/dynamic-api.d.ts.map +0 -1
- package/dist/dynamic-api.js.map +0 -1
- package/dist/m3/api.d.ts +0 -16
- package/dist/m3/api.d.ts.map +0 -1
- package/dist/m3/api.js.map +0 -1
- package/dist/m3/textual-syntax.d.ts +0 -4
- package/dist/m3/textual-syntax.d.ts.map +0 -1
- package/dist/m3/textual-syntax.js +0 -57
- package/dist/m3/textual-syntax.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,7 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
## 0.5.0
|
|
4
4
|
|
|
5
|
-
*
|
|
5
|
+
* Add a type `DynamicINamed`, primarily for generation purposes.
|
|
6
|
+
* Move `asText` and ID checking to `@lionweb/utilities`.
|
|
7
|
+
* Expose a helper function `nameSorted`.
|
|
8
|
+
* Rename `ConceptInterface` → `Interface`.
|
|
9
|
+
* Change names: `ReadModelAPI` → `ExtractionFacade`, `WriteModelAPI` → `InstantiationFacade`.
|
|
10
|
+
* Change name of `concept` fields to `classifier`, and their types (where applicable) to `Classifier`.
|
|
6
11
|
* Fix `license` field in `package.json` to `"Apache-2.0"`.
|
|
7
12
|
* Replace all occurrences of "LIon" (with uppercase 'I') with "Lion" (with lowercase 'i').
|
|
8
13
|
* Split the `ModelAPI` interface into a read- and write-part: `ReadModelAPI` vs. `WriteModelAPI`.
|
package/dist/deserializer.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { Node } from "./types.js";
|
|
2
2
|
import { SerializationChunk } from "./serialization.js";
|
|
3
|
-
import {
|
|
3
|
+
import { InstantiationFacade } from "./facade.js";
|
|
4
4
|
import { Language } from "./m3/types.js";
|
|
5
5
|
/**
|
|
6
6
|
* @return a deserialization of a {@link SerializationChunk}
|
|
7
7
|
*
|
|
8
8
|
* @param serializationChunk - a {@link SerializedModel model} from its LionWeb serialization JSON format
|
|
9
|
-
* @param
|
|
9
|
+
* @param instantiationFacade - a {@link InstantiationFacade} that is used to instantiate nodes and set values on them
|
|
10
10
|
* @param languages - a {@link Language language} that the serialized model is expected to conform to
|
|
11
11
|
* @param dependentNodes - a collection of nodes from dependent models against which all references in the serialized model are supposed to resolve against
|
|
12
12
|
*/
|
|
13
|
-
export declare const deserializeChunk: <NT extends Node>(serializationChunk: SerializationChunk,
|
|
13
|
+
export declare const deserializeChunk: <NT extends Node>(serializationChunk: SerializationChunk, instantiationFacade: InstantiationFacade<NT>, languages: Language[], dependentNodes: Node[]) => NT[];
|
|
14
14
|
//# sourceMappingURL=deserializer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deserializer.d.ts","sourceRoot":"","sources":["../src/deserializer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAK,IAAI,EAAC,MAAM,YAAY,CAAA;AACnC,OAAO,EAAoC,kBAAkB,EAAiB,MAAM,oBAAoB,CAAA;AACxG,OAAO,EAAC,
|
|
1
|
+
{"version":3,"file":"deserializer.d.ts","sourceRoot":"","sources":["../src/deserializer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAK,IAAI,EAAC,MAAM,YAAY,CAAA;AACnC,OAAO,EAAoC,kBAAkB,EAAiB,MAAM,oBAAoB,CAAA;AACxG,OAAO,EAAC,mBAAmB,EAAC,MAAM,aAAa,CAAA;AAC/C,OAAO,EAKH,QAAQ,EAIX,MAAM,eAAe,CAAA;AAkBtB;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,wCACL,kBAAkB,2DAE3B,QAAQ,EAAE,kBAEL,IAAI,EAAE,SA4IzB,CAAA"}
|
package/dist/deserializer.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { currentSerializationFormatVersion } from "./serialization.js";
|
|
2
|
-
import {
|
|
2
|
+
import { Classifier, Containment, Enumeration, PrimitiveType, Property, Reference } from "./m3/types.js";
|
|
3
3
|
import { allFeaturesOf } from "./m3/functions.js";
|
|
4
4
|
import { deserializeBuiltin } from "./m3/builtins.js";
|
|
5
5
|
import { groupBy } from "./utils/grouping.js";
|
|
@@ -17,14 +17,14 @@ const byIdMap = (ts) => {
|
|
|
17
17
|
* @return a deserialization of a {@link SerializationChunk}
|
|
18
18
|
*
|
|
19
19
|
* @param serializationChunk - a {@link SerializedModel model} from its LionWeb serialization JSON format
|
|
20
|
-
* @param
|
|
20
|
+
* @param instantiationFacade - a {@link InstantiationFacade} that is used to instantiate nodes and set values on them
|
|
21
21
|
* @param languages - a {@link Language language} that the serialized model is expected to conform to
|
|
22
22
|
* @param dependentNodes - a collection of nodes from dependent models against which all references in the serialized model are supposed to resolve against
|
|
23
23
|
*/
|
|
24
|
-
export const deserializeChunk = (serializationChunk,
|
|
25
|
-
// TODO
|
|
24
|
+
export const deserializeChunk = (serializationChunk, instantiationFacade, languages,
|
|
25
|
+
// TODO facades <--> languages, so it's weird that it looks split up like this
|
|
26
26
|
dependentNodes
|
|
27
|
-
// TODO (#13) see if you can turn this into [nodes: Node[],
|
|
27
|
+
// TODO (#13) see if you can turn this into [nodes: Node[], instantiationFacade: InstantiationFacade<Node>][] after all
|
|
28
28
|
) => {
|
|
29
29
|
if (serializationChunk.serializationFormatVersion !== currentSerializationFormatVersion) {
|
|
30
30
|
throw new Error(`can't deserialize from serialization format other than version "${currentSerializationFormatVersion}"`);
|
|
@@ -55,12 +55,12 @@ dependentNodes
|
|
|
55
55
|
* Instantiates a {@link Node} from its {@link SerializedNode serialization}.
|
|
56
56
|
*/
|
|
57
57
|
const instantiate = ({ classifier: classifierMetaPointer, id, properties, children, references }, parent) => {
|
|
58
|
-
const
|
|
59
|
-
.find((element) => element instanceof
|
|
60
|
-
if (
|
|
58
|
+
const classifier = allEntities
|
|
59
|
+
.find((element) => element instanceof Classifier && element.key === classifierMetaPointer.key);
|
|
60
|
+
if (classifier === undefined) {
|
|
61
61
|
throw new Error(`can't deserialize a node having a classifier with key "${classifierMetaPointer.key}"`);
|
|
62
62
|
}
|
|
63
|
-
const allFeatures = allFeaturesOf(
|
|
63
|
+
const allFeatures = allFeaturesOf(classifier);
|
|
64
64
|
const propertySettings = {};
|
|
65
65
|
const serializedPropertiesPerKey = properties === undefined ? {} : groupBy(properties, (sp) => sp.property.key);
|
|
66
66
|
if (properties !== undefined) {
|
|
@@ -77,7 +77,7 @@ dependentNodes
|
|
|
77
77
|
if (property.type instanceof Enumeration) {
|
|
78
78
|
const literal = property.type.literals.find((literal) => literal.key = value);
|
|
79
79
|
if (literal !== undefined) {
|
|
80
|
-
propertySettings[property.key] =
|
|
80
|
+
propertySettings[property.key] = instantiationFacade.encodingOf(literal);
|
|
81
81
|
}
|
|
82
82
|
return;
|
|
83
83
|
}
|
|
@@ -85,25 +85,25 @@ dependentNodes
|
|
|
85
85
|
}
|
|
86
86
|
});
|
|
87
87
|
}
|
|
88
|
-
const node =
|
|
88
|
+
const node = instantiationFacade.nodeFor(parent, classifier, id, propertySettings);
|
|
89
89
|
const serializedChildrenPerKey = children === undefined ? {} : groupBy(children, (sp) => sp.containment.key);
|
|
90
90
|
const serializedReferencesPerKey = references === undefined ? {} : groupBy(references, (sp) => sp.reference.key);
|
|
91
91
|
allFeatures
|
|
92
92
|
.forEach((feature) => {
|
|
93
93
|
if (feature instanceof Property && properties !== undefined && feature.key in serializedPropertiesPerKey) {
|
|
94
|
-
|
|
94
|
+
instantiationFacade.setFeatureValue(node, feature, propertySettings[feature.key]);
|
|
95
95
|
}
|
|
96
96
|
else if (feature instanceof Containment && children !== undefined && feature.key in serializedChildrenPerKey) {
|
|
97
97
|
const childIds = serializedChildrenPerKey[feature.key].flatMap((serChildren) => serChildren.children);
|
|
98
98
|
if (feature.multiple) {
|
|
99
99
|
childIds
|
|
100
100
|
.forEach((childId) => {
|
|
101
|
-
|
|
101
|
+
instantiationFacade.setFeatureValue(node, feature, instantiateMemoised(serializedNodeById[childId], node));
|
|
102
102
|
});
|
|
103
103
|
}
|
|
104
104
|
else {
|
|
105
105
|
if (childIds.length > 0) {
|
|
106
|
-
|
|
106
|
+
instantiationFacade.setFeatureValue(node, feature, instantiateMemoised(serializedNodeById[childIds[0]], node));
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
}
|
|
@@ -127,7 +127,7 @@ dependentNodes
|
|
|
127
127
|
}
|
|
128
128
|
return target;
|
|
129
129
|
};
|
|
130
|
-
|
|
130
|
+
instantiationFacade.setFeatureValue(node, reference, lookUpById());
|
|
131
131
|
});
|
|
132
132
|
return rootNodes;
|
|
133
133
|
};
|
package/dist/deserializer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deserializer.js","sourceRoot":"","sources":["../src/deserializer.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,iCAAiC,EAAqC,MAAM,oBAAoB,CAAA;AAExG,OAAO,
|
|
1
|
+
{"version":3,"file":"deserializer.js","sourceRoot":"","sources":["../src/deserializer.ts"],"names":[],"mappings":"AACA,OAAO,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,CAAC,qCAAqC,KAAK,WAAW,SAAS,CAAC,IAAI,oCAAoC,IAAI,CAAC,EAAE,IAAI,eAAe,EAAE,CAAC,CAAA;aACvJ;YACD,OAAO,MAAM,CAAA;QACjB,CAAC,CAAA;QACD,mBAAmB,CAAC,eAAe,CAAC,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC,CAAA;IACtE,CAAC,CAAC,CAAA;IAEF,OAAO,SAAS,CAAA;AACpB,CAAC,CAAA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Node } from "./types.js";
|
|
2
|
+
import { ExtractionFacade, InstantiationFacade } from "./facade.js";
|
|
3
|
+
import { Classifier } from "./m3/types.js";
|
|
4
|
+
/**
|
|
5
|
+
* Type definition for "dynamic nodes" that are not backed by specific types (e.g. classes).
|
|
6
|
+
*/
|
|
7
|
+
export type DynamicNode = Node & {
|
|
8
|
+
classifier: Classifier;
|
|
9
|
+
settings: Record<string, unknown>;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* A parallel version of {@link INamed} for dynamic nodes.
|
|
13
|
+
* (This type def. is predominantly meant for use in generated code.)
|
|
14
|
+
*/
|
|
15
|
+
export type DynamicINamed = DynamicNode & {
|
|
16
|
+
settings: {
|
|
17
|
+
name: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* An implementation of {@link ExtractionFacade} for {@link DynamicNode dynamic nodes}.
|
|
22
|
+
*/
|
|
23
|
+
export declare const dynamicExtractionFacade: ExtractionFacade<DynamicNode>;
|
|
24
|
+
/**
|
|
25
|
+
* An implementation of {@link InstantiationFacade} for {@link DynamicNode dynamic nodes}.
|
|
26
|
+
*/
|
|
27
|
+
export declare const dynamicInstantiationFacade: InstantiationFacade<DynamicNode>;
|
|
28
|
+
//# sourceMappingURL=dynamic-facade.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dynamic-facade.d.ts","sourceRoot":"","sources":["../src/dynamic-facade.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,YAAY,CAAA;AAC/B,OAAO,EAAC,gBAAgB,EAAE,mBAAmB,EAAyB,MAAM,aAAa,CAAA;AACzF,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAA;AAGxC;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,IAAI,GAAG;IAC7B,UAAU,EAAE,UAAU,CAAA;IACtB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACpC,CAAA;AAID;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,WAAW,GAAG;IACtC,QAAQ,EAAE;QACN,IAAI,EAAE,MAAM,CAAA;KACf,CAAA;CACJ,CAAA;AAGD;;GAEG;AACH,eAAO,MAAM,uBAAuB,EAAE,gBAAgB,CAAC,WAAW,CAQhE,CAAA;AAGF;;GAEG;AAEH,eAAO,MAAM,0BAA0B,EAAE,mBAAmB,CAAC,WAAW,CAUtE,CAAA"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { updateSettingsKeyBased } from "./
|
|
2
|
-
// TODO could also have properties, containments, references - mimicking the serialization
|
|
1
|
+
import { updateSettingsKeyBased } from "./facade.js";
|
|
3
2
|
/**
|
|
4
|
-
* An implementation of {@link
|
|
3
|
+
* An implementation of {@link ExtractionFacade} for {@link DynamicNode dynamic nodes}.
|
|
5
4
|
*/
|
|
6
|
-
export const
|
|
5
|
+
export const dynamicExtractionFacade = ({
|
|
7
6
|
classifierOf: (node) => node.classifier,
|
|
8
7
|
getFeatureValue: (node, feature) =>
|
|
9
8
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -12,12 +11,12 @@ export const dynamicReadModelAPI = ({
|
|
|
12
11
|
?? null // (undefined -> null)
|
|
13
12
|
});
|
|
14
13
|
/**
|
|
15
|
-
* An implementation of {@link
|
|
14
|
+
* An implementation of {@link InstantiationFacade} for {@link DynamicNode dynamic nodes}.
|
|
16
15
|
*/
|
|
17
|
-
export const
|
|
18
|
-
nodeFor: (_parent,
|
|
16
|
+
export const dynamicInstantiationFacade = ({
|
|
17
|
+
nodeFor: (_parent, classifier, id, _propertySettings) => ({
|
|
19
18
|
id,
|
|
20
|
-
classifier
|
|
19
|
+
classifier,
|
|
21
20
|
settings: {}
|
|
22
21
|
}),
|
|
23
22
|
setFeatureValue: (node, feature, value) => {
|
|
@@ -25,4 +24,4 @@ export const dynamicWriteModelAPI = ({
|
|
|
25
24
|
},
|
|
26
25
|
encodingOf: ({ key }) => key
|
|
27
26
|
});
|
|
28
|
-
//# sourceMappingURL=dynamic-
|
|
27
|
+
//# sourceMappingURL=dynamic-facade.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dynamic-facade.js","sourceRoot":"","sources":["../src/dynamic-facade.ts"],"names":[],"mappings":"AACA,OAAO,EAAwC,sBAAsB,EAAC,MAAM,aAAa,CAAA;AAyBzF;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAkC,CAAC;IACnE,YAAY,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,UAAU;IACvC,eAAe,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE;IACvC,8DAA8D;IACrD,IAAI,CAAC,QAAgB,CAAC,OAAO,CAAC,GAAG,CAAC;IACvC,sBAAsB,EAAE,CAAC,KAAK,EAAE,WAAW,EAAE,EAAE,CAC3C,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAC,GAAG,EAAC,EAAE,EAAE,CAAC,GAAG,KAAK,KAAK,CAAC;WAChD,IAAI,CAAI,sBAAsB;CACxC,CAAC,CAAA;AAGF;;GAEG;AAEH,MAAM,CAAC,MAAM,0BAA0B,GAAqC,CAAC;IACzE,OAAO,EAAE,CAAC,OAAO,EAAE,UAAU,EAAE,EAAE,EAAE,iBAAiB,EAAE,EAAE,CAAC,CAAC;QACtD,EAAE;QACF,UAAU;QACV,QAAQ,EAAE,EAAE;KACC,CAAA;IACjB,eAAe,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE;QACtC,sBAAsB,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,EAAE,KAAK,CAAC,CAAA;IACzD,CAAC;IACD,UAAU,EAAE,CAAC,EAAC,GAAG,EAAC,EAAE,EAAE,CAAC,GAAG;CAC7B,CAAC,CAAA"}
|
|
@@ -5,13 +5,13 @@ import { Classifier, Enumeration, EnumerationLiteral, Feature } from "./m3/types
|
|
|
5
5
|
*/
|
|
6
6
|
type ClassifierDeducer<NT extends Node> = (node: NT) => Classifier;
|
|
7
7
|
/**
|
|
8
|
-
* Two interfaces that defines
|
|
8
|
+
* Two interfaces that defines façades for in-memory models.
|
|
9
9
|
* Instances/implementations of this interface parametrize generic (de-)serialization.
|
|
10
|
-
* Implementations of
|
|
10
|
+
* Implementations of these interfaces {w|c}ould be:
|
|
11
11
|
* - specific to Lioncore (so to match m3/types.ts)
|
|
12
|
-
* - generic
|
|
12
|
+
* - generic to deserialize into @link DynamicNode}
|
|
13
13
|
*/
|
|
14
|
-
interface
|
|
14
|
+
interface ExtractionFacade<NT extends Node> {
|
|
15
15
|
/**
|
|
16
16
|
* @return The {@link Concept concept} of the given node
|
|
17
17
|
*/
|
|
@@ -26,7 +26,7 @@ interface ReadModelAPI<NT extends Node> {
|
|
|
26
26
|
*/
|
|
27
27
|
enumerationLiteralFrom: (encoding: unknown, enumeration: Enumeration) => EnumerationLiteral | null;
|
|
28
28
|
}
|
|
29
|
-
interface
|
|
29
|
+
interface InstantiationFacade<NT extends Node> {
|
|
30
30
|
/**
|
|
31
31
|
* @return An instance of the given concept, also given its parent (or {@link undefined} for root nodes),
|
|
32
32
|
* its ID and the values of the node's properties ("settings").
|
|
@@ -52,11 +52,11 @@ type NodesExtractor<NT extends Node> = (nodes: NT) => NT[];
|
|
|
52
52
|
/**
|
|
53
53
|
* @return A function that extracts the children from a given node.
|
|
54
54
|
*/
|
|
55
|
-
declare const childrenExtractorUsing: <NT extends Node>(
|
|
55
|
+
declare const childrenExtractorUsing: <NT extends Node>(extractionFacade: ExtractionFacade<NT>) => NodesExtractor<NT>;
|
|
56
56
|
/**
|
|
57
57
|
* @return a function that extracts *all* nodes from a given start node - usually a root node.
|
|
58
58
|
*/
|
|
59
|
-
declare const nodesExtractorUsing: <NT extends Node>(
|
|
59
|
+
declare const nodesExtractorUsing: <NT extends Node>(extractionFacade: ExtractionFacade<NT>) => NodesExtractor<NT>;
|
|
60
60
|
/**
|
|
61
61
|
* Updates the value of the given {@link Feature feature} on the given "settings" object
|
|
62
62
|
* (either a {@link Node node} or a sub object of it), using the feature's *name*.
|
|
@@ -67,6 +67,6 @@ declare const updateSettingsNameBased: (settings: Record<string, unknown>, featu
|
|
|
67
67
|
* (either a {@link Node node} or a sub object of it), using the feature's *key*.
|
|
68
68
|
*/
|
|
69
69
|
declare const updateSettingsKeyBased: (settings: Record<string, unknown>, feature: Feature, value: unknown) => void;
|
|
70
|
-
export type { ClassifierDeducer, NodesExtractor,
|
|
70
|
+
export type { ClassifierDeducer, NodesExtractor, ExtractionFacade, InstantiationFacade };
|
|
71
71
|
export { childrenExtractorUsing, nodesExtractorUsing, updateSettingsKeyBased, updateSettingsNameBased };
|
|
72
|
-
//# sourceMappingURL=
|
|
72
|
+
//# sourceMappingURL=facade.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"facade.d.ts","sourceRoot":"","sources":["../src/facade.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,YAAY,CAAA;AAC/B,OAAO,EAAC,UAAU,EAAE,WAAW,EAAE,kBAAkB,EAAE,OAAO,EAAO,MAAM,eAAe,CAAA;AAKxF;;GAEG;AACH,KAAK,iBAAiB,CAAC,EAAE,SAAS,IAAI,IAAI,CAAC,IAAI,EAAE,EAAE,KAAK,UAAU,CAAA;AAGlE;;;;;;GAMG;A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,CAAA;AAED,YAAY,EACR,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EAChB,mBAAmB,EACtB,CAAA;AAED,OAAO,EACH,sBAAsB,EACtB,mBAAmB,EACnB,sBAAsB,EACtB,uBAAuB,EAC1B,CAAA"}
|
|
@@ -4,13 +4,13 @@ import { allFeaturesOf, isContainment } from "./m3/functions.js";
|
|
|
4
4
|
/**
|
|
5
5
|
* @return A function that extracts the children from a given node.
|
|
6
6
|
*/
|
|
7
|
-
const childrenExtractorUsing = (
|
|
7
|
+
const childrenExtractorUsing = (extractionFacade) => (node) => allFeaturesOf(extractionFacade.classifierOf(node))
|
|
8
8
|
.filter(isContainment)
|
|
9
|
-
.flatMap((containment) =>
|
|
9
|
+
.flatMap((containment) => extractionFacade.getFeatureValue(node, containment));
|
|
10
10
|
/**
|
|
11
11
|
* @return a function that extracts *all* nodes from a given start node - usually a root node.
|
|
12
12
|
*/
|
|
13
|
-
const nodesExtractorUsing = (
|
|
13
|
+
const nodesExtractorUsing = (extractionFacade) => flatMapNonCyclingFollowing(trivialFlatMapper, childrenExtractorUsing(extractionFacade));
|
|
14
14
|
/**
|
|
15
15
|
* Updates the value of the given {@link Feature feature} on the given "settings" object
|
|
16
16
|
* (either a {@link Node node} or a sub object of it), using the feature's *name*.
|
|
@@ -44,4 +44,4 @@ const updateSettingsKeyBased = (settings, feature, value) => {
|
|
|
44
44
|
}
|
|
45
45
|
};
|
|
46
46
|
export { childrenExtractorUsing, nodesExtractorUsing, updateSettingsKeyBased, updateSettingsNameBased };
|
|
47
|
-
//# sourceMappingURL=
|
|
47
|
+
//# sourceMappingURL=facade.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"facade.js","sourceRoot":"","sources":["../src/facade.ts"],"names":[],"mappings":"AACA,OAAO,EAAuD,IAAI,EAAC,MAAM,eAAe,CAAA;AACxF,OAAO,EAAC,0BAA0B,EAAE,iBAAiB,EAAC,MAAM,sBAAsB,CAAA;AAClF,OAAO,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AAC,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE;YAC/B,QAAQ,CAAC,GAAG,CAAC,GAAG,EAAE,CAAA;SACrB;QACA,QAAQ,CAAC,GAAG,CAAe,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;KAC3C;SAAM;QACH,QAAQ,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;KACxB;AACL,CAAC,CAAA;AASD,OAAO,EACH,sBAAsB,EACtB,mBAAmB,EACnB,sBAAsB,EACtB,uBAAuB,EAC1B,CAAA"}
|
package/dist/id-generation.d.ts
CHANGED
|
@@ -1,54 +1,7 @@
|
|
|
1
|
-
type GenData = string | undefined;
|
|
1
|
+
export type GenData = string | undefined;
|
|
2
2
|
/**
|
|
3
3
|
* Type definition for a function that generates a unique ID,
|
|
4
4
|
* possibly ingesting some data.
|
|
5
5
|
*/
|
|
6
6
|
export type IdGenerator = (data: GenData) => string;
|
|
7
|
-
/**
|
|
8
|
-
* ID generator that produces sequential IDs:
|
|
9
|
-
* `"1"`, `"2"`, `"3"`, …
|
|
10
|
-
*/
|
|
11
|
-
export declare const sequentialIdGen: () => IdGenerator;
|
|
12
|
-
/**
|
|
13
|
-
* Augments the given {@link IdGenerator ID generator} by checking
|
|
14
|
-
* whether it's been given unique {@link GenData data},
|
|
15
|
-
* throwing an error when not.
|
|
16
|
-
*/
|
|
17
|
-
export declare const checkUniqueData: (idGen: IdGenerator) => IdGenerator;
|
|
18
|
-
/**
|
|
19
|
-
* Augments the given {@link IdGenerator ID generator} by checking
|
|
20
|
-
* whether it's been given defined ({@code !== undefined}) data,
|
|
21
|
-
* throwing an error when not.
|
|
22
|
-
*/
|
|
23
|
-
export declare const checkDefinedData: (idGen: IdGenerator) => IdGenerator;
|
|
24
|
-
/**
|
|
25
|
-
* Augments the given {@link IdGenerator ID generator} by checking
|
|
26
|
-
* whether that returns unique IDs, throwing an error when not.
|
|
27
|
-
*/
|
|
28
|
-
export declare const checkUniqueId: (idGen: IdGenerator) => IdGenerator;
|
|
29
|
-
/**
|
|
30
|
-
* Augments the given {@link IdGenerator ID generator} by checking
|
|
31
|
-
* whether it returns valid IDs, meaning [Base64URL](https://www.base64url.com/).
|
|
32
|
-
* (See also [Wikipedia](https://en.wikipedia.org/wiki/Base64#Variants_summary_table).)
|
|
33
|
-
* If a generated ID is not valid, an error is thrown.
|
|
34
|
-
*/
|
|
35
|
-
export declare const checkValidId: (idGen: IdGenerator) => IdGenerator;
|
|
36
|
-
/**
|
|
37
|
-
* Type definition for transformers of {@link IdGenerator ID generators}.
|
|
38
|
-
*/
|
|
39
|
-
export type IdGenTransformer = (idGen: IdGenerator) => IdGenerator;
|
|
40
|
-
/**
|
|
41
|
-
* Wraps the given ("initial") {@link IdGenerator ID generator}
|
|
42
|
-
* with the given {@link IdGenTransformer ID generator transformers}.
|
|
43
|
-
* In other words:
|
|
44
|
-
*
|
|
45
|
-
* wrap(idGen, trafo1, trafo2, ..., trafoN) === trafoN(...trafo2(trafo1(idGen)))
|
|
46
|
-
*/
|
|
47
|
-
export declare const wrapIdGen: (idGen: IdGenerator, ...idGenTransformers: IdGenTransformer[]) => IdGenerator;
|
|
48
|
-
/**
|
|
49
|
-
* Wraps the given ("initial") {@link IdGenerator ID generator} with all
|
|
50
|
-
* {@link IdGenTransformer ID generator checkers} defined above.
|
|
51
|
-
*/
|
|
52
|
-
export declare const checkAll: (idGen: IdGenerator) => IdGenerator;
|
|
53
|
-
export {};
|
|
54
7
|
//# sourceMappingURL=id-generation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"id-generation.d.ts","sourceRoot":"","sources":["../src/id-generation.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"id-generation.d.ts","sourceRoot":"","sources":["../src/id-generation.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,OAAO,GAAG,MAAM,GAAG,SAAS,CAAA;AAExC;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,IAAI,EAAE,OAAO,KAAK,MAAM,CAAA"}
|
package/dist/id-generation.js
CHANGED
|
@@ -1,76 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
* ID generator that produces sequential IDs:
|
|
3
|
-
* `"1"`, `"2"`, `"3"`, …
|
|
4
|
-
*/
|
|
5
|
-
export const sequentialIdGen = () => {
|
|
6
|
-
let num = 0;
|
|
7
|
-
return () => `${++num}`;
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* Augments the given {@link IdGenerator ID generator} by checking
|
|
11
|
-
* whether it's been given unique {@link GenData data},
|
|
12
|
-
* throwing an error when not.
|
|
13
|
-
*/
|
|
14
|
-
export const checkUniqueData = (idGen) => {
|
|
15
|
-
const datas = [];
|
|
16
|
-
return (data) => {
|
|
17
|
-
if (datas.indexOf(data) > -1) {
|
|
18
|
-
throw new Error(`duplicate data encountered: "${data}"`);
|
|
19
|
-
}
|
|
20
|
-
datas.push(data);
|
|
21
|
-
return idGen(data);
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
/**
|
|
25
|
-
* Augments the given {@link IdGenerator ID generator} by checking
|
|
26
|
-
* whether it's been given defined ({@code !== undefined}) data,
|
|
27
|
-
* throwing an error when not.
|
|
28
|
-
*/
|
|
29
|
-
export const checkDefinedData = (idGen) => (data) => {
|
|
30
|
-
if (data === undefined) {
|
|
31
|
-
throw new Error(`expected data`);
|
|
32
|
-
}
|
|
33
|
-
return idGen(data);
|
|
34
|
-
};
|
|
35
|
-
/**
|
|
36
|
-
* Augments the given {@link IdGenerator ID generator} by checking
|
|
37
|
-
* whether that returns unique IDs, throwing an error when not.
|
|
38
|
-
*/
|
|
39
|
-
export const checkUniqueId = (idGen) => {
|
|
40
|
-
const ids = [];
|
|
41
|
-
return (data) => {
|
|
42
|
-
const id = idGen(data);
|
|
43
|
-
if (ids.indexOf(id) > -1) {
|
|
44
|
-
throw new Error(`duplicate ID generated: "${id}"`);
|
|
45
|
-
}
|
|
46
|
-
ids.push(id);
|
|
47
|
-
return id;
|
|
48
|
-
};
|
|
49
|
-
};
|
|
50
|
-
/**
|
|
51
|
-
* Augments the given {@link IdGenerator ID generator} by checking
|
|
52
|
-
* whether it returns valid IDs, meaning [Base64URL](https://www.base64url.com/).
|
|
53
|
-
* (See also [Wikipedia](https://en.wikipedia.org/wiki/Base64#Variants_summary_table).)
|
|
54
|
-
* If a generated ID is not valid, an error is thrown.
|
|
55
|
-
*/
|
|
56
|
-
export const checkValidId = (idGen) => (data) => {
|
|
57
|
-
const id = idGen(data);
|
|
58
|
-
if (!id.match(/^[A-Za-z0-9_-]+$/)) {
|
|
59
|
-
throw new Error(`generated ID is not valid: ${id}`);
|
|
60
|
-
}
|
|
61
|
-
return id;
|
|
62
|
-
};
|
|
63
|
-
/**
|
|
64
|
-
* Wraps the given ("initial") {@link IdGenerator ID generator}
|
|
65
|
-
* with the given {@link IdGenTransformer ID generator transformers}.
|
|
66
|
-
* In other words:
|
|
67
|
-
*
|
|
68
|
-
* wrap(idGen, trafo1, trafo2, ..., trafoN) === trafoN(...trafo2(trafo1(idGen)))
|
|
69
|
-
*/
|
|
70
|
-
export const wrapIdGen = (idGen, ...idGenTransformers) => idGenTransformers.reduce((acc, current) => current(acc), idGen);
|
|
71
|
-
/**
|
|
72
|
-
* Wraps the given ("initial") {@link IdGenerator ID generator} with all
|
|
73
|
-
* {@link IdGenTransformer ID generator checkers} defined above.
|
|
74
|
-
*/
|
|
75
|
-
export const checkAll = (idGen) => wrapIdGen(idGen, checkDefinedData, checkUniqueData, checkValidId, checkUniqueId);
|
|
1
|
+
export {};
|
|
76
2
|
//# sourceMappingURL=id-generation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"id-generation.js","sourceRoot":"","sources":["../src/id-generation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"id-generation.js","sourceRoot":"","sources":["../src/id-generation.ts"],"names":[],"mappings":""}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
export * from "./api.js";
|
|
2
|
-
export * from "./types.js";
|
|
3
1
|
export * from "./deserializer.js";
|
|
4
|
-
export * from "./dynamic-
|
|
2
|
+
export * from "./dynamic-facade.js";
|
|
3
|
+
export * from "./facade.js";
|
|
5
4
|
export * from "./functions.js";
|
|
6
5
|
export * from "./id-generation.js";
|
|
7
6
|
export * from "./references.js";
|
|
8
7
|
export * from "./serializer.js";
|
|
9
8
|
export * from "./serialization.js";
|
|
10
|
-
export * from "./
|
|
9
|
+
export * from "./types.js";
|
|
11
10
|
export * from "./utils/index.js";
|
|
11
|
+
export * from "./version.js";
|
|
12
|
+
export * from "./m3/index.js";
|
|
12
13
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA;AACjC,cAAc,qBAAqB,CAAA;AACnC,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,oBAAoB,CAAA;AAClC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,oBAAoB,CAAA;AAClC,cAAc,YAAY,CAAA;AAC1B,cAAc,kBAAkB,CAAA;AAChC,cAAc,cAAc,CAAA;AAC5B,cAAc,eAAe,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
export * from "./api.js";
|
|
2
|
-
export * from "./types.js";
|
|
3
1
|
export * from "./deserializer.js";
|
|
4
|
-
export * from "./dynamic-
|
|
2
|
+
export * from "./dynamic-facade.js";
|
|
3
|
+
export * from "./facade.js";
|
|
5
4
|
export * from "./functions.js";
|
|
6
5
|
export * from "./id-generation.js";
|
|
7
6
|
export * from "./references.js";
|
|
8
7
|
export * from "./serializer.js";
|
|
9
8
|
export * from "./serialization.js";
|
|
10
|
-
export * from "./
|
|
9
|
+
export * from "./types.js";
|
|
11
10
|
export * from "./utils/index.js";
|
|
11
|
+
export * from "./version.js";
|
|
12
|
+
export * from "./m3/index.js";
|
|
12
13
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA;AACjC,cAAc,qBAAqB,CAAA;AACnC,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,oBAAoB,CAAA;AAClC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,oBAAoB,CAAA;AAClC,cAAc,YAAY,CAAA;AAC1B,cAAc,kBAAkB,CAAA;AAChC,cAAc,cAAc,CAAA;AAC5B,cAAc,eAAe,CAAA"}
|
package/dist/m3/builtins.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ declare const builtinPrimitives: {
|
|
|
12
12
|
};
|
|
13
13
|
declare const builtinClassifiers: {
|
|
14
14
|
node: import("./types.js").Concept;
|
|
15
|
-
inamed: import("./types.js").
|
|
15
|
+
inamed: import("./types.js").Interface;
|
|
16
16
|
};
|
|
17
17
|
declare const builtinFeatures: {
|
|
18
18
|
inamed_name: Property;
|
package/dist/m3/builtins.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { LanguageFactory } from "./factory.js";
|
|
2
2
|
import { lioncoreBuiltinsQName, lioncoreQNameSeparator } from "./types.js";
|
|
3
3
|
import { qualifiedNameBasedKeyGenerator } from "./key-generation.js";
|
|
4
|
-
import {
|
|
5
|
-
const factory = new LanguageFactory(lioncoreBuiltinsQName,
|
|
4
|
+
import { currentReleaseVersion } from "../version.js";
|
|
5
|
+
const factory = new LanguageFactory(lioncoreBuiltinsQName, currentReleaseVersion, (qualifiedName) => qualifiedName, qualifiedNameBasedKeyGenerator(lioncoreQNameSeparator));
|
|
6
6
|
/**
|
|
7
7
|
* Definition of a LionCore language that serves as a standard library of built-in primitive types.
|
|
8
8
|
*/
|
|
@@ -12,7 +12,7 @@ const booleanDatatype = factory.primitiveType("Boolean");
|
|
|
12
12
|
const integerDatatype = factory.primitiveType("Integer");
|
|
13
13
|
const jsonDatatype = factory.primitiveType("JSON");
|
|
14
14
|
const node = factory.concept("Node", true);
|
|
15
|
-
const inamed = factory.
|
|
15
|
+
const inamed = factory.interface("INamed");
|
|
16
16
|
const inamed_name = factory.property(inamed, "name")
|
|
17
17
|
.ofType(stringDatatype);
|
|
18
18
|
inamed.havingFeatures(inamed_name);
|
package/dist/m3/builtins.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builtins.js","sourceRoot":"","sources":["../../src/m3/builtins.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,cAAc,CAAA;AAC5C,OAAO,EAAC,qBAAqB,EAAE,sBAAsB,EAAW,MAAM,YAAY,CAAA;AAClF,OAAO,EAAC,8BAA8B,EAAC,MAAM,qBAAqB,CAAA;AAClE,OAAO,EAAC,
|
|
1
|
+
{"version":3,"file":"builtins.js","sourceRoot":"","sources":["../../src/m3/builtins.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,cAAc,CAAA;AAC5C,OAAO,EAAC,qBAAqB,EAAE,sBAAsB,EAAW,MAAM,YAAY,CAAA;AAClF,OAAO,EAAC,8BAA8B,EAAC,MAAM,qBAAqB,CAAA;AAClE,OAAO,EAAC,qBAAqB,EAAC,MAAM,eAAe,CAAA;AAGnD,MAAM,OAAO,GAAG,IAAI,eAAe,CAC/B,qBAAqB,EACrB,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AA,OAAO,
|
|
1
|
+
{"version":3,"file":"constraints.d.ts","sourceRoot":"","sources":["../../src/m3/constraints.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,QAAQ,EAAE,SAAS,EAAC,MAAM,YAAY,CAAA;AAKpE;;;GAGG;AACH,MAAM,MAAM,KAAK,GAAG;IAChB,QAAQ,EAAE,SAAS,CAAA;IACnB,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,EAAE,SAAS,EAAE,CAAA;CAC3B,CAAA;AAID;;;GAGG;AACH,eAAO,MAAM,cAAc,aAAc,QAAQ,KAAG,KAAK,EA6CpD,CAAA"}
|
package/dist/m3/constraints.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Classifier, isINamed } from "./types.js";
|
|
2
2
|
import { flatMap, inheritedCycleWith, keyOf, namedsOf, qualifiedNameOf } from "./functions.js";
|
|
3
3
|
import { duplicatesAmong } from "../utils/grouping.js";
|
|
4
4
|
// TODO back this type with an M2
|
|
@@ -16,15 +16,17 @@ export const issuesLanguage = (language) => [
|
|
|
16
16
|
secondaries: secondaries ?? []
|
|
17
17
|
});
|
|
18
18
|
};
|
|
19
|
-
if (t instanceof
|
|
19
|
+
if (t instanceof Classifier) {
|
|
20
20
|
const cycle = inheritedCycleWith(t);
|
|
21
21
|
if (cycle.length > 0) {
|
|
22
22
|
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(" -> ")}`);
|
|
23
|
+
// TODO check whether it needs to be "a" or "an", or just say "An instance of ..."
|
|
23
24
|
}
|
|
24
25
|
}
|
|
25
26
|
if (isINamed(t)) {
|
|
26
27
|
if (t.name.trim().length === 0) {
|
|
27
28
|
issue(`A ${t.constructor.name} must have a non-whitespace name`);
|
|
29
|
+
// TODO same as above
|
|
28
30
|
}
|
|
29
31
|
}
|
|
30
32
|
return issues;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constraints.js","sourceRoot":"","sources":["../../src/m3/constraints.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,
|
|
1
|
+
{"version":3,"file":"constraints.js","sourceRoot":"","sources":["../../src/m3/constraints.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAE,QAAQ,EAAsB,MAAM,YAAY,CAAA;AACpE,OAAO,EAAC,OAAO,EAAE,kBAAkB,EAAE,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAC,MAAM,gBAAgB,CAAA;AAC5F,OAAO,EAAC,eAAe,EAAC,MAAM,sBAAsB,CAAA;AAYpD,kCAAkC;AAGlC;;;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,IAAI,CAAC,YAAY,UAAU,EAAE;YACzB,MAAM,KAAK,GAAG,kBAAkB,CAAC,CAAC,CAAC,CAAA;YACnC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;gBAClB,KAAK,CAAC,KAAK,CAAC,CAAC,WAAW,CAAC,IAAI,4DAA4D,eAAe,CAAC,CAAC,CAAC,yCAAyC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAA;gBACpM,mFAAmF;aAC1F;SACJ;QAED,IAAI,QAAQ,CAAC,CAAC,CAAC,EAAE;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