@eclipse-glsp/server 1.1.0-next.dc6b980.47 → 1.1.0-next.e49c816.56

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 (327) hide show
  1. package/lib/browser/di/app-module.d.ts +2 -7
  2. package/lib/browser/di/app-module.d.ts.map +1 -1
  3. package/lib/browser/di/app-module.js +5 -30
  4. package/lib/browser/di/app-module.js.map +1 -1
  5. package/lib/browser/index.d.ts +0 -1
  6. package/lib/browser/index.d.ts.map +1 -1
  7. package/lib/browser/index.js +0 -1
  8. package/lib/browser/index.js.map +1 -1
  9. package/lib/browser/launch/worker-server-launcher.d.ts +4 -4
  10. package/lib/browser/launch/worker-server-launcher.d.ts.map +1 -1
  11. package/lib/browser/launch/worker-server-launcher.js +6 -13
  12. package/lib/browser/launch/worker-server-launcher.js.map +1 -1
  13. package/lib/common/actions/action-dispatcher.js +2 -3
  14. package/lib/common/actions/action-dispatcher.js.map +1 -1
  15. package/lib/common/actions/action-handler-registry.js +4 -6
  16. package/lib/common/actions/action-handler-registry.js.map +1 -1
  17. package/lib/common/actions/client-action-handler.d.ts +1 -2
  18. package/lib/common/actions/client-action-handler.d.ts.map +1 -1
  19. package/lib/common/actions/client-action-handler.js +19 -5
  20. package/lib/common/actions/client-action-handler.js.map +1 -1
  21. package/lib/common/actions/global-action-provider.js +2 -3
  22. package/lib/common/actions/global-action-provider.js.map +1 -1
  23. package/lib/common/command/command-stack.d.ts +16 -1
  24. package/lib/common/command/command-stack.d.ts.map +1 -1
  25. package/lib/common/command/command-stack.js +2 -18
  26. package/lib/common/command/command-stack.js.map +1 -1
  27. package/lib/common/command/command.js +1 -1
  28. package/lib/common/command/command.js.map +1 -1
  29. package/lib/common/command/undo-redo-action-handler.js +2 -3
  30. package/lib/common/command/undo-redo-action-handler.js.map +1 -1
  31. package/lib/common/di/binding-target.d.ts.map +1 -1
  32. package/lib/common/di/binding-target.js +3 -2
  33. package/lib/common/di/binding-target.js.map +1 -1
  34. package/lib/common/di/client-session-module.d.ts +1 -1
  35. package/lib/common/di/client-session-module.d.ts.map +1 -1
  36. package/lib/common/di/client-session-module.js +2 -2
  37. package/lib/common/di/client-session-module.js.map +1 -1
  38. package/lib/common/di/glsp-module.d.ts +3 -1
  39. package/lib/common/di/glsp-module.d.ts.map +1 -1
  40. package/lib/common/di/glsp-module.js +2 -18
  41. package/lib/common/di/glsp-module.js.map +1 -1
  42. package/lib/common/di/multi-binding.d.ts +19 -4
  43. package/lib/common/di/multi-binding.d.ts.map +1 -1
  44. package/lib/common/di/multi-binding.js.map +1 -1
  45. package/lib/common/di/server-module.d.ts +1 -6
  46. package/lib/common/di/server-module.d.ts.map +1 -1
  47. package/lib/common/di/server-module.js +21 -17
  48. package/lib/common/di/server-module.js.map +1 -1
  49. package/lib/common/diagram/diagram-configuration.js +1 -1
  50. package/lib/common/diagram/diagram-configuration.js.map +1 -1
  51. package/lib/common/diagram/request-type-hints-action-handler.js +2 -3
  52. package/lib/common/diagram/request-type-hints-action-handler.js.map +1 -1
  53. package/lib/common/features/clipboard/request-clipboard-data-action-handler.js +2 -3
  54. package/lib/common/features/clipboard/request-clipboard-data-action-handler.js.map +1 -1
  55. package/lib/common/features/contextactions/command-palette-action-provider.js +2 -3
  56. package/lib/common/features/contextactions/command-palette-action-provider.js.map +1 -1
  57. package/lib/common/features/contextactions/context-actions-provider-registry.js +2 -3
  58. package/lib/common/features/contextactions/context-actions-provider-registry.js.map +1 -1
  59. package/lib/common/features/contextactions/context-menu-item-provider.js +2 -3
  60. package/lib/common/features/contextactions/context-menu-item-provider.js.map +1 -1
  61. package/lib/common/features/contextactions/request-context-actions-handler.js +2 -3
  62. package/lib/common/features/contextactions/request-context-actions-handler.js.map +1 -1
  63. package/lib/common/features/contextactions/tool-palette-item-provider.js +4 -6
  64. package/lib/common/features/contextactions/tool-palette-item-provider.js.map +1 -1
  65. package/lib/common/features/directediting/context-edit-validator-registry.js +2 -3
  66. package/lib/common/features/directediting/context-edit-validator-registry.js.map +1 -1
  67. package/lib/common/features/directediting/label-edit-validator.js +2 -3
  68. package/lib/common/features/directediting/label-edit-validator.js.map +1 -1
  69. package/lib/common/features/directediting/request-edit-validation-handler.js +2 -3
  70. package/lib/common/features/directediting/request-edit-validation-handler.js.map +1 -1
  71. package/lib/common/features/layout/computed-bounds-action-handler.js +2 -3
  72. package/lib/common/features/layout/computed-bounds-action-handler.js.map +1 -1
  73. package/lib/common/features/layout/layout-operation-handler.js +2 -3
  74. package/lib/common/features/layout/layout-operation-handler.js.map +1 -1
  75. package/lib/common/features/model/gmodel-factory.js +2 -3
  76. package/lib/common/features/model/gmodel-factory.js.map +1 -1
  77. package/lib/common/features/model/gmodel-index.js +2 -3
  78. package/lib/common/features/model/gmodel-index.js.map +1 -1
  79. package/lib/common/features/model/gmodel-serializer.js +2 -3
  80. package/lib/common/features/model/gmodel-serializer.js.map +1 -1
  81. package/lib/common/features/model/model-state.js +2 -3
  82. package/lib/common/features/model/model-state.js.map +1 -1
  83. package/lib/common/features/model/model-submission-handler.js +2 -3
  84. package/lib/common/features/model/model-submission-handler.js.map +1 -1
  85. package/lib/common/features/model/request-model-action-handler.js +2 -3
  86. package/lib/common/features/model/request-model-action-handler.js.map +1 -1
  87. package/lib/common/features/model/save-model-action-handler.js +2 -3
  88. package/lib/common/features/model/save-model-action-handler.js.map +1 -1
  89. package/lib/common/features/navigation/navigation-target-provider-registry.js +2 -3
  90. package/lib/common/features/navigation/navigation-target-provider-registry.js.map +1 -1
  91. package/lib/common/features/navigation/navigation-target-resolver.js +2 -3
  92. package/lib/common/features/navigation/navigation-target-resolver.js.map +1 -1
  93. package/lib/common/features/navigation/request-navigation-targets-action-handler.js +2 -3
  94. package/lib/common/features/navigation/request-navigation-targets-action-handler.js.map +1 -1
  95. package/lib/common/features/navigation/resolve-navigation-targets-action-handler.js +2 -3
  96. package/lib/common/features/navigation/resolve-navigation-targets-action-handler.js.map +1 -1
  97. package/lib/common/features/popup/request-popup-model-action-handler.js +2 -3
  98. package/lib/common/features/popup/request-popup-model-action-handler.js.map +1 -1
  99. package/lib/common/features/validation/request-markers-handler.js +2 -3
  100. package/lib/common/features/validation/request-markers-handler.js.map +1 -1
  101. package/lib/common/gmodel/apply-label-edit-operation-handler.js +2 -3
  102. package/lib/common/gmodel/apply-label-edit-operation-handler.js.map +1 -1
  103. package/lib/common/gmodel/change-bounds-operation-handler.js +2 -3
  104. package/lib/common/gmodel/change-bounds-operation-handler.js.map +1 -1
  105. package/lib/common/gmodel/change-routing-points-operation-handler.js +2 -3
  106. package/lib/common/gmodel/change-routing-points-operation-handler.js.map +1 -1
  107. package/lib/common/gmodel/cut-operation-handler.js +2 -3
  108. package/lib/common/gmodel/cut-operation-handler.js.map +1 -1
  109. package/lib/common/gmodel/delete-operation-handler.js +2 -3
  110. package/lib/common/gmodel/delete-operation-handler.js.map +1 -1
  111. package/lib/common/gmodel/gmodel-create-edge-operation-handler.js +2 -3
  112. package/lib/common/gmodel/gmodel-create-edge-operation-handler.js.map +1 -1
  113. package/lib/common/gmodel/gmodel-create-node-operation-handler.js +2 -3
  114. package/lib/common/gmodel/gmodel-create-node-operation-handler.js.map +1 -1
  115. package/lib/common/gmodel/gmodel-diagram-module.js +2 -3
  116. package/lib/common/gmodel/gmodel-diagram-module.js.map +1 -1
  117. package/lib/common/gmodel/gmodel-operation-handler.js +1 -1
  118. package/lib/common/gmodel/gmodel-operation-handler.js.map +1 -1
  119. package/lib/common/gmodel/paste-operation-handler.js +2 -3
  120. package/lib/common/gmodel/paste-operation-handler.js.map +1 -1
  121. package/lib/common/gmodel/reconnect-edge-operation-handler.js +2 -3
  122. package/lib/common/gmodel/reconnect-edge-operation-handler.js.map +1 -1
  123. package/lib/common/index.d.ts +1 -2
  124. package/lib/common/index.d.ts.map +1 -1
  125. package/lib/common/index.js +1 -2
  126. package/lib/common/index.js.map +1 -1
  127. package/lib/common/launch/glsp-server-launcher.d.ts +1 -1
  128. package/lib/common/launch/glsp-server-launcher.d.ts.map +1 -1
  129. package/lib/common/launch/glsp-server-launcher.js +4 -5
  130. package/lib/common/launch/glsp-server-launcher.js.map +1 -1
  131. package/lib/common/launch/jsonrpc-server-launcher.d.ts +38 -0
  132. package/lib/common/launch/jsonrpc-server-launcher.d.ts.map +1 -0
  133. package/lib/common/launch/jsonrpc-server-launcher.js +83 -0
  134. package/lib/common/launch/jsonrpc-server-launcher.js.map +1 -0
  135. package/lib/common/operations/compound-operation-handler.js +6 -12
  136. package/lib/common/operations/compound-operation-handler.js.map +1 -1
  137. package/lib/common/operations/create-operation-handler.js +1 -1
  138. package/lib/common/operations/create-operation-handler.js.map +1 -1
  139. package/lib/common/operations/operation-action-handler.js +2 -3
  140. package/lib/common/operations/operation-action-handler.js.map +1 -1
  141. package/lib/common/operations/operation-handler-registry.js +4 -6
  142. package/lib/common/operations/operation-handler-registry.js.map +1 -1
  143. package/lib/common/operations/operation-handler.js +2 -3
  144. package/lib/common/operations/operation-handler.js.map +1 -1
  145. package/lib/common/protocol/glsp-server.d.ts +4 -104
  146. package/lib/common/protocol/glsp-server.d.ts.map +1 -1
  147. package/lib/common/protocol/glsp-server.js +15 -23
  148. package/lib/common/protocol/glsp-server.js.map +1 -1
  149. package/lib/common/session/client-session-factory.d.ts +1 -2
  150. package/lib/common/session/client-session-factory.d.ts.map +1 -1
  151. package/lib/common/session/client-session-factory.js +19 -5
  152. package/lib/common/session/client-session-factory.js.map +1 -1
  153. package/lib/common/session/client-session-manager.d.ts +1 -3
  154. package/lib/common/session/client-session-manager.d.ts.map +1 -1
  155. package/lib/common/session/client-session-manager.js +2 -3
  156. package/lib/common/session/client-session-manager.js.map +1 -1
  157. package/lib/common/utils/args-util.js +2 -2
  158. package/lib/common/utils/args-util.js.map +1 -1
  159. package/lib/{browser/di → common/utils}/console-logger.d.ts +7 -1
  160. package/lib/common/utils/console-logger.d.ts.map +1 -0
  161. package/lib/{browser/di → common/utils}/console-logger.js +27 -10
  162. package/lib/common/utils/console-logger.js.map +1 -0
  163. package/lib/common/utils/logger.d.ts +21 -0
  164. package/lib/common/utils/logger.d.ts.map +1 -1
  165. package/lib/common/utils/logger.js +16 -5
  166. package/lib/common/utils/logger.js.map +1 -1
  167. package/lib/common/utils/registry.js +4 -6
  168. package/lib/common/utils/registry.js.map +1 -1
  169. package/lib/node/abstract-json-model-storage.js +2 -3
  170. package/lib/node/abstract-json-model-storage.js.map +1 -1
  171. package/lib/node/di/app-module.d.ts +2 -2
  172. package/lib/node/di/app-module.d.ts.map +1 -1
  173. package/lib/node/di/app-module.js +10 -35
  174. package/lib/node/di/app-module.js.map +1 -1
  175. package/lib/node/gmodel/gmodel-storage.js +2 -3
  176. package/lib/node/gmodel/gmodel-storage.js.map +1 -1
  177. package/lib/node/launch/cli-parser.d.ts +2 -3
  178. package/lib/node/launch/cli-parser.d.ts.map +1 -1
  179. package/lib/node/launch/cli-parser.js.map +1 -1
  180. package/lib/node/launch/socket-server-launcher.d.ts +2 -23
  181. package/lib/node/launch/socket-server-launcher.d.ts.map +1 -1
  182. package/lib/node/launch/socket-server-launcher.js +9 -30
  183. package/lib/node/launch/socket-server-launcher.js.map +1 -1
  184. package/lib/node/launch/websocket-server-launcher.d.ts +2 -8
  185. package/lib/node/launch/websocket-server-launcher.d.ts.map +1 -1
  186. package/lib/node/launch/websocket-server-launcher.js +5 -30
  187. package/lib/node/launch/websocket-server-launcher.js.map +1 -1
  188. package/package.json +6 -4
  189. package/src/browser/di/app-module.ts +4 -32
  190. package/src/browser/index.ts +0 -1
  191. package/src/browser/launch/worker-server-launcher.ts +7 -13
  192. package/src/common/actions/client-action-handler.ts +1 -2
  193. package/src/common/command/command-stack.ts +1 -1
  194. package/src/common/di/binding-target.ts +1 -0
  195. package/src/common/di/client-session-module.ts +1 -1
  196. package/src/common/di/glsp-module.ts +3 -1
  197. package/src/common/di/multi-binding.ts +4 -5
  198. package/src/common/di/server-module.ts +6 -21
  199. package/src/common/index.ts +1 -2
  200. package/src/common/launch/glsp-server-launcher.ts +2 -2
  201. package/src/common/launch/jsonrpc-server-launcher.ts +95 -0
  202. package/src/common/protocol/glsp-server.spec.ts +7 -4
  203. package/src/common/protocol/glsp-server.ts +17 -132
  204. package/src/common/session/client-session-factory.spec.ts +1 -1
  205. package/src/common/session/client-session-factory.ts +1 -2
  206. package/src/common/session/client-session-manager.ts +1 -3
  207. package/src/common/test/mock-util.ts +5 -5
  208. package/src/common/utils/args-util.ts +1 -1
  209. package/src/{browser/di → common/utils}/console-logger.ts +19 -1
  210. package/src/common/utils/logger.ts +17 -1
  211. package/src/node/di/app-module.ts +4 -13
  212. package/src/node/launch/cli-parser.ts +2 -3
  213. package/src/node/launch/socket-server-launcher.spec.ts +6 -0
  214. package/src/node/launch/socket-server-launcher.ts +8 -30
  215. package/src/node/launch/websocket-server-launcher.ts +5 -31
  216. package/lib/browser/di/console-logger.d.ts.map +0 -1
  217. package/lib/browser/di/console-logger.js.map +0 -1
  218. package/lib/common/actions/action-dispatcher.spec.d.ts +0 -2
  219. package/lib/common/actions/action-dispatcher.spec.d.ts.map +0 -1
  220. package/lib/common/actions/action-dispatcher.spec.js +0 -264
  221. package/lib/common/actions/action-dispatcher.spec.js.map +0 -1
  222. package/lib/common/actions/action-handler-registry.spec.d.ts +0 -2
  223. package/lib/common/actions/action-handler-registry.spec.d.ts.map +0 -1
  224. package/lib/common/actions/action-handler-registry.spec.js +0 -50
  225. package/lib/common/actions/action-handler-registry.spec.js.map +0 -1
  226. package/lib/common/actions/global-action-provider.spec.d.ts +0 -2
  227. package/lib/common/actions/global-action-provider.spec.d.ts.map +0 -1
  228. package/lib/common/actions/global-action-provider.spec.js +0 -70
  229. package/lib/common/actions/global-action-provider.spec.js.map +0 -1
  230. package/lib/common/command/command-stack.spec.d.ts +0 -2
  231. package/lib/common/command/command-stack.spec.d.ts.map +0 -1
  232. package/lib/common/command/command-stack.spec.js +0 -207
  233. package/lib/common/command/command-stack.spec.js.map +0 -1
  234. package/lib/common/command/command.spec.d.ts +0 -2
  235. package/lib/common/command/command.spec.d.ts.map +0 -1
  236. package/lib/common/command/command.spec.js +0 -86
  237. package/lib/common/command/command.spec.js.map +0 -1
  238. package/lib/common/command/recording-command.spec.d.ts +0 -17
  239. package/lib/common/command/recording-command.spec.d.ts.map +0 -1
  240. package/lib/common/command/recording-command.spec.js +0 -62
  241. package/lib/common/command/recording-command.spec.js.map +0 -1
  242. package/lib/common/di/binding-target.spec.d.ts +0 -2
  243. package/lib/common/di/binding-target.spec.d.ts.map +0 -1
  244. package/lib/common/di/binding-target.spec.js +0 -121
  245. package/lib/common/di/binding-target.spec.js.map +0 -1
  246. package/lib/common/di/multi-bindings.spec.d.ts +0 -2
  247. package/lib/common/di/multi-bindings.spec.d.ts.map +0 -1
  248. package/lib/common/di/multi-bindings.spec.js +0 -137
  249. package/lib/common/di/multi-bindings.spec.js.map +0 -1
  250. package/lib/common/diagram/request-type-hints-action-handler.spec.d.ts +0 -2
  251. package/lib/common/diagram/request-type-hints-action-handler.spec.d.ts.map +0 -1
  252. package/lib/common/diagram/request-type-hints-action-handler.spec.js +0 -57
  253. package/lib/common/diagram/request-type-hints-action-handler.spec.js.map +0 -1
  254. package/lib/common/features/contextactions/context-actions-provider-registry.spec.d.ts +0 -2
  255. package/lib/common/features/contextactions/context-actions-provider-registry.spec.d.ts.map +0 -1
  256. package/lib/common/features/contextactions/context-actions-provider-registry.spec.js +0 -34
  257. package/lib/common/features/contextactions/context-actions-provider-registry.spec.js.map +0 -1
  258. package/lib/common/features/contextactions/request-context-actions-handler.spec.d.ts +0 -2
  259. package/lib/common/features/contextactions/request-context-actions-handler.spec.d.ts.map +0 -1
  260. package/lib/common/features/contextactions/request-context-actions-handler.spec.js +0 -63
  261. package/lib/common/features/contextactions/request-context-actions-handler.spec.js.map +0 -1
  262. package/lib/common/features/contextactions/tool-palette-item-provider.spec.d.ts +0 -2
  263. package/lib/common/features/contextactions/tool-palette-item-provider.spec.d.ts.map +0 -1
  264. package/lib/common/features/contextactions/tool-palette-item-provider.spec.js +0 -48
  265. package/lib/common/features/contextactions/tool-palette-item-provider.spec.js.map +0 -1
  266. package/lib/common/features/directediting/context-edit-validator-registry.spec.d.ts +0 -2
  267. package/lib/common/features/directediting/context-edit-validator-registry.spec.d.ts.map +0 -1
  268. package/lib/common/features/directediting/context-edit-validator-registry.spec.js +0 -44
  269. package/lib/common/features/directediting/context-edit-validator-registry.spec.js.map +0 -1
  270. package/lib/common/features/directediting/request-edit-validation-handler.spec.d.ts +0 -2
  271. package/lib/common/features/directediting/request-edit-validation-handler.spec.d.ts.map +0 -1
  272. package/lib/common/features/directediting/request-edit-validation-handler.spec.js +0 -97
  273. package/lib/common/features/directediting/request-edit-validation-handler.spec.js.map +0 -1
  274. package/lib/common/features/model/gmodel-serializer.spec.d.ts +0 -2
  275. package/lib/common/features/model/gmodel-serializer.spec.d.ts.map +0 -1
  276. package/lib/common/features/model/gmodel-serializer.spec.js +0 -124
  277. package/lib/common/features/model/gmodel-serializer.spec.js.map +0 -1
  278. package/lib/common/operations/operation-handler-registry.spec.d.ts +0 -2
  279. package/lib/common/operations/operation-handler-registry.spec.d.ts.map +0 -1
  280. package/lib/common/operations/operation-handler-registry.spec.js +0 -50
  281. package/lib/common/operations/operation-handler-registry.spec.js.map +0 -1
  282. package/lib/common/protocol/glsp-client-proxy.d.ts +0 -45
  283. package/lib/common/protocol/glsp-client-proxy.d.ts.map +0 -1
  284. package/lib/common/protocol/glsp-client-proxy.js +0 -53
  285. package/lib/common/protocol/glsp-client-proxy.js.map +0 -1
  286. package/lib/common/protocol/glsp-server-listener.d.ts +0 -37
  287. package/lib/common/protocol/glsp-server-listener.d.ts.map +0 -1
  288. package/lib/common/protocol/glsp-server-listener.js +0 -5
  289. package/lib/common/protocol/glsp-server-listener.js.map +0 -1
  290. package/lib/common/protocol/glsp-server.spec.d.ts +0 -2
  291. package/lib/common/protocol/glsp-server.spec.d.ts.map +0 -1
  292. package/lib/common/protocol/glsp-server.spec.js +0 -119
  293. package/lib/common/protocol/glsp-server.spec.js.map +0 -1
  294. package/lib/common/session/client-session-factory.spec.d.ts +0 -2
  295. package/lib/common/session/client-session-factory.spec.d.ts.map +0 -1
  296. package/lib/common/session/client-session-factory.spec.js +0 -56
  297. package/lib/common/session/client-session-factory.spec.js.map +0 -1
  298. package/lib/common/session/client-session-manager.spec.d.ts +0 -2
  299. package/lib/common/session/client-session-manager.spec.d.ts.map +0 -1
  300. package/lib/common/session/client-session-manager.spec.js +0 -74
  301. package/lib/common/session/client-session-manager.spec.js.map +0 -1
  302. package/lib/common/test/mock-util.d.ts +0 -123
  303. package/lib/common/test/mock-util.d.ts.map +0 -1
  304. package/lib/common/test/mock-util.js +0 -216
  305. package/lib/common/test/mock-util.js.map +0 -1
  306. package/lib/common/utils/promise-queue.spec.d.ts +0 -2
  307. package/lib/common/utils/promise-queue.spec.d.ts.map +0 -1
  308. package/lib/common/utils/promise-queue.spec.js +0 -117
  309. package/lib/common/utils/promise-queue.spec.js.map +0 -1
  310. package/lib/common/utils/registry.spec.d.ts +0 -2
  311. package/lib/common/utils/registry.spec.d.ts.map +0 -1
  312. package/lib/common/utils/registry.spec.js +0 -199
  313. package/lib/common/utils/registry.spec.js.map +0 -1
  314. package/lib/node/launch/cli-parser.spec.d.ts +0 -2
  315. package/lib/node/launch/cli-parser.spec.d.ts.map +0 -1
  316. package/lib/node/launch/cli-parser.spec.js +0 -56
  317. package/lib/node/launch/cli-parser.spec.js.map +0 -1
  318. package/lib/node/launch/socket-cli-parser.spec.d.ts +0 -2
  319. package/lib/node/launch/socket-cli-parser.spec.d.ts.map +0 -1
  320. package/lib/node/launch/socket-cli-parser.spec.js +0 -66
  321. package/lib/node/launch/socket-cli-parser.spec.js.map +0 -1
  322. package/lib/node/launch/socket-server-launcher.spec.d.ts +0 -17
  323. package/lib/node/launch/socket-server-launcher.spec.d.ts.map +0 -1
  324. package/lib/node/launch/socket-server-launcher.spec.js +0 -70
  325. package/lib/node/launch/socket-server-launcher.spec.js.map +0 -1
  326. package/src/common/protocol/glsp-client-proxy.ts +0 -65
  327. package/src/common/protocol/glsp-server-listener.ts +0 -39
@@ -1 +1 @@
1
- {"version":3,"file":"websocket-server-launcher.js","sourceRoot":"","sources":["../../../src/node/launch/websocket-server-launcher.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;;;;AAElF,qDAA+G;AAC/G,6BAA6B;AAC7B,yCAA0D;AAC1D,2BAA2B;AAE3B,2BAAuC;AACvC,mFAA8E;AAC9E,mEAAkF;AAClF,sDAAmD;AACnD,qEAAiE;AAoBjE,MAAM,uBAAuB,GAAG,GAAG,CAAC;AAG7B,IAAM,uBAAuB,GAA7B,MAAM,uBAAwB,SAAQ,yCAA0C;IAQnF;QACI,KAAK,EAAE,CAAC;QAJF,2BAAsB,GAAG,8CAAqB,CAAC;QAC/C,uBAAkB,GAAgC,EAAE,CAAC;QAI3D,IAAI,CAAC,SAAS,CAAC,IAAI,CACf,qBAAU,CAAC,MAAM,CAAC,GAAG,EAAE;YACnB,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC,CAAC;YACpE,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;QACxB,CAAC,CAAC,CACL,CAAC;IACN,CAAC;IAES,KAAK,CAAC,GAAG,CAAC,OAA+B;QAC/C,MAAM,eAAe,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;QAC3D,IAAI,CAAC,MAAM,GAAG,IAAI,WAAM,CAAC,EAAE,MAAM,EAAE,eAAe,CAAC,MAAM,EAAE,IAAI,EAAE,eAAe,CAAC,IAAI,EAAE,CAAC,CAAC;QACzF,MAAM,QAAQ,GAAG,QAAQ,eAAe,CAAC,IAAI,IAAI,eAAe,CAAC,IAAI,IAAI,eAAe,CAAC,IAAI,EAAE,CAAC;QAChG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,mFAAmF,QAAQ,GAA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G,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;QAC3C,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC;AACD;;;GAGG;AACH,SAAgB,aAAa,CAAC,MAAiB;IAC3C,OAAO;QACH,IAAI,EAAE,OAAO,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC;QACrC,SAAS,EAAE,EAAE,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC;QACzC,OAAO,EAAE,EAAE,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC;QACrC,OAAO,EAAE,EAAE,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC;QACrC,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,KAAK,EAAE;KAChC,CAAC;AACN,CAAC;AARD,sCAQC"}
1
+ {"version":3,"file":"websocket-server-launcher.js","sourceRoot":"","sources":["../../../src/node/launch/websocket-server-launcher.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;;;;AAElF,qDAA+G;AAC/G,6BAA6B;AAC7B,yCAA+C;AAC/C,2BAA2B;AAE3B,2BAAuC;AACvC,yFAAwF;AACxF,sDAAmD;AAoBnD,MAAM,uBAAuB,GAAG,GAAG,CAAC;AAG7B,IAAM,uBAAuB,qCAA7B,MAAM,uBAAwB,SAAQ,mDAAiD;IAM1F;QACI,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,SAAS,CAAC,IAAI,CACf,qBAAU,CAAC,MAAM,CAAC,GAAG,EAAE;YACnB,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;QACxB,CAAC,CAAC,CACL,CAAC;IACN,CAAC;IAES,KAAK,CAAC,GAAG,CAAC,OAA+B;QAC/C,MAAM,eAAe,GAAG,MAAM,IAAI,C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AE;;GACA,uBAAuB,CAgEnC;AAED,KAAK,UAAU,WAAW;IACtB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACnC,MAAM,GAAG,GAAG,GAAG,CAAC,YAAY,EAAE,CAAC;QAC/B,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,EAAE;YACf,MAAM,OAAO,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC;YAC9B,IAAI,CAAC,OAAO,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;gBACzC,MAAM,CAAC,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC,CAAC;gBAC9D,OAAO;aACV;YACD,GAAG,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;QAC3C,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC;AACD;;;GAGG;AACH,SAAgB,aAAa,CAAC,MAAiB;IAC3C,OAAO;QACH,IAAI,EAAE,OAAO,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC;QACrC,SAAS,EAAE,EAAE,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC;QACzC,OAAO,EAAE,EAAE,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC;QACrC,OAAO,EAAE,EAAE,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC;QACrC,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,KAAK,EAAE;KAChC,CAAC;AACN,CAAC;AARD,sCAQC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eclipse-glsp/server",
3
- "version": "1.1.0-next.dc6b980.47+dc6b980",
3
+ "version": "1.1.0-next.e49c816.56+e49c816",
4
4
  "description": "A js server framework for Eclipse GLSP",
5
5
  "keywords": [
6
6
  "eclipse",
@@ -59,12 +59,11 @@
59
59
  "watch": "tsc -w"
60
60
  },
61
61
  "dependencies": {
62
- "@eclipse-glsp/graph": "1.1.0-next.dc6b980.47+dc6b980",
62
+ "@eclipse-glsp/graph": "1.1.0-next.e49c816.56+e49c816",
63
63
  "@eclipse-glsp/protocol": "next",
64
64
  "@types/uuid": "8.3.1",
65
65
  "commander": "^8.3.0",
66
66
  "fast-json-patch": "^3.1.0",
67
- "inversify": "^5.1.1",
68
67
  "winston": "^3.3.3",
69
68
  "ws": "^8.12.1"
70
69
  },
@@ -72,8 +71,11 @@
72
71
  "@types/fs-extra": "^9.0.13",
73
72
  "@types/ws": "^8.5.4"
74
73
  },
74
+ "peerDependencies": {
75
+ "inversify": "^6.0.0"
76
+ },
75
77
  "publishConfig": {
76
78
  "access": "public"
77
79
  },
78
- "gitHead": "dc6b980a473afbce8e304a2b68efe6877069dc97"
80
+ "gitHead": "e49c8161b27481e4861b9429b7cab85946ce6700"
79
81
  }
@@ -14,42 +14,14 @@
14
14
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
15
  ********************************************************************************/
16
16
 
17
- import { ContainerModule, interfaces } from 'inversify';
18
- import { InjectionContainer, Logger, LoggerFactory, LogLevel, ModuleContext, NullLogger } from '../../common/index';
19
- import { ConsoleLogger } from './console-logger';
17
+ import { ContainerModule } from 'inversify';
18
+ import { InjectionContainer, LogLevel, LoggerConfigOptions, configureConsoleLogger } from '../../common/';
20
19
 
21
- export interface LaunchOptions {
22
- consoleLog?: boolean;
23
- logLevel?: LogLevel;
24
- }
25
- export function createAppModule(options: LaunchOptions = {}): ContainerModule {
26
- const resolvedOptions: LaunchOptions = { consoleLog: true, logLevel: LogLevel.info, ...options };
20
+ export function createAppModule(options: LoggerConfigOptions = {}): ContainerModule {
21
+ const resolvedOptions: LoggerConfigOptions = { consoleLog: true, logLevel: LogLevel.info, ...options };
27
22
  return new ContainerModule((bind, unbind, isBound, rebind) => {
28
23
  bind(InjectionContainer).toDynamicValue(dynamicContext => dynamicContext.container);
29
24
  const context = { bind, unbind, isBound, rebind };
30
25
  configureConsoleLogger(context, resolvedOptions);
31
26
  });
32
27
  }
33
-
34
- export function configureConsoleLogger<T extends LaunchOptions>(context: ModuleContext, options: T): void {
35
- if (!options.consoleLog) {
36
- context.bind(Logger).to(NullLogger).inSingletonScope();
37
- } else {
38
- context.bind(Logger).toDynamicValue(ctx => new ConsoleLogger(options.logLevel, getRequestParentName(ctx)));
39
- }
40
- context.bind(LoggerFactory).toFactory(dynamicContext => (caller: string) => {
41
- const logger = dynamicContext.container.get(Logger);
42
- logger.caller = caller;
43
- return logger;
44
- });
45
- }
46
-
47
- function getRequestParentName(context: interfaces.Context): string | undefined {
48
- if (context.currentRequest.parentRequest) {
49
- const bindings = context.currentRequest.parentRequest.bindings;
50
- if (bindings.length > 0) {
51
- return bindings[0].implementationType?.name;
52
- }
53
- }
54
- return undefined;
55
- }
@@ -15,5 +15,4 @@
15
15
  ********************************************************************************/
16
16
  export * from '../common/index';
17
17
  export * from './di/app-module';
18
- export * from './di/console-logger';
19
18
  export * from './launch/worker-server-launcher';
@@ -14,9 +14,10 @@
14
14
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
15
  ********************************************************************************/
16
16
 
17
- import { Container, injectable } from 'inversify';
17
+ import { injectable } from 'inversify';
18
18
  import * as jsonrpc from 'vscode-jsonrpc/browser';
19
- import { GLSPServer, GLSPServerLauncher, JsonRpcGLSPServer, MaybePromise } from '../../common/index';
19
+ import { MaybePromise } from '../../common/index';
20
+ import { JsonRpcGLSPServerLauncher, JsonRpcServerInstance } from '../../common/launch/jsonrpc-server-launcher';
20
21
  export interface WorkerLaunchOptions {
21
22
  context?: Worker;
22
23
  }
@@ -24,22 +25,16 @@ export interface WorkerLaunchOptions {
24
25
  export const START_UP_COMPLETE_MSG = '[GLSP-Server]:Startup completed.';
25
26
 
26
27
  @injectable()
27
- export class WorkerServerLauncher extends GLSPServerLauncher<WorkerLaunchOptions> {
28
+ export class WorkerServerLauncher extends JsonRpcGLSPServerLauncher<WorkerLaunchOptions> {
28
29
  protected connection?: jsonrpc.MessageConnection;
29
30
 
30
31
  protected run(options: WorkerLaunchOptions): MaybePromise<void> {
31
32
  if (this.connection) {
32
33
  throw new Error('Error during launch. Server already has an active client connection');
33
34
  }
34
- const container = this.createContainer();
35
35
  this.connection = this.createConnection(options);
36
- const glspServer = container.get<JsonRpcGLSPServer>(JsonRpcGLSPServer);
37
- glspServer.connect(this.connection);
38
- this.connection.onDispose(() => this.disposeClientConnection(container, glspServer));
39
-
36
+ this.createServerInstance(this.connection);
40
37
  this.logger.info('GLSP server worker connection established');
41
- this.connection.listen();
42
- this.toDispose.push(this.connection);
43
38
  postMessage(START_UP_COMPLETE_MSG);
44
39
  return new Promise((resolve, rejects) => {
45
40
  this.connection?.onClose(() => resolve(undefined));
@@ -47,9 +42,8 @@ export class WorkerServerLauncher extends GLSPServerLauncher<WorkerLaunchOptions
47
42
  });
48
43
  }
49
44
 
50
- protected disposeClientConnection(container: Container, glspServer: GLSPServer): void {
51
- glspServer.shutdown();
52
- container.unbindAll();
45
+ protected override disposeServerInstance(instance: JsonRpcServerInstance): void {
46
+ super.disposeServerInstance(instance);
53
47
  this.connection = undefined;
54
48
  }
55
49
 
@@ -13,10 +13,9 @@
13
13
  *
14
14
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
15
  ********************************************************************************/
16
- import { Action, ActionMessage } from '@eclipse-glsp/protocol';
16
+ import { Action, ActionMessage, GLSPClientProxy } from '@eclipse-glsp/protocol';
17
17
  import { inject, injectable, optional } from 'inversify';
18
18
  import { ClientActionKinds, ClientId } from '../di/service-identifiers';
19
- import { GLSPClientProxy } from '../protocol/glsp-client-proxy';
20
19
 
21
20
  /**
22
21
  * The client action handler is responsible of handling action kinds that are intended for the
@@ -13,8 +13,8 @@
13
13
  *
14
14
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
15
  ********************************************************************************/
16
+ import { MaybePromise } from '@eclipse-glsp/protocol';
16
17
  import { inject, injectable } from 'inversify';
17
- import { MaybePromise } from '..';
18
18
  import { Logger } from '../utils/logger';
19
19
  import { Command } from './command';
20
20
 
@@ -152,6 +152,7 @@ namespace NoOPSyntax {
152
152
  };
153
153
  const syntax = {
154
154
  onActivation: noOpReturn,
155
+ onDeactivation: noOpReturn,
155
156
  when: noOpReturn,
156
157
  whenAnyAncestorIs: noOpReturn,
157
158
  whenAnyAncestorMatches: noOpReturn,
@@ -13,8 +13,8 @@
13
13
  *
14
14
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
15
  ********************************************************************************/
16
+ import { GLSPClientProxy } from '@eclipse-glsp/protocol';
16
17
  import { ContainerModule } from 'inversify';
17
- import { GLSPClientProxy } from '../protocol/glsp-client-proxy';
18
18
  import { ClientId } from './service-identifiers';
19
19
 
20
20
  export function createClientSessionModule(clientId: string, glspClient: GLSPClientProxy): ContainerModule {
@@ -13,12 +13,14 @@
13
13
  *
14
14
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
15
  ********************************************************************************/
16
+ import { BindingContext } from '@eclipse-glsp/protocol';
16
17
  import { ContainerModule, injectable, interfaces } from 'inversify';
17
18
  import { AbstractMultiBinding } from './multi-binding';
18
19
 
19
20
  /**
20
21
  * A wrapper interface to get access to the binding related functions
21
22
  * for a inversify container.
23
+ * @deprecated Use `BindingContext` from `@eclipse-glsp/protocol` instead
22
24
  */
23
25
  export interface ModuleContext {
24
26
  bind: interfaces.Bind;
@@ -34,7 +36,7 @@ export interface ModuleContext {
34
36
  export abstract class GLSPModule extends ContainerModule {
35
37
  public static CLIENT_ACTIONS = 'ClientActions';
36
38
 
37
- protected context: ModuleContext;
39
+ protected context: BindingContext;
38
40
 
39
41
  constructor() {
40
42
  super((bind, unbind, isBound, rebind) => {
@@ -13,9 +13,8 @@
13
13
  *
14
14
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
15
  ********************************************************************************/
16
- import { distinctAdd, flatPush, MaybeArray, remove } from '@eclipse-glsp/protocol';
16
+ import { BindingContext, distinctAdd, flatPush, MaybeArray, remove } from '@eclipse-glsp/protocol';
17
17
  import { applyBindingTarget, BindingTarget } from './binding-target';
18
- import { ModuleContext } from './glsp-module';
19
18
 
20
19
  /**
21
20
  * A helper class used in `GLSPModules` to ease the configuration of multi-injected service identifiers.
@@ -29,7 +28,7 @@ export abstract class AbstractMultiBinding<T> {
29
28
 
30
29
  constructor(readonly identifier: string | symbol) {}
31
30
 
32
- abstract applyBindings(context: ModuleContext): void;
31
+ abstract applyBindings(context: BindingContext): void;
33
32
 
34
33
  add(newBinding: T): void {
35
34
  distinctAdd(this.bindings, newBinding);
@@ -71,7 +70,7 @@ export abstract class AbstractMultiBinding<T> {
71
70
  * @typeparam T the base type of {@link BindingTarget}.
72
71
  */
73
72
  export class MultiBinding<T> extends AbstractMultiBinding<BindingTarget<T>> {
74
- applyBindings(context: ModuleContext): void {
73
+ applyBindings(context: BindingContext): void {
75
74
  this.bindings.forEach(binding => applyBindingTarget(context, this.identifier, binding));
76
75
  }
77
76
  }
@@ -83,7 +82,7 @@ export class MultiBinding<T> extends AbstractMultiBinding<BindingTarget<T>> {
83
82
  * * @typeparam T the type of the instances
84
83
  */
85
84
  export class InstanceMultiBinding<T> extends AbstractMultiBinding<T> {
86
- applyBindings(context: ModuleContext): void {
85
+ applyBindings(context: BindingContext): void {
87
86
  context.bind(this.identifier).toConstantValue(this.bindings);
88
87
  }
89
88
  }
@@ -13,14 +13,13 @@
13
13
  *
14
14
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
15
  ********************************************************************************/
16
+ import { GLSPServer, GLSPServerListener } from '@eclipse-glsp/protocol';
16
17
  import { ContainerModule, interfaces } from 'inversify';
17
18
  import { DefaultGlobalActionProvider, GlobalActionProvider } from '../actions/global-action-provider';
18
- import { DefaultGLSPClientProxy, GLSPClientProxy, JsonRpcGLSPClientProxy } from '../protocol/glsp-client-proxy';
19
- import { DefaultGLSPServer, GLSPServer, JsonRpcGLSPServer } from '../protocol/glsp-server';
20
- import { GLSPServerListener } from '../protocol/glsp-server-listener';
19
+ import { DefaultGLSPServer } from '../protocol/glsp-server';
21
20
  import { ClientSessionFactory, DefaultClientSessionFactory } from '../session/client-session-factory';
22
21
  import { ClientSessionManager, DefaultClientSessionManager } from '../session/client-session-manager';
23
- import { applyBindingTarget, BindingTarget } from './binding-target';
22
+ import { BindingTarget, applyBindingTarget } from './binding-target';
24
23
  import { DiagramModule } from './diagram-module';
25
24
  import { GLSPModule } from './glsp-module';
26
25
  import { MultiBinding } from './multi-binding';
@@ -74,7 +73,6 @@ export class ServerModule extends GLSPModule {
74
73
  applyBindingTarget(context, DiagramModules, this.bindDiagramModules());
75
74
 
76
75
  applyBindingTarget(context, GLSPServer, this.bindGLSPServer()).inSingletonScope();
77
- applyBindingTarget(context, JsonRpcGLSPServer, this.bindJsonRpcGLSPServer());
78
76
  applyBindingTarget(context, ClientSessionFactory, this.bindClientSessionFactory()).inSingletonScope();
79
77
  applyBindingTarget(context, ClientSessionManager, this.bindClientSessionManager()).inSingletonScope();
80
78
  this.configureMultiBinding(new MultiBinding<GLSPServerListener>(GLSPServerListener), binding =>
@@ -83,10 +81,9 @@ export class ServerModule extends GLSPModule {
83
81
 
84
82
  applyBindingTarget(context, GlobalActionProvider, this.bindGlobalActionProvider()).inSingletonScope();
85
83
 
86
- applyBindingTarget(context, InjectionContainer, this.bindInjectionContainer());
87
-
88
- applyBindingTarget(context, GLSPClientProxy, this.bindGLSPClientProxy()).inSingletonScope();
89
- applyBindingTarget(context, JsonRpcGLSPClientProxy, this.bindJsonRpcGLSPClientProxy());
84
+ if (!isBound(InjectionContainer)) {
85
+ applyBindingTarget(context, InjectionContainer, this.bindInjectionContainer());
86
+ }
90
87
  }
91
88
 
92
89
  protected bindDiagramModules(): BindingTarget<Map<string, ContainerModule[]>> {
@@ -97,10 +94,6 @@ export class ServerModule extends GLSPModule {
97
94
  return DefaultGLSPServer;
98
95
  }
99
96
 
100
- protected bindJsonRpcGLSPServer(): BindingTarget<JsonRpcGLSPServer> {
101
- return { service: GLSPServer };
102
- }
103
-
104
97
  protected bindClientSessionFactory(): BindingTarget<ClientSessionFactory> {
105
98
  return DefaultClientSessionFactory;
106
99
  }
@@ -117,14 +110,6 @@ export class ServerModule extends GLSPModule {
117
110
  return { dynamicValue: context => context.container };
118
111
  }
119
112
 
120
- protected bindGLSPClientProxy(): BindingTarget<GLSPClientProxy> {
121
- return DefaultGLSPClientProxy;
122
- }
123
-
124
- protected bindJsonRpcGLSPClientProxy(): BindingTarget<JsonRpcGLSPClientProxy> {
125
- return { service: GLSPClientProxy };
126
- }
127
-
128
113
  protected configureGLSPServerListeners(binding: MultiBinding<GLSPServerListener>): void {
129
114
  binding.add({ service: ClientSessionManager });
130
115
  }
@@ -74,9 +74,7 @@ export * from './operations/create-operation-handler';
74
74
  export * from './operations/operation-action-handler';
75
75
  export * from './operations/operation-handler';
76
76
  export * from './operations/operation-handler-registry';
77
- export * from './protocol/glsp-client-proxy';
78
77
  export * from './protocol/glsp-server';
79
- export * from './protocol/glsp-server-listener';
80
78
  export * from './session/client-session';
81
79
  export * from './session/client-session-factory';
82
80
  export * from './session/client-session-initializer';
@@ -84,6 +82,7 @@ export * from './session/client-session-listener';
84
82
  export * from './session/client-session-manager';
85
83
  export * from './utils/args-util';
86
84
  export * from './utils/client-options-util';
85
+ export * from './utils/console-logger';
87
86
  export * from './utils/glsp-server-error';
88
87
  export * from './utils/layout-util';
89
88
  export * from './utils/logger';
@@ -33,9 +33,9 @@ export abstract class GLSPServerLauncher<T> implements Disposable {
33
33
  this._modules.push(serverModule, ...additionalModules);
34
34
  }
35
35
 
36
- createContainer(): Container {
36
+ createContainer(...additionalModules: ContainerModule[]): Container {
37
37
  const container = this.parentContainer ? this.parentContainer.createChild() : new Container();
38
- container.load(...this._modules);
38
+ container.load(...this._modules, ...additionalModules);
39
39
  return container;
40
40
  }
41
41
 
@@ -0,0 +1,95 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2023 EclipseSource and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the Eclipse Public License v. 2.0 which is available at
6
+ * http://www.eclipse.org/legal/epl-2.0.
7
+ *
8
+ * This Source Code may also be made available under the following Secondary
9
+ * Licenses when the conditions for such availability set forth in the Eclipse
10
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ * with the GNU Classpath Exception which is available at
12
+ * https://www.gnu.org/software/classpath/license.html.
13
+ *
14
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
+ ********************************************************************************/
16
+
17
+ import {
18
+ Disposable,
19
+ GLSPClientProxy,
20
+ GLSPServer,
21
+ JsonrpcClientProxy,
22
+ JsonrpcGLSPClient,
23
+ configureClientConnection
24
+ } from '@eclipse-glsp/protocol';
25
+ import { Container, ContainerModule, inject, injectable } from 'inversify';
26
+ import * as jsonrpc from 'vscode-jsonrpc';
27
+ import { Logger } from '../utils/logger';
28
+ import { GLSPServerLauncher } from './glsp-server-launcher';
29
+
30
+ export const START_UP_COMPLETE_MSG = '[GLSP-Server]:Startup completed. Accepting requests on port:';
31
+
32
+ export interface JsonRpcServerInstance {
33
+ server: GLSPServer;
34
+ clientConnection: jsonrpc.MessageConnection;
35
+ container: Container;
36
+ }
37
+
38
+ @injectable()
39
+ export abstract class JsonRpcGLSPServerLauncher<T> extends GLSPServerLauncher<T> {
40
+ @inject(Logger)
41
+ protected override logger: Logger;
42
+
43
+ protected serverInstances = new Map<jsonrpc.MessageConnection, JsonRpcServerInstance>();
44
+ protected startupCompleteMessage = START_UP_COMPLETE_MSG;
45
+
46
+ constructor() {
47
+ super();
48
+ this.toDispose.push(
49
+ Disposable.create(() => {
50
+ this.serverInstances.forEach(instance => this.disposeServerInstance(instance));
51
+ })
52
+ );
53
+ }
54
+
55
+ protected disposeServerInstance(instance: JsonRpcServerInstance): void {
56
+ this.serverInstances.delete(instance.clientConnection);
57
+ instance.server.shutdown();
58
+ instance.container.unbindAll();
59
+ instance.clientConnection.dispose();
60
+ }
61
+
62
+ protected createServerInstance(clientConnection: jsonrpc.MessageConnection): void {
63
+ const container = this.createContainer(this.createJsonRpcModule(clientConnection));
64
+ const server = container.get<GLSPServer>(GLSPServer);
65
+ const instance = { container, clientConnection, server };
66
+ this.serverInstances.set(clientConnection, instance);
67
+ this.configureClientConnection(instance);
68
+ }
69
+
70
+ protected createJsonRpcModule(clientConnection: jsonrpc.MessageConnection): ContainerModule {
71
+ return new ContainerModule(bind => {
72
+ bind(GLSPClientProxy).toDynamicValue(ctx => {
73
+ const proxy = ctx.container.resolve(JsonrpcClientProxy);
74
+ proxy.initialize(clientConnection);
75
+ return proxy;
76
+ });
77
+ });
78
+ }
79
+
80
+ protected configureClientConnection(serverInstance: JsonRpcServerInstance): void {
81
+ configureClientConnection(serverInstance.clientConnection, serverInstance.server);
82
+
83
+ serverInstance.clientConnection.onNotification(JsonrpcGLSPClient.ShutdownNotification, () =>
84
+ this.disposeServerInstance(serverInstance)
85
+ );
86
+
87
+ this.logger.info('Starting GLSP server connection');
88
+ }
89
+
90
+ protected createClientProxy(serverInstance: JsonRpcServerInstance): GLSPClientProxy {
91
+ const proxy = serverInstance.container.resolve(JsonrpcClientProxy);
92
+ proxy.initialize(serverInstance.clientConnection);
93
+ return proxy;
94
+ }
95
+ }
@@ -13,7 +13,13 @@
13
13
  *
14
14
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
15
  ********************************************************************************/
16
- import { DisposeClientSessionParameters, InitializeClientSessionParameters, InitializeParameters } from '@eclipse-glsp/protocol';
16
+ import {
17
+ DisposeClientSessionParameters,
18
+ GLSPClientProxy,
19
+ GLSPServerListener,
20
+ InitializeClientSessionParameters,
21
+ InitializeParameters
22
+ } from '@eclipse-glsp/protocol';
17
23
  import { expect } from 'chai';
18
24
  import { Container, ContainerModule } from 'inversify';
19
25
  import * as sinon from 'sinon';
@@ -21,9 +27,7 @@ import { GlobalActionProvider } from '../actions/global-action-provider';
21
27
  import { ClientSessionManager } from '../session/client-session-manager';
22
28
  import * as mock from '../test/mock-util';
23
29
  import { Logger } from '../utils/logger';
24
- import { GLSPClientProxy, JsonRpcGLSPClientProxy } from './glsp-client-proxy';
25
30
  import { DefaultGLSPServer } from './glsp-server';
26
- import { GLSPServerListener } from './glsp-server-listener';
27
31
  import assert = require('assert');
28
32
 
29
33
  describe('test DefaultGLSPServer', () => {
@@ -48,7 +52,6 @@ describe('test DefaultGLSPServer', () => {
48
52
  new ContainerModule(bind => {
49
53
  bind(Logger).toConstantValue(new mock.StubLogger());
50
54
  bind(GLSPClientProxy).toConstantValue(new mock.StubGLSPClientProxy());
51
- bind(JsonRpcGLSPClientProxy).toConstantValue(new mock.StubGLSPClientProxy());
52
55
  bind(ClientSessionManager).toConstantValue(sessionManager);
53
56
  bind(GlobalActionProvider).toConstantValue({ clientActionKinds: new Map<string, string[]>(), serverActionKinds });
54
57
  bind(GLSPServerListener).toConstantValue(listener1);