@eclipse-glsp-examples/workflow-server 1.1.0-next.3d7585d.42 → 1.1.0-next.42963d6.55

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.
Files changed (63) hide show
  1. package/README.md +18 -0
  2. package/browser.d.ts +16 -0
  3. package/browser.js +18 -0
  4. package/lib/browser/app.d.ts +16 -0
  5. package/lib/browser/app.d.ts.map +1 -1
  6. package/lib/browser/app.js +9 -14
  7. package/lib/browser/app.js.map +1 -1
  8. package/lib/browser/index.d.ts +2 -1
  9. package/lib/browser/index.d.ts.map +1 -1
  10. package/lib/browser/index.js +16 -3
  11. package/lib/browser/index.js.map +1 -1
  12. package/lib/common/graph-extension.js +1 -1
  13. package/lib/common/graph-extension.js.map +1 -1
  14. package/lib/common/handler/create-task-handler.d.ts.map +1 -1
  15. package/lib/common/handler/create-task-handler.js +0 -1
  16. package/lib/common/handler/create-task-handler.js.map +1 -1
  17. package/lib/common/index.d.ts +50 -0
  18. package/lib/common/index.d.ts.map +1 -0
  19. package/lib/common/index.js +66 -0
  20. package/lib/common/index.js.map +1 -0
  21. package/lib/common/taskedit/edit-task-operation-handler.d.ts +53 -0
  22. package/lib/common/taskedit/edit-task-operation-handler.d.ts.map +1 -0
  23. package/lib/common/taskedit/edit-task-operation-handler.js +97 -0
  24. package/lib/common/taskedit/edit-task-operation-handler.js.map +1 -0
  25. package/lib/common/taskedit/task-edit-context-provider.d.ts +25 -0
  26. package/lib/common/taskedit/task-edit-context-provider.d.ts.map +1 -0
  27. package/lib/common/taskedit/task-edit-context-provider.js +77 -0
  28. package/lib/common/taskedit/task-edit-context-provider.js.map +1 -0
  29. package/lib/common/taskedit/task-edit-validator.d.ts +21 -0
  30. package/lib/common/taskedit/task-edit-validator.d.ts.map +1 -0
  31. package/lib/common/taskedit/task-edit-validator.js +60 -0
  32. package/lib/common/taskedit/task-edit-validator.js.map +1 -0
  33. package/lib/common/workflow-diagram-module.d.ts +3 -1
  34. package/lib/common/workflow-diagram-module.d.ts.map +1 -1
  35. package/lib/common/workflow-diagram-module.js +12 -0
  36. package/lib/common/workflow-diagram-module.js.map +1 -1
  37. package/lib/node/app.d.ts +16 -1
  38. package/lib/node/app.d.ts.map +1 -1
  39. package/lib/node/app.js +14 -13
  40. package/lib/node/app.js.map +1 -1
  41. package/lib/node/index.d.ts +2 -1
  42. package/lib/node/index.d.ts.map +1 -1
  43. package/lib/node/index.js +16 -3
  44. package/lib/node/index.js.map +1 -1
  45. package/lib/node/workflow-cli-parser.d.ts +21 -0
  46. package/lib/node/workflow-cli-parser.d.ts.map +1 -0
  47. package/lib/node/workflow-cli-parser.js +26 -0
  48. package/lib/node/workflow-cli-parser.js.map +1 -0
  49. package/node.d.ts +16 -0
  50. package/node.js +18 -0
  51. package/package.json +9 -6
  52. package/src/browser/app.ts +15 -18
  53. package/src/browser/index.ts +2 -4
  54. package/src/common/graph-extension.ts +1 -1
  55. package/src/common/handler/create-task-handler.ts +0 -1
  56. package/src/common/index.ts +50 -0
  57. package/src/common/taskedit/edit-task-operation-handler.ts +118 -0
  58. package/src/common/taskedit/task-edit-context-provider.ts +66 -0
  59. package/src/common/taskedit/task-edit-validator.ts +45 -0
  60. package/src/common/workflow-diagram-module.ts +16 -0
  61. package/src/node/app.ts +19 -24
  62. package/src/node/index.ts +2 -4
  63. package/src/node/workflow-cli-parser.ts +29 -0
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ var TaskEditContextActionProvider_1;
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ exports.TaskEditContextActionProvider = void 0;
14
+ /********************************************************************************
15
+ * Copyright (c) 2023 EclipseSource and others.
16
+ *
17
+ * This program and the accompanying materials are made available under the
18
+ * terms of the Eclipse Public License v. 2.0 which is available at
19
+ * http://www.eclipse.org/legal/epl-2.0.
20
+ *
21
+ * This Source Code may also be made available under the following Secondary
22
+ * Licenses when the conditions for such availability set forth in the Eclipse
23
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
24
+ * with the GNU Classpath Exception which is available at
25
+ * https://www.gnu.org/software/classpath/license.html.
26
+ *
27
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
28
+ ********************************************************************************/
29
+ const server_1 = require("@eclipse-glsp/server");
30
+ const inversify_1 = require("inversify");
31
+ const graph_extension_1 = require("../graph-extension");
32
+ const edit_task_operation_handler_1 = require("./edit-task-operation-handler");
33
+ let TaskEditContextActionProvider = TaskEditContextActionProvider_1 = class TaskEditContextActionProvider {
34
+ constructor() {
35
+ this.contextId = 'task-editor';
36
+ }
37
+ getActions(editorContext) {
38
+ var _a, _b;
39
+ const text = (_b = (_a = editorContext.args) === null || _a === void 0 ? void 0 : _a['text'].toString()) !== null && _b !== void 0 ? _b : '';
40
+ const taskNode = this.modelState.index.findParentElement(editorContext.selectedElementIds[0], (0, server_1.toTypeGuard)(graph_extension_1.TaskNode));
41
+ if (!taskNode) {
42
+ return [];
43
+ }
44
+ if (text.startsWith(TaskEditContextActionProvider_1.TYPE_PREFIX)) {
45
+ const taskId = taskNode.id;
46
+ return [
47
+ { label: 'type:automated', actions: [edit_task_operation_handler_1.EditTaskOperation.create({ taskId, feature: 'taskType', value: 'automated' })] },
48
+ { label: 'type:manual', actions: [edit_task_operation_handler_1.EditTaskOperation.create({ taskId, feature: 'taskType', value: 'manual' })] }
49
+ ];
50
+ }
51
+ if (text.startsWith(TaskEditContextActionProvider_1.DURATION_PREFIX)) {
52
+ return [];
53
+ }
54
+ const taskType = taskNode.type.substring(TaskEditContextActionProvider_1.TASK_PREFIX.length);
55
+ const duration = taskNode.duration;
56
+ return [
57
+ { label: 'type:', actions: [], text: `${TaskEditContextActionProvider_1.TYPE_PREFIX}${taskType}` },
58
+ {
59
+ label: 'duration:',
60
+ actions: [],
61
+ text: `${TaskEditContextActionProvider_1.DURATION_PREFIX}${duration !== null && duration !== void 0 ? duration : 0}`
62
+ }
63
+ ];
64
+ }
65
+ };
66
+ TaskEditContextActionProvider.DURATION_PREFIX = 'duration:';
67
+ TaskEditContextActionProvider.TYPE_PREFIX = 'type:';
68
+ TaskEditContextActionProvider.TASK_PREFIX = 'task:';
69
+ __decorate([
70
+ (0, inversify_1.inject)(server_1.ModelState),
71
+ __metadata("design:type", Object)
72
+ ], TaskEditContextActionProvider.prototype, "modelState", void 0);
73
+ TaskEditContextActionProvider = TaskEditContextActionProvider_1 = __decorate([
74
+ (0, inversify_1.injectable)()
75
+ ], TaskEditContextActionProvider);
76
+ exports.TaskEditContextActionProvider = TaskEditContextActionProvider;
77
+ //# sourceMappingURL=task-edit-context-provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task-edit-context-provider.js","sourceRoot":"","sources":["../../../src/common/taskedit/task-edit-context-provider.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,iDAAmI;AACnI,yCAA+C;AAC/C,wDAA8C;AAC9C,+EAAkE;AAG3D,IAAM,6BAA6B,qCAAnC,MAAM,6BAA6B;IAAnC;QAKM,cAAS,GAAG,aAAa,CAAC;IAmCvC,CAAC;IA9BG,UAAU,CAAC,aAA4B;;QACnC,MAAM,IAAI,GAAG,MAAA,MAAA,aAAa,CAAC,IAAI,0CAAG,MAAM,EAAE,QAAQ,EAAE,mCA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AR,QAAQ,cAAR,QAAQ,GAAI,CAAC,EAAE;aAC3E;SACJ,CAAC;IACN,CAAC;;AAtCe,6CAAe,GAAG,WAAW,CAAC;AAC9B,yCAAW,GAAG,OAAO,CAAC;AACtB,yCAAW,GAAG,OAAO,CAAC;AAItC;IAAC,IAAA,kBAAM,EAAC,mBAAU,CAAC;;iEACc;AARxB,6BAA6B;IADzC,IAAA,sBAAU,GAAE;GACA,6BAA6B,CAwCzC;AAxCY,sEAA6B"}
@@ -0,0 +1,21 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2023 EclipseSource 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 { ContextEditValidator, RequestEditValidationAction, ValidationStatus } from '@eclipse-glsp/server';
17
+ export declare class TaskEditValidator implements ContextEditValidator {
18
+ readonly contextId = "task-editor";
19
+ validate(action: RequestEditValidationAction): ValidationStatus;
20
+ }
21
+ //# sourceMappingURL=task-edit-validator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task-edit-validator.d.ts","sourceRoot":"","sources":["../../../src/common/taskedit/task-edit-validator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,oBAAoB,EAAE,2BAA2B,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAI3G,qBACa,iBAAkB,YAAW,oBAAoB;IAC1D,QAAQ,CAAC,SAAS,iBAAiB;IAEnC,QAAQ,CAAC,MAAM,EAAE,2BAA2B,GAAG,gBAAgB;CAqBlE"}
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.TaskEditValidator = void 0;
10
+ /********************************************************************************
11
+ * Copyright (c) 2023 EclipseSource and others.
12
+ *
13
+ * This program and the accompanying materials are made available under the
14
+ * terms of the Eclipse Public License v. 2.0 which is available at
15
+ * http://www.eclipse.org/legal/epl-2.0.
16
+ *
17
+ * This Source Code may also be made available under the following Secondary
18
+ * Licenses when the conditions for such availability set forth in the Eclipse
19
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
20
+ * with the GNU Classpath Exception which is available at
21
+ * https://www.gnu.org/software/classpath/license.html.
22
+ *
23
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
24
+ ********************************************************************************/
25
+ const server_1 = require("@eclipse-glsp/server");
26
+ const inversify_1 = require("inversify");
27
+ const task_edit_context_provider_1 = require("./task-edit-context-provider");
28
+ let TaskEditValidator = class TaskEditValidator {
29
+ constructor() {
30
+ this.contextId = 'task-editor';
31
+ }
32
+ validate(action) {
33
+ const text = action.text;
34
+ if (text.startsWith(task_edit_context_provider_1.TaskEditContextActionProvider.DURATION_PREFIX)) {
35
+ const durationString = text.substring(task_edit_context_provider_1.TaskEditContextActionProvider.DURATION_PREFIX.length);
36
+ const duration = Number.parseInt(durationString, 10);
37
+ if (Number.isNaN(duration)) {
38
+ return { severity: server_1.ValidationStatus.Severity.ERROR, message: `'${durationString}' is not a valid number.` };
39
+ }
40
+ else if (duration < 0 || duration > 100) {
41
+ return { severity: server_1.ValidationStatus.Severity.WARNING, message: `'${durationString}' should be between 0 and 100` };
42
+ }
43
+ }
44
+ else if (text.startsWith(task_edit_context_provider_1.TaskEditContextActionProvider.TYPE_PREFIX)) {
45
+ const typeString = text.substring(task_edit_context_provider_1.TaskEditContextActionProvider.TYPE_PREFIX.length);
46
+ if (typeString !== 'automated' && typeString !== 'manual') {
47
+ return {
48
+ severity: server_1.ValidationStatus.Severity.ERROR,
49
+ message: `'Type of task can only be manual or automatic. You entered '${typeString}'.`
50
+ };
51
+ }
52
+ }
53
+ return server_1.ValidationStatus.NONE;
54
+ }
55
+ };
56
+ TaskEditValidator = __decorate([
57
+ (0, inversify_1.injectable)()
58
+ ], TaskEditValidator);
59
+ exports.TaskEditValidator = TaskEditValidator;
60
+ //# sourceMappingURL=task-edit-validator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task-edit-validator.js","sourceRoot":"","sources":["../../../src/common/taskedit/task-edit-validator.ts"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,iDAA2G;AAC3G,yCAAuC;AACvC,6EAA6E;AAGtE,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAAvB;QACM,cAAS,GAAG,aAAa,CAAC;IAuBvC,CAAC;IArBG,QAAQ,CAAC,MAAmC;QACxC,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;QACzB,IAAI,IAAI,CAAC,UAAU,CAAC,0DAA6B,CAAC,eAAe,CAAC,EAAE;YAChE,MAAM,cAAc,GAAG,IAAI,CAAC,SAAS,CAAC,0DAA6B,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;YAC5F,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC;YACrD,IAAI,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE;gBACxB,OAAO,EAAE,QAAQ,EAAE,yBAAgB,CAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,cAAc,0BAA0B,EAAE,CAAC;aAC/G;iBAAM,IAAI,QAAQ,GAAG,CAAC,IAAI,QAAQ,GAAG,GAAG,EAAE;gBACvC,OAAO,EAAE,QAAQ,EAAE,yBAAgB,CAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,cAAc,+BAA+B,EAAE,CAAC;aACtH;SACJ;aAAM,IAAI,IAAI,CAAC,UAAU,CAAC,0DAA6B,CAAC,WAAW,CAAC,EAAE;YACnE,MAAM,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,0DAA6B,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;YACpF,IAAI,UAAU,KAAK,WAAW,IAAI,UAAU,KAAK,QAAQ,EAAE;gBACvD,OAAO;oBACH,QAAQ,EAAE,yBAAgB,CAAC,QAAQ,CAAC,KAAK;oBACzC,OAAO,EAAE,+DAA+D,UAAU,IAAI;iBACzF,CAAC;aACL;SACJ;QACD,OAAO,yBAAgB,CAAC,IAAI,CAAC;IACjC,CAAC;CACJ,CAAA;AAxBY,iBAAiB;IAD7B,IAAA,sBAAU,GAAE;GACA,iBAAiB,CAwB7B;AAxBY,8CAAiB"}
@@ -13,7 +13,7 @@
13
13
  *
14
14
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
15
  ********************************************************************************/
16
- import { BindingTarget, CommandPaletteActionProvider, ContextMenuItemProvider, DiagramConfiguration, GLSPServer, GModelDiagramModule, InstanceMultiBinding, LabelEditValidator, ModelValidator, MultiBinding, NavigationTargetProvider, NavigationTargetResolver, OperationHandlerConstructor, PopupModelFactory, ServerModule, SourceModelStorage } from '@eclipse-glsp/server';
16
+ import { BindingTarget, CommandPaletteActionProvider, ContextActionsProvider, ContextEditValidator, ContextMenuItemProvider, DiagramConfiguration, GLSPServer, GModelDiagramModule, InstanceMultiBinding, LabelEditValidator, ModelValidator, MultiBinding, NavigationTargetProvider, NavigationTargetResolver, OperationHandlerConstructor, PopupModelFactory, ServerModule, SourceModelStorage } from '@eclipse-glsp/server';
17
17
  export declare class WorkflowServerModule extends ServerModule {
18
18
  protected bindGLSPServer(): BindingTarget<GLSPServer>;
19
19
  }
@@ -30,5 +30,7 @@ export declare class WorkflowDiagramModule extends GModelDiagramModule {
30
30
  protected bindPopupModelFactory(): BindingTarget<PopupModelFactory> | undefined;
31
31
  protected bindModelValidator(): BindingTarget<ModelValidator> | undefined;
32
32
  protected configureNavigationTargetProviders(binding: MultiBinding<NavigationTargetProvider>): void;
33
+ protected configureContextActionProviders(binding: MultiBinding<ContextActionsProvider>): void;
34
+ protected configureContextEditValidators(binding: MultiBinding<ContextEditValidator>): void;
33
35
  }
34
36
  //# sourceMappingURL=workflow-diagram-module.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"workflow-diagram-module.d.ts","sourceRoot":"","sources":["../../src/common/workflow-diagram-module.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EACH,aAAa,EACb,4BAA4B,EAC5B,uBAAuB,EACvB,oBAAoB,EACpB,UAAU,EACV,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,EAClB,cAAc,EACd,YAAY,EACZ,wBAAwB,EACxB,wBAAwB,EACxB,2BAA2B,EAC3B,iBAAiB,EACjB,YAAY,EACZ,kBAAkB,EACrB,MAAM,sBAAsB,CAAC;AAuB9B,qBACa,oBAAqB,SAAQ,YAAY;cAC/B,cAAc,IAAI,aAAa,CAAC,UAAU,CAAC;CAGjE;AAED,qBACa,qBAAsB,SAAQ,mBAAmB;IACvC,sBAAsB,EAAE,MAAM,aAAa,CAAC,kBAAkB,CAAC;gBAA/D,sBAAsB,EAAE,MAAM,aAAa,CAAC,kBAAkB,CAAC;IAIlF,IAAI,WAAW,IAAI,MAAM,CAExB;cAEkB,0BAA0B,C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BAA0B,CAAC,OAAO,EAAE,oBAAoB,CAAC,2BAA2B,CAAC,GAAG,IAAI;IAc/G,SAAS,CAAC,wBAAwB,IAAI,aAAa,CAAC,oBAAoB,CAAC;cAItD,4BAA4B,IAAI,aAAa,CAAC,wBAAwB,CAAC,GAAG,SAAS;cAInF,2BAA2B,IAAI,aAAa,CAAC,uBAAuB,CAAC,GAAG,SAAS;cAIjF,gCAAgC,IAAI,aAAa,CAAC,4BAA4B,CAAC,GAAG,SAAS;cAI3F,sBAAsB,IAAI,aAAa,CAAC,kBAAkB,CAAC,GAAG,SAAS;cAIvE,qBAAqB,IAAI,aAAa,CAAC,iBAAiB,CAAC,GAAG,SAAS;cAIrE,kBAAkB,IAAI,aAAa,CAAC,cAAc,CAAC,GAAG,SAAS;cAI/D,kCAAkC,CAAC,OAAO,EAAE,YAAY,CAAC,wBAAwB,CAAC,GAAG,IAAI;cAOzF,+BAA+B,CAAC,OAAO,EAAE,YAAY,CAAC,sBAAsB,CAAC,GAAG,IAAI;cAKpF,8BAA8B,CAAC,OAAO,EAAE,YAAY,CAAC,oBAAoB,CAAC,GAAG,IAAI;CAIvG"}
@@ -44,6 +44,9 @@ const node_documentation_navigation_target_provider_1 = require("./provider/node
44
44
  const previous_node_navigation_target_provider_1 = require("./provider/previous-node-navigation-target-provider");
45
45
  const workflow_command_palette_action_provider_1 = require("./provider/workflow-command-palette-action-provider");
46
46
  const workflow_context_menu_item_provider_1 = require("./provider/workflow-context-menu-item-provider");
47
+ const edit_task_operation_handler_1 = require("./taskedit/edit-task-operation-handler");
48
+ const task_edit_context_provider_1 = require("./taskedit/task-edit-context-provider");
49
+ const task_edit_validator_1 = require("./taskedit/task-edit-validator");
47
50
  const workflow_diagram_configuration_1 = require("./workflow-diagram-configuration");
48
51
  const workflow_glsp_server_1 = require("./workflow-glsp-server");
49
52
  const workflow_popup_factory_1 = require("./workflow-popup-factory");
@@ -75,6 +78,7 @@ let WorkflowDiagramModule = class WorkflowDiagramModule extends server_1.GModelD
75
78
  binding.add(create_merge_node_handler_1.CreateMergeNodeHandler);
76
79
  binding.add(create_decision_node_handler_1.CreateDecisionNodeHandler);
77
80
  binding.add(create_category_handler_1.CreateCategoryHandler);
81
+ binding.add(edit_task_operation_handler_1.EditTaskOperationHandler);
78
82
  }
79
83
  bindDiagramConfiguration() {
80
84
  return workflow_diagram_configuration_1.WorkflowDiagramConfiguration;
@@ -103,6 +107,14 @@ let WorkflowDiagramModule = class WorkflowDiagramModule extends server_1.GModelD
103
107
  binding.add(previous_node_navigation_target_provider_1.PreviousNodeNavigationTargetProvider);
104
108
  binding.add(node_documentation_navigation_target_provider_1.NodeDocumentationNavigationTargetProvider);
105
109
  }
110
+ configureContextActionProviders(binding) {
111
+ super.configureContextActionProviders(binding);
112
+ binding.add(task_edit_context_provider_1.TaskEditContextActionProvider);
113
+ }
114
+ configureContextEditValidators(binding) {
115
+ super.configureContextEditValidators(binding);
116
+ binding.add(task_edit_validator_1.TaskEditValidator);
117
+ }
106
118
  };
107
119
  WorkflowDiagramModule = __decorate([
108
120
  (0, inversify_1.injectable)(),
@@ -1 +1 @@
1
- {"version":3,"file":"workflow-diagram-module.js","sourceRoot":"","sources":["../../src/common/workflow-diagram-module.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,iDAiB8B;AAC9B,yCAAuC;AACvC,2FAAqF;AACrF,+EAA0E;AAC1E,yFAAmF;AACnF,uEAAkE;AAClE,iFAA2E;AAC3E,iFAA2E;AAC3E,qFAA+E;AAC/E,mFAA6E;AAC7E,yFAAmF;AACnF,6FAAuF;AACvF,gFAA2E;AAC3E,qGAA+F;AAC/F,0GAAmG;AACnG,4HAAqH;AACrH,kHAA2G;AAC3G,kHAA2G;AAC3G,wGAAiG;AACjG,qFAAgF;AAChF,iEAA4D;AAC5D,qEAAgE;AAGzD,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,qBAAY;IAC/B,cAAc;QAC7B,OAAO,y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AAsB,CAAC;IAClC,CAAC;IAEkB,kCAAkC,CAAC,OAA+C;QACjG,KAAK,CAAC,kCAAkC,CAAC,OAAO,CAAC,CAAC;QAClD,OAAO,CAAC,GAAG,CAAC,uEAAgC,CAAC,CAAC;QAC9C,OAAO,CAAC,GAAG,CAAC,+EAAoC,CAAC,CAAC;QAClD,OAAO,CAAC,GAAG,CAAC,yFAAyC,CAAC,CAAC;IAC3D,CAAC;CACJ,CAAA;AAxDY,qBAAqB;IADjC,IAAA,sBAAU,GAAE;;GACA,qBAAqB,CAwDjC;AAxDY,sDAAqB"}
1
+ {"version":3,"file":"workflow-diagram-module.js","sourceRoot":"","sources":["../../src/common/workflow-diagram-module.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,iDAmB8B;AAC9B,yCAAuC;AACvC,2FAAqF;AACrF,+EAA0E;AAC1E,yFAAmF;AACnF,uEAAkE;AAClE,iFAA2E;AAC3E,iFAA2E;AAC3E,qFAA+E;AAC/E,mFAA6E;AAC7E,yFAAmF;AACnF,6FAAuF;AACvF,gFAA2E;AAC3E,qGAA+F;AAC/F,0GAAmG;AACnG,4HAAqH;AACrH,kHAA2G;AAC3G,kHAA2G;AAC3G,wGAAiG;AACjG,wFAAkF;AAClF,sFAAsF;AACtF,wEAAmE;AACnE,qFAAgF;AAChF,iEAA4D;AAC5D,qEAAgE;AAGzD,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,qBAAY;IAC/B,cAAc;QAC7B,OAAO,yCAAkB,CAAC;IAC9B,CAAC;CACJ,CAAA;AAJY,oBAAoB;IADhC,IAAA,sBAAU,GAAE;GACA,oBAAoB,CAIhC;AAJY,oDAAoB;AAO1B,IAAM,qBAAqB,GAA3B,MAAM,qBAAsB,SAAQ,4BAAmB;IAC1D,YAAmB,sBAA+D;QAC9E,KAAK,EAAE,CAAC;QADO,2BAAsB,GAAtB,sBAAsB,CAAyC;IAElF,CAAC;IAED,IAAI,WA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CAAC,yFAAyC,CAAC,CAAC;IAC3D,CAAC;IAEkB,+BAA+B,CAAC,OAA6C;QAC5F,KAAK,CAAC,+BAA+B,CAAC,OAAO,CAAC,CAAC;QAC/C,OAAO,CAAC,GAAG,CAAC,0DAA6B,CAAC,CAAC;IAC/C,CAAC;IAEkB,8BAA8B,CAAC,OAA2C;QACzF,KAAK,CAAC,8BAA8B,CAAC,OAAO,CAAC,CAAC;QAC9C,OAAO,CAAC,GAAG,CAAC,uCAAiB,CAAC,CAAC;IACnC,CAAC;CACJ,CAAA;AAnEY,qBAAqB;IADjC,IAAA,sBAAU,GAAE;;GACA,qBAAqB,CAmEjC;AAnEY,sDAAqB"}
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":"AA4BA,wBAAsB,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAqB3D"}
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,27 +15,29 @@ 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");
22
22
  const workflow_layout_configurator_1 = require("../common/layout/workflow-layout-configurator");
23
23
  const workflow_diagram_module_1 = require("../common/workflow-diagram-module");
24
+ const workflow_cli_parser_1 = require("./workflow-cli-parser");
24
25
  async function launch(argv) {
25
- let logger;
26
- try {
27
- const options = (0, node_1.createSocketCliParser)().parse(argv);
28
- const appContainer = new inversify_1.Container();
29
- appContainer.load((0, node_1.createAppModule)(options));
30
- logger = appContainer.get(node_1.LoggerFactory)('WorkflowServerApp');
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' });
35
+ }
36
+ else {
31
37
  const launcher = appContainer.resolve(node_1.SocketServerLauncher);
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
38
  launcher.configure(serverModule);
35
39
  launcher.start({ port: options.port, host: options.host });
36
40
  }
37
- catch (error) {
38
- (logger !== null && logger !== void 0 ? logger : console).error('Error in workflow server launcher:', error);
39
- }
40
41
  }
41
- exports.launch = launch;
42
+ launch(process.argv).catch(error => console.error('Error in workflow server launcher:', error));
42
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;AAEzF,KAAK,UAAU,MAAM,CAAC,IAAe;IACxC,IAAI,MAA0B,CAAC;IAC/B,IAAI;QACA,MAAM,OAAO,GAAG,IAAA,4BAAqB,GAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACpD,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;QAC7E,MAAM,QAAQ,GAAG,YAAY,CAAC,OAAO,CAAC,2BAAoB,CAAC,CAAC;QAC5D,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,C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AuB,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"}
@@ -0,0 +1,21 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2022-2023 EclipseSource 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 { CliParser, SocketLaunchOptions } from '@eclipse-glsp/server/node';
17
+ export interface WorkflowLaunchOptions extends SocketLaunchOptions {
18
+ webSocket: boolean;
19
+ }
20
+ export declare function createWorkflowCliParser<O extends WorkflowLaunchOptions = WorkflowLaunchOptions>(defaultOptions?: WorkflowLaunchOptions): CliParser<O>;
21
+ //# sourceMappingURL=workflow-cli-parser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflow-cli-parser.d.ts","sourceRoot":"","sources":["../../src/node/workflow-cli-parser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAE,SAAS,EAAqD,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAE9H,MAAM,WAAW,qBAAsB,SAAQ,mBAAmB;IAC9D,SAAS,EAAE,OAAO,CAAC;CACtB;AAED,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,qBAAqB,GAAG,qBAAqB,EAC3F,cAAc,GAAE,qBAA2E,GAC5F,SAAS,CAAC,CAAC,CAAC,CAId"}
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ /********************************************************************************
3
+ * Copyright (c) 2022-2023 EclipseSource 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
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.createWorkflowCliParser = void 0;
19
+ const node_1 = require("@eclipse-glsp/server/node");
20
+ function createWorkflowCliParser(defaultOptions = Object.assign({ webSocket: false }, node_1.defaultSocketLaunchOptions)) {
21
+ const parser = (0, node_1.createSocketCliParser)(defaultOptions);
22
+ parser.command.option('-w , --webSocket', 'Flag to use websocket launcher instead of default launcher', false);
23
+ return parser;
24
+ }
25
+ exports.createWorkflowCliParser = createWorkflowCliParser;
26
+ //# sourceMappingURL=workflow-cli-parser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflow-cli-parser.js","sourceRoot":"","sources":["../../src/node/workflow-cli-parser.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;AAElF,oDAA8H;AAM9H,SAAgB,uBAAuB,CACnC,iCAA0C,SAAS,EAAE,KAAK,IAAK,iCAA0B,CAAE;IAE3F,MAAM,MAAM,GAAG,IAAA,4BAAqB,EAAI,cAAc,CAAC,CAAC;IACxD,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,kBAAkB,EAAE,4DAA4D,EAAE,KAAK,CAAC,CAAC;IAC/G,OAAO,MAAM,CAAC;AAClB,CAAC;AAND,0DAMC"}
package/node.d.ts ADDED
@@ -0,0 +1,16 @@
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
+ 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.3d7585d.42+3d7585d",
3
+ "version": "1.1.0-next.42963d6.55+42963d6",
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",
@@ -49,12 +53,11 @@
49
53
  "lint": "eslint --ext .ts,.tsx ./src",
50
54
  "lint:ci": "yarn lint -o eslint.xml -f checkstyle",
51
55
  "prepare": "yarn clean && yarn build",
52
- "start": "node --enable-source-maps bundle/wf-glsp-server-node.js",
53
56
  "watch": "tsc -w"
54
57
  },
55
58
  "dependencies": {
56
- "@eclipse-glsp/layout-elk": "1.1.0-next.3d7585d.42+3d7585d",
57
- "@eclipse-glsp/server": "1.1.0-next.3d7585d.42+3d7585d"
59
+ "@eclipse-glsp/layout-elk": "1.1.0-next.42963d6.55+42963d6",
60
+ "@eclipse-glsp/server": "1.1.0-next.42963d6.55+42963d6"
58
61
  },
59
62
  "devDependencies": {
60
63
  "source-map-loader": "^4.0.1",
@@ -64,5 +67,5 @@
64
67
  "publishConfig": {
65
68
  "access": "public"
66
69
  },
67
- "gitHead": "3d7585df49f6df95ea707e55cfc8e435b578cea3"
70
+ "gitHead": "42963d62ee53ffd12004fd0cf3b89c6e5292871e"
68
71
  }
@@ -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';
@@ -49,7 +49,7 @@ export class TaskNode extends GNode {
49
49
  references: string;
50
50
 
51
51
  static override builder(): TaskNodeBuilder {
52
- return new TaskNodeBuilder(TaskNode).layout('vbox').addArgs(ArgsUtil.cornerRadius(5));
52
+ return new TaskNodeBuilder(TaskNode).layout('vbox').addArgs(ArgsUtil.cornerRadius(5)).addCssClass('task');
53
53
  }
54
54
  }
55
55
 
@@ -29,7 +29,6 @@ export abstract class CreateTaskHandler extends CreateWorkflowNodeOperationHandl
29
29
  protected builder(point: Point | undefined): TaskNodeBuilder {
30
30
  return TaskNode.builder()
31
31
  .position(point ?? Point.ORIGIN)
32
- .addCssClass('task')
33
32
  .name(this.label.replace(' ', '') + this.modelState.index.getAllByClass(TaskNode).length)
34
33
  .type(this.elementTypeIds[0])
35
34
  .taskType(ModelTypes.toNodeType(this.elementTypeIds[0]))