vscode-languageserver-protocol 3.15.0-next.5 → 3.15.0-next.6
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/License.txt +11 -11
- package/README.md +16 -16
- package/lib/main.d.ts +183 -192
- package/lib/main.js +73 -78
- package/lib/protocol.callHierarchy.proposed.d.ts +108 -108
- package/lib/protocol.callHierarchy.proposed.js +33 -33
- package/lib/protocol.colorProvider.d.ts +73 -73
- package/lib/protocol.colorProvider.js +27 -27
- package/lib/protocol.configuration.d.ts +42 -42
- package/lib/protocol.configuration.js +20 -20
- package/lib/protocol.d.ts +1696 -1693
- package/lib/protocol.declaration.d.ts +42 -42
- package/lib/protocol.declaration.js +20 -20
- package/lib/protocol.foldingRange.d.ts +101 -101
- package/lib/protocol.foldingRange.js +35 -35
- package/lib/protocol.implementation.d.ts +41 -41
- package/lib/protocol.implementation.js +19 -19
- package/lib/protocol.js +545 -543
- package/lib/protocol.progress.proposed.d.ts +116 -116
- package/lib/protocol.progress.proposed.js +39 -39
- package/lib/{protocol.selectionRange.proposed.d.ts → protocol.selectionRange.d.ts} +52 -77
- package/lib/{protocol.selectionRange.proposed.js → protocol.selectionRange.js} +17 -39
- package/lib/protocol.typeDefinition.d.ts +41 -41
- package/lib/protocol.typeDefinition.js +19 -19
- package/lib/protocol.workspaceFolders.d.ts +91 -91
- package/lib/protocol.workspaceFolders.js +22 -22
- package/lib/utils/is.d.ts +9 -9
- package/lib/utils/is.js +42 -42
- package/package.json +30 -30
- package/thirdpartynotices.txt +30 -30
package/License.txt
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
Copyright (c) Microsoft Corporation
|
|
2
|
-
|
|
3
|
-
All rights reserved.
|
|
4
|
-
|
|
5
|
-
MIT License
|
|
6
|
-
|
|
7
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
8
|
-
|
|
9
|
-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
10
|
-
|
|
11
|
-
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
1
|
+
Copyright (c) Microsoft Corporation
|
|
2
|
+
|
|
3
|
+
All rights reserved.
|
|
4
|
+
|
|
5
|
+
MIT License
|
|
6
|
+
|
|
7
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
8
|
+
|
|
9
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
10
|
+
|
|
11
|
+
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
# VSCode Language Server - Protocol Module
|
|
2
|
-
|
|
3
|
-
[](https://npmjs.org/package/vscode-languageclient)
|
|
4
|
-
[](https://npmjs.org/package/vscode-languageclient)
|
|
5
|
-
[](https://travis-ci.org/Microsoft/vscode-languageserver-node)
|
|
6
|
-
|
|
7
|
-
This npm module is a tool independent implementation of the language server protocol and can be used in any type of node application.
|
|
8
|
-
|
|
9
|
-
See [here](https://github.com/Microsoft/language-server-protocol) for a detailed documentation on the language server protocol.
|
|
10
|
-
|
|
11
|
-
## History
|
|
12
|
-
|
|
13
|
-
For the history please see the [main repository](https://github.com/Microsoft/vscode-languageserver-node/blob/master/README.md)
|
|
14
|
-
|
|
15
|
-
## License
|
|
16
|
-
[MIT](https://github.com/Microsoft/vscode-languageserver-node/blob/master/License.txt)
|
|
1
|
+
# VSCode Language Server - Protocol Module
|
|
2
|
+
|
|
3
|
+
[](https://npmjs.org/package/vscode-languageclient)
|
|
4
|
+
[](https://npmjs.org/package/vscode-languageclient)
|
|
5
|
+
[](https://travis-ci.org/Microsoft/vscode-languageserver-node)
|
|
6
|
+
|
|
7
|
+
This npm module is a tool independent implementation of the language server protocol and can be used in any type of node application.
|
|
8
|
+
|
|
9
|
+
See [here](https://github.com/Microsoft/language-server-protocol) for a detailed documentation on the language server protocol.
|
|
10
|
+
|
|
11
|
+
## History
|
|
12
|
+
|
|
13
|
+
For the history please see the [main repository](https://github.com/Microsoft/vscode-languageserver-node/blob/master/README.md)
|
|
14
|
+
|
|
15
|
+
## License
|
|
16
|
+
[MIT](https://github.com/Microsoft/vscode-languageserver-node/blob/master/License.txt)
|
package/lib/main.d.ts
CHANGED
|
@@ -1,192 +1,183 @@
|
|
|
1
|
-
import { ErrorCodes, ResponseError, CancellationToken, CancellationTokenSource, Disposable, Event, Emitter, Trace, Tracer, TraceFormat, TraceOptions, SetTraceNotification, LogTraceNotification, Message, NotificationMessage, RequestMessage, MessageType as RPCMessageType, RequestType, RequestType0, RequestHandler, RequestHandler0, GenericRequestHandler, StarRequestHandler, NotificationType, NotificationType0, NotificationHandler, NotificationHandler0, GenericNotificationHandler, StarNotificationHandler, MessageReader, MessageWriter, Logger, ConnectionStrategy, StreamMessageReader, StreamMessageWriter, IPCMessageReader, IPCMessageWriter, createClientPipeTransport, createServerPipeTransport, generateRandomPipeName, DataCallback, createClientSocketTransport, createServerSocketTransport } from 'vscode-jsonrpc';
|
|
2
|
-
export { ErrorCodes, ResponseError, CancellationToken, CancellationTokenSource, Disposable, Event, Emitter, Trace, Tracer, TraceFormat, TraceOptions, SetTraceNotification, LogTraceNotification, Message, NotificationMessage, RequestMessage, RPCMessageType, RequestType, RequestType0, RequestHandler, RequestHandler0, GenericRequestHandler, StarRequestHandler, NotificationType, NotificationType0, NotificationHandler, NotificationHandler0, GenericNotificationHandler, StarNotificationHandler, MessageReader, MessageWriter, Logger, ConnectionStrategy, StreamMessageReader, StreamMessageWriter, IPCMessageReader, IPCMessageWriter, createClientPipeTransport, createServerPipeTransport, generateRandomPipeName, DataCallback, createClientSocketTransport, createServerSocketTransport, };
|
|
3
|
-
export * from 'vscode-languageserver-types';
|
|
4
|
-
export * from './protocol';
|
|
5
|
-
export { FoldingRangeParams as FoldingRangeRequestParam } from './protocol';
|
|
6
|
-
import * as callHierarchy from './protocol.callHierarchy.proposed';
|
|
7
|
-
import * as progress from './protocol.progress.proposed';
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
type
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
type
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
type
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
type
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
type
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
* @param
|
|
59
|
-
* @param token An optional cancellation token.
|
|
60
|
-
* @returns A promise resolving to the request's result.
|
|
61
|
-
*/
|
|
62
|
-
sendRequest<R, E, RO>(type:
|
|
63
|
-
/**
|
|
64
|
-
* Sends a request and returns a promise resolving to the result of the request.
|
|
65
|
-
*
|
|
66
|
-
* @param
|
|
67
|
-
* @param
|
|
68
|
-
* @
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
* @param
|
|
76
|
-
* @param token An optional cancellation token.
|
|
77
|
-
* @returns A promise resolving to the request's result.
|
|
78
|
-
*/
|
|
79
|
-
sendRequest<R>(method: string, token?: CancellationToken): Thenable<R>;
|
|
80
|
-
/**
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
* @param
|
|
84
|
-
* @param
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
*
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
*
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
*
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
*
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
*
|
|
131
|
-
*
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
*
|
|
138
|
-
*
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
*
|
|
145
|
-
*
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
*
|
|
155
|
-
*/
|
|
156
|
-
|
|
157
|
-
/**
|
|
158
|
-
*
|
|
159
|
-
*/
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
*
|
|
164
|
-
*/
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
* An event emitter firing when the connection got
|
|
168
|
-
*/
|
|
169
|
-
|
|
170
|
-
/**
|
|
171
|
-
*
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
* Turns the connection into listening mode
|
|
185
|
-
*/
|
|
186
|
-
listen(): void;
|
|
187
|
-
}
|
|
188
|
-
/**
|
|
189
|
-
* @deprecated Use ProtocolConnection instead.
|
|
190
|
-
*/
|
|
191
|
-
export declare type ProtocolConnetion = ProtocolConnection;
|
|
192
|
-
export declare function createProtocolConnection(reader: MessageReader, writer: MessageWriter, logger: Logger, strategy?: ConnectionStrategy): ProtocolConnection;
|
|
1
|
+
import { ErrorCodes, ResponseError, CancellationToken, CancellationTokenSource, Disposable, Event, Emitter, Trace, Tracer, TraceFormat, TraceOptions, SetTraceNotification, LogTraceNotification, Message, NotificationMessage, RequestMessage, MessageType as RPCMessageType, RequestType, RequestType0, RequestHandler, RequestHandler0, GenericRequestHandler, StarRequestHandler, NotificationType, NotificationType0, NotificationHandler, NotificationHandler0, GenericNotificationHandler, StarNotificationHandler, MessageReader, MessageWriter, Logger, ConnectionStrategy, StreamMessageReader, StreamMessageWriter, IPCMessageReader, IPCMessageWriter, createClientPipeTransport, createServerPipeTransport, generateRandomPipeName, DataCallback, createClientSocketTransport, createServerSocketTransport } from 'vscode-jsonrpc';
|
|
2
|
+
export { ErrorCodes, ResponseError, CancellationToken, CancellationTokenSource, Disposable, Event, Emitter, Trace, Tracer, TraceFormat, TraceOptions, SetTraceNotification, LogTraceNotification, Message, NotificationMessage, RequestMessage, RPCMessageType, RequestType, RequestType0, RequestHandler, RequestHandler0, GenericRequestHandler, StarRequestHandler, NotificationType, NotificationType0, NotificationHandler, NotificationHandler0, GenericNotificationHandler, StarNotificationHandler, MessageReader, MessageWriter, Logger, ConnectionStrategy, StreamMessageReader, StreamMessageWriter, IPCMessageReader, IPCMessageWriter, createClientPipeTransport, createServerPipeTransport, generateRandomPipeName, DataCallback, createClientSocketTransport, createServerSocketTransport, };
|
|
3
|
+
export * from 'vscode-languageserver-types';
|
|
4
|
+
export * from './protocol';
|
|
5
|
+
export { FoldingRangeParams as FoldingRangeRequestParam } from './protocol';
|
|
6
|
+
import * as callHierarchy from './protocol.callHierarchy.proposed';
|
|
7
|
+
import * as progress from './protocol.progress.proposed';
|
|
8
|
+
export declare namespace Proposed {
|
|
9
|
+
type CallHierarchyClientCapabilities = callHierarchy.CallHierarchyClientCapabilities;
|
|
10
|
+
type CallHierarchyServerCapabilities = callHierarchy.CallHierarchyServerCapabilities;
|
|
11
|
+
namespace CallHierarchyRequest {
|
|
12
|
+
const type: RequestType<callHierarchy.CallHierarchyParams, callHierarchy.CallHierarchyCall[], void, import("./protocol").TextDocumentRegistrationOptions>;
|
|
13
|
+
type HandlerSignature = callHierarchy.CallHierarchyRequest.HandlerSignature;
|
|
14
|
+
}
|
|
15
|
+
namespace CallHierarchyDirection {
|
|
16
|
+
const CallsFrom: 1;
|
|
17
|
+
const CallsTo: 2;
|
|
18
|
+
}
|
|
19
|
+
type CallHierarchyParams = callHierarchy.CallHierarchyParams;
|
|
20
|
+
type CallHierarchyDirection = callHierarchy.CallHierarchyDirection;
|
|
21
|
+
type CallHierarchyItem = callHierarchy.CallHierarchyItem;
|
|
22
|
+
type CallHierarchyCall = callHierarchy.CallHierarchyCall;
|
|
23
|
+
type ProgressClientCapabilities = progress.ProgressClientCapabilities;
|
|
24
|
+
type ProgressStartParams = progress.ProgressStartParams;
|
|
25
|
+
namespace ProgressStartNotification {
|
|
26
|
+
const type: NotificationType<progress.ProgressStartParams, void>;
|
|
27
|
+
type HandlerSignature = progress.ProgressStartNotification.HandlerSignature;
|
|
28
|
+
}
|
|
29
|
+
type ProgressReportParams = progress.ProgressReportParams;
|
|
30
|
+
namespace ProgressReportNotification {
|
|
31
|
+
const type: NotificationType<progress.ProgressReportParams, void>;
|
|
32
|
+
type HandlerSignature = progress.ProgressReportNotification.HandlerSignature;
|
|
33
|
+
}
|
|
34
|
+
type ProgressDoneParams = progress.ProgressDoneParams;
|
|
35
|
+
namespace ProgressDoneNotification {
|
|
36
|
+
const type: NotificationType<progress.ProgressDoneParams, void>;
|
|
37
|
+
type HandlerSignature = progress.ProgressDoneNotification.HandlerSignature;
|
|
38
|
+
}
|
|
39
|
+
type ProgressCancelParams = progress.ProgressCancelParams;
|
|
40
|
+
namespace ProgressCancelNotification {
|
|
41
|
+
const type: NotificationType<progress.ProgressCancelParams, void>;
|
|
42
|
+
type HandlerSignature = progress.ProgressCancelNotification.HandlerSignature;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
export interface ProtocolConnection {
|
|
46
|
+
/**
|
|
47
|
+
* Sends a request and returns a promise resolving to the result of the request.
|
|
48
|
+
*
|
|
49
|
+
* @param type The type of request to sent.
|
|
50
|
+
* @param token An optional cancellation token.
|
|
51
|
+
* @returns A promise resolving to the request's result.
|
|
52
|
+
*/
|
|
53
|
+
sendRequest<R, E, RO>(type: RequestType0<R, E, RO>, token?: CancellationToken): Thenable<R>;
|
|
54
|
+
/**
|
|
55
|
+
* Sends a request and returns a promise resolving to the result of the request.
|
|
56
|
+
*
|
|
57
|
+
* @param type The type of request to sent.
|
|
58
|
+
* @param params The request's parameter.
|
|
59
|
+
* @param token An optional cancellation token.
|
|
60
|
+
* @returns A promise resolving to the request's result.
|
|
61
|
+
*/
|
|
62
|
+
sendRequest<P, R, E, RO>(type: RequestType<P, R, E, RO>, params: P, token?: CancellationToken): Thenable<R>;
|
|
63
|
+
/**
|
|
64
|
+
* Sends a request and returns a promise resolving to the result of the request.
|
|
65
|
+
*
|
|
66
|
+
* @param method the request's method name.
|
|
67
|
+
* @param token An optional cancellation token.
|
|
68
|
+
* @returns A promise resolving to the request's result.
|
|
69
|
+
*/
|
|
70
|
+
sendRequest<R>(method: string, token?: CancellationToken): Thenable<R>;
|
|
71
|
+
/**
|
|
72
|
+
* Sends a request and returns a promise resolving to the result of the request.
|
|
73
|
+
*
|
|
74
|
+
* @param method the request's method name.
|
|
75
|
+
* @param params The request's parameter.
|
|
76
|
+
* @param token An optional cancellation token.
|
|
77
|
+
* @returns A promise resolving to the request's result.
|
|
78
|
+
*/
|
|
79
|
+
sendRequest<R>(method: string, param: any, token?: CancellationToken): Thenable<R>;
|
|
80
|
+
/**
|
|
81
|
+
* Installs a request handler.
|
|
82
|
+
*
|
|
83
|
+
* @param type The request type to install the handler for.
|
|
84
|
+
* @param handler The actual handler.
|
|
85
|
+
*/
|
|
86
|
+
onRequest<R, E, RO>(type: RequestType0<R, E, RO>, handler: RequestHandler0<R, E>): void;
|
|
87
|
+
/**
|
|
88
|
+
* Installs a request handler.
|
|
89
|
+
*
|
|
90
|
+
* @param type The request type to install the handler for.
|
|
91
|
+
* @param handler The actual handler.
|
|
92
|
+
*/
|
|
93
|
+
onRequest<P, R, E, RO>(type: RequestType<P, R, E, RO>, handler: RequestHandler<P, R, E>): void;
|
|
94
|
+
/**
|
|
95
|
+
* Installs a request handler.
|
|
96
|
+
*
|
|
97
|
+
* @param methods The method name to install the handler for.
|
|
98
|
+
* @param handler The actual handler.
|
|
99
|
+
*/
|
|
100
|
+
onRequest<R, E>(method: string, handler: GenericRequestHandler<R, E>): void;
|
|
101
|
+
/**
|
|
102
|
+
* Sends a notification.
|
|
103
|
+
*
|
|
104
|
+
* @param type the notification's type to send.
|
|
105
|
+
*/
|
|
106
|
+
sendNotification<RO>(type: NotificationType0<RO>): void;
|
|
107
|
+
/**
|
|
108
|
+
* Sends a notification.
|
|
109
|
+
*
|
|
110
|
+
* @param type the notification's type to send.
|
|
111
|
+
* @param params the notification's parameters.
|
|
112
|
+
*/
|
|
113
|
+
sendNotification<P, RO>(type: NotificationType<P, RO>, params?: P): void;
|
|
114
|
+
/**
|
|
115
|
+
* Sends a notification.
|
|
116
|
+
*
|
|
117
|
+
* @param method the notification's method name.
|
|
118
|
+
*/
|
|
119
|
+
sendNotification(method: string): void;
|
|
120
|
+
/**
|
|
121
|
+
* Sends a notification.
|
|
122
|
+
*
|
|
123
|
+
* @param method the notification's method name.
|
|
124
|
+
* @param params the notification's parameters.
|
|
125
|
+
*/
|
|
126
|
+
sendNotification(method: string, params: any): void;
|
|
127
|
+
/**
|
|
128
|
+
* Installs a notification handler.
|
|
129
|
+
*
|
|
130
|
+
* @param type The notification type to install the handler for.
|
|
131
|
+
* @param handler The actual handler.
|
|
132
|
+
*/
|
|
133
|
+
onNotification<RO>(type: NotificationType0<RO>, handler: NotificationHandler0): void;
|
|
134
|
+
/**
|
|
135
|
+
* Installs a notification handler.
|
|
136
|
+
*
|
|
137
|
+
* @param type The notification type to install the handler for.
|
|
138
|
+
* @param handler The actual handler.
|
|
139
|
+
*/
|
|
140
|
+
onNotification<P, RO>(type: NotificationType<P, RO>, handler: NotificationHandler<P>): void;
|
|
141
|
+
/**
|
|
142
|
+
* Installs a notification handler.
|
|
143
|
+
*
|
|
144
|
+
* @param methods The method name to install the handler for.
|
|
145
|
+
* @param handler The actual handler.
|
|
146
|
+
*/
|
|
147
|
+
onNotification(method: string, handler: GenericNotificationHandler): void;
|
|
148
|
+
/**
|
|
149
|
+
* Enables tracing mode for the connection.
|
|
150
|
+
*/
|
|
151
|
+
trace(value: Trace, tracer: Tracer, sendNotification?: boolean): void;
|
|
152
|
+
trace(value: Trace, tracer: Tracer, traceOptions?: TraceOptions): void;
|
|
153
|
+
/**
|
|
154
|
+
* An event emitter firing when an error occurs on the connection.
|
|
155
|
+
*/
|
|
156
|
+
onError: Event<[Error, Message | undefined, number | undefined]>;
|
|
157
|
+
/**
|
|
158
|
+
* An event emitter firing when the connection got closed.
|
|
159
|
+
*/
|
|
160
|
+
onClose: Event<void>;
|
|
161
|
+
/**
|
|
162
|
+
* An event emiiter firing when the connection receives a notification that is not
|
|
163
|
+
* handled.
|
|
164
|
+
*/
|
|
165
|
+
onUnhandledNotification: Event<NotificationMessage>;
|
|
166
|
+
/**
|
|
167
|
+
* An event emitter firing when the connection got disposed.
|
|
168
|
+
*/
|
|
169
|
+
onDispose: Event<void>;
|
|
170
|
+
/**
|
|
171
|
+
* Actively disposes the connection.
|
|
172
|
+
*/
|
|
173
|
+
dispose(): void;
|
|
174
|
+
/**
|
|
175
|
+
* Turns the connection into listening mode
|
|
176
|
+
*/
|
|
177
|
+
listen(): void;
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* @deprecated Use ProtocolConnection instead.
|
|
181
|
+
*/
|
|
182
|
+
export declare type ProtocolConnetion = ProtocolConnection;
|
|
183
|
+
export declare function createProtocolConnection(reader: MessageReader, writer: MessageWriter, logger: Logger, strategy?: ConnectionStrategy): ProtocolConnection;
|
package/lib/main.js
CHANGED
|
@@ -1,78 +1,73 @@
|
|
|
1
|
-
/* --------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
-
* ------------------------------------------------------------------------------------------ */
|
|
5
|
-
'use strict';
|
|
6
|
-
function __export(m) {
|
|
7
|
-
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
|
8
|
-
}
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
const vscode_jsonrpc_1 = require("vscode-jsonrpc");
|
|
11
|
-
exports.ErrorCodes = vscode_jsonrpc_1.ErrorCodes;
|
|
12
|
-
exports.ResponseError = vscode_jsonrpc_1.ResponseError;
|
|
13
|
-
exports.CancellationToken = vscode_jsonrpc_1.CancellationToken;
|
|
14
|
-
exports.CancellationTokenSource = vscode_jsonrpc_1.CancellationTokenSource;
|
|
15
|
-
exports.Disposable = vscode_jsonrpc_1.Disposable;
|
|
16
|
-
exports.Event = vscode_jsonrpc_1.Event;
|
|
17
|
-
exports.Emitter = vscode_jsonrpc_1.Emitter;
|
|
18
|
-
exports.Trace = vscode_jsonrpc_1.Trace;
|
|
19
|
-
exports.TraceFormat = vscode_jsonrpc_1.TraceFormat;
|
|
20
|
-
exports.SetTraceNotification = vscode_jsonrpc_1.SetTraceNotification;
|
|
21
|
-
exports.LogTraceNotification = vscode_jsonrpc_1.LogTraceNotification;
|
|
22
|
-
exports.RequestType = vscode_jsonrpc_1.RequestType;
|
|
23
|
-
exports.RequestType0 = vscode_jsonrpc_1.RequestType0;
|
|
24
|
-
exports.NotificationType = vscode_jsonrpc_1.NotificationType;
|
|
25
|
-
exports.NotificationType0 = vscode_jsonrpc_1.NotificationType0;
|
|
26
|
-
exports.MessageReader = vscode_jsonrpc_1.MessageReader;
|
|
27
|
-
exports.MessageWriter = vscode_jsonrpc_1.MessageWriter;
|
|
28
|
-
exports.ConnectionStrategy = vscode_jsonrpc_1.ConnectionStrategy;
|
|
29
|
-
exports.StreamMessageReader = vscode_jsonrpc_1.StreamMessageReader;
|
|
30
|
-
exports.StreamMessageWriter = vscode_jsonrpc_1.StreamMessageWriter;
|
|
31
|
-
exports.IPCMessageReader = vscode_jsonrpc_1.IPCMessageReader;
|
|
32
|
-
exports.IPCMessageWriter = vscode_jsonrpc_1.IPCMessageWriter;
|
|
33
|
-
exports.createClientPipeTransport = vscode_jsonrpc_1.createClientPipeTransport;
|
|
34
|
-
exports.createServerPipeTransport = vscode_jsonrpc_1.createServerPipeTransport;
|
|
35
|
-
exports.generateRandomPipeName = vscode_jsonrpc_1.generateRandomPipeName;
|
|
36
|
-
exports.createClientSocketTransport = vscode_jsonrpc_1.createClientSocketTransport;
|
|
37
|
-
exports.createServerSocketTransport = vscode_jsonrpc_1.createServerSocketTransport;
|
|
38
|
-
__export(require("vscode-languageserver-types"));
|
|
39
|
-
__export(require("./protocol"));
|
|
40
|
-
const callHierarchy = require("./protocol.callHierarchy.proposed");
|
|
41
|
-
const progress = require("./protocol.progress.proposed");
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
})(
|
|
53
|
-
let
|
|
54
|
-
(function (
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
(
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
})(Proposed = exports.Proposed || (exports.Proposed = {}));
|
|
75
|
-
function createProtocolConnection(reader, writer, logger, strategy) {
|
|
76
|
-
return vscode_jsonrpc_1.createMessageConnection(reader, writer, logger, strategy);
|
|
77
|
-
}
|
|
78
|
-
exports.createProtocolConnection = createProtocolConnection;
|
|
1
|
+
/* --------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
+
* ------------------------------------------------------------------------------------------ */
|
|
5
|
+
'use strict';
|
|
6
|
+
function __export(m) {
|
|
7
|
+
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
const vscode_jsonrpc_1 = require("vscode-jsonrpc");
|
|
11
|
+
exports.ErrorCodes = vscode_jsonrpc_1.ErrorCodes;
|
|
12
|
+
exports.ResponseError = vscode_jsonrpc_1.ResponseError;
|
|
13
|
+
exports.CancellationToken = vscode_jsonrpc_1.CancellationToken;
|
|
14
|
+
exports.CancellationTokenSource = vscode_jsonrpc_1.CancellationTokenSource;
|
|
15
|
+
exports.Disposable = vscode_jsonrpc_1.Disposable;
|
|
16
|
+
exports.Event = vscode_jsonrpc_1.Event;
|
|
17
|
+
exports.Emitter = vscode_jsonrpc_1.Emitter;
|
|
18
|
+
exports.Trace = vscode_jsonrpc_1.Trace;
|
|
19
|
+
exports.TraceFormat = vscode_jsonrpc_1.TraceFormat;
|
|
20
|
+
exports.SetTraceNotification = vscode_jsonrpc_1.SetTraceNotification;
|
|
21
|
+
exports.LogTraceNotification = vscode_jsonrpc_1.LogTraceNotification;
|
|
22
|
+
exports.RequestType = vscode_jsonrpc_1.RequestType;
|
|
23
|
+
exports.RequestType0 = vscode_jsonrpc_1.RequestType0;
|
|
24
|
+
exports.NotificationType = vscode_jsonrpc_1.NotificationType;
|
|
25
|
+
exports.NotificationType0 = vscode_jsonrpc_1.NotificationType0;
|
|
26
|
+
exports.MessageReader = vscode_jsonrpc_1.MessageReader;
|
|
27
|
+
exports.MessageWriter = vscode_jsonrpc_1.MessageWriter;
|
|
28
|
+
exports.ConnectionStrategy = vscode_jsonrpc_1.ConnectionStrategy;
|
|
29
|
+
exports.StreamMessageReader = vscode_jsonrpc_1.StreamMessageReader;
|
|
30
|
+
exports.StreamMessageWriter = vscode_jsonrpc_1.StreamMessageWriter;
|
|
31
|
+
exports.IPCMessageReader = vscode_jsonrpc_1.IPCMessageReader;
|
|
32
|
+
exports.IPCMessageWriter = vscode_jsonrpc_1.IPCMessageWriter;
|
|
33
|
+
exports.createClientPipeTransport = vscode_jsonrpc_1.createClientPipeTransport;
|
|
34
|
+
exports.createServerPipeTransport = vscode_jsonrpc_1.createServerPipeTransport;
|
|
35
|
+
exports.generateRandomPipeName = vscode_jsonrpc_1.generateRandomPipeName;
|
|
36
|
+
exports.createClientSocketTransport = vscode_jsonrpc_1.createClientSocketTransport;
|
|
37
|
+
exports.createServerSocketTransport = vscode_jsonrpc_1.createServerSocketTransport;
|
|
38
|
+
__export(require("vscode-languageserver-types"));
|
|
39
|
+
__export(require("./protocol"));
|
|
40
|
+
const callHierarchy = require("./protocol.callHierarchy.proposed");
|
|
41
|
+
const progress = require("./protocol.progress.proposed");
|
|
42
|
+
var Proposed;
|
|
43
|
+
(function (Proposed) {
|
|
44
|
+
let CallHierarchyRequest;
|
|
45
|
+
(function (CallHierarchyRequest) {
|
|
46
|
+
CallHierarchyRequest.type = callHierarchy.CallHierarchyRequest.type;
|
|
47
|
+
})(CallHierarchyRequest = Proposed.CallHierarchyRequest || (Proposed.CallHierarchyRequest = {}));
|
|
48
|
+
let CallHierarchyDirection;
|
|
49
|
+
(function (CallHierarchyDirection) {
|
|
50
|
+
CallHierarchyDirection.CallsFrom = callHierarchy.CallHierarchyDirection.CallsFrom;
|
|
51
|
+
CallHierarchyDirection.CallsTo = callHierarchy.CallHierarchyDirection.CallsTo;
|
|
52
|
+
})(CallHierarchyDirection = Proposed.CallHierarchyDirection || (Proposed.CallHierarchyDirection = {}));
|
|
53
|
+
let ProgressStartNotification;
|
|
54
|
+
(function (ProgressStartNotification) {
|
|
55
|
+
ProgressStartNotification.type = progress.ProgressStartNotification.type;
|
|
56
|
+
})(ProgressStartNotification = Proposed.ProgressStartNotification || (Proposed.ProgressStartNotification = {}));
|
|
57
|
+
let ProgressReportNotification;
|
|
58
|
+
(function (ProgressReportNotification) {
|
|
59
|
+
ProgressReportNotification.type = progress.ProgressReportNotification.type;
|
|
60
|
+
})(ProgressReportNotification = Proposed.ProgressReportNotification || (Proposed.ProgressReportNotification = {}));
|
|
61
|
+
let ProgressDoneNotification;
|
|
62
|
+
(function (ProgressDoneNotification) {
|
|
63
|
+
ProgressDoneNotification.type = progress.ProgressDoneNotification.type;
|
|
64
|
+
})(ProgressDoneNotification = Proposed.ProgressDoneNotification || (Proposed.ProgressDoneNotification = {}));
|
|
65
|
+
let ProgressCancelNotification;
|
|
66
|
+
(function (ProgressCancelNotification) {
|
|
67
|
+
ProgressCancelNotification.type = progress.ProgressCancelNotification.type;
|
|
68
|
+
})(ProgressCancelNotification = Proposed.ProgressCancelNotification || (Proposed.ProgressCancelNotification = {}));
|
|
69
|
+
})(Proposed = exports.Proposed || (exports.Proposed = {}));
|
|
70
|
+
function createProtocolConnection(reader, writer, logger, strategy) {
|
|
71
|
+
return vscode_jsonrpc_1.createMessageConnection(reader, writer, logger, strategy);
|
|
72
|
+
}
|
|
73
|
+
exports.createProtocolConnection = createProtocolConnection;
|