@theia/core 1.26.0 → 1.27.0-next.10

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 (164) hide show
  1. package/README.md +6 -7
  2. package/lib/browser/messaging/ws-connection-provider.d.ts +5 -4
  3. package/lib/browser/messaging/ws-connection-provider.d.ts.map +1 -1
  4. package/lib/browser/messaging/ws-connection-provider.js +30 -23
  5. package/lib/browser/messaging/ws-connection-provider.js.map +1 -1
  6. package/lib/browser/progress-status-bar-item.d.ts +1 -1
  7. package/lib/browser/progress-status-bar-item.d.ts.map +1 -1
  8. package/lib/browser/tree/tree-compression/compressed-tree-widget.js +2 -2
  9. package/lib/browser/tree/tree-compression/compressed-tree-widget.js.map +1 -1
  10. package/lib/browser/widgets/select-component.d.ts +4 -1
  11. package/lib/browser/widgets/select-component.d.ts.map +1 -1
  12. package/lib/browser/widgets/select-component.js +30 -16
  13. package/lib/browser/widgets/select-component.js.map +1 -1
  14. package/lib/common/cancellation.d.ts +1 -0
  15. package/lib/common/cancellation.d.ts.map +1 -1
  16. package/lib/common/cancellation.js +8 -0
  17. package/lib/common/cancellation.js.map +1 -1
  18. package/lib/common/index.d.ts +2 -0
  19. package/lib/common/index.d.ts.map +1 -1
  20. package/lib/common/index.js +2 -0
  21. package/lib/common/index.js.map +1 -1
  22. package/lib/common/message-rpc/channel.d.ts +106 -0
  23. package/lib/common/message-rpc/channel.d.ts.map +1 -0
  24. package/lib/common/message-rpc/channel.js +195 -0
  25. package/lib/common/message-rpc/channel.js.map +1 -0
  26. package/lib/common/message-rpc/channel.spec.d.ts +9 -0
  27. package/lib/common/message-rpc/channel.spec.d.ts.map +1 -0
  28. package/lib/common/message-rpc/channel.spec.js +80 -0
  29. package/lib/common/message-rpc/channel.spec.js.map +1 -0
  30. package/lib/common/message-rpc/index.d.ts +4 -0
  31. package/lib/common/message-rpc/index.d.ts.map +1 -0
  32. package/lib/{node/messaging/logger.js → common/message-rpc/index.js} +6 -19
  33. package/lib/common/message-rpc/index.js.map +1 -0
  34. package/lib/common/message-rpc/message-buffer.d.ts +50 -0
  35. package/lib/common/message-rpc/message-buffer.d.ts.map +1 -0
  36. package/lib/common/message-rpc/message-buffer.js +56 -0
  37. package/lib/common/message-rpc/message-buffer.js.map +1 -0
  38. package/lib/common/message-rpc/rpc-message-encoder.d.ts +159 -0
  39. package/lib/common/message-rpc/rpc-message-encoder.d.ts.map +1 -0
  40. package/lib/common/message-rpc/rpc-message-encoder.js +362 -0
  41. package/lib/common/message-rpc/rpc-message-encoder.js.map +1 -0
  42. package/lib/common/message-rpc/rpc-message-encoder.spec.d.ts +2 -0
  43. package/lib/common/message-rpc/rpc-message-encoder.spec.d.ts.map +1 -0
  44. package/lib/common/message-rpc/rpc-message-encoder.spec.js +37 -0
  45. package/lib/common/message-rpc/rpc-message-encoder.spec.js.map +1 -0
  46. package/lib/common/message-rpc/rpc-protocol.d.ts +61 -0
  47. package/lib/common/message-rpc/rpc-protocol.d.ts.map +1 -0
  48. package/lib/common/message-rpc/rpc-protocol.js +183 -0
  49. package/lib/common/message-rpc/rpc-protocol.js.map +1 -0
  50. package/lib/common/message-rpc/uint8-array-message-buffer.d.ts +52 -0
  51. package/lib/common/message-rpc/uint8-array-message-buffer.d.ts.map +1 -0
  52. package/lib/common/message-rpc/uint8-array-message-buffer.js +169 -0
  53. package/lib/common/message-rpc/uint8-array-message-buffer.js.map +1 -0
  54. package/lib/common/message-rpc/uint8-array-message-buffer.spec.d.ts +2 -0
  55. package/lib/common/message-rpc/uint8-array-message-buffer.spec.d.ts.map +1 -0
  56. package/lib/common/message-rpc/uint8-array-message-buffer.spec.js +39 -0
  57. package/lib/common/message-rpc/uint8-array-message-buffer.spec.js.map +1 -0
  58. package/lib/common/messaging/abstract-connection-provider.d.ts +9 -8
  59. package/lib/common/messaging/abstract-connection-provider.d.ts.map +1 -1
  60. package/lib/common/messaging/abstract-connection-provider.js +20 -35
  61. package/lib/common/messaging/abstract-connection-provider.js.map +1 -1
  62. package/lib/common/messaging/connection-error-handler.d.ts +1 -2
  63. package/lib/common/messaging/connection-error-handler.d.ts.map +1 -1
  64. package/lib/common/messaging/connection-error-handler.js +1 -1
  65. package/lib/common/messaging/connection-error-handler.js.map +1 -1
  66. package/lib/common/messaging/handler.d.ts +2 -2
  67. package/lib/common/messaging/handler.d.ts.map +1 -1
  68. package/lib/common/messaging/proxy-factory.d.ts +13 -7
  69. package/lib/common/messaging/proxy-factory.d.ts.map +1 -1
  70. package/lib/common/messaging/proxy-factory.js +18 -13
  71. package/lib/common/messaging/proxy-factory.js.map +1 -1
  72. package/lib/common/messaging/proxy-factory.spec.js +4 -15
  73. package/lib/common/messaging/proxy-factory.spec.js.map +1 -1
  74. package/lib/common/messaging/web-socket-channel.d.ts +54 -48
  75. package/lib/common/messaging/web-socket-channel.d.ts.map +1 -1
  76. package/lib/common/messaging/web-socket-channel.js +41 -105
  77. package/lib/common/messaging/web-socket-channel.js.map +1 -1
  78. package/lib/electron-browser/messaging/electron-ipc-connection-provider.d.ts +2 -2
  79. package/lib/electron-browser/messaging/electron-ipc-connection-provider.d.ts.map +1 -1
  80. package/lib/electron-browser/messaging/electron-ipc-connection-provider.js +18 -7
  81. package/lib/electron-browser/messaging/electron-ipc-connection-provider.js.map +1 -1
  82. package/lib/electron-browser/messaging/electron-ws-connection-provider.d.ts +2 -2
  83. package/lib/electron-browser/messaging/electron-ws-connection-provider.d.ts.map +1 -1
  84. package/lib/electron-browser/messaging/electron-ws-connection-provider.js +5 -7
  85. package/lib/electron-browser/messaging/electron-ws-connection-provider.js.map +1 -1
  86. package/lib/electron-main/messaging/electron-messaging-contribution.d.ts +37 -9
  87. package/lib/electron-main/messaging/electron-messaging-contribution.d.ts.map +1 -1
  88. package/lib/electron-main/messaging/electron-messaging-contribution.js +83 -68
  89. package/lib/electron-main/messaging/electron-messaging-contribution.js.map +1 -1
  90. package/lib/electron-main/messaging/electron-messaging-service.d.ts +2 -8
  91. package/lib/electron-main/messaging/electron-messaging-service.d.ts.map +1 -1
  92. package/lib/electron-main/messaging/electron-messaging-service.js.map +1 -1
  93. package/lib/electron-main/theia-electron-window.d.ts.map +1 -1
  94. package/lib/electron-main/theia-electron-window.js +11 -8
  95. package/lib/electron-main/theia-electron-window.js.map +1 -1
  96. package/lib/node/messaging/binary-message-pipe.d.ts +45 -0
  97. package/lib/node/messaging/binary-message-pipe.d.ts.map +1 -0
  98. package/lib/node/messaging/binary-message-pipe.js +152 -0
  99. package/lib/node/messaging/binary-message-pipe.js.map +1 -0
  100. package/lib/node/messaging/ipc-bootstrap.js +2 -11
  101. package/lib/node/messaging/ipc-bootstrap.js.map +1 -1
  102. package/lib/node/messaging/ipc-channel.d.ts +26 -0
  103. package/lib/node/messaging/ipc-channel.d.ts.map +1 -0
  104. package/lib/node/messaging/ipc-channel.js +86 -0
  105. package/lib/node/messaging/ipc-channel.js.map +1 -0
  106. package/lib/node/messaging/ipc-connection-provider.d.ts +3 -5
  107. package/lib/node/messaging/ipc-connection-provider.d.ts.map +1 -1
  108. package/lib/node/messaging/ipc-connection-provider.js +14 -31
  109. package/lib/node/messaging/ipc-connection-provider.js.map +1 -1
  110. package/lib/node/messaging/ipc-protocol.d.ts +2 -2
  111. package/lib/node/messaging/ipc-protocol.d.ts.map +1 -1
  112. package/lib/node/messaging/messaging-contribution.d.ts +6 -9
  113. package/lib/node/messaging/messaging-contribution.d.ts.map +1 -1
  114. package/lib/node/messaging/messaging-contribution.js +23 -68
  115. package/lib/node/messaging/messaging-contribution.js.map +1 -1
  116. package/lib/node/messaging/messaging-service.d.ts +4 -23
  117. package/lib/node/messaging/messaging-service.d.ts.map +1 -1
  118. package/lib/node/messaging/messaging-service.js +1 -15
  119. package/lib/node/messaging/messaging-service.js.map +1 -1
  120. package/lib/node/messaging/test/test-web-socket-channel.d.ts +4 -2
  121. package/lib/node/messaging/test/test-web-socket-channel.d.ts.map +1 -1
  122. package/lib/node/messaging/test/test-web-socket-channel.js +25 -12
  123. package/lib/node/messaging/test/test-web-socket-channel.js.map +1 -1
  124. package/package.json +5 -8
  125. package/src/browser/messaging/ws-connection-provider.ts +34 -25
  126. package/src/browser/progress-status-bar-item.ts +1 -1
  127. package/src/browser/style/menus.css +1 -0
  128. package/src/browser/tree/tree-compression/compressed-tree-widget.tsx +2 -2
  129. package/src/browser/widgets/select-component.tsx +37 -17
  130. package/src/common/cancellation.ts +8 -0
  131. package/src/common/index.ts +2 -0
  132. package/src/common/message-rpc/channel.spec.ts +88 -0
  133. package/src/common/message-rpc/channel.ts +260 -0
  134. package/src/{node/messaging/logger.ts → common/message-rpc/index.ts} +4 -23
  135. package/src/common/message-rpc/message-buffer.ts +99 -0
  136. package/src/common/message-rpc/rpc-message-encoder.spec.ts +42 -0
  137. package/src/common/message-rpc/rpc-message-encoder.ts +497 -0
  138. package/src/common/message-rpc/rpc-protocol.ts +217 -0
  139. package/src/common/message-rpc/uint8-array-message-buffer.spec.ts +41 -0
  140. package/src/common/message-rpc/uint8-array-message-buffer.ts +206 -0
  141. package/src/common/messaging/abstract-connection-provider.ts +28 -37
  142. package/src/common/messaging/connection-error-handler.ts +1 -2
  143. package/src/common/messaging/handler.ts +2 -2
  144. package/src/common/messaging/proxy-factory.spec.ts +4 -17
  145. package/src/common/messaging/proxy-factory.ts +27 -16
  146. package/src/common/messaging/web-socket-channel.ts +79 -135
  147. package/src/electron-browser/messaging/electron-ipc-connection-provider.ts +21 -7
  148. package/src/electron-browser/messaging/electron-ws-connection-provider.ts +5 -8
  149. package/src/electron-main/messaging/electron-messaging-contribution.ts +87 -65
  150. package/src/electron-main/messaging/electron-messaging-service.ts +2 -8
  151. package/src/electron-main/theia-electron-window.ts +12 -9
  152. package/src/node/messaging/binary-message-pipe.ts +168 -0
  153. package/src/node/messaging/ipc-bootstrap.ts +3 -11
  154. package/src/node/messaging/ipc-channel.ts +97 -0
  155. package/src/node/messaging/ipc-connection-provider.ts +18 -35
  156. package/src/node/messaging/ipc-protocol.ts +2 -2
  157. package/src/node/messaging/messaging-contribution.ts +29 -74
  158. package/src/node/messaging/messaging-service.ts +4 -31
  159. package/src/node/messaging/test/test-web-socket-channel.ts +26 -17
  160. package/lib/node/messaging/logger.d.ts +0 -8
  161. package/lib/node/messaging/logger.d.ts.map +0 -1
  162. package/lib/node/messaging/logger.js.map +0 -1
  163. package/shared/vscode-ws-jsonrpc/index.d.ts +0 -1
  164. package/shared/vscode-ws-jsonrpc/index.js +0 -1
@@ -0,0 +1,195 @@
1
+ "use strict";
2
+ // *****************************************************************************
3
+ // Copyright (C) 2021 Red Hat, Inc. and others.
4
+ //
5
+ // This program and the accompanying materials are made available under the
6
+ // terms of the Eclipse Public License v. 2.0 which is available at
7
+ // http://www.eclipse.org/legal/epl-2.0.
8
+ //
9
+ // This Source Code may also be made available under the following Secondary
10
+ // Licenses when the conditions for such availability set forth in the Eclipse
11
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
+ // with the GNU Classpath Exception which is available at
13
+ // https://www.gnu.org/software/classpath/license.html.
14
+ //
15
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
16
+ // *****************************************************************************
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.ChannelMultiplexer = exports.MessageTypes = exports.ForwardingChannel = void 0;
19
+ const disposable_1 = require("../disposable");
20
+ const event_1 = require("../event");
21
+ ;
22
+ /**
23
+ * Helper class to implement the single channels on a {@link ChannelMultiplexer}. Simply forwards write requests to
24
+ * the given write buffer source i.e. the main channel of the {@link ChannelMultiplexer}.
25
+ */
26
+ class ForwardingChannel {
27
+ constructor(id, closeHandler, writeBufferSource) {
28
+ this.id = id;
29
+ this.closeHandler = closeHandler;
30
+ this.writeBufferSource = writeBufferSource;
31
+ this.toDispose = new disposable_1.DisposableCollection();
32
+ this.onCloseEmitter = new event_1.Emitter();
33
+ this.onErrorEmitter = new event_1.Emitter();
34
+ this.onMessageEmitter = new event_1.Emitter();
35
+ this.toDispose.pushAll([this.onCloseEmitter, this.onErrorEmitter, this.onMessageEmitter]);
36
+ }
37
+ get onClose() {
38
+ return this.onCloseEmitter.event;
39
+ }
40
+ ;
41
+ get onError() {
42
+ return this.onErrorEmitter.event;
43
+ }
44
+ ;
45
+ get onMessage() {
46
+ return this.onMessageEmitter.event;
47
+ }
48
+ ;
49
+ getWriteBuffer() {
50
+ return this.writeBufferSource();
51
+ }
52
+ close() {
53
+ this.closeHandler();
54
+ this.toDispose.dispose();
55
+ }
56
+ }
57
+ exports.ForwardingChannel = ForwardingChannel;
58
+ /**
59
+ * The different message types used in the messaging protocol of the {@link ChannelMultiplexer}
60
+ */
61
+ var MessageTypes;
62
+ (function (MessageTypes) {
63
+ MessageTypes[MessageTypes["Open"] = 1] = "Open";
64
+ MessageTypes[MessageTypes["Close"] = 2] = "Close";
65
+ MessageTypes[MessageTypes["AckOpen"] = 3] = "AckOpen";
66
+ MessageTypes[MessageTypes["Data"] = 4] = "Data";
67
+ })(MessageTypes = exports.MessageTypes || (exports.MessageTypes = {}));
68
+ /**
69
+ * The write buffers in this implementation immediately write to the underlying
70
+ * channel, so we rely on writers to the multiplexed channels to always commit their
71
+ * messages and always in one go.
72
+ */
73
+ class ChannelMultiplexer {
74
+ constructor(underlyingChannel) {
75
+ this.underlyingChannel = underlyingChannel;
76
+ this.pendingOpen = new Map();
77
+ this.openChannels = new Map();
78
+ this.onOpenChannelEmitter = new event_1.Emitter();
79
+ this.toDispose = new disposable_1.DisposableCollection();
80
+ this.toDispose.pushAll([
81
+ this.underlyingChannel.onMessage(buffer => this.handleMessage(buffer())),
82
+ this.underlyingChannel.onClose(event => this.onUnderlyingChannelClose(event)),
83
+ this.underlyingChannel.onError(error => this.handleError(error)),
84
+ this.onOpenChannelEmitter
85
+ ]);
86
+ }
87
+ get onDidOpenChannel() {
88
+ return this.onOpenChannelEmitter.event;
89
+ }
90
+ handleError(error) {
91
+ this.openChannels.forEach(channel => {
92
+ channel.onErrorEmitter.fire(error);
93
+ });
94
+ }
95
+ onUnderlyingChannelClose(event) {
96
+ if (!this.toDispose.disposed) {
97
+ this.toDispose.push(disposable_1.Disposable.create(() => {
98
+ this.pendingOpen.clear();
99
+ this.openChannels.forEach(channel => {
100
+ channel.onCloseEmitter.fire(event !== null && event !== void 0 ? event : { reason: 'Multiplexer main channel has been closed from the remote side!' });
101
+ });
102
+ this.openChannels.clear();
103
+ }));
104
+ this.dispose();
105
+ }
106
+ }
107
+ handleMessage(buffer) {
108
+ const type = buffer.readUint8();
109
+ const id = buffer.readString();
110
+ switch (type) {
111
+ case MessageTypes.AckOpen: {
112
+ return this.handleAckOpen(id);
113
+ }
114
+ case MessageTypes.Open: {
115
+ return this.handleOpen(id);
116
+ }
117
+ case MessageTypes.Close: {
118
+ return this.handleClose(id);
119
+ }
120
+ case MessageTypes.Data: {
121
+ return this.handleData(id, buffer.sliceAtReadPosition());
122
+ }
123
+ }
124
+ }
125
+ handleAckOpen(id) {
126
+ // edge case: both side try to open a channel at the same time.
127
+ const resolve = this.pendingOpen.get(id);
128
+ if (resolve) {
129
+ const channel = this.createChannel(id);
130
+ this.pendingOpen.delete(id);
131
+ this.openChannels.set(id, channel);
132
+ resolve(channel);
133
+ this.onOpenChannelEmitter.fire({ id, channel });
134
+ }
135
+ }
136
+ handleOpen(id) {
137
+ if (!this.openChannels.has(id)) {
138
+ const channel = this.createChannel(id);
139
+ this.openChannels.set(id, channel);
140
+ const resolve = this.pendingOpen.get(id);
141
+ if (resolve) {
142
+ // edge case: both side try to open a channel at the same time.
143
+ resolve(channel);
144
+ }
145
+ this.underlyingChannel.getWriteBuffer().writeUint8(MessageTypes.AckOpen).writeString(id).commit();
146
+ this.onOpenChannelEmitter.fire({ id, channel });
147
+ }
148
+ }
149
+ handleClose(id) {
150
+ const channel = this.openChannels.get(id);
151
+ if (channel) {
152
+ channel.onCloseEmitter.fire({ reason: 'Channel has been closed from the remote side' });
153
+ this.openChannels.delete(id);
154
+ }
155
+ }
156
+ handleData(id, data) {
157
+ const channel = this.openChannels.get(id);
158
+ if (channel) {
159
+ channel.onMessageEmitter.fire(() => data);
160
+ }
161
+ }
162
+ createChannel(id) {
163
+ return new ForwardingChannel(id, () => this.closeChannel(id), () => this.prepareWriteBuffer(id));
164
+ }
165
+ // Prepare the write buffer for the channel with the give, id. The channel id has to be encoded
166
+ // and written to the buffer before the actual message.
167
+ prepareWriteBuffer(id) {
168
+ const underlying = this.underlyingChannel.getWriteBuffer();
169
+ underlying.writeUint8(MessageTypes.Data);
170
+ underlying.writeString(id);
171
+ return underlying;
172
+ }
173
+ closeChannel(id) {
174
+ this.underlyingChannel.getWriteBuffer()
175
+ .writeUint8(MessageTypes.Close)
176
+ .writeString(id)
177
+ .commit();
178
+ this.openChannels.delete(id);
179
+ }
180
+ open(id) {
181
+ const result = new Promise((resolve, reject) => {
182
+ this.pendingOpen.set(id, resolve);
183
+ });
184
+ this.underlyingChannel.getWriteBuffer().writeUint8(MessageTypes.Open).writeString(id).commit();
185
+ return result;
186
+ }
187
+ getOpenChannel(id) {
188
+ return this.openChannels.get(id);
189
+ }
190
+ dispose() {
191
+ this.toDispose.dispose();
192
+ }
193
+ }
194
+ exports.ChannelMultiplexer = ChannelMultiplexer;
195
+ //# sourceMappingURL=channel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"channel.js","sourceRoot":"","sources":["../../../src/common/message-rpc/channel.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,+CAA+C;AAC/C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,2EAA2E;AAC3E,gFAAgF;;;AAEhF,8CAAiE;AACjE,oCAA0C;AA0CzC,CAAC;AAUF;;;GAGG;AACH,MAAa,iBAAiB;IAG1B,YAAqB,EAAU,EAAqB,YAAwB,EAAqB,iBAAoC;QAAhH,OAAE,GAAF,EAAE,CAAQ;QAAq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 @@
1
+ import { ForwardingChannel } from './channel';
2
+ /**
3
+ * A pipe with two channels at each end for testing.
4
+ */
5
+ export declare class ChannelPipe {
6
+ readonly left: ForwardingChannel;
7
+ readonly right: ForwardingChannel;
8
+ }
9
+ //# sourceMappingURL=channel.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"channel.spec.d.ts","sourceRoot":"","sources":["../../../src/common/message-rpc/channel.spec.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAsB,iBAAiB,EAAmB,MAAM,WAAW,CAAC;AAInF;;GAEG;AACH,qBAAa,WAAW;IACpB,QAAQ,CAAC,IAAI,EAAE,iBAAiB,CAM7B;IACH,QAAQ,CAAC,KAAK,EAAE,iBAAiB,CAM9B;CACN"}
@@ -0,0 +1,80 @@
1
+ "use strict";
2
+ // *****************************************************************************
3
+ // Copyright (C) 2021 Red Hat, Inc. and others.
4
+ //
5
+ // This program and the accompanying materials are made available under the
6
+ // terms of the Eclipse Public License v. 2.0 which is available at
7
+ // http://www.eclipse.org/legal/epl-2.0.
8
+ //
9
+ // This Source Code may also be made available under the following Secondary
10
+ // Licenses when the conditions for such availability set forth in the Eclipse
11
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
+ // with the GNU Classpath Exception which is available at
13
+ // https://www.gnu.org/software/classpath/license.html.
14
+ //
15
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
16
+ // *****************************************************************************
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.ChannelPipe = void 0;
19
+ const chai_1 = require("chai");
20
+ const spies = require("chai-spies");
21
+ const uint8_array_message_buffer_1 = require("./uint8-array-message-buffer");
22
+ const channel_1 = require("./channel");
23
+ (0, chai_1.use)(spies);
24
+ /**
25
+ * A pipe with two channels at each end for testing.
26
+ */
27
+ class ChannelPipe {
28
+ constructor() {
29
+ this.left = new channel_1.ForwardingChannel('left', () => this.right.onCloseEmitter.fire({ reason: 'Left channel has been closed' }), () => {
30
+ const leftWrite = new uint8_array_message_buffer_1.Uint8ArrayWriteBuffer();
31
+ leftWrite.onCommit(buffer => {
32
+ this.right.onMessageEmitter.fire(() => new uint8_array_message_buffer_1.Uint8ArrayReadBuffer(buffer));
33
+ });
34
+ return leftWrite;
35
+ });
36
+ this.right = new channel_1.ForwardingChannel('right', () => this.left.onCloseEmitter.fire({ reason: 'Right channel has been closed' }), () => {
37
+ const rightWrite = new uint8_array_message_buffer_1.Uint8ArrayWriteBuffer();
38
+ rightWrite.onCommit(buffer => {
39
+ this.left.onMessageEmitter.fire(() => new uint8_array_message_buffer_1.Uint8ArrayReadBuffer(buffer));
40
+ });
41
+ return rightWrite;
42
+ });
43
+ }
44
+ }
45
+ exports.ChannelPipe = ChannelPipe;
46
+ describe('Message Channel', () => {
47
+ describe('Channel multiplexer', () => {
48
+ it('should forward messages to intended target channel', async () => {
49
+ const pipe = new ChannelPipe();
50
+ const leftMultiplexer = new channel_1.ChannelMultiplexer(pipe.left);
51
+ const rightMultiplexer = new channel_1.ChannelMultiplexer(pipe.right);
52
+ const openChannelSpy = (0, chai_1.spy)(() => {
53
+ });
54
+ rightMultiplexer.onDidOpenChannel(openChannelSpy);
55
+ leftMultiplexer.onDidOpenChannel(openChannelSpy);
56
+ const leftFirst = await leftMultiplexer.open('first');
57
+ const leftSecond = await leftMultiplexer.open('second');
58
+ const rightFirst = rightMultiplexer.getOpenChannel('first');
59
+ const rightSecond = rightMultiplexer.getOpenChannel('second');
60
+ chai_1.assert.isNotNull(rightFirst);
61
+ chai_1.assert.isNotNull(rightSecond);
62
+ const leftSecondSpy = (0, chai_1.spy)((buf) => {
63
+ const message = buf().readString();
64
+ (0, chai_1.expect)(message).equal('message for second');
65
+ });
66
+ leftSecond.onMessage(leftSecondSpy);
67
+ const rightFirstSpy = (0, chai_1.spy)((buf) => {
68
+ const message = buf().readString();
69
+ (0, chai_1.expect)(message).equal('message for first');
70
+ });
71
+ rightFirst.onMessage(rightFirstSpy);
72
+ leftFirst.getWriteBuffer().writeString('message for first').commit();
73
+ rightSecond.getWriteBuffer().writeString('message for second').commit();
74
+ (0, chai_1.expect)(leftSecondSpy).to.be.called();
75
+ (0, chai_1.expect)(rightFirstSpy).to.be.called();
76
+ (0, chai_1.expect)(openChannelSpy).to.be.called.exactly(4);
77
+ });
78
+ });
79
+ });
80
+ //# sourceMappingURL=channel.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"channel.spec.js","sourceRoot":"","sources":["../../../src/common/message-rpc/channel.spec.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,+CAA+C;AAC/C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,2EAA2E;AAC3E,gFAAgF;;;AAEhF,+BAAgD;AAChD,oCAAoC;AACpC,6EAA2F;AAC3F,uCAAmF;AAEnF,IAAA,UAAG,EAAC,KAAK,CAAC,CAAC;AAEX;;GAEG;AACH,MAAa,WAAW;IAAxB;QACa,SAAI,GAAsB,IAAI,2BAAiB,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,8BAA8B,EAAE,CAAC,EAAE,GAAG,EAAE;YACpJ,MAAM,SAAS,GAAG,IAAI,kDAAqB,EAAE,CAAC;YAC9C,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;gBACxB,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,iDAAoB,CAAC,MAAM,CAAC,CAAC,CAAC;YAC7E,CAAC,CAAC,CAAC;YACH,OAAO,SAAS,CAAC;QACrB,CAAC,CAAC,CAAC;QACM,UAAK,GAAsB,IAAI,2BAAiB,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,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tocol, RpcProtocolOptions } from './rpc-protocol';
2
+ export { Channel, ChannelCloseEvent, MessageProvider } from './channel';
3
+ export { ReadBuffer, WriteBuffer } from './message-buffer';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/common/message-rpc/index.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACjF,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC"}
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RpcProtocol = void 0;
2
4
  // *****************************************************************************
3
- // Copyright (C) 2017 TypeFox and others.
5
+ // Copyright (C) 2022 STMicroelectronics and others.
4
6
  //
5
7
  // This program and the accompanying materials are made available under the
6
8
  // terms of the Eclipse Public License v. 2.0 which is available at
@@ -14,21 +16,6 @@
14
16
  //
15
17
  // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
16
18
  // *****************************************************************************
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.ConsoleLogger = void 0;
19
- class ConsoleLogger {
20
- error(message) {
21
- console.log(message);
22
- }
23
- warn(message) {
24
- console.log(message);
25
- }
26
- info(message) {
27
- console.log(message);
28
- }
29
- log(message) {
30
- console.log(message);
31
- }
32
- }
33
- exports.ConsoleLogger = ConsoleLogger;
34
- //# sourceMappingURL=logger.js.map
19
+ var rpc_protocol_1 = require("./rpc-protocol");
20
+ Object.defineProperty(exports, "RpcProtocol", { enumerable: true, get: function () { return rpc_protocol_1.RpcProtocol; } });
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/common/message-rpc/index.ts"],"names":[],"mappings":";;;AAAA,gFAAgF;AAChF,oDAAoD;AACpD,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,2EAA2E;AAC3E,gFAAgF;AAChF,+CAAiF;AAAxD,2GAAA,WAAW,OAAA"}
@@ -0,0 +1,50 @@
1
+ /**
2
+ * A buffer maintaining a write position capable of writing primitive values
3
+ */
4
+ export interface WriteBuffer {
5
+ writeUint8(byte: number): this;
6
+ writeUint16(value: number): this;
7
+ writeUint32(value: number): this;
8
+ writeString(value: string): this;
9
+ writeBytes(value: Uint8Array): this;
10
+ writeNumber(value: number): this;
11
+ writeLength(value: number): this;
12
+ /**
13
+ * Makes any writes to the buffer permanent, for example by sending the writes over a channel.
14
+ * You must obtain a new write buffer after committing
15
+ */
16
+ commit(): void;
17
+ }
18
+ export declare class ForwardingWriteBuffer implements WriteBuffer {
19
+ protected readonly underlying: WriteBuffer;
20
+ constructor(underlying: WriteBuffer);
21
+ writeUint8(byte: number): this;
22
+ writeUint16(value: number): this;
23
+ writeUint32(value: number): this;
24
+ writeLength(value: number): this;
25
+ writeString(value: string): this;
26
+ writeBytes(value: Uint8Array): this;
27
+ writeNumber(value: number): this;
28
+ commit(): void;
29
+ }
30
+ /**
31
+ * A buffer maintaining a read position in a buffer containing a received message capable of
32
+ * reading primitive values.
33
+ */
34
+ export interface ReadBuffer {
35
+ readUint8(): number;
36
+ readUint16(): number;
37
+ readUint32(): number;
38
+ readString(): string;
39
+ readNumber(): number;
40
+ readLength(): number;
41
+ readBytes(): Uint8Array;
42
+ /**
43
+ * Returns a new read buffer whose starting read position is the current read position of this buffer.
44
+ * This is useful to create read buffers sub messages.
45
+ * (e.g. when using a multiplexer the beginning of the message might contain some protocol overhead which should not be part
46
+ * of the message reader that is sent to the target channel)
47
+ */
48
+ sliceAtReadPosition(): ReadBuffer;
49
+ }
50
+ //# sourceMappingURL=message-buffer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"message-buffer.d.ts","sourceRoot":"","sources":["../../../src/common/message-rpc/message-buffer.ts"],"names":[],"mappings":"AAgBA;;GAEG;AACH,MAAM,WAAW,WAAW;IACxB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IAChC,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IAChC,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IAChC,UAAU,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,CAAA;IACnC,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IAChC,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IAChC;;;OAGG;IACH,MAAM,IAAI,IAAI,CAAC;CAClB;AAED,qBAAa,qBAAsB,YAAW,WAAW;IACzC,SAAS,CAAC,QAAQ,CAAC,UAAU,EAAE,WAAW;gBAAvB,UAAU,EAAE,WAAW;IAGtD,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAK9B,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAKhC,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAKhC,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAKhC,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAKhC,UAAU,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;IAKnC,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAKhC,MAAM,IAAI,IAAI;CAGjB;AAED;;;GAGG;AACH,MAAM,WAAW,UAAU;IACvB,SAAS,IAAI,MAAM,CAAC;IACpB,UAAU,IAAI,MAAM,CAAC;IACrB,UAAU,IAAI,MAAM,CAAC;IACrB,UAAU,IAAI,MAAM,CAAC;IACrB,UAAU,IAAI,MAAM,CAAC;IACrB,UAAU,IAAI,MAAM,CAAC;IACrB,SAAS,IAAI,UAAU,CAAC;IAExB;;;;;OAKG;IACH,mBAAmB,IAAI,UAAU,CAAA;CACpC"}
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ // *****************************************************************************
3
+ // Copyright (C) 2021 Red Hat, Inc. and others.
4
+ //
5
+ // This program and the accompanying materials are made available under the
6
+ // terms of the Eclipse Public License v. 2.0 which is available at
7
+ // http://www.eclipse.org/legal/epl-2.0.
8
+ //
9
+ // This Source Code may also be made available under the following Secondary
10
+ // Licenses when the conditions for such availability set forth in the Eclipse
11
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
+ // with the GNU Classpath Exception which is available at
13
+ // https://www.gnu.org/software/classpath/license.html.
14
+ //
15
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
16
+ // *****************************************************************************
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.ForwardingWriteBuffer = void 0;
19
+ class ForwardingWriteBuffer {
20
+ constructor(underlying) {
21
+ this.underlying = underlying;
22
+ }
23
+ writeUint8(byte) {
24
+ this.underlying.writeUint8(byte);
25
+ return this;
26
+ }
27
+ writeUint16(value) {
28
+ this.underlying.writeUint16(value);
29
+ return this;
30
+ }
31
+ writeUint32(value) {
32
+ this.underlying.writeUint32(value);
33
+ return this;
34
+ }
35
+ writeLength(value) {
36
+ this.underlying.writeLength(value);
37
+ return this;
38
+ }
39
+ writeString(value) {
40
+ this.underlying.writeString(value);
41
+ return this;
42
+ }
43
+ writeBytes(value) {
44
+ this.underlying.writeBytes(value);
45
+ return this;
46
+ }
47
+ writeNumber(value) {
48
+ this.underlying.writeNumber(value);
49
+ return this;
50
+ }
51
+ commit() {
52
+ this.underlying.commit();
53
+ }
54
+ }
55
+ exports.ForwardingWriteBuffer = ForwardingWriteBuffer;
56
+ //# sourceMappingURL=message-buffer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"message-buffer.js","sourceRoot":"","sources":["../../../src/common/message-rpc/message-buffer.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,+CAA+C;AAC/C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,2EAA2E;AAC3E,gFAAgF;;;AAoBhF,MAAa,qBAAqB;IAC9B,YAA+B,UAAuB;QAAvB,eAAU,GAAV,UAAU,CAAa;IACtD,CAAC;IAED,UAAU,CAAC,IAAY;QACnB,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QACjC,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,WAAW,CAAC,KAAa;QACrB,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QACnC,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,WAAW,CAAC,KAAa;QACrB,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QACnC,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,WAAW,CAAC,KAAa;QACrB,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QACnC,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,WAAW,CAAC,KAAa;QACrB,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QACnC,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,UAAU,CAAC,KAAiB;QACxB,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QAClC,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,WAAW,CAAC,KAAa;QACrB,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QACnC,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,MAAM;QACF,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC;IAC7B,CAAC;CACJ;AA1CD,sDA0CC"}
@@ -0,0 +1,159 @@
1
+ import { ReadBuffer, WriteBuffer } from './message-buffer';
2
+ /**
3
+ * This code lets you encode rpc protocol messages (request/reply/notification/error/cancel)
4
+ * into a channel write buffer and decode the same messages from a read buffer.
5
+ * Custom encoders/decoders can be registered to specially handling certain types of values
6
+ * to be encoded. Clients are responsible for ensuring that the set of tags for encoders
7
+ * is distinct and the same at both ends of a channel.
8
+ */
9
+ export declare type RpcMessage = RequestMessage | ReplyMessage | ReplyErrMessage | CancelMessage | NotificationMessage;
10
+ export declare const enum RpcMessageType {
11
+ Request = 1,
12
+ Notification = 2,
13
+ Reply = 3,
14
+ ReplyErr = 4,
15
+ Cancel = 5
16
+ }
17
+ export interface CancelMessage {
18
+ type: RpcMessageType.Cancel;
19
+ id: number;
20
+ }
21
+ export interface RequestMessage {
22
+ type: RpcMessageType.Request;
23
+ id: number;
24
+ method: string;
25
+ args: any[];
26
+ }
27
+ export interface NotificationMessage {
28
+ type: RpcMessageType.Notification;
29
+ id: number;
30
+ method: string;
31
+ args: any[];
32
+ }
33
+ export interface ReplyMessage {
34
+ type: RpcMessageType.Reply;
35
+ id: number;
36
+ res: any;
37
+ }
38
+ export interface ReplyErrMessage {
39
+ type: RpcMessageType.ReplyErr;
40
+ id: number;
41
+ err: any;
42
+ }
43
+ export interface SerializedError {
44
+ readonly $isError: true;
45
+ readonly name: string;
46
+ readonly message: string;
47
+ readonly stack: string;
48
+ }
49
+ /**
50
+ * A special error that can be returned in case a request
51
+ * has failed. Provides additional information i.e. an error code
52
+ * and additional error data.
53
+ */
54
+ export declare class ResponseError extends Error {
55
+ readonly code: number;
56
+ readonly data: any;
57
+ constructor(code: number, message: string, data: any);
58
+ }
59
+ /**
60
+ * The tag values for the default {@link ValueEncoder}s & {@link ValueDecoder}s
61
+ */
62
+ export declare enum ObjectType {
63
+ JSON = 0,
64
+ ByteArray = 1,
65
+ ObjectArray = 2,
66
+ Undefined = 3,
67
+ Object = 4,
68
+ String = 5,
69
+ Boolean = 6,
70
+ Number = 7,
71
+ ResponseError = 8,
72
+ Error = 9
73
+ }
74
+ /**
75
+ * A value encoder writes javascript values to a write buffer. Encoders will be asked
76
+ * in turn (ordered by their tag value, descending) whether they can encode a given value
77
+ * This means encoders with higher tag values have priority. Since the default encoders
78
+ * have tag values from 1-7, they can be easily overridden.
79
+ */
80
+ export interface ValueEncoder {
81
+ /**
82
+ * Returns true if this encoder wants to encode this value.
83
+ * @param value the value to be encoded
84
+ */
85
+ is(value: any): boolean;
86
+ /**
87
+ * Write the given value to the buffer. Will only be called if {@link is(value)} returns true.
88
+ * @param buf The buffer to write to
89
+ * @param value The value to be written
90
+ * @param recursiveEncode A function that will use the encoders registered on the {@link MessageEncoder}
91
+ * to write a value to the underlying buffer. This is used mostly to write structures like an array
92
+ * without having to know how to encode the values in the array
93
+ */
94
+ write(buf: WriteBuffer, value: any, recursiveEncode?: (buf: WriteBuffer, value: any) => void): void;
95
+ }
96
+ /**
97
+ * Reads javascript values from a read buffer
98
+ */
99
+ export interface ValueDecoder {
100
+ /**
101
+ * Reads a value from a read buffer. This method will be called for the decoder that is
102
+ * registered for the tag associated with the value encoder that encoded this value.
103
+ * @param buf The read buffer to read from
104
+ * @param recursiveDecode A function that will use the decoders registered on the {@link RpcMessageDecoder}
105
+ * to read values from the underlying read buffer. This is used mostly to decode structures like an array
106
+ * without having to know how to decode the values in the array.
107
+ */
108
+ read(buf: ReadBuffer, recursiveDecode: (buf: ReadBuffer) => unknown): unknown;
109
+ }
110
+ /**
111
+ * A `RpcMessageDecoder` parses a a binary message received via {@link ReadBuffer} into a {@link RpcMessage}
112
+ */
113
+ export declare class RpcMessageDecoder {
114
+ protected decoders: Map<number, ValueDecoder>;
115
+ constructor();
116
+ /**
117
+ * Registers a new {@link ValueDecoder} for the given tag.
118
+ * After the successful registration the {@link tagIntType} is recomputed
119
+ * by retrieving the highest tag value and calculating the required Uint size to store it.
120
+ * @param tag the tag for which the decoder should be registered.
121
+ * @param decoder the decoder that should be registered.
122
+ */
123
+ registerDecoder(tag: number, decoder: ValueDecoder): void;
124
+ parse(buf: ReadBuffer): RpcMessage;
125
+ protected parseCancel(msg: ReadBuffer): CancelMessage;
126
+ protected parseRequest(msg: ReadBuffer): RequestMessage;
127
+ protected parseNotification(msg: ReadBuffer): NotificationMessage;
128
+ parseReply(msg: ReadBuffer): ReplyMessage;
129
+ parseReplyErr(msg: ReadBuffer): ReplyErrMessage;
130
+ readArray(buf: ReadBuffer): any[];
131
+ readTypedValue(buf: ReadBuffer): any;
132
+ }
133
+ /**
134
+ * A `RpcMessageEncoder` writes {@link RpcMessage} objects to a {@link WriteBuffer}. Note that it is
135
+ * up to clients to commit the message. This allows for multiple messages being
136
+ * encoded before sending.
137
+ */
138
+ export declare class RpcMessageEncoder {
139
+ protected readonly encoders: [number, ValueEncoder][];
140
+ protected readonly registeredTags: Set<number>;
141
+ constructor();
142
+ protected registerEncoders(): void;
143
+ /**
144
+ * Registers a new {@link ValueEncoder} for the given tag.
145
+ * After the successful registration the {@link tagIntType} is recomputed
146
+ * by retrieving the highest tag value and calculating the required Uint size to store it.
147
+ * @param tag the tag for which the encoder should be registered.
148
+ * @param decoder the encoder that should be registered.
149
+ */
150
+ registerEncoder<T>(tag: number, encoder: ValueEncoder): void;
151
+ cancel(buf: WriteBuffer, requestId: number): void;
152
+ notification(buf: WriteBuffer, requestId: number, method: string, args: any[]): void;
153
+ request(buf: WriteBuffer, requestId: number, method: string, args: any[]): void;
154
+ replyOK(buf: WriteBuffer, requestId: number, res: any): void;
155
+ replyErr(buf: WriteBuffer, requestId: number, err: any): void;
156
+ writeTypedValue(buf: WriteBuffer, value: any): void;
157
+ writeArray(buf: WriteBuffer, value: any[]): void;
158
+ }
159
+ //# sourceMappingURL=rpc-message-encoder.d.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