@eclipse-glsp/server 1.1.0-next.d47240f.50 → 1.1.0-next.de91dcd.60

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 (261) hide show
  1. package/lib/browser/launch/worker-server-launcher.js +2 -3
  2. package/lib/browser/launch/worker-server-launcher.js.map +1 -1
  3. package/lib/common/actions/action-dispatcher.js +2 -3
  4. package/lib/common/actions/action-dispatcher.js.map +1 -1
  5. package/lib/common/actions/action-handler-registry.js +4 -6
  6. package/lib/common/actions/action-handler-registry.js.map +1 -1
  7. package/lib/common/actions/client-action-handler.js +2 -3
  8. package/lib/common/actions/client-action-handler.js.map +1 -1
  9. package/lib/common/actions/global-action-provider.js +2 -3
  10. package/lib/common/actions/global-action-provider.js.map +1 -1
  11. package/lib/common/command/command-stack.js +2 -3
  12. package/lib/common/command/command-stack.js.map +1 -1
  13. package/lib/common/command/command.js +1 -1
  14. package/lib/common/command/command.js.map +1 -1
  15. package/lib/common/command/undo-redo-action-handler.js +2 -3
  16. package/lib/common/command/undo-redo-action-handler.js.map +1 -1
  17. package/lib/common/di/binding-target.d.ts.map +1 -1
  18. package/lib/common/di/binding-target.js +3 -2
  19. package/lib/common/di/binding-target.js.map +1 -1
  20. package/lib/common/di/diagram-module.d.ts +3 -0
  21. package/lib/common/di/diagram-module.d.ts.map +1 -1
  22. package/lib/common/di/diagram-module.js +14 -5
  23. package/lib/common/di/diagram-module.js.map +1 -1
  24. package/lib/common/di/glsp-module.js +2 -3
  25. package/lib/common/di/glsp-module.js.map +1 -1
  26. package/lib/common/di/server-module.js.map +1 -1
  27. package/lib/common/diagram/diagram-configuration.js +1 -1
  28. package/lib/common/diagram/diagram-configuration.js.map +1 -1
  29. package/lib/common/diagram/request-type-hints-action-handler.js +2 -3
  30. package/lib/common/diagram/request-type-hints-action-handler.js.map +1 -1
  31. package/lib/common/features/clipboard/request-clipboard-data-action-handler.js +2 -3
  32. package/lib/common/features/clipboard/request-clipboard-data-action-handler.js.map +1 -1
  33. package/lib/common/features/contextactions/command-palette-action-provider.js +2 -3
  34. package/lib/common/features/contextactions/command-palette-action-provider.js.map +1 -1
  35. package/lib/common/features/contextactions/context-actions-provider-registry.js +2 -3
  36. package/lib/common/features/contextactions/context-actions-provider-registry.js.map +1 -1
  37. package/lib/common/features/contextactions/context-menu-item-provider.js +2 -3
  38. package/lib/common/features/contextactions/context-menu-item-provider.js.map +1 -1
  39. package/lib/common/features/contextactions/request-context-actions-handler.js +2 -3
  40. package/lib/common/features/contextactions/request-context-actions-handler.js.map +1 -1
  41. package/lib/common/features/contextactions/tool-palette-item-provider.js +4 -6
  42. package/lib/common/features/contextactions/tool-palette-item-provider.js.map +1 -1
  43. package/lib/common/features/directediting/context-edit-validator-registry.js +2 -3
  44. package/lib/common/features/directediting/context-edit-validator-registry.js.map +1 -1
  45. package/lib/common/features/directediting/label-edit-validator.js +2 -3
  46. package/lib/common/features/directediting/label-edit-validator.js.map +1 -1
  47. package/lib/common/features/directediting/request-edit-validation-handler.js +2 -3
  48. package/lib/common/features/directediting/request-edit-validation-handler.js.map +1 -1
  49. package/lib/common/features/layout/computed-bounds-action-handler.js +2 -3
  50. package/lib/common/features/layout/computed-bounds-action-handler.js.map +1 -1
  51. package/lib/common/features/layout/layout-operation-handler.js +2 -3
  52. package/lib/common/features/layout/layout-operation-handler.js.map +1 -1
  53. package/lib/common/features/model/gmodel-factory.js +2 -3
  54. package/lib/common/features/model/gmodel-factory.js.map +1 -1
  55. package/lib/common/features/model/gmodel-index.js +2 -3
  56. package/lib/common/features/model/gmodel-index.js.map +1 -1
  57. package/lib/common/features/model/gmodel-serializer.js +2 -3
  58. package/lib/common/features/model/gmodel-serializer.js.map +1 -1
  59. package/lib/common/features/model/model-state.js +2 -3
  60. package/lib/common/features/model/model-state.js.map +1 -1
  61. package/lib/common/features/model/model-submission-handler.d.ts +2 -0
  62. package/lib/common/features/model/model-submission-handler.d.ts.map +1 -1
  63. package/lib/common/features/model/model-submission-handler.js +12 -3
  64. package/lib/common/features/model/model-submission-handler.js.map +1 -1
  65. package/lib/common/features/model/request-model-action-handler.d.ts +4 -6
  66. package/lib/common/features/model/request-model-action-handler.d.ts.map +1 -1
  67. package/lib/common/features/model/request-model-action-handler.js +16 -14
  68. package/lib/common/features/model/request-model-action-handler.js.map +1 -1
  69. package/lib/common/features/model/save-model-action-handler.js +2 -3
  70. package/lib/common/features/model/save-model-action-handler.js.map +1 -1
  71. package/lib/common/features/navigation/navigation-target-provider-registry.js +2 -3
  72. package/lib/common/features/navigation/navigation-target-provider-registry.js.map +1 -1
  73. package/lib/common/features/navigation/navigation-target-resolver.js +2 -3
  74. package/lib/common/features/navigation/navigation-target-resolver.js.map +1 -1
  75. package/lib/common/features/navigation/request-navigation-targets-action-handler.js +2 -3
  76. package/lib/common/features/navigation/request-navigation-targets-action-handler.js.map +1 -1
  77. package/lib/common/features/navigation/resolve-navigation-targets-action-handler.js +2 -3
  78. package/lib/common/features/navigation/resolve-navigation-targets-action-handler.js.map +1 -1
  79. package/lib/common/features/popup/request-popup-model-action-handler.js +2 -3
  80. package/lib/common/features/popup/request-popup-model-action-handler.js.map +1 -1
  81. package/lib/common/features/progress/progress-service.d.ts +44 -0
  82. package/lib/common/features/progress/progress-service.d.ts.map +1 -0
  83. package/lib/common/features/progress/progress-service.js +50 -0
  84. package/lib/common/features/progress/progress-service.js.map +1 -0
  85. package/lib/common/features/validation/model-validator.d.ts +47 -2
  86. package/lib/common/features/validation/model-validator.d.ts.map +1 -1
  87. package/lib/common/features/validation/model-validator.js +79 -1
  88. package/lib/common/features/validation/model-validator.js.map +1 -1
  89. package/lib/common/features/validation/request-markers-handler.d.ts +15 -0
  90. package/lib/common/features/validation/request-markers-handler.d.ts.map +1 -1
  91. package/lib/common/features/validation/request-markers-handler.js +5 -12
  92. package/lib/common/features/validation/request-markers-handler.js.map +1 -1
  93. package/lib/common/gmodel/apply-label-edit-operation-handler.js +2 -3
  94. package/lib/common/gmodel/apply-label-edit-operation-handler.js.map +1 -1
  95. package/lib/common/gmodel/change-bounds-operation-handler.js +2 -3
  96. package/lib/common/gmodel/change-bounds-operation-handler.js.map +1 -1
  97. package/lib/common/gmodel/change-routing-points-operation-handler.js +2 -3
  98. package/lib/common/gmodel/change-routing-points-operation-handler.js.map +1 -1
  99. package/lib/common/gmodel/cut-operation-handler.js +2 -3
  100. package/lib/common/gmodel/cut-operation-handler.js.map +1 -1
  101. package/lib/common/gmodel/delete-operation-handler.js +2 -3
  102. package/lib/common/gmodel/delete-operation-handler.js.map +1 -1
  103. package/lib/common/gmodel/gmodel-create-edge-operation-handler.js +2 -3
  104. package/lib/common/gmodel/gmodel-create-edge-operation-handler.js.map +1 -1
  105. package/lib/common/gmodel/gmodel-create-node-operation-handler.js +2 -3
  106. package/lib/common/gmodel/gmodel-create-node-operation-handler.js.map +1 -1
  107. package/lib/common/gmodel/gmodel-diagram-module.js +2 -3
  108. package/lib/common/gmodel/gmodel-diagram-module.js.map +1 -1
  109. package/lib/common/gmodel/gmodel-operation-handler.js +1 -1
  110. package/lib/common/gmodel/gmodel-operation-handler.js.map +1 -1
  111. package/lib/common/gmodel/paste-operation-handler.js +2 -3
  112. package/lib/common/gmodel/paste-operation-handler.js.map +1 -1
  113. package/lib/common/gmodel/reconnect-edge-operation-handler.js +2 -3
  114. package/lib/common/gmodel/reconnect-edge-operation-handler.js.map +1 -1
  115. package/lib/common/launch/glsp-server-launcher.js +2 -3
  116. package/lib/common/launch/glsp-server-launcher.js.map +1 -1
  117. package/lib/common/launch/jsonrpc-server-launcher.js +2 -3
  118. package/lib/common/launch/jsonrpc-server-launcher.js.map +1 -1
  119. package/lib/common/operations/compound-operation-handler.js +6 -12
  120. package/lib/common/operations/compound-operation-handler.js.map +1 -1
  121. package/lib/common/operations/create-operation-handler.js +1 -1
  122. package/lib/common/operations/create-operation-handler.js.map +1 -1
  123. package/lib/common/operations/operation-action-handler.js +2 -3
  124. package/lib/common/operations/operation-action-handler.js.map +1 -1
  125. package/lib/common/operations/operation-handler-registry.js +4 -6
  126. package/lib/common/operations/operation-handler-registry.js.map +1 -1
  127. package/lib/common/operations/operation-handler.js +2 -3
  128. package/lib/common/operations/operation-handler.js.map +1 -1
  129. package/lib/common/protocol/glsp-server.js +2 -3
  130. package/lib/common/protocol/glsp-server.js.map +1 -1
  131. package/lib/common/session/client-session-factory.js +2 -3
  132. package/lib/common/session/client-session-factory.js.map +1 -1
  133. package/lib/common/session/client-session-manager.js +2 -3
  134. package/lib/common/session/client-session-manager.js.map +1 -1
  135. package/lib/common/utils/args-util.js +2 -2
  136. package/lib/common/utils/args-util.js.map +1 -1
  137. package/lib/common/utils/console-logger.js +2 -3
  138. package/lib/common/utils/console-logger.js.map +1 -1
  139. package/lib/common/utils/logger.d.ts.map +1 -1
  140. package/lib/common/utils/logger.js +5 -5
  141. package/lib/common/utils/logger.js.map +1 -1
  142. package/lib/common/utils/registry.js +4 -6
  143. package/lib/common/utils/registry.js.map +1 -1
  144. package/lib/node/abstract-json-model-storage.js +2 -3
  145. package/lib/node/abstract-json-model-storage.js.map +1 -1
  146. package/lib/node/gmodel/gmodel-storage.js +2 -3
  147. package/lib/node/gmodel/gmodel-storage.js.map +1 -1
  148. package/lib/node/launch/socket-server-launcher.js +2 -3
  149. package/lib/node/launch/socket-server-launcher.js.map +1 -1
  150. package/lib/node/launch/websocket-server-launcher.js +2 -3
  151. package/lib/node/launch/websocket-server-launcher.js.map +1 -1
  152. package/package.json +6 -4
  153. package/src/common/di/binding-target.ts +1 -0
  154. package/src/common/di/diagram-module.ts +20 -7
  155. package/src/common/features/model/model-submission-handler.ts +12 -0
  156. package/src/common/features/model/request-model-action-handler.ts +16 -15
  157. package/src/common/features/progress/progress-service.ts +74 -0
  158. package/src/common/features/validation/model-validator.ts +75 -3
  159. package/src/common/features/validation/request-markers-handler.ts +4 -10
  160. package/src/common/utils/args-util.ts +1 -1
  161. package/src/common/utils/logger.ts +2 -1
  162. package/lib/common/actions/action-dispatcher.spec.d.ts +0 -2
  163. package/lib/common/actions/action-dispatcher.spec.d.ts.map +0 -1
  164. package/lib/common/actions/action-dispatcher.spec.js +0 -264
  165. package/lib/common/actions/action-dispatcher.spec.js.map +0 -1
  166. package/lib/common/actions/action-handler-registry.spec.d.ts +0 -2
  167. package/lib/common/actions/action-handler-registry.spec.d.ts.map +0 -1
  168. package/lib/common/actions/action-handler-registry.spec.js +0 -50
  169. package/lib/common/actions/action-handler-registry.spec.js.map +0 -1
  170. package/lib/common/actions/global-action-provider.spec.d.ts +0 -2
  171. package/lib/common/actions/global-action-provider.spec.d.ts.map +0 -1
  172. package/lib/common/actions/global-action-provider.spec.js +0 -70
  173. package/lib/common/actions/global-action-provider.spec.js.map +0 -1
  174. package/lib/common/command/command-stack.spec.d.ts +0 -2
  175. package/lib/common/command/command-stack.spec.d.ts.map +0 -1
  176. package/lib/common/command/command-stack.spec.js +0 -207
  177. package/lib/common/command/command-stack.spec.js.map +0 -1
  178. package/lib/common/command/command.spec.d.ts +0 -2
  179. package/lib/common/command/command.spec.d.ts.map +0 -1
  180. package/lib/common/command/command.spec.js +0 -86
  181. package/lib/common/command/command.spec.js.map +0 -1
  182. package/lib/common/command/recording-command.spec.d.ts +0 -17
  183. package/lib/common/command/recording-command.spec.d.ts.map +0 -1
  184. package/lib/common/command/recording-command.spec.js +0 -62
  185. package/lib/common/command/recording-command.spec.js.map +0 -1
  186. package/lib/common/di/binding-target.spec.d.ts +0 -2
  187. package/lib/common/di/binding-target.spec.d.ts.map +0 -1
  188. package/lib/common/di/binding-target.spec.js +0 -121
  189. package/lib/common/di/binding-target.spec.js.map +0 -1
  190. package/lib/common/di/multi-bindings.spec.d.ts +0 -2
  191. package/lib/common/di/multi-bindings.spec.d.ts.map +0 -1
  192. package/lib/common/di/multi-bindings.spec.js +0 -137
  193. package/lib/common/di/multi-bindings.spec.js.map +0 -1
  194. package/lib/common/diagram/request-type-hints-action-handler.spec.d.ts +0 -2
  195. package/lib/common/diagram/request-type-hints-action-handler.spec.d.ts.map +0 -1
  196. package/lib/common/diagram/request-type-hints-action-handler.spec.js +0 -57
  197. package/lib/common/diagram/request-type-hints-action-handler.spec.js.map +0 -1
  198. package/lib/common/features/contextactions/context-actions-provider-registry.spec.d.ts +0 -2
  199. package/lib/common/features/contextactions/context-actions-provider-registry.spec.d.ts.map +0 -1
  200. package/lib/common/features/contextactions/context-actions-provider-registry.spec.js +0 -34
  201. package/lib/common/features/contextactions/context-actions-provider-registry.spec.js.map +0 -1
  202. package/lib/common/features/contextactions/request-context-actions-handler.spec.d.ts +0 -2
  203. package/lib/common/features/contextactions/request-context-actions-handler.spec.d.ts.map +0 -1
  204. package/lib/common/features/contextactions/request-context-actions-handler.spec.js +0 -63
  205. package/lib/common/features/contextactions/request-context-actions-handler.spec.js.map +0 -1
  206. package/lib/common/features/contextactions/tool-palette-item-provider.spec.d.ts +0 -2
  207. package/lib/common/features/contextactions/tool-palette-item-provider.spec.d.ts.map +0 -1
  208. package/lib/common/features/contextactions/tool-palette-item-provider.spec.js +0 -48
  209. package/lib/common/features/contextactions/tool-palette-item-provider.spec.js.map +0 -1
  210. package/lib/common/features/directediting/context-edit-validator-registry.spec.d.ts +0 -2
  211. package/lib/common/features/directediting/context-edit-validator-registry.spec.d.ts.map +0 -1
  212. package/lib/common/features/directediting/context-edit-validator-registry.spec.js +0 -44
  213. package/lib/common/features/directediting/context-edit-validator-registry.spec.js.map +0 -1
  214. package/lib/common/features/directediting/request-edit-validation-handler.spec.d.ts +0 -2
  215. package/lib/common/features/directediting/request-edit-validation-handler.spec.d.ts.map +0 -1
  216. package/lib/common/features/directediting/request-edit-validation-handler.spec.js +0 -97
  217. package/lib/common/features/directediting/request-edit-validation-handler.spec.js.map +0 -1
  218. package/lib/common/features/model/gmodel-serializer.spec.d.ts +0 -2
  219. package/lib/common/features/model/gmodel-serializer.spec.d.ts.map +0 -1
  220. package/lib/common/features/model/gmodel-serializer.spec.js +0 -124
  221. package/lib/common/features/model/gmodel-serializer.spec.js.map +0 -1
  222. package/lib/common/operations/operation-handler-registry.spec.d.ts +0 -2
  223. package/lib/common/operations/operation-handler-registry.spec.d.ts.map +0 -1
  224. package/lib/common/operations/operation-handler-registry.spec.js +0 -50
  225. package/lib/common/operations/operation-handler-registry.spec.js.map +0 -1
  226. package/lib/common/protocol/glsp-server.spec.d.ts +0 -2
  227. package/lib/common/protocol/glsp-server.spec.d.ts.map +0 -1
  228. package/lib/common/protocol/glsp-server.spec.js +0 -132
  229. package/lib/common/protocol/glsp-server.spec.js.map +0 -1
  230. package/lib/common/session/client-session-factory.spec.d.ts +0 -2
  231. package/lib/common/session/client-session-factory.spec.d.ts.map +0 -1
  232. package/lib/common/session/client-session-factory.spec.js +0 -56
  233. package/lib/common/session/client-session-factory.spec.js.map +0 -1
  234. package/lib/common/session/client-session-manager.spec.d.ts +0 -2
  235. package/lib/common/session/client-session-manager.spec.d.ts.map +0 -1
  236. package/lib/common/session/client-session-manager.spec.js +0 -74
  237. package/lib/common/session/client-session-manager.spec.js.map +0 -1
  238. package/lib/common/test/mock-util.d.ts +0 -120
  239. package/lib/common/test/mock-util.d.ts.map +0 -1
  240. package/lib/common/test/mock-util.js +0 -216
  241. package/lib/common/test/mock-util.js.map +0 -1
  242. package/lib/common/utils/promise-queue.spec.d.ts +0 -2
  243. package/lib/common/utils/promise-queue.spec.d.ts.map +0 -1
  244. package/lib/common/utils/promise-queue.spec.js +0 -117
  245. package/lib/common/utils/promise-queue.spec.js.map +0 -1
  246. package/lib/common/utils/registry.spec.d.ts +0 -2
  247. package/lib/common/utils/registry.spec.d.ts.map +0 -1
  248. package/lib/common/utils/registry.spec.js +0 -199
  249. package/lib/common/utils/registry.spec.js.map +0 -1
  250. package/lib/node/launch/cli-parser.spec.d.ts +0 -2
  251. package/lib/node/launch/cli-parser.spec.d.ts.map +0 -1
  252. package/lib/node/launch/cli-parser.spec.js +0 -56
  253. package/lib/node/launch/cli-parser.spec.js.map +0 -1
  254. package/lib/node/launch/socket-cli-parser.spec.d.ts +0 -2
  255. package/lib/node/launch/socket-cli-parser.spec.d.ts.map +0 -1
  256. package/lib/node/launch/socket-cli-parser.spec.js +0 -66
  257. package/lib/node/launch/socket-cli-parser.spec.js.map +0 -1
  258. package/lib/node/launch/socket-server-launcher.spec.d.ts +0 -17
  259. package/lib/node/launch/socket-server-launcher.spec.d.ts.map +0 -1
  260. package/lib/node/launch/socket-server-launcher.spec.js +0 -75
  261. package/lib/node/launch/socket-server-launcher.spec.js.map +0 -1
@@ -1,199 +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 registry_1 = require("./registry");
19
- const chai_1 = require("chai");
20
- describe('Test Registry', () => {
21
- let registry;
22
- beforeEach(() => {
23
- registry = new registry_1.Registry();
24
- });
25
- it('register - with new key-value pair', () => {
26
- const key = 'key';
27
- const value = 'value';
28
- (0, chai_1.expect)(registry.register(key, value)).true;
29
- (0, chai_1.expect)(registry.get(key), value);
30
- });
31
- it('register - with key-value pair with a already registered key', () => {
32
- // Setup
33
- const key = 'key';
34
- const value = 'value';
35
- (0, chai_1.expect)(registry.register(key, value)).true;
36
- // Test execution
37
- (0, chai_1.expect)(registry.register(key, 'newValue')).false;
38
- (0, chai_1.expect)(registry.get(key), value);
39
- });
40
- it('deregister - with registered key', () => {
41
- // Setup
42
- const key = 'key';
43
- const value = 'value';
44
- (0, chai_1.expect)(registry.register(key, value)).true;
45
- // Test execution
46
- (0, chai_1.expect)(registry.deregister(key)).true;
47
- (0, chai_1.expect)(registry.get(key), undefined);
48
- });
49
- it('deregister - with unregistered key', () => {
50
- (0, chai_1.expect)(registry.deregister('unregisteredKey')).false;
51
- });
52
- it('haskey - with registered key', () => {
53
- // Setup
54
- const key = 'key';
55
- const value = 'value';
56
- (0, chai_1.expect)(registry.register(key, value)).true;
57
- // Test execution
58
- (0, chai_1.expect)(registry.hasKey(key)).true;
59
- });
60
- it('haskey - with unregistered key', () => {
61
- (0, chai_1.expect)(registry.deregister('unregisteredKey')).false;
62
- });
63
- it('get - with registered key', () => {
64
- // Setup
65
- const key = 'key';
66
- const value = 'value';
67
- (0, chai_1.expect)(registry.register(key, value)).true;
68
- // Test execution
69
- (0, chai_1.expect)(registry.get(key), value);
70
- });
71
- it('get - with unregistered key', () => {
72
- (0, chai_1.expect)(registry.get('unregisteredKey'), undefined);
73
- });
74
- it('getAll - should return three values', () => {
75
- // Setup
76
- const e1 = { key: 'key1', value: 'value1' };
77
- const e2 = { key: 'key2', value: 'value2' };
78
- const e3 = { key: 'key3', value: 'value3' };
79
- registry.register(e1.key, e1.value);
80
- registry.register(e2.key, e2.value);
81
- registry.register(e3.key, e3.value);
82
- // Test execution
83
- const result = registry.getAll();
84
- (0, chai_1.expect)(result).to.have.length(3);
85
- (0, chai_1.expect)(result.includes(e1.value)).true;
86
- (0, chai_1.expect)(result.includes(e2.value)).true;
87
- (0, chai_1.expect)(result.includes(e3.value)).true;
88
- });
89
- it('keys - should return three keys', () => {
90
- // Setup
91
- const e1 = { key: 'key1', value: 'value1' };
92
- const e2 = { key: 'key2', value: 'value2' };
93
- const e3 = { key: 'key3', value: 'value3' };
94
- registry.register(e1.key, e1.value);
95
- registry.register(e2.key, e2.value);
96
- registry.register(e3.key, e3.value);
97
- // Test execution
98
- const result = registry.keys();
99
- (0, chai_1.expect)(result).to.have.length(3);
100
- (0, chai_1.expect)(result.includes(e1.key)).true;
101
- (0, chai_1.expect)(result.includes(e2.key)).true;
102
- (0, chai_1.expect)(result.includes(e3.key)).true;
103
- });
104
- });
105
- describe('Test MapMultiRegistry', () => {
106
- let multiRegistry;
107
- beforeEach(() => {
108
- multiRegistry = new registry_1.MultiRegistry();
109
- });
110
- it('register - with new key-value pair', () => {
111
- // Setup
112
- const e1 = { key: 'key', value: 'value' };
113
- const e2 = { key: e1.key, value: 'value2' };
114
- multiRegistry.register(e1.key, e1.value);
115
- multiRegistry.register(e2.key, e2.value);
116
- const resultValue = multiRegistry.get(e1.key);
117
- (0, chai_1.expect)(resultValue).to.not.be.undefined;
118
- (0, chai_1.expect)(resultValue.length).to.be.equal(2);
119
- (0, chai_1.expect)(resultValue.includes(e1.value)).true;
120
- (0, chai_1.expect)(resultValue.includes(e2.value)).true;
121
- });
122
- it('deregister - with registered key', () => {
123
- // Setup
124
- const key = 'key';
125
- const existingValue = ['value', 'value2'];
126
- multiRegistry.register(key, existingValue[0]);
127
- multiRegistry.register(key, existingValue[1]);
128
- // Test execution
129
- (0, chai_1.expect)(multiRegistry.deregister(key, existingValue[1])).true;
130
- const result = multiRegistry.get(key);
131
- (0, chai_1.expect)(result.length).to.be.equal(1);
132
- (0, chai_1.expect)(result[0], existingValue[0]);
133
- });
134
- it('deregister - with unregistered key', () => {
135
- (0, chai_1.expect)(multiRegistry.deregister('unregisteredKey', 'someValue')).false;
136
- });
137
- it('deregisterAll - with registered key', () => {
138
- // Setup
139
- const key = 'key';
140
- const existingValue = ['value', 'value2'];
141
- multiRegistry.register(key, existingValue[0]);
142
- multiRegistry.register(key, existingValue[1]);
143
- (0, chai_1.expect)(multiRegistry.deregisterAll(key)).true;
144
- (0, chai_1.expect)(multiRegistry.get(key)).to.have.length(0);
145
- });
146
- it('deregisterAll - with unregistered key', () => {
147
- (0, chai_1.expect)(multiRegistry.deregisterAll('unregisteredKey')).false;
148
- });
149
- it('haskey - with registered key', () => {
150
- // Setup
151
- const key = 'key';
152
- const existingValue = 'value';
153
- multiRegistry.register(key, existingValue);
154
- // Test execution
155
- (0, chai_1.expect)(multiRegistry.hasKey(key)).true;
156
- });
157
- it('haskey - with unregistered key', () => {
158
- (0, chai_1.expect)(multiRegistry.hasKey('unregisteredKey')).false;
159
- });
160
- it('get - with registered key', () => {
161
- // Setup
162
- const key = 'key';
163
- const existingValue = 'value';
164
- multiRegistry.register(key, existingValue);
165
- // Test execution
166
- (0, chai_1.expect)(multiRegistry.get(key).length).to.be.equal(1);
167
- (0, chai_1.expect)(multiRegistry.get(key).includes(existingValue)).true;
168
- });
169
- it('get - with unregistered key', () => {
170
- (0, chai_1.expect)(multiRegistry.get('unregisteredKey')).to.have.length(0);
171
- });
172
- it('getAll', () => {
173
- // Setup
174
- const e1 = { key: 'key1', value: ['value1', 'value2'] };
175
- const e2 = { key: 'key2', value: ['value3'] };
176
- multiRegistry.register(e1.key, e1.value[0]);
177
- multiRegistry.register(e1.key, e1.value[1]);
178
- multiRegistry.register(e2.key, e2.value[0]);
179
- // Test execution
180
- const result = multiRegistry.getAll();
181
- (0, chai_1.expect)(result).to.have.length(3);
182
- (0, chai_1.expect)(e1.value.every(v => result.includes(v))).true;
183
- (0, chai_1.expect)(e2.value.every(v => result.includes(v))).true;
184
- });
185
- it('keys', () => {
186
- // Setup
187
- const e1 = { key: 'key1', value: ['value1', 'value2'] };
188
- const e2 = { key: 'key2', value: ['value3'] };
189
- multiRegistry.register(e1.key, e1.value[0]);
190
- multiRegistry.register(e1.key, e1.value[1]);
191
- multiRegistry.register(e2.key, e2.value[0]);
192
- // Test execution
193
- const result = multiRegistry.keys();
194
- (0, chai_1.expect)(result.length).to.be.equal(2);
195
- (0, chai_1.expect)(result.includes(e1.key)).true;
196
- (0, chai_1.expect)(result.includes(e2.key)).true;
197
- });
198
- });
199
- //# sourceMappingURL=registry.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"registry.spec.js","sourceRoot":"","sources":["../../../src/common/utils/registry.spec.ts"],"names":[],"mappings":";;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xD,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC9C,aAAa,CAAC,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QAC5C,aAAa,CAAC,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QAC5C,aAAa,CAAC,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QAC5C,iBAAiB;QACjB,MAAM,MAAM,GAAG,aAAa,CAAC,IAAI,EAAE,CAAC;QACpC,IAAA,aAAM,EAAC,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACrC,IAAA,aAAM,EAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC;QACrC,IAAA,aAAM,EAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC;IACzC,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=cli-parser.spec.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cli-parser.spec.d.ts","sourceRoot":"","sources":["../../../src/node/launch/cli-parser.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 path = require("path");
20
- const logger_1 = require("../../common/utils/logger");
21
- const cli_parser_1 = require("./cli-parser");
22
- describe('test createCliParser', () => {
23
- const parser = (0, cli_parser_1.createCliParser)();
24
- parser.command.exitOverride();
25
- const argv = ['/usr/bin/node', 'test'];
26
- it('parse - no args', () => {
27
- const options = parser.parse(argv);
28
- (0, chai_1.expect)(options).to.deep.equal(cli_parser_1.defaultLaunchOptions);
29
- });
30
- it('parse - invalid log dir', () => {
31
- (0, chai_1.expect)(() => parser.parse([...argv, '--logDir', 'invalid.Path'])).to.throw();
32
- });
33
- it('parse - valid log dir', () => {
34
- const logDir = path.resolve('../customLog');
35
- const result = parser.parse([...argv, '--logDir', '../customLog/']);
36
- (0, chai_1.expect)(result.logDir, logDir);
37
- });
38
- it('parse - invalid logLevel', () => {
39
- (0, chai_1.expect)(() => parser.parse([...argv, '--logLevel', 'someRandomLevel'])).to.throw();
40
- });
41
- it('parse - valid logLevel', () => {
42
- const result = parser.parse([...argv, '--logLevel', 'error']);
43
- (0, chai_1.expect)(result.logLevel).to.be.equal(logger_1.LogLevel.error);
44
- });
45
- it('parse- no args with custom default options', () => {
46
- const options = {
47
- logDir: '.myLogDir',
48
- logLevel: logger_1.LogLevel.debug,
49
- consoleLog: false,
50
- fileLog: true
51
- };
52
- const result = (0, cli_parser_1.createCliParser)(options).parse(argv);
53
- (0, chai_1.expect)(result).to.deep.equal(options);
54
- });
55
- });
56
- //# sourceMappingURL=cli-parser.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cli-parser.spec.js","sourceRoot":"","sources":["../../../src/node/launch/cli-parser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YAAY,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC;IACtF,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,wBAAwB,EAAE,GAAG,EAAE;QAC9B,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,GAAG,IAAI,EAAE,YAAY,EAAE,OAAO,CAAC,CAAC,CAAC;QAC9D,IAAA,aAAM,EAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAQ,CAAC,KAAK,CAAC,CAAC;IACxD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,4CAA4C,EAAE,GAAG,EAAE;QAClD,MAAM,OAAO,GAAG;YACZ,MAAM,EAAE,WAAW;YACnB,QAAQ,EAAE,iBAAQ,CAAC,KAAK;YACxB,UAAU,EAAE,KAAK;YACjB,OAAO,EAAE,IAAI;SAChB,CAAC;QACF,MAAM,MAAM,GAAG,IAAA,4BAAe,EAAC,OAAO,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACpD,IAAA,aAAM,EAAC,MAAM,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAC1C,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=socket-cli-parser.spec.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"socket-cli-parser.spec.d.ts","sourceRoot":"","sources":["../../../src/node/launch/socket-cli-parser.spec.ts"],"names":[],"mappings":""}
@@ -1,66 +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 logger_1 = require("../../common/utils/logger");
20
- const socket_cli_parser_1 = require("./socket-cli-parser");
21
- describe('test createCliParser', () => {
22
- const parser = (0, socket_cli_parser_1.createSocketCliParser)();
23
- parser.command.exitOverride();
24
- const argv = ['/usr/bin/node', 'test'];
25
- it('parse - no args', () => {
26
- const options = parser.parse(argv);
27
- (0, chai_1.expect)(options).to.deep.equal(socket_cli_parser_1.defaultSocketLaunchOptions);
28
- });
29
- it('parse - invalid port (below lower range)', () => {
30
- (0, chai_1.expect)(() => parser.parse([...argv, '--port', '-1'])).to.throw();
31
- });
32
- it('parse - invalid port (below upper range)', () => {
33
- (0, chai_1.expect)(() => parser.parse([...argv, '--port', '65536'])).to.throw();
34
- });
35
- it('parse - valid port', () => {
36
- const port = 3000;
37
- const result = parser.parse([...argv, '--port', '3000']);
38
- (0, chai_1.expect)(result.port).to.equal(port);
39
- });
40
- it('parse - --no-consoleLog', () => {
41
- const result = parser.parse([...argv, '--no-consoleLog']);
42
- (0, chai_1.expect)(result.consoleLog).false;
43
- });
44
- it('parse - --fileLog', () => {
45
- const result = parser.parse([...argv, '--fileLog']);
46
- (0, chai_1.expect)(result.fileLog).true;
47
- });
48
- it('parse - custom host name', () => {
49
- const host = 'docker.internal';
50
- const result = parser.parse([...argv, '--host', host]);
51
- (0, chai_1.expect)(result.host, host);
52
- });
53
- it('parse- no args with custom default options', () => {
54
- const options = {
55
- logDir: '.myLogDir',
56
- logLevel: logger_1.LogLevel.debug,
57
- consoleLog: true,
58
- fileLog: true,
59
- host: 'myHost',
60
- port: 3000
61
- };
62
- const result = (0, socket_cli_parser_1.createSocketCliParser)(options).parse(argv);
63
- (0, chai_1.expect)(result).to.deep.equal(options);
64
- });
65
- });
66
- //# sourceMappingURL=socket-cli-parser.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"socket-cli-parser.spec.js","sourceRoot":"","sources":["../../../src/node/launch/socket-cli-parser.spec.ts"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,+BAA8B;AAC9B,sDAAqD;AACrD,2DAA6G;AAE7G,QAAQ,CAAC,sBAAsB,EAAE,GAAG,EAAE;IAClC,MAAM,MAAM,GAAG,IAAA,yCAAqB,GAAE,CAAC;IAEvC,MAAM,CAAC,OAAO,CAAC,YAAY,EAAE,CAAC;IAC9B,MAAM,IAAI,GAAG,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;IAEvC,EAAE,CAAC,iBAAiB,EAAE,GAAG,EAAE;QACvB,MAAM,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACnC,IAAA,aAAM,EAAC,OAAO,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,8CAA0B,CAAC,CAAC;IAC9D,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,0CAA0C,EAAE,GAAG,EAAE;QAChD,IAAA,aAAM,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,GAAG,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC;IACrE,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,0CAA0C,EAAE,GAAG,EAAE;QAChD,IAAA,aAAM,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,GAAG,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC;IACxE,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,oBAA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,EAAE,QAAQ;YACd,IAAI,EAAE,IAAI;SACb,CAAC;QACF,MAAM,MAAM,GAAG,IAAA,yCAAqB,EAAC,OAAO,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC1D,IAAA,aAAM,EAAC,MAAM,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAC1C,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
@@ -1,17 +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
- export {};
17
- //# sourceMappingURL=socket-server-launcher.spec.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"socket-server-launcher.spec.d.ts","sourceRoot":"","sources":["../../../src/node/launch/socket-server-launcher.spec.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF"}
@@ -1,75 +0,0 @@
1
- "use strict";
2
- /********************************************************************************
3
- * Copyright (c) 2022-2023 STMicroelectronics and others.
4
- *
5
- * This program and the accompanying materials are made available under the
6
- * terms of the Eclipse Public License v. 2.0 which is available at
7
- * http://www.eclipse.org/legal/epl-2.0.
8
- *
9
- * This Source Code may also be made available under the following Secondary
10
- * Licenses when the conditions for such availability set forth in the Eclipse
11
- * Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
- * with the GNU Classpath Exception which is available at
13
- * https://www.gnu.org/software/classpath/license.html.
14
- *
15
- * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
16
- ********************************************************************************/
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- const protocol_1 = require("@eclipse-glsp/protocol");
19
- const chai_1 = require("chai");
20
- const inversify_1 = require("inversify");
21
- const net = require("net");
22
- const sinon = require("sinon");
23
- const glsp_server_1 = require("../../common/protocol/glsp-server");
24
- const app_module_1 = require("../di/app-module");
25
- const socket_cli_parser_1 = require("./socket-cli-parser");
26
- const socket_server_launcher_1 = require("./socket-server-launcher");
27
- const severPort = 5008;
28
- describe('test SocketServerLauncher', () => {
29
- it('starts and stops', async () => {
30
- const appContainer = new inversify_1.Container();
31
- const serverStub = sinon.createStubInstance(glsp_server_1.DefaultGLSPServer);
32
- appContainer.load((0, app_module_1.createAppModule)(socket_cli_parser_1.defaultSocketLaunchOptions));
33
- appContainer.bind(protocol_1.GLSPServer).toConstantValue(serverStub);
34
- const launcher = appContainer.resolve(socket_server_launcher_1.SocketServerLauncher);
35
- launcher.start({ port: severPort });
36
- const sockStart = new net.Socket();
37
- sockStart.setTimeout(100);
38
- const startPromise = new Promise(res => {
39
- sockStart
40
- .on('connect', () => {
41
- (0, chai_1.expect)(true);
42
- sockStart.destroy();
43
- res(true);
44
- })
45
- .on('error', e => {
46
- chai_1.expect.fail('Server is not reachable: ' + e.message);
47
- })
48
- .on('timeout', () => {
49
- chai_1.expect.fail('Connection time outed.');
50
- })
51
- .connect(severPort);
52
- });
53
- await startPromise;
54
- launcher.shutdown();
55
- const sockStop = new net.Socket();
56
- sockStop.setTimeout(100);
57
- const stopPromise = new Promise(res => {
58
- sockStop
59
- .on('connect', () => {
60
- chai_1.expect.fail('Server still reachable.');
61
- })
62
- .on('error', () => {
63
- (0, chai_1.expect)(true);
64
- sockStop.destroy();
65
- res(true);
66
- })
67
- .on('timeout', () => {
68
- chai_1.expect.fail('Connection time outed.');
69
- })
70
- .connect(severPort);
71
- });
72
- await stopPromise;
73
- });
74
- });
75
- //# sourceMappingURL=socket-server-launcher.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"socket-server-launcher.spec.js","sourceRoot":"","sources":["../../../src/node/launch/socket-server-launcher.spec.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;AAElF,qDAAoD;AACpD,+BAA8B;AAC9B,yCAAsC;AACtC,2BAA2B;AAC3B,+BAA+B;AAC/B,mEAAsE;AACtE,iDAAmD;AACnD,2DAAiE;AACjE,qEAAgE;AAChE,MAAM,SAAS,GAAG,IAAI,CAAC;AACvB,QAAQ,CAAC,2BAA2B,EAAE,GAAG,EAAE;IACvC,EAAE,CAAC,kBAAkB,EAAE,KAAK,IAAI,EAAE;QAC9B,MAAM,YAAY,GAAG,IAAI,qBAAS,EAAE,CAAC;QACrC,MAAM,UAAU,GAAG,KAAK,CAAC,kBAAkB,CAAC,+BAAiB,CAAC,CAAC;QAC/D,YAAY,CAAC,IAAI,CAAC,IAAA,4BAAe,EAAC,8CAA0B,CAAC,CAAC,CAAC;QAE/D,YAAY,CAAC,IAAI,CAAC,qBAAU,CAAC,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC;QAC1D,MAAM,QAAQ,GAAG,YAAY,CAAC,OAAO,CAAC,6CAAoB,CAAC,CAAC;QAC5D,QAAQ,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC;QACpC,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,MAAM,EAAE,CAAC;QACnC,SAAS,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;QAC1B,MAAM,YAAY,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC,EAAE;YACnC,SAAS;iBACJ,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE;gBAChB,IAAA,aAAM,EAAC,IAAI,CAAC,CAAC;gBACb,SAAS,CAAC,OAAO,EAAE,CAAC;gBACpB,GAAG,CAAC,IAAI,CAAC,CAAC;YACd,CAAC,CAAC;iBACD,EAAE,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