@celljs/rpc 3.0.0

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 (249) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1 -0
  3. package/cell.yml +8 -0
  4. package/lib/common/annotation/autorpc.d.ts +6 -0
  5. package/lib/common/annotation/autorpc.d.ts.map +1 -0
  6. package/lib/common/annotation/autorpc.js +19 -0
  7. package/lib/common/annotation/autorpc.js.map +1 -0
  8. package/lib/common/annotation/detached/autorpc.d.ts +3 -0
  9. package/lib/common/annotation/detached/autorpc.d.ts.map +1 -0
  10. package/lib/common/annotation/detached/autorpc.js +15 -0
  11. package/lib/common/annotation/detached/autorpc.js.map +1 -0
  12. package/lib/common/annotation/detached/index.d.ts +2 -0
  13. package/lib/common/annotation/detached/index.d.ts.map +1 -0
  14. package/lib/common/annotation/detached/index.js +18 -0
  15. package/lib/common/annotation/detached/index.js.map +1 -0
  16. package/lib/common/annotation/index.d.ts +3 -0
  17. package/lib/common/annotation/index.d.ts.map +1 -0
  18. package/lib/common/annotation/index.js +19 -0
  19. package/lib/common/annotation/index.js.map +1 -0
  20. package/lib/common/annotation/rpc.d.ts +20 -0
  21. package/lib/common/annotation/rpc.d.ts.map +1 -0
  22. package/lib/common/annotation/rpc.js +41 -0
  23. package/lib/common/annotation/rpc.js.map +1 -0
  24. package/lib/common/channal/channel-protocol.d.ts +52 -0
  25. package/lib/common/channal/channel-protocol.d.ts.map +1 -0
  26. package/lib/common/channal/channel-protocol.js +38 -0
  27. package/lib/common/channal/channel-protocol.js.map +1 -0
  28. package/lib/common/channal/http-channel.d.ts +9 -0
  29. package/lib/common/channal/http-channel.d.ts.map +1 -0
  30. package/lib/common/channal/http-channel.js +26 -0
  31. package/lib/common/channal/http-channel.js.map +1 -0
  32. package/lib/common/channal/index.d.ts +3 -0
  33. package/lib/common/channal/index.d.ts.map +1 -0
  34. package/lib/common/channal/index.js +19 -0
  35. package/lib/common/channal/index.js.map +1 -0
  36. package/lib/common/constants.d.ts +2 -0
  37. package/lib/common/constants.d.ts.map +1 -0
  38. package/lib/common/constants.js +5 -0
  39. package/lib/common/constants.js.map +1 -0
  40. package/lib/common/converter/converter-protocol.d.ts +7 -0
  41. package/lib/common/converter/converter-protocol.d.ts.map +1 -0
  42. package/lib/common/converter/converter-protocol.js +6 -0
  43. package/lib/common/converter/converter-protocol.js.map +1 -0
  44. package/lib/common/converter/index.d.ts +2 -0
  45. package/lib/common/converter/index.d.ts.map +1 -0
  46. package/lib/common/converter/index.js +18 -0
  47. package/lib/common/converter/index.js.map +1 -0
  48. package/lib/common/endpoint/endpoint-protocol.d.ts +5 -0
  49. package/lib/common/endpoint/endpoint-protocol.d.ts.map +1 -0
  50. package/lib/common/endpoint/endpoint-protocol.js +5 -0
  51. package/lib/common/endpoint/endpoint-protocol.js.map +1 -0
  52. package/lib/common/endpoint/endpoint-resolver.d.ts +13 -0
  53. package/lib/common/endpoint/endpoint-resolver.d.ts.map +1 -0
  54. package/lib/common/endpoint/endpoint-resolver.js +61 -0
  55. package/lib/common/endpoint/endpoint-resolver.js.map +1 -0
  56. package/lib/common/endpoint/index.d.ts +3 -0
  57. package/lib/common/endpoint/index.d.ts.map +1 -0
  58. package/lib/common/endpoint/index.js +19 -0
  59. package/lib/common/endpoint/index.js.map +1 -0
  60. package/lib/common/error/error.d.ts +6 -0
  61. package/lib/common/error/error.d.ts.map +1 -0
  62. package/lib/common/error/error.js +12 -0
  63. package/lib/common/error/error.js.map +1 -0
  64. package/lib/common/error/index.d.ts +2 -0
  65. package/lib/common/error/index.d.ts.map +1 -0
  66. package/lib/common/error/index.js +18 -0
  67. package/lib/common/error/index.js.map +1 -0
  68. package/lib/common/factory/connection-factory.d.ts +10 -0
  69. package/lib/common/factory/connection-factory.d.ts.map +1 -0
  70. package/lib/common/factory/connection-factory.js +28 -0
  71. package/lib/common/factory/connection-factory.js.map +1 -0
  72. package/lib/common/factory/index.d.ts +5 -0
  73. package/lib/common/factory/index.d.ts.map +1 -0
  74. package/lib/common/factory/index.js +21 -0
  75. package/lib/common/factory/index.js.map +1 -0
  76. package/lib/common/factory/proxy-factory.d.ts +57 -0
  77. package/lib/common/factory/proxy-factory.d.ts.map +1 -0
  78. package/lib/common/factory/proxy-factory.js +182 -0
  79. package/lib/common/factory/proxy-factory.js.map +1 -0
  80. package/lib/common/factory/reader.d.ts +16 -0
  81. package/lib/common/factory/reader.d.ts.map +1 -0
  82. package/lib/common/factory/reader.js +48 -0
  83. package/lib/common/factory/reader.js.map +1 -0
  84. package/lib/common/factory/writer.d.ts +10 -0
  85. package/lib/common/factory/writer.d.ts.map +1 -0
  86. package/lib/common/factory/writer.js +25 -0
  87. package/lib/common/factory/writer.js.map +1 -0
  88. package/lib/common/handler/connection-handler.d.ts +7 -0
  89. package/lib/common/handler/connection-handler.d.ts.map +1 -0
  90. package/lib/common/handler/connection-handler.js +8 -0
  91. package/lib/common/handler/connection-handler.js.map +1 -0
  92. package/lib/common/handler/handler-protocol.d.ts +7 -0
  93. package/lib/common/handler/handler-protocol.d.ts.map +1 -0
  94. package/lib/common/handler/handler-protocol.js +5 -0
  95. package/lib/common/handler/handler-protocol.js.map +1 -0
  96. package/lib/common/handler/index.d.ts +3 -0
  97. package/lib/common/handler/index.d.ts.map +1 -0
  98. package/lib/common/handler/index.js +19 -0
  99. package/lib/common/handler/index.js.map +1 -0
  100. package/lib/common/index.d.ts +12 -0
  101. package/lib/common/index.d.ts.map +1 -0
  102. package/lib/common/index.js +28 -0
  103. package/lib/common/index.js.map +1 -0
  104. package/lib/common/module.d.ts +4 -0
  105. package/lib/common/module.d.ts.map +1 -0
  106. package/lib/common/module.js +22 -0
  107. package/lib/common/module.js.map +1 -0
  108. package/lib/common/processor/client-config-processor.d.ts +6 -0
  109. package/lib/common/processor/client-config-processor.d.ts.map +1 -0
  110. package/lib/common/processor/client-config-processor.js +20 -0
  111. package/lib/common/processor/client-config-processor.js.map +1 -0
  112. package/lib/common/processor/index.d.ts +3 -0
  113. package/lib/common/processor/index.d.ts.map +1 -0
  114. package/lib/common/processor/index.js +19 -0
  115. package/lib/common/processor/index.js.map +1 -0
  116. package/lib/common/processor/processor-protocol.d.ts +6 -0
  117. package/lib/common/processor/processor-protocol.d.ts.map +1 -0
  118. package/lib/common/processor/processor-protocol.js +5 -0
  119. package/lib/common/processor/processor-protocol.js.map +1 -0
  120. package/lib/common/proxy/delegating-http-proxy-creator.d.ts +24 -0
  121. package/lib/common/proxy/delegating-http-proxy-creator.d.ts.map +1 -0
  122. package/lib/common/proxy/delegating-http-proxy-creator.js +89 -0
  123. package/lib/common/proxy/delegating-http-proxy-creator.js.map +1 -0
  124. package/lib/common/proxy/http-proxy-creator.d.ts +43 -0
  125. package/lib/common/proxy/http-proxy-creator.d.ts.map +1 -0
  126. package/lib/common/proxy/http-proxy-creator.js +137 -0
  127. package/lib/common/proxy/http-proxy-creator.js.map +1 -0
  128. package/lib/common/proxy/index.d.ts +5 -0
  129. package/lib/common/proxy/index.d.ts.map +1 -0
  130. package/lib/common/proxy/index.js +21 -0
  131. package/lib/common/proxy/index.js.map +1 -0
  132. package/lib/common/proxy/proxy-protocol.d.ts +22 -0
  133. package/lib/common/proxy/proxy-protocol.d.ts.map +1 -0
  134. package/lib/common/proxy/proxy-protocol.js +6 -0
  135. package/lib/common/proxy/proxy-protocol.js.map +1 -0
  136. package/lib/common/proxy/proxy-provider.d.ts +10 -0
  137. package/lib/common/proxy/proxy-provider.d.ts.map +1 -0
  138. package/lib/common/proxy/proxy-provider.js +43 -0
  139. package/lib/common/proxy/proxy-provider.js.map +1 -0
  140. package/lib/common/utils/converter-util.d.ts +8 -0
  141. package/lib/common/utils/converter-util.d.ts.map +1 -0
  142. package/lib/common/utils/converter-util.js +32 -0
  143. package/lib/common/utils/converter-util.js.map +1 -0
  144. package/lib/common/utils/index.d.ts +4 -0
  145. package/lib/common/utils/index.d.ts.map +1 -0
  146. package/lib/common/utils/index.js +20 -0
  147. package/lib/common/utils/index.js.map +1 -0
  148. package/lib/common/utils/logger.d.ts +9 -0
  149. package/lib/common/utils/logger.d.ts.map +1 -0
  150. package/lib/common/utils/logger.js +22 -0
  151. package/lib/common/utils/logger.js.map +1 -0
  152. package/lib/common/utils/rpc-util.d.ts +13 -0
  153. package/lib/common/utils/rpc-util.d.ts.map +1 -0
  154. package/lib/common/utils/rpc-util.js +46 -0
  155. package/lib/common/utils/rpc-util.js.map +1 -0
  156. package/lib/node/channel/channel-manager.d.ts +10 -0
  157. package/lib/node/channel/channel-manager.d.ts.map +1 -0
  158. package/lib/node/channel/channel-manager.js +59 -0
  159. package/lib/node/channel/channel-manager.js.map +1 -0
  160. package/lib/node/channel/channel-middleware.d.ts +8 -0
  161. package/lib/node/channel/channel-middleware.d.ts.map +1 -0
  162. package/lib/node/channel/channel-middleware.js +40 -0
  163. package/lib/node/channel/channel-middleware.js.map +1 -0
  164. package/lib/node/channel/channel-protocol.d.ts +13 -0
  165. package/lib/node/channel/channel-protocol.d.ts.map +1 -0
  166. package/lib/node/channel/channel-protocol.js +9 -0
  167. package/lib/node/channel/channel-protocol.js.map +1 -0
  168. package/lib/node/channel/channel-strategy.d.ts +10 -0
  169. package/lib/node/channel/channel-strategy.d.ts.map +1 -0
  170. package/lib/node/channel/channel-strategy.js +64 -0
  171. package/lib/node/channel/channel-strategy.js.map +1 -0
  172. package/lib/node/channel/index.d.ts +5 -0
  173. package/lib/node/channel/index.d.ts.map +1 -0
  174. package/lib/node/channel/index.js +21 -0
  175. package/lib/node/channel/index.js.map +1 -0
  176. package/lib/node/handler/handler-adapter.d.ts +14 -0
  177. package/lib/node/handler/handler-adapter.d.ts.map +1 -0
  178. package/lib/node/handler/handler-adapter.js +55 -0
  179. package/lib/node/handler/handler-adapter.js.map +1 -0
  180. package/lib/node/handler/handler-protocol.d.ts +2 -0
  181. package/lib/node/handler/handler-protocol.d.ts.map +1 -0
  182. package/lib/node/handler/handler-protocol.js +5 -0
  183. package/lib/node/handler/handler-protocol.js.map +1 -0
  184. package/lib/node/handler/index.d.ts +3 -0
  185. package/lib/node/handler/index.d.ts.map +1 -0
  186. package/lib/node/handler/index.js +19 -0
  187. package/lib/node/handler/index.js.map +1 -0
  188. package/lib/node/index.d.ts +3 -0
  189. package/lib/node/index.d.ts.map +1 -0
  190. package/lib/node/index.js +19 -0
  191. package/lib/node/index.js.map +1 -0
  192. package/lib/node/module.d.ts +4 -0
  193. package/lib/node/module.d.ts.map +1 -0
  194. package/lib/node/module.js +6 -0
  195. package/lib/node/module.js.map +1 -0
  196. package/lib/package.spec.d.ts +1 -0
  197. package/lib/package.spec.d.ts.map +1 -0
  198. package/lib/package.spec.js +4 -0
  199. package/lib/package.spec.js.map +1 -0
  200. package/package.json +45 -0
  201. package/src/common/annotation/autorpc.ts +17 -0
  202. package/src/common/annotation/detached/autorpc.ts +12 -0
  203. package/src/common/annotation/detached/index.ts +1 -0
  204. package/src/common/annotation/index.ts +2 -0
  205. package/src/common/annotation/rpc.ts +41 -0
  206. package/src/common/channal/channel-protocol.ts +82 -0
  207. package/src/common/channal/http-channel.ts +30 -0
  208. package/src/common/channal/index.ts +2 -0
  209. package/src/common/constants.ts +1 -0
  210. package/src/common/converter/converter-protocol.ts +8 -0
  211. package/src/common/converter/index.ts +1 -0
  212. package/src/common/endpoint/endpoint-protocol.ts +5 -0
  213. package/src/common/endpoint/endpoint-resolver.ts +46 -0
  214. package/src/common/endpoint/index.ts +2 -0
  215. package/src/common/error/error.ts +7 -0
  216. package/src/common/error/index.ts +1 -0
  217. package/src/common/factory/connection-factory.ts +21 -0
  218. package/src/common/factory/index.ts +4 -0
  219. package/src/common/factory/proxy-factory.ts +219 -0
  220. package/src/common/factory/reader.ts +50 -0
  221. package/src/common/factory/writer.ts +26 -0
  222. package/src/common/handler/connection-handler.ts +7 -0
  223. package/src/common/handler/handler-protocol.ts +8 -0
  224. package/src/common/handler/index.ts +2 -0
  225. package/src/common/index.ts +11 -0
  226. package/src/common/module.ts +21 -0
  227. package/src/common/processor/client-config-processor.ts +12 -0
  228. package/src/common/processor/index.ts +2 -0
  229. package/src/common/processor/processor-protocol.ts +7 -0
  230. package/src/common/proxy/delegating-http-proxy-creator.ts +68 -0
  231. package/src/common/proxy/http-proxy-creator.ts +179 -0
  232. package/src/common/proxy/index.ts +5 -0
  233. package/src/common/proxy/proxy-protocol.ts +26 -0
  234. package/src/common/proxy/proxy-provider.ts +29 -0
  235. package/src/common/utils/converter-util.ts +29 -0
  236. package/src/common/utils/index.ts +3 -0
  237. package/src/common/utils/logger.ts +23 -0
  238. package/src/common/utils/rpc-util.ts +46 -0
  239. package/src/node/channel/channel-manager.ts +44 -0
  240. package/src/node/channel/channel-middleware.ts +27 -0
  241. package/src/node/channel/channel-protocol.ts +21 -0
  242. package/src/node/channel/channel-strategy.ts +56 -0
  243. package/src/node/channel/index.ts +4 -0
  244. package/src/node/handler/handler-adapter.ts +38 -0
  245. package/src/node/handler/handler-protocol.ts +1 -0
  246. package/src/node/handler/index.ts +2 -0
  247. package/src/node/index.ts +2 -0
  248. package/src/node/module.ts +4 -0
  249. package/src/package.spec.ts +4 -0
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./endpoint-protocol"), exports);
18
+ __exportStar(require("./endpoint-resolver"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/common/endpoint/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,sDAAoC"}
@@ -0,0 +1,6 @@
1
+ import { CustomError } from '@celljs/core';
2
+ export declare class EndpointNotFoundError extends CustomError {
3
+ serviceId: string;
4
+ constructor(serviceId: string);
5
+ }
6
+ //# sourceMappingURL=error.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../src/common/error/error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,qBAAa,qBAAsB,SAAQ,WAAW;IAC/B,SAAS,EAAE,MAAM;gBAAjB,SAAS,EAAE,MAAM;CAGvC"}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EndpointNotFoundError = void 0;
4
+ const core_1 = require("@celljs/core");
5
+ class EndpointNotFoundError extends core_1.CustomError {
6
+ constructor(serviceId) {
7
+ super(`No endpoint found: ${serviceId}`);
8
+ this.serviceId = serviceId;
9
+ }
10
+ }
11
+ exports.EndpointNotFoundError = EndpointNotFoundError;
12
+ //# sourceMappingURL=error.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error.js","sourceRoot":"","sources":["../../../src/common/error/error.ts"],"names":[],"mappings":";;;AAAA,uCAA2C;AAE3C,MAAa,qBAAsB,SAAQ,kBAAW;IAClD,YAAmB,SAAiB;QAChC,KAAK,CAAC,sBAAsB,SAAS,EAAE,CAAC,CAAC;QAD1B,cAAS,GAAT,SAAS,CAAQ;IAEpC,CAAC;CACJ;AAJD,sDAIC"}
@@ -0,0 +1,2 @@
1
+ export * from './error';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/common/error/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./error"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/common/error/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB"}
@@ -0,0 +1,10 @@
1
+ import { MessageConnection, Logger } from 'vscode-jsonrpc';
2
+ import { Channel } from '../channal/channel-protocol';
3
+ export declare const ConnnectionFactory: unique symbol;
4
+ export interface ConnnectionFactory<T> {
5
+ create(t: T, logger: Logger): MessageConnection;
6
+ }
7
+ export declare class ConnnectionFactoryImpl implements ConnnectionFactory<Channel> {
8
+ create(channel: Channel, logger: Logger): MessageConnection;
9
+ }
10
+ //# sourceMappingURL=connection-factory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connection-factory.d.ts","sourceRoot":"","sources":["../../../src/common/factory/connection-factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAA2B,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACpF,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAKtD,eAAO,MAAM,kBAAkB,eAA+B,CAAC;AAE/D,MAAM,WAAW,kBAAkB,CAAC,CAAC;IACjC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,GAAG,iBAAiB,CAAC;CACnD;AACD,qBACa,sBAAuB,YAAW,kBAAkB,CAAC,OAAO,CAAC;IACtE,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,iBAAiB;CAO9D"}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.ConnnectionFactoryImpl = exports.ConnnectionFactory = void 0;
10
+ const vscode_jsonrpc_1 = require("vscode-jsonrpc");
11
+ const reader_1 = require("./reader");
12
+ const writer_1 = require("./writer");
13
+ const core_1 = require("@celljs/core");
14
+ exports.ConnnectionFactory = Symbol('ConnnectionFactory');
15
+ let ConnnectionFactoryImpl = class ConnnectionFactoryImpl {
16
+ create(channel, logger) {
17
+ const messageReader = new reader_1.ChannelMessageReader(channel);
18
+ const messageWriter = new writer_1.ChannelMessageWriter(channel);
19
+ const connection = (0, vscode_jsonrpc_1.createMessageConnection)(messageReader, messageWriter, logger);
20
+ connection.onClose(() => connection.dispose());
21
+ return connection;
22
+ }
23
+ };
24
+ ConnnectionFactoryImpl = __decorate([
25
+ (0, core_1.Component)(exports.ConnnectionFactory)
26
+ ], ConnnectionFactoryImpl);
27
+ exports.ConnnectionFactoryImpl = ConnnectionFactoryImpl;
28
+ //# sourceMappingURL=connection-factory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connection-factory.js","sourceRoot":"","sources":["../../../src/common/factory/connection-factory.ts"],"names":[],"mappings":";;;;;;;;;AAAA,mDAAoF;AAEpF,qCAAgD;AAChD,qCAAgD;AAChD,uCAAyC;AAE5B,QAAA,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC,CAAC;AAMxD,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IAC/B,MAAM,CAAC,OAAgB,EAAE,MAAc;QACnC,MAAM,aAAa,GAAG,IAAI,6BAAoB,CAAC,OAAO,CAAC,CAAC;QACxD,MAAM,aAAa,GAAG,IAAI,6BAAoB,CAAC,OAAO,CAAC,CAAC;QACxD,MAAM,UAAU,GAAG,IAAA,wCAAuB,EAAC,aAAa,EAAE,aAAa,EAAE,MAAM,CAAC,CAAC;QACjF,UAAU,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC,CAAC;QAC/C,OAAO,UAAU,CAAC;IACtB,CAAC;CACJ,CAAA;AARY,sBAAsB;IADlC,IAAA,gBAAS,EAAC,0BAAkB,CAAC;GACjB,sBAAsB,CAQlC;AARY,wDAAsB"}
@@ -0,0 +1,5 @@
1
+ export * from './proxy-factory';
2
+ export * from './connection-factory';
3
+ export * from './reader';
4
+ export * from './writer';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/common/factory/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC"}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./proxy-factory"), exports);
18
+ __exportStar(require("./connection-factory"), exports);
19
+ __exportStar(require("./reader"), exports);
20
+ __exportStar(require("./writer"), exports);
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/common/factory/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,uDAAqC;AACrC,2CAAyB;AACzB,2CAAyB"}
@@ -0,0 +1,57 @@
1
+ import { MessageConnection, Event } from 'vscode-jsonrpc';
2
+ import { Disposable, Logger } from '@celljs/core';
3
+ import { ErrorConverter } from '../converter';
4
+ import { ConnectionHandler } from '../handler';
5
+ import { PipeManager } from '@celljs/web';
6
+ export declare type JsonRpcServer<Client> = Disposable & {
7
+ /**
8
+ * If this server is a proxy to a remote server then
9
+ * a client is used as a local object
10
+ * to handle JSON-RPC messages from the remote server.
11
+ */
12
+ setClient(client: Client | undefined): void;
13
+ };
14
+ export interface JsonRpcConnectionEventEmitter {
15
+ readonly onDidOpenConnection: Event<void>;
16
+ readonly onDidCloseConnection: Event<void>;
17
+ }
18
+ export declare type JsonRpcProxy<T> = T & JsonRpcConnectionEventEmitter;
19
+ export declare class JsonRpcConnectionHandler<T extends object> implements ConnectionHandler {
20
+ readonly path: string;
21
+ readonly targetFactory: (proxy: JsonRpcProxy<T>) => any;
22
+ readonly errorConverters: ErrorConverter[];
23
+ readonly pipeManager: PipeManager;
24
+ readonly logger: Logger;
25
+ constructor(path: string, targetFactory: (proxy: JsonRpcProxy<T>) => any, errorConverters: ErrorConverter[], pipeManager: PipeManager, logger: Logger);
26
+ onConnection(connection: MessageConnection): void;
27
+ }
28
+ export declare class JsonRpcProxyFactory<T extends object> implements ProxyHandler<T> {
29
+ target?: any;
30
+ protected errorConverters?: ErrorConverter[] | undefined;
31
+ protected pipeManager?: PipeManager | undefined;
32
+ protected logger?: Logger | undefined;
33
+ private static SET_CLIENT;
34
+ private static ON_DID_OPEN_CONNECTION;
35
+ private static ON_DID_CLOSE_CONNECTION;
36
+ private readonly onDidOpenConnectionEmitter;
37
+ private readonly onDidCloseConnectionEmitter;
38
+ protected internalMethods: Map<string, () => any>;
39
+ protected connectionPromiseResolve: (connection: MessageConnection) => void;
40
+ protected connectionPromise: Promise<MessageConnection>;
41
+ constructor(target?: any, errorConverters?: ErrorConverter[] | undefined, pipeManager?: PipeManager | undefined, logger?: Logger | undefined);
42
+ protected waitForConnection(): void;
43
+ protected getRequestHander(prop: string): (...args: any[]) => Promise<any>;
44
+ protected getNotificationHander(prop: string): (...args: any[]) => void;
45
+ protected registerMethods(connection: MessageConnection): void;
46
+ listen(connection: MessageConnection): void;
47
+ protected onRequest(method: string, ...args: any[]): Promise<any>;
48
+ protected onNotification(method: string, ...args: any[]): void;
49
+ createProxy(): JsonRpcProxy<T>;
50
+ get(target: T, p: PropertyKey, receiver: any): any;
51
+ protected getInternalMethod(method: string): Event<void> | ((client: any) => any) | undefined;
52
+ protected createProxyMethod(method: string): ((...args: any[]) => Promise<any>) | undefined;
53
+ protected isNotification(p: PropertyKey): boolean;
54
+ protected serializeError(e: any): any;
55
+ protected deserializeError(capturedError: Error, e: any): any;
56
+ }
57
+ //# sourceMappingURL=proxy-factory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"proxy-factory.d.ts","sourceRoot":"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,WAAW,IAAI,YAAY,CAAC,CAAC,CAAC;IAK9B,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,GAAG,GAAG,GAAG;IAQlD,SAAS,CAAC,iBAAiB,CAAC,MAAM,EAAE,MAAM,2BAEjB,GAAG;IAU5B,SAAS,CAAC,iBAAiB,CAAC,MAAM,EAAE,MAAM,cAKf,GAAG,EAAE;IAehC,SAAS,CAAC,cAAc,CAAC,CAAC,EAAE,WAAW,GAAG,OAAO;IAIjD,SAAS,CAAC,cAAc,CAAC,CAAC,EAAE,GAAG,GAAG,GAAG;IAiBrC,SAAS,CAAC,gBAAgB,CAAC,aAAa,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,GAAG,GAAG;CAyBhE"}
@@ -0,0 +1,182 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.JsonRpcProxyFactory = exports.JsonRpcConnectionHandler = void 0;
4
+ const vscode_jsonrpc_1 = require("vscode-jsonrpc");
5
+ const core_1 = require("@celljs/core");
6
+ class JsonRpcConnectionHandler {
7
+ constructor(path, targetFactory, errorConverters, pipeManager, logger) {
8
+ this.path = path;
9
+ this.targetFactory = targetFactory;
10
+ this.errorConverters = errorConverters;
11
+ this.pipeManager = pipeManager;
12
+ this.logger = logger;
13
+ }
14
+ onConnection(connection) {
15
+ const factory = new JsonRpcProxyFactory(undefined, this.errorConverters, this.pipeManager, this.logger);
16
+ const proxy = factory.createProxy();
17
+ factory.target = this.targetFactory(proxy);
18
+ factory.listen(connection);
19
+ }
20
+ }
21
+ exports.JsonRpcConnectionHandler = JsonRpcConnectionHandler;
22
+ class JsonRpcProxyFactory {
23
+ constructor(target, errorConverters, pipeManager, logger) {
24
+ this.target = target;
25
+ this.errorConverters = errorConverters;
26
+ this.pipeManager = pipeManager;
27
+ this.logger = logger;
28
+ this.onDidOpenConnectionEmitter = new vscode_jsonrpc_1.Emitter();
29
+ this.onDidCloseConnectionEmitter = new vscode_jsonrpc_1.Emitter();
30
+ this.waitForConnection();
31
+ }
32
+ waitForConnection() {
33
+ this.connectionPromise = new Promise(resolve => this.connectionPromiseResolve = resolve);
34
+ this.connectionPromise.then(connection => {
35
+ connection.onClose(() => this.onDidCloseConnectionEmitter.fire(undefined));
36
+ this.onDidOpenConnectionEmitter.fire(undefined);
37
+ });
38
+ }
39
+ getRequestHander(prop) {
40
+ return (...args) => this.onRequest(prop, ...args);
41
+ }
42
+ getNotificationHander(prop) {
43
+ return (...args) => this.onNotification(prop, ...args);
44
+ }
45
+ registerMethods(connection) {
46
+ if (this.target) {
47
+ for (const prop of (0, core_1.getPropertyNames)(this.target)) {
48
+ if (typeof this.target[prop] === 'function') {
49
+ connection.onRequest(prop, this.getRequestHander(prop));
50
+ connection.onNotification(prop, this.getNotificationHander(prop));
51
+ }
52
+ }
53
+ }
54
+ }
55
+ listen(connection) {
56
+ this.registerMethods(connection);
57
+ connection.onDispose(() => this.waitForConnection());
58
+ connection.listen();
59
+ this.connectionPromiseResolve(connection);
60
+ }
61
+ async onRequest(method, ...args) {
62
+ var _a, _b, _c, _d;
63
+ const now = Date.now();
64
+ const message = `${(0, core_1.getTargetClass)(this.target).name}.${method}`;
65
+ // eslint-disable-next-line no-unused-expressions
66
+ (_a = this.logger) === null || _a === void 0 ? void 0 : _a.info(`starting ${message}`);
67
+ try {
68
+ // eslint-disable-next-line no-unused-expressions
69
+ await ((_b = this.pipeManager) === null || _b === void 0 ? void 0 : _b.apply({ target: this.target, method: method }, args));
70
+ return await this.target[method](...args);
71
+ }
72
+ catch (error) {
73
+ const e = this.serializeError(error);
74
+ if (e instanceof vscode_jsonrpc_1.ResponseError) {
75
+ throw e;
76
+ }
77
+ const reason = e.message || '';
78
+ const stack = e.stack || '';
79
+ // eslint-disable-next-line no-unused-expressions
80
+ (_c = this.logger) === null || _c === void 0 ? void 0 : _c.error(`Request ${method} failed with error: ${reason}`, stack);
81
+ throw e;
82
+ }
83
+ finally {
84
+ // eslint-disable-next-line no-unused-expressions
85
+ (_d = this.logger) === null || _d === void 0 ? void 0 : _d.info(`ending ${message}, cost ${Date.now() - now}ms`);
86
+ }
87
+ }
88
+ onNotification(method, ...args) {
89
+ this.target[method](...args);
90
+ }
91
+ createProxy() {
92
+ const proxy = new Proxy(this, this);
93
+ return proxy;
94
+ }
95
+ get(target, p, receiver) {
96
+ const method = this.getInternalMethod(p.toString());
97
+ if (method) {
98
+ return method;
99
+ }
100
+ return this.createProxyMethod(p.toString());
101
+ }
102
+ getInternalMethod(method) {
103
+ if (method === JsonRpcProxyFactory.SET_CLIENT) {
104
+ return (client) => this.target = client;
105
+ }
106
+ if (method === JsonRpcProxyFactory.ON_DID_OPEN_CONNECTION) {
107
+ return this.onDidOpenConnectionEmitter.event;
108
+ }
109
+ if (method === JsonRpcProxyFactory.ON_DID_CLOSE_CONNECTION) {
110
+ return this.onDidCloseConnectionEmitter.event;
111
+ }
112
+ }
113
+ createProxyMethod(method) {
114
+ if (method === 'then') {
115
+ return undefined;
116
+ }
117
+ const isNotify = this.isNotification(method);
118
+ return async (...args) => {
119
+ const capturedError = new Error(`Request '${method}' failed`);
120
+ const connection = await this.connectionPromise;
121
+ if (isNotify) {
122
+ connection.sendNotification(method, ...args);
123
+ }
124
+ else {
125
+ try {
126
+ return await connection.sendRequest(method, ...args);
127
+ }
128
+ catch (err) {
129
+ throw this.deserializeError(capturedError, err);
130
+ }
131
+ }
132
+ };
133
+ }
134
+ isNotification(p) {
135
+ return p.toString().startsWith('notify') || p.toString().startsWith('on');
136
+ }
137
+ serializeError(e) {
138
+ if (this.errorConverters) {
139
+ for (const converter of this.errorConverters) {
140
+ const serialized = converter.serialize(e);
141
+ if (serialized) {
142
+ e = serialized;
143
+ break;
144
+ }
145
+ }
146
+ }
147
+ if (core_1.ApplicationError.is(e)) {
148
+ return new vscode_jsonrpc_1.ResponseError(e.code, '', Object.assign({ kind: 'application' }, e.toJson()));
149
+ }
150
+ return e;
151
+ }
152
+ deserializeError(capturedError, e) {
153
+ if (e instanceof vscode_jsonrpc_1.ResponseError) {
154
+ const capturedStack = capturedError.stack || '';
155
+ if (e.data && e.data.kind === 'application') {
156
+ const { stack, data, message } = e.data;
157
+ e = core_1.ApplicationError.fromJson(e.code, {
158
+ message: message || capturedError.message,
159
+ data,
160
+ stack: `${capturedStack}\nCaused by: ${stack}`
161
+ });
162
+ }
163
+ else {
164
+ e.stack = capturedStack;
165
+ }
166
+ }
167
+ if (this.errorConverters) {
168
+ for (const converter of this.errorConverters) {
169
+ const deserialized = converter.deserialize(e);
170
+ if (deserialized) {
171
+ return deserialized;
172
+ }
173
+ }
174
+ }
175
+ return e;
176
+ }
177
+ }
178
+ exports.JsonRpcProxyFactory = JsonRpcProxyFactory;
179
+ JsonRpcProxyFactory.SET_CLIENT = 'setClient';
180
+ JsonRpcProxyFactory.ON_DID_OPEN_CONNECTION = 'onDidOpenConnection';
181
+ JsonRpcProxyFactory.ON_DID_CLOSE_CONNECTION = 'onDidCloseConnection';
182
+ //# sourceMappingURL=proxy-factory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"proxy-factory.js","sourceRoot":"","sources":["../../../src/common/factory/proxy-factory.ts"],"names":[],"mappings":";;;AAAA,mDAAkF;AAClF,uCAAsG;AAoBtG,MAAa,wBAAwB;IACjC,YACa,IAAY,EACZ,aAA8C,EAC9C,eAAiC,EACjC,WAAwB,EACxB,MAAc;QAJd,SAAI,GAAJ,IAAI,CAAQ;QACZ,kBAAa,GAAb,aAAa,CAAiC;QAC9C,oBAAe,GAAf,eAAe,CAAkB;QACjC,gBAAW,GAAX,WAAW,CAAa;QACxB,WAAM,GAAN,MAAM,CAAQ;IACvB,CAAC;IAEL,YAAY,CAAC,UAA6B;QACtC,MAAM,OAAO,GAAG,IAAI,mBAAmB,CAAI,SAAS,EAAE,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QAC3G,MAAM,KAA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oBACd,OAAO,YAAY,CAAC;iBACvB;aACJ;SACJ;QACD,OAAO,CAAC,CAAC;IACb,CAAC;;AAlLL,kDAoLC;AAlLkB,8BAAU,GAAG,WAAW,CAAC;AACzB,0CAAsB,GAAG,qBAAqB,CAAC;AAC/C,2CAAuB,GAAG,sBAAsB,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { DataCallback, AbstractMessageReader, Disposable } from 'vscode-jsonrpc';
2
+ import { Channel } from '../channal/channel-protocol';
3
+ export declare class ChannelMessageReader extends AbstractMessageReader {
4
+ protected readonly channel: Channel;
5
+ protected state: 'initial' | 'listening' | 'closed';
6
+ protected callback: DataCallback | undefined;
7
+ protected readonly events: {
8
+ message?: any;
9
+ error?: any;
10
+ }[];
11
+ constructor(channel: Channel);
12
+ listen(callback: DataCallback): Disposable;
13
+ protected readMessage(message: any): void;
14
+ protected fireError(error: any): void;
15
+ }
16
+ //# sourceMappingURL=reader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reader.d.ts","sourceRoot":"","sources":["../../../src/common/factory/reader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjF,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAEtD,qBAAa,oBAAqB,SAAQ,qBAAqB;IAM/C,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,OAAO;IAJ/C,SAAS,CAAC,KAAK,EAAE,SAAS,GAAG,WAAW,GAAG,QAAQ,CAAa;IAChE,SAAS,CAAC,QAAQ,EAAE,YAAY,GAAG,SAAS,CAAC;IAC7C,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE;QAAE,OAAO,CAAC,EAAE,GAAG,CAAC;QAAC,KAAK,CAAC,EAAE,GAAG,CAAA;KAAE,EAAE,CAAM;gBAElC,OAAO,EAAE,OAAO;IAO/C,MAAM,CAAC,QAAQ,EAAE,YAAY,GAAG,UAAU;IAgB1C,SAAS,CAAC,WAAW,CAAC,OAAO,EAAE,GAAG,GAAG,IAAI;cAStB,SAAS,CAAC,KAAK,EAAE,GAAG,GAAG,IAAI;CAQjD"}
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ChannelMessageReader = void 0;
4
+ const vscode_jsonrpc_1 = require("vscode-jsonrpc");
5
+ class ChannelMessageReader extends vscode_jsonrpc_1.AbstractMessageReader {
6
+ constructor(channel) {
7
+ super();
8
+ this.channel = channel;
9
+ this.state = 'initial';
10
+ this.events = [];
11
+ this.channel.onMessage(message => this.readMessage(message));
12
+ }
13
+ listen(callback) {
14
+ if (this.state === 'initial') {
15
+ this.state = 'listening';
16
+ this.callback = callback;
17
+ while (this.events.length !== 0) {
18
+ const event = this.events.pop();
19
+ if (event.message) {
20
+ this.readMessage(event.message);
21
+ }
22
+ else if (event.error) {
23
+ this.fireError(event.error);
24
+ }
25
+ }
26
+ }
27
+ return vscode_jsonrpc_1.Disposable.create(() => { });
28
+ }
29
+ readMessage(message) {
30
+ if (this.state === 'initial') {
31
+ this.events.splice(0, 0, { message });
32
+ }
33
+ else if (this.state === 'listening') {
34
+ const data = JSON.parse(message);
35
+ this.callback(data);
36
+ }
37
+ }
38
+ fireError(error) {
39
+ if (this.state === 'initial') {
40
+ this.events.splice(0, 0, { error });
41
+ }
42
+ else if (this.state === 'listening') {
43
+ super.fireError(error);
44
+ }
45
+ }
46
+ }
47
+ exports.ChannelMessageReader = ChannelMessageReader;
48
+ //# sourceMappingURL=reader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reader.js","sourceRoot":"","sources":["../../../src/common/factory/reader.ts"],"names":[],"mappings":";;;AAAA,mDAAiF;AAGjF,MAAa,oBAAqB,SAAQ,sCAAqB;IAM3D,YAA+B,OAAgB;QAC3C,KAAK,EAAE,CAAC;QADmB,YAAO,GAAP,OAAO,CAAS;QAJrC,UAAK,GAAuC,SAAS,CAAC;QA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,EAAE,CAAC,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;SACvC;aAAM,IAAI,IAAI,CAAC,KAAK,KAAK,WAAW,EAAE;YACnC,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;SAC1B;IACL,CAAC;CAEJ;AA9CD,oDA8CC"}
@@ -0,0 +1,10 @@
1
+ import { Message, AbstractMessageWriter } from 'vscode-jsonrpc';
2
+ import { Channel } from '../channal';
3
+ export declare class ChannelMessageWriter extends AbstractMessageWriter {
4
+ protected readonly channel: Channel;
5
+ protected errorCount: number;
6
+ constructor(channel: Channel);
7
+ write(msg: Message): Promise<void>;
8
+ end(): void;
9
+ }
10
+ //# sourceMappingURL=writer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"writer.d.ts","sourceRoot":"","sources":["../../../src/common/factory/writer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAChE,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,qBAAa,oBAAqB,SAAQ,qBAAqB;IAI/C,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,OAAO;IAF/C,SAAS,CAAC,UAAU,SAAK;gBAEM,OAAO,EAAE,OAAO;IAIzC,KAAK,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAUxC,GAAG;CAIN"}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ChannelMessageWriter = void 0;
4
+ const vscode_jsonrpc_1 = require("vscode-jsonrpc");
5
+ class ChannelMessageWriter extends vscode_jsonrpc_1.AbstractMessageWriter {
6
+ constructor(channel) {
7
+ super();
8
+ this.channel = channel;
9
+ this.errorCount = 0;
10
+ }
11
+ async write(msg) {
12
+ try {
13
+ const content = JSON.stringify(msg);
14
+ this.channel.send(content);
15
+ }
16
+ catch (e) {
17
+ this.errorCount++;
18
+ this.fireError(e, msg, this.errorCount);
19
+ }
20
+ }
21
+ end() {
22
+ }
23
+ }
24
+ exports.ChannelMessageWriter = ChannelMessageWriter;
25
+ //# sourceMappingURL=writer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"writer.js","sourceRoot":"","sources":["../../../src/common/factory/writer.ts"],"names":[],"mappings":";;;AAAA,mDAAgE;AAGhE,MAAa,oBAAqB,SAAQ,sCAAqB;IAI3D,YAA+B,OAAgB;QAC3C,KAAK,EAAE,CAAC;QADmB,YAAO,GAAP,OAAO,CAAS;QAFrC,eAAU,GAAG,CAAC,CAAC;IAIzB,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,GAAY;QACpB,IAAI;YACA,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;YACpC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;SAC9B;QAAC,OAAO,CAAC,EAAE;YACR,IAAI,CAAC,UAAU,EAAE,CAAC;YAClB,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;SAC3C;IACL,CAAC;IAED,GAAG;IAEH,CAAC;CAEJ;AAtBD,oDAsBC"}
@@ -0,0 +1,7 @@
1
+ import { MessageConnection } from 'vscode-jsonrpc';
2
+ import { ConnectionHandler } from './handler-protocol';
3
+ export declare class NoOpConnectionHandler implements ConnectionHandler {
4
+ readonly path: string;
5
+ onConnection(connection: MessageConnection): void;
6
+ }
7
+ //# sourceMappingURL=connection-handler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connection-handler.d.ts","sourceRoot":"","sources":["../../../src/common/handler/connection-handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD,qBAAa,qBAAsB,YAAW,iBAAiB;IAC3D,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,UAAU,EAAE,iBAAiB,GAAG,IAAI;CACpD"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NoOpConnectionHandler = void 0;
4
+ class NoOpConnectionHandler {
5
+ onConnection(connection) { }
6
+ }
7
+ exports.NoOpConnectionHandler = NoOpConnectionHandler;
8
+ //# sourceMappingURL=connection-handler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connection-handler.js","sourceRoot":"","sources":["../../../src/common/handler/connection-handler.ts"],"names":[],"mappings":";;;AAGA,MAAa,qBAAqB;IAE9B,YAAY,CAAC,UAA6B,IAAS,CAAC;CACvD;AAHD,sDAGC"}
@@ -0,0 +1,7 @@
1
+ import { MessageConnection } from 'vscode-jsonrpc';
2
+ export declare const ConnectionHandler: unique symbol;
3
+ export interface ConnectionHandler {
4
+ readonly path: string;
5
+ onConnection(connection: MessageConnection): void;
6
+ }
7
+ //# sourceMappingURL=handler-protocol.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handler-protocol.d.ts","sourceRoot":"","sources":["../../../src/common/handler/handler-protocol.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEnD,eAAO,MAAM,iBAAiB,eAA8B,CAAC;AAE7D,MAAM,WAAW,iBAAiB;IAC9B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,UAAU,EAAE,iBAAiB,GAAG,IAAI,CAAC;CACrD"}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ConnectionHandler = void 0;
4
+ exports.ConnectionHandler = Symbol('ConnectionHandler');
5
+ //# sourceMappingURL=handler-protocol.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handler-protocol.js","sourceRoot":"","sources":["../../../src/common/handler/handler-protocol.ts"],"names":[],"mappings":";;;AAEa,QAAA,iBAAiB,GAAG,MAAM,CAAC,mBAAmB,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './connection-handler';
2
+ export * from './handler-protocol';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/common/handler/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./connection-handler"), exports);
18
+ __exportStar(require("./handler-protocol"), exports);
19
+ //# sourceMappingURL=index.js.map