@opensumi/ide-connection 3.0.4-next-1716970216.0 → 3.0.4-next-1717045696.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.
- package/lib/browser/ws-channel-handler.d.ts +1 -10
- package/lib/browser/ws-channel-handler.d.ts.map +1 -1
- package/lib/browser/ws-channel-handler.js +22 -11
- package/lib/browser/ws-channel-handler.js.map +1 -1
- package/lib/common/connection/drivers/simple.d.ts +7 -7
- package/lib/common/connection/drivers/simple.d.ts.map +1 -1
- package/lib/common/connection/drivers/simple.js.map +1 -1
- package/lib/common/index.d.ts +0 -4
- package/lib/common/index.d.ts.map +1 -1
- package/lib/common/index.js +0 -4
- package/lib/common/index.js.map +1 -1
- package/lib/common/rpc/connection.d.ts +3 -4
- package/lib/common/rpc/connection.d.ts.map +1 -1
- package/lib/common/rpc/connection.js +30 -14
- package/lib/common/rpc/connection.js.map +1 -1
- package/lib/common/rpc/message-io.d.ts +11 -54
- package/lib/common/rpc/message-io.d.ts.map +1 -1
- package/lib/common/rpc/message-io.js +10 -63
- package/lib/common/rpc/message-io.js.map +1 -1
- package/lib/common/rpc/multiplexer.d.ts +0 -2
- package/lib/common/rpc/multiplexer.d.ts.map +1 -1
- package/lib/common/rpc/multiplexer.js +2 -6
- package/lib/common/rpc/multiplexer.js.map +1 -1
- package/lib/common/rpc-service/index.d.ts +0 -1
- package/lib/common/rpc-service/index.d.ts.map +1 -1
- package/lib/common/rpc-service/index.js +0 -1
- package/lib/common/rpc-service/index.js.map +1 -1
- package/lib/common/rpc-service/registry.d.ts +2 -2
- package/lib/common/rpc-service/registry.d.ts.map +1 -1
- package/lib/common/rpc-service/registry.js +0 -6
- package/lib/common/rpc-service/registry.js.map +1 -1
- package/lib/common/server-handler.d.ts +1 -7
- package/lib/common/server-handler.d.ts.map +1 -1
- package/lib/common/server-handler.js +11 -13
- package/lib/common/server-handler.js.map +1 -1
- package/lib/common/ws-channel.d.ts +201 -11
- package/lib/common/ws-channel.d.ts.map +1 -1
- package/lib/common/ws-channel.js +85 -49
- package/lib/common/ws-channel.js.map +1 -1
- package/package.json +5 -5
- package/src/browser/ws-channel-handler.ts +26 -29
- package/src/common/connection/drivers/simple.ts +5 -5
- package/src/common/index.ts +0 -4
- package/src/common/rpc/connection.ts +36 -19
- package/src/common/rpc/message-io.ts +10 -123
- package/src/common/rpc/multiplexer.ts +3 -12
- package/src/common/rpc-service/index.ts +0 -1
- package/src/common/rpc-service/registry.ts +2 -10
- package/src/common/server-handler.ts +26 -24
- package/src/common/ws-channel.ts +207 -72
- package/lib/common/channel/index.d.ts +0 -2
- package/lib/common/channel/index.d.ts.map +0 -1
- package/lib/common/channel/index.js +0 -5
- package/lib/common/channel/index.js.map +0 -1
- package/lib/common/channel/types.d.ts +0 -66
- package/lib/common/channel/types.d.ts.map +0 -1
- package/lib/common/channel/types.js +0 -8
- package/lib/common/channel/types.js.map +0 -1
- package/lib/common/serializer/fury.d.ts +0 -122
- package/lib/common/serializer/fury.d.ts.map +0 -1
- package/lib/common/serializer/fury.js +0 -51
- package/lib/common/serializer/fury.js.map +0 -1
- package/lib/common/serializer/index.d.ts +0 -6
- package/lib/common/serializer/index.d.ts.map +0 -1
- package/lib/common/serializer/index.js +0 -21
- package/lib/common/serializer/index.js.map +0 -1
- package/lib/common/serializer/raw.d.ts +0 -4
- package/lib/common/serializer/raw.d.ts.map +0 -1
- package/lib/common/serializer/raw.js +0 -8
- package/lib/common/serializer/raw.js.map +0 -1
- package/lib/common/serializer/types.d.ts +0 -5
- package/lib/common/serializer/types.d.ts.map +0 -1
- package/lib/common/serializer/types.js +0 -3
- package/lib/common/serializer/types.js.map +0 -1
- package/src/common/channel/index.ts +0 -1
- package/src/common/channel/types.ts +0 -82
- package/src/common/serializer/fury.ts +0 -61
- package/src/common/serializer/index.ts +0 -23
- package/src/common/serializer/raw.ts +0 -8
- package/src/common/serializer/types.ts +0 -4
|
@@ -1,10 +1,45 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { EventEmitter } from '@opensumi/events';
|
|
3
3
|
import { DisposableStore, EventQueue, StateTracer } from '@opensumi/ide-core-common';
|
|
4
|
-
import { ChannelMessage } from './channel/types';
|
|
5
4
|
import { IConnectionShape } from './connection/types';
|
|
6
5
|
import { ISumiConnectionOptions, SumiConnection } from './rpc/connection';
|
|
7
6
|
import { ILogger } from './types';
|
|
7
|
+
/**
|
|
8
|
+
* `ping` and `pong` are used to detect whether the connection is alive.
|
|
9
|
+
*/
|
|
10
|
+
export interface PingMessage {
|
|
11
|
+
kind: 'ping';
|
|
12
|
+
id: string;
|
|
13
|
+
clientId: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* when server receive a `ping` message, it should reply a `pong` message, vice versa.
|
|
17
|
+
*/
|
|
18
|
+
export interface PongMessage {
|
|
19
|
+
kind: 'pong';
|
|
20
|
+
id: string;
|
|
21
|
+
clientId: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* `data` message indicate that the channel has received some data.
|
|
25
|
+
* the `content` field is the data, it should be a string.
|
|
26
|
+
*/
|
|
27
|
+
export interface DataMessage {
|
|
28
|
+
kind: 'data';
|
|
29
|
+
id: string;
|
|
30
|
+
content: string;
|
|
31
|
+
}
|
|
32
|
+
export interface BinaryMessage {
|
|
33
|
+
kind: 'binary';
|
|
34
|
+
id: string;
|
|
35
|
+
binary: Uint8Array;
|
|
36
|
+
}
|
|
37
|
+
export interface CloseMessage {
|
|
38
|
+
kind: 'close';
|
|
39
|
+
id: string;
|
|
40
|
+
code: number;
|
|
41
|
+
reason: string;
|
|
42
|
+
}
|
|
8
43
|
export interface IWSChannelCreateOptions {
|
|
9
44
|
/**
|
|
10
45
|
* every channel's unique id, it only used in client to server architecture.
|
|
@@ -15,7 +50,7 @@ export interface IWSChannelCreateOptions {
|
|
|
15
50
|
ensureServerReady?: boolean;
|
|
16
51
|
}
|
|
17
52
|
export declare class WSChannel {
|
|
18
|
-
connection: IConnectionShape<
|
|
53
|
+
connection: IConnectionShape<Uint8Array>;
|
|
19
54
|
protected _disposables: DisposableStore;
|
|
20
55
|
protected emitter: EventEmitter<{
|
|
21
56
|
message: [data: string];
|
|
@@ -25,17 +60,15 @@ export declare class WSChannel {
|
|
|
25
60
|
binary: [data: Uint8Array];
|
|
26
61
|
}>;
|
|
27
62
|
protected onBinaryQueue: EventQueue<Uint8Array>;
|
|
28
|
-
protected sendQueue:
|
|
63
|
+
protected sendQueue: Uint8Array[];
|
|
29
64
|
protected _isServerReady: boolean;
|
|
30
65
|
protected _ensureServerReady: boolean | undefined;
|
|
31
66
|
id: string;
|
|
32
67
|
channelPath: string;
|
|
33
|
-
clientId: string;
|
|
34
|
-
protected LOG_TAG: string;
|
|
35
68
|
logger: ILogger;
|
|
36
69
|
static forClient(connection: IConnectionShape<Uint8Array>, options: IWSChannelCreateOptions): WSChannel;
|
|
37
|
-
constructor(connection: IConnectionShape<
|
|
38
|
-
protected inqueue(data:
|
|
70
|
+
constructor(connection: IConnectionShape<Uint8Array>, options: IWSChannelCreateOptions);
|
|
71
|
+
protected inqueue(data: Uint8Array): void;
|
|
39
72
|
onMessage(cb: (data: string) => any): import("@opensumi/events").IDisposable;
|
|
40
73
|
onBinary(cb: (data: Uint8Array) => any): import("@opensumi/ide-core-common").IDisposable;
|
|
41
74
|
onOpen(cb: (id: string) => void): import("@opensumi/events").IDisposable;
|
|
@@ -68,9 +101,7 @@ export declare class WSChannel {
|
|
|
68
101
|
dispose(): void;
|
|
69
102
|
};
|
|
70
103
|
createSumiConnection(options?: ISumiConnectionOptions): SumiConnection;
|
|
71
|
-
listen(): import("@opensumi/ide-core-common").IDisposable;
|
|
72
104
|
dispose(): void;
|
|
73
|
-
ping(): void;
|
|
74
105
|
}
|
|
75
106
|
interface IWSServerChannelCreateOptions extends IWSChannelCreateOptions {
|
|
76
107
|
clientId: string;
|
|
@@ -79,12 +110,171 @@ interface IWSServerChannelCreateOptions extends IWSChannelCreateOptions {
|
|
|
79
110
|
* The server side channel, it will send a `server-ready` message after it receive a `open` message.
|
|
80
111
|
*/
|
|
81
112
|
export declare class WSServerChannel extends WSChannel {
|
|
82
|
-
connection: IConnectionShape<
|
|
113
|
+
connection: IConnectionShape<Uint8Array>;
|
|
83
114
|
messageQueue: ChannelMessage[];
|
|
84
115
|
clientId: string;
|
|
85
|
-
constructor(connection: IConnectionShape<
|
|
116
|
+
constructor(connection: IConnectionShape<Uint8Array>, options: IWSServerChannelCreateOptions);
|
|
86
117
|
serverReady(token: string): void;
|
|
87
118
|
dispatch(msg: ChannelMessage): void;
|
|
88
119
|
}
|
|
120
|
+
export type ChannelMessage = PingMessage | PongMessage | OpenMessage | ServerReadyMessage | DataMessage | BinaryMessage | CloseMessage | ErrorMessage;
|
|
121
|
+
export declare const PingProtocol: {
|
|
122
|
+
type: import("@furyjs/fury").InternalSerializerType.FURY_TYPE_TAG;
|
|
123
|
+
options: {
|
|
124
|
+
tag: string;
|
|
125
|
+
props: {
|
|
126
|
+
clientId: {
|
|
127
|
+
type: import("@furyjs/fury").InternalSerializerType.STRING;
|
|
128
|
+
};
|
|
129
|
+
id: {
|
|
130
|
+
type: import("@furyjs/fury").InternalSerializerType.STRING;
|
|
131
|
+
};
|
|
132
|
+
} | undefined;
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
export declare const PongProtocol: {
|
|
136
|
+
type: import("@furyjs/fury").InternalSerializerType.FURY_TYPE_TAG;
|
|
137
|
+
options: {
|
|
138
|
+
tag: string;
|
|
139
|
+
props: {
|
|
140
|
+
clientId: {
|
|
141
|
+
type: import("@furyjs/fury").InternalSerializerType.STRING;
|
|
142
|
+
};
|
|
143
|
+
id: {
|
|
144
|
+
type: import("@furyjs/fury").InternalSerializerType.STRING;
|
|
145
|
+
};
|
|
146
|
+
} | undefined;
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
/**
|
|
150
|
+
* `open` message is used to open a new channel.
|
|
151
|
+
* `path` is used to identify which handler should be used to handle the channel.
|
|
152
|
+
* `clientId` is used to identify the client.
|
|
153
|
+
*/
|
|
154
|
+
export interface OpenMessage {
|
|
155
|
+
kind: 'open';
|
|
156
|
+
id: string;
|
|
157
|
+
path: string;
|
|
158
|
+
clientId: string;
|
|
159
|
+
connectionToken: string;
|
|
160
|
+
}
|
|
161
|
+
export declare const OpenProtocol: {
|
|
162
|
+
type: import("@furyjs/fury").InternalSerializerType.FURY_TYPE_TAG;
|
|
163
|
+
options: {
|
|
164
|
+
tag: string;
|
|
165
|
+
props: {
|
|
166
|
+
clientId: {
|
|
167
|
+
type: import("@furyjs/fury").InternalSerializerType.STRING;
|
|
168
|
+
};
|
|
169
|
+
id: {
|
|
170
|
+
type: import("@furyjs/fury").InternalSerializerType.STRING;
|
|
171
|
+
};
|
|
172
|
+
path: {
|
|
173
|
+
type: import("@furyjs/fury").InternalSerializerType.STRING;
|
|
174
|
+
};
|
|
175
|
+
connectionToken: {
|
|
176
|
+
type: import("@furyjs/fury").InternalSerializerType.STRING;
|
|
177
|
+
};
|
|
178
|
+
} | undefined;
|
|
179
|
+
};
|
|
180
|
+
};
|
|
181
|
+
/**
|
|
182
|
+
* when server receive a `open` message, it should reply a `server-ready` message.
|
|
183
|
+
* this is indicate that the channel is ready to use.
|
|
184
|
+
*/
|
|
185
|
+
export interface ServerReadyMessage {
|
|
186
|
+
kind: 'server-ready';
|
|
187
|
+
id: string;
|
|
188
|
+
token: string;
|
|
189
|
+
}
|
|
190
|
+
export declare const ServerReadyProtocol: {
|
|
191
|
+
type: import("@furyjs/fury").InternalSerializerType.FURY_TYPE_TAG;
|
|
192
|
+
options: {
|
|
193
|
+
tag: string;
|
|
194
|
+
props: {
|
|
195
|
+
id: {
|
|
196
|
+
type: import("@furyjs/fury").InternalSerializerType.STRING;
|
|
197
|
+
};
|
|
198
|
+
token: {
|
|
199
|
+
type: import("@furyjs/fury").InternalSerializerType.STRING;
|
|
200
|
+
};
|
|
201
|
+
} | undefined;
|
|
202
|
+
};
|
|
203
|
+
};
|
|
204
|
+
export declare enum ErrorMessageCode {
|
|
205
|
+
ChannelNotFound = 1
|
|
206
|
+
}
|
|
207
|
+
export interface ErrorMessage {
|
|
208
|
+
kind: 'error';
|
|
209
|
+
id: string;
|
|
210
|
+
code: ErrorMessageCode;
|
|
211
|
+
message: string;
|
|
212
|
+
}
|
|
213
|
+
export declare const ErrorProtocol: {
|
|
214
|
+
type: import("@furyjs/fury").InternalSerializerType.FURY_TYPE_TAG;
|
|
215
|
+
options: {
|
|
216
|
+
tag: string;
|
|
217
|
+
props: {
|
|
218
|
+
id: {
|
|
219
|
+
type: import("@furyjs/fury").InternalSerializerType.STRING;
|
|
220
|
+
};
|
|
221
|
+
code: {
|
|
222
|
+
type: import("@furyjs/fury").InternalSerializerType.UINT16;
|
|
223
|
+
};
|
|
224
|
+
message: {
|
|
225
|
+
type: import("@furyjs/fury").InternalSerializerType.STRING;
|
|
226
|
+
};
|
|
227
|
+
} | undefined;
|
|
228
|
+
};
|
|
229
|
+
};
|
|
230
|
+
export declare const DataProtocol: {
|
|
231
|
+
type: import("@furyjs/fury").InternalSerializerType.FURY_TYPE_TAG;
|
|
232
|
+
options: {
|
|
233
|
+
tag: string;
|
|
234
|
+
props: {
|
|
235
|
+
id: {
|
|
236
|
+
type: import("@furyjs/fury").InternalSerializerType.STRING;
|
|
237
|
+
};
|
|
238
|
+
content: {
|
|
239
|
+
type: import("@furyjs/fury").InternalSerializerType.STRING;
|
|
240
|
+
};
|
|
241
|
+
} | undefined;
|
|
242
|
+
};
|
|
243
|
+
};
|
|
244
|
+
export declare const BinaryProtocol: {
|
|
245
|
+
type: import("@furyjs/fury").InternalSerializerType.FURY_TYPE_TAG;
|
|
246
|
+
options: {
|
|
247
|
+
tag: string;
|
|
248
|
+
props: {
|
|
249
|
+
id: {
|
|
250
|
+
type: import("@furyjs/fury").InternalSerializerType.STRING;
|
|
251
|
+
};
|
|
252
|
+
binary: {
|
|
253
|
+
type: import("@furyjs/fury").InternalSerializerType.BINARY;
|
|
254
|
+
};
|
|
255
|
+
} | undefined;
|
|
256
|
+
};
|
|
257
|
+
};
|
|
258
|
+
export declare const CloseProtocol: {
|
|
259
|
+
type: import("@furyjs/fury").InternalSerializerType.FURY_TYPE_TAG;
|
|
260
|
+
options: {
|
|
261
|
+
tag: string;
|
|
262
|
+
props: {
|
|
263
|
+
id: {
|
|
264
|
+
type: import("@furyjs/fury").InternalSerializerType.STRING;
|
|
265
|
+
};
|
|
266
|
+
code: {
|
|
267
|
+
type: import("@furyjs/fury").InternalSerializerType.UINT32;
|
|
268
|
+
};
|
|
269
|
+
reason: {
|
|
270
|
+
type: import("@furyjs/fury").InternalSerializerType.STRING;
|
|
271
|
+
};
|
|
272
|
+
} | undefined;
|
|
273
|
+
};
|
|
274
|
+
};
|
|
275
|
+
export declare function stringify(obj: ChannelMessage): Uint8Array;
|
|
276
|
+
export declare function parse(input: Uint8Array): ChannelMessage;
|
|
277
|
+
export declare const pingMessage: Uint8Array;
|
|
278
|
+
export declare const pongMessage: Uint8Array;
|
|
89
279
|
export {};
|
|
90
280
|
//# sourceMappingURL=ws-channel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ws-channel.d.ts","sourceRoot":"","sources":["../../src/common/ws-channel.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"ws-channel.d.ts","sourceRoot":"","sources":["../../src/common/ws-channel.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAEL,eAAe,EACf,UAAU,EACV,WAAW,EAEZ,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,OAAO,EAAE,sBAAsB,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC1E,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAElC;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,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EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;CAG9B,CAAC;AAEH,oBAAY,gBAAgB;IAC1B,eAAe,IAAI;CACpB;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,OAAO,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,gBAAgB,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;CAIxB,CAAC;AAEH,eAAO,MAAM,YAAY;;;;;;;;;;;;;CAGvB,CAAC;AAEH,eAAO,MAAM,cAAc;;;;;;;;;;;;;CAGzB,CAAC;AAEH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;CAIxB,CAAC;AAaH,wBAAgB,SAAS,CAAC,GAAG,EAAE,cAAc,GAAG,UAAU,CAEzD;AAED,wBAAgB,KAAK,CAAC,KAAK,EAAE,UAAU,GAAG,cAAc,CAEvD;AAcD,eAAO,MAAM,WAAW,YAA0B,CAAC;AACnD,eAAO,MAAM,WAAW,YAA0B,CAAC"}
|
package/lib/common/ws-channel.js
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WSServerChannel = exports.WSChannel = void 0;
|
|
3
|
+
exports.pongMessage = exports.pingMessage = exports.parse = exports.stringify = exports.CloseProtocol = exports.BinaryProtocol = exports.DataProtocol = exports.ErrorProtocol = exports.ErrorMessageCode = exports.ServerReadyProtocol = exports.OpenProtocol = exports.PongProtocol = exports.PingProtocol = exports.WSServerChannel = exports.WSChannel = void 0;
|
|
4
|
+
const fury_1 = require("@furyjs/fury");
|
|
4
5
|
const events_1 = require("@opensumi/events");
|
|
5
6
|
const ide_core_common_1 = require("@opensumi/ide-core-common");
|
|
6
|
-
const
|
|
7
|
+
const one_of_1 = require("./fury-extends/one-of");
|
|
7
8
|
const connection_1 = require("./rpc/connection");
|
|
8
|
-
const serializer_1 = require("./serializer");
|
|
9
9
|
class WSChannel {
|
|
10
10
|
static forClient(connection, options) {
|
|
11
11
|
const disposable = new ide_core_common_1.DisposableCollection();
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
const channel = new WSChannel(connection, options);
|
|
13
|
+
disposable.push(connection.onMessage((data) => {
|
|
14
|
+
channel.dispatch(parse(data));
|
|
15
|
+
}));
|
|
15
16
|
connection.onceClose(() => {
|
|
16
17
|
disposable.dispose();
|
|
17
18
|
});
|
|
@@ -24,12 +25,10 @@ class WSChannel {
|
|
|
24
25
|
this.onBinaryQueue = this._disposables.add(new ide_core_common_1.EventQueue());
|
|
25
26
|
this.sendQueue = [];
|
|
26
27
|
this._isServerReady = false;
|
|
27
|
-
this.LOG_TAG = '[WSChannel]';
|
|
28
28
|
this.logger = console;
|
|
29
29
|
this.stateTracer = this._disposables.add(new ide_core_common_1.StateTracer());
|
|
30
30
|
const { id, logger, ensureServerReady } = options;
|
|
31
31
|
this.id = id;
|
|
32
|
-
this.LOG_TAG = `[WSChannel id=${this.id}]`;
|
|
33
32
|
if (logger) {
|
|
34
33
|
this.logger = logger;
|
|
35
34
|
}
|
|
@@ -93,20 +92,6 @@ class WSChannel {
|
|
|
93
92
|
case 'binary':
|
|
94
93
|
this.emitter.emit('binary', msg.binary);
|
|
95
94
|
break;
|
|
96
|
-
case 'error':
|
|
97
|
-
this.logger.error(this.LOG_TAG, `receive error: id: ${msg.id}, code: ${msg.code}, error: ${msg.message}`);
|
|
98
|
-
switch (msg.code) {
|
|
99
|
-
case types_1.ErrorMessageCode.ChannelNotFound:
|
|
100
|
-
// 有 channelPath 说明该 channel 曾经被打开过
|
|
101
|
-
// 重新打开 channel
|
|
102
|
-
if (this.channelPath) {
|
|
103
|
-
// 暂停消息发送, 直到收到 server-ready
|
|
104
|
-
this.pause();
|
|
105
|
-
this.open(this.channelPath, this.clientId);
|
|
106
|
-
}
|
|
107
|
-
break;
|
|
108
|
-
}
|
|
109
|
-
break;
|
|
110
95
|
}
|
|
111
96
|
}
|
|
112
97
|
/**
|
|
@@ -114,20 +99,18 @@ class WSChannel {
|
|
|
114
99
|
*/
|
|
115
100
|
open(path, clientId, connectionToken = (0, ide_core_common_1.randomString)(16)) {
|
|
116
101
|
this.channelPath = path;
|
|
117
|
-
this.clientId = clientId;
|
|
118
|
-
this.LOG_TAG = `[WSChannel id=${this.id} path=${path}]`;
|
|
119
102
|
if (this.stateTracer.has(connectionToken)) {
|
|
120
103
|
this.logger.warn(`channel already opened or in progress, path: ${path}, clientId: ${clientId}, connectionToken: ${connectionToken}`);
|
|
121
104
|
return;
|
|
122
105
|
}
|
|
123
106
|
this.stateTracer.record(connectionToken);
|
|
124
|
-
this.connection.send({
|
|
107
|
+
this.connection.send(stringify({
|
|
125
108
|
kind: 'open',
|
|
126
109
|
id: this.id,
|
|
127
110
|
path,
|
|
128
111
|
clientId,
|
|
129
112
|
connectionToken,
|
|
130
|
-
});
|
|
113
|
+
}));
|
|
131
114
|
if (this._ensureServerReady) {
|
|
132
115
|
this.ensureOpenSend(path, clientId, connectionToken);
|
|
133
116
|
}
|
|
@@ -149,18 +132,18 @@ class WSChannel {
|
|
|
149
132
|
}, 500);
|
|
150
133
|
}
|
|
151
134
|
send(content) {
|
|
152
|
-
this.inqueue({
|
|
135
|
+
this.inqueue(stringify({
|
|
153
136
|
kind: 'data',
|
|
154
137
|
id: this.id,
|
|
155
138
|
content,
|
|
156
|
-
});
|
|
139
|
+
}));
|
|
157
140
|
}
|
|
158
141
|
sendBinary(data) {
|
|
159
|
-
this.inqueue({
|
|
142
|
+
this.inqueue(stringify({
|
|
160
143
|
kind: 'binary',
|
|
161
144
|
id: this.id,
|
|
162
145
|
binary: data,
|
|
163
|
-
});
|
|
146
|
+
}));
|
|
164
147
|
}
|
|
165
148
|
onError() { }
|
|
166
149
|
close(code, reason) {
|
|
@@ -190,11 +173,6 @@ class WSChannel {
|
|
|
190
173
|
const conn = new connection_1.SumiConnection(this.createConnection(), options);
|
|
191
174
|
return conn;
|
|
192
175
|
}
|
|
193
|
-
listen() {
|
|
194
|
-
return this.connection.onMessage((data) => {
|
|
195
|
-
this.dispatch(data);
|
|
196
|
-
});
|
|
197
|
-
}
|
|
198
176
|
dispose() {
|
|
199
177
|
if (this.timer) {
|
|
200
178
|
clearTimeout(this.timer);
|
|
@@ -202,12 +180,6 @@ class WSChannel {
|
|
|
202
180
|
this.sendQueue = [];
|
|
203
181
|
this._disposables.dispose();
|
|
204
182
|
}
|
|
205
|
-
ping() {
|
|
206
|
-
this.connection.send({
|
|
207
|
-
kind: 'ping',
|
|
208
|
-
id: this.id,
|
|
209
|
-
});
|
|
210
|
-
}
|
|
211
183
|
}
|
|
212
184
|
exports.WSChannel = WSChannel;
|
|
213
185
|
/**
|
|
@@ -221,11 +193,11 @@ class WSServerChannel extends WSChannel {
|
|
|
221
193
|
this.clientId = options.clientId;
|
|
222
194
|
}
|
|
223
195
|
serverReady(token) {
|
|
224
|
-
this.connection.send({
|
|
196
|
+
this.connection.send(stringify({
|
|
225
197
|
kind: 'server-ready',
|
|
226
198
|
id: this.id,
|
|
227
199
|
token,
|
|
228
|
-
});
|
|
200
|
+
}));
|
|
229
201
|
}
|
|
230
202
|
dispatch(msg) {
|
|
231
203
|
switch (msg.kind) {
|
|
@@ -235,14 +207,78 @@ class WSServerChannel extends WSChannel {
|
|
|
235
207
|
case 'binary':
|
|
236
208
|
this.emitter.emit('binary', msg.binary);
|
|
237
209
|
break;
|
|
238
|
-
case 'ping':
|
|
239
|
-
this.connection.send({
|
|
240
|
-
kind: 'pong',
|
|
241
|
-
id: this.id,
|
|
242
|
-
});
|
|
243
|
-
break;
|
|
244
210
|
}
|
|
245
211
|
}
|
|
246
212
|
}
|
|
247
213
|
exports.WSServerChannel = WSServerChannel;
|
|
214
|
+
exports.PingProtocol = fury_1.Type.object('ping', {
|
|
215
|
+
clientId: fury_1.Type.string(),
|
|
216
|
+
id: fury_1.Type.string(),
|
|
217
|
+
});
|
|
218
|
+
exports.PongProtocol = fury_1.Type.object('pong', {
|
|
219
|
+
clientId: fury_1.Type.string(),
|
|
220
|
+
id: fury_1.Type.string(),
|
|
221
|
+
});
|
|
222
|
+
exports.OpenProtocol = fury_1.Type.object('open', {
|
|
223
|
+
clientId: fury_1.Type.string(),
|
|
224
|
+
id: fury_1.Type.string(),
|
|
225
|
+
path: fury_1.Type.string(),
|
|
226
|
+
connectionToken: fury_1.Type.string(),
|
|
227
|
+
});
|
|
228
|
+
exports.ServerReadyProtocol = fury_1.Type.object('server-ready', {
|
|
229
|
+
id: fury_1.Type.string(),
|
|
230
|
+
token: fury_1.Type.string(),
|
|
231
|
+
});
|
|
232
|
+
var ErrorMessageCode;
|
|
233
|
+
(function (ErrorMessageCode) {
|
|
234
|
+
ErrorMessageCode[ErrorMessageCode["ChannelNotFound"] = 1] = "ChannelNotFound";
|
|
235
|
+
})(ErrorMessageCode = exports.ErrorMessageCode || (exports.ErrorMessageCode = {}));
|
|
236
|
+
exports.ErrorProtocol = fury_1.Type.object('error', {
|
|
237
|
+
id: fury_1.Type.string(),
|
|
238
|
+
code: fury_1.Type.uint16(),
|
|
239
|
+
message: fury_1.Type.string(),
|
|
240
|
+
});
|
|
241
|
+
exports.DataProtocol = fury_1.Type.object('data', {
|
|
242
|
+
id: fury_1.Type.string(),
|
|
243
|
+
content: fury_1.Type.string(),
|
|
244
|
+
});
|
|
245
|
+
exports.BinaryProtocol = fury_1.Type.object('binary', {
|
|
246
|
+
id: fury_1.Type.string(),
|
|
247
|
+
binary: fury_1.Type.binary(),
|
|
248
|
+
});
|
|
249
|
+
exports.CloseProtocol = fury_1.Type.object('close', {
|
|
250
|
+
id: fury_1.Type.string(),
|
|
251
|
+
code: fury_1.Type.uint32(),
|
|
252
|
+
reason: fury_1.Type.string(),
|
|
253
|
+
});
|
|
254
|
+
const serializer = (0, one_of_1.oneOf)([
|
|
255
|
+
exports.PingProtocol,
|
|
256
|
+
exports.PongProtocol,
|
|
257
|
+
exports.OpenProtocol,
|
|
258
|
+
exports.ServerReadyProtocol,
|
|
259
|
+
exports.DataProtocol,
|
|
260
|
+
exports.BinaryProtocol,
|
|
261
|
+
exports.CloseProtocol,
|
|
262
|
+
exports.ErrorProtocol,
|
|
263
|
+
]);
|
|
264
|
+
function stringify(obj) {
|
|
265
|
+
return serializer.serialize(obj);
|
|
266
|
+
}
|
|
267
|
+
exports.stringify = stringify;
|
|
268
|
+
function parse(input) {
|
|
269
|
+
return serializer.deserialize(input);
|
|
270
|
+
}
|
|
271
|
+
exports.parse = parse;
|
|
272
|
+
const _pingMessage = {
|
|
273
|
+
kind: 'ping',
|
|
274
|
+
id: '',
|
|
275
|
+
clientId: '',
|
|
276
|
+
};
|
|
277
|
+
const _pongMessage = {
|
|
278
|
+
kind: 'pong',
|
|
279
|
+
id: '',
|
|
280
|
+
clientId: '',
|
|
281
|
+
};
|
|
282
|
+
exports.pingMessage = stringify(_pingMessage);
|
|
283
|
+
exports.pongMessage = stringify(_pongMessage);
|
|
248
284
|
//# sourceMappingURL=ws-channel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ws-channel.js","sourceRoot":"","sources":["../../src/common/ws-channel.ts"],"names":[],"mappings":";;;AAAA,6CAAgD;AAChD,+DAMmC;
|
|
1
|
+
{"version":3,"file":"ws-channel.js","sourceRoot":"","sources":["../../src/common/ws-channel.ts"],"names":[],"mappings":";;;AAAA,uCAAoC;AAEpC,6CAAgD;AAChD,+DAMmC;AAGnC,kDAA8C;AAC9C,iDAA0E;AAuD1E,MAAa,SAAS;IAwBpB,MAAM,CAAC,SAAS,CAAC,UAAwC,EAAE,OAAgC;QACzF,MAAM,UAAU,GAAG,IAAI,sCAAoB,EAAE,CAAC;QAC9C,MAAM,OAAO,GAAG,IAAI,SAAS,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;QAEnD,UAAU,CAAC,IAAI,CACb,UAAU,CAAC,SAAS,CAAC,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EC;AAED,MAAM,YAAY,GAAgB;IAChC,IAAI,EAAE,MAAM;IACZ,EAAE,EAAE,EAAE;IACN,QAAQ,EAAE,EAAE;CACb,CAAC;AAEF,MAAM,YAAY,GAAgB;IAChC,IAAI,EAAE,MAAM;IACZ,EAAE,EAAE,EAAE;IACN,QAAQ,EAAE,EAAE;CACb,CAAC;AAEW,QAAA,WAAW,GAAG,SAAS,CAAC,YAAY,CAAC,CAAC;AACtC,QAAA,WAAW,GAAG,SAAS,CAAC,YAAY,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opensumi/ide-connection",
|
|
3
|
-
"version": "3.0.4-next-
|
|
3
|
+
"version": "3.0.4-next-1717045696.0",
|
|
4
4
|
"files": [
|
|
5
5
|
"lib",
|
|
6
6
|
"src"
|
|
@@ -19,16 +19,16 @@
|
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@furyjs/fury": "0.5.9-beta",
|
|
21
21
|
"@opensumi/events": "^1.0.0",
|
|
22
|
-
"@opensumi/ide-core-common": "3.0.4-next-
|
|
22
|
+
"@opensumi/ide-core-common": "3.0.4-next-1717045696.0",
|
|
23
23
|
"@opensumi/reconnecting-websocket": "^4.4.0",
|
|
24
24
|
"@opensumi/vscode-jsonrpc": "^8.0.0-next.2",
|
|
25
25
|
"path-to-regexp": "^6.2.1",
|
|
26
26
|
"ws": "^8.16.0"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@opensumi/ide-components": "3.0.4-next-
|
|
30
|
-
"@opensumi/ide-dev-tool": "3.0.4-next-
|
|
29
|
+
"@opensumi/ide-components": "3.0.4-next-1717045696.0",
|
|
30
|
+
"@opensumi/ide-dev-tool": "3.0.4-next-1717045696.0",
|
|
31
31
|
"@opensumi/mock-socket": "^9.3.1"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "97f0c4294dedcdc63274659c33f8f6e32b8f24d2"
|
|
34
34
|
}
|