You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by ze...@apache.org on 2022/10/19 06:34:56 UTC
[incubator-streampipes] branch dev updated: [STREAMPIPES-600] Add bash script to automatically generate typescript model
This is an automated email from the ASF dual-hosted git repository.
zehnder pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git
The following commit(s) were added to refs/heads/dev by this push:
new bd097fbd3 [STREAMPIPES-600] Add bash script to automatically generate typescript model
new 4b86c79c2 Merge branch 'dev' of github.com:apache/incubator-streampipes into dev
bd097fbd3 is described below
commit bd097fbd33dee4308983ad57fb470c49836f9aad
Author: Philipp Zehnder <ze...@fzi.de>
AuthorDate: Wed Oct 19 08:34:13 2022 +0200
[STREAMPIPES-600] Add bash script to automatically generate typescript model
---
.gitignore | 2 ++
create-client-model.sh | 25 ++++++++++++++++
.../src/lib/model/gen/streampipes-model-client.ts | 27 +++++++++--------
.../src/lib/model/gen/streampipes-model.ts | 35 +++++++++++-----------
4 files changed, 58 insertions(+), 31 deletions(-)
diff --git a/.gitignore b/.gitignore
index f2f2a4465..c72c118ae 100644
--- a/.gitignore
+++ b/.gitignore
@@ -134,6 +134,8 @@ bundle.js.map
.vscode/
+.java-version
+
package-lock.json
logs/
diff --git a/create-client-model.sh b/create-client-model.sh
new file mode 100755
index 000000000..6e44e2a80
--- /dev/null
+++ b/create-client-model.sh
@@ -0,0 +1,25 @@
+#!/bin/sh
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# generate model
+mvn typescript-generator:generate -f streampipes-model/pom.xml
+
+# generate model-client
+mvn typescript-generator:generate -f streampipes-model-client/pom.xml
+
+# copy files
+mv streampipes-model/target/typescript-generator/streampipes-model.ts ui/projects/streampipes/platform-services/src/lib/model/gen/
+mv streampipes-model-client/target/typescript-generator/streampipes-model-client.ts ui/projects/streampipes/platform-services/src/lib/model/gen/
\ No newline at end of file
diff --git a/ui/projects/streampipes/platform-services/src/lib/model/gen/streampipes-model-client.ts b/ui/projects/streampipes/platform-services/src/lib/model/gen/streampipes-model-client.ts
index ab4b1019b..3b70bd2fd 100644
--- a/ui/projects/streampipes/platform-services/src/lib/model/gen/streampipes-model-client.ts
+++ b/ui/projects/streampipes/platform-services/src/lib/model/gen/streampipes-model-client.ts
@@ -1,24 +1,25 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
*/
/* tslint:disable */
/* eslint-disable */
// @ts-nocheck
-// Generated using typescript-generator version 2.27.744 on 2022-04-25 13:56:53.
+// Generated using typescript-generator version 2.27.744 on 2022-10-19 08:32:13.
export class ExtensionsServiceEndpointItem {
appId: string;
diff --git a/ui/projects/streampipes/platform-services/src/lib/model/gen/streampipes-model.ts b/ui/projects/streampipes/platform-services/src/lib/model/gen/streampipes-model.ts
index 091ebc7bc..b7eaed8b5 100644
--- a/ui/projects/streampipes/platform-services/src/lib/model/gen/streampipes-model.ts
+++ b/ui/projects/streampipes/platform-services/src/lib/model/gen/streampipes-model.ts
@@ -1,24 +1,25 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
*/
/* tslint:disable */
/* eslint-disable */
// @ts-nocheck
-// Generated using typescript-generator version 2.27.744 on 2022-10-07 18:33:46.
+// Generated using typescript-generator version 2.27.744 on 2022-10-19 08:32:09.
export class AbstractStreamPipesEntity {
"@class": "org.apache.streampipes.model.base.AbstractStreamPipesEntity" | "org.apache.streampipes.model.base.NamedStreamPipesEntity" | "org.apache.streampipes.model.connect.adapter.AdapterDescription" | "org.apache.streampipes.model.connect.adapter.AdapterSetDescription" | "org.apache.streampipes.model.connect.adapter.GenericAdapterSetDescription" | "org.apache.streampipes.model.connect.adapter.SpecificAdapterSetDescription" | "org.apache.streampipes.model.connect.adapter.AdapterStre [...]
@@ -151,8 +152,8 @@ export class NamedStreamPipesEntity extends AbstractStreamPipesEntity {
instance.applicationLinks = __getCopyArrayFn(ApplicationLink.fromData)(data.applicationLinks);
instance.internallyManaged = data.internallyManaged;
instance.connectedTo = __getCopyArrayFn(__identity<string>())(data.connectedTo);
- instance.dom = data.dom;
instance.uri = data.uri;
+ instance.dom = data.dom;
instance._rev = data._rev;
return instance;
}
@@ -172,7 +173,6 @@ export class AdapterDescription extends NamedStreamPipesEntity {
schemaRules: TransformationRuleDescriptionUnion[];
selectedEndpointUrl: string;
streamRules: TransformationRuleDescriptionUnion[];
- userName: string;
valueRules: TransformationRuleDescriptionUnion[];
static fromData(data: AdapterDescription, target?: AdapterDescription): AdapterDescription {
@@ -181,7 +181,6 @@ export class AdapterDescription extends NamedStreamPipesEntity {
}
const instance = target || new AdapterDescription();
super.fromData(data, instance);
- instance.userName = data.userName;
instance.eventGrounding = EventGrounding.fromData(data.eventGrounding);
instance.adapterType = data.adapterType;
instance.icon = data.icon;
@@ -193,8 +192,8 @@ export class AdapterDescription extends NamedStreamPipesEntity {
instance.correspondingServiceGroup = data.correspondingServiceGroup;
instance.correspondingDataStreamElementId = data.correspondingDataStreamElementId;
instance.schemaRules = __getCopyArrayFn(TransformationRuleDescription.fromDataUnion)(data.schemaRules);
- instance.streamRules = __getCopyArrayFn(TransformationRuleDescription.fromDataUnion)(data.streamRules);
instance.valueRules = __getCopyArrayFn(TransformationRuleDescription.fromDataUnion)(data.valueRules);
+ instance.streamRules = __getCopyArrayFn(TransformationRuleDescription.fromDataUnion)(data.streamRules);
return instance;
}
@@ -2658,9 +2657,9 @@ export class PipelineTemplateDescription extends NamedStreamPipesEntity {
const instance = target || new PipelineTemplateDescription();
super.fromData(data, instance);
instance.boundTo = __getCopyArrayFn(BoundPipelineElement.fromData)(data.boundTo);
- instance.pipelineTemplateName = data.pipelineTemplateName;
instance.pipelineTemplateDescription = data.pipelineTemplateDescription;
instance.pipelineTemplateId = data.pipelineTemplateId;
+ instance.pipelineTemplateName = data.pipelineTemplateName;
return instance;
}
}