@eclipse-glsp-examples/workflow-server 1.1.0-next.dc6b980.47 → 1.1.0-next.e3f33d3.49

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 ADDED
@@ -0,0 +1,16 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2023 STMicroelectronics and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the Eclipse Public License v. 2.0 which is available at
6
+ * http://www.eclipse.org/legal/epl-2.0.
7
+ *
8
+ * This Source Code may also be made available under the following Secondary
9
+ * Licenses when the conditions for such availability set forth in the Eclipse
10
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ * with the GNU Classpath Exception which is available at
12
+ * https://www.gnu.org/software/classpath/license.html.
13
+ *
14
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
+ ********************************************************************************/
16
+ export * from './lib/browser/index';
package/browser.js ADDED
@@ -0,0 +1,18 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2023 STMicroelectronics and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the Eclipse Public License v. 2.0 which is available at
6
+ * http://www.eclipse.org/legal/epl-2.0.
7
+ *
8
+ * This Source Code may also be made available under the following Secondary
9
+ * Licenses when the conditions for such availability set forth in the Eclipse
10
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ * with the GNU Classpath Exception which is available at
12
+ * https://www.gnu.org/software/classpath/license.html.
13
+ *
14
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
+ ********************************************************************************/
16
+ 'use strict';
17
+
18
+ module.exports = require('./lib/browser/index');
@@ -1,2 +1,18 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2022-2023 STMicroelectronics and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the Eclipse Public License v. 2.0 which is available at
6
+ * http://www.eclipse.org/legal/epl-2.0.
7
+ *
8
+ * This Source Code may also be made available under the following Secondary
9
+ * Licenses when the conditions for such availability set forth in the Eclipse
10
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ * with the GNU Classpath Exception which is available at
12
+ * https://www.gnu.org/software/classpath/license.html.
13
+ *
14
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
+ ********************************************************************************/
16
+ import 'reflect-metadata';
1
17
  export declare function launch(argv?: string[]): Promise<void>;
2
18
  //# sourceMappingURL=app.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../src/browser/app.ts"],"names":[],"mappings":"AAsBA,wBAAsB,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAsB3D"}
1
+ {"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../src/browser/app.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,kBAAkB,CAAC;AAS1B,wBAAsB,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAe3D"}
@@ -16,6 +16,7 @@ exports.launch = void 0;
16
16
  *
17
17
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
18
18
  ********************************************************************************/
19
+ require("reflect-metadata");
19
20
  const layout_elk_1 = require("@eclipse-glsp/layout-elk");
20
21
  const browser_1 = require("@eclipse-glsp/server/browser");
21
22
  const inversify_1 = require("inversify");
@@ -23,20 +24,14 @@ const workflow_layout_configurator_1 = require("../common/layout/workflow-layout
23
24
  const workflow_diagram_module_1 = require("../common/workflow-diagram-module");
24
25
  const mock_model_storage_1 = require("./mock-model-storage");
25
26
  async function launch(argv) {
26
- let logger;
27
- try {
28
- const appContainer = new inversify_1.Container();
29
- appContainer.load((0, browser_1.createAppModule)({ logLevel: browser_1.LogLevel.info }));
30
- logger = appContainer.get(browser_1.LoggerFactory)('WorkflowServerApp');
31
- const launcher = appContainer.resolve(browser_1.WorkerServerLauncher);
32
- const elkLayoutModule = (0, layout_elk_1.configureELKLayoutModule)({ algorithms: ['layered'], layoutConfigurator: workflow_layout_configurator_1.WorkflowLayoutConfigurator });
33
- const serverModule = new workflow_diagram_module_1.WorkflowServerModule().configureDiagramModule(new workflow_diagram_module_1.WorkflowDiagramModule(() => mock_model_storage_1.WorkflowMockModelStorage), elkLayoutModule);
34
- launcher.configure(serverModule);
35
- await launcher.start({});
36
- }
37
- catch (error) {
38
- (logger !== null && logger !== void 0 ? logger : console).error('Error in workflow server launcher:', error);
39
- }
27
+ const appContainer = new inversify_1.Container();
28
+ appContainer.load((0, browser_1.createAppModule)({ logLevel: browser_1.LogLevel.info }));
29
+ const launcher = appContainer.resolve(browser_1.WorkerServerLauncher);
30
+ const elkLayoutModule = (0, layout_elk_1.configureELKLayoutModule)({ algorithms: ['layered'], layoutConfigurator: workflow_layout_configurator_1.WorkflowLayoutConfigurator });
31
+ const serverModule = new workflow_diagram_module_1.WorkflowServerModule().configureDiagramModule(new workflow_diagram_module_1.WorkflowDiagramModule(() => mock_model_storage_1.WorkflowMockModelStorage), elkLayoutModule);
32
+ launcher.configure(serverModule);
33
+ await launcher.start({});
40
34
  }
41
35
  exports.launch = launch;
36
+ launch().catch(error => console.error('Error in workflow server launcher:', error));
42
37
  //# sourceMappingURL=app.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"app.js","sourceRoot":"","sources":["../../src/browser/app.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,yDAAoE;AACpE,0DAAsH;AACtH,yCAAsC;AACtC,gGAA2F;AAC3F,+EAAgG;AAChG,6DAAgE;AAEzD,KAAK,UAAU,MAAM,CAAC,IAAe;IACxC,IAAI,MAA0B,CAAC;IAE/B,IAAI;QACA,MAAM,YAAY,GAAG,IAAI,qBAAS,EAAE,CAAC;QACrC,YAAY,CAAC,IAAI,CAAC,IAAA,yBAAe,EAAC,EAAE,QAAQ,EAAE,kBAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;QAEhE,MAAM,GAAG,YAAY,CAAC,GAAG,CAAgB,uBAAa,CAAC,CAAC,mBAAmB,CAAC,CAAC;QAC7E,MAAM,QAAQ,GAAG,YAAY,CAAC,OAAO,CAAC,8BAAoB,CAAC,CAAC;QAC5D,MAAM,eAAe,GAAG,IAAA,qCAAwB,EAAC,EAAE,UAAU,EAAE,CAAC,SAAS,CAAC,EAAE,kBAAkB,EAAE,yDAA0B,EAAE,CAAC,CAAC;QAE9H,MAAM,YAAY,GAAG,IAAI,8CAAoB,EAAE,CAAC,sBAAsB,CAClE,IAAI,+CAAqB,CAAC,GAAG,EAAE,CAAC,6CAAwB,CAAC,EACzD,eAAe,CAClB,CAAC;QAEF,QAAQ,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;QAEjC,MAAM,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;KAC5B;IAAC,OAAO,KAAK,EAAE;QACZ,CAAC,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,OAAO,CAAC,CAAC,KAAK,CAAC,oCAAoC,EAAE,KAAK,CAAC,CAAC;KAC1E;AACL,CAAC;AAtBD,wBAsBC"}
1
+ {"version":3,"file":"app.js","sourceRoot":"","sources":["../../src/browser/app.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,4BAA0B;AAE1B,yDAAoE;AACpE,0DAA+F;AAC/F,yCAAsC;AACtC,gGAA2F;AAC3F,+EAAgG;AAChG,6DAAgE;AAEzD,KAAK,UAAU,MAAM,CAAC,IAAe;IACxC,MAAM,YAAY,GAAG,IAAI,qBAAS,EAAE,CAAC;IACrC,YAAY,CAAC,IAAI,CAAC,IAAA,yBAAe,EAAC,EAAE,QAAQ,EAAE,kBAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;IAEhE,MAAM,QAAQ,GAAG,YAAY,CAAC,OAAO,CAAC,8BAAoB,CAAC,CAAC;IAC5D,MAAM,eAAe,GAAG,IAAA,qCAAwB,EAAC,EAAE,UAAU,EAAE,CAAC,SAAS,CAAC,EAAE,kBAAkB,EAAE,yDAA0B,EAAE,CAAC,CAAC;IAE9H,MAAM,YAAY,GAAG,IAAI,8CAAoB,EAAE,CAAC,sBAAsB,CAClE,IAAI,+CAAqB,CAAC,GAAG,EAAE,CAAC,6CAAwB,CAAC,EACzD,eAAe,CAClB,CAAC;IAEF,QAAQ,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;IAEjC,MAAM,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;AAC7B,CAAC;AAfD,wBAeC;AAED,MAAM,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,oCAAoC,EAAE,KAAK,CAAC,CAAC,CAAC"}
@@ -13,5 +13,6 @@
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';
16
+ export * from '../common/index';
17
+ export * from './mock-model-storage';
17
18
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/browser/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/browser/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC"}
@@ -1,4 +1,18 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
2
16
  Object.defineProperty(exports, "__esModule", { value: true });
3
17
  /********************************************************************************
4
18
  * Copyright (c) 2022-2023 EclipseSource and others.
@@ -15,7 +29,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
15
29
  *
16
30
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
17
31
  ********************************************************************************/
18
- require("reflect-metadata");
19
- const app_1 = require("./app");
20
- (0, app_1.launch)();
32
+ __exportStar(require("../common/index"), exports);
33
+ __exportStar(require("./mock-model-storage"), exports);
21
34
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/browser/index.ts"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,4BAA0B;AAC1B,+BAA+B;AAE/B,IAAA,YAAM,GAAE,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/browser/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,kDAAgC;AAChC,uDAAqC"}
@@ -0,0 +1,50 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2023 STMicroelectronics and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the Eclipse Public License v. 2.0 which is available at
6
+ * http://www.eclipse.org/legal/epl-2.0.
7
+ *
8
+ * This Source Code may also be made available under the following Secondary
9
+ * Licenses when the conditions for such availability set forth in the Eclipse
10
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ * with the GNU Classpath Exception which is available at
12
+ * https://www.gnu.org/software/classpath/license.html.
13
+ *
14
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
+ ********************************************************************************/
16
+ export * from './graph-extension';
17
+ export * from './handler/create-activity-node-handler';
18
+ export * from './handler/create-automated-task-handler';
19
+ export * from './handler/create-category-handler';
20
+ export * from './handler/create-decision-node-handler';
21
+ export * from './handler/create-edge-handler';
22
+ export * from './handler/create-fork-node-handler';
23
+ export * from './handler/create-fork-or-join-node-handler';
24
+ export * from './handler/create-join-node-handler';
25
+ export * from './handler/create-manual-task-handler';
26
+ export * from './handler/create-merge-node-handler';
27
+ export * from './handler/create-task-handler';
28
+ export * from './handler/create-weighted-edge-handler';
29
+ export * from './handler/create-workflow-node-operation-handler';
30
+ export * from './handler/grid-snapper';
31
+ export * from './index';
32
+ export * from './labeledit/workflow-label-edit-validator';
33
+ export * from './layout/workflow-layout-configurator';
34
+ export * from './marker/workflow-model-validator';
35
+ export * from './model/workflow-navigation-target-resolver';
36
+ export * from './provider/abstract-next-or-previous-navigation-target-provider';
37
+ export * from './provider/next-node-navigation-target-provider';
38
+ export * from './provider/node-documentation-navigation-target-provider';
39
+ export * from './provider/previous-node-navigation-target-provider';
40
+ export * from './provider/workflow-command-palette-action-provider';
41
+ export * from './provider/workflow-context-menu-item-provider';
42
+ export * from './taskedit/edit-task-operation-handler';
43
+ export * from './taskedit/task-edit-context-provider';
44
+ export * from './taskedit/task-edit-validator';
45
+ export * from './util/model-types';
46
+ export * from './workflow-diagram-configuration';
47
+ export * from './workflow-diagram-module';
48
+ export * from './workflow-glsp-server';
49
+ export * from './workflow-popup-factory';
50
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,cAAc,mBAAmB,CAAC;AAClC,cAAc,wCAAwC,CAAC;AACvD,cAAc,yCAAyC,CAAC;AACxD,cAAc,mCAAmC,CAAC;AAClD,cAAc,wCAAwC,CAAC;AACvD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,oCAAoC,CAAC;AACnD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,oCAAoC,CAAC;AACnD,cAAc,sCAAsC,CAAC;AACrD,cAAc,qCAAqC,CAAC;AACpD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wCAAwC,CAAC;AACvD,cAAc,kDAAkD,CAAC;AACjE,cAAc,wBAAwB,CAAC;AACvC,cAAc,SAAS,CAAC;AACxB,cAAc,2CAA2C,CAAC;AAC1D,cAAc,uCAAuC,CAAC;AACtD,cAAc,mCAAmC,CAAC;AAClD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,iEAAiE,CAAC;AAChF,cAAc,iDAAiD,CAAC;AAChE,cAAc,0DAA0D,CAAC;AACzE,cAAc,qDAAqD,CAAC;AACpE,cAAc,qDAAqD,CAAC;AACpE,cAAc,gDAAgD,CAAC;AAC/D,cAAc,wCAAwC,CAAC;AACvD,cAAc,uCAAuC,CAAC;AACtD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oBAAoB,CAAC;AACnC,cAAc,kCAAkC,CAAC;AACjD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC"}
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ /********************************************************************************
3
+ * Copyright (c) 2023 STMicroelectronics and others.
4
+ *
5
+ * This program and the accompanying materials are made available under the
6
+ * terms of the Eclipse Public License v. 2.0 which is available at
7
+ * http://www.eclipse.org/legal/epl-2.0.
8
+ *
9
+ * This Source Code may also be made available under the following Secondary
10
+ * Licenses when the conditions for such availability set forth in the Eclipse
11
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
+ * with the GNU Classpath Exception which is available at
13
+ * https://www.gnu.org/software/classpath/license.html.
14
+ *
15
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
16
+ ********************************************************************************/
17
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
18
+ if (k2 === undefined) k2 = k;
19
+ var desc = Object.getOwnPropertyDescriptor(m, k);
20
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
21
+ desc = { enumerable: true, get: function() { return m[k]; } };
22
+ }
23
+ Object.defineProperty(o, k2, desc);
24
+ }) : (function(o, m, k, k2) {
25
+ if (k2 === undefined) k2 = k;
26
+ o[k2] = m[k];
27
+ }));
28
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
29
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
30
+ };
31
+ Object.defineProperty(exports, "__esModule", { value: true });
32
+ __exportStar(require("./graph-extension"), exports);
33
+ __exportStar(require("./handler/create-activity-node-handler"), exports);
34
+ __exportStar(require("./handler/create-automated-task-handler"), exports);
35
+ __exportStar(require("./handler/create-category-handler"), exports);
36
+ __exportStar(require("./handler/create-decision-node-handler"), exports);
37
+ __exportStar(require("./handler/create-edge-handler"), exports);
38
+ __exportStar(require("./handler/create-fork-node-handler"), exports);
39
+ __exportStar(require("./handler/create-fork-or-join-node-handler"), exports);
40
+ __exportStar(require("./handler/create-join-node-handler"), exports);
41
+ __exportStar(require("./handler/create-manual-task-handler"), exports);
42
+ __exportStar(require("./handler/create-merge-node-handler"), exports);
43
+ __exportStar(require("./handler/create-task-handler"), exports);
44
+ __exportStar(require("./handler/create-weighted-edge-handler"), exports);
45
+ __exportStar(require("./handler/create-workflow-node-operation-handler"), exports);
46
+ __exportStar(require("./handler/grid-snapper"), exports);
47
+ __exportStar(require("./index"), exports);
48
+ __exportStar(require("./labeledit/workflow-label-edit-validator"), exports);
49
+ __exportStar(require("./layout/workflow-layout-configurator"), exports);
50
+ __exportStar(require("./marker/workflow-model-validator"), exports);
51
+ __exportStar(require("./model/workflow-navigation-target-resolver"), exports);
52
+ __exportStar(require("./provider/abstract-next-or-previous-navigation-target-provider"), exports);
53
+ __exportStar(require("./provider/next-node-navigation-target-provider"), exports);
54
+ __exportStar(require("./provider/node-documentation-navigation-target-provider"), exports);
55
+ __exportStar(require("./provider/previous-node-navigation-target-provider"), exports);
56
+ __exportStar(require("./provider/workflow-command-palette-action-provider"), exports);
57
+ __exportStar(require("./provider/workflow-context-menu-item-provider"), exports);
58
+ __exportStar(require("./taskedit/edit-task-operation-handler"), exports);
59
+ __exportStar(require("./taskedit/task-edit-context-provider"), exports);
60
+ __exportStar(require("./taskedit/task-edit-validator"), exports);
61
+ __exportStar(require("./util/model-types"), exports);
62
+ __exportStar(require("./workflow-diagram-configuration"), exports);
63
+ __exportStar(require("./workflow-diagram-module"), exports);
64
+ __exportStar(require("./workflow-glsp-server"), exports);
65
+ __exportStar(require("./workflow-popup-factory"), exports);
66
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;;;;;;;;AAElF,oDAAkC;AAClC,yEAAuD;AACvD,0EAAwD;AACxD,oEAAkD;AAClD,yEAAuD;AACvD,gEAA8C;AAC9C,qEAAmD;AACnD,6EAA2D;AAC3D,qEAAmD;AACnD,uEAAqD;AACrD,sEAAoD;AACpD,gEAA8C;AAC9C,yEAAuD;AACvD,mFAAiE;AACjE,yDAAuC;AACvC,0CAAwB;AACxB,4EAA0D;AAC1D,wEAAsD;AACtD,oEAAkD;AAClD,8EAA4D;AAC5D,kGAAgF;AAChF,kFAAgE;AAChE,2FAAyE;AACzE,sFAAoE;AACpE,sFAAoE;AACpE,iFAA+D;AAC/D,yEAAuD;AACvD,wEAAsD;AACtD,iEAA+C;AAC/C,qDAAmC;AACnC,mEAAiD;AACjD,4DAA0C;AAC1C,yDAAuC;AACvC,2DAAyC"}
package/lib/node/app.d.ts CHANGED
@@ -1,2 +1,17 @@
1
- export declare function launch(argv?: string[]): Promise<void>;
1
+ /********************************************************************************
2
+ * Copyright (c) 2022-2023 STMicroelectronics and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the Eclipse Public License v. 2.0 which is available at
6
+ * http://www.eclipse.org/legal/epl-2.0.
7
+ *
8
+ * This Source Code may also be made available under the following Secondary
9
+ * Licenses when the conditions for such availability set forth in the Eclipse
10
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ * with the GNU Classpath Exception which is available at
12
+ * https://www.gnu.org/software/classpath/license.html.
13
+ *
14
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
+ ********************************************************************************/
16
+ import 'reflect-metadata';
2
17
  //# sourceMappingURL=app.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../src/node/app.ts"],"names":[],"mappings":"AA6BA,wBAAsB,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CA2B3D"}
1
+ {"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../src/node/app.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,kBAAkB,CAAC"}
package/lib/node/app.js CHANGED
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.launch = void 0;
4
3
  /********************************************************************************
5
4
  * Copyright (c) 2022-2023 STMicroelectronics and others.
6
5
  *
@@ -16,6 +15,7 @@ exports.launch = void 0;
16
15
  *
17
16
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
18
17
  ********************************************************************************/
18
+ require("reflect-metadata");
19
19
  const layout_elk_1 = require("@eclipse-glsp/layout-elk");
20
20
  const node_1 = require("@eclipse-glsp/server/node");
21
21
  const inversify_1 = require("inversify");
@@ -23,28 +23,21 @@ const workflow_layout_configurator_1 = require("../common/layout/workflow-layout
23
23
  const workflow_diagram_module_1 = require("../common/workflow-diagram-module");
24
24
  const workflow_cli_parser_1 = require("./workflow-cli-parser");
25
25
  async function launch(argv) {
26
- let logger;
27
- try {
28
- const options = (0, workflow_cli_parser_1.createWorkflowCliParser)().parse(argv);
29
- const appContainer = new inversify_1.Container();
30
- appContainer.load((0, node_1.createAppModule)(options));
31
- logger = appContainer.get(node_1.LoggerFactory)('WorkflowServerApp');
32
- const elkLayoutModule = (0, layout_elk_1.configureELKLayoutModule)({ algorithms: ['layered'], layoutConfigurator: workflow_layout_configurator_1.WorkflowLayoutConfigurator });
33
- const serverModule = new workflow_diagram_module_1.WorkflowServerModule().configureDiagramModule(new workflow_diagram_module_1.WorkflowDiagramModule(() => node_1.GModelStorage), elkLayoutModule);
34
- if (options.webSocket) {
35
- const launcher = appContainer.resolve(node_1.WebSocketServerLauncher);
36
- launcher.configure(serverModule);
37
- launcher.start({ port: options.port, host: options.host, path: 'workflow' });
38
- }
39
- else {
40
- const launcher = appContainer.resolve(node_1.SocketServerLauncher);
41
- launcher.configure(serverModule);
42
- launcher.start({ port: options.port, host: options.host });
43
- }
26
+ const options = (0, workflow_cli_parser_1.createWorkflowCliParser)().parse(argv);
27
+ const appContainer = new inversify_1.Container();
28
+ appContainer.load((0, node_1.createAppModule)(options));
29
+ const elkLayoutModule = (0, layout_elk_1.configureELKLayoutModule)({ algorithms: ['layered'], layoutConfigurator: workflow_layout_configurator_1.WorkflowLayoutConfigurator });
30
+ const serverModule = new workflow_diagram_module_1.WorkflowServerModule().configureDiagramModule(new workflow_diagram_module_1.WorkflowDiagramModule(() => node_1.GModelStorage), elkLayoutModule);
31
+ if (options.webSocket) {
32
+ const launcher = appContainer.resolve(node_1.WebSocketServerLauncher);
33
+ launcher.configure(serverModule);
34
+ launcher.start({ port: options.port, host: options.host, path: 'workflow' });
44
35
  }
45
- catch (error) {
46
- (logger !== null && logger !== void 0 ? logger : console).error('Error in workflow server launcher:', error);
36
+ else {
37
+ const launcher = appContainer.resolve(node_1.SocketServerLauncher);
38
+ launcher.configure(serverModule);
39
+ launcher.start({ port: options.port, host: options.host });
47
40
  }
48
41
  }
49
- exports.launch = launch;
42
+ launch(process.argv).catch(error => console.error('Error in workflow server launcher:', error));
50
43
  //# sourceMappingURL=app.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"app.js","sourceRoot":"","sources":["../../src/node/app.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,yDAAoE;AACpE,oDAOmC;AACnC,yCAAsC;AACtC,gGAA2F;AAC3F,+EAAgG;AAChG,+DAAgE;AAEzD,KAAK,UAAU,MAAM,CAAC,IAAe;IACxC,IAAI,MAA0B,CAAC;IAC/B,IAAI;QACA,MAAM,OAAO,GAAG,IAAA,6CAAuB,GAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACtD,MAAM,YAAY,GAAG,IAAI,qBAAS,EAAE,CAAC;QACrC,YAAY,CAAC,IAAI,CAAC,IAAA,sBAAe,EAAC,OAAO,CAAC,CAAC,CAAC;QAE5C,MAAM,GAAG,YAAY,CAAC,GAAG,CAAgB,oBAAa,CAAC,CAAC,mBAAmB,CAAC,CAAC;QAE7E,MAAM,eAAe,GAAG,IAAA,qCAAwB,EAAC,EAAE,UAAU,EAAE,CAAC,SAAS,CAAC,EAAE,kBAAkB,EAAE,yDAA0B,EAAE,CAAC,CAAC;QAC9H,MAAM,YAAY,GAAG,IAAI,8CAAoB,EAAE,CAAC,sBAAsB,CAClE,IAAI,+CAAqB,CAAC,GAAG,EAAE,CAAC,oBAAa,CAAC,EAC9C,eAAe,CAClB,CAAC;QAEF,IAAI,OAAO,CAAC,SAAS,EAAE;YACnB,MAAM,QAAQ,GAAG,YAAY,CAAC,OAAO,CAAC,8BAAuB,CAAC,CAAC;YAC/D,QAAQ,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;YACjC,QAAQ,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC;SAChF;aAAM;YACH,MAAM,QAAQ,GAAG,YAAY,CAAC,OAAO,CAAC,2BAAoB,CAAC,CAAC;YAC5D,QAAQ,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;YACjC,QAAQ,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;SAC9D;KACJ;IAAC,OAAO,KAAK,EAAE;QACZ,CAAC,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,OAAO,CAAC,CAAC,KAAK,CAAC,oCAAoC,EAAE,KAAK,CAAC,CAAC;KAC1E;AACL,CAAC;AA3BD,wBA2BC"}
1
+ {"version":3,"file":"app.js","sourceRoot":"","sources":["../../src/node/app.ts"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,4BAA0B;AAE1B,yDAAoE;AACpE,oDAA0H;AAC1H,yCAAsC;AAEtC,gGAA2F;AAC3F,+EAAgG;AAChG,+DAAgE;AAEhE,KAAK,UAAU,MAAM,CAAC,IAAe;IACjC,MAAM,OAAO,GAAG,IAAA,6CAAuB,GAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACtD,MAAM,YAAY,GAAG,IAAI,qBAAS,EAAE,CAAC;IACrC,YAAY,CAAC,IAAI,CAAC,IAAA,sBAAe,EAAC,OAAO,CAAC,CAAC,CAAC;IAE5C,MAAM,eAAe,GAAG,IAAA,qCAAwB,EAAC,EAAE,UAAU,EAAE,CAAC,SAAS,CAAC,EAAE,kBAAkB,EAAE,yDAA0B,EAAE,CAAC,CAAC;IAC9H,MAAM,YAAY,GAAG,IAAI,8CAAoB,EAAE,CAAC,sBAAsB,CAAC,IAAI,+CAAqB,CAAC,GAAG,EAAE,CAAC,oBAAa,CAAC,EAAE,eAAe,CAAC,CAAC;IAExI,IAAI,OAAO,CAAC,SAAS,EAAE;QACnB,MAAM,QAAQ,GAAG,YAAY,CAAC,OAAO,CAAC,8BAAuB,CAAC,CAAC;QAC/D,QAAQ,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;QACjC,QAAQ,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC;KAChF;SAAM;QACH,MAAM,QAAQ,GAAG,YAAY,CAAC,OAAO,CAAC,2BAAoB,CAAC,CAAC;QAC5D,QAAQ,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;QACjC,QAAQ,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;KAC9D;AACL,CAAC;AAED,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,oCAAoC,EAAE,KAAK,CAAC,CAAC,CAAC"}
@@ -13,5 +13,6 @@
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';
16
+ export * from '../common/index';
17
+ export * from './workflow-cli-parser';
17
18
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC"}
package/lib/node/index.js CHANGED
@@ -1,4 +1,18 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
2
16
  Object.defineProperty(exports, "__esModule", { value: true });
3
17
  /********************************************************************************
4
18
  * Copyright (c) 2022-2023 EclipseSource and others.
@@ -15,7 +29,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
15
29
  *
16
30
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
17
31
  ********************************************************************************/
18
- require("reflect-metadata");
19
- const app_1 = require("./app");
20
- (0, app_1.launch)(process.argv);
32
+ __exportStar(require("../common/index"), exports);
33
+ __exportStar(require("./workflow-cli-parser"), exports);
21
34
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,4BAA0B;AAC1B,+BAA+B;AAE/B,IAAA,YAAM,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,kDAAgC;AAChC,wDAAsC"}
package/node.d.ts ADDED
@@ -0,0 +1,16 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2023 STMicroelectronics and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the Eclipse Public License v. 2.0 which is available at
6
+ * http://www.eclipse.org/legal/epl-2.0.
7
+ *
8
+ * This Source Code may also be made available under the following Secondary
9
+ * Licenses when the conditions for such availability set forth in the Eclipse
10
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ * with the GNU Classpath Exception which is available at
12
+ * https://www.gnu.org/software/classpath/license.html.
13
+ *
14
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
+ ********************************************************************************/
16
+ export * from './lib/node/index';
package/node.js ADDED
@@ -0,0 +1,18 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2023 STMicroelectronics and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the Eclipse Public License v. 2.0 which is available at
6
+ * http://www.eclipse.org/legal/epl-2.0.
7
+ *
8
+ * This Source Code may also be made available under the following Secondary
9
+ * Licenses when the conditions for such availability set forth in the Eclipse
10
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ * with the GNU Classpath Exception which is available at
12
+ * https://www.gnu.org/software/classpath/license.html.
13
+ *
14
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
+ ********************************************************************************/
16
+ 'use strict';
17
+
18
+ module.exports = require('./lib/node/index');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eclipse-glsp-examples/workflow-server",
3
- "version": "1.1.0-next.dc6b980.47+dc6b980",
3
+ "version": "1.1.0-next.e3f33d3.49+e3f33d3",
4
4
  "description": "GLSP node server for the workflow example",
5
5
  "keywords": [
6
6
  "eclipse",
@@ -39,7 +39,11 @@
39
39
  "types": "lib/index",
40
40
  "files": [
41
41
  "lib",
42
- "src"
42
+ "src",
43
+ "node.js",
44
+ "node.d.ts",
45
+ "browser.d.ts",
46
+ "browser.js"
43
47
  ],
44
48
  "scripts": {
45
49
  "build": "tsc -b && yarn bundle",
@@ -54,8 +58,8 @@
54
58
  "watch": "tsc -w"
55
59
  },
56
60
  "dependencies": {
57
- "@eclipse-glsp/layout-elk": "1.1.0-next.dc6b980.47+dc6b980",
58
- "@eclipse-glsp/server": "1.1.0-next.dc6b980.47+dc6b980"
61
+ "@eclipse-glsp/layout-elk": "1.1.0-next.e3f33d3.49+e3f33d3",
62
+ "@eclipse-glsp/server": "1.1.0-next.e3f33d3.49+e3f33d3"
59
63
  },
60
64
  "devDependencies": {
61
65
  "source-map-loader": "^4.0.1",
@@ -65,5 +69,5 @@
65
69
  "publishConfig": {
66
70
  "access": "public"
67
71
  },
68
- "gitHead": "dc6b980a473afbce8e304a2b68efe6877069dc97"
72
+ "gitHead": "e3f33d3eff98bbfe4bba8a9a334f9cc7d9354904"
69
73
  }
@@ -13,33 +13,30 @@
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 { createAppModule, Logger, LoggerFactory, LogLevel, WorkerServerLauncher } from '@eclipse-glsp/server/browser';
19
+ import { createAppModule, LogLevel, WorkerServerLauncher } from '@eclipse-glsp/server/browser';
18
20
  import { Container } from 'inversify';
19
21
  import { WorkflowLayoutConfigurator } from '../common/layout/workflow-layout-configurator';
20
22
  import { WorkflowDiagramModule, WorkflowServerModule } from '../common/workflow-diagram-module';
21
23
  import { WorkflowMockModelStorage } from './mock-model-storage';
22
24
 
23
25
  export async function launch(argv?: string[]): Promise<void> {
24
- let logger: Logger | undefined;
25
-
26
- try {
27
- const appContainer = new Container();
28
- appContainer.load(createAppModule({ logLevel: LogLevel.info }));
26
+ const appContainer = new Container();
27
+ appContainer.load(createAppModule({ logLevel: LogLevel.info }));
29
28
 
30
- logger = appContainer.get<LoggerFactory>(LoggerFactory)('WorkflowServerApp');
31
- const launcher = appContainer.resolve(WorkerServerLauncher);
32
- const elkLayoutModule = configureELKLayoutModule({ algorithms: ['layered'], layoutConfigurator: WorkflowLayoutConfigurator });
29
+ const launcher = appContainer.resolve(WorkerServerLauncher);
30
+ const elkLayoutModule = configureELKLayoutModule({ algorithms: ['layered'], layoutConfigurator: WorkflowLayoutConfigurator });
33
31
 
34
- const serverModule = new WorkflowServerModule().configureDiagramModule(
35
- new WorkflowDiagramModule(() => WorkflowMockModelStorage),
36
- elkLayoutModule
37
- );
32
+ const serverModule = new WorkflowServerModule().configureDiagramModule(
33
+ new WorkflowDiagramModule(() => WorkflowMockModelStorage),
34
+ elkLayoutModule
35
+ );
38
36
 
39
- launcher.configure(serverModule);
37
+ launcher.configure(serverModule);
40
38
 
41
- await launcher.start({});
42
- } catch (error) {
43
- (logger ?? console).error('Error in workflow server launcher:', error);
44
- }
39
+ await launcher.start({});
45
40
  }
41
+
42
+ launch().catch(error => console.error('Error in workflow server launcher:', error));
@@ -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
- import 'reflect-metadata';
17
- import { launch } from './app';
18
-
19
- launch();
16
+ export * from '../common/index';
17
+ export * from './mock-model-storage';
@@ -0,0 +1,50 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2023 STMicroelectronics and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the Eclipse Public License v. 2.0 which is available at
6
+ * http://www.eclipse.org/legal/epl-2.0.
7
+ *
8
+ * This Source Code may also be made available under the following Secondary
9
+ * Licenses when the conditions for such availability set forth in the Eclipse
10
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ * with the GNU Classpath Exception which is available at
12
+ * https://www.gnu.org/software/classpath/license.html.
13
+ *
14
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
+ ********************************************************************************/
16
+
17
+ export * from './graph-extension';
18
+ export * from './handler/create-activity-node-handler';
19
+ export * from './handler/create-automated-task-handler';
20
+ export * from './handler/create-category-handler';
21
+ export * from './handler/create-decision-node-handler';
22
+ export * from './handler/create-edge-handler';
23
+ export * from './handler/create-fork-node-handler';
24
+ export * from './handler/create-fork-or-join-node-handler';
25
+ export * from './handler/create-join-node-handler';
26
+ export * from './handler/create-manual-task-handler';
27
+ export * from './handler/create-merge-node-handler';
28
+ export * from './handler/create-task-handler';
29
+ export * from './handler/create-weighted-edge-handler';
30
+ export * from './handler/create-workflow-node-operation-handler';
31
+ export * from './handler/grid-snapper';
32
+ export * from './index';
33
+ export * from './labeledit/workflow-label-edit-validator';
34
+ export * from './layout/workflow-layout-configurator';
35
+ export * from './marker/workflow-model-validator';
36
+ export * from './model/workflow-navigation-target-resolver';
37
+ export * from './provider/abstract-next-or-previous-navigation-target-provider';
38
+ export * from './provider/next-node-navigation-target-provider';
39
+ export * from './provider/node-documentation-navigation-target-provider';
40
+ export * from './provider/previous-node-navigation-target-provider';
41
+ export * from './provider/workflow-command-palette-action-provider';
42
+ export * from './provider/workflow-context-menu-item-provider';
43
+ export * from './taskedit/edit-task-operation-handler';
44
+ export * from './taskedit/task-edit-context-provider';
45
+ export * from './taskedit/task-edit-validator';
46
+ export * from './util/model-types';
47
+ export * from './workflow-diagram-configuration';
48
+ export * from './workflow-diagram-module';
49
+ export * from './workflow-glsp-server';
50
+ export * from './workflow-popup-factory';
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
- export async function launch(argv?: string[]): Promise<void> {
31
- let logger: Logger | undefined;
32
- try {
33
- const options = createWorkflowCliParser().parse(argv);
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
- logger = appContainer.get<LoggerFactory>(LoggerFactory)('WorkflowServerApp');
31
+ const elkLayoutModule = configureELKLayoutModule({ algorithms: ['layered'], layoutConfigurator: WorkflowLayoutConfigurator });
32
+ const serverModule = new WorkflowServerModule().configureDiagramModule(new WorkflowDiagramModule(() => GModelStorage), elkLayoutModule);
38
33
 
39
- const elkLayoutModule = configureELKLayoutModule({ algorithms: ['layered'], layoutConfigurator: WorkflowLayoutConfigurator });
40
- const serverModule = new WorkflowServerModule().configureDiagramModule(
41
- new WorkflowDiagramModule(() => GModelStorage),
42
- elkLayoutModule
43
- );
44
-
45
- if (options.webSocket) {
46
- const launcher = appContainer.resolve(WebSocketServerLauncher);
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
- import 'reflect-metadata';
17
- import { launch } from './app';
18
-
19
- launch(process.argv);
16
+ export * from '../common/index';
17
+ export * from './workflow-cli-parser';