@lionweb/core 0.7.0-beta.0 → 0.7.0-beta.2
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 +22 -2
- package/dist/deserializer.d.ts +15 -6
- package/dist/deserializer.d.ts.map +1 -1
- package/dist/deserializer.js +13 -13
- package/dist/deserializer.js.map +1 -1
- package/dist/dynamic-facade.d.ts +14 -5
- 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/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -2
- 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 +59 -34
- package/dist/m3/builtins.js.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 +12 -4
- package/dist/m3/facade.js.map +1 -1
- package/dist/m3/functions.d.ts +12 -4
- package/dist/m3/functions.d.ts.map +1 -1
- package/dist/m3/functions.js +9 -1
- 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 +9 -7
- package/dist/m3/lioncore.js.map +1 -1
- 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 +12 -7
- 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/serializer.d.ts +28 -7
- package/dist/serializer.d.ts.map +1 -1
- package/dist/serializer.js +108 -100
- package/dist/serializer.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 +10 -8
- package/dist/facade.d.ts +0 -85
- package/dist/facade.d.ts.map +0 -1
- package/dist/facade.js +0 -41
- package/dist/facade.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,26 @@
|
|
|
5
5
|
* Fix [bug #203](https://github.com/LionWeb-io/lionweb-typescript/issues/203).
|
|
6
6
|
* (Fix that running setup on the test package for a second time fails.)
|
|
7
7
|
* Extract utility functions to `@lionweb/ts-utils`, and `Id` (as `LionWebId`) to `@lionweb/json`.
|
|
8
|
+
* Errors thrown by the built-in `DefaultPrimitiveTypeDeserializer` and `DefaultPrimitiveTypeSerializer` are improved to say what `Property` they pertain to.
|
|
9
|
+
* Fix that `PrimitiveTypeSerializer.serializeValue` returns `undefined` instead of `null` – which is according to spec – for an empty property value.
|
|
10
|
+
* Fix misspellings of “data type” including camel-cased versions, particularly:
|
|
11
|
+
* Classes `Datatype[Register]` → `DataType[Register]`, which are part of the LionCore built-ins or the infrastructure around that.
|
|
12
|
+
The original class `Datatype` is kept in a backward compatible way (by extending from the renamed class), and is to be deprecated and removed at some point.
|
|
13
|
+
* Members `{string|boolean|integer|json}Datatype` of `builtinPrimitives` → `<*>DataType` with the former kept as aliases – to be deprecated and removed at some point.
|
|
14
|
+
* Remove type `BuiltinPrimitive` that couldn't really be used sensibly anywhere.
|
|
15
|
+
* Introduce interface `PropertyValueSerializer` that will replace `PrimitiveTypeSerializer` – which is kept for backward compatibility, for now – in the next major release.
|
|
16
|
+
This includes:
|
|
17
|
+
* Introduce class `BuiltinsPropertyValueSerializer` as a future replacement for `DefaultPrimitiveTypeSerializer`.
|
|
18
|
+
* Introduce field `SerializationOptions.propertyValueSerializer` as a future replacement for `SerializationOptions.primitiveTypeSerializer`.
|
|
19
|
+
* Introduce interface `PropertyValueDeserializer` that will replace `PrimitiveTypeDeserializer` – which is kept for backward compatibility, for now – in the next major release.
|
|
20
|
+
This includes introducing class `BuiltinsPropertyValueDeserializer` as a future replacement for `DefaultPrimitiveTypeDeserializer`.
|
|
21
|
+
* Introduce a function `nodeSerializer` that takes configuration consisting of an `ExtractionFacade` instance and an optional configuration object, and returns a function that takes (an array of) nodes and returns a serialization chunk.
|
|
22
|
+
**Note** that this function is essentially experimental, and that its signature might change in the near future!
|
|
23
|
+
* Rename `ExtractionFacade` (and its instances) to `Reader`, keeping aliases for backward compatibility, to be deprecated and removed later.
|
|
24
|
+
* Rename `InstantiationFacade` (and its instances) to `Writer`, keeping aliases for backward compatibility, to be deprecated and removed later.
|
|
25
|
+
* Expose `classifier` and `ikeyed` through `metaConcepts`, and expose `lioncoreReader` and `lioncoreWriter` as well.
|
|
26
|
+
* Added a type parameter `PNT` to the `Writer` interface, which is the type for the parent node passed to the `.nodeFor(...)` method (as its first argument), and which equals the `NT` type parameter by default.
|
|
27
|
+
* Expose functions `areSameClassifiers` and `areSameLanguages` that compare two given classifiers, resp., languages by their meta-pointers.
|
|
8
28
|
|
|
9
29
|
|
|
10
30
|
## 0.6.12
|
|
@@ -50,8 +70,8 @@
|
|
|
50
70
|
|
|
51
71
|
## 0.6.10
|
|
52
72
|
|
|
53
|
-
* Make `DefaultPrimitiveTypeDeserializer` and `DefaultPrimitiveTypeSerializer` be able to deal with duplicate definitions of
|
|
54
|
-
* Expose a function `shouldBeIdentical` that determines whether two
|
|
73
|
+
* Make `DefaultPrimitiveTypeDeserializer` and `DefaultPrimitiveTypeSerializer` be able to deal with duplicate definitions of data types.
|
|
74
|
+
* Expose a function `shouldBeIdentical` that determines whether two data types should be structurally equal based on equality of: meta type, key, and language's key.
|
|
55
75
|
* Make serializer more resilient against unresolved (i.e., `null`-valued) children.
|
|
56
76
|
* Fix that `resolveInfo` of a serialized reference must be `null`, not `undefined`.
|
|
57
77
|
|
package/dist/deserializer.d.ts
CHANGED
|
@@ -1,24 +1,33 @@
|
|
|
1
1
|
import { LionWebJsonChunk } from "@lionweb/json";
|
|
2
|
-
import {
|
|
2
|
+
import { Writer } from "./writing.js";
|
|
3
3
|
import { SimplisticHandler } from "./handler.js";
|
|
4
|
+
import { BuiltinPropertyValueDeserializer } from "./m3/builtins.js";
|
|
4
5
|
import { Language, Property } from "./m3/types.js";
|
|
5
6
|
import { Node } from "./types.js";
|
|
6
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Interface for objects that expose a method to deserialize a property's value.
|
|
9
|
+
*/
|
|
10
|
+
export interface PropertyValueDeserializer {
|
|
7
11
|
deserializeValue(value: string | undefined, property: Property): unknown | undefined;
|
|
8
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* Misspelled alias of {@link PropertyValueDeserializer}, kept for backward compatibility, and to be deprecated and removed later.
|
|
15
|
+
*/
|
|
16
|
+
export interface PrimitiveTypeDeserializer extends PropertyValueDeserializer {
|
|
17
|
+
}
|
|
9
18
|
/**
|
|
10
19
|
* @return a deserialization of a {@link LionWebJsonChunk}
|
|
11
20
|
*
|
|
12
21
|
* @param serializationChunk - a {@link SerializedModel model} from its LionWeb serialization JSON format
|
|
13
|
-
* @param
|
|
22
|
+
* @param writer - a {@link Writer} that is used to instantiate nodes and set values on them
|
|
14
23
|
* @param languages - a {@link Language language} that the serialized model is expected to conform to
|
|
15
24
|
* @param dependentNodes - a collection of nodes from dependent models against which all references in the serialized model are supposed to resolve against
|
|
16
|
-
* @param
|
|
25
|
+
* @param propertyValueDeserializer - a deserializer for values of properties (by default a {@link BuiltinPropertyValueDeserializer})
|
|
17
26
|
* @param problemHandler - a handler for reporting problems (by default a {@link defaultSimplisticHandler})
|
|
18
27
|
*/
|
|
19
|
-
export declare const deserializeSerializationChunk: <NT extends Node>(serializationChunk: LionWebJsonChunk,
|
|
28
|
+
export declare const deserializeSerializationChunk: <NT extends Node>(serializationChunk: LionWebJsonChunk, writer: Writer<NT, NT>, languages: Language[], dependentNodes: Node[], propertyValueDeserializer?: BuiltinPropertyValueDeserializer, problemHandler?: SimplisticHandler) => NT[];
|
|
20
29
|
/**
|
|
21
30
|
* Alias for {@link deserializeSerializationChunk}.
|
|
22
31
|
*/
|
|
23
|
-
export declare const deserializeChunk: <NT extends Node>(serializationChunk: LionWebJsonChunk,
|
|
32
|
+
export declare const deserializeChunk: <NT extends Node>(serializationChunk: LionWebJsonChunk, writer: Writer<NT, NT>, languages: Language[], dependentNodes: Node[], propertyValueDeserializer?: BuiltinPropertyValueDeserializer, problemHandler?: SimplisticHandler) => NT[];
|
|
24
33
|
//# sourceMappingURL=deserializer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deserializer.d.ts","sourceRoot":"","sources":["../src/deserializer.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"deserializer.d.ts","sourceRoot":"","sources":["../src/deserializer.ts"],"names":[],"mappings":"AAAA,OAAO,EAGH,gBAAgB,EAGnB,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACrC,OAAO,EAA4B,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAC1E,OAAO,EAAE,gCAAgC,EAAE,MAAM,kBAAkB,CAAA;AAEnE,OAAO,EAAwC,QAAQ,EAAiB,QAAQ,EAAa,MAAM,eAAe,CAAA;AAGlH,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AAEjC;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACtC,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,QAAQ,EAAE,QAAQ,GAAG,OAAO,GAAG,SAAS,CAAA;CACvF;AAED;;GAEG;AACH,MAAM,WAAW,yBAA0B,SAAQ,yBAAyB;CAAG;AAE/E;;;;;;;;;GASG;AACH,eAAO,MAAM,6BAA6B,wCAClB,gBAAgB,qCAEzB,QAAQ,EAAE,kBAEL,IAAI,EAAE,8BAEK,gCAAgC,mBAC3C,iBAAiB,SA0KpC,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,gBAAgB,wCAtLL,gBAAgB,qCAEzB,QAAQ,EAAE,kBAEL,IAAI,EAAE,8BAEK,gCAAgC,mBAC3C,iBAAiB,SA+KwB,CAAA"}
|
package/dist/deserializer.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { currentSerializationFormatVersion } from "@lionweb/json";
|
|
2
2
|
import { byIdMap, groupBy } from "@lionweb/ts-utils";
|
|
3
3
|
import { defaultSimplisticHandler } from "./handler.js";
|
|
4
|
-
import {
|
|
4
|
+
import { BuiltinPropertyValueDeserializer } from "./m3/builtins.js";
|
|
5
5
|
import { allFeaturesOf } from "./m3/functions.js";
|
|
6
6
|
import { Classifier, Containment, Enumeration, PrimitiveType, Property, Reference } from "./m3/types.js";
|
|
7
7
|
import { unresolved } from "./references.js";
|
|
@@ -10,17 +10,17 @@ import { MemoisingSymbolTable } from "./symbol-table.js";
|
|
|
10
10
|
* @return a deserialization of a {@link LionWebJsonChunk}
|
|
11
11
|
*
|
|
12
12
|
* @param serializationChunk - a {@link SerializedModel model} from its LionWeb serialization JSON format
|
|
13
|
-
* @param
|
|
13
|
+
* @param writer - a {@link Writer} that is used to instantiate nodes and set values on them
|
|
14
14
|
* @param languages - a {@link Language language} that the serialized model is expected to conform to
|
|
15
15
|
* @param dependentNodes - a collection of nodes from dependent models against which all references in the serialized model are supposed to resolve against
|
|
16
|
-
* @param
|
|
16
|
+
* @param propertyValueDeserializer - a deserializer for values of properties (by default a {@link BuiltinPropertyValueDeserializer})
|
|
17
17
|
* @param problemHandler - a handler for reporting problems (by default a {@link defaultSimplisticHandler})
|
|
18
18
|
*/
|
|
19
|
-
export const deserializeSerializationChunk = (serializationChunk,
|
|
19
|
+
export const deserializeSerializationChunk = (serializationChunk, writer, languages,
|
|
20
20
|
// TODO facades <--> languages, so it's weird that it looks split up like this
|
|
21
21
|
dependentNodes,
|
|
22
|
-
// TODO (#13) see if you can turn this into [nodes: Node[],
|
|
23
|
-
|
|
22
|
+
// TODO (#13) see if you can turn this into [nodes: Node[], writer: Writer<Node>][] after all
|
|
23
|
+
propertyValueDeserializer = new BuiltinPropertyValueDeserializer(), problemHandler = defaultSimplisticHandler) => {
|
|
24
24
|
if (serializationChunk.serializationFormatVersion !== currentSerializationFormatVersion) {
|
|
25
25
|
problemHandler.reportProblem(`can't deserialize from serialization format other than version "${currentSerializationFormatVersion}" - assuming that version`);
|
|
26
26
|
}
|
|
@@ -46,7 +46,7 @@ primitiveTypeDeserializer = new DefaultPrimitiveTypeDeserializer(), problemHandl
|
|
|
46
46
|
const referencesToInstall = [];
|
|
47
47
|
const tryInstantiate = (parent, classifier, id, propertySettings) => {
|
|
48
48
|
try {
|
|
49
|
-
return
|
|
49
|
+
return writer.nodeFor(parent, classifier, id, propertySettings);
|
|
50
50
|
}
|
|
51
51
|
catch (e) {
|
|
52
52
|
problemHandler.reportProblem(`error occurred during instantiation of a node for classifier ${classifier.name} with meta-pointer (${classifier.language.key}, ${classifier.language.version}, ${classifier.key}); reason:`);
|
|
@@ -75,13 +75,13 @@ primitiveTypeDeserializer = new DefaultPrimitiveTypeDeserializer(), problemHandl
|
|
|
75
75
|
const value = serializedPropertiesPerKey[property.key][0].value;
|
|
76
76
|
if (property.type instanceof PrimitiveType) {
|
|
77
77
|
propertySettings[property.key] =
|
|
78
|
-
value === null ? undefined :
|
|
78
|
+
value === null ? undefined : propertyValueDeserializer.deserializeValue(value, property);
|
|
79
79
|
return;
|
|
80
80
|
}
|
|
81
81
|
if (property.type instanceof Enumeration) {
|
|
82
82
|
const literal = property.type.literals.find(literal => literal.key === value);
|
|
83
83
|
if (literal !== undefined) {
|
|
84
|
-
propertySettings[property.key] =
|
|
84
|
+
propertySettings[property.key] = writer.encodingOf(literal);
|
|
85
85
|
}
|
|
86
86
|
return;
|
|
87
87
|
}
|
|
@@ -97,14 +97,14 @@ primitiveTypeDeserializer = new DefaultPrimitiveTypeDeserializer(), problemHandl
|
|
|
97
97
|
const serializedReferencesPerKey = references === undefined ? {} : groupBy(references, sp => sp.reference.key); // (this assumes no duplicate keys among references!)
|
|
98
98
|
allFeatures.forEach(feature => {
|
|
99
99
|
if (feature instanceof Property && properties !== undefined && feature.key in serializedPropertiesPerKey) {
|
|
100
|
-
|
|
100
|
+
writer.setFeatureValue(node, feature, propertySettings[feature.key]);
|
|
101
101
|
}
|
|
102
102
|
else if (feature instanceof Containment && containments !== undefined && feature.key in serializedContainmentsPerKey) {
|
|
103
103
|
const childIds = serializedContainmentsPerKey[feature.key].flatMap(serChildren => serChildren.children);
|
|
104
104
|
if (feature.multiple) {
|
|
105
105
|
childIds.forEach(childId => {
|
|
106
106
|
if (childId in serializedNodeById) {
|
|
107
|
-
|
|
107
|
+
writer.setFeatureValue(node, feature, instantiateMemoised(serializedNodeById[childId], node));
|
|
108
108
|
}
|
|
109
109
|
});
|
|
110
110
|
}
|
|
@@ -113,7 +113,7 @@ primitiveTypeDeserializer = new DefaultPrimitiveTypeDeserializer(), problemHandl
|
|
|
113
113
|
// just set the 1st one:
|
|
114
114
|
const firstChildId = childIds[0];
|
|
115
115
|
if (firstChildId in serializedNodeById) {
|
|
116
|
-
|
|
116
|
+
writer.setFeatureValue(node, feature, instantiateMemoised(serializedNodeById[firstChildId], node));
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
}
|
|
@@ -146,7 +146,7 @@ primitiveTypeDeserializer = new DefaultPrimitiveTypeDeserializer(), problemHandl
|
|
|
146
146
|
}
|
|
147
147
|
return target;
|
|
148
148
|
})();
|
|
149
|
-
|
|
149
|
+
writer.setFeatureValue(node, reference, value);
|
|
150
150
|
});
|
|
151
151
|
return rootLikeNodes;
|
|
152
152
|
};
|
package/dist/deserializer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deserializer.js","sourceRoot":"","sources":["../src/deserializer.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"deserializer.js","sourceRoot":"","sources":["../src/deserializer.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,iCAAiC,EAKpC,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAEpD,OAAO,EAAE,wBAAwB,EAAqB,MAAM,cAAc,CAAA;AAC1E,OAAO,EAAE,gCAAgC,EAAE,MAAM,kBAAkB,CAAA;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAAY,aAAa,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAClH,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AAexD;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,CACzC,kBAAoC,EACpC,MAAkB,EAClB,SAAqB;AACrB,+EAA+E;AAC/E,cAAsB;AACtB,8FAA8F;AAC9F,4BAA8D,IAAI,gCAAgC,EAAE,EACpG,iBAAoC,wBAAwB,EACxD,EAAE;IACN,IAAI,kBAAkB,CAAC,0BAA0B,KAAK,iCAAiC,EAAE,CAAC;QACtF,cAAc,CAAC,aAAa,CACxB,mEAAmE,iCAAiC,2BAA2B,CAClI,CAAA;IACL,CAAC;IAED,MAAM,WAA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BAAkB,GAAG,OAAO,CAAC,cAAc,CAAC,CAAA;IAElD,mBAAmB,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,SAAS,EAAE,KAAK,CAAC,EAAE,EAAE;QACrD,MAAM,MAAM,GAAG,oBAAoB,CAAC,KAAK,CAAC,IAAI,kBAAkB,CAAC,KAAK,CAAC,CAAA;QACvE,MAAM,KAAK,GAAG,CAAC,GAAG,EAAE;YAChB,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;gBACvB,MAAM,eAAe,GAAG,SAAS,IAAI,IAAI,CAAC,CAAC,CAAC,oBAAoB,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAA;gBACnF,cAAc,CAAC,aAAa,CACxB,uCAAuC,KAAK,UAAU,SAAS,CAAC,IAAI,mCAAmC,IAAI,CAAC,EAAE,GAAG,eAAe,EAAE,CACrI,CAAA;gBACD,OAAO,UAAU,CAAA;YACrB,CAAC;YACD,OAAO,MAAM,CAAA;QACjB,CAAC,CAAC,EAAE,CAAA;QACJ,MAAM,CAAC,eAAe,CAAC,IAAI,EAAE,SAAS,EAAE,KAAK,CAAC,CAAA;IAClD,CAAC,CAAC,CAAA;IAEF,OAAO,aAAa,CAAA;AACxB,CAAC,CAAA;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,6BAA6B,CAAA"}
|
package/dist/dynamic-facade.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { ExtractionFacade, InstantiationFacade } from "./facade.js";
|
|
2
1
|
import { Classifier } from "./m3/types.js";
|
|
2
|
+
import { Reader } from "./reading.js";
|
|
3
3
|
import { Node } from "./types.js";
|
|
4
|
+
import { Writer } from "./writing.js";
|
|
4
5
|
/**
|
|
5
6
|
* Type definition for "dynamic nodes" that are not backed by specific types (e.g. classes).
|
|
6
7
|
*/
|
|
@@ -9,11 +10,19 @@ export type DynamicNode = Node & {
|
|
|
9
10
|
settings: Record<string, unknown>;
|
|
10
11
|
};
|
|
11
12
|
/**
|
|
12
|
-
* An implementation of {@link
|
|
13
|
+
* An implementation of {@link Reader} for {@link DynamicNode dynamic nodes}.
|
|
13
14
|
*/
|
|
14
|
-
export declare const
|
|
15
|
+
export declare const dynamicReader: Reader<DynamicNode>;
|
|
15
16
|
/**
|
|
16
|
-
*
|
|
17
|
+
* Alias for {@link Reader}, kept for backward compatibility, and to be deprecated and removed later.
|
|
17
18
|
*/
|
|
18
|
-
export declare const
|
|
19
|
+
export declare const dynamicExtractionFacade: Reader<DynamicNode>;
|
|
20
|
+
/**
|
|
21
|
+
* An implementation of {@link Writer} for {@link DynamicNode dynamic nodes}.
|
|
22
|
+
*/
|
|
23
|
+
export declare const dynamicWriter: Writer<DynamicNode>;
|
|
24
|
+
/**
|
|
25
|
+
* Alias for {@link Reader}, kept for backward compatibility, and to be deprecated and removed later.
|
|
26
|
+
*/
|
|
27
|
+
export declare const dynamicInstantiationFacade: Reader<DynamicNode>;
|
|
19
28
|
//# sourceMappingURL=dynamic-facade.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dynamic-facade.d.ts","sourceRoot":"","sources":["../src/dynamic-facade.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dynamic-facade.d.ts","sourceRoot":"","sources":["../src/dynamic-facade.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,EAAE,MAAM,EAAsB,MAAM,cAAc,CAAA;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AACjC,OAAO,EAA0B,MAAM,EAAE,MAAM,cAAc,CAAA;AAG7D;;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;AAUD;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,WAAW,CAS5C,CAAA;AAEF;;GAEG;AACH,eAAO,MAAM,uBAAuB,qBAAgB,CAAA;AAEpD;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,WAAW,CAU5C,CAAA;AAEF;;GAEG;AACH,eAAO,MAAM,0BAA0B,qBAAgB,CAAA"}
|
package/dist/dynamic-facade.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { updateSettingsKeyBased } from "./facade.js";
|
|
2
1
|
import { builtinFeatures } from "./m3/builtins.js";
|
|
2
|
+
import { updateSettingsKeyBased } from "./writing.js";
|
|
3
3
|
// TODO could also have properties, containments, references - mimicking the serialization
|
|
4
4
|
const propertyGetterFor = (key) => (node) => (key in node.settings && typeof node.settings[key] === "string")
|
|
5
5
|
? node.settings[key] // FIXME type cast shouldn't be necessary
|
|
6
6
|
: undefined;
|
|
7
7
|
/**
|
|
8
|
-
* An implementation of {@link
|
|
8
|
+
* An implementation of {@link Reader} for {@link DynamicNode dynamic nodes}.
|
|
9
9
|
*/
|
|
10
|
-
export const
|
|
10
|
+
export const dynamicReader = ({
|
|
11
11
|
classifierOf: (node) => node.classifier,
|
|
12
12
|
getFeatureValue: (node, feature) =>
|
|
13
13
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -17,9 +17,13 @@ export const dynamicExtractionFacade = ({
|
|
|
17
17
|
resolveInfoFor: propertyGetterFor(builtinFeatures.inamed_name.key)
|
|
18
18
|
});
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
20
|
+
* Alias for {@link Reader}, kept for backward compatibility, and to be deprecated and removed later.
|
|
21
21
|
*/
|
|
22
|
-
export const
|
|
22
|
+
export const dynamicExtractionFacade = dynamicReader;
|
|
23
|
+
/**
|
|
24
|
+
* An implementation of {@link Writer} for {@link DynamicNode dynamic nodes}.
|
|
25
|
+
*/
|
|
26
|
+
export const dynamicWriter = ({
|
|
23
27
|
nodeFor: (_parent, classifier, id, _propertySettings) => ({
|
|
24
28
|
id,
|
|
25
29
|
classifier,
|
|
@@ -30,4 +34,8 @@ export const dynamicInstantiationFacade = ({
|
|
|
30
34
|
},
|
|
31
35
|
encodingOf: ({ key }) => key
|
|
32
36
|
});
|
|
37
|
+
/**
|
|
38
|
+
* Alias for {@link Reader}, kept for backward compatibility, and to be deprecated and removed later.
|
|
39
|
+
*/
|
|
40
|
+
export const dynamicInstantiationFacade = dynamicReader;
|
|
33
41
|
//# sourceMappingURL=dynamic-facade.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dynamic-facade.js","sourceRoot":"","sources":["../src/dynamic-facade.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"dynamic-facade.js","sourceRoot":"","sources":["../src/dynamic-facade.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAIlD,OAAO,EAAE,sBAAsB,EAAU,MAAM,cAAc,CAAA;AAU7D,2FAA2F;AAG3F,MAAM,iBAAiB,GAAG,CAAC,GAAe,EAAmC,EAAE,CAC3E,CAAC,IAAI,EAAE,EAAE,CACL,CAAC,GAAG,IAAI,IAAI,CAAC,QAAQ,IAAI,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,QAAQ,CAAC;IAC5D,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAW,CAAE,0CAA0C;IAC1E,CAAC,CAAC,SAAS,CAAA;AAEvB;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAwB,CAAC;IAC/C,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,EAAK,sBAAsB;IACtC,cAAc,EAAE,iBAAiB,CAAC,eAAe,CAAC,WAAW,CAAC,GAAG,CAAC;CACrE,CAAC,CAAA;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,aAAa,CAAA;AAEpD;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAwB,CAAC;IAC/C,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;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,aAAa,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Reader } from "./reading.js";
|
|
2
|
+
import { Node } from "./types.js";
|
|
3
|
+
/**
|
|
4
|
+
* Type def. for functions that extract {@link Node nodes} from a given one.
|
|
5
|
+
*/
|
|
6
|
+
export type NodesExtractor<NT extends Node> = (node: NT) => NT[];
|
|
7
|
+
/**
|
|
8
|
+
* @return A function that extracts the children from a given node.
|
|
9
|
+
*/
|
|
10
|
+
export declare const childrenExtractorUsing: <NT extends Node>(reader: Reader<NT>) => NodesExtractor<NT>;
|
|
11
|
+
/**
|
|
12
|
+
* @return a function that extracts *all* nodes from a given start node - usually a root node.
|
|
13
|
+
*/
|
|
14
|
+
export declare const nodesExtractorUsing: <NT extends Node>(reader: Reader<NT>) => NodesExtractor<NT>;
|
|
15
|
+
//# sourceMappingURL=extraction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extraction.d.ts","sourceRoot":"","sources":["../src/extraction.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AAGjC;;GAEG;AACH,MAAM,MAAM,cAAc,CAAC,EAAE,SAAS,IAAI,IAAI,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,EAAE,CAAA;AAEhE;;GAEG;AACH,eAAO,MAAM,sBAAsB,6DAOtB,CAAA;AAGb;;GAEG;AACH,eAAO,MAAM,mBAAmB,6DACqD,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { flatMapNonCyclingFollowing, trivialFlatMapper } from "@lionweb/ts-utils";
|
|
2
|
+
import { allFeaturesOf, isContainment } from "./m3/index.js";
|
|
3
|
+
/**
|
|
4
|
+
* @return A function that extracts the children from a given node.
|
|
5
|
+
*/
|
|
6
|
+
export const childrenExtractorUsing = (reader) => (node) => [
|
|
7
|
+
...(allFeaturesOf(reader.classifierOf(node))
|
|
8
|
+
.filter(isContainment)
|
|
9
|
+
.flatMap((containment) => reader.getFeatureValue(node, containment) ?? [])),
|
|
10
|
+
// FIXME there's NO guarantee about the result of reader.getFeatureValue(node, containment) !!!
|
|
11
|
+
...node.annotations
|
|
12
|
+
];
|
|
13
|
+
/**
|
|
14
|
+
* @return a function that extracts *all* nodes from a given start node - usually a root node.
|
|
15
|
+
*/
|
|
16
|
+
export const nodesExtractorUsing = (reader) => flatMapNonCyclingFollowing(trivialFlatMapper, childrenExtractorUsing(reader));
|
|
17
|
+
//# sourceMappingURL=extraction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extraction.js","sourceRoot":"","sources":["../src/extraction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAEjF,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAU5D;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAkB,MAAkB,EAAsB,EAAE,CAC9F,CAAC,IAAQ,EAAQ,EAAE,CAAC;IAChB,GAAG,CAAC,aAAa,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;SACvC,MAAM,CAAC,aAAa,CAAC;SACrB,OAAO,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,MAAM,CAAC,eAAe,CAAC,IAAI,EAAE,WAAW,CAAC,IAAI,EAAE,CAAC,CAAC;IACvF,gGAAgG;IACxF,GAAG,IAAI,CAAC,WAAW;CACd,CAAA;AAGb;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAkB,MAAkB,EAAsB,EAAE,CAC3F,0BAA0B,CAAC,iBAAiB,EAAE,sBAAsB,CAAK,MAAM,CAAC,CAAC,CAAA"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
export * from "./deserializer.js";
|
|
2
2
|
export * from "./dynamic-facade.js";
|
|
3
|
-
export * from "./
|
|
3
|
+
export * from "./extraction.js";
|
|
4
4
|
export * from "./handler.js";
|
|
5
5
|
export * from "./functions.js";
|
|
6
|
+
export * from "./reading.js";
|
|
6
7
|
export * from "./references.js";
|
|
7
8
|
export * from "./serializer.js";
|
|
8
9
|
export * from "./symbol-table.js";
|
|
9
10
|
export * from "./types.js";
|
|
10
11
|
export * from "./version.js";
|
|
11
|
-
export * from "./
|
|
12
|
+
export * from "./writing.js";
|
|
12
13
|
export * from "./m1/reference-utils.js";
|
|
14
|
+
export * from "./m3/index.js";
|
|
13
15
|
//# 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,mBAAmB,CAAA;AACjC,cAAc,qBAAqB,CAAA;AACnC,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,iBAAiB,CAAA;AAC/B,cAAc,cAAc,CAAA;AAC5B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,cAAc,CAAA;AAC5B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,mBAAmB,CAAA;AACjC,cAAc,YAAY,CAAA;AAC1B,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA;AAC5B,cAAc,yBAAyB,CAAA;AACvC,cAAc,eAAe,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
export * from "./deserializer.js";
|
|
2
2
|
export * from "./dynamic-facade.js";
|
|
3
|
-
export * from "./
|
|
3
|
+
export * from "./extraction.js";
|
|
4
4
|
export * from "./handler.js";
|
|
5
5
|
export * from "./functions.js";
|
|
6
|
+
export * from "./reading.js";
|
|
6
7
|
export * from "./references.js";
|
|
7
8
|
export * from "./serializer.js";
|
|
8
9
|
export * from "./symbol-table.js";
|
|
9
10
|
export * from "./types.js";
|
|
10
11
|
export * from "./version.js";
|
|
11
|
-
export * from "./
|
|
12
|
+
export * from "./writing.js";
|
|
12
13
|
export * from "./m1/reference-utils.js";
|
|
14
|
+
export * from "./m3/index.js";
|
|
13
15
|
//# 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,mBAAmB,CAAA;AACjC,cAAc,qBAAqB,CAAA;AACnC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA;AACjC,cAAc,qBAAqB,CAAA;AACnC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,cAAc,CAAA;AAC5B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,cAAc,CAAA;AAC5B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,mBAAmB,CAAA;AACjC,cAAc,YAAY,CAAA;AAC1B,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA;AAC5B,cAAc,yBAAyB,CAAA;AACvC,cAAc,eAAe,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Reader } from "../reading.js";
|
|
2
2
|
import { Reference } from "../m3/index.js";
|
|
3
3
|
import { Node } from "../types.js";
|
|
4
4
|
/**
|
|
@@ -21,10 +21,10 @@ export declare class ReferenceValue<NT extends Node> {
|
|
|
21
21
|
* even if the scope passed contains duplicate nodes.
|
|
22
22
|
*
|
|
23
23
|
* @param scope - the {@link Node nodes} that are searched for references
|
|
24
|
-
* @param
|
|
24
|
+
* @param reader - a {@link Reader} to reflect on nodes.
|
|
25
25
|
* _Note_ that it's assumed that its {@link getFeatureValue} function doesn't throw.
|
|
26
26
|
*/
|
|
27
|
-
export declare const referenceValues: <NT extends Node>(scope: NT[],
|
|
27
|
+
export declare const referenceValues: <NT extends Node>(scope: NT[], reader: Reader<NT>) => ReferenceValue<NT>[];
|
|
28
28
|
/**
|
|
29
29
|
* Finds all references coming into the given target node or any of the given target nodes,
|
|
30
30
|
* within the given scope, as {@link ReferenceValue reference values}.
|
|
@@ -36,10 +36,10 @@ export declare const referenceValues: <NT extends Node>(scope: NT[], extractionF
|
|
|
36
36
|
*
|
|
37
37
|
* @param targetNodeOrNodes - one or more target {@link Node nodes} for which the incoming references are searched
|
|
38
38
|
* @param scope - the {@link Node nodes} that are searched for references
|
|
39
|
-
* @param
|
|
39
|
+
* @param reader - a {@link Reader} to reflect on nodes.
|
|
40
40
|
* _Note_ that it's assumed that its {@link getFeatureValue} function doesn't throw.
|
|
41
41
|
*/
|
|
42
|
-
export declare const incomingReferences: <NT extends Node>(targetNodeOrNodes: NT | NT[], scope: NT[],
|
|
42
|
+
export declare const incomingReferences: <NT extends Node>(targetNodeOrNodes: NT | NT[], scope: NT[], reader: Reader<NT>) => ReferenceValue<NT>[];
|
|
43
43
|
/**
|
|
44
44
|
* Finds all references to nodes that are not in the given scope, as {@link ReferenceValue reference values}.
|
|
45
45
|
* To search within all nodes under a collection of root nodes,
|
|
@@ -49,8 +49,8 @@ export declare const incomingReferences: <NT extends Node>(targetNodeOrNodes: NT
|
|
|
49
49
|
* even if the given scope contains duplicate nodes.
|
|
50
50
|
*
|
|
51
51
|
* @param scope - the {@link Node nodes} that form the scope of “reachable” nodes
|
|
52
|
-
* @param
|
|
52
|
+
* @param reader - a {@link Reader} to reflect on nodes.
|
|
53
53
|
* _Note_ that it's assumed that its {@link getFeatureValue} function doesn't throw.
|
|
54
54
|
*/
|
|
55
|
-
export declare const referencesToOutOfScopeNodes: <NT extends Node>(scope: NT[],
|
|
55
|
+
export declare const referencesToOutOfScopeNodes: <NT extends Node>(scope: NT[], reader: Reader<NT>) => ReferenceValue<NT>[];
|
|
56
56
|
//# sourceMappingURL=reference-utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reference-utils.d.ts","sourceRoot":"","sources":["../../src/m1/reference-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
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":"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,
|
|
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,EA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AW,CAAC,OAAO,CAAC,cAAc,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;AACxF,CAAC,CAAA;AAGD;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,CACvC,KAAW,EACX,MAAkB,EACE,EAAE,CACtB,eAAe,CAAC,KAAK,EAAE,MAAM,CAAC;KACzB,MAAM,CAAC,CAAC,cAAc,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA"}
|
package/dist/m3/builtins.d.ts
CHANGED
|
@@ -1,19 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { Classifier, Concept,
|
|
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
|