@codingame/monaco-languageclient-wrapper 1.7.2 → 2.0.1
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/dist/createLanguageClient.d.ts +4 -0
- package/dist/customRequests.d.ts +5 -0
- package/dist/extensionConfiguration.d.ts +7 -0
- package/dist/extensions.d.ts +14 -0
- package/dist/hacks.d.ts +1 -0
- package/dist/index.d.ts +6836 -203
- package/dist/index.js +958 -660
- package/dist/languageClient.d.ts +58 -0
- package/dist/languageClientOptions.d.ts +9 -0
- package/dist/main.js +21393 -0
- package/dist/monaco-languageclient-wrapper.d.ts +1478 -0
- package/dist/services/CodinGameMonacoWorkspace.d.ts +13 -0
- package/dist/services/Configuration.d.ts +14 -0
- package/dist/services/WatchableConsoleWindow.d.ts +24 -0
- package/dist/services.d.ts +4 -0
- package/dist/staticOptions.d.ts +5 -0
- package/dist/tsdoc-metadata.json +11 -0
- package/package.json +7 -7
- package/stats.html +1 -1
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { MonacoLanguageClient, Emitter, Event, TextDocument } from '@codingame/monaco-languageclient';
|
|
2
|
+
import { WillShutdownParams } from './extensions';
|
|
3
|
+
import { LanguageClientId, LanguageClientOptions } from './languageClientOptions';
|
|
4
|
+
export interface LanguageClient {
|
|
5
|
+
sendNotification(method: string, params: unknown): void;
|
|
6
|
+
sendRequest<R>(method: string, params: unknown): Promise<R>;
|
|
7
|
+
}
|
|
8
|
+
declare type Status = 'ready' | 'error' | 'connecting' | 'connected' | 'closed';
|
|
9
|
+
export interface StatusChangeEvent {
|
|
10
|
+
status: Status;
|
|
11
|
+
}
|
|
12
|
+
export declare class LanguageClientManager implements LanguageClient {
|
|
13
|
+
private id;
|
|
14
|
+
private sessionId;
|
|
15
|
+
private languageServerAddress;
|
|
16
|
+
private getSecurityToken;
|
|
17
|
+
private languageServerOptions;
|
|
18
|
+
private libraryUrls;
|
|
19
|
+
private useMutualizedProxy;
|
|
20
|
+
languageClient?: MonacoLanguageClient;
|
|
21
|
+
private disposed;
|
|
22
|
+
protected readonly onDidChangeStatusEmitter: Emitter<StatusChangeEvent>;
|
|
23
|
+
protected readonly onErrorEmitter: Emitter<Error>;
|
|
24
|
+
protected readonly onWillCloseEmitter: Emitter<void>;
|
|
25
|
+
protected readonly onWillShutdownEmitter: Emitter<WillShutdownParams>;
|
|
26
|
+
protected currentStatus: Status;
|
|
27
|
+
constructor(id: LanguageClientId, sessionId: string | undefined, languageServerAddress: string, getSecurityToken: () => Promise<string>, languageServerOptions: LanguageClientOptions, libraryUrls: string[], useMutualizedProxy: boolean);
|
|
28
|
+
private updateStatus;
|
|
29
|
+
private notifyStatusChanged;
|
|
30
|
+
isReady(): boolean;
|
|
31
|
+
dispose(): Promise<void>;
|
|
32
|
+
get onDidChangeStatus(): Event<StatusChangeEvent>;
|
|
33
|
+
get onWillClose(): Event<void>;
|
|
34
|
+
get onWillShutdown(): Event<WillShutdownParams>;
|
|
35
|
+
get onError(): Event<Error>;
|
|
36
|
+
isModelManaged(document: TextDocument): boolean;
|
|
37
|
+
isDisposed(): boolean;
|
|
38
|
+
private handleClose;
|
|
39
|
+
private handleError;
|
|
40
|
+
start(): Promise<void>;
|
|
41
|
+
private _start;
|
|
42
|
+
sendNotification(method: string, params: unknown): void;
|
|
43
|
+
sendRequest<R>(method: string, params: unknown): Promise<R>;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Create a language client manager
|
|
47
|
+
* @param id The predefined id of the language client
|
|
48
|
+
* @param sessionId An optional sessionId when connecting to the session-mutualized server
|
|
49
|
+
* @param languageServerAddress The domain of the server
|
|
50
|
+
* @param getSecurityToken A function which returns a valid JWT token to use to connect to the server
|
|
51
|
+
* @param libraryUrls A list of urls which link to zip files containing libraries/resources
|
|
52
|
+
* @param useMutualizedProxy The language server proxy is used, so we only need to load configurations for language servers which are not mutualized
|
|
53
|
+
* @returns A language client manager
|
|
54
|
+
*/
|
|
55
|
+
declare function createLanguageClientManager(id: LanguageClientId, sessionId: string | undefined, languageServerAddress: string, getSecurityToken: () => Promise<string>, libraryUrls: string[], useMutualizedProxy?: boolean): LanguageClientManager;
|
|
56
|
+
declare function getAllLanguageClientManagers(): LanguageClientManager[];
|
|
57
|
+
declare function getAllLanguageClientManagersByTextDocument(textDocument: TextDocument): LanguageClientManager[];
|
|
58
|
+
export { createLanguageClientManager, getAllLanguageClientManagers, getAllLanguageClientManagersByTextDocument };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Disposable, LanguageClientOptions as MonacoLanguageClientOptions } from '@codingame/monaco-languageclient';
|
|
2
|
+
import { StaticLanguageClientId } from './staticOptions';
|
|
3
|
+
export declare type LanguageClientOptions = Pick<MonacoLanguageClientOptions, 'documentSelector' | 'synchronize' | 'initializationOptions' | 'middleware'> & {
|
|
4
|
+
vscodeExtensionIds?: string[];
|
|
5
|
+
mutualizable: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare function registerLanguageClient(id: string, options: LanguageClientOptions): Disposable;
|
|
8
|
+
export declare type LanguageClientId = StaticLanguageClientId | string;
|
|
9
|
+
export declare function getLanguageClientOptions(id: LanguageClientId): LanguageClientOptions;
|