ace-linters 0.13.2 → 0.13.3
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/build/ace-language-client.js +26 -15
- package/build/ace-linters.js +7 -2
- package/build/base-service.js +1 -1
- package/build/css-service.js +1 -1
- package/build/html-service.js +1 -1
- package/build/javascript-service.js +1 -1
- package/build/json-service.js +1 -1
- package/build/lua-service.js +1 -1
- package/build/php-service.js +1 -1
- package/build/python-service.js +1 -1
- package/build/service-manager.js +1 -1
- package/build/typescript-service.js +1 -1
- package/build/xml-service.js +1 -1
- package/build/yaml-service.js +1 -1
- package/package.json +1 -1
- package/types/ace-language-client.d.ts +4 -1
- package/types/message-controller-ws.d.ts +4 -2
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
var a = factory();
|
|
8
8
|
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
|
|
9
9
|
}
|
|
10
|
-
})(
|
|
10
|
+
})(this, () => {
|
|
11
11
|
return /******/ (() => { // webpackBootstrap
|
|
12
12
|
/******/ var __webpack_modules__ = ({
|
|
13
13
|
|
|
@@ -23562,6 +23562,9 @@ class LanguageProvider {
|
|
|
23562
23562
|
completer
|
|
23563
23563
|
];
|
|
23564
23564
|
} else {
|
|
23565
|
+
if (!editor.completers) {
|
|
23566
|
+
editor.completers = [];
|
|
23567
|
+
}
|
|
23565
23568
|
editor.completers.push(completer);
|
|
23566
23569
|
}
|
|
23567
23570
|
}
|
|
@@ -23763,7 +23766,9 @@ class SessionLanguageProvider {
|
|
|
23763
23766
|
if (!this.state.occurrenceMarkers) {
|
|
23764
23767
|
this.state.occurrenceMarkers = new MarkerGroup(this.session);
|
|
23765
23768
|
}
|
|
23766
|
-
|
|
23769
|
+
if (documentHighlights) {
|
|
23770
|
+
this.state.occurrenceMarkers.setMarkers(fromDocumentHighlights(documentHighlights));
|
|
23771
|
+
}
|
|
23767
23772
|
});
|
|
23768
23773
|
this.$messageController = messageController;
|
|
23769
23774
|
this.session = session;
|
|
@@ -24046,24 +24051,24 @@ class MessageControllerWS extends events.EventEmitter {
|
|
|
24046
24051
|
configureFeatures(serviceName, features) {
|
|
24047
24052
|
throw new Error('Method not implemented.');
|
|
24048
24053
|
}
|
|
24049
|
-
$connectSocket() {
|
|
24054
|
+
$connectSocket(initializationOptions) {
|
|
24050
24055
|
listen({
|
|
24051
24056
|
webSocket: this.socket,
|
|
24052
24057
|
logger: new ConsoleLogger(),
|
|
24053
24058
|
onConnection: (connection)=>{
|
|
24054
|
-
this.$connect(connection);
|
|
24059
|
+
this.$connect(connection, initializationOptions);
|
|
24055
24060
|
}
|
|
24056
24061
|
});
|
|
24057
24062
|
}
|
|
24058
|
-
$connectWorker(worker) {
|
|
24063
|
+
$connectWorker(worker, initializationOptions) {
|
|
24059
24064
|
const connection = (0,browser.createProtocolConnection)(new browser.BrowserMessageReader(worker), new browser.BrowserMessageWriter(worker));
|
|
24060
|
-
this.$connect(connection);
|
|
24065
|
+
this.$connect(connection, initializationOptions);
|
|
24061
24066
|
}
|
|
24062
|
-
$connect(connection) {
|
|
24067
|
+
$connect(connection, initializationOptions) {
|
|
24063
24068
|
connection.listen();
|
|
24064
24069
|
this.isConnected = true;
|
|
24065
24070
|
this.connection = connection;
|
|
24066
|
-
this.sendInitialize();
|
|
24071
|
+
this.sendInitialize(initializationOptions);
|
|
24067
24072
|
this.connection.onNotification('textDocument/publishDiagnostics', (result)=>{
|
|
24068
24073
|
this.emit("validate-" + result.uri.replace(/^file:\/\/\//, ""), result.diagnostics);
|
|
24069
24074
|
});
|
|
@@ -24106,13 +24111,13 @@ class MessageControllerWS extends events.EventEmitter {
|
|
|
24106
24111
|
}
|
|
24107
24112
|
if (this.socket) this.socket.close();
|
|
24108
24113
|
}
|
|
24109
|
-
sendInitialize() {
|
|
24114
|
+
sendInitialize(initializationOptions) {
|
|
24110
24115
|
if (!this.isConnected) {
|
|
24111
24116
|
return;
|
|
24112
24117
|
}
|
|
24113
24118
|
const message = {
|
|
24114
24119
|
capabilities: this.clientCapabilities,
|
|
24115
|
-
initializationOptions:
|
|
24120
|
+
initializationOptions: initializationOptions,
|
|
24116
24121
|
processId: null,
|
|
24117
24122
|
rootUri: "",
|
|
24118
24123
|
workspaceFolders: null
|
|
@@ -24189,6 +24194,11 @@ class MessageControllerWS extends events.EventEmitter {
|
|
|
24189
24194
|
var _this_serverCapabilities_completionProvider, _this_serverCapabilities;
|
|
24190
24195
|
if (!this.isInitialized) return;
|
|
24191
24196
|
if (!((_this_serverCapabilities = this.serverCapabilities) === null || _this_serverCapabilities === void 0 ? void 0 : (_this_serverCapabilities_completionProvider = _this_serverCapabilities.completionProvider) === null || _this_serverCapabilities_completionProvider === void 0 ? void 0 : _this_serverCapabilities_completionProvider.resolveProvider)) return;
|
|
24197
|
+
completion["item"].data = {
|
|
24198
|
+
...completion["item"].data,
|
|
24199
|
+
aceFileName: sessionId
|
|
24200
|
+
} //TODO: temporary fix
|
|
24201
|
+
;
|
|
24192
24202
|
this.postMessage('completionItem/resolve', sessionId, completion["item"], (result)=>{
|
|
24193
24203
|
callback && callback(result);
|
|
24194
24204
|
});
|
|
@@ -24288,7 +24298,7 @@ class MessageControllerWS extends events.EventEmitter {
|
|
|
24288
24298
|
};
|
|
24289
24299
|
this.postMessage('textDocument/signatureHelp', sessionId, options, signatureHelpCallback);
|
|
24290
24300
|
}
|
|
24291
|
-
constructor(mode){
|
|
24301
|
+
constructor(mode, initializationOptions){
|
|
24292
24302
|
super();
|
|
24293
24303
|
message_controller_ws_define_property(this, "isConnected", false);
|
|
24294
24304
|
message_controller_ws_define_property(this, "isInitialized", false);
|
|
@@ -24348,10 +24358,10 @@ class MessageControllerWS extends events.EventEmitter {
|
|
|
24348
24358
|
}
|
|
24349
24359
|
});
|
|
24350
24360
|
if (mode instanceof Worker) {
|
|
24351
|
-
this.$connectWorker(mode);
|
|
24361
|
+
this.$connectWorker(mode, initializationOptions);
|
|
24352
24362
|
} else {
|
|
24353
24363
|
this.socket = mode;
|
|
24354
|
-
this.$connectSocket();
|
|
24364
|
+
this.$connectSocket(initializationOptions);
|
|
24355
24365
|
}
|
|
24356
24366
|
}
|
|
24357
24367
|
}
|
|
@@ -24364,8 +24374,9 @@ class AceLanguageClient {
|
|
|
24364
24374
|
* Creates LanguageProvider for any Language Server to connect with JSON-RPC (webworker, websocket)
|
|
24365
24375
|
* @param {Worker | WebSocket} mode
|
|
24366
24376
|
* @param {ProviderOptions} options
|
|
24367
|
-
|
|
24368
|
-
|
|
24377
|
+
* @param initializationOptions
|
|
24378
|
+
*/ static for(mode, options, initializationOptions) {
|
|
24379
|
+
let messageController = new MessageControllerWS(mode, initializationOptions);
|
|
24369
24380
|
return new LanguageProvider(messageController, options);
|
|
24370
24381
|
}
|
|
24371
24382
|
}
|
package/build/ace-linters.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
var a = factory();
|
|
8
8
|
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
|
|
9
9
|
}
|
|
10
|
-
})(
|
|
10
|
+
})(this, () => {
|
|
11
11
|
return /******/ (() => { // webpackBootstrap
|
|
12
12
|
/******/ var __webpack_modules__ = ({
|
|
13
13
|
|
|
@@ -20418,6 +20418,9 @@ class LanguageProvider {
|
|
|
20418
20418
|
completer
|
|
20419
20419
|
];
|
|
20420
20420
|
} else {
|
|
20421
|
+
if (!editor.completers) {
|
|
20422
|
+
editor.completers = [];
|
|
20423
|
+
}
|
|
20421
20424
|
editor.completers.push(completer);
|
|
20422
20425
|
}
|
|
20423
20426
|
}
|
|
@@ -20619,7 +20622,9 @@ class SessionLanguageProvider {
|
|
|
20619
20622
|
if (!this.state.occurrenceMarkers) {
|
|
20620
20623
|
this.state.occurrenceMarkers = new MarkerGroup(this.session);
|
|
20621
20624
|
}
|
|
20622
|
-
|
|
20625
|
+
if (documentHighlights) {
|
|
20626
|
+
this.state.occurrenceMarkers.setMarkers(fromDocumentHighlights(documentHighlights));
|
|
20627
|
+
}
|
|
20623
20628
|
});
|
|
20624
20629
|
this.$messageController = messageController;
|
|
20625
20630
|
this.session = session;
|
package/build/base-service.js
CHANGED
package/build/css-service.js
CHANGED
package/build/html-service.js
CHANGED
package/build/json-service.js
CHANGED
package/build/lua-service.js
CHANGED
package/build/php-service.js
CHANGED
package/build/python-service.js
CHANGED
package/build/service-manager.js
CHANGED
package/build/xml-service.js
CHANGED
package/build/yaml-service.js
CHANGED
package/package.json
CHANGED
|
@@ -5,6 +5,9 @@ export declare class AceLanguageClient {
|
|
|
5
5
|
* Creates LanguageProvider for any Language Server to connect with JSON-RPC (webworker, websocket)
|
|
6
6
|
* @param {Worker | WebSocket} mode
|
|
7
7
|
* @param {ProviderOptions} options
|
|
8
|
+
* @param initializationOptions
|
|
8
9
|
*/
|
|
9
|
-
static for(mode: Worker | WebSocket, options?: ProviderOptions
|
|
10
|
+
static for(mode: Worker | WebSocket, options?: ProviderOptions, initializationOptions?: {
|
|
11
|
+
[option: string]: any;
|
|
12
|
+
}): LanguageProvider;
|
|
10
13
|
}
|
|
@@ -12,7 +12,9 @@ export declare class MessageControllerWS extends events.EventEmitter implements
|
|
|
12
12
|
private connection;
|
|
13
13
|
private requestsQueue;
|
|
14
14
|
clientCapabilities: lsp.ClientCapabilities;
|
|
15
|
-
constructor(mode: WebSocket | Worker
|
|
15
|
+
constructor(mode: WebSocket | Worker, initializationOptions?: {
|
|
16
|
+
[option: string]: any;
|
|
17
|
+
});
|
|
16
18
|
configureFeatures(serviceName: SupportedServices, features: ServiceFeatures): void;
|
|
17
19
|
private $connectSocket;
|
|
18
20
|
private $connectWorker;
|
|
@@ -20,7 +22,7 @@ export declare class MessageControllerWS extends events.EventEmitter implements
|
|
|
20
22
|
init(sessionId: string, document: Ace.Document, mode: string, options: any, initCallback: (capabilities: any) => void, validationCallback: (annotations: lsp.Diagnostic[]) => void): void;
|
|
21
23
|
initSession(textDocumentMessage: lsp.DidOpenTextDocumentParams, initCallback: any): void;
|
|
22
24
|
close(): void;
|
|
23
|
-
sendInitialize(): void;
|
|
25
|
+
sendInitialize(initializationOptions: any): void;
|
|
24
26
|
change(sessionId: string, deltas: lsp.TextDocumentContentChangeEvent[], document: any, callback?: () => void): void;
|
|
25
27
|
doHover(sessionId: string, position: lsp.Position, callback?: (hover: lsp.Hover[]) => void): void;
|
|
26
28
|
doComplete(sessionId: string, position: lsp.Position, callback?: (completions: CompletionService[]) => void): void;
|