@finos/legend-graph 0.1.2 → 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 +10 -0
- 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/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.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/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 +4 -13
- package/lib/models/protocols/pure/v1/V1_PureGraphManager.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/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/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/transformation/pureGraph/from/V1_ConnectionTransformer.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/from/V1_ConnectionTransformer.js +5 -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 +2 -0
- package/lib/models/protocols/pure/v1/transformation/pureGraph/from/V1_MappingTransformer.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.js +5 -5
- 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.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelConnectionBuilder.js +13 -13
- 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 +27 -27
- 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 +13 -13
- 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_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_PureProtocolSerialization.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/V1_PureProtocolSerialization.js +2 -1
- 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.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_ConnectionSerializationHelper.js +5 -0
- 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_MappingSerializationHelper.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_MappingSerializationHelper.js +3 -4
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_MappingSerializationHelper.js.map +1 -1
- package/package.json +2 -2
- package/src/graphManager/AbstractPureGraphManager.ts +2 -1
- package/src/index.ts +1 -0
- package/src/models/metamodels/pure/packageableElements/store/relational/connection/DatasourceSpecification.ts +40 -0
- package/src/models/protocols/pure/v1/V1_PureGraphManager.ts +5 -14
- 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/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/store/relational/connection/V1_DatasourceSpecification.ts +10 -0
- package/src/models/protocols/pure/v1/transformation/pureGraph/from/V1_ConnectionTransformer.ts +5 -0
- package/src/models/protocols/pure/v1/transformation/pureGraph/from/V1_MappingTransformer.ts +2 -0
- 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 +5 -5
- package/src/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelConnectionBuilder.ts +22 -13
- 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 +27 -27
- 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 +16 -13
- 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_PureProtocolSerialization.ts +2 -1
- package/src/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_ConnectionSerializationHelper.ts +5 -0
- package/src/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_MappingSerializationHelper.ts +2 -3
|
@@ -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(
|
package/src/models/protocols/pure/v1/transformation/pureProtocol/V1_PureProtocolSerialization.ts
CHANGED
|
@@ -102,7 +102,8 @@ const alloySdlcSerializationModelSchema = createModelSchema(V1_AlloySdlc, {
|
|
|
102
102
|
_type: usingConstantValueSchema(V1_SdlcType.ALLOY),
|
|
103
103
|
baseVersion: optional(primitive()),
|
|
104
104
|
version: primitive(),
|
|
105
|
-
|
|
105
|
+
groupId: primitive(),
|
|
106
|
+
artifactId: primitive(),
|
|
106
107
|
packageableElementPointers: list(
|
|
107
108
|
usingModelSchema(V1_packageableElementPointerDeserializerSchema),
|
|
108
109
|
),
|
|
@@ -166,8 +166,13 @@ const snowflakeDatasourceSpecificationModelSchema = createModelSchema(
|
|
|
166
166
|
{
|
|
167
167
|
_type: usingConstantValueSchema(V1_DatasourceSpecificationType.SNOWFLAKE),
|
|
168
168
|
accountName: primitive(),
|
|
169
|
+
accountType: optional(primitive()),
|
|
169
170
|
cloudType: optional(primitive()),
|
|
170
171
|
databaseName: primitive(),
|
|
172
|
+
nonProxyHosts: optional(primitive()),
|
|
173
|
+
organization: optional(primitive()),
|
|
174
|
+
proxyHost: optional(primitive()),
|
|
175
|
+
proxyPort: optional(primitive()),
|
|
171
176
|
quotedIdentifiersIgnoreCase: optional(primitive()),
|
|
172
177
|
region: primitive(),
|
|
173
178
|
warehouseName: primitive(),
|
|
@@ -298,7 +298,6 @@ const otherwiseEmbeddedRelationalPropertyMappingModelSchgema =
|
|
|
298
298
|
V1_PropertyMappingType.OTHERWISE_EMBEDDED_RELATIONAL,
|
|
299
299
|
),
|
|
300
300
|
classMapping: usingModelSchema(relationalClassMappingModelSchema),
|
|
301
|
-
id: optional(primitive()),
|
|
302
301
|
otherwisePropertyMapping: custom(
|
|
303
302
|
(val) => V1_serializeRelationalPropertyMapping(val),
|
|
304
303
|
(val) => V1_deserializeRelationalPropertyMapping(val),
|
|
@@ -347,8 +346,6 @@ function V1_serializeRelationalPropertyMapping(
|
|
|
347
346
|
): PlainObject<V1_PropertyMapping> | typeof SKIP {
|
|
348
347
|
if (protocol instanceof V1_RelationalPropertyMapping) {
|
|
349
348
|
return serialize(relationalPropertyMappingModelSchema, protocol);
|
|
350
|
-
} else if (protocol instanceof V1_EmbeddedRelationalPropertyMapping) {
|
|
351
|
-
return serialize(embeddedRelationalPropertyMappingModelSchema, protocol);
|
|
352
349
|
} else if (
|
|
353
350
|
protocol instanceof V1_OtherwiseEmbeddedRelationalPropertyMapping
|
|
354
351
|
) {
|
|
@@ -356,6 +353,8 @@ function V1_serializeRelationalPropertyMapping(
|
|
|
356
353
|
otherwiseEmbeddedRelationalPropertyMappingModelSchgema,
|
|
357
354
|
protocol,
|
|
358
355
|
);
|
|
356
|
+
} else if (protocol instanceof V1_EmbeddedRelationalPropertyMapping) {
|
|
357
|
+
return serialize(embeddedRelationalPropertyMappingModelSchema, protocol);
|
|
359
358
|
} else if (protocol instanceof V1_InlineEmbeddedPropertyMapping) {
|
|
360
359
|
return serialize(inlineEmbeddedPropertyMappingModelSchema, protocol);
|
|
361
360
|
} else if (protocol instanceof V1_XStorePropertyMapping) {
|