@eclipse-glsp/server 1.1.0-next.146ae06.49 → 1.1.0-next.2ae7567.68

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 (368) hide show
  1. package/lib/browser/launch/worker-server-launcher.js +2 -2
  2. package/lib/browser/launch/worker-server-launcher.js.map +1 -1
  3. package/lib/common/actions/action-dispatcher.d.ts +2 -1
  4. package/lib/common/actions/action-dispatcher.d.ts.map +1 -1
  5. package/lib/common/actions/action-dispatcher.js +9 -7
  6. package/lib/common/actions/action-dispatcher.js.map +1 -1
  7. package/lib/common/actions/action-handler-registry.js +4 -4
  8. package/lib/common/actions/action-handler-registry.js.map +1 -1
  9. package/lib/common/actions/client-action-handler.d.ts +17 -8
  10. package/lib/common/actions/client-action-handler.d.ts.map +1 -1
  11. package/lib/common/actions/client-action-handler.js +32 -22
  12. package/lib/common/actions/client-action-handler.js.map +1 -1
  13. package/lib/common/actions/global-action-provider.d.ts +6 -21
  14. package/lib/common/actions/global-action-provider.d.ts.map +1 -1
  15. package/lib/common/actions/global-action-provider.js +17 -22
  16. package/lib/common/actions/global-action-provider.js.map +1 -1
  17. package/lib/common/command/command-stack.js +2 -2
  18. package/lib/common/command/command-stack.js.map +1 -1
  19. package/lib/common/command/command.js +1 -1
  20. package/lib/common/command/command.js.map +1 -1
  21. package/lib/common/command/recording-command.d.ts +9 -15
  22. package/lib/common/command/recording-command.d.ts.map +1 -1
  23. package/lib/common/command/recording-command.js +12 -26
  24. package/lib/common/command/recording-command.js.map +1 -1
  25. package/lib/common/command/undo-redo-action-handler.js +2 -2
  26. package/lib/common/command/undo-redo-action-handler.js.map +1 -1
  27. package/lib/common/di/binding-target.d.ts.map +1 -1
  28. package/lib/common/di/binding-target.js +3 -2
  29. package/lib/common/di/binding-target.js.map +1 -1
  30. package/lib/common/di/client-session-module.d.ts +9 -1
  31. package/lib/common/di/client-session-module.d.ts.map +1 -1
  32. package/lib/common/di/client-session-module.js +9 -9
  33. package/lib/common/di/client-session-module.js.map +1 -1
  34. package/lib/common/di/diagram-module.d.ts +23 -1
  35. package/lib/common/di/diagram-module.d.ts.map +1 -1
  36. package/lib/common/di/diagram-module.js +23 -53
  37. package/lib/common/di/diagram-module.js.map +1 -1
  38. package/lib/common/di/glsp-module.js +2 -2
  39. package/lib/common/di/glsp-module.js.map +1 -1
  40. package/lib/common/di/server-module.d.ts +0 -1
  41. package/lib/common/di/server-module.d.ts.map +1 -1
  42. package/lib/common/di/server-module.js +0 -1
  43. package/lib/common/di/server-module.js.map +1 -1
  44. package/lib/common/diagram/diagram-configuration.js +1 -1
  45. package/lib/common/diagram/diagram-configuration.js.map +1 -1
  46. package/lib/common/features/clipboard/request-clipboard-data-action-handler.d.ts.map +1 -1
  47. package/lib/common/features/clipboard/request-clipboard-data-action-handler.js +2 -2
  48. package/lib/common/features/clipboard/request-clipboard-data-action-handler.js.map +1 -1
  49. package/lib/common/features/contextactions/command-palette-action-provider.js +2 -2
  50. package/lib/common/features/contextactions/command-palette-action-provider.js.map +1 -1
  51. package/lib/common/features/contextactions/context-actions-provider-registry.js +2 -2
  52. package/lib/common/features/contextactions/context-actions-provider-registry.js.map +1 -1
  53. package/lib/common/features/contextactions/context-menu-item-provider.js +2 -2
  54. package/lib/common/features/contextactions/context-menu-item-provider.js.map +1 -1
  55. package/lib/common/features/contextactions/request-context-actions-handler.js +2 -2
  56. package/lib/common/features/contextactions/request-context-actions-handler.js.map +1 -1
  57. package/lib/common/features/contextactions/tool-palette-item-provider.js +4 -4
  58. package/lib/common/features/contextactions/tool-palette-item-provider.js.map +1 -1
  59. package/lib/common/features/directediting/context-edit-validator-registry.js +2 -2
  60. package/lib/common/features/directediting/context-edit-validator-registry.js.map +1 -1
  61. package/lib/common/features/directediting/label-edit-validator.js +2 -2
  62. package/lib/common/features/directediting/label-edit-validator.js.map +1 -1
  63. package/lib/common/features/directediting/request-edit-validation-handler.js +2 -2
  64. package/lib/common/features/directediting/request-edit-validation-handler.js.map +1 -1
  65. package/lib/common/features/layout/computed-bounds-action-handler.js +2 -2
  66. package/lib/common/features/layout/computed-bounds-action-handler.js.map +1 -1
  67. package/lib/common/features/layout/layout-operation-handler.js +2 -2
  68. package/lib/common/features/layout/layout-operation-handler.js.map +1 -1
  69. package/lib/common/features/model/gmodel-factory.js +2 -2
  70. package/lib/common/features/model/gmodel-factory.js.map +1 -1
  71. package/lib/common/features/model/gmodel-index.js +2 -2
  72. package/lib/common/features/model/gmodel-index.js.map +1 -1
  73. package/lib/common/features/model/gmodel-serializer.d.ts +10 -10
  74. package/lib/common/features/model/gmodel-serializer.d.ts.map +1 -1
  75. package/lib/common/features/model/gmodel-serializer.js +2 -2
  76. package/lib/common/features/model/gmodel-serializer.js.map +1 -1
  77. package/lib/common/features/model/model-state.d.ts.map +1 -1
  78. package/lib/common/features/model/model-state.js +5 -2
  79. package/lib/common/features/model/model-state.js.map +1 -1
  80. package/lib/common/features/model/model-submission-handler.d.ts +28 -3
  81. package/lib/common/features/model/model-submission-handler.d.ts.map +1 -1
  82. package/lib/common/features/model/model-submission-handler.js +63 -9
  83. package/lib/common/features/model/model-submission-handler.js.map +1 -1
  84. package/lib/common/features/model/request-model-action-handler.d.ts +5 -6
  85. package/lib/common/features/model/request-model-action-handler.d.ts.map +1 -1
  86. package/lib/common/features/model/request-model-action-handler.js +37 -15
  87. package/lib/common/features/model/request-model-action-handler.js.map +1 -1
  88. package/lib/common/features/model/save-model-action-handler.js +2 -2
  89. package/lib/common/features/model/save-model-action-handler.js.map +1 -1
  90. package/lib/common/features/navigation/navigation-target-provider-registry.js +2 -2
  91. package/lib/common/features/navigation/navigation-target-provider-registry.js.map +1 -1
  92. package/lib/common/features/navigation/navigation-target-resolver.js +2 -2
  93. package/lib/common/features/navigation/navigation-target-resolver.js.map +1 -1
  94. package/lib/common/features/navigation/request-navigation-targets-action-handler.js +2 -2
  95. package/lib/common/features/navigation/request-navigation-targets-action-handler.js.map +1 -1
  96. package/lib/common/features/navigation/resolve-navigation-targets-action-handler.js +2 -2
  97. package/lib/common/features/navigation/resolve-navigation-targets-action-handler.js.map +1 -1
  98. package/lib/common/features/popup/request-popup-model-action-handler.js +2 -2
  99. package/lib/common/features/popup/request-popup-model-action-handler.js.map +1 -1
  100. package/lib/common/features/progress/progress-service.d.ts +44 -0
  101. package/lib/common/features/progress/progress-service.d.ts.map +1 -0
  102. package/lib/common/features/progress/progress-service.js +51 -0
  103. package/lib/common/features/progress/progress-service.js.map +1 -0
  104. package/lib/common/features/type-hints/edge-creation-checker.d.ts +42 -0
  105. package/lib/common/features/type-hints/edge-creation-checker.d.ts.map +1 -0
  106. package/lib/common/{command/recording-command.spec.d.ts → features/type-hints/edge-creation-checker.js} +5 -2
  107. package/lib/common/features/type-hints/edge-creation-checker.js.map +1 -0
  108. package/lib/common/features/type-hints/request-check-edge-action-handler.d.ts +29 -0
  109. package/lib/common/features/type-hints/request-check-edge-action-handler.d.ts.map +1 -0
  110. package/lib/common/features/type-hints/request-check-edge-action-handler.js +72 -0
  111. package/lib/common/features/type-hints/request-check-edge-action-handler.js.map +1 -0
  112. package/lib/common/{diagram → features/type-hints}/request-type-hints-action-handler.d.ts +2 -3
  113. package/lib/common/features/type-hints/request-type-hints-action-handler.d.ts.map +1 -0
  114. package/lib/common/{diagram → features/type-hints}/request-type-hints-action-handler.js +3 -4
  115. package/lib/common/features/type-hints/request-type-hints-action-handler.js.map +1 -0
  116. package/lib/common/features/validation/model-validator.js +2 -2
  117. package/lib/common/features/validation/model-validator.js.map +1 -1
  118. package/lib/common/features/validation/request-markers-handler.js +2 -2
  119. package/lib/common/features/validation/request-markers-handler.js.map +1 -1
  120. package/lib/common/gmodel/apply-label-edit-operation-handler.js +2 -2
  121. package/lib/common/gmodel/apply-label-edit-operation-handler.js.map +1 -1
  122. package/lib/common/gmodel/change-bounds-operation-handler.js +2 -2
  123. package/lib/common/gmodel/change-bounds-operation-handler.js.map +1 -1
  124. package/lib/common/gmodel/change-routing-points-operation-handler.js +2 -2
  125. package/lib/common/gmodel/change-routing-points-operation-handler.js.map +1 -1
  126. package/lib/common/gmodel/cut-operation-handler.js +2 -2
  127. package/lib/common/gmodel/cut-operation-handler.js.map +1 -1
  128. package/lib/common/gmodel/delete-operation-handler.js +2 -2
  129. package/lib/common/gmodel/delete-operation-handler.js.map +1 -1
  130. package/lib/common/gmodel/gmodel-create-edge-operation-handler.d.ts +3 -3
  131. package/lib/common/gmodel/gmodel-create-edge-operation-handler.d.ts.map +1 -1
  132. package/lib/common/gmodel/gmodel-create-edge-operation-handler.js +2 -2
  133. package/lib/common/gmodel/gmodel-create-edge-operation-handler.js.map +1 -1
  134. package/lib/common/gmodel/gmodel-create-node-operation-handler.d.ts +3 -3
  135. package/lib/common/gmodel/gmodel-create-node-operation-handler.d.ts.map +1 -1
  136. package/lib/common/gmodel/gmodel-create-node-operation-handler.js +2 -2
  137. package/lib/common/gmodel/gmodel-create-node-operation-handler.js.map +1 -1
  138. package/lib/common/gmodel/gmodel-diagram-module.js +2 -2
  139. package/lib/common/gmodel/gmodel-diagram-module.js.map +1 -1
  140. package/lib/common/gmodel/gmodel-operation-handler.js +1 -1
  141. package/lib/common/gmodel/gmodel-operation-handler.js.map +1 -1
  142. package/lib/common/gmodel/paste-operation-handler.d.ts.map +1 -1
  143. package/lib/common/gmodel/paste-operation-handler.js +2 -2
  144. package/lib/common/gmodel/paste-operation-handler.js.map +1 -1
  145. package/lib/common/gmodel/reconnect-edge-operation-handler.js +2 -2
  146. package/lib/common/gmodel/reconnect-edge-operation-handler.js.map +1 -1
  147. package/lib/common/index.d.ts +3 -1
  148. package/lib/common/index.d.ts.map +1 -1
  149. package/lib/common/index.js +3 -1
  150. package/lib/common/index.js.map +1 -1
  151. package/lib/common/launch/glsp-server-launcher.js +2 -2
  152. package/lib/common/launch/glsp-server-launcher.js.map +1 -1
  153. package/lib/common/launch/jsonrpc-server-launcher.js +2 -2
  154. package/lib/common/launch/jsonrpc-server-launcher.js.map +1 -1
  155. package/lib/common/operations/compound-operation-handler.d.ts +5 -0
  156. package/lib/common/operations/compound-operation-handler.d.ts.map +1 -1
  157. package/lib/common/operations/compound-operation-handler.js +12 -12
  158. package/lib/common/operations/compound-operation-handler.js.map +1 -1
  159. package/lib/common/operations/create-operation-handler.d.ts +19 -5
  160. package/lib/common/operations/create-operation-handler.d.ts.map +1 -1
  161. package/lib/common/operations/create-operation-handler.js +3 -2
  162. package/lib/common/operations/create-operation-handler.js.map +1 -1
  163. package/lib/common/operations/json-operation-handler.d.ts +94 -0
  164. package/lib/common/operations/json-operation-handler.d.ts.map +1 -0
  165. package/lib/common/operations/json-operation-handler.js +120 -0
  166. package/lib/common/operations/json-operation-handler.js.map +1 -0
  167. package/lib/common/operations/operation-action-handler.d.ts.map +1 -1
  168. package/lib/common/operations/operation-action-handler.js +3 -3
  169. package/lib/common/operations/operation-action-handler.js.map +1 -1
  170. package/lib/common/operations/operation-handler-registry.d.ts +1 -9
  171. package/lib/common/operations/operation-handler-registry.d.ts.map +1 -1
  172. package/lib/common/operations/operation-handler-registry.js +4 -14
  173. package/lib/common/operations/operation-handler-registry.js.map +1 -1
  174. package/lib/common/operations/operation-handler.d.ts +2 -2
  175. package/lib/common/operations/operation-handler.d.ts.map +1 -1
  176. package/lib/common/operations/operation-handler.js +2 -2
  177. package/lib/common/operations/operation-handler.js.map +1 -1
  178. package/lib/{node/launch/socket-server-launcher.spec.d.ts → common/protocol/client-action.d.ts} +17 -3
  179. package/lib/common/protocol/client-action.d.ts.map +1 -0
  180. package/lib/common/protocol/client-action.js +35 -0
  181. package/lib/common/protocol/client-action.js.map +1 -0
  182. package/lib/common/protocol/glsp-server.d.ts +1 -1
  183. package/lib/common/protocol/glsp-server.d.ts.map +1 -1
  184. package/lib/common/protocol/glsp-server.js +9 -11
  185. package/lib/common/protocol/glsp-server.js.map +1 -1
  186. package/lib/common/session/client-session-factory.js +5 -5
  187. package/lib/common/session/client-session-factory.js.map +1 -1
  188. package/lib/common/session/client-session-manager.js +2 -2
  189. package/lib/common/session/client-session-manager.js.map +1 -1
  190. package/lib/common/utils/args-util.js +2 -2
  191. package/lib/common/utils/args-util.js.map +1 -1
  192. package/lib/common/utils/client-options-util.d.ts +3 -0
  193. package/lib/common/utils/client-options-util.d.ts.map +1 -1
  194. package/lib/common/utils/client-options-util.js +5 -15
  195. package/lib/common/utils/client-options-util.js.map +1 -1
  196. package/lib/common/utils/console-logger.d.ts +1 -1
  197. package/lib/common/utils/console-logger.js +3 -3
  198. package/lib/common/utils/console-logger.js.map +1 -1
  199. package/lib/common/utils/logger.d.ts.map +1 -1
  200. package/lib/common/utils/logger.js +5 -4
  201. package/lib/common/utils/logger.js.map +1 -1
  202. package/lib/common/utils/promise-queue.d.ts.map +1 -1
  203. package/lib/common/utils/promise-queue.js +3 -6
  204. package/lib/common/utils/promise-queue.js.map +1 -1
  205. package/lib/common/utils/registry.d.ts +3 -1
  206. package/lib/common/utils/registry.d.ts.map +1 -1
  207. package/lib/common/utils/registry.js +15 -6
  208. package/lib/common/utils/registry.js.map +1 -1
  209. package/lib/node/abstract-json-model-storage.d.ts.map +1 -1
  210. package/lib/node/abstract-json-model-storage.js +10 -4
  211. package/lib/node/abstract-json-model-storage.js.map +1 -1
  212. package/lib/node/gmodel/gmodel-storage.d.ts.map +1 -1
  213. package/lib/node/gmodel/gmodel-storage.js +4 -3
  214. package/lib/node/gmodel/gmodel-storage.js.map +1 -1
  215. package/lib/node/launch/cli-parser.js +1 -1
  216. package/lib/node/launch/cli-parser.js.map +1 -1
  217. package/lib/node/launch/socket-server-launcher.js +2 -2
  218. package/lib/node/launch/socket-server-launcher.js.map +1 -1
  219. package/lib/node/launch/websocket-server-launcher.js +2 -2
  220. package/lib/node/launch/websocket-server-launcher.js.map +1 -1
  221. package/package.json +6 -5
  222. package/src/common/actions/action-dispatcher.spec.ts +3 -2
  223. package/src/common/actions/action-dispatcher.ts +8 -5
  224. package/src/common/actions/client-action-handler.ts +28 -18
  225. package/src/common/actions/global-action-provider.spec.ts +4 -15
  226. package/src/common/actions/global-action-provider.ts +21 -25
  227. package/src/common/command/recording-command.spec.ts +15 -5
  228. package/src/common/command/recording-command.ts +16 -27
  229. package/src/common/di/binding-target.ts +1 -0
  230. package/src/common/di/client-session-module.ts +17 -10
  231. package/src/common/di/diagram-module.ts +31 -70
  232. package/src/common/di/server-module.ts +0 -1
  233. package/src/common/features/clipboard/request-clipboard-data-action-handler.ts +3 -3
  234. package/src/common/features/model/gmodel-serializer.ts +11 -11
  235. package/src/common/features/model/model-state.ts +3 -0
  236. package/src/common/features/model/model-submission-handler.ts +52 -7
  237. package/src/common/features/model/request-model-action-handler.ts +37 -17
  238. package/src/common/features/progress/progress-service.ts +74 -0
  239. package/src/common/features/type-hints/edge-creation-checker.ts +44 -0
  240. package/src/common/features/type-hints/request-check-edge-action-handler.ts +62 -0
  241. package/src/common/{diagram → features/type-hints}/request-type-hints-action-handler.spec.ts +2 -2
  242. package/src/common/{diagram → features/type-hints}/request-type-hints-action-handler.ts +2 -3
  243. package/src/common/gmodel/gmodel-create-edge-operation-handler.ts +3 -3
  244. package/src/common/gmodel/gmodel-create-node-operation-handler.ts +3 -3
  245. package/src/common/gmodel/paste-operation-handler.ts +2 -2
  246. package/src/common/index.ts +3 -1
  247. package/src/common/operations/compound-operation-handler.ts +6 -1
  248. package/src/common/operations/create-operation-handler.ts +22 -5
  249. package/src/common/operations/json-operation-handler.ts +147 -0
  250. package/src/common/operations/operation-action-handler.ts +2 -2
  251. package/src/common/operations/operation-handler-registry.ts +1 -12
  252. package/src/common/operations/operation-handler.ts +2 -2
  253. package/src/common/protocol/client-action.ts +38 -0
  254. package/src/common/protocol/glsp-server.spec.ts +11 -10
  255. package/src/common/protocol/glsp-server.ts +11 -14
  256. package/src/common/session/client-session-factory.spec.ts +2 -2
  257. package/src/common/session/client-session-factory.ts +3 -3
  258. package/src/common/session/client-session-manager.spec.ts +4 -3
  259. package/src/common/utils/args-util.ts +1 -1
  260. package/src/common/utils/client-options-util.ts +8 -0
  261. package/src/common/utils/console-logger.ts +1 -1
  262. package/src/common/utils/logger.ts +2 -1
  263. package/src/common/utils/promise-queue.ts +4 -5
  264. package/src/common/utils/registry.spec.ts +3 -1
  265. package/src/common/utils/registry.ts +8 -3
  266. package/src/node/abstract-json-model-storage.ts +8 -2
  267. package/src/node/gmodel/gmodel-storage.ts +3 -3
  268. package/src/node/launch/cli-parser.ts +1 -1
  269. package/lib/common/actions/action-dispatcher.spec.d.ts +0 -2
  270. package/lib/common/actions/action-dispatcher.spec.d.ts.map +0 -1
  271. package/lib/common/actions/action-dispatcher.spec.js +0 -264
  272. package/lib/common/actions/action-dispatcher.spec.js.map +0 -1
  273. package/lib/common/actions/action-handler-registry.spec.d.ts +0 -2
  274. package/lib/common/actions/action-handler-registry.spec.d.ts.map +0 -1
  275. package/lib/common/actions/action-handler-registry.spec.js +0 -50
  276. package/lib/common/actions/action-handler-registry.spec.js.map +0 -1
  277. package/lib/common/actions/global-action-provider.spec.d.ts +0 -2
  278. package/lib/common/actions/global-action-provider.spec.d.ts.map +0 -1
  279. package/lib/common/actions/global-action-provider.spec.js +0 -70
  280. package/lib/common/actions/global-action-provider.spec.js.map +0 -1
  281. package/lib/common/command/command-stack.spec.d.ts +0 -2
  282. package/lib/common/command/command-stack.spec.d.ts.map +0 -1
  283. package/lib/common/command/command-stack.spec.js +0 -207
  284. package/lib/common/command/command-stack.spec.js.map +0 -1
  285. package/lib/common/command/command.spec.d.ts +0 -2
  286. package/lib/common/command/command.spec.d.ts.map +0 -1
  287. package/lib/common/command/command.spec.js +0 -86
  288. package/lib/common/command/command.spec.js.map +0 -1
  289. package/lib/common/command/recording-command.spec.d.ts.map +0 -1
  290. package/lib/common/command/recording-command.spec.js +0 -62
  291. package/lib/common/command/recording-command.spec.js.map +0 -1
  292. package/lib/common/di/binding-target.spec.d.ts +0 -2
  293. package/lib/common/di/binding-target.spec.d.ts.map +0 -1
  294. package/lib/common/di/binding-target.spec.js +0 -121
  295. package/lib/common/di/binding-target.spec.js.map +0 -1
  296. package/lib/common/di/multi-bindings.spec.d.ts +0 -2
  297. package/lib/common/di/multi-bindings.spec.d.ts.map +0 -1
  298. package/lib/common/di/multi-bindings.spec.js +0 -137
  299. package/lib/common/di/multi-bindings.spec.js.map +0 -1
  300. package/lib/common/diagram/request-type-hints-action-handler.d.ts.map +0 -1
  301. package/lib/common/diagram/request-type-hints-action-handler.js.map +0 -1
  302. package/lib/common/diagram/request-type-hints-action-handler.spec.d.ts +0 -2
  303. package/lib/common/diagram/request-type-hints-action-handler.spec.d.ts.map +0 -1
  304. package/lib/common/diagram/request-type-hints-action-handler.spec.js +0 -57
  305. package/lib/common/diagram/request-type-hints-action-handler.spec.js.map +0 -1
  306. package/lib/common/features/contextactions/context-actions-provider-registry.spec.d.ts +0 -2
  307. package/lib/common/features/contextactions/context-actions-provider-registry.spec.d.ts.map +0 -1
  308. package/lib/common/features/contextactions/context-actions-provider-registry.spec.js +0 -34
  309. package/lib/common/features/contextactions/context-actions-provider-registry.spec.js.map +0 -1
  310. package/lib/common/features/contextactions/request-context-actions-handler.spec.d.ts +0 -2
  311. package/lib/common/features/contextactions/request-context-actions-handler.spec.d.ts.map +0 -1
  312. package/lib/common/features/contextactions/request-context-actions-handler.spec.js +0 -63
  313. package/lib/common/features/contextactions/request-context-actions-handler.spec.js.map +0 -1
  314. package/lib/common/features/contextactions/tool-palette-item-provider.spec.d.ts +0 -2
  315. package/lib/common/features/contextactions/tool-palette-item-provider.spec.d.ts.map +0 -1
  316. package/lib/common/features/contextactions/tool-palette-item-provider.spec.js +0 -48
  317. package/lib/common/features/contextactions/tool-palette-item-provider.spec.js.map +0 -1
  318. package/lib/common/features/directediting/context-edit-validator-registry.spec.d.ts +0 -2
  319. package/lib/common/features/directediting/context-edit-validator-registry.spec.d.ts.map +0 -1
  320. package/lib/common/features/directediting/context-edit-validator-registry.spec.js +0 -44
  321. package/lib/common/features/directediting/context-edit-validator-registry.spec.js.map +0 -1
  322. package/lib/common/features/directediting/request-edit-validation-handler.spec.d.ts +0 -2
  323. package/lib/common/features/directediting/request-edit-validation-handler.spec.d.ts.map +0 -1
  324. package/lib/common/features/directediting/request-edit-validation-handler.spec.js +0 -97
  325. package/lib/common/features/directediting/request-edit-validation-handler.spec.js.map +0 -1
  326. package/lib/common/features/model/gmodel-serializer.spec.d.ts +0 -2
  327. package/lib/common/features/model/gmodel-serializer.spec.d.ts.map +0 -1
  328. package/lib/common/features/model/gmodel-serializer.spec.js +0 -124
  329. package/lib/common/features/model/gmodel-serializer.spec.js.map +0 -1
  330. package/lib/common/operations/operation-handler-registry.spec.d.ts +0 -2
  331. package/lib/common/operations/operation-handler-registry.spec.d.ts.map +0 -1
  332. package/lib/common/operations/operation-handler-registry.spec.js +0 -50
  333. package/lib/common/operations/operation-handler-registry.spec.js.map +0 -1
  334. package/lib/common/protocol/glsp-server.spec.d.ts +0 -2
  335. package/lib/common/protocol/glsp-server.spec.d.ts.map +0 -1
  336. package/lib/common/protocol/glsp-server.spec.js +0 -132
  337. package/lib/common/protocol/glsp-server.spec.js.map +0 -1
  338. package/lib/common/session/client-session-factory.spec.d.ts +0 -2
  339. package/lib/common/session/client-session-factory.spec.d.ts.map +0 -1
  340. package/lib/common/session/client-session-factory.spec.js +0 -56
  341. package/lib/common/session/client-session-factory.spec.js.map +0 -1
  342. package/lib/common/session/client-session-manager.spec.d.ts +0 -2
  343. package/lib/common/session/client-session-manager.spec.d.ts.map +0 -1
  344. package/lib/common/session/client-session-manager.spec.js +0 -74
  345. package/lib/common/session/client-session-manager.spec.js.map +0 -1
  346. package/lib/common/test/mock-util.d.ts +0 -120
  347. package/lib/common/test/mock-util.d.ts.map +0 -1
  348. package/lib/common/test/mock-util.js +0 -216
  349. package/lib/common/test/mock-util.js.map +0 -1
  350. package/lib/common/utils/promise-queue.spec.d.ts +0 -2
  351. package/lib/common/utils/promise-queue.spec.d.ts.map +0 -1
  352. package/lib/common/utils/promise-queue.spec.js +0 -117
  353. package/lib/common/utils/promise-queue.spec.js.map +0 -1
  354. package/lib/common/utils/registry.spec.d.ts +0 -2
  355. package/lib/common/utils/registry.spec.d.ts.map +0 -1
  356. package/lib/common/utils/registry.spec.js +0 -199
  357. package/lib/common/utils/registry.spec.js.map +0 -1
  358. package/lib/node/launch/cli-parser.spec.d.ts +0 -2
  359. package/lib/node/launch/cli-parser.spec.d.ts.map +0 -1
  360. package/lib/node/launch/cli-parser.spec.js +0 -56
  361. package/lib/node/launch/cli-parser.spec.js.map +0 -1
  362. package/lib/node/launch/socket-cli-parser.spec.d.ts +0 -2
  363. package/lib/node/launch/socket-cli-parser.spec.d.ts.map +0 -1
  364. package/lib/node/launch/socket-cli-parser.spec.js +0 -66
  365. package/lib/node/launch/socket-cli-parser.spec.js.map +0 -1
  366. package/lib/node/launch/socket-server-launcher.spec.d.ts.map +0 -1
  367. package/lib/node/launch/socket-server-launcher.spec.js +0 -75
  368. package/lib/node/launch/socket-server-launcher.spec.js.map +0 -1
@@ -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,CAAC;IAC1D,oBAAoB,CAAC,WAAW,CAAC,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IAEvD,SAAS,CAAC,IAAI,CACV,IAAI,2BAAe,CAAC,IAAI,CAAC,EAAE;QACvB,IAAI,CAAC,eAAM,CAAC,CAAC,eAAe,CAAC,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC;QACpD,IAAI,CAAC,4CAAoB,CAAC,CAAC,eAAe,CAAC,oBAAoB,CAAC,CAAC;IACrE,CAAC,CAAC,CACL,CAAC;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,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;IAEhE,EAAE,CAAC,iCAAiC,EAAE,GAAG,EAAE;QACvC,wBAAwB,CAAC,eAAe,CAAC,IAAI,qDAAwB,EAAE,CAAC,CAAC;QACzE,IAAA,aAAM,EAAC,wBAAwB,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QAC1D,IAAA,aAAM,EAAC,wBAAwB,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,4BAAiB,CAAC,IAAI,CAAC,C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AAC,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,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,132 +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 inversify_1 = require("inversify");
21
- const sinon = require("sinon");
22
- const global_action_provider_1 = require("../actions/global-action-provider");
23
- const client_session_manager_1 = require("../session/client-session-manager");
24
- const mock = require("../test/mock-util");
25
- const logger_1 = require("../utils/logger");
26
- const glsp_server_1 = require("./glsp-server");
27
- const assert = require("assert");
28
- describe('test DefaultGLSPServer', () => {
29
- const container = new inversify_1.Container();
30
- const clientSessionId = 'myClientSession';
31
- const diagramType = 'myDiagram';
32
- const applicationId = 'Test';
33
- const protocolVersion = '1.0.0';
34
- const serverActionKinds = new Map();
35
- serverActionKinds.set(diagramType, ['A1', 'A2']);
36
- const sessionManager = new mock.StubClientSessionManager();
37
- const spy_sessionManager_getOrCreate = sinon.spy(sessionManager, 'getOrCreateClientSession');
38
- const spy_sessionManager_dispose = sinon.spy(sessionManager, 'disposeClientSession');
39
- const listener1 = new mock.StubGLSPServerListener();
40
- const spy_listener1_initialize = sinon.spy(listener1, 'serverInitialized');
41
- const spy_listener1_shutdown = sinon.spy(listener1, 'serverShutDown');
42
- const listener2 = new mock.StubGLSPServerListener();
43
- const spy_listener2_initialize = sinon.spy(listener2, 'serverInitialized');
44
- const spy_listener2_shutdown = sinon.spy(listener2, 'serverShutDown');
45
- container.load(new inversify_1.ContainerModule(bind => {
46
- bind(logger_1.Logger).toConstantValue(new mock.StubLogger());
47
- bind(protocol_1.GLSPClientProxy).toConstantValue(new mock.StubGLSPClientProxy());
48
- bind(client_session_manager_1.ClientSessionManager).toConstantValue(sessionManager);
49
- bind(global_action_provider_1.GlobalActionProvider).toConstantValue({ clientActionKinds: new Map(), serverActionKinds });
50
- bind(protocol_1.GLSPServerListener).toConstantValue(listener1);
51
- }));
52
- const glspServer = container.resolve(glsp_server_1.DefaultGLSPServer);
53
- beforeEach(() => {
54
- spy_sessionManager_getOrCreate.restore();
55
- spy_sessionManager_dispose.restore();
56
- spy_listener1_initialize.restore();
57
- spy_listener1_shutdown.restore();
58
- spy_listener2_initialize.restore();
59
- spy_listener2_shutdown.restore();
60
- });
61
- it('Test calls before server initialization (should throw errors)', async () => {
62
- assert.rejects(() => glspServer.initializeClientSession({ clientSessionId: 'id', diagramType: 'type' }));
63
- assert.rejects(() => glspServer.disposeClientSession({ clientSessionId: 'id' }));
64
- assert.throws(() => glspServer.process({ clientId: 'id', action: { kind: 'action' } }));
65
- });
66
- it('addListener - add existing listener', () => {
67
- const originalSize = glspServer['serverListeners'].length;
68
- glspServer.addListener(listener1);
69
- (0, chai_1.expect)(glspServer['serverListeners'].length).to.be.equal(originalSize);
70
- });
71
- it('addListener - add new listener', () => {
72
- const originalSize = glspServer['serverListeners'].length;
73
- glspServer.addListener(listener2);
74
- (0, chai_1.expect)(glspServer['serverListeners']).to.include(listener2);
75
- (0, chai_1.expect)(glspServer['serverListeners'].length).to.be.equal(originalSize + 1);
76
- });
77
- it('removeListener - remove non-existing listener', () => {
78
- const originalSize = glspServer['serverListeners'].length;
79
- glspServer.removeListener({});
80
- (0, chai_1.expect)(glspServer['serverListeners'].length).to.be.equal(originalSize);
81
- });
82
- it('removeListener - remove existing listener', () => {
83
- const originalSize = glspServer['serverListeners'].length;
84
- glspServer.removeListener(listener2);
85
- (0, chai_1.expect)(glspServer['serverListeners'].length).to.be.equal(originalSize - 1);
86
- });
87
- it('initialize - with wrong protocol version', async () => {
88
- const initializeParameters = { applicationId, protocolVersion: 'abc' };
89
- assert.rejects(glspServer.initialize(initializeParameters));
90
- });
91
- it('initialize - with correct parameters', async () => {
92
- const initializeParameters = { applicationId, protocolVersion };
93
- const result = await glspServer.initialize(initializeParameters);
94
- (0, chai_1.expect)(result.protocolVersion).to.be.equal(protocolVersion);
95
- (0, chai_1.expect)(result.serverActions[diagramType]).to.be.equal(serverActionKinds.get(diagramType));
96
- (0, chai_1.expect)(result.serverActions[diagramType]).to.be.equal(serverActionKinds.get(diagramType));
97
- (0, chai_1.expect)(spy_listener1_initialize.calledWith(glspServer));
98
- (0, chai_1.expect)(spy_listener2_initialize.notCalled);
99
- });
100
- it('initialize - subsequent call with same parameters', async () => {
101
- const initializeParameters = { applicationId, protocolVersion };
102
- const result = await glspServer.initialize(initializeParameters);
103
- (0, chai_1.expect)(result.protocolVersion).to.be.equal(protocolVersion);
104
- (0, chai_1.expect)(result.serverActions[diagramType]).to.be.equal(serverActionKinds.get(diagramType));
105
- (0, chai_1.expect)(result.serverActions[diagramType]).to.be.equal(serverActionKinds.get(diagramType));
106
- });
107
- it('initialize - subsequent call with other parameters', async () => {
108
- const initializeParameters = { applicationId: 'someOtherApp', protocolVersion: 'AnotherProtocolVersion' };
109
- await assert.rejects(() => glspServer.initialize(initializeParameters));
110
- });
111
- it('initialize client session', async () => {
112
- const initializeClientSessionParameters = {
113
- clientSessionId,
114
- diagramType
115
- };
116
- await glspServer.initializeClientSession(initializeClientSessionParameters);
117
- (0, chai_1.expect)(spy_sessionManager_getOrCreate.calledWith(initializeClientSessionParameters));
118
- });
119
- it('dispose client session', async () => {
120
- const disposeClientSessionParameters = {
121
- clientSessionId
122
- };
123
- await glspServer.disposeClientSession(disposeClientSessionParameters);
124
- (0, chai_1.expect)(spy_sessionManager_dispose.calledWith(clientSessionId));
125
- });
126
- it('shutdown server', async () => {
127
- glspServer.shutdown();
128
- (0, chai_1.expect)(spy_listener1_shutdown.calledWith(glspServer));
129
- (0, chai_1.expect)(spy_listener2_shutdown.notCalled);
130
- });
131
- });
132
- //# 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":";;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDAMgC;AAChC,+BAA8B;AAC9B,yCAAuD;AACvD,+BAA+B;AAC/B,8EAAyE;AACzE,8EAAyE;AACzE,0CAA0C;AAC1C,4CAAyC;AACzC,+CAAkD;AAClD,iCAAkC;AAElC,QAAQ,CAAC,wBAAwB,EAAE,GAAG,EAAE;IACpC,MAAM,SAAS,GAAG,IAAI,qBAAS,EAAE,CAAC;IAClC,MAAM,eAAe,GAAG,iBAAiB,CAAC;IAC1C,MAAM,WAAW,GAAG,WAAW,CAAC;IAChC,MAAM,aAAa,GAAG,MAAM,CAAC;IAC7B,MAAM,e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AAE;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 protocol_1 = require("@eclipse-glsp/protocol");
19
- const chai_1 = require("chai");
20
- const inversify_1 = require("inversify");
21
- const action_dispatcher_1 = require("../actions/action-dispatcher");
22
- const service_identifiers_1 = require("../di/service-identifiers");
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(protocol_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","sourceRoot":"","sources":["../../../src/common/session/client-session-factory.spec.ts"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDAAyD;AACzD,+BAA8B;AAC9B,yCAAuD;AACvD,oEAAgE;AAChE,mEAA+E;AAC/E,0CAA0C;AAC1C,kEAA6D;AAC7D,4CAAyC;AACzC,qEAAuE;AACvE,6EAAwE;AAExE,QAAQ,CAAC,kCAAkC,EAAE,GAAG,EAAE;IAC9C,MAAM,eAAe,GAAG,YAAY,CAAC;IACrC,MAAM,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,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":""}
@@ -1,74 +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 inversify_1 = require("inversify");
19
- const mock = require("../test/mock-util");
20
- const logger_1 = require("../utils/logger");
21
- const client_session_factory_1 = require("./client-session-factory");
22
- const client_session_manager_1 = require("./client-session-manager");
23
- const chai_1 = require("chai");
24
- const sinon = require("sinon");
25
- describe('test DefaultClientSessionManager', () => {
26
- const testSession = mock.createClientSession('myId', 'myDiagram');
27
- const testSessionListener = new mock.StubClientSessionListener();
28
- const sessionFactory = new mock.StubClientSessionFactory();
29
- sinon.stub(sessionFactory, 'create').returns(testSession);
30
- const container = new inversify_1.Container();
31
- container.load(new inversify_1.ContainerModule(bind => {
32
- bind(logger_1.Logger).toConstantValue(new mock.StubLogger());
33
- bind(client_session_factory_1.ClientSessionFactory).toConstantValue(sessionFactory);
34
- }));
35
- const sessionManager = container.resolve(client_session_manager_1.DefaultClientSessionManager);
36
- it('add listener', () => {
37
- (0, chai_1.expect)(sessionManager.addListener(testSessionListener, testSession.id)).true;
38
- });
39
- it('add create client session', () => {
40
- // Mock setup
41
- const listener_create = sinon.spy(testSessionListener, 'sessionCreated');
42
- // Test execution
43
- const createdSession = sessionManager.getOrCreateClientSession({
44
- clientSessionId: testSession.id,
45
- diagramType: testSession.diagramType
46
- });
47
- (0, chai_1.expect)(createdSession).to.not.be.undefined;
48
- (0, chai_1.expect)(createdSession.id).to.be.equal(testSession.id);
49
- (0, chai_1.expect)(createdSession.diagramType).to.be.equal(testSession.diagramType);
50
- const retrievedSession = sessionManager.getSession(testSession.id);
51
- (0, chai_1.expect)(retrievedSession).to.not.be.undefined;
52
- (0, chai_1.expect)(retrievedSession).to.be.equal(createdSession);
53
- (0, chai_1.expect)(listener_create.calledWith(testSession));
54
- });
55
- it('get sessions by type', () => {
56
- const clientSessions = sessionManager.getSessionsByType(testSession.diagramType);
57
- (0, chai_1.expect)(clientSessions.length).to.be.equal(1);
58
- (0, chai_1.expect)(clientSessions[0]).to.be.equal(testSession);
59
- });
60
- it('get sessions by type that does no exist', async () => {
61
- const clientSessions = sessionManager.getSessionsByType('wrongType');
62
- (0, chai_1.expect)(clientSessions.length).to.be.equal(0);
63
- });
64
- it('dispose client session', () => {
65
- // Mock setup
66
- const listener_dispose = sinon.spy(testSessionListener, 'sessionDisposed');
67
- // Test execution
68
- (0, chai_1.expect)(sessionManager.disposeClientSession(testSession.id)).to.be.equal(true);
69
- const session = sessionManager.getSession(testSession.id);
70
- (0, chai_1.expect)(session).to.be.undefined;
71
- (0, chai_1.expect)(listener_dispose.calledWith(testSession));
72
- });
73
- });
74
- //# sourceMappingURL=client-session-manager.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"client-session-manager.spec.js","sourceRoot":"","sources":["../../../src/common/session/client-session-manager.spec.ts"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,yCAAuD;AACvD,0CAA0C;AAC1C,4CAAyC;AACzC,qEAAgE;AAChE,qEAAuE;AACvE,+BAA8B;AAC9B,+BAA+B;AAE/B,QAAQ,CAAC,kCAAkC,EAAE,GAAG,EAAE;IAC9C,MAAM,WAAW,GAAG,IAAI,CAAC,mBAAmB,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IAClE,MAAM,mBAAmB,GAAG,IAAI,IAAI,CAAC,yBAAyB,EAAE,CAAC;IAEjE,MAAM,cAAc,GAAG,IAAI,IAAI,CAAC,wBAAwB,EAAE,CAAC;IAC3D,KAAK,CAAC,IAAI,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IAE1D,MAAM,SAAS,GAAG,IAAI,qBAAS,EAAE,CAAC;IAClC,SAAS,CAAC,IAAI,CACV,IAAI,2BAAe,CAAC,IAAI,CAAC,EAAE;QACvB,IAAI,CAAC,eAAM,CAAC,CAAC,eAAe,CAAC,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC;QACpD,IAAI,CAAC,6CAAoB,CAAC,CAAC,eAAe,CAAC,cAAc,CAAC,CAAC;IAC/D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