@eclipse-glsp-examples/workflow-server 1.1.0-RC07 → 1.1.0-RC09
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/browser.d.ts +16 -0
- package/browser.js +18 -0
- package/bundle/wf-glsp-server-node.js +58706 -0
- package/lib/browser/app.d.ts +16 -0
- package/lib/browser/app.d.ts.map +1 -1
- package/lib/browser/app.js +9 -14
- package/lib/browser/app.js.map +1 -1
- package/lib/browser/index.d.ts +2 -1
- package/lib/browser/index.d.ts.map +1 -1
- package/lib/browser/index.js +16 -3
- package/lib/browser/index.js.map +1 -1
- package/lib/common/index.d.ts +50 -0
- package/lib/common/index.d.ts.map +1 -0
- package/lib/common/index.js +66 -0
- package/lib/common/index.js.map +1 -0
- package/lib/node/app.d.ts +16 -1
- package/lib/node/app.d.ts.map +1 -1
- package/lib/node/app.js +15 -22
- package/lib/node/app.js.map +1 -1
- package/lib/node/index.d.ts +2 -1
- package/lib/node/index.d.ts.map +1 -1
- package/lib/node/index.js +16 -3
- package/lib/node/index.js.map +1 -1
- package/lib/node/workflow-cli-parser.d.ts +1 -1
- package/lib/node/workflow-cli-parser.js +1 -1
- package/node.d.ts +16 -0
- package/node.js +18 -0
- package/package.json +11 -6
- package/src/browser/app.ts +15 -18
- package/src/browser/index.ts +2 -4
- package/src/common/index.ts +50 -0
- package/src/node/app.ts +20 -32
- package/src/node/index.ts +2 -4
- package/src/node/workflow-cli-parser.ts +1 -1
package/src/node/app.ts
CHANGED
|
@@ -13,45 +13,33 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
+
import 'reflect-metadata';
|
|
17
|
+
|
|
16
18
|
import { configureELKLayoutModule } from '@eclipse-glsp/layout-elk';
|
|
17
|
-
import {
|
|
18
|
-
createAppModule,
|
|
19
|
-
GModelStorage,
|
|
20
|
-
Logger,
|
|
21
|
-
LoggerFactory,
|
|
22
|
-
SocketServerLauncher,
|
|
23
|
-
WebSocketServerLauncher
|
|
24
|
-
} from '@eclipse-glsp/server/node';
|
|
19
|
+
import { createAppModule, GModelStorage, SocketServerLauncher, WebSocketServerLauncher } from '@eclipse-glsp/server/node';
|
|
25
20
|
import { Container } from 'inversify';
|
|
21
|
+
|
|
26
22
|
import { WorkflowLayoutConfigurator } from '../common/layout/workflow-layout-configurator';
|
|
27
23
|
import { WorkflowDiagramModule, WorkflowServerModule } from '../common/workflow-diagram-module';
|
|
28
24
|
import { createWorkflowCliParser } from './workflow-cli-parser';
|
|
29
25
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
const appContainer = new Container();
|
|
35
|
-
appContainer.load(createAppModule(options));
|
|
26
|
+
async function launch(argv?: string[]): Promise<void> {
|
|
27
|
+
const options = createWorkflowCliParser().parse(argv);
|
|
28
|
+
const appContainer = new Container();
|
|
29
|
+
appContainer.load(createAppModule(options));
|
|
36
30
|
|
|
37
|
-
|
|
31
|
+
const elkLayoutModule = configureELKLayoutModule({ algorithms: ['layered'], layoutConfigurator: WorkflowLayoutConfigurator });
|
|
32
|
+
const serverModule = new WorkflowServerModule().configureDiagramModule(new WorkflowDiagramModule(() => GModelStorage), elkLayoutModule);
|
|
38
33
|
|
|
39
|
-
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
launcher.configure(serverModule);
|
|
48
|
-
launcher.start({ port: options.port, host: options.host, path: 'workflow' });
|
|
49
|
-
} else {
|
|
50
|
-
const launcher = appContainer.resolve(SocketServerLauncher);
|
|
51
|
-
launcher.configure(serverModule);
|
|
52
|
-
launcher.start({ port: options.port, host: options.host });
|
|
53
|
-
}
|
|
54
|
-
} catch (error) {
|
|
55
|
-
(logger ?? console).error('Error in workflow server launcher:', error);
|
|
34
|
+
if (options.webSocket) {
|
|
35
|
+
const launcher = appContainer.resolve(WebSocketServerLauncher);
|
|
36
|
+
launcher.configure(serverModule);
|
|
37
|
+
launcher.start({ port: options.port, host: options.host, path: 'workflow' });
|
|
38
|
+
} else {
|
|
39
|
+
const launcher = appContainer.resolve(SocketServerLauncher);
|
|
40
|
+
launcher.configure(serverModule);
|
|
41
|
+
launcher.start({ port: options.port, host: options.host });
|
|
56
42
|
}
|
|
57
43
|
}
|
|
44
|
+
|
|
45
|
+
launch(process.argv).catch(error => console.error('Error in workflow server launcher:', error));
|
package/src/node/index.ts
CHANGED
|
@@ -13,7 +13,5 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
launch(process.argv);
|
|
16
|
+
export * from '../common/index';
|
|
17
|
+
export * from './workflow-cli-parser';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2023 EclipseSource and others.
|
|
2
|
+
* Copyright (c) 2022-2023 EclipseSource and others.
|
|
3
3
|
*
|
|
4
4
|
* This program and the accompanying materials are made available under the
|
|
5
5
|
* terms of the Eclipse Public License v. 2.0 which is available at
|