@finos/legend-graph 32.3.18 → 32.3.20
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/lib/graph/metamodel/pure/dataProduct/DataProduct.d.ts +3 -6
- package/lib/graph/metamodel/pure/dataProduct/DataProduct.d.ts.map +1 -1
- package/lib/graph/metamodel/pure/dataProduct/DataProduct.js +3 -8
- package/lib/graph/metamodel/pure/dataProduct/DataProduct.js.map +1 -1
- package/lib/graph-manager/action/changeDetection/DataProductObserveHelper.d.ts +2 -1
- package/lib/graph-manager/action/changeDetection/DataProductObserveHelper.d.ts.map +1 -1
- package/lib/graph-manager/action/changeDetection/DataProductObserveHelper.js +11 -4
- package/lib/graph-manager/action/changeDetection/DataProductObserveHelper.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/model/context/V1_PureModelContextCombination.d.ts +21 -0
- package/lib/graph-manager/protocol/pure/v1/model/context/V1_PureModelContextCombination.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/model/context/V1_PureModelContextCombination.js +24 -0
- package/lib/graph-manager/protocol/pure/v1/model/context/V1_PureModelContextCombination.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/model/packageableElements/dataProduct/V1_DataProduct.d.ts +3 -6
- package/lib/graph-manager/protocol/pure/v1/model/packageableElements/dataProduct/V1_DataProduct.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/model/packageableElements/dataProduct/V1_DataProduct.js +3 -8
- package/lib/graph-manager/protocol/pure/v1/model/packageableElements/dataProduct/V1_DataProduct.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_DataProductTransformer.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_DataProductTransformer.js +1 -9
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_DataProductTransformer.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_DataProductBuilder.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_DataProductBuilder.js +2 -10
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_DataProductBuilder.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/V1_PureProtocolSerialization.d.ts +2 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/V1_PureProtocolSerialization.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/V1_PureProtocolSerialization.js +16 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/V1_PureProtocolSerialization.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DataProductSerializationHelper.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DataProductSerializationHelper.js +0 -2
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DataProductSerializationHelper.js.map +1 -1
- package/lib/index.d.ts +3 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +3 -2
- package/lib/index.js.map +1 -1
- package/lib/package.json +1 -1
- package/package.json +3 -3
- package/src/graph/metamodel/pure/dataProduct/DataProduct.ts +3 -8
- package/src/graph-manager/action/changeDetection/DataProductObserveHelper.ts +17 -4
- package/src/graph-manager/protocol/pure/v1/model/context/V1_PureModelContextCombination.ts +26 -0
- package/src/graph-manager/protocol/pure/v1/model/packageableElements/dataProduct/V1_DataProduct.ts +3 -8
- package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_DataProductTransformer.ts +0 -14
- package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_DataProductBuilder.ts +1 -21
- package/src/graph-manager/protocol/pure/v1/transformation/pureProtocol/V1_PureProtocolSerialization.ts +27 -0
- package/src/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DataProductSerializationHelper.ts +0 -4
- package/src/index.ts +3 -0
- package/tsconfig.json +1 -0
|
@@ -39,7 +39,6 @@ import {
|
|
|
39
39
|
V1_DataProductDiagram,
|
|
40
40
|
V1_DataProductEmbeddedImageIcon,
|
|
41
41
|
V1_DataProductLibraryIcon,
|
|
42
|
-
V1_DataProductRuntimeInfo,
|
|
43
42
|
V1_ElementScope,
|
|
44
43
|
V1_Email,
|
|
45
44
|
V1_LakehouseAccessPoint,
|
|
@@ -192,19 +191,6 @@ export const V1_transformDataProduct = (
|
|
|
192
191
|
undefined,
|
|
193
192
|
metamodelGroup.mapping.valueForSerialization ?? '',
|
|
194
193
|
);
|
|
195
|
-
modelGroup.defaultRuntime = metamodelGroup.defaultRuntime.id;
|
|
196
|
-
modelGroup.compatibleRuntimes = metamodelGroup.compatibleRuntimes.map(
|
|
197
|
-
(rInfo) => {
|
|
198
|
-
const metamodelRuntime = new V1_DataProductRuntimeInfo();
|
|
199
|
-
metamodelRuntime.runtime = new V1_PackageableElementPointer(
|
|
200
|
-
undefined,
|
|
201
|
-
rInfo.runtime.valueForSerialization ?? '',
|
|
202
|
-
);
|
|
203
|
-
metamodelRuntime.id = rInfo.id;
|
|
204
|
-
metamodelRuntime.description = rInfo.description;
|
|
205
|
-
return metamodelRuntime;
|
|
206
|
-
},
|
|
207
|
-
);
|
|
208
194
|
|
|
209
195
|
modelGroup.featuredElements = metamodelGroup.featuredElements.map(
|
|
210
196
|
(pointer) => {
|
|
@@ -14,11 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import {
|
|
18
|
-
guaranteeNonNullable,
|
|
19
|
-
isNonNullable,
|
|
20
|
-
UnsupportedOperationError,
|
|
21
|
-
} from '@finos/legend-shared';
|
|
17
|
+
import { isNonNullable, UnsupportedOperationError } from '@finos/legend-shared';
|
|
22
18
|
import {
|
|
23
19
|
type AccessPoint,
|
|
24
20
|
type DataProductElement,
|
|
@@ -31,7 +27,6 @@ import {
|
|
|
31
27
|
DataProductLibraryIcon,
|
|
32
28
|
DataProductLink,
|
|
33
29
|
DataProductOperationalMetadata,
|
|
34
|
-
DataProductRuntimeInfo,
|
|
35
30
|
Expertise,
|
|
36
31
|
FunctionAccessPoint,
|
|
37
32
|
LakehouseAccessPoint,
|
|
@@ -169,21 +164,6 @@ export const V1_buildAccessPointGroup = (
|
|
|
169
164
|
group.mapping = PackageableElementExplicitReference.create(
|
|
170
165
|
context.graph.getMapping(elementGroup.mapping.path),
|
|
171
166
|
);
|
|
172
|
-
group.compatibleRuntimes = elementGroup.compatibleRuntimes.map((rInfo) => {
|
|
173
|
-
const metamodelRuntime = new DataProductRuntimeInfo();
|
|
174
|
-
metamodelRuntime.runtime = PackageableElementExplicitReference.create(
|
|
175
|
-
context.graph.getRuntime(rInfo.runtime.path),
|
|
176
|
-
);
|
|
177
|
-
metamodelRuntime.id = rInfo.id;
|
|
178
|
-
metamodelRuntime.description = rInfo.description;
|
|
179
|
-
return metamodelRuntime;
|
|
180
|
-
});
|
|
181
|
-
group.defaultRuntime = guaranteeNonNullable(
|
|
182
|
-
group.compatibleRuntimes.find(
|
|
183
|
-
(e) => e.id === elementGroup.defaultRuntime,
|
|
184
|
-
),
|
|
185
|
-
`default runtime ${elementGroup.defaultRuntime} not found in data product`,
|
|
186
|
-
);
|
|
187
167
|
if (elementGroup.featuredElements) {
|
|
188
168
|
group.featuredElements = elementGroup.featuredElements.map((pointer) => {
|
|
189
169
|
const elementReference = context.resolveElement(
|
|
@@ -51,6 +51,7 @@ import type {
|
|
|
51
51
|
ClassifierPathMappingMap,
|
|
52
52
|
SubtypeInfo,
|
|
53
53
|
} from '../../../../../action/protocol/ProtocolInfo.js';
|
|
54
|
+
import { V1_PureModelContextCombination } from '../../model/context/V1_PureModelContextCombination.js';
|
|
54
55
|
|
|
55
56
|
enum V1_SDLCType {
|
|
56
57
|
ALLOY = 'alloy',
|
|
@@ -61,6 +62,7 @@ export enum V1_PureModelContextType {
|
|
|
61
62
|
POINTER = 'pointer',
|
|
62
63
|
COMPOSITE = 'composite',
|
|
63
64
|
TEXT = 'text',
|
|
65
|
+
COMBINATION = 'combination',
|
|
64
66
|
}
|
|
65
67
|
|
|
66
68
|
export const V1_entitiesToPureModelContextData = async (
|
|
@@ -173,6 +175,24 @@ const V1_pureModelContextCompositeModelSchema = createModelSchema(
|
|
|
173
175
|
},
|
|
174
176
|
);
|
|
175
177
|
|
|
178
|
+
const V1_pureModelContextCombinationModelSchema = createModelSchema(
|
|
179
|
+
V1_PureModelContextCombination,
|
|
180
|
+
{
|
|
181
|
+
_type: usingConstantValueSchema(V1_PureModelContextType.COMBINATION),
|
|
182
|
+
serializer: usingModelSchema(V1_Protocol.serialization.schema),
|
|
183
|
+
contexts: list(
|
|
184
|
+
custom(
|
|
185
|
+
(element: V1_PureModelContext) =>
|
|
186
|
+
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
|
187
|
+
V1_serializePureModelContext(element),
|
|
188
|
+
(element: PlainObject<V1_PureModelContext>) =>
|
|
189
|
+
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
|
190
|
+
V1_deserializePureModelContext(element),
|
|
191
|
+
),
|
|
192
|
+
),
|
|
193
|
+
},
|
|
194
|
+
);
|
|
195
|
+
|
|
176
196
|
export const V1_setupPureModelContextDataSerialization = (
|
|
177
197
|
plugins: PureProtocolProcessorPlugin[],
|
|
178
198
|
subtypeInfo?: SubtypeInfo | undefined,
|
|
@@ -227,6 +247,11 @@ export const V1_serializePureModelContext = (
|
|
|
227
247
|
return serialize(V1_pureModelContextCompositeModelSchema, pureModelContext);
|
|
228
248
|
} else if (pureModelContext instanceof V1_PureModelContextText) {
|
|
229
249
|
return serialize(V1_pureModelContextTextSchema, pureModelContext);
|
|
250
|
+
} else if (pureModelContext instanceof V1_PureModelContextCombination) {
|
|
251
|
+
return serialize(
|
|
252
|
+
V1_pureModelContextCombinationModelSchema,
|
|
253
|
+
pureModelContext,
|
|
254
|
+
);
|
|
230
255
|
}
|
|
231
256
|
throw new UnsupportedOperationError(
|
|
232
257
|
`Can't serialize Pure model context`,
|
|
@@ -246,6 +271,8 @@ export const V1_deserializePureModelContext = (
|
|
|
246
271
|
return deserialize(V1_pureModelContextCompositeModelSchema, json);
|
|
247
272
|
case V1_PureModelContextType.TEXT:
|
|
248
273
|
return deserialize(V1_pureModelContextTextSchema, json);
|
|
274
|
+
case V1_PureModelContextType.COMBINATION:
|
|
275
|
+
return deserialize(V1_pureModelContextCombinationModelSchema, json);
|
|
249
276
|
default:
|
|
250
277
|
throw new UnsupportedOperationError(
|
|
251
278
|
`Can't deserialize Pure model context`,
|
|
@@ -189,10 +189,6 @@ export const V1_ModelAccessPointGroupModelSchema = createModelSchema(
|
|
|
189
189
|
V1_serializeAccessPoint,
|
|
190
190
|
V1_deserializeAccessPoint,
|
|
191
191
|
),
|
|
192
|
-
compatibleRuntimes: customListWithSchema(
|
|
193
|
-
V1_DataProductRuntimeInfoModelSchema,
|
|
194
|
-
),
|
|
195
|
-
defaultRuntime: primitive(),
|
|
196
192
|
description: optional(primitive()),
|
|
197
193
|
diagrams: customListWithSchema(V1_dataProductDiagramModelSchema),
|
|
198
194
|
featuredElements: customListWithSchema(V1_ElementScopeModelSchema),
|
package/src/index.ts
CHANGED
|
@@ -609,6 +609,7 @@ export { V1_PureModelContextData } from './graph-manager/protocol/pure/v1/model/
|
|
|
609
609
|
export { V1_PureModelContext } from './graph-manager/protocol/pure/v1/model/context/V1_PureModelContext.js';
|
|
610
610
|
export { V1_PureModelContextText } from './graph-manager/protocol/pure/v1/model/context/V1_PureModelContextText.js';
|
|
611
611
|
export { V1_PureModelContextComposite } from './graph-manager/protocol/pure/v1/model/context/V1_PureModelContextComposite.js';
|
|
612
|
+
export { V1_PureModelContextCombination } from './graph-manager/protocol/pure/v1/model/context/V1_PureModelContextCombination.js';
|
|
612
613
|
export {
|
|
613
614
|
V1_SDLC,
|
|
614
615
|
V1_LegendSDLC,
|
|
@@ -775,6 +776,7 @@ export {
|
|
|
775
776
|
Expertise,
|
|
776
777
|
ExternalDataProductType,
|
|
777
778
|
type DataProductElement,
|
|
779
|
+
DataProductOperationalMetadata,
|
|
778
780
|
} from './graph/metamodel/pure/dataProduct/DataProduct.js';
|
|
779
781
|
export * from './graph-manager/action/changeDetection/DataProductObserveHelper.js';
|
|
780
782
|
|
|
@@ -800,6 +802,7 @@ export {
|
|
|
800
802
|
export {
|
|
801
803
|
V1_EmbeddedData,
|
|
802
804
|
V1_RelationElement,
|
|
805
|
+
V1_RelationRowTestData,
|
|
803
806
|
V1_DataElementReference,
|
|
804
807
|
V1_ExternalFormatData,
|
|
805
808
|
type V1_EmbeddedDataVisitor,
|
package/tsconfig.json
CHANGED
|
@@ -526,6 +526,7 @@
|
|
|
526
526
|
"./src/graph-manager/protocol/pure/v1/model/V1_Protocol.ts",
|
|
527
527
|
"./src/graph-manager/protocol/pure/v1/model/V1_SourceInformation.ts",
|
|
528
528
|
"./src/graph-manager/protocol/pure/v1/model/context/V1_PureModelContext.ts",
|
|
529
|
+
"./src/graph-manager/protocol/pure/v1/model/context/V1_PureModelContextCombination.ts",
|
|
529
530
|
"./src/graph-manager/protocol/pure/v1/model/context/V1_PureModelContextComposite.ts",
|
|
530
531
|
"./src/graph-manager/protocol/pure/v1/model/context/V1_PureModelContextData.ts",
|
|
531
532
|
"./src/graph-manager/protocol/pure/v1/model/context/V1_PureModelContextPointer.ts",
|