@finos/legend-graph 0.0.6 → 0.1.3
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 +24 -0
- package/lib/DSLMapping_Exports.d.ts +4 -1
- package/lib/DSLMapping_Exports.d.ts.map +1 -1
- package/lib/DSLMapping_Exports.js +2 -1
- package/lib/DSLMapping_Exports.js.map +1 -1
- package/lib/MetaModelConst.d.ts +1 -0
- package/lib/MetaModelConst.d.ts.map +1 -1
- package/lib/MetaModelConst.js +1 -0
- package/lib/MetaModelConst.js.map +1 -1
- package/lib/graphManager/AbstractPureGraphManager.d.ts +1 -1
- package/lib/graphManager/AbstractPureGraphManager.d.ts.map +1 -1
- package/lib/graphManager/AbstractPureGraphManager.js.map +1 -1
- package/lib/helpers/MappingHelper.d.ts +4 -0
- package/lib/helpers/MappingHelper.d.ts.map +1 -1
- package/lib/helpers/MappingHelper.js +15 -3
- package/lib/helpers/MappingHelper.js.map +1 -1
- package/lib/helpers/MappingResolutionHelper.d.ts +7 -1
- package/lib/helpers/MappingResolutionHelper.d.ts.map +1 -1
- package/lib/helpers/MappingResolutionHelper.js +11 -5
- package/lib/helpers/MappingResolutionHelper.js.map +1 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/connection/Connection.d.ts +1 -0
- package/lib/models/metamodels/pure/packageableElements/connection/Connection.d.ts.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/connection/Connection.js.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/domain/Multiplicity.d.ts +2 -0
- package/lib/models/metamodels/pure/packageableElements/domain/Multiplicity.d.ts.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/domain/Multiplicity.js +9 -1
- package/lib/models/metamodels/pure/packageableElements/domain/Multiplicity.js.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/mapping/Mapping.d.ts +2 -2
- package/lib/models/metamodels/pure/packageableElements/mapping/Mapping.d.ts.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/mapping/Mapping.js +4 -6
- package/lib/models/metamodels/pure/packageableElements/mapping/Mapping.js.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/mapping/PropertyMappingsImplementation.d.ts +1 -0
- package/lib/models/metamodels/pure/packageableElements/mapping/PropertyMappingsImplementation.d.ts.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/store/relational/connection/DatasourceSpecification.d.ts +10 -0
- package/lib/models/metamodels/pure/packageableElements/store/relational/connection/DatasourceSpecification.d.ts.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/store/relational/connection/DatasourceSpecification.js +35 -0
- package/lib/models/metamodels/pure/packageableElements/store/relational/connection/DatasourceSpecification.js.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/store/relational/mapping/InlineEmbeddedRelationalInstanceSetImplementation.d.ts +1 -0
- package/lib/models/metamodels/pure/packageableElements/store/relational/mapping/InlineEmbeddedRelationalInstanceSetImplementation.d.ts.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/store/relational/mapping/InlineEmbeddedRelationalInstanceSetImplementation.js +9 -1
- package/lib/models/metamodels/pure/packageableElements/store/relational/mapping/InlineEmbeddedRelationalInstanceSetImplementation.js.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/store/relational/mapping/RootRelationalInstanceSetImplementation.d.ts +2 -1
- package/lib/models/metamodels/pure/packageableElements/store/relational/mapping/RootRelationalInstanceSetImplementation.d.ts.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/store/relational/mapping/RootRelationalInstanceSetImplementation.js +4 -1
- package/lib/models/metamodels/pure/packageableElements/store/relational/mapping/RootRelationalInstanceSetImplementation.js.map +1 -1
- package/lib/models/metamodels/pure/valueSpecification/ValueSpecification.d.ts +1 -0
- package/lib/models/metamodels/pure/valueSpecification/ValueSpecification.d.ts.map +1 -1
- package/lib/models/metamodels/pure/valueSpecification/ValueSpecification.js +8 -0
- package/lib/models/metamodels/pure/valueSpecification/ValueSpecification.js.map +1 -1
- package/lib/models/metamodels/pure/valueSpecification/VariableExpression.d.ts +3 -1
- package/lib/models/metamodels/pure/valueSpecification/VariableExpression.d.ts.map +1 -1
- package/lib/models/metamodels/pure/valueSpecification/VariableExpression.js +11 -1
- package/lib/models/metamodels/pure/valueSpecification/VariableExpression.js.map +1 -1
- package/lib/models/protocols/pure/DSLMapping_PureProtocolProcessorPlugin_Extension.d.ts +34 -0
- package/lib/models/protocols/pure/DSLMapping_PureProtocolProcessorPlugin_Extension.d.ts.map +1 -0
- package/lib/models/protocols/pure/DSLMapping_PureProtocolProcessorPlugin_Extension.js +19 -0
- package/lib/models/protocols/pure/DSLMapping_PureProtocolProcessorPlugin_Extension.js.map +1 -0
- package/lib/models/protocols/pure/v1/V1_PureGraphManager.d.ts +1 -1
- package/lib/models/protocols/pure/v1/V1_PureGraphManager.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/V1_PureGraphManager.js +12 -17
- package/lib/models/protocols/pure/v1/V1_PureGraphManager.js.map +1 -1
- package/lib/models/protocols/pure/v1/engine/V1_Engine.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/engine/V1_Engine.js +2 -1
- package/lib/models/protocols/pure/v1/engine/V1_Engine.js.map +1 -1
- package/lib/models/protocols/pure/v1/engine/V1_EngineHelper.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/engine/V1_EngineHelper.js +30 -30
- package/lib/models/protocols/pure/v1/engine/V1_EngineHelper.js.map +1 -1
- package/lib/models/protocols/pure/v1/engine/V1_ExecutionHelper.js +4 -4
- package/lib/models/protocols/pure/v1/engine/V1_ExecutionHelper.js.map +1 -1
- package/lib/models/protocols/pure/v1/engine/generation/V1_DatabaseBuilderInput.d.ts +2 -1
- package/lib/models/protocols/pure/v1/engine/generation/V1_DatabaseBuilderInput.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/engine/generation/V1_DatabaseBuilderInput.js +6 -4
- package/lib/models/protocols/pure/v1/engine/generation/V1_DatabaseBuilderInput.js.map +1 -1
- package/lib/models/protocols/pure/v1/model/context/V1_AlloySdlc.d.ts +3 -2
- package/lib/models/protocols/pure/v1/model/context/V1_AlloySdlc.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/model/context/V1_AlloySdlc.js +5 -3
- package/lib/models/protocols/pure/v1/model/context/V1_AlloySdlc.js.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/V1_PackageableElement.d.ts +3 -2
- package/lib/models/protocols/pure/v1/model/packageableElements/V1_PackageableElement.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/V1_PackageableElement.js +1 -0
- package/lib/models/protocols/pure/v1/model/packageableElements/V1_PackageableElement.js.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/connection/V1_Connection.d.ts +1 -0
- package/lib/models/protocols/pure/v1/model/packageableElements/connection/V1_Connection.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/connection/V1_Connection.js.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/mapping/V1_ClassMapping.d.ts +1 -0
- package/lib/models/protocols/pure/v1/model/packageableElements/mapping/V1_ClassMapping.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/mapping/V1_ClassMapping.js +1 -0
- package/lib/models/protocols/pure/v1/model/packageableElements/mapping/V1_ClassMapping.js.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/store/relational/connection/V1_DatasourceSpecification.d.ts +5 -0
- package/lib/models/protocols/pure/v1/model/packageableElements/store/relational/connection/V1_DatasourceSpecification.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/store/relational/connection/V1_DatasourceSpecification.js +10 -0
- package/lib/models/protocols/pure/v1/model/packageableElements/store/relational/connection/V1_DatasourceSpecification.js.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/store/relational/mapping/V1_InlineEmbeddedPropertyMapping.d.ts +1 -0
- package/lib/models/protocols/pure/v1/model/packageableElements/store/relational/mapping/V1_InlineEmbeddedPropertyMapping.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/store/relational/mapping/V1_InlineEmbeddedPropertyMapping.js +9 -0
- package/lib/models/protocols/pure/v1/model/packageableElements/store/relational/mapping/V1_InlineEmbeddedPropertyMapping.js.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/store/relational/mapping/V1_RootRelationalClassMapping.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/store/relational/mapping/V1_RootRelationalClassMapping.js +1 -0
- package/lib/models/protocols/pure/v1/model/packageableElements/store/relational/mapping/V1_RootRelationalClassMapping.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/from/V1_ConnectionTransformer.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/from/V1_ConnectionTransformer.js +15 -0
- package/lib/models/protocols/pure/v1/transformation/pureGraph/from/V1_ConnectionTransformer.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/from/V1_MappingTransformer.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/from/V1_MappingTransformer.js +6 -5
- package/lib/models/protocols/pure/v1/transformation/pureGraph/from/V1_MappingTransformer.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/from/V1_ValueSpecificationTransformer.d.ts +6 -33
- package/lib/models/protocols/pure/v1/transformation/pureGraph/from/V1_ValueSpecificationTransformer.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/from/V1_ValueSpecificationTransformer.js +22 -5
- package/lib/models/protocols/pure/v1/transformation/pureGraph/from/V1_ValueSpecificationTransformer.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ElementBuilder.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ElementBuilder.js +2 -2
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ElementBuilder.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ExecutionPlanBuilder.js +5 -5
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ExecutionPlanBuilder.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_GraphBuilderContext.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_GraphBuilderContext.js +17 -17
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_GraphBuilderContext.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelClassMappingFirstPassBuilder.js +11 -11
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelClassMappingFirstPassBuilder.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelClassMappingSecondPassBuilder.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelClassMappingSecondPassBuilder.js +22 -17
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelClassMappingSecondPassBuilder.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelConnectionBuilder.d.ts +2 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelConnectionBuilder.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelConnectionBuilder.js +25 -14
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelConnectionBuilder.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelGraphFirstPassBuilder.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelGraphFirstPassBuilder.js +28 -28
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelGraphFirstPassBuilder.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelGraphSecondPassBuilder.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelGraphSecondPassBuilder.js +8 -8
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelGraphSecondPassBuilder.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelPropertyMappingBuilder.js +28 -28
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelPropertyMappingBuilder.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_DatabaseBuilderHelper.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_DatabaseBuilderHelper.js +14 -14
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_DatabaseBuilderHelper.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_DomainBuilderHelper.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_DomainBuilderHelper.js +15 -15
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_DomainBuilderHelper.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_FlatDataStoreBuilderHelper.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_FlatDataStoreBuilderHelper.js +7 -7
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_FlatDataStoreBuilderHelper.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_GenerationSpecificationBuilderHelper.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_GenerationSpecificationBuilderHelper.js +3 -3
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_GenerationSpecificationBuilderHelper.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_MappingBuilderHelper.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_MappingBuilderHelper.js +18 -15
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_MappingBuilderHelper.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_RelationalClassMappingBuilderHelper.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_RelationalClassMappingBuilderHelper.js +4 -2
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_RelationalClassMappingBuilderHelper.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_RelationalConnectionBuilderHelper.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_RelationalConnectionBuilderHelper.js +24 -19
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_RelationalConnectionBuilderHelper.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_RuntimeBuilderHelper.js +3 -3
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_RuntimeBuilderHelper.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_ServiceBuilderHelper.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_ServiceBuilderHelper.js +15 -15
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_ServiceBuilderHelper.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/V1_PackageableElementSerialization.d.ts +1 -0
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/V1_PackageableElementSerialization.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/V1_PackageableElementSerialization.js +4 -2
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/V1_PackageableElementSerialization.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/V1_PureProtocolSerialization.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/V1_PureProtocolSerialization.js +4 -3
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/V1_PureProtocolSerialization.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_ConnectionSerializationHelper.d.ts +9 -8
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_ConnectionSerializationHelper.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_ConnectionSerializationHelper.js +25 -5
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_ConnectionSerializationHelper.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_CoreSerializationHelper.d.ts +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_CoreSerializationHelper.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_CoreSerializationHelper.js +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_CoreSerializationHelper.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_GenerationSpecificationSerializationHelper.js +2 -2
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_GenerationSpecificationSerializationHelper.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_MappingSerializationHelper.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_MappingSerializationHelper.js +7 -6
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_MappingSerializationHelper.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_RuntimeSerializationHelper.d.ts +4 -5
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_RuntimeSerializationHelper.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_RuntimeSerializationHelper.js +26 -22
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_RuntimeSerializationHelper.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_ServiceSerializationHelper.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_ServiceSerializationHelper.js +5 -5
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_ServiceSerializationHelper.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_ValueSpecificationSerializer.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_ValueSpecificationSerializer.js +3 -2
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_ValueSpecificationSerializer.js.map +1 -1
- package/package.json +5 -5
- package/src/DSLMapping_Exports.ts +4 -1
- package/src/MetaModelConst.ts +1 -0
- package/src/graphManager/AbstractPureGraphManager.ts +2 -1
- package/src/helpers/MappingHelper.ts +43 -3
- package/src/helpers/MappingResolutionHelper.ts +14 -5
- package/src/index.ts +5 -0
- package/src/models/metamodels/pure/packageableElements/connection/Connection.ts +1 -0
- package/src/models/metamodels/pure/packageableElements/domain/Multiplicity.ts +11 -1
- package/src/models/metamodels/pure/packageableElements/mapping/Mapping.ts +4 -6
- package/src/models/metamodels/pure/packageableElements/mapping/PropertyMappingsImplementation.ts +1 -0
- package/src/models/metamodels/pure/packageableElements/store/relational/connection/DatasourceSpecification.ts +40 -0
- package/src/models/metamodels/pure/packageableElements/store/relational/mapping/InlineEmbeddedRelationalInstanceSetImplementation.ts +10 -1
- package/src/models/metamodels/pure/packageableElements/store/relational/mapping/RootRelationalInstanceSetImplementation.ts +5 -2
- package/src/models/metamodels/pure/valueSpecification/ValueSpecification.ts +9 -0
- package/src/models/metamodels/pure/valueSpecification/VariableExpression.ts +17 -1
- package/src/models/protocols/pure/DSLMapping_PureProtocolProcessorPlugin_Extension.ts +53 -0
- package/src/models/protocols/pure/v1/V1_PureGraphManager.ts +22 -24
- package/src/models/protocols/pure/v1/engine/V1_Engine.ts +2 -1
- package/src/models/protocols/pure/v1/engine/V1_EngineHelper.ts +55 -34
- package/src/models/protocols/pure/v1/engine/V1_ExecutionHelper.ts +4 -4
- package/src/models/protocols/pure/v1/engine/generation/V1_DatabaseBuilderInput.ts +14 -11
- package/src/models/protocols/pure/v1/model/context/V1_AlloySdlc.ts +9 -3
- package/src/models/protocols/pure/v1/model/packageableElements/V1_PackageableElement.ts +3 -2
- package/src/models/protocols/pure/v1/model/packageableElements/connection/V1_Connection.ts +1 -0
- package/src/models/protocols/pure/v1/model/packageableElements/mapping/V1_ClassMapping.ts +1 -0
- package/src/models/protocols/pure/v1/model/packageableElements/store/relational/connection/V1_DatasourceSpecification.ts +10 -0
- package/src/models/protocols/pure/v1/model/packageableElements/store/relational/mapping/V1_InlineEmbeddedPropertyMapping.ts +10 -0
- package/src/models/protocols/pure/v1/model/packageableElements/store/relational/mapping/V1_RootRelationalClassMapping.ts +1 -0
- package/src/models/protocols/pure/v1/transformation/pureGraph/from/V1_ConnectionTransformer.ts +25 -0
- package/src/models/protocols/pure/v1/transformation/pureGraph/from/V1_MappingTransformer.ts +8 -7
- package/src/models/protocols/pure/v1/transformation/pureGraph/from/V1_ValueSpecificationTransformer.ts +34 -10
- package/src/models/protocols/pure/v1/transformation/pureGraph/to/V1_ElementBuilder.ts +8 -2
- package/src/models/protocols/pure/v1/transformation/pureGraph/to/V1_ExecutionPlanBuilder.ts +5 -5
- package/src/models/protocols/pure/v1/transformation/pureGraph/to/V1_GraphBuilderContext.ts +41 -17
- package/src/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelClassMappingFirstPassBuilder.ts +11 -11
- package/src/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelClassMappingSecondPassBuilder.ts +26 -17
- package/src/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelConnectionBuilder.ts +48 -14
- package/src/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelGraphFirstPassBuilder.ts +112 -28
- package/src/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelGraphSecondPassBuilder.ts +20 -8
- package/src/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelPropertyMappingBuilder.ts +28 -28
- package/src/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_DatabaseBuilderHelper.ts +44 -14
- package/src/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_DomainBuilderHelper.ts +42 -15
- package/src/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_FlatDataStoreBuilderHelper.ts +19 -7
- package/src/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_GenerationSpecificationBuilderHelper.ts +6 -3
- package/src/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_MappingBuilderHelper.ts +23 -15
- package/src/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_RelationalClassMappingBuilderHelper.ts +4 -2
- package/src/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_RelationalConnectionBuilderHelper.ts +24 -19
- package/src/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_RuntimeBuilderHelper.ts +3 -3
- package/src/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_ServiceBuilderHelper.ts +18 -15
- package/src/models/protocols/pure/v1/transformation/pureProtocol/V1_PackageableElementSerialization.ts +7 -2
- package/src/models/protocols/pure/v1/transformation/pureProtocol/V1_PureProtocolSerialization.ts +4 -3
- package/src/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_ConnectionSerializationHelper.ts +42 -8
- package/src/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_CoreSerializationHelper.ts +5 -3
- package/src/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_GenerationSpecificationSerializationHelper.ts +2 -2
- package/src/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_MappingSerializationHelper.ts +6 -5
- package/src/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_RuntimeSerializationHelper.ts +42 -38
- package/src/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_ServiceSerializationHelper.ts +4 -6
- package/src/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_ValueSpecificationSerializer.ts +3 -5
- package/tsconfig.json +1 -0
- package/tsconfig.package.json +40 -0
package/src/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_DomainBuilderHelper.ts
CHANGED
|
@@ -49,7 +49,7 @@ export const V1_buildTaggedValue = (
|
|
|
49
49
|
taggedValue: V1_TaggedValue,
|
|
50
50
|
context: V1_GraphBuilderContext,
|
|
51
51
|
): TaggedValue | undefined => {
|
|
52
|
-
assertNonNullable(taggedValue.tag,
|
|
52
|
+
assertNonNullable(taggedValue.tag, `Tagged value 'tag' field is missing`);
|
|
53
53
|
return new TaggedValue(
|
|
54
54
|
context.resolveTag(taggedValue.tag),
|
|
55
55
|
taggedValue.value,
|
|
@@ -61,10 +61,13 @@ export const V1_buildConstraint = (
|
|
|
61
61
|
_class: Class,
|
|
62
62
|
context: V1_GraphBuilderContext,
|
|
63
63
|
): Constraint => {
|
|
64
|
-
assertNonEmptyString(
|
|
64
|
+
assertNonEmptyString(
|
|
65
|
+
constraint.name,
|
|
66
|
+
`Class constraint 'name' field is missing or empty`,
|
|
67
|
+
);
|
|
65
68
|
assertNonNullable(
|
|
66
69
|
constraint.functionDefinition,
|
|
67
|
-
|
|
70
|
+
`Class constraint 'functionDefinition' field is missing`,
|
|
68
71
|
);
|
|
69
72
|
const pureConstraint = new Constraint(
|
|
70
73
|
constraint.name,
|
|
@@ -91,9 +94,18 @@ export const V1_buildVariable = (
|
|
|
91
94
|
variable: V1_RawVariable,
|
|
92
95
|
context: V1_GraphBuilderContext,
|
|
93
96
|
): RawVariableExpression => {
|
|
94
|
-
assertNonEmptyString(
|
|
95
|
-
|
|
96
|
-
|
|
97
|
+
assertNonEmptyString(
|
|
98
|
+
variable.name,
|
|
99
|
+
`Variable 'name' field is missing or empty`,
|
|
100
|
+
);
|
|
101
|
+
assertNonEmptyString(
|
|
102
|
+
variable.class,
|
|
103
|
+
`Variable 'class' field is missing or empty`,
|
|
104
|
+
);
|
|
105
|
+
assertNonNullable(
|
|
106
|
+
variable.multiplicity,
|
|
107
|
+
`Variable 'multiplicity' field is missing`,
|
|
108
|
+
);
|
|
97
109
|
const multiplicity = context.graph.getMultiplicity(
|
|
98
110
|
variable.multiplicity.lowerBound,
|
|
99
111
|
variable.multiplicity.upperBound,
|
|
@@ -108,8 +120,11 @@ export const V1_buildUnit = (
|
|
|
108
120
|
currentGraph: BasicModel,
|
|
109
121
|
context: V1_GraphBuilderContext,
|
|
110
122
|
): Unit => {
|
|
111
|
-
assertNonEmptyString(
|
|
112
|
-
|
|
123
|
+
assertNonEmptyString(
|
|
124
|
+
unit.package,
|
|
125
|
+
`Unit 'package' field is missing or empty`,
|
|
126
|
+
);
|
|
127
|
+
assertNonEmptyString(unit.name, `Unit 'name' field is missing or empty`);
|
|
113
128
|
// TODO process unit conversion function, when we start processing value specification, we might want to separate this
|
|
114
129
|
const pureUnit = new Unit(
|
|
115
130
|
unit.name,
|
|
@@ -137,9 +152,18 @@ export const V1_buildProperty = (
|
|
|
137
152
|
context: V1_GraphBuilderContext,
|
|
138
153
|
owner: PropertyOwner,
|
|
139
154
|
): Property => {
|
|
140
|
-
assertNonEmptyString(
|
|
141
|
-
|
|
142
|
-
|
|
155
|
+
assertNonEmptyString(
|
|
156
|
+
property.name,
|
|
157
|
+
`Property 'name' field is missing or empty`,
|
|
158
|
+
);
|
|
159
|
+
assertNonEmptyString(
|
|
160
|
+
property.type,
|
|
161
|
+
`Property 'type' field is missing or empty`,
|
|
162
|
+
);
|
|
163
|
+
assertNonNullable(
|
|
164
|
+
property.multiplicity,
|
|
165
|
+
`Property 'multiplicity' field is missing or empty`,
|
|
166
|
+
);
|
|
143
167
|
// NOTE: pass in parent class added for quick conversion to pure protocol down the line
|
|
144
168
|
const pureProperty = new Property(
|
|
145
169
|
property.name,
|
|
@@ -164,14 +188,17 @@ export const V1_buildDerivedProperty = (
|
|
|
164
188
|
context: V1_GraphBuilderContext,
|
|
165
189
|
owner: PropertyOwner,
|
|
166
190
|
): DerivedProperty => {
|
|
167
|
-
assertNonEmptyString(
|
|
191
|
+
assertNonEmptyString(
|
|
192
|
+
property.name,
|
|
193
|
+
`Derived property 'name' field is missing or empty`,
|
|
194
|
+
);
|
|
168
195
|
assertNonEmptyString(
|
|
169
196
|
property.returnType,
|
|
170
|
-
|
|
197
|
+
`Derived property 'returnType' field is missing or empty`,
|
|
171
198
|
);
|
|
172
199
|
assertNonNullable(
|
|
173
200
|
property.returnMultiplicity,
|
|
174
|
-
|
|
201
|
+
`Derived property 'returnMultiplicity' field is missing`,
|
|
175
202
|
);
|
|
176
203
|
const derivedProperty = new DerivedProperty(
|
|
177
204
|
property.name,
|
|
@@ -206,7 +233,7 @@ export const V1_buildAssociationProperty = (
|
|
|
206
233
|
): Property => {
|
|
207
234
|
const associatedPropertyClassType = guaranteeNonNullable(
|
|
208
235
|
associatedProperty.type,
|
|
209
|
-
|
|
236
|
+
`Association associated property 'type' field is missing`,
|
|
210
237
|
);
|
|
211
238
|
const associatedClass = context.resolveClass(associatedPropertyClassType);
|
|
212
239
|
const property = V1_buildProperty(currentProperty, context, pureAssociation);
|
|
@@ -74,15 +74,15 @@ const buildFlatDataDataType = (
|
|
|
74
74
|
): FlatDataRecordField => {
|
|
75
75
|
assertNonEmptyString(
|
|
76
76
|
field.label,
|
|
77
|
-
|
|
77
|
+
`Flat-data record field 'label' field is missing or empty`,
|
|
78
78
|
);
|
|
79
79
|
assertNonNullable(
|
|
80
80
|
field.flatDataDataType,
|
|
81
|
-
|
|
81
|
+
`Flat-data record field 'flatDataDataType' field is missing`,
|
|
82
82
|
);
|
|
83
83
|
assertNonNullable(
|
|
84
84
|
field.optional,
|
|
85
|
-
|
|
85
|
+
`Flat-data record field 'optional' field is missing`,
|
|
86
86
|
);
|
|
87
87
|
const recordField = new FlatDataRecordField(
|
|
88
88
|
field.label,
|
|
@@ -162,8 +162,14 @@ const buildFlatDataRecordType = (
|
|
|
162
162
|
const buildFlatDataProperty = (
|
|
163
163
|
property: V1_FlatDataProperty,
|
|
164
164
|
): FlatDataProperty => {
|
|
165
|
-
assertNonEmptyString(
|
|
166
|
-
|
|
165
|
+
assertNonEmptyString(
|
|
166
|
+
property.name,
|
|
167
|
+
`Flat-data property 'name' field is missing or empty`,
|
|
168
|
+
);
|
|
169
|
+
assertNonNullable(
|
|
170
|
+
property.value,
|
|
171
|
+
`Flat-data property 'value' field is missing`,
|
|
172
|
+
);
|
|
167
173
|
assertTrue(
|
|
168
174
|
isString(property.value) ||
|
|
169
175
|
isNumber(property.value) ||
|
|
@@ -178,8 +184,14 @@ export const V1_buildFlatDataSection = (
|
|
|
178
184
|
parentFlatData: FlatData,
|
|
179
185
|
context: V1_GraphBuilderContext,
|
|
180
186
|
): FlatDataSection => {
|
|
181
|
-
assertNonEmptyString(
|
|
182
|
-
|
|
187
|
+
assertNonEmptyString(
|
|
188
|
+
section.name,
|
|
189
|
+
`Flat-data section 'name' field is missing or empty`,
|
|
190
|
+
);
|
|
191
|
+
assertNonEmptyString(
|
|
192
|
+
section.driverId,
|
|
193
|
+
`Flat-data section 'driverId' field is missing`,
|
|
194
|
+
);
|
|
183
195
|
const flatDataSection = new FlatDataSection(
|
|
184
196
|
section.driverId,
|
|
185
197
|
section.name,
|
|
@@ -28,9 +28,12 @@ export const V1_buildGenerationTreeNode = (
|
|
|
28
28
|
): GenerationTreeNode => {
|
|
29
29
|
assertNonEmptyString(
|
|
30
30
|
generationNode.generationElement,
|
|
31
|
-
|
|
31
|
+
`Generation tree node 'generationElement' field is missing or empty`,
|
|
32
|
+
);
|
|
33
|
+
assertNonEmptyString(
|
|
34
|
+
generationNode.id,
|
|
35
|
+
`Generation tree node 'id' field is missing or empty`,
|
|
32
36
|
);
|
|
33
|
-
assertNonEmptyString(generationNode.id, 'Generation tree node ID is missing');
|
|
34
37
|
const genNode = new GenerationTreeNode(
|
|
35
38
|
context.resolveElement(generationNode.generationElement, false),
|
|
36
39
|
);
|
|
@@ -44,7 +47,7 @@ export const V1_buildFileGenerationPointer = (
|
|
|
44
47
|
): PackageableElementReference<FileGenerationSpecification> => {
|
|
45
48
|
assertNonEmptyString(
|
|
46
49
|
fileGeneration.path,
|
|
47
|
-
|
|
50
|
+
`File generation pointer 'path' field is missing or empty`,
|
|
48
51
|
);
|
|
49
52
|
return context.resolveFileGeneration(fileGeneration.path);
|
|
50
53
|
};
|
package/src/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_MappingBuilderHelper.ts
CHANGED
|
@@ -66,6 +66,7 @@ import {
|
|
|
66
66
|
getRelationalInputType,
|
|
67
67
|
RelationalInputData,
|
|
68
68
|
} from '../../../../../../../metamodels/pure/packageableElements/store/relational/mapping/RelationalInputData';
|
|
69
|
+
import { getAllClassMappings } from '../../../../../../../../helpers/MappingHelper';
|
|
69
70
|
|
|
70
71
|
export const V1_getInferredClassMappingId = (
|
|
71
72
|
_class: Class,
|
|
@@ -84,7 +85,7 @@ const buildEnumValueMapping = (
|
|
|
84
85
|
): EnumValueMapping => {
|
|
85
86
|
assertNonNullable(
|
|
86
87
|
srcEnumValueMapping.enumValue,
|
|
87
|
-
`Enum value mapping
|
|
88
|
+
`Enum value mapping 'enumValue' field is missing`,
|
|
88
89
|
);
|
|
89
90
|
const enumValueMapping = new EnumValueMapping(
|
|
90
91
|
EnumValueImplicitReference.create(
|
|
@@ -131,7 +132,7 @@ export const V1_buildEnumerationMapping = (
|
|
|
131
132
|
): EnumerationMapping => {
|
|
132
133
|
assertNonEmptyString(
|
|
133
134
|
srcEnumerationMapping.enumeration,
|
|
134
|
-
|
|
135
|
+
`Enumeration mapping 'enumeration' field is missing or empty`,
|
|
135
136
|
);
|
|
136
137
|
const targetEnumeration = context.resolveEnumeration(
|
|
137
138
|
srcEnumerationMapping.enumeration,
|
|
@@ -143,7 +144,7 @@ export const V1_buildEnumerationMapping = (
|
|
|
143
144
|
);
|
|
144
145
|
assertTrue(
|
|
145
146
|
possibleSourceTypes.size <= 1,
|
|
146
|
-
|
|
147
|
+
`Enumeration mapping contains mixed type source values`,
|
|
147
148
|
);
|
|
148
149
|
const sourceTypeInput =
|
|
149
150
|
possibleSourceTypes.size !== 0
|
|
@@ -202,15 +203,15 @@ const V1_buildMappingTestInputData = (
|
|
|
202
203
|
if (inputData instanceof V1_ObjectInputData) {
|
|
203
204
|
assertNonNullable(
|
|
204
205
|
inputData.sourceClass,
|
|
205
|
-
|
|
206
|
+
`Object input data 'sourceClass' field is missing`,
|
|
206
207
|
);
|
|
207
208
|
assertNonNullable(
|
|
208
209
|
inputData.inputType,
|
|
209
|
-
|
|
210
|
+
`Object input data 'inputType' field is missing`,
|
|
210
211
|
);
|
|
211
212
|
assertNonNullable(
|
|
212
213
|
inputData.data,
|
|
213
|
-
|
|
214
|
+
`Object input data 'data' field is missing`,
|
|
214
215
|
);
|
|
215
216
|
return new ObjectInputData(
|
|
216
217
|
context.resolveClass(inputData.sourceClass),
|
|
@@ -220,11 +221,11 @@ const V1_buildMappingTestInputData = (
|
|
|
220
221
|
} else if (inputData instanceof V1_FlatDataInputData) {
|
|
221
222
|
assertNonNullable(
|
|
222
223
|
inputData.sourceFlatData,
|
|
223
|
-
|
|
224
|
+
`Flat-data input data 'sourceFlatData' field is missing`,
|
|
224
225
|
);
|
|
225
226
|
assertNonNullable(
|
|
226
227
|
inputData.data,
|
|
227
|
-
|
|
228
|
+
`Flat-data input data 'data' field is missing`,
|
|
228
229
|
);
|
|
229
230
|
return new FlatDataInputData(
|
|
230
231
|
context.resolveFlatDataStore(inputData.sourceFlatData.path),
|
|
@@ -233,15 +234,15 @@ const V1_buildMappingTestInputData = (
|
|
|
233
234
|
} else if (inputData instanceof V1_RelationalInputData) {
|
|
234
235
|
assertNonNullable(
|
|
235
236
|
inputData.database,
|
|
236
|
-
|
|
237
|
+
`Relational input data 'database' field is missing`,
|
|
237
238
|
);
|
|
238
239
|
assertNonNullable(
|
|
239
240
|
inputData.inputType,
|
|
240
|
-
|
|
241
|
+
`Relational input data 'inputType' field is missing`,
|
|
241
242
|
);
|
|
242
243
|
assertNonNullable(
|
|
243
244
|
inputData.data,
|
|
244
|
-
|
|
245
|
+
`Relational input data 'data' field is missing`,
|
|
245
246
|
);
|
|
246
247
|
return new RelationalInputData(
|
|
247
248
|
context.resolveDatabase(inputData.database),
|
|
@@ -259,8 +260,11 @@ export const V1_buildMappingTest = (
|
|
|
259
260
|
mappingTest: V1_MappingTest,
|
|
260
261
|
context: V1_GraphBuilderContext,
|
|
261
262
|
): MappingTest => {
|
|
262
|
-
assertNonEmptyString(
|
|
263
|
-
|
|
263
|
+
assertNonEmptyString(
|
|
264
|
+
mappingTest.name,
|
|
265
|
+
`Mapping test 'name' field is missing or empty`,
|
|
266
|
+
);
|
|
267
|
+
assertNonNullable(mappingTest.query, `Mapping test 'query' field is missing`);
|
|
264
268
|
const query = V1_resolvePathsInRawLambda(
|
|
265
269
|
context,
|
|
266
270
|
mappingTest.query.parameters,
|
|
@@ -285,7 +289,7 @@ export const V1_buildMappingTest = (
|
|
|
285
289
|
|
|
286
290
|
export const V1_resolveClassMappingRoot = (mapping: Mapping): void => {
|
|
287
291
|
const classToSetImplMap = new Map<Class, Set<SetImplementation>>();
|
|
288
|
-
mapping.
|
|
292
|
+
getAllClassMappings(mapping).forEach((setImpl) => {
|
|
289
293
|
const targetClass = guaranteeNonNullable(setImpl.class.value);
|
|
290
294
|
const setImplsWithTargetClass = classToSetImplMap.get(targetClass);
|
|
291
295
|
if (setImplsWithTargetClass) {
|
|
@@ -300,7 +304,11 @@ export const V1_resolveClassMappingRoot = (mapping: Mapping): void => {
|
|
|
300
304
|
const _classMappings = entries[1];
|
|
301
305
|
if (_classMappings.size === 1) {
|
|
302
306
|
const classMapping = Array.from(_classMappings.values())[0];
|
|
303
|
-
|
|
307
|
+
// ensure you are only altering current mapping
|
|
308
|
+
if (
|
|
309
|
+
classMapping.root.value === false &&
|
|
310
|
+
classMapping.parent === mapping
|
|
311
|
+
) {
|
|
304
312
|
classMapping.root = InferableMappingElementRootImplicitValue.create(
|
|
305
313
|
true,
|
|
306
314
|
classMapping.root.value,
|
|
@@ -77,7 +77,7 @@ export const V1_buildRelationalPrimaryKey = (
|
|
|
77
77
|
if (rootRelational.groupBy) {
|
|
78
78
|
rootRelational.primaryKey = rootRelational.groupBy.columns;
|
|
79
79
|
} else if (!rootRelational.primaryKey.length) {
|
|
80
|
-
const relation = rootRelational.mainTableAlias
|
|
80
|
+
const relation = rootRelational.mainTableAlias?.relation.value;
|
|
81
81
|
const mainTable = rootRelational.mainTableAlias;
|
|
82
82
|
let columns: Column[] = [];
|
|
83
83
|
if (relation instanceof Table || relation instanceof View) {
|
|
@@ -90,7 +90,9 @@ export const V1_buildRelationalPrimaryKey = (
|
|
|
90
90
|
// This might cause bugs in the future.
|
|
91
91
|
// We need more (manual) tests for confidence
|
|
92
92
|
mainTableAlias.column = ColumnExplicitReference.create(col);
|
|
93
|
-
|
|
93
|
+
if (mainTable) {
|
|
94
|
+
mainTableAlias.alias = mainTable;
|
|
95
|
+
}
|
|
94
96
|
return mainTableAlias;
|
|
95
97
|
});
|
|
96
98
|
}
|
|
@@ -68,15 +68,15 @@ export const V1_buildDatasourceSpecification = (
|
|
|
68
68
|
if (protocol instanceof V1_StaticDatasourceSpecification) {
|
|
69
69
|
assertNonEmptyString(
|
|
70
70
|
protocol.host,
|
|
71
|
-
|
|
71
|
+
`Static datasource specification 'host' field is missing or empty`,
|
|
72
72
|
);
|
|
73
73
|
assertNonEmptyString(
|
|
74
74
|
protocol.databaseName,
|
|
75
|
-
|
|
75
|
+
`Static datasource specification 'databaseName' field is missing or empty`,
|
|
76
76
|
);
|
|
77
77
|
assertNonNullable(
|
|
78
78
|
protocol.port,
|
|
79
|
-
|
|
79
|
+
`Static datasource specification 'port' field is missing`,
|
|
80
80
|
);
|
|
81
81
|
const staticSpec = new StaticDatasourceSpecification(
|
|
82
82
|
protocol.host,
|
|
@@ -87,15 +87,15 @@ export const V1_buildDatasourceSpecification = (
|
|
|
87
87
|
} else if (protocol instanceof V1_EmbeddedH2DatasourceSpecification) {
|
|
88
88
|
assertNonEmptyString(
|
|
89
89
|
protocol.databaseName,
|
|
90
|
-
|
|
90
|
+
`Embedded H2 datasource specification 'databaseName' field is missing or empty`,
|
|
91
91
|
);
|
|
92
92
|
assertNonEmptyString(
|
|
93
93
|
protocol.directory,
|
|
94
|
-
|
|
94
|
+
`Embedded H2 datasource specification 'directory' field is missing or empty`,
|
|
95
95
|
);
|
|
96
96
|
assertNonNullable(
|
|
97
97
|
protocol.autoServerMode,
|
|
98
|
-
|
|
98
|
+
`Embedded H2 datasource specification 'autoServerMode' field is missing or empty`,
|
|
99
99
|
);
|
|
100
100
|
const embeddedSpec = new EmbeddedH2DatasourceSpecification(
|
|
101
101
|
protocol.databaseName,
|
|
@@ -106,19 +106,19 @@ export const V1_buildDatasourceSpecification = (
|
|
|
106
106
|
} else if (protocol instanceof V1_SnowflakeDatasourceSpecification) {
|
|
107
107
|
assertNonEmptyString(
|
|
108
108
|
protocol.accountName,
|
|
109
|
-
|
|
109
|
+
`Snowflake datasource specification 'accountName' field is missing or empty`,
|
|
110
110
|
);
|
|
111
111
|
assertNonEmptyString(
|
|
112
112
|
protocol.region,
|
|
113
|
-
|
|
113
|
+
`Snowflake datasource specification 'region' field is missing or empty`,
|
|
114
114
|
);
|
|
115
115
|
assertNonEmptyString(
|
|
116
116
|
protocol.warehouseName,
|
|
117
|
-
|
|
117
|
+
`Snowflake datasource specification 'warehouseName' field is missing or empty`,
|
|
118
118
|
);
|
|
119
119
|
assertNonNullable(
|
|
120
120
|
protocol.databaseName,
|
|
121
|
-
|
|
121
|
+
`Snowflake datasource specification 'databaseName' field is missing`,
|
|
122
122
|
);
|
|
123
123
|
const snowflakeSpec = new SnowflakeDatasourceSpecification(
|
|
124
124
|
protocol.accountName,
|
|
@@ -129,11 +129,16 @@ export const V1_buildDatasourceSpecification = (
|
|
|
129
129
|
snowflakeSpec.cloudType = protocol.cloudType;
|
|
130
130
|
snowflakeSpec.quotedIdentifiersIgnoreCase =
|
|
131
131
|
protocol.quotedIdentifiersIgnoreCase;
|
|
132
|
+
snowflakeSpec.proxyHost = protocol.proxyHost;
|
|
133
|
+
snowflakeSpec.proxyPort = protocol.proxyPort;
|
|
134
|
+
snowflakeSpec.nonProxyHosts = protocol.nonProxyHosts;
|
|
135
|
+
snowflakeSpec.organization = protocol.organization;
|
|
136
|
+
snowflakeSpec.accountType = protocol.accountType;
|
|
132
137
|
return snowflakeSpec;
|
|
133
138
|
} else if (protocol instanceof V1_BigQueryDatasourceSpecification) {
|
|
134
139
|
assertNonEmptyString(
|
|
135
140
|
protocol.projectId,
|
|
136
|
-
|
|
141
|
+
`BigQuery datasource specification 'projectId' field is missing or empty`,
|
|
137
142
|
);
|
|
138
143
|
const bigQuerySpec = new BigQueryDatasourceSpecification(
|
|
139
144
|
protocol.projectId,
|
|
@@ -148,15 +153,15 @@ export const V1_buildDatasourceSpecification = (
|
|
|
148
153
|
} else if (protocol instanceof V1_RedshiftDatasourceSpecification) {
|
|
149
154
|
assertNonEmptyString(
|
|
150
155
|
protocol.databaseName,
|
|
151
|
-
|
|
156
|
+
`Redshift datasource specification 'databaseName' field is missing or empty`,
|
|
152
157
|
);
|
|
153
158
|
assertNonEmptyString(
|
|
154
159
|
protocol.endpoint,
|
|
155
|
-
|
|
160
|
+
`Redshift datasource specification 'endpoint' field is missing or empty`,
|
|
156
161
|
);
|
|
157
162
|
assertNonNullable(
|
|
158
163
|
protocol.port,
|
|
159
|
-
|
|
164
|
+
`Redshift datasource specification 'port' field is missing or empty`,
|
|
160
165
|
);
|
|
161
166
|
const redshiftSpec = new RedshiftDatasourceSpecification(
|
|
162
167
|
protocol.databaseName,
|
|
@@ -197,15 +202,15 @@ export const V1_buildAuthenticationStrategy = (
|
|
|
197
202
|
} else if (protocol instanceof V1_SnowflakePublicAuthenticationStrategy) {
|
|
198
203
|
assertNonEmptyString(
|
|
199
204
|
protocol.privateKeyVaultReference,
|
|
200
|
-
|
|
205
|
+
`Snowflake public authentication strategy 'privateKeyVaultReference' field is missing or empty`,
|
|
201
206
|
);
|
|
202
207
|
assertNonEmptyString(
|
|
203
208
|
protocol.passPhraseVaultReference,
|
|
204
|
-
|
|
209
|
+
`Snowflake public authentication strategy 'passPhraseVaultReference' field is missing or empty`,
|
|
205
210
|
);
|
|
206
211
|
assertNonEmptyString(
|
|
207
212
|
protocol.publicUserName,
|
|
208
|
-
|
|
213
|
+
`Snowflake public authentication 'publicUserName' field is missing or empty`,
|
|
209
214
|
);
|
|
210
215
|
return new SnowflakePublicAuthenticationStrategy(
|
|
211
216
|
protocol.privateKeyVaultReference,
|
|
@@ -233,11 +238,11 @@ export const V1_buildAuthenticationStrategy = (
|
|
|
233
238
|
} else if (protocol instanceof V1_UserPasswordAuthenticationStrategy) {
|
|
234
239
|
assertNonEmptyString(
|
|
235
240
|
protocol.userName,
|
|
236
|
-
|
|
241
|
+
`User password authentication strategy 'userName' field is missing or empty`,
|
|
237
242
|
);
|
|
238
243
|
assertNonEmptyString(
|
|
239
244
|
protocol.passwordVaultReference,
|
|
240
|
-
|
|
245
|
+
`User password authentication strategy 'passwordVaultReference' field is missing or empty`,
|
|
241
246
|
);
|
|
242
247
|
return new UserPasswordAuthenticationStrategy(
|
|
243
248
|
protocol.userName,
|
package/src/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_RuntimeBuilderHelper.ts
CHANGED
|
@@ -42,12 +42,12 @@ export const V1_buildEngineRuntime = (
|
|
|
42
42
|
protocolStoreConnections.storeConnections.map((identifiedConnection) => {
|
|
43
43
|
assertNonEmptyString(
|
|
44
44
|
identifiedConnection.id,
|
|
45
|
-
|
|
45
|
+
`Runtime connection 'id' field is missing`,
|
|
46
46
|
);
|
|
47
47
|
// make sure runtime connection IDs are unique
|
|
48
48
|
assertTrue(
|
|
49
49
|
!connectionIds.has(identifiedConnection.id),
|
|
50
|
-
|
|
50
|
+
`Runtime connection ID must be unique`,
|
|
51
51
|
);
|
|
52
52
|
connectionIds.add(identifiedConnection.id);
|
|
53
53
|
const connection =
|
|
@@ -57,7 +57,7 @@ export const V1_buildEngineRuntime = (
|
|
|
57
57
|
// make sure connection are indexed by store properly
|
|
58
58
|
assertTrue(
|
|
59
59
|
connection.store.value === store.value,
|
|
60
|
-
|
|
60
|
+
`Runtime connections must be correctly indexed by store`,
|
|
61
61
|
);
|
|
62
62
|
return new IdentifiedConnection(identifiedConnection.id, connection);
|
|
63
63
|
});
|
package/src/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_ServiceBuilderHelper.ts
CHANGED
|
@@ -74,7 +74,7 @@ export const V1_buildServiceTest = (
|
|
|
74
74
|
assertType(
|
|
75
75
|
parentService.execution,
|
|
76
76
|
PureSingleExecution,
|
|
77
|
-
'Service with single
|
|
77
|
+
'Service with single-execution requires a single-execution test',
|
|
78
78
|
);
|
|
79
79
|
const singleTest = new SingleExecutionTest(parentService, serviceTest.data);
|
|
80
80
|
singleTest.asserts = serviceTest.asserts.map((assert) => {
|
|
@@ -94,12 +94,12 @@ export const V1_buildServiceTest = (
|
|
|
94
94
|
assertType(
|
|
95
95
|
parentService.execution,
|
|
96
96
|
PureMultiExecution,
|
|
97
|
-
'Service with multi
|
|
97
|
+
'Service with multi-execution requires a multi-execution test',
|
|
98
98
|
);
|
|
99
99
|
const multiTest = new MultiExecutionTest(parentService);
|
|
100
100
|
if (!serviceTest.tests.length) {
|
|
101
101
|
throw new GraphBuilderError(
|
|
102
|
-
'Service multi
|
|
102
|
+
'Service multi-execution test must not be empty',
|
|
103
103
|
);
|
|
104
104
|
}
|
|
105
105
|
const executionKeys = new Set(
|
|
@@ -111,12 +111,12 @@ export const V1_buildServiceTest = (
|
|
|
111
111
|
multiTest.tests = serviceTest.tests.map((test) => {
|
|
112
112
|
assertNonEmptyString(
|
|
113
113
|
test.key,
|
|
114
|
-
'Service multi
|
|
114
|
+
'Service multi-execution test key is missing',
|
|
115
115
|
);
|
|
116
116
|
// check duplicated key
|
|
117
117
|
if (uniqueKeys.has(test.key)) {
|
|
118
118
|
throw new GraphBuilderError(
|
|
119
|
-
`Service multi
|
|
119
|
+
`Service multi-execution test with key '${test.key}' already exists`,
|
|
120
120
|
);
|
|
121
121
|
}
|
|
122
122
|
uniqueKeys.add(test.key);
|
|
@@ -139,14 +139,14 @@ export const V1_buildServiceTest = (
|
|
|
139
139
|
});
|
|
140
140
|
return keyedTest;
|
|
141
141
|
});
|
|
142
|
-
// verify matching key values between multi
|
|
142
|
+
// verify matching key values between multi-execution and multi-execution test
|
|
143
143
|
// NOTE: since test depends on execution, we want to check first if no test is found for an execution
|
|
144
144
|
const testWithoutExecutionKeys = new Set(
|
|
145
145
|
Array.from(uniqueKeys.values()).filter((key) => !executionKeys.has(key)),
|
|
146
146
|
);
|
|
147
147
|
Array.from(uniqueKeys.values()).forEach((key) => executionKeys.delete(key));
|
|
148
148
|
/**
|
|
149
|
-
* Here, we verify matching key values between multi
|
|
149
|
+
* Here, we verify matching key values between multi-execution and multi test
|
|
150
150
|
* NOTE: since test depends on execution, we definitely want to throw when no execution is found for a test.
|
|
151
151
|
* The other direction is debatable, on one hand it makes sense to have a test for each execution, but very often
|
|
152
152
|
* (and majorly for backward compatibility reasons) we have executions that only differ in connection information
|
|
@@ -191,7 +191,10 @@ const buildServiceExecutionRuntime = (
|
|
|
191
191
|
mapping,
|
|
192
192
|
);
|
|
193
193
|
if (runtime instanceof V1_RuntimePointer) {
|
|
194
|
-
assertNonNullable(
|
|
194
|
+
assertNonNullable(
|
|
195
|
+
runtime.runtime,
|
|
196
|
+
`Runtime pointer 'runtime' field is missing`,
|
|
197
|
+
);
|
|
195
198
|
return new RuntimePointer(context.resolveRuntime(runtime.runtime));
|
|
196
199
|
} else if (runtime instanceof V1_EngineRuntime) {
|
|
197
200
|
runtime.mappings = runtime.mappings.length
|
|
@@ -208,7 +211,7 @@ const buildServiceExecutionRuntime = (
|
|
|
208
211
|
runtime.connections.forEach((connection) => {
|
|
209
212
|
assertNonNullable(
|
|
210
213
|
connection.store,
|
|
211
|
-
|
|
214
|
+
`Legacy runtime embedded connection 'store' field is missing`,
|
|
212
215
|
);
|
|
213
216
|
const identifiedConnection = new V1_IdentifiedConnection();
|
|
214
217
|
identifiedConnection.id = `connection_${idx} `;
|
|
@@ -240,7 +243,7 @@ export const V1_buildServiceExecution = (
|
|
|
240
243
|
if (serviceExecution instanceof V1_PureSingleExecution) {
|
|
241
244
|
assertNonNullable(
|
|
242
245
|
serviceExecution.func,
|
|
243
|
-
|
|
246
|
+
`Service Pure execution 'func' field is missing`,
|
|
244
247
|
);
|
|
245
248
|
return new PureSingleExecution(
|
|
246
249
|
V1_resolvePathsInRawLambda(
|
|
@@ -258,15 +261,15 @@ export const V1_buildServiceExecution = (
|
|
|
258
261
|
);
|
|
259
262
|
} else if (serviceExecution instanceof V1_PureMultiExecution) {
|
|
260
263
|
if (!serviceExecution.executionParameters.length) {
|
|
261
|
-
throw new GraphBuilderError('Service multi
|
|
264
|
+
throw new GraphBuilderError('Service multi-execution must not be empty');
|
|
262
265
|
}
|
|
263
266
|
assertNonNullable(
|
|
264
267
|
serviceExecution.func,
|
|
265
|
-
|
|
268
|
+
`Service Pure execution 'func' field is missing`,
|
|
266
269
|
);
|
|
267
270
|
assertNonEmptyString(
|
|
268
271
|
serviceExecution.executionKey,
|
|
269
|
-
|
|
272
|
+
`Service multi-execution 'executionKey' field is missing`,
|
|
270
273
|
);
|
|
271
274
|
const execution = new PureMultiExecution(
|
|
272
275
|
serviceExecution.executionKey,
|
|
@@ -282,12 +285,12 @@ export const V1_buildServiceExecution = (
|
|
|
282
285
|
(keyedExecutionParameter) => {
|
|
283
286
|
assertNonEmptyString(
|
|
284
287
|
keyedExecutionParameter.key,
|
|
285
|
-
|
|
288
|
+
`Service multi-execution parameter 'key' field is missing`,
|
|
286
289
|
);
|
|
287
290
|
// check duplicated key
|
|
288
291
|
if (uniqueKeys.has(keyedExecutionParameter.key)) {
|
|
289
292
|
throw new GraphBuilderError(
|
|
290
|
-
`Service multi
|
|
293
|
+
`Service multi-execution with key '${keyedExecutionParameter.key}' already exists`,
|
|
291
294
|
);
|
|
292
295
|
}
|
|
293
296
|
return new KeyedExecutionParameter(
|
|
@@ -98,11 +98,13 @@ export class V1_PackageableElementSerializer
|
|
|
98
98
|
implements V1_PackageableElementVisitor<PlainObject<V1_PackageableElement>>
|
|
99
99
|
{
|
|
100
100
|
extraElementProtocolSerializers: V1_ElementProtocolSerializer[] = [];
|
|
101
|
+
plugins: PureProtocolProcessorPlugin[];
|
|
101
102
|
|
|
102
103
|
constructor(plugins: PureProtocolProcessorPlugin[]) {
|
|
103
104
|
this.extraElementProtocolSerializers = plugins.flatMap(
|
|
104
105
|
(plugin) => plugin.V1_getExtraElementProtocolSerializers?.() ?? [],
|
|
105
106
|
);
|
|
107
|
+
this.plugins = plugins;
|
|
106
108
|
}
|
|
107
109
|
|
|
108
110
|
visit_PackageableElement(
|
|
@@ -180,7 +182,10 @@ export class V1_PackageableElementSerializer
|
|
|
180
182
|
visit_PackageableConnection(
|
|
181
183
|
element: V1_PackageableConnection,
|
|
182
184
|
): PlainObject<V1_PackageableElement> {
|
|
183
|
-
return serialize(
|
|
185
|
+
return serialize(
|
|
186
|
+
V1_packageableConnectionModelSchema(this.plugins),
|
|
187
|
+
element,
|
|
188
|
+
);
|
|
184
189
|
}
|
|
185
190
|
|
|
186
191
|
visit_FileGeneration(
|
|
@@ -234,7 +239,7 @@ export const V1_deserializePackageableElement = (
|
|
|
234
239
|
case V1_SERVICE_ELEMENT_PROTOCOL_TYPE:
|
|
235
240
|
return deserialize(V1_servicedModelSchema, json);
|
|
236
241
|
case V1_PACKAGEABLE_CONNECTION_ELEMENT_PROTOCOL_TYPE:
|
|
237
|
-
return deserialize(V1_packageableConnectionModelSchema, json);
|
|
242
|
+
return deserialize(V1_packageableConnectionModelSchema(plugins), json);
|
|
238
243
|
case V1_PACKAGEABLE_RUNTIME_ELEMENT_PROTOCOL_TYPE:
|
|
239
244
|
return deserialize(V1_packageableRuntimeModelSchema, json);
|
|
240
245
|
case V1_FILE_GENERATION_ELEMENT_PROTOCOL_TYPE:
|