@eclipse-glsp/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.
Files changed (222) hide show
  1. package/lib/browser/di/app-module.d.ts +2 -7
  2. package/lib/browser/di/app-module.d.ts.map +1 -1
  3. package/lib/browser/di/app-module.js +5 -30
  4. package/lib/browser/di/app-module.js.map +1 -1
  5. package/lib/browser/index.d.ts +0 -1
  6. package/lib/browser/index.d.ts.map +1 -1
  7. package/lib/browser/index.js +0 -1
  8. package/lib/browser/index.js.map +1 -1
  9. package/lib/browser/launch/worker-server-launcher.d.ts +4 -4
  10. package/lib/browser/launch/worker-server-launcher.d.ts.map +1 -1
  11. package/lib/browser/launch/worker-server-launcher.js +5 -11
  12. package/lib/browser/launch/worker-server-launcher.js.map +1 -1
  13. package/lib/common/actions/client-action-handler.d.ts +1 -2
  14. package/lib/common/actions/client-action-handler.d.ts.map +1 -1
  15. package/lib/common/actions/client-action-handler.js +17 -2
  16. package/lib/common/actions/client-action-handler.js.map +1 -1
  17. package/lib/common/command/command-stack.d.ts +16 -1
  18. package/lib/common/command/command-stack.d.ts.map +1 -1
  19. package/lib/common/command/command-stack.js +0 -15
  20. package/lib/common/command/command-stack.js.map +1 -1
  21. package/lib/common/di/client-session-module.d.ts +1 -1
  22. package/lib/common/di/client-session-module.d.ts.map +1 -1
  23. package/lib/common/di/client-session-module.js +2 -2
  24. package/lib/common/di/client-session-module.js.map +1 -1
  25. package/lib/common/di/glsp-module.d.ts +3 -1
  26. package/lib/common/di/glsp-module.d.ts.map +1 -1
  27. package/lib/common/di/glsp-module.js +0 -15
  28. package/lib/common/di/glsp-module.js.map +1 -1
  29. package/lib/common/di/multi-binding.d.ts +19 -4
  30. package/lib/common/di/multi-binding.d.ts.map +1 -1
  31. package/lib/common/di/multi-binding.js.map +1 -1
  32. package/lib/common/di/server-module.d.ts +1 -6
  33. package/lib/common/di/server-module.d.ts.map +1 -1
  34. package/lib/common/di/server-module.js +21 -17
  35. package/lib/common/di/server-module.js.map +1 -1
  36. package/lib/common/index.d.ts +1 -2
  37. package/lib/common/index.d.ts.map +1 -1
  38. package/lib/common/index.js +1 -2
  39. package/lib/common/index.js.map +1 -1
  40. package/lib/common/launch/glsp-server-launcher.d.ts +1 -1
  41. package/lib/common/launch/glsp-server-launcher.d.ts.map +1 -1
  42. package/lib/common/launch/glsp-server-launcher.js +2 -2
  43. package/lib/common/launch/glsp-server-launcher.js.map +1 -1
  44. package/lib/common/launch/jsonrpc-server-launcher.d.ts +38 -0
  45. package/lib/common/launch/jsonrpc-server-launcher.d.ts.map +1 -0
  46. package/lib/common/launch/jsonrpc-server-launcher.js +84 -0
  47. package/lib/common/launch/jsonrpc-server-launcher.js.map +1 -0
  48. package/lib/common/protocol/glsp-server.d.ts +4 -104
  49. package/lib/common/protocol/glsp-server.d.ts.map +1 -1
  50. package/lib/common/protocol/glsp-server.js +13 -20
  51. package/lib/common/protocol/glsp-server.js.map +1 -1
  52. package/lib/common/session/client-session-factory.d.ts +1 -2
  53. package/lib/common/session/client-session-factory.d.ts.map +1 -1
  54. package/lib/common/session/client-session-factory.js +17 -2
  55. package/lib/common/session/client-session-factory.js.map +1 -1
  56. package/lib/common/session/client-session-manager.d.ts +1 -3
  57. package/lib/common/session/client-session-manager.d.ts.map +1 -1
  58. package/lib/common/session/client-session-manager.js.map +1 -1
  59. package/lib/{browser/di → common/utils}/console-logger.d.ts +7 -1
  60. package/lib/common/utils/console-logger.d.ts.map +1 -0
  61. package/lib/{browser/di → common/utils}/console-logger.js +26 -8
  62. package/lib/common/utils/console-logger.js.map +1 -0
  63. package/lib/common/utils/logger.d.ts +21 -0
  64. package/lib/common/utils/logger.d.ts.map +1 -1
  65. package/lib/common/utils/logger.js +12 -1
  66. package/lib/common/utils/logger.js.map +1 -1
  67. package/lib/node/di/app-module.d.ts +2 -2
  68. package/lib/node/di/app-module.d.ts.map +1 -1
  69. package/lib/node/di/app-module.js +10 -35
  70. package/lib/node/di/app-module.js.map +1 -1
  71. package/lib/node/launch/cli-parser.d.ts +2 -3
  72. package/lib/node/launch/cli-parser.d.ts.map +1 -1
  73. package/lib/node/launch/cli-parser.js.map +1 -1
  74. package/lib/node/launch/socket-cli-parser.js +1 -1
  75. package/lib/node/launch/socket-cli-parser.js.map +1 -1
  76. package/lib/node/launch/socket-server-launcher.d.ts +2 -23
  77. package/lib/node/launch/socket-server-launcher.d.ts.map +1 -1
  78. package/lib/node/launch/socket-server-launcher.js +8 -28
  79. package/lib/node/launch/socket-server-launcher.js.map +1 -1
  80. package/lib/node/launch/websocket-server-launcher.d.ts +2 -8
  81. package/lib/node/launch/websocket-server-launcher.d.ts.map +1 -1
  82. package/lib/node/launch/websocket-server-launcher.js +4 -28
  83. package/lib/node/launch/websocket-server-launcher.js.map +1 -1
  84. package/package.json +4 -4
  85. package/src/browser/di/app-module.ts +4 -32
  86. package/src/browser/index.ts +0 -1
  87. package/src/browser/launch/worker-server-launcher.ts +7 -13
  88. package/src/common/actions/client-action-handler.ts +1 -2
  89. package/src/common/command/command-stack.ts +1 -1
  90. package/src/common/di/client-session-module.ts +1 -1
  91. package/src/common/di/glsp-module.ts +3 -1
  92. package/src/common/di/multi-binding.ts +4 -5
  93. package/src/common/di/server-module.ts +6 -21
  94. package/src/common/index.ts +1 -2
  95. package/src/common/launch/glsp-server-launcher.ts +2 -2
  96. package/src/common/launch/jsonrpc-server-launcher.ts +95 -0
  97. package/src/common/protocol/glsp-server.spec.ts +7 -4
  98. package/src/common/protocol/glsp-server.ts +17 -132
  99. package/src/common/session/client-session-factory.spec.ts +1 -1
  100. package/src/common/session/client-session-factory.ts +1 -2
  101. package/src/common/session/client-session-manager.ts +1 -3
  102. package/src/common/test/mock-util.ts +5 -5
  103. package/src/{browser/di → common/utils}/console-logger.ts +19 -1
  104. package/src/common/utils/logger.ts +16 -1
  105. package/src/node/di/app-module.ts +4 -13
  106. package/src/node/launch/cli-parser.ts +2 -3
  107. package/src/node/launch/socket-cli-parser.ts +1 -1
  108. package/src/node/launch/socket-server-launcher.spec.ts +6 -0
  109. package/src/node/launch/socket-server-launcher.ts +8 -30
  110. package/src/node/launch/websocket-server-launcher.ts +5 -31
  111. package/lib/browser/di/console-logger.d.ts.map +0 -1
  112. package/lib/browser/di/console-logger.js.map +0 -1
  113. package/lib/common/actions/action-dispatcher.spec.d.ts +0 -2
  114. package/lib/common/actions/action-dispatcher.spec.d.ts.map +0 -1
  115. package/lib/common/actions/action-dispatcher.spec.js +0 -264
  116. package/lib/common/actions/action-dispatcher.spec.js.map +0 -1
  117. package/lib/common/actions/action-handler-registry.spec.d.ts +0 -2
  118. package/lib/common/actions/action-handler-registry.spec.d.ts.map +0 -1
  119. package/lib/common/actions/action-handler-registry.spec.js +0 -50
  120. package/lib/common/actions/action-handler-registry.spec.js.map +0 -1
  121. package/lib/common/actions/global-action-provider.spec.d.ts +0 -2
  122. package/lib/common/actions/global-action-provider.spec.d.ts.map +0 -1
  123. package/lib/common/actions/global-action-provider.spec.js +0 -70
  124. package/lib/common/actions/global-action-provider.spec.js.map +0 -1
  125. package/lib/common/command/command-stack.spec.d.ts +0 -2
  126. package/lib/common/command/command-stack.spec.d.ts.map +0 -1
  127. package/lib/common/command/command-stack.spec.js +0 -207
  128. package/lib/common/command/command-stack.spec.js.map +0 -1
  129. package/lib/common/command/command.spec.d.ts +0 -2
  130. package/lib/common/command/command.spec.d.ts.map +0 -1
  131. package/lib/common/command/command.spec.js +0 -86
  132. package/lib/common/command/command.spec.js.map +0 -1
  133. package/lib/common/command/recording-command.spec.d.ts +0 -17
  134. package/lib/common/command/recording-command.spec.d.ts.map +0 -1
  135. package/lib/common/command/recording-command.spec.js +0 -62
  136. package/lib/common/command/recording-command.spec.js.map +0 -1
  137. package/lib/common/di/binding-target.spec.d.ts +0 -2
  138. package/lib/common/di/binding-target.spec.d.ts.map +0 -1
  139. package/lib/common/di/binding-target.spec.js +0 -121
  140. package/lib/common/di/binding-target.spec.js.map +0 -1
  141. package/lib/common/di/multi-bindings.spec.d.ts +0 -2
  142. package/lib/common/di/multi-bindings.spec.d.ts.map +0 -1
  143. package/lib/common/di/multi-bindings.spec.js +0 -137
  144. package/lib/common/di/multi-bindings.spec.js.map +0 -1
  145. package/lib/common/diagram/request-type-hints-action-handler.spec.d.ts +0 -2
  146. package/lib/common/diagram/request-type-hints-action-handler.spec.d.ts.map +0 -1
  147. package/lib/common/diagram/request-type-hints-action-handler.spec.js +0 -57
  148. package/lib/common/diagram/request-type-hints-action-handler.spec.js.map +0 -1
  149. package/lib/common/features/contextactions/context-actions-provider-registry.spec.d.ts +0 -2
  150. package/lib/common/features/contextactions/context-actions-provider-registry.spec.d.ts.map +0 -1
  151. package/lib/common/features/contextactions/context-actions-provider-registry.spec.js +0 -34
  152. package/lib/common/features/contextactions/context-actions-provider-registry.spec.js.map +0 -1
  153. package/lib/common/features/contextactions/request-context-actions-handler.spec.d.ts +0 -2
  154. package/lib/common/features/contextactions/request-context-actions-handler.spec.d.ts.map +0 -1
  155. package/lib/common/features/contextactions/request-context-actions-handler.spec.js +0 -63
  156. package/lib/common/features/contextactions/request-context-actions-handler.spec.js.map +0 -1
  157. package/lib/common/features/contextactions/tool-palette-item-provider.spec.d.ts +0 -2
  158. package/lib/common/features/contextactions/tool-palette-item-provider.spec.d.ts.map +0 -1
  159. package/lib/common/features/contextactions/tool-palette-item-provider.spec.js +0 -48
  160. package/lib/common/features/contextactions/tool-palette-item-provider.spec.js.map +0 -1
  161. package/lib/common/features/directediting/context-edit-validator-registry.spec.d.ts +0 -2
  162. package/lib/common/features/directediting/context-edit-validator-registry.spec.d.ts.map +0 -1
  163. package/lib/common/features/directediting/context-edit-validator-registry.spec.js +0 -44
  164. package/lib/common/features/directediting/context-edit-validator-registry.spec.js.map +0 -1
  165. package/lib/common/features/directediting/request-edit-validation-handler.spec.d.ts +0 -2
  166. package/lib/common/features/directediting/request-edit-validation-handler.spec.d.ts.map +0 -1
  167. package/lib/common/features/directediting/request-edit-validation-handler.spec.js +0 -97
  168. package/lib/common/features/directediting/request-edit-validation-handler.spec.js.map +0 -1
  169. package/lib/common/features/model/gmodel-serializer.spec.d.ts +0 -2
  170. package/lib/common/features/model/gmodel-serializer.spec.d.ts.map +0 -1
  171. package/lib/common/features/model/gmodel-serializer.spec.js +0 -124
  172. package/lib/common/features/model/gmodel-serializer.spec.js.map +0 -1
  173. package/lib/common/operations/operation-handler-registry.spec.d.ts +0 -2
  174. package/lib/common/operations/operation-handler-registry.spec.d.ts.map +0 -1
  175. package/lib/common/operations/operation-handler-registry.spec.js +0 -50
  176. package/lib/common/operations/operation-handler-registry.spec.js.map +0 -1
  177. package/lib/common/protocol/glsp-client-proxy.d.ts +0 -45
  178. package/lib/common/protocol/glsp-client-proxy.d.ts.map +0 -1
  179. package/lib/common/protocol/glsp-client-proxy.js +0 -53
  180. package/lib/common/protocol/glsp-client-proxy.js.map +0 -1
  181. package/lib/common/protocol/glsp-server-listener.d.ts +0 -37
  182. package/lib/common/protocol/glsp-server-listener.d.ts.map +0 -1
  183. package/lib/common/protocol/glsp-server-listener.js +0 -5
  184. package/lib/common/protocol/glsp-server-listener.js.map +0 -1
  185. package/lib/common/protocol/glsp-server.spec.d.ts +0 -2
  186. package/lib/common/protocol/glsp-server.spec.d.ts.map +0 -1
  187. package/lib/common/protocol/glsp-server.spec.js +0 -119
  188. package/lib/common/protocol/glsp-server.spec.js.map +0 -1
  189. package/lib/common/session/client-session-factory.spec.d.ts +0 -2
  190. package/lib/common/session/client-session-factory.spec.d.ts.map +0 -1
  191. package/lib/common/session/client-session-factory.spec.js +0 -56
  192. package/lib/common/session/client-session-factory.spec.js.map +0 -1
  193. package/lib/common/session/client-session-manager.spec.d.ts +0 -2
  194. package/lib/common/session/client-session-manager.spec.d.ts.map +0 -1
  195. package/lib/common/session/client-session-manager.spec.js +0 -74
  196. package/lib/common/session/client-session-manager.spec.js.map +0 -1
  197. package/lib/common/test/mock-util.d.ts +0 -123
  198. package/lib/common/test/mock-util.d.ts.map +0 -1
  199. package/lib/common/test/mock-util.js +0 -216
  200. package/lib/common/test/mock-util.js.map +0 -1
  201. package/lib/common/utils/promise-queue.spec.d.ts +0 -2
  202. package/lib/common/utils/promise-queue.spec.d.ts.map +0 -1
  203. package/lib/common/utils/promise-queue.spec.js +0 -117
  204. package/lib/common/utils/promise-queue.spec.js.map +0 -1
  205. package/lib/common/utils/registry.spec.d.ts +0 -2
  206. package/lib/common/utils/registry.spec.d.ts.map +0 -1
  207. package/lib/common/utils/registry.spec.js +0 -199
  208. package/lib/common/utils/registry.spec.js.map +0 -1
  209. package/lib/node/launch/cli-parser.spec.d.ts +0 -2
  210. package/lib/node/launch/cli-parser.spec.d.ts.map +0 -1
  211. package/lib/node/launch/cli-parser.spec.js +0 -56
  212. package/lib/node/launch/cli-parser.spec.js.map +0 -1
  213. package/lib/node/launch/socket-cli-parser.spec.d.ts +0 -2
  214. package/lib/node/launch/socket-cli-parser.spec.d.ts.map +0 -1
  215. package/lib/node/launch/socket-cli-parser.spec.js +0 -66
  216. package/lib/node/launch/socket-cli-parser.spec.js.map +0 -1
  217. package/lib/node/launch/socket-server-launcher.spec.d.ts +0 -17
  218. package/lib/node/launch/socket-server-launcher.spec.d.ts.map +0 -1
  219. package/lib/node/launch/socket-server-launcher.spec.js +0 -70
  220. package/lib/node/launch/socket-server-launcher.spec.js.map +0 -1
  221. package/src/common/protocol/glsp-client-proxy.ts +0 -65
  222. package/src/common/protocol/glsp-server-listener.ts +0 -39
@@ -1,124 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- /********************************************************************************
4
- * Copyright (c) 2022-2023 STMicroelectronics and others.
5
- *
6
- * This program and the accompanying materials are made available under the
7
- * terms of the Eclipse Public License v. 2.0 which is available at
8
- * http://www.eclipse.org/legal/epl-2.0.
9
- *
10
- * This Source Code may also be made available under the following Secondary
11
- * Licenses when the conditions for such availability set forth in the Eclipse
12
- * Public License v. 2.0 are satisfied: GNU General Public License, version 2
13
- * with the GNU Classpath Exception which is available at
14
- * https://www.gnu.org/software/classpath/license.html.
15
- *
16
- * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
17
- ********************************************************************************/
18
- const graph_1 = require("@eclipse-glsp/graph");
19
- const chai_1 = require("chai");
20
- const inversify_1 = require("inversify");
21
- const diagram_configuration_1 = require("../../diagram/diagram-configuration");
22
- const mock = require("../../test/mock-util");
23
- const glsp_server_error_1 = require("../../utils/glsp-server-error");
24
- const logger_1 = require("../../utils/logger");
25
- const gmodel_serializer_1 = require("./gmodel-serializer");
26
- class TestNode extends graph_1.GNode {
27
- foo() {
28
- // should not be serialized to schema
29
- }
30
- }
31
- let testRootSchema;
32
- let testNodeSchema;
33
- let testNodeSchemaWithParent;
34
- describe('test DefaultGModelSerializer', () => {
35
- const container = new inversify_1.Container();
36
- const diagramConfiguration = new mock.StubDiagramConfiguration();
37
- diagramConfiguration['typeMapping'] = (0, graph_1.getDefaultMapping)();
38
- diagramConfiguration.typeMapping.set('node', TestNode);
39
- container.load(new inversify_1.ContainerModule(bind => {
40
- bind(logger_1.Logger).toConstantValue(new mock.StubLogger());
41
- bind(diagram_configuration_1.DiagramConfiguration).toConstantValue(diagramConfiguration);
42
- }));
43
- const serializer = container.resolve(gmodel_serializer_1.DefaultGModelSerializer);
44
- beforeEach(() => {
45
- testRootSchema = {
46
- id: 'graph',
47
- type: 'graph',
48
- children: [
49
- { id: 'node1', type: 'node', position: { x: 5, y: 10 } },
50
- { id: 'node2', type: 'node', position: { x: 15, y: 5 } },
51
- { id: 'edge1', type: 'edge', sourceId: 'node1', targetId: 'node2' }
52
- ]
53
- };
54
- testNodeSchema = { id: 'node1', type: 'node', position: { x: 5, y: 10 }, children: [], cssClasses: [] };
55
- testNodeSchemaWithParent = {
56
- id: 'node1',
57
- type: 'node',
58
- position: { x: 5, y: 10 },
59
- children: [],
60
- cssClasses: [],
61
- parent: new graph_1.GNode()
62
- };
63
- });
64
- it('createElement - unregistered type', () => {
65
- testNodeSchema['type'] = 'notRegistered';
66
- (0, chai_1.expect)(() => serializer.createElement(testNodeSchema)).to.throw(glsp_server_error_1.GLSPServerError);
67
- });
68
- it('createElement - with root schema', () => {
69
- (0, chai_1.expect)(() => serializer.createElement(testRootSchema)).to.throw(glsp_server_error_1.GLSPServerError);
70
- });
71
- it('createElement - with node schema', () => {
72
- const node = serializer.createElement(testNodeSchema);
73
- (0, chai_1.expect)(node).to.be.an.instanceOf(TestNode);
74
- (0, chai_1.expect)(node).to.be.deep.include(testNodeSchema);
75
- (0, chai_1.expect)(node.foo).to.not.be.undefined;
76
- });
77
- it('createElement- with sub type of registered schema', () => {
78
- testNodeSchema.type = 'node:rectangular';
79
- const node = serializer.createElement(testNodeSchema);
80
- (0, chai_1.expect)(node).to.be.an.instanceOf(TestNode);
81
- (0, chai_1.expect)(node).to.be.deep.include(testNodeSchema);
82
- (0, chai_1.expect)(node.foo).to.not.be.undefined;
83
- });
84
- it('createElement - with parent', () => {
85
- const parent = new graph_1.GNode();
86
- const child = serializer.createElement(testNodeSchema, parent);
87
- (0, chai_1.expect)(child).to.be.an.instanceOf(TestNode);
88
- (0, chai_1.expect)(child).to.be.deep.include(testNodeSchemaWithParent);
89
- (0, chai_1.expect)(child.parent).to.be.equal(parent);
90
- });
91
- it('createRoot - unregistered type', () => {
92
- testRootSchema['type'] = 'notRegistered';
93
- (0, chai_1.expect)(() => serializer.createRoot(testNodeSchema)).to.throw(glsp_server_error_1.GLSPServerError);
94
- });
95
- it('createRoot - with child schema ', () => {
96
- (0, chai_1.expect)(() => serializer.createRoot(testNodeSchema)).to.throw(glsp_server_error_1.GLSPServerError);
97
- });
98
- it('createRoot - with registered root schema', () => {
99
- const root = serializer.createRoot(testRootSchema);
100
- (0, chai_1.expect)(root).to.be.an.instanceOf(graph_1.GGraph);
101
- (0, chai_1.expect)(root.children.length).to.be.equal(3);
102
- const node1 = root.children[0];
103
- (0, chai_1.expect)(node1).to.be.an.instanceOf(TestNode);
104
- const node2 = root.children[1];
105
- (0, chai_1.expect)(node2).to.be.an.instanceOf(TestNode);
106
- (0, chai_1.expect)(root.children[2]).to.be.an.instanceOf(graph_1.GEdge);
107
- const edge = root.children[2];
108
- (0, chai_1.expect)(edge.sourceId).to.be.equal(node1.id);
109
- (0, chai_1.expect)(edge.targetId).to.be.equal(node2.id);
110
- });
111
- it('createSchema- unregistered type', () => {
112
- (0, chai_1.expect)(() => serializer.createRoot({ id: 'id', type: 'unregistered' })).to.throw(glsp_server_error_1.GLSPServerError);
113
- });
114
- it('createSchema- with node', () => {
115
- const testNode = new TestNode();
116
- testNode.position = { x: 5, y: 10 };
117
- testNode.size = { width: 10, height: 100 };
118
- testNode.layoutOptions = { ['my']: 'Options' };
119
- const schema = serializer.createSchema(testNode);
120
- delete testNode.foo;
121
- (0, chai_1.expect)(schema).to.be.deep.include(testNode);
122
- });
123
- });
124
- //# sourceMappingURL=gmodel-serializer.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"gmodel-serializer.spec.js","sourceRoot":"","sources":["../../../../src/common/features/model/gmodel-serializer.spec.ts"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,+CAA8E;AAC9E,+BAA8B;AAC9B,yCAAuD;AACvD,+EAA2E;AAC3E,6CAA6C;AAC7C,qEAAgE;AAChE,+CAA4C;AAC5C,2DAA8D;AAE9D,MAAM,QAAS,SAAQ,aAAK;IACxB,GAAG;QACC,qCAAqC;IACzC,CAAC;CACJ;AAED,IAAI,cAAmB,CAAC;AAExB,IAAI,cAAmB,CAAC;AAExB,IAAI,wBAA6B,CAAC;AAElC,QAAQ,CAAC,8BAA8B,EAAE,GAAG,EAAE;IAC1C,MAAM,SAAS,GAAG,IAAI,qBAAS,EAAE,CAAC;IAClC,MAAM,oBAAoB,GAAG,IAAI,IAAI,CAAC,wBAAwB,EAAE,CAAC;IACjE,oBAAoB,CAAC,aAAa,CAAC,GAAG,IAAA,yBAAiB,GAAE,C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,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,iCAAiC,EAAE,GAAG,EAAE;QACvC,IAAA,aAAM,EAAC,GAAG,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,mCAAe,CAAC,CAAC;IACtG,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,yBAAyB,EAAE,GAAG,EAAE;QAC/B,MAAM,QAAQ,GAAG,IAAI,QAAQ,EAAE,CAAC;QAChC,QAAQ,CAAC,QAAQ,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC;QACpC,QAAQ,CAAC,IAAI,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;QAC3C,QAAQ,CAAC,aAAa,GAAG,EAAE,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,CAAC;QAC/C,MAAM,MAAM,GAAG,UAAU,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;QACjD,OAAQ,QAA8B,CAAC,GAAG,CAAC;QAC3C,IAAA,aAAM,EAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAChD,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=operation-handler-registry.spec.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"operation-handler-registry.spec.d.ts","sourceRoot":"","sources":["../../../src/common/operations/operation-handler-registry.spec.ts"],"names":[],"mappings":""}
@@ -1,50 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- /********************************************************************************
4
- * Copyright (c) 2022-2023 STMicroelectronics and others.
5
- *
6
- * This program and the accompanying materials are made available under the
7
- * terms of the Eclipse Public License v. 2.0 which is available at
8
- * http://www.eclipse.org/legal/epl-2.0.
9
- *
10
- * This Source Code may also be made available under the following Secondary
11
- * Licenses when the conditions for such availability set forth in the Eclipse
12
- * Public License v. 2.0 are satisfied: GNU General Public License, version 2
13
- * with the GNU Classpath Exception which is available at
14
- * https://www.gnu.org/software/classpath/license.html.
15
- *
16
- * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
17
- ********************************************************************************/
18
- const protocol_1 = require("@eclipse-glsp/protocol");
19
- const chai_1 = require("chai");
20
- const mock = require("../test/mock-util");
21
- const compound_operation_handler_1 = require("./compound-operation-handler");
22
- const operation_handler_registry_1 = require("./operation-handler-registry");
23
- describe('Test OperationHandlerRegistry', () => {
24
- const stubANode = new mock.StubCreateNodeOperationHandler('ANode');
25
- const stubBNode = new mock.StubCreateNodeOperationHandler('BNode');
26
- const stubAEdge = new mock.StubCreateEdgeOperationHandler('AEdge');
27
- const stubBEdge = new mock.StubCreateEdgeOperationHandler('BEdge');
28
- const operationHandlerRegistry = new operation_handler_registry_1.OperationHandlerRegistry();
29
- it('register OperationActionHandler', () => {
30
- operationHandlerRegistry.registerHandler(new compound_operation_handler_1.CompoundOperationHandler());
31
- (0, chai_1.expect)(operationHandlerRegistry.keys()).to.have.length(1);
32
- (0, chai_1.expect)(operationHandlerRegistry.keys()).to.contain(protocol_1.CompoundOperation.KIND);
33
- (0, chai_1.expect)(operationHandlerRegistry.get(protocol_1.CompoundOperation.KIND)).to.be.an.instanceOf(compound_operation_handler_1.CompoundOperationHandler);
34
- });
35
- it('register CreateOperationActionHandlers', () => {
36
- operationHandlerRegistry.registerHandler(stubANode);
37
- operationHandlerRegistry.registerHandler(stubBNode);
38
- operationHandlerRegistry.registerHandler(stubAEdge);
39
- operationHandlerRegistry.registerHandler(stubBEdge);
40
- (0, chai_1.expect)(operationHandlerRegistry.keys()).to.contain(`${protocol_1.CreateNodeOperation.KIND}_ANode`);
41
- (0, chai_1.expect)(operationHandlerRegistry.get(`${protocol_1.CreateNodeOperation.KIND}_ANode`)).to.be.equal(stubANode);
42
- (0, chai_1.expect)(operationHandlerRegistry.keys()).to.contain(`${protocol_1.CreateNodeOperation.KIND}_BNode`);
43
- (0, chai_1.expect)(operationHandlerRegistry.get(`${protocol_1.CreateNodeOperation.KIND}_BNode`)).to.be.equal(stubBNode);
44
- (0, chai_1.expect)(operationHandlerRegistry.keys()).to.contain(`${protocol_1.CreateEdgeOperation.KIND}_AEdge`);
45
- (0, chai_1.expect)(operationHandlerRegistry.get(`${protocol_1.CreateEdgeOperation.KIND}_AEdge`)).to.be.equal(stubAEdge);
46
- (0, chai_1.expect)(operationHandlerRegistry.keys()).to.contain(`${protocol_1.CreateEdgeOperation.KIND}_BEdge`);
47
- (0, chai_1.expect)(operationHandlerRegistry.get(`${protocol_1.CreateEdgeOperation.KIND}_BEdge`)).to.be.equal(stubBEdge);
48
- });
49
- });
50
- //# sourceMappingURL=operation-handler-registry.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"operation-handler-registry.spec.js","sourceRoot":"","sources":["../../../src/common/operations/operation-handler-registry.spec.ts"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDAAqG;AACrG,+BAA8B;AAC9B,0CAA0C;AAC1C,6EAAwE;AACxE,6EAAwE;AAExE,QAAQ,CAAC,+BAA+B,EAAE,GAAG,EAAE;IAC3C,MAAM,SAAS,GAAG,IAAI,IAAI,CAAC,8BAA8B,CAAC,OAAO,CAAC,CAAC;IACnE,MAAM,SAAS,GAAG,IAAI,IAAI,CAAC,8BAA8B,CAAC,OAAO,CAAC,CAAC;IACnE,MAAM,SAAS,GAAG,IAAI,IAAI,CAAC,8BAA8B,CAAC,OAAO,CAAC,CAAC;IACnE,MAAM,SAAS,GAAG,IAAI,IAAI,CAAC,8BAA8B,CAAC,OAAO,CAAC,CAAC;IACnE,MAAM,wBAAwB,GAAG,IAAI,qDAAwB,EAAE,CAAC;IAE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AC,GAAG,CAAC,GAAG,8BAAmB,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QACjG,IAAA,aAAM,EAAC,wBAAwB,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,GAAG,8BAAmB,CAAC,IAAI,QAAQ,CAAC,CAAC;QACxF,IAAA,aAAM,EAAC,wBAAwB,CAAC,GAAG,CAAC,GAAG,8BAAmB,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QACjG,IAAA,aAAM,EAAC,wBAAwB,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,GAAG,8BAAmB,CAAC,IAAI,QAAQ,CAAC,CAAC;QACxF,IAAA,aAAM,EAAC,wBAAwB,CAAC,GAAG,CAAC,GAAG,8BAAmB,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IACrG,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
@@ -1,45 +0,0 @@
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 { ActionMessage } from '@eclipse-glsp/protocol';
17
- import * as jsonrpc from 'vscode-jsonrpc';
18
- export declare const GLSPClientProxyFactory: unique symbol;
19
- export type GLSPClientProxyFactory = (connection: jsonrpc.MessageConnection) => GLSPClientProxy;
20
- export declare const GLSPClientProxy: unique symbol;
21
- /**
22
- * Json-rpc client proxy interface to hide the underlying json-rpc logic.
23
- */
24
- export interface GLSPClientProxy {
25
- /**
26
- * A `process` notification is sent from the server to server to the client when the client should handle i.e.
27
- * process a specific {@link ActionMessage}. Any communication that is performed between initialization and shutdown
28
- * is handled by sending action messages, either from the client to the server or from the server to the client. This
29
- * is the core part of the Graphical Language Server Protocol.
30
- *
31
- * @param message The {@link ActionMessage} that should be processed.
32
- */
33
- process(message: ActionMessage): void;
34
- }
35
- export declare const JsonRpcGLSPClientProxy: unique symbol;
36
- export interface JsonRpcGLSPClientProxy extends GLSPClientProxy {
37
- connect(connection: jsonrpc.MessageConnection): void;
38
- }
39
- export declare class DefaultGLSPClientProxy implements JsonRpcGLSPClientProxy {
40
- private logger;
41
- protected connection: jsonrpc.MessageConnection;
42
- connect(connection: jsonrpc.MessageConnection): void;
43
- process(message: ActionMessage): void;
44
- }
45
- //# sourceMappingURL=glsp-client-proxy.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"glsp-client-proxy.d.ts","sourceRoot":"","sources":["../../../src/common/protocol/glsp-client-proxy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,aAAa,EAAqB,MAAM,wBAAwB,CAAC;AAE1E,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAG1C,eAAO,MAAM,sBAAsB,eAAmC,CAAC;AAEvE,MAAM,MAAM,sBAAsB,GAAG,CAAC,UAAU,EAAE,OAAO,CAAC,iBAAiB,KAAK,eAAe,CAAC;AAEhG,eAAO,MAAM,eAAe,eAA4B,CAAC;AAEzD;;GAEG;AACH,MAAM,WAAW,eAAe;IAC5B;;;;;;;OAOG;IACH,OAAO,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI,CAAC;CACzC;AAED,eAAO,MAAM,sBAAsB,eAAmC,CAAC;AAEvE,MAAM,WAAW,sBAAuB,SAAQ,eAAe;IAC3D,OAAO,CAAC,UAAU,EAAE,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC;CACxD;AAED,qBACa,sBAAuB,YAAW,sBAAsB;IAEjE,OAAO,CAAC,MAAM,CAAS;IAEvB,SAAS,CAAC,UAAU,EAAE,OAAO,CAAC,iBAAiB,CAAC;IAEhD,OAAO,CAAC,UAAU,EAAE,OAAO,CAAC,iBAAiB,GAAG,IAAI;IAMpD,OAAO,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI;CAIxC"}
@@ -1,53 +0,0 @@
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
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.DefaultGLSPClientProxy = exports.JsonRpcGLSPClientProxy = exports.GLSPClientProxy = exports.GLSPClientProxyFactory = void 0;
13
- /********************************************************************************
14
- * Copyright (c) 2022-2023 STMicroelectronics and others.
15
- *
16
- * This program and the accompanying materials are made available under the
17
- * terms of the Eclipse Public License v. 2.0 which is available at
18
- * http://www.eclipse.org/legal/epl-2.0.
19
- *
20
- * This Source Code may also be made available under the following Secondary
21
- * Licenses when the conditions for such availability set forth in the Eclipse
22
- * Public License v. 2.0 are satisfied: GNU General Public License, version 2
23
- * with the GNU Classpath Exception which is available at
24
- * https://www.gnu.org/software/classpath/license.html.
25
- *
26
- * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
27
- ********************************************************************************/
28
- const protocol_1 = require("@eclipse-glsp/protocol");
29
- const inversify_1 = require("inversify");
30
- const logger_1 = require("../utils/logger");
31
- exports.GLSPClientProxyFactory = Symbol('GLSPClientProxyFactory');
32
- exports.GLSPClientProxy = Symbol('GLSPClientProxy');
33
- exports.JsonRpcGLSPClientProxy = Symbol('JsonRpcGLSPClientProxy');
34
- let DefaultGLSPClientProxy = class DefaultGLSPClientProxy {
35
- connect(connection) {
36
- if (!this.connection) {
37
- this.connection = connection;
38
- }
39
- }
40
- process(message) {
41
- this.logger.debug(`Send action '${message.action.kind}' to client '${message.clientId}'`);
42
- this.connection.sendNotification(protocol_1.JsonrpcGLSPClient.ActionMessageNotification, message);
43
- }
44
- };
45
- __decorate([
46
- (0, inversify_1.inject)(logger_1.Logger),
47
- __metadata("design:type", logger_1.Logger)
48
- ], DefaultGLSPClientProxy.prototype, "logger", void 0);
49
- DefaultGLSPClientProxy = __decorate([
50
- (0, inversify_1.injectable)()
51
- ], DefaultGLSPClientProxy);
52
- exports.DefaultGLSPClientProxy = DefaultGLSPClientProxy;
53
- //# sourceMappingURL=glsp-client-proxy.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"glsp-client-proxy.js","sourceRoot":"","sources":["../../../src/common/protocol/glsp-client-proxy.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDAA0E;AAC1E,yCAA+C;AAE/C,4CAAyC;AAE5B,QAAA,sBAAsB,GAAG,MAAM,CAAC,wBAAwB,CAAC,CAAC;AAI1D,QAAA,eAAe,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;AAiB5C,QAAA,sBAAsB,GAAG,MAAM,CAAC,wBAAwB,CAAC,CAAC;AAOhE,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IAM/B,OAAO,CAAC,UAAqC;QACzC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;YAClB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;SAChC;IACL,CAAC;IAED,OAAO,CAAC,OAAsB;QAC1B,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,gBAAgB,OAAO,CAAC,MAAM,CAAC,IAAI,gBAAgB,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;QAC1F,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,4BAAiB,CAAC,yBAAyB,EAAE,OAAO,CAAC,CAAC;IAC3F,CAAC;CACJ,CAAA;AAfG;IAAC,IAAA,kBAAM,EAAC,eAAM,CAAC;8BACC,eAAM;sDAAC;AAFd,sBAAsB;IADlC,IAAA,sBAAU,GAAE;GACA,sBAAsB,CAgBlC;AAhBY,wDAAsB"}
@@ -1,37 +0,0 @@
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 { GLSPServer } from './glsp-server';
17
- export declare const GLSPServerListener: unique symbol;
18
- /**
19
- * A listener to track the connection status of {@link GLSPClient}s (i.e. client applications).
20
- * Gets notified when a new GLSP client connects or disconnects.
21
- */
22
- export interface GLSPServerListener {
23
- /**
24
- * Triggered after a GLSPServer has been initialized via the {@link GLSPServer.initialize()}
25
- * method.
26
- *
27
- * @param server The GLSPServer which has been initialized.
28
- */
29
- serverInitialized?(server: GLSPServer): void;
30
- /**
31
- * Triggered after the {@link GLSPServer.shutdown()} method has been invoked.
32
- *
33
- * @param glspServer The glspServer which has been shut down.
34
- */
35
- serverShutDown?(server: GLSPServer): void;
36
- }
37
- //# sourceMappingURL=glsp-server-listener.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"glsp-server-listener.d.ts","sourceRoot":"","sources":["../../../src/common/protocol/glsp-server-listener.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,eAAO,MAAM,kBAAkB,eAA+B,CAAC;AAE/D;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IAC/B;;;;;OAKG;IACH,iBAAiB,CAAC,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,CAAC;IAE7C;;;;OAIG;IACH,cAAc,CAAC,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,CAAC;CAC7C"}
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GLSPServerListener = void 0;
4
- exports.GLSPServerListener = Symbol('GLSPServerListener');
5
- //# sourceMappingURL=glsp-server-listener.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"glsp-server-listener.js","sourceRoot":"","sources":["../../../src/common/protocol/glsp-server-listener.ts"],"names":[],"mappings":";;;AAiBa,QAAA,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=glsp-server.spec.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"glsp-server.spec.d.ts","sourceRoot":"","sources":["../../../src/common/protocol/glsp-server.spec.ts"],"names":[],"mappings":""}
@@ -1,119 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const chai_1 = require("chai");
4
- const inversify_1 = require("inversify");
5
- const sinon = require("sinon");
6
- const global_action_provider_1 = require("../actions/global-action-provider");
7
- const client_session_manager_1 = require("../session/client-session-manager");
8
- const mock = require("../test/mock-util");
9
- const logger_1 = require("../utils/logger");
10
- const glsp_client_proxy_1 = require("./glsp-client-proxy");
11
- const glsp_server_1 = require("./glsp-server");
12
- const glsp_server_listener_1 = require("./glsp-server-listener");
13
- const assert = require("assert");
14
- describe('test DefaultGLSPServer', () => {
15
- const container = new inversify_1.Container();
16
- const clientSessionId = 'myClientSession';
17
- const diagramType = 'myDiagram';
18
- const applicationId = 'Test';
19
- const protocolVersion = '1.0.0';
20
- const serverActionKinds = new Map();
21
- serverActionKinds.set(diagramType, ['A1', 'A2']);
22
- const sessionManager = new mock.StubClientSessionManager();
23
- const spy_sessionManager_getOrCreate = sinon.spy(sessionManager, 'getOrCreateClientSession');
24
- const spy_sessionManager_dispose = sinon.spy(sessionManager, 'disposeClientSession');
25
- const listener1 = new mock.StubGLSPServerListener();
26
- const spy_listener1_initialize = sinon.spy(listener1, 'serverInitialized');
27
- const spy_listener1_shutdown = sinon.spy(listener1, 'serverShutDown');
28
- const listener2 = new mock.StubGLSPServerListener();
29
- const spy_listener2_initialize = sinon.spy(listener2, 'serverInitialized');
30
- const spy_listener2_shutdown = sinon.spy(listener2, 'serverShutDown');
31
- container.load(new inversify_1.ContainerModule(bind => {
32
- bind(logger_1.Logger).toConstantValue(new mock.StubLogger());
33
- bind(glsp_client_proxy_1.GLSPClientProxy).toConstantValue(new mock.StubGLSPClientProxy());
34
- bind(glsp_client_proxy_1.JsonRpcGLSPClientProxy).toConstantValue(new mock.StubGLSPClientProxy());
35
- bind(client_session_manager_1.ClientSessionManager).toConstantValue(sessionManager);
36
- bind(global_action_provider_1.GlobalActionProvider).toConstantValue({ clientActionKinds: new Map(), serverActionKinds });
37
- bind(glsp_server_listener_1.GLSPServerListener).toConstantValue(listener1);
38
- }));
39
- const glspServer = container.resolve(glsp_server_1.DefaultGLSPServer);
40
- beforeEach(() => {
41
- spy_sessionManager_getOrCreate.restore();
42
- spy_sessionManager_dispose.restore();
43
- spy_listener1_initialize.restore();
44
- spy_listener1_shutdown.restore();
45
- spy_listener2_initialize.restore();
46
- spy_listener2_shutdown.restore();
47
- });
48
- it('Test calls before server initialization (should throw errors)', async () => {
49
- assert.rejects(() => glspServer.initializeClientSession({ clientSessionId: 'id', diagramType: 'type' }));
50
- assert.rejects(() => glspServer.disposeClientSession({ clientSessionId: 'id' }));
51
- assert.throws(() => glspServer.process({ clientId: 'id', action: { kind: 'action' } }));
52
- });
53
- it('addListener - add existing listener', () => {
54
- const originalSize = glspServer['serverListeners'].length;
55
- glspServer.addListener(listener1);
56
- (0, chai_1.expect)(glspServer['serverListeners'].length).to.be.equal(originalSize);
57
- });
58
- it('addListener - add new listener', () => {
59
- const originalSize = glspServer['serverListeners'].length;
60
- glspServer.addListener(listener2);
61
- (0, chai_1.expect)(glspServer['serverListeners']).to.include(listener2);
62
- (0, chai_1.expect)(glspServer['serverListeners'].length).to.be.equal(originalSize + 1);
63
- });
64
- it('removeListener - remove non-existing listener', () => {
65
- const originalSize = glspServer['serverListeners'].length;
66
- glspServer.removeListener({});
67
- (0, chai_1.expect)(glspServer['serverListeners'].length).to.be.equal(originalSize);
68
- });
69
- it('removeListener - remove existing listener', () => {
70
- const originalSize = glspServer['serverListeners'].length;
71
- glspServer.removeListener(listener2);
72
- (0, chai_1.expect)(glspServer['serverListeners'].length).to.be.equal(originalSize - 1);
73
- });
74
- it('initialize - with wrong protocol version', async () => {
75
- const initializeParameters = { applicationId, protocolVersion: 'abc' };
76
- assert.rejects(glspServer.initialize(initializeParameters));
77
- });
78
- it('initialize - with correct parameters', async () => {
79
- const initializeParameters = { applicationId, protocolVersion };
80
- const result = await glspServer.initialize(initializeParameters);
81
- (0, chai_1.expect)(result.protocolVersion).to.be.equal(protocolVersion);
82
- (0, chai_1.expect)(result.serverActions[diagramType]).to.be.equal(serverActionKinds.get(diagramType));
83
- (0, chai_1.expect)(result.serverActions[diagramType]).to.be.equal(serverActionKinds.get(diagramType));
84
- (0, chai_1.expect)(spy_listener1_initialize.calledWith(glspServer));
85
- (0, chai_1.expect)(spy_listener2_initialize.notCalled);
86
- });
87
- it('initialize - subsequent call with same parameters', async () => {
88
- const initializeParameters = { applicationId, protocolVersion };
89
- const result = await glspServer.initialize(initializeParameters);
90
- (0, chai_1.expect)(result.protocolVersion).to.be.equal(protocolVersion);
91
- (0, chai_1.expect)(result.serverActions[diagramType]).to.be.equal(serverActionKinds.get(diagramType));
92
- (0, chai_1.expect)(result.serverActions[diagramType]).to.be.equal(serverActionKinds.get(diagramType));
93
- });
94
- it('initialize - subsequent call with other parameters', async () => {
95
- const initializeParameters = { applicationId: 'someOtherApp', protocolVersion: 'AnotherProtocolVersion' };
96
- await assert.rejects(() => glspServer.initialize(initializeParameters));
97
- });
98
- it('initialize client session', async () => {
99
- const initializeClientSessionParameters = {
100
- clientSessionId,
101
- diagramType
102
- };
103
- await glspServer.initializeClientSession(initializeClientSessionParameters);
104
- (0, chai_1.expect)(spy_sessionManager_getOrCreate.calledWith(initializeClientSessionParameters));
105
- });
106
- it('dispose client session', async () => {
107
- const disposeClientSessionParameters = {
108
- clientSessionId
109
- };
110
- await glspServer.disposeClientSession(disposeClientSessionParameters);
111
- (0, chai_1.expect)(spy_sessionManager_dispose.calledWith(clientSessionId));
112
- });
113
- it('shutdown server', async () => {
114
- glspServer.shutdown();
115
- (0, chai_1.expect)(spy_listener1_shutdown.calledWith(glspServer));
116
- (0, chai_1.expect)(spy_listener2_shutdown.notCalled);
117
- });
118
- });
119
- //# sourceMappingURL=glsp-server.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"glsp-server.spec.js","sourceRoot":"","sources":["../../../src/common/protocol/glsp-server.spec.ts"],"names":[],"mappings":";;AAgBA,+BAA8B;AAC9B,yCAAuD;AACvD,+BAA+B;AAC/B,8EAAyE;AACzE,8EAAyE;AACzE,0CAA0C;AAC1C,4CAAyC;AACzC,2DAA8E;AAC9E,+CAAkD;AAClD,iEAA4D;AAC5D,iCAAkC;AAElC,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,CAAC;IAEH,EAAE,CAAC,wBAAwB,EAAE,KAAK,IAAI,EAAE;QACpC,MAAM,8BAA8B,GAAmC;YACnE,eAAe;SAClB,CAAC;QACF,MAAM,UAAU,CAAC,oBAAoB,CAAC,8BAA8B,CAAC,CAAC;QACtE,IAAA,aAAM,EAAC,0BAA0B,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC,CAAC;IACnE,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,iBAAiB,EAAE,KAAK,IAAI,EAAE;QAC7B,UAAU,CAAC,QAAQ,EAAE,CAAC;QACtB,IAAA,aAAM,EAAC,sBAAsB,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC;QACtD,IAAA,aAAM,EAAC,sBAAsB,CAAC,SAAS,CAAC,CAAC;IAC7C,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=client-session-factory.spec.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"client-session-factory.spec.d.ts","sourceRoot":"","sources":["../../../src/common/session/client-session-factory.spec.ts"],"names":[],"mappings":""}
@@ -1,56 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- /********************************************************************************
4
- * Copyright (c) 2022-2023 STMicroelectronics and others.
5
- *
6
- * This program and the accompanying materials are made available under the
7
- * terms of the Eclipse Public License v. 2.0 which is available at
8
- * http://www.eclipse.org/legal/epl-2.0.
9
- *
10
- * This Source Code may also be made available under the following Secondary
11
- * Licenses when the conditions for such availability set forth in the Eclipse
12
- * Public License v. 2.0 are satisfied: GNU General Public License, version 2
13
- * with the GNU Classpath Exception which is available at
14
- * https://www.gnu.org/software/classpath/license.html.
15
- *
16
- * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
17
- ********************************************************************************/
18
- const chai_1 = require("chai");
19
- const inversify_1 = require("inversify");
20
- const action_dispatcher_1 = require("../actions/action-dispatcher");
21
- const service_identifiers_1 = require("../di/service-identifiers");
22
- const glsp_client_proxy_1 = require("../protocol/glsp-client-proxy");
23
- const mock = require("../test/mock-util");
24
- const glsp_server_error_1 = require("../utils/glsp-server-error");
25
- const logger_1 = require("../utils/logger");
26
- const client_session_factory_1 = require("./client-session-factory");
27
- const client_session_initializer_1 = require("./client-session-initializer");
28
- describe('test DefaultClientSessionFactory', () => {
29
- const clientSessionId = 'myClientId';
30
- const diagramType = 'myDiagramType';
31
- const container = new inversify_1.Container();
32
- const diagramModule = new inversify_1.ContainerModule(bind => {
33
- bind(action_dispatcher_1.ActionDispatcher).toConstantValue(new mock.StubActionDispatcher());
34
- bind(client_session_initializer_1.ClientSessionInitializer).toConstantValue(new mock.StubClientSessionInitializer());
35
- });
36
- const diagramModules = new Map();
37
- diagramModules.set(diagramType, [diagramModule]);
38
- container.load(new inversify_1.ContainerModule(bind => {
39
- bind(logger_1.Logger).toConstantValue(new mock.StubLogger());
40
- bind(service_identifiers_1.InjectionContainer).toConstantValue(container);
41
- bind(service_identifiers_1.DiagramModules).toConstantValue(diagramModules);
42
- bind(glsp_client_proxy_1.GLSPClientProxy).toConstantValue(new mock.StubGLSPClientProxy());
43
- }));
44
- const factory = container.resolve(client_session_factory_1.DefaultClientSessionFactory);
45
- it('create - new client session', () => {
46
- const session = factory.create({ clientSessionId, diagramType });
47
- (0, chai_1.expect)(session.id).to.be.equal(clientSessionId);
48
- (0, chai_1.expect)(session.diagramType).to.be.equal(diagramType);
49
- (0, chai_1.expect)(session.container.parent).to.be.equal(container);
50
- (0, chai_1.expect)(session.actionDispatcher).to.be.an.instanceOf(mock.StubActionDispatcher);
51
- });
52
- it('create - unknown diagram type', () => {
53
- (0, chai_1.expect)(() => factory.create({ clientSessionId, diagramType: 'unknown-type' })).to.throw(glsp_server_error_1.GLSPServerError);
54
- });
55
- });
56
- //# sourceMappingURL=client-session-factory.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"client-session-factory.spec.js","source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AO,GAAG,SAAS,CAAC,OAAO,CAAC,oDAA2B,CAAC,CAAC;IAE/D,EAAE,CAAC,6BAA6B,EAAE,GAAG,EAAE;QACnC,MAAM,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,EAAE,eAAe,EAAE,WAAW,EAAE,CAAC,CAAC;QACjE,IAAA,aAAM,EAAC,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;QAChD,IAAA,aAAM,EAAC,OAAO,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;QACrD,IAAA,aAAM,EAAC,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QACxD,IAAA,aAAM,EAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;IACpF,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,+BAA+B,EAAE,GAAG,EAAE;QACrC,IAAA,aAAM,EAAC,GAAG,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,eAAe,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,mCAAe,CAAC,CAAC;IAC7G,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=client-session-manager.spec.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"client-session-manager.spec.d.ts","sourceRoot":"","sources":["../../../src/common/session/client-session-manager.spec.ts"],"names":[],"mappings":""}