aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md2
-rw-r--r--pom.xml25
-rw-r--r--workflow-designer-be/pom.xml7
-rw-r--r--workflow-designer-be/src/main/java/org/onap/sdc/workflow/RestUtils.java15
-rw-r--r--workflow-designer-be/src/main/java/org/onap/sdc/workflow/api/WorkflowController.java16
-rw-r--r--workflow-designer-be/src/main/java/org/onap/sdc/workflow/api/WorkflowVersionController.java2
-rw-r--r--workflow-designer-be/src/main/java/org/onap/sdc/workflow/persistence/types/Workflow.java4
-rw-r--r--workflow-designer-be/src/main/resources/application.properties3
-rw-r--r--workflow-designer-be/src/test/java/org/onap/sdc/workflow/api/WorkflowControllerTest.java12
-rw-r--r--workflow-designer-init/pom.xml2
-rw-r--r--workflow-designer-ui/pom.xml5
-rw-r--r--workflow-designer-ui/src/main/frontend/package.json2
-rw-r--r--workflow-designer-ui/src/main/frontend/src/App.js14
-rw-r--r--workflow-designer-ui/src/main/frontend/src/index.js6
-rw-r--r--workflow-designer-ui/src/main/frontend/src/shared/pubsub/base-pubsub.ts127
-rw-r--r--workflow-designer-ui/src/main/frontend/src/shared/pubsub/plugin-pubsub.ts30
-rw-r--r--workflow-designer-ui/src/main/frontend/tsconfig.json12
-rw-r--r--workflow-designer-ui/src/main/frontend/webpack.config.js7
-rw-r--r--workflow-designer-ui/src/main/frontend/yarn.lock21
19 files changed, 289 insertions, 23 deletions
diff --git a/README.md b/README.md
index 2b6bcbce..75153808 100644
--- a/README.md
+++ b/README.md
@@ -35,6 +35,8 @@ or, if Cassandra authentication is not required
The server listens on 8080 by default, but it is possible to change the application port by passing
`-e SERVER_PORT={PORT}` to Docker _run_ command.
+To check health information of application you can use option `-e SHOW_HEALTH={always}`
+
**Example**
`docker run -d -e JAVA_OPTIONS="-Xmx128m -Xms128m -Xss1m" -e CS_HOSTS=10.247.41.19,10.247.41.20
diff --git a/pom.xml b/pom.xml
index 2ad0a828..1df44b27 100644
--- a/pom.xml
+++ b/pom.xml
@@ -20,7 +20,13 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
- <groupId>org.onap.sdc.workflow_designer</groupId>
+
+ <!--
+ The groupId violates Maven naming conventions
+ (https://maven.apache.org/guides/mini/guide-naming-conventions.html)
+ because of a limitation of ONAP CI/CD infrastructure.
+ -->
+ <groupId>org.onap.sdc.sdc-workflow-designer</groupId>
<artifactId>workflow-designer-parent</artifactId>
<version>1.3.0-SNAPSHOT</version>
<packaging>pom</packaging>
@@ -31,13 +37,13 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<onap.version>1.3.0-SNAPSHOT</onap.version>
- <mvn.docker.version>0.23.0</mvn.docker.version>
<docker.optimize>true</docker.optimize>
<docker.username>docker</docker.username>
<docker.password>docker</docker.password>
<nexus.registry>nexus3.onap.org:10001</nexus.registry>
<nexus.proxy>https://nexus.onap.org</nexus.proxy>
<sitePath>/content/sites/site/org/onap/sdc/workflow/${project.version}</sitePath>
+ <staging.profile.id>176c31dfe190a</staging.profile.id>
</properties>
<modules>
@@ -52,7 +58,7 @@
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
- <version>${mvn.docker.version}</version>
+ <version>0.23.0</version>
<configuration>
<verbose>false</verbose>
<registry>${nexus.registry}</registry>
@@ -82,6 +88,19 @@
</plugin>
</plugins>
</pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.sonatype.plugins</groupId>
+ <artifactId>nexus-staging-maven-plugin</artifactId>
+ <version>1.6.8</version>
+ <extensions>true</extensions>
+ <configuration>
+ <serverId>ecomp-staging</serverId>
+ <nexusUrl>${nexus.proxy}</nexusUrl>
+ <stagingProfileId>${staging.profile.id}</stagingProfileId>
+ </configuration>
+ </plugin>
+ </plugins>
</build>
<repositories>
diff --git a/workflow-designer-be/pom.xml b/workflow-designer-be/pom.xml
index ac77e5f7..60a7cd0b 100644
--- a/workflow-designer-be/pom.xml
+++ b/workflow-designer-be/pom.xml
@@ -8,7 +8,7 @@
<artifactId>workflow-designer-be</artifactId>
<parent>
- <groupId>org.onap.sdc.workflow_designer</groupId>
+ <groupId>org.onap.sdc.sdc-workflow-designer</groupId>
<artifactId>workflow-designer-parent</artifactId>
<version>1.3.0-SNAPSHOT</version>
</parent>
@@ -128,6 +128,11 @@
<version>${lombok.version}</version>
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-actuator</artifactId>
+ <scope>provided</scope>
+ </dependency>
</dependencies>
<build>
diff --git a/workflow-designer-be/src/main/java/org/onap/sdc/workflow/RestUtils.java b/workflow-designer-be/src/main/java/org/onap/sdc/workflow/RestUtils.java
index b6259ccc..8ba75429 100644
--- a/workflow-designer-be/src/main/java/org/onap/sdc/workflow/RestUtils.java
+++ b/workflow-designer-be/src/main/java/org/onap/sdc/workflow/RestUtils.java
@@ -1,3 +1,18 @@
+/*
+ * Copyright © 2018 European Support Limited
+ *
+ * Licensed 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.
+ */
package org.onap.sdc.workflow;
import java.util.Arrays;
diff --git a/workflow-designer-be/src/main/java/org/onap/sdc/workflow/api/WorkflowController.java b/workflow-designer-be/src/main/java/org/onap/sdc/workflow/api/WorkflowController.java
index 7027985f..f8eb4bb9 100644
--- a/workflow-designer-be/src/main/java/org/onap/sdc/workflow/api/WorkflowController.java
+++ b/workflow-designer-be/src/main/java/org/onap/sdc/workflow/api/WorkflowController.java
@@ -16,7 +16,7 @@
package org.onap.sdc.workflow.api;
-import static org.onap.sdc.workflow.RestUtils.mapVersionStateFilter;
+import static org.onap.sdc.workflow.RestUtils.*;
import static org.onap.sdc.workflow.api.RestConstants.SIZE_DEFAULT;
import static org.onap.sdc.workflow.api.RestConstants.SORT_FIELD_NAME;
import static org.onap.sdc.workflow.api.RestConstants.SORT_PARAM;
@@ -31,6 +31,7 @@ import java.util.Set;
import org.onap.sdc.workflow.api.types.CollectionWrapper;
import org.onap.sdc.workflow.persistence.types.Workflow;
import org.onap.sdc.workflow.services.WorkflowManager;
+import org.onap.sdc.workflow.services.WorkflowVersionManager;
import org.onap.sdc.workflow.services.exceptions.InvalidPaginationParameterException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
@@ -59,10 +60,13 @@ import org.springframework.web.bind.annotation.RestController;
public class WorkflowController {
private final WorkflowManager workflowManager;
+ private final WorkflowVersionManager workflowVersionManager;
@Autowired
- public WorkflowController(@Qualifier("workflowManager") WorkflowManager workflowManager) {
+ public WorkflowController(@Qualifier("workflowManager") WorkflowManager workflowManager,
+ @Qualifier("workflowVersionManager") WorkflowVersionManager workflowVersionManager) {
this.workflowManager = workflowManager;
+ this.workflowVersionManager = workflowVersionManager;
}
@GetMapping(produces = MediaType.APPLICATION_JSON_VALUE)
@@ -88,10 +92,16 @@ public class WorkflowController {
@GetMapping(path = "/{workflowId}")
@ApiOperation("Get workflow")
public Workflow get(@PathVariable("workflowId") String workflowId,
+ @ApiParam(value = "Expand workflow data", allowableValues = "versions")
+ @RequestParam(value = "expand", required = false) String expand,
@RequestHeader(USER_ID_HEADER_PARAM) String user) {
Workflow workflow = new Workflow();
workflow.setId(workflowId);
- return workflowManager.get(workflow);
+ Workflow retrievedWorkflow = workflowManager.get(workflow);
+ if("versions".equals(expand)){
+ retrievedWorkflow.setVersions(workflowVersionManager.list(workflowId,null));
+ }
+ return retrievedWorkflow;
}
@PutMapping(path = "/{workflowId}", consumes = MediaType.APPLICATION_JSON_VALUE)
diff --git a/workflow-designer-be/src/main/java/org/onap/sdc/workflow/api/WorkflowVersionController.java b/workflow-designer-be/src/main/java/org/onap/sdc/workflow/api/WorkflowVersionController.java
index 91995bd0..34ecb898 100644
--- a/workflow-designer-be/src/main/java/org/onap/sdc/workflow/api/WorkflowVersionController.java
+++ b/workflow-designer-be/src/main/java/org/onap/sdc/workflow/api/WorkflowVersionController.java
@@ -59,7 +59,7 @@ public class WorkflowVersionController {
private final WorkflowVersionManager workflowVersionManager;
private Validator validator;
- @InitBinder
+ @InitBinder("WorkflowVersion")
private void initBinder(WebDataBinder binder) {
binder.addValidators(validator);
}
diff --git a/workflow-designer-be/src/main/java/org/onap/sdc/workflow/persistence/types/Workflow.java b/workflow-designer-be/src/main/java/org/onap/sdc/workflow/persistence/types/Workflow.java
index 72e62778..b2fc6f59 100644
--- a/workflow-designer-be/src/main/java/org/onap/sdc/workflow/persistence/types/Workflow.java
+++ b/workflow-designer-be/src/main/java/org/onap/sdc/workflow/persistence/types/Workflow.java
@@ -30,8 +30,8 @@ public class Workflow {
private String id;
@NotNull(message = "Workflow name may not be null")
- @Size(min = 6, max = 30, message = "The field must be at least 6 characters, and less than 30 characters")
- @Pattern(regexp = "[A-Za-z0-9_]*", message = "The field must contain only letters, digits and underscores")
+ @Size(max = 80, message = "Workflow name must be less than 80 characters")
+ @Pattern(regexp = "[A-Za-z0-9_]*", message = "Workflow name must contain only letters, digits and underscores")
private String name;
private String description;
private Set<WorkflowVersionState> versionStates;
diff --git a/workflow-designer-be/src/main/resources/application.properties b/workflow-designer-be/src/main/resources/application.properties
index ab4930b5..c120bda3 100644
--- a/workflow-designer-be/src/main/resources/application.properties
+++ b/workflow-designer-be/src/main/resources/application.properties
@@ -7,4 +7,5 @@ spring.data.cassandra.keyspace-name=workflow
spring.data.cassandra.port=${CS_PORT:9042}
spring.data.cassandra.username=${CS_USER:}
spring.data.cassandra.password=${CS_PASSWORD:}
-zusammen.cassandra.isAuthenticate=${CS_AUTHENTICATE:true} \ No newline at end of file
+zusammen.cassandra.isAuthenticate=${CS_AUTHENTICATE:true}
+management.endpoint.health.show-details=${SHOW_HEALTH:never} \ No newline at end of file
diff --git a/workflow-designer-be/src/test/java/org/onap/sdc/workflow/api/WorkflowControllerTest.java b/workflow-designer-be/src/test/java/org/onap/sdc/workflow/api/WorkflowControllerTest.java
index 5e7df483..337fea79 100644
--- a/workflow-designer-be/src/test/java/org/onap/sdc/workflow/api/WorkflowControllerTest.java
+++ b/workflow-designer-be/src/test/java/org/onap/sdc/workflow/api/WorkflowControllerTest.java
@@ -257,6 +257,18 @@ public class WorkflowControllerTest {
verify(workflowManagerMock).create(reqWorkflow);
}
+ @Test
+ public void shouldThrowExceptionWhenWorkflowNameInvalid() throws Exception {
+
+ Workflow reqWorkflow = new Workflow();
+ reqWorkflow.setName("Invalid workflow name %");
+ MockHttpServletResponse response = mockMvc.perform(
+ post(RestPath.getWorkflowsPath()).header(USER_ID_HEADER_PARAM, USER_ID).contentType(APPLICATION_JSON)
+ .content(GSON.toJson(reqWorkflow))).andDo(print())
+ .andExpect(status().isBadRequest()).andReturn().getResponse();
+ assertEquals("Workflow name must contain only letters, digits and underscores", response.getContentAsString());
+ }
+
private List<Workflow> createWorkflows(int numOfWorkflows) {
List<Workflow> workflowList = new ArrayList<>(numOfWorkflows);
for (int i = 0; i < numOfWorkflows; i++) {
diff --git a/workflow-designer-init/pom.xml b/workflow-designer-init/pom.xml
index 7f926e86..f38abf9f 100644
--- a/workflow-designer-init/pom.xml
+++ b/workflow-designer-init/pom.xml
@@ -8,7 +8,7 @@
<packaging>pom</packaging>
<parent>
- <groupId>org.onap.sdc.workflow_designer</groupId>
+ <groupId>org.onap.sdc.sdc-workflow-designer</groupId>
<artifactId>workflow-designer-parent</artifactId>
<version>1.3.0-SNAPSHOT</version>
</parent>
diff --git a/workflow-designer-ui/pom.xml b/workflow-designer-ui/pom.xml
index a841a5aa..172f5890 100644
--- a/workflow-designer-ui/pom.xml
+++ b/workflow-designer-ui/pom.xml
@@ -20,12 +20,11 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
-
<artifactId>workflow-designer-ui</artifactId>
<packaging>war</packaging>
<parent>
- <groupId>org.onap.sdc.workflow_designer</groupId>
+ <groupId>org.onap.sdc.sdc-workflow-designer</groupId>
<artifactId>workflow-designer-parent</artifactId>
<version>1.3.0-SNAPSHOT</version>
</parent>
@@ -118,7 +117,7 @@
</includes>
</resource>
<resource>
- <directory>src/main/frontend/external-resources/ping/</directory>
+ <directory>src/main/frontend/external-resources/ping/</directory>
<filtering>true</filtering>
<includes>
<include>ping</include>
diff --git a/workflow-designer-ui/src/main/frontend/package.json b/workflow-designer-ui/src/main/frontend/package.json
index 911eb629..dc2c229c 100644
--- a/workflow-designer-ui/src/main/frontend/package.json
+++ b/workflow-designer-ui/src/main/frontend/package.json
@@ -50,6 +50,7 @@
"validator": "^10.2.0"
},
"devDependencies": {
+ "awesome-typescript-loader": "^5.2.0",
"babel-core": "^6.24.0",
"babel-eslint": "^8.2.1",
"babel-jest": "^22.1.0",
@@ -83,6 +84,7 @@
"react-test-renderer": "^16.4.1",
"sass-loader": "^6.0.6",
"source-map-loader": "^0.1.5",
+ "typescript": "^2.9.2",
"uglifyjs-webpack-plugin": "^1.1.6",
"webpack": "^4.5.0",
"webpack-api-mocker": "^1.4.3",
diff --git a/workflow-designer-ui/src/main/frontend/src/App.js b/workflow-designer-ui/src/main/frontend/src/App.js
index f780c8ed..7b46fe48 100644
--- a/workflow-designer-ui/src/main/frontend/src/App.js
+++ b/workflow-designer-ui/src/main/frontend/src/App.js
@@ -13,10 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
import { hot } from 'react-hot-loader';
import React, { Component } from 'react';
import { Route } from 'react-router-dom';
+import { PluginPubSub } from 'shared/pubsub/plugin-pubsub';
import 'resources/scss/style.scss';
import 'bpmn-js-properties-panel/styles/properties.less';
import { routes } from './routes';
@@ -30,8 +32,16 @@ const RouteWithSubRoutes = route => (
);
class App extends Component {
- constructor(props) {
- super(props);
+ componentDidMount() {
+ const searchParams = new URLSearchParams(location.search);
+ const eventsClientId = searchParams.get('eventsClientId');
+ const parentUrl = searchParams.get('parentUrl');
+
+ if (eventsClientId && parentUrl) {
+ const client = new PluginPubSub(eventsClientId, parentUrl);
+
+ client.notify('READY');
+ }
}
render() {
diff --git a/workflow-designer-ui/src/main/frontend/src/index.js b/workflow-designer-ui/src/main/frontend/src/index.js
index 9dfe6378..d33f47cb 100644
--- a/workflow-designer-ui/src/main/frontend/src/index.js
+++ b/workflow-designer-ui/src/main/frontend/src/index.js
@@ -17,7 +17,7 @@
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
-import { HashRouter } from 'react-router-dom';
+import { BrowserRouter } from 'react-router-dom';
import Notifications from 'shared/notifications/Notifications';
import Loader from 'shared/loader/Loader';
@@ -30,14 +30,14 @@ ReactDOM.render(
<React.Fragment>
<Notifications />
<Loader />
- <HashRouter>
+ <BrowserRouter>
<React.Fragment>
<div className="workflow-app">
<App />
</div>
<ModalWrapper />
</React.Fragment>
- </HashRouter>
+ </BrowserRouter>
</React.Fragment>
</Provider>,
document.getElementById('root')
diff --git a/workflow-designer-ui/src/main/frontend/src/shared/pubsub/base-pubsub.ts b/workflow-designer-ui/src/main/frontend/src/shared/pubsub/base-pubsub.ts
new file mode 100644
index 00000000..41e8039d
--- /dev/null
+++ b/workflow-designer-ui/src/main/frontend/src/shared/pubsub/base-pubsub.ts
@@ -0,0 +1,127 @@
+declare const window: Window;
+
+export class BasePubSub {
+
+ subscribers: Map<string, ISubscriber>;
+ eventsCallbacks: Array<Function>;
+ clientId: string;
+ eventsToWait: Map<string, Array<string>>;
+ lastEventNotified: string;
+
+ constructor(pluginId: string) {
+ this.subscribers = new Map<string, ISubscriber>();
+ this.eventsCallbacks = [];
+ this.eventsToWait = new Map<string, Array<string>>();
+ this.clientId = pluginId;
+ this.lastEventNotified = "";
+ this.onMessage = this.onMessage.bind(this);
+
+ window.addEventListener("message", this.onMessage);
+ }
+
+ public register(subscriberId: string, subscriberWindow: Window, subscriberUrl: string) {
+ const subscriber = {
+ window: subscriberWindow,
+ locationUrl: subscriberUrl || subscriberWindow.location.href
+ } as ISubscriber;
+
+ this.subscribers.set(subscriberId, subscriber);
+ }
+
+ public unregister(subscriberId: string) {
+ this.subscribers.delete(subscriberId);
+ }
+
+ public on(callback: Function) {
+ let functionExists = this.eventsCallbacks.find((func: Function) => {
+ return callback.toString() == func.toString()
+ });
+
+ if (!functionExists) {
+ this.eventsCallbacks.push(callback);
+ }
+ }
+
+ public off(callback: Function) {
+ let index = this.eventsCallbacks.indexOf(callback);
+ this.eventsCallbacks.splice(index, 1)
+ }
+
+ public notify(eventType:string, eventData?:any) {
+ let eventObj = {
+ type: eventType,
+ data: eventData,
+ originId: this.clientId
+ } as IPubSubEvent;
+
+ this.subscribers.forEach( (subscriber: ISubscriber, subscriberId: string) => {
+ subscriber.window.postMessage(eventObj, subscriber.locationUrl);
+ });
+
+ this.lastEventNotified = eventType;
+
+ return {
+ subscribe: function(callbackFn) {
+
+ if(this.subscribers.size !== 0) {
+ let subscribersToNotify = Array.from(this.subscribers.keys());
+
+ const checkNotifyComplete = (subscriberId: string) => {
+
+ let index = subscribersToNotify.indexOf(subscriberId);
+ subscribersToNotify.splice(index, 1);
+
+ if (subscribersToNotify.length === 0) {
+ callbackFn();
+ }
+ };
+
+ this.subscribers.forEach((subscriber: ISubscriber, subscriberId: string) => {
+ if (this.eventsToWait.has(subscriberId) && this.eventsToWait.get(subscriberId).indexOf(eventType) !== -1) {
+
+ const actionCompletedFunction = (eventData, subId = subscriberId) => {
+ if (eventData.type == "ACTION_COMPLETED") {
+ checkNotifyComplete(subId);
+ }
+ this.off(actionCompletedFunction);
+
+ };
+ this.on(actionCompletedFunction);
+ }
+ else {
+ checkNotifyComplete(subscriberId);
+ }
+ });
+ }
+ else {
+ callbackFn();
+ }
+ }.bind(this)
+ }
+ }
+
+ public isWaitingForEvent(eventName: string) : boolean {
+ return Array.from(this.eventsToWait.values()).some((eventsList: Array<string>) =>
+ eventsList.indexOf(eventName) !== -1
+ );
+ }
+
+ protected onMessage(event: any) {
+ if (this.subscribers.has(event.data.originId)) {
+ this.eventsCallbacks.forEach((callback: Function) => {
+ callback(event.data, event);
+ })
+ }
+ }
+}
+
+export interface IPubSubEvent {
+ type: string;
+ originId: string;
+ data: any;
+}
+
+export interface ISubscriber {
+ window: Window;
+ locationUrl: string;
+}
diff --git a/workflow-designer-ui/src/main/frontend/src/shared/pubsub/plugin-pubsub.ts b/workflow-designer-ui/src/main/frontend/src/shared/pubsub/plugin-pubsub.ts
new file mode 100644
index 00000000..8f99e659
--- /dev/null
+++ b/workflow-designer-ui/src/main/frontend/src/shared/pubsub/plugin-pubsub.ts
@@ -0,0 +1,30 @@
+import {BasePubSub} from 'shared/pubsub/base-pubsub';
+
+declare const window: Window;
+
+export class PluginPubSub extends BasePubSub {
+
+
+ constructor(pluginId: string, parentUrl: string, eventsToWait?: Array<string>) {
+ super(pluginId);
+ this.register('sdc-hub', window.parent, parentUrl);
+ this.subscribe(eventsToWait);
+ }
+
+ public subscribe(eventsToWait?: Array<string>) {
+ const registerData = {
+ pluginId: this.clientId,
+ eventsToWait: eventsToWait || []
+ };
+
+ this.notify('PLUGIN_REGISTER', registerData);
+ }
+
+ public unsubscribe() {
+ const unregisterData = {
+ pluginId: this.clientId
+ };
+
+ this.notify('PLUGIN_UNREGISTER', unregisterData);
+ }
+}
diff --git a/workflow-designer-ui/src/main/frontend/tsconfig.json b/workflow-designer-ui/src/main/frontend/tsconfig.json
new file mode 100644
index 00000000..a3bc367f
--- /dev/null
+++ b/workflow-designer-ui/src/main/frontend/tsconfig.json
@@ -0,0 +1,12 @@
+{
+ "compilerOptions": {
+ "strict" : false,
+ "noImplicitAny": false,
+ "outDir": "./dist/",
+ "module": "es6",
+ "target": "es5",
+ "jsx": "react",
+ "lib": ["es5", "es6", "dom"],
+ "allowJs": true
+ }
+}
diff --git a/workflow-designer-ui/src/main/frontend/webpack.config.js b/workflow-designer-ui/src/main/frontend/webpack.config.js
index 70f41ed6..c724d9fc 100644
--- a/workflow-designer-ui/src/main/frontend/webpack.config.js
+++ b/workflow-designer-ui/src/main/frontend/webpack.config.js
@@ -40,7 +40,7 @@ module.exports = (env, argv) => {
devtool: DEV ? 'eval-source-map' : 'none',
resolve: {
modules: modulePath,
- extensions: ['.js', '.json', '.css', '.scss', '.jsx'],
+ extensions: ['.js', '.json', '.css', '.scss', '.jsx', '.ts'],
alias: {
wfapp: path.resolve(__dirname, 'src/'),
features: path.resolve(__dirname, 'src/features'),
@@ -120,6 +120,11 @@ module.exports = (env, argv) => {
{
test: /\.(bpmn|xml)$/,
loader: 'raw-loader'
+ },
+ {
+ test: /\.ts|\.tsx$/,
+ loader: ['babel-loader', 'awesome-typescript-loader'],
+ include: srcPath
}
]
},
diff --git a/workflow-designer-ui/src/main/frontend/yarn.lock b/workflow-designer-ui/src/main/frontend/yarn.lock
index 2d73ab95..7e31f62b 100644
--- a/workflow-designer-ui/src/main/frontend/yarn.lock
+++ b/workflow-designer-ui/src/main/frontend/yarn.lock
@@ -921,6 +921,19 @@ autoprefixer@^7.2.6:
postcss "^6.0.17"
postcss-value-parser "^3.2.3"
+awesome-typescript-loader@^5.2.0:
+ version "5.2.0"
+ resolved "https://registry.yarnpkg.com/awesome-typescript-loader/-/awesome-typescript-loader-5.2.0.tgz#d7bccf4823c45096ec24da4c12a1507d276ba15a"
+ dependencies:
+ chalk "^2.4.1"
+ enhanced-resolve "^4.0.0"
+ loader-utils "^1.1.0"
+ lodash "^4.17.5"
+ micromatch "^3.1.9"
+ mkdirp "^0.5.1"
+ source-map-support "^0.5.3"
+ webpack-log "^1.2.0"
+
aws-sign2@~0.6.0:
version "0.6.0"
resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f"
@@ -10729,7 +10742,7 @@ source-map-support@^0.4.15:
dependencies:
source-map "^0.5.6"
-source-map-support@^0.5.0:
+source-map-support@^0.5.0, source-map-support@^0.5.3:
version "0.5.6"
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.6.tgz#4435cee46b1aab62b8e8610ce60f788091c51c13"
dependencies:
@@ -11382,6 +11395,10 @@ typedarray@^0.0.6:
version "0.0.6"
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
+typescript@^2.9.2:
+ version "2.9.2"
+ resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.9.2.tgz#1cbf61d05d6b96269244eb6a3bce4bd914e0f00c"
+
ua-parser-js@^0.7.18:
version "0.7.18"
resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.18.tgz#a7bfd92f56edfb117083b69e31d2aa8882d4b1ed"
@@ -11976,7 +11993,7 @@ webpack-hot-middleware@^2.22.1:
querystring "^0.2.0"
strip-ansi "^3.0.0"
-webpack-log@^1.0.1, webpack-log@^1.1.2:
+webpack-log@^1.0.1, webpack-log@^1.1.2, webpack-log@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/webpack-log/-/webpack-log-1.2.0.tgz#a4b34cda6b22b518dbb0ab32e567962d5c72a43d"
dependencies: