@theia/plugin-ext 1.18.0 → 1.21.0-next.12
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/README.md +5 -0
- package/lib/common/connection.d.ts +47 -34
- package/lib/common/connection.d.ts.map +1 -1
- package/lib/common/connection.js +90 -28
- package/lib/common/connection.js.map +1 -1
- package/lib/common/plugin-api-rpc-model.d.ts +2 -0
- package/lib/common/plugin-api-rpc-model.d.ts.map +1 -1
- package/lib/common/plugin-api-rpc-model.js.map +1 -1
- package/lib/common/plugin-api-rpc.d.ts +10 -11
- package/lib/common/plugin-api-rpc.d.ts.map +1 -1
- package/lib/common/plugin-api-rpc.js.map +1 -1
- package/lib/common/plugin-protocol.d.ts +3 -1
- package/lib/common/plugin-protocol.d.ts.map +1 -1
- package/lib/common/plugin-protocol.js.map +1 -1
- package/lib/hosted/browser/hosted-plugin.d.ts +4 -5
- package/lib/hosted/browser/hosted-plugin.d.ts.map +1 -1
- package/lib/hosted/browser/hosted-plugin.js +18 -14
- package/lib/hosted/browser/hosted-plugin.js.map +1 -1
- package/lib/hosted/node/hosted-plugin-deployer-handler.d.ts +1 -1
- package/lib/hosted/node/hosted-plugin-deployer-handler.d.ts.map +1 -1
- package/lib/hosted/node/hosted-plugin-deployer-handler.js +14 -38
- package/lib/hosted/node/hosted-plugin-deployer-handler.js.map +1 -1
- package/lib/hosted/node/hosted-plugin-localization-service.d.ts +37 -0
- package/lib/hosted/node/hosted-plugin-localization-service.d.ts.map +1 -0
- package/lib/hosted/node/hosted-plugin-localization-service.js +197 -0
- package/lib/hosted/node/hosted-plugin-localization-service.js.map +1 -0
- package/lib/hosted/node/hosted-plugin-process.d.ts +2 -2
- package/lib/hosted/node/hosted-plugin-process.d.ts.map +1 -1
- package/lib/hosted/node/hosted-plugin-process.js +5 -7
- package/lib/hosted/node/hosted-plugin-process.js.map +1 -1
- package/lib/hosted/node/plugin-ext-hosted-backend-module.d.ts.map +1 -1
- package/lib/hosted/node/plugin-ext-hosted-backend-module.js +2 -0
- package/lib/hosted/node/plugin-ext-hosted-backend-module.js.map +1 -1
- package/lib/hosted/node/plugin-manifest-loader.d.ts +1 -1
- package/lib/hosted/node/plugin-manifest-loader.d.ts.map +1 -1
- package/lib/hosted/node/plugin-manifest-loader.js +4 -52
- package/lib/hosted/node/plugin-manifest-loader.js.map +1 -1
- package/lib/hosted/node/plugin-service.d.ts +3 -6
- package/lib/hosted/node/plugin-service.d.ts.map +1 -1
- package/lib/hosted/node/plugin-service.js +7 -40
- package/lib/hosted/node/plugin-service.js.map +1 -1
- package/lib/hosted/node/scanners/scanner-theia.d.ts +1 -1
- package/lib/hosted/node/scanners/scanner-theia.d.ts.map +1 -1
- package/lib/hosted/node/scanners/scanner-theia.js +5 -1
- package/lib/hosted/node/scanners/scanner-theia.js.map +1 -1
- package/lib/main/browser/callhierarchy/callhierarchy-type-converters.d.ts.map +1 -1
- package/lib/main/browser/callhierarchy/callhierarchy-type-converters.js +5 -2
- package/lib/main/browser/callhierarchy/callhierarchy-type-converters.js.map +1 -1
- package/lib/main/browser/custom-editors/custom-editor-opener.d.ts +1 -2
- package/lib/main/browser/custom-editors/custom-editor-opener.d.ts.map +1 -1
- package/lib/main/browser/custom-editors/custom-editor-opener.js.map +1 -1
- package/lib/main/browser/custom-editors/custom-editors-main.d.ts.map +1 -1
- package/lib/main/browser/custom-editors/custom-editors-main.js +1 -2
- package/lib/main/browser/custom-editors/custom-editors-main.js.map +1 -1
- package/lib/main/browser/debug/debug-main.d.ts +3 -3
- package/lib/main/browser/debug/debug-main.d.ts.map +1 -1
- package/lib/main/browser/debug/debug-main.js +2 -3
- package/lib/main/browser/debug/debug-main.js.map +1 -1
- package/lib/main/browser/debug/plugin-debug-session-factory.d.ts +6 -6
- package/lib/main/browser/debug/plugin-debug-session-factory.d.ts.map +1 -1
- package/lib/main/browser/debug/plugin-debug-session-factory.js +1 -1
- package/lib/main/browser/debug/plugin-debug-session-factory.js.map +1 -1
- package/lib/main/browser/dialogs/modal-notification.d.ts +3 -3
- package/lib/main/browser/dialogs/modal-notification.d.ts.map +1 -1
- package/lib/main/browser/dialogs/modal-notification.js +17 -6
- package/lib/main/browser/dialogs/modal-notification.js.map +1 -1
- package/lib/main/browser/editors-and-documents-main.d.ts.map +1 -1
- package/lib/main/browser/editors-and-documents-main.js +3 -4
- package/lib/main/browser/editors-and-documents-main.js.map +1 -1
- package/lib/main/browser/file-system-main-impl.js +1 -1
- package/lib/main/browser/file-system-main-impl.js.map +1 -1
- package/lib/main/browser/languages-main.js +1 -1
- package/lib/main/browser/languages-main.js.map +1 -1
- package/lib/main/browser/main-context.js +2 -2
- package/lib/main/browser/main-context.js.map +1 -1
- package/lib/main/browser/message-registry-main.js +1 -1
- package/lib/main/browser/message-registry-main.js.map +1 -1
- package/lib/main/browser/quick-open-main.d.ts +1 -1
- package/lib/main/browser/quick-open-main.d.ts.map +1 -1
- package/lib/main/browser/quick-open-main.js.map +1 -1
- package/lib/main/browser/tasks-main.d.ts.map +1 -1
- package/lib/main/browser/tasks-main.js +6 -0
- package/lib/main/browser/tasks-main.js.map +1 -1
- package/lib/main/browser/timeline-main.d.ts.map +1 -1
- package/lib/main/browser/timeline-main.js +1 -1
- package/lib/main/browser/timeline-main.js.map +1 -1
- package/lib/main/browser/view/plugin-view-registry.d.ts +3 -2
- package/lib/main/browser/view/plugin-view-registry.d.ts.map +1 -1
- package/lib/main/browser/view/plugin-view-registry.js +77 -26
- package/lib/main/browser/view/plugin-view-registry.js.map +1 -1
- package/lib/main/browser/view/plugin-view-widget.d.ts +2 -0
- package/lib/main/browser/view/plugin-view-widget.d.ts.map +1 -1
- package/lib/main/browser/view/plugin-view-widget.js +3 -1
- package/lib/main/browser/view/plugin-view-widget.js.map +1 -1
- package/lib/main/browser/view/tree-view-widget.d.ts +3 -7
- package/lib/main/browser/view/tree-view-widget.d.ts.map +1 -1
- package/lib/main/browser/view/tree-view-widget.js +26 -39
- package/lib/main/browser/view/tree-view-widget.js.map +1 -1
- package/lib/main/browser/webview/webview-frontend-security-warnings.d.ts.map +1 -1
- package/lib/main/browser/webview/webview-frontend-security-warnings.js +8 -5
- package/lib/main/browser/webview/webview-frontend-security-warnings.js.map +1 -1
- package/lib/main/browser/webview/webview-preferences.d.ts.map +1 -1
- package/lib/main/browser/webview/webview-preferences.js +3 -2
- package/lib/main/browser/webview/webview-preferences.js.map +1 -1
- package/lib/main/browser/webview/webview.d.ts +1 -1
- package/lib/main/browser/webview/webview.d.ts.map +1 -1
- package/lib/main/browser/webview/webview.js +1 -1
- package/lib/main/browser/webview/webview.js.map +1 -1
- package/lib/plugin/comments.d.ts.map +1 -1
- package/lib/plugin/comments.js +2 -3
- package/lib/plugin/comments.js.map +1 -1
- package/lib/plugin/custom-editors.d.ts +1 -2
- package/lib/plugin/custom-editors.d.ts.map +1 -1
- package/lib/plugin/custom-editors.js +2 -3
- package/lib/plugin/custom-editors.js.map +1 -1
- package/lib/plugin/decorations.d.ts.map +1 -1
- package/lib/plugin/decorations.js +2 -3
- package/lib/plugin/decorations.js.map +1 -1
- package/lib/plugin/document-data.d.ts.map +1 -1
- package/lib/plugin/document-data.js +1 -1
- package/lib/plugin/document-data.js.map +1 -1
- package/lib/plugin/documents.d.ts.map +1 -1
- package/lib/plugin/documents.js +1 -2
- package/lib/plugin/documents.js.map +1 -1
- package/lib/plugin/file-system-event-service-ext-impl.d.ts.map +1 -1
- package/lib/plugin/file-system-event-service-ext-impl.js +2 -3
- package/lib/plugin/file-system-event-service-ext-impl.js.map +1 -1
- package/lib/plugin/file-system-ext-impl.d.ts.map +1 -1
- package/lib/plugin/file-system-ext-impl.js +12 -13
- package/lib/plugin/file-system-ext-impl.js.map +1 -1
- package/lib/plugin/known-commands.spec.js +1 -2
- package/lib/plugin/known-commands.spec.js.map +1 -1
- package/lib/plugin/languages/call-hierarchy.d.ts +1 -1
- package/lib/plugin/languages/call-hierarchy.d.ts.map +1 -1
- package/lib/plugin/languages/call-hierarchy.js +7 -3
- package/lib/plugin/languages/call-hierarchy.js.map +1 -1
- package/lib/plugin/languages/rename.d.ts +1 -2
- package/lib/plugin/languages/rename.d.ts.map +1 -1
- package/lib/plugin/languages/rename.js.map +1 -1
- package/lib/plugin/languages.d.ts +1 -1
- package/lib/plugin/languages.d.ts.map +1 -1
- package/lib/plugin/languages.js.map +1 -1
- package/lib/plugin/message-registry.d.ts.map +1 -1
- package/lib/plugin/message-registry.js +3 -0
- package/lib/plugin/message-registry.js.map +1 -1
- package/lib/plugin/node/debug/debug.d.ts +4 -4
- package/lib/plugin/node/debug/debug.d.ts.map +1 -1
- package/lib/plugin/node/debug/debug.js +13 -8
- package/lib/plugin/node/debug/debug.js.map +1 -1
- package/lib/plugin/node/debug/plugin-debug-adapter-session.d.ts +7 -7
- package/lib/plugin/node/debug/plugin-debug-adapter-session.d.ts.map +1 -1
- package/lib/plugin/node/debug/plugin-debug-adapter-session.js +6 -6
- package/lib/plugin/node/debug/plugin-debug-adapter-session.js.map +1 -1
- package/lib/plugin/node/debug/plugin-debug-adapter-starter.d.ts +8 -4
- package/lib/plugin/node/debug/plugin-debug-adapter-starter.d.ts.map +1 -1
- package/lib/plugin/node/debug/plugin-debug-adapter-starter.js +16 -13
- package/lib/plugin/node/debug/plugin-debug-adapter-starter.js.map +1 -1
- package/lib/plugin/plugin-context.d.ts.map +1 -1
- package/lib/plugin/plugin-context.js +5 -4
- package/lib/plugin/plugin-context.js.map +1 -1
- package/lib/plugin/plugin-storage.d.ts.map +1 -1
- package/lib/plugin/plugin-storage.js.map +1 -1
- package/lib/plugin/preference-registry.spec.js.map +1 -1
- package/lib/plugin/quick-open.d.ts +1 -1
- package/lib/plugin/quick-open.d.ts.map +1 -1
- package/lib/plugin/quick-open.js +11 -6
- package/lib/plugin/quick-open.js.map +1 -1
- package/lib/plugin/tasks/tasks.d.ts +1 -3
- package/lib/plugin/tasks/tasks.d.ts.map +1 -1
- package/lib/plugin/tasks/tasks.js +3 -17
- package/lib/plugin/tasks/tasks.js.map +1 -1
- package/lib/plugin/timeline.d.ts.map +1 -1
- package/lib/plugin/timeline.js +1 -2
- package/lib/plugin/timeline.js.map +1 -1
- package/lib/plugin/type-converters.d.ts.map +1 -1
- package/lib/plugin/type-converters.js +10 -7
- package/lib/plugin/type-converters.js.map +1 -1
- package/lib/plugin/types-impl.d.ts +34 -0
- package/lib/plugin/types-impl.d.ts.map +1 -1
- package/lib/plugin/types-impl.js +61 -1
- package/lib/plugin/types-impl.js.map +1 -1
- package/lib/plugin/webviews.d.ts +1 -2
- package/lib/plugin/webviews.d.ts.map +1 -1
- package/lib/plugin/webviews.js.map +1 -1
- package/package.json +26 -24
- package/src/common/connection.ts +98 -42
- package/src/common/plugin-api-rpc-model.ts +2 -0
- package/src/common/plugin-api-rpc.ts +10 -11
- package/src/common/plugin-protocol.ts +3 -2
- package/src/hosted/browser/hosted-plugin.ts +17 -12
- package/src/hosted/node/hosted-plugin-deployer-handler.ts +13 -40
- package/src/hosted/node/hosted-plugin-localization-service.ts +201 -0
- package/src/hosted/node/hosted-plugin-process.ts +4 -6
- package/src/hosted/node/plugin-ext-hosted-backend-module.ts +2 -0
- package/src/hosted/node/plugin-manifest-loader.ts +4 -56
- package/src/hosted/node/plugin-service.ts +7 -40
- package/src/hosted/node/scanners/scanner-theia.ts +6 -3
- package/src/main/browser/callhierarchy/callhierarchy-type-converters.ts +5 -2
- package/src/main/browser/custom-editors/custom-editor-opener.tsx +1 -2
- package/src/main/browser/custom-editors/custom-editors-main.ts +1 -2
- package/src/main/browser/debug/debug-main.ts +4 -5
- package/src/main/browser/debug/plugin-debug-session-factory.ts +6 -6
- package/src/main/browser/dialogs/modal-notification.ts +18 -7
- package/src/main/browser/dialogs/style/modal-notification.css +17 -2
- package/src/main/browser/editors-and-documents-main.ts +1 -2
- package/src/main/browser/file-system-main-impl.ts +1 -1
- package/src/main/browser/languages-main.ts +1 -1
- package/src/main/browser/main-context.ts +3 -3
- package/src/main/browser/message-registry-main.ts +1 -1
- package/src/main/browser/quick-open-main.ts +1 -1
- package/src/main/browser/style/tree.css +4 -0
- package/src/main/browser/tasks-main.ts +7 -0
- package/src/main/browser/timeline-main.ts +1 -2
- package/src/main/browser/view/plugin-view-registry.ts +83 -28
- package/src/main/browser/view/plugin-view-widget.ts +7 -2
- package/src/main/browser/view/tree-view-widget.tsx +43 -65
- package/src/main/browser/webview/pre/host.js +3 -4
- package/src/main/browser/webview/webview-frontend-security-warnings.ts +8 -7
- package/src/main/browser/webview/webview-preferences.ts +3 -2
- package/src/main/browser/webview/webview.ts +1 -1
- package/src/plugin/comments.ts +1 -2
- package/src/plugin/custom-editors.ts +2 -4
- package/src/plugin/decorations.ts +1 -2
- package/src/plugin/document-data.ts +1 -2
- package/src/plugin/documents.ts +1 -2
- package/src/plugin/file-system-event-service-ext-impl.ts +1 -2
- package/src/plugin/file-system-ext-impl.ts +1 -2
- package/src/plugin/known-commands.spec.ts +1 -2
- package/src/plugin/languages/call-hierarchy.ts +13 -5
- package/src/plugin/languages/rename.ts +1 -2
- package/src/plugin/languages.ts +3 -1
- package/src/plugin/message-registry.ts +3 -1
- package/src/plugin/node/debug/debug.ts +20 -14
- package/src/plugin/node/debug/plugin-debug-adapter-session.ts +9 -9
- package/src/plugin/node/debug/plugin-debug-adapter-starter.ts +17 -14
- package/src/plugin/plugin-context.ts +10 -7
- package/src/plugin/plugin-storage.ts +1 -2
- package/src/plugin/preference-registry.spec.ts +1 -2
- package/src/plugin/quick-open.ts +14 -10
- package/src/plugin/tasks/tasks.ts +4 -18
- package/src/plugin/timeline.ts +1 -2
- package/src/plugin/type-converters.ts +12 -8
- package/src/plugin/types-impl.ts +53 -0
- package/src/plugin/webviews.ts +1 -2
- package/lib/common/plugin-message-reader.d.ts +0 -46
- package/lib/common/plugin-message-reader.d.ts.map +0 -1
- package/lib/common/plugin-message-reader.js +0 -116
- package/lib/common/plugin-message-reader.js.map +0 -1
- package/lib/common/plugin-message-writer.d.ts +0 -38
- package/lib/common/plugin-message-writer.d.ts.map +0 -1
- package/lib/common/plugin-message-writer.js +0 -67
- package/lib/common/plugin-message-writer.js.map +0 -1
- package/lib/main/browser/connection-main.d.ts +0 -59
- package/lib/main/browser/connection-main.d.ts.map +0 -1
- package/lib/main/browser/connection-main.js +0 -98
- package/lib/main/browser/connection-main.js.map +0 -1
- package/lib/plugin/connection-ext.d.ts +0 -56
- package/lib/plugin/connection-ext.d.ts.map +0 -1
- package/lib/plugin/connection-ext.js +0 -88
- package/lib/plugin/connection-ext.js.map +0 -1
- package/src/common/plugin-message-reader.ts +0 -111
- package/src/common/plugin-message-writer.ts +0 -65
- package/src/main/browser/connection-main.ts +0 -107
- package/src/plugin/connection-ext.ts +0 -95
package/src/plugin/webviews.ts
CHANGED
|
@@ -15,10 +15,9 @@
|
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
|
|
17
17
|
import { v4 } from 'uuid';
|
|
18
|
-
import { WebviewsExt, WebviewPanelViewState, WebviewsMain, PLUGIN_RPC_CONTEXT, WebviewInitData, /* WebviewsMain, PLUGIN_RPC_CONTEXT */ } from '../common/plugin-api-rpc';
|
|
18
|
+
import { Plugin, WebviewsExt, WebviewPanelViewState, WebviewsMain, PLUGIN_RPC_CONTEXT, WebviewInitData, /* WebviewsMain, PLUGIN_RPC_CONTEXT */ } from '../common/plugin-api-rpc';
|
|
19
19
|
import * as theia from '@theia/plugin';
|
|
20
20
|
import { RPCProtocol } from '../common/rpc-protocol';
|
|
21
|
-
import { Plugin } from '../common/plugin-api-rpc';
|
|
22
21
|
import { Emitter, Event } from '@theia/core/lib/common/event';
|
|
23
22
|
import { fromViewColumn, toViewColumn, toWebviewPanelShowOptions } from './type-converters';
|
|
24
23
|
import { Disposable, WebviewPanelTargetArea, URI } from './types-impl';
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/********************************************************************************
|
|
2
|
-
* Copyright (C) 2018 Red Hat, Inc. and others.
|
|
3
|
-
*
|
|
4
|
-
* This program and the accompanying materials are made available under the
|
|
5
|
-
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
-
* http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
-
*
|
|
8
|
-
* This Source Code may also be made available under the following Secondary
|
|
9
|
-
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
-
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
-
* with the GNU Classpath Exception which is available at
|
|
12
|
-
* https://www.gnu.org/software/classpath/license.html.
|
|
13
|
-
*
|
|
14
|
-
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
|
-
********************************************************************************/
|
|
16
|
-
import { DataCallback, Emitter, Event, PartialMessageInfo } from '@theia/core/shared/vscode-ws-jsonrpc';
|
|
17
|
-
export declare abstract class AbstractMessageReader {
|
|
18
|
-
protected errorEmitter: Emitter<Error>;
|
|
19
|
-
protected closeEmitter: Emitter<void>;
|
|
20
|
-
protected partialMessageEmitter: Emitter<PartialMessageInfo>;
|
|
21
|
-
dispose(): void;
|
|
22
|
-
get onError(): Event<Error>;
|
|
23
|
-
fireError(error: Error): void;
|
|
24
|
-
get onClose(): Event<void>;
|
|
25
|
-
fireClose(): void;
|
|
26
|
-
get onPartialMessage(): Event<PartialMessageInfo>;
|
|
27
|
-
firePartialMessage(info: PartialMessageInfo): void;
|
|
28
|
-
asError(error: any): Error;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Support for reading string message through RPC protocol.
|
|
32
|
-
*/
|
|
33
|
-
export declare class PluginMessageReader extends AbstractMessageReader {
|
|
34
|
-
protected state: 'initial' | 'listening' | 'closed';
|
|
35
|
-
protected callback: DataCallback | undefined;
|
|
36
|
-
protected readonly events: {
|
|
37
|
-
message?: any;
|
|
38
|
-
error?: any;
|
|
39
|
-
}[];
|
|
40
|
-
constructor();
|
|
41
|
-
listen(callback: DataCallback): void;
|
|
42
|
-
readMessage(message: string): void;
|
|
43
|
-
fireError(error: any): void;
|
|
44
|
-
fireClose(): void;
|
|
45
|
-
}
|
|
46
|
-
//# sourceMappingURL=plugin-message-reader.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-message-reader.d.ts","sourceRoot":"","sources":["../../src/common/plugin-message-reader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAExG,8BAAsB,qBAAqB;IACvC,SAAS,CAAC,YAAY,iBAAwB;IAC9C,SAAS,CAAC,YAAY,gBAAuB;IAC7C,SAAS,CAAC,qBAAqB,8BAAqC;IACpE,OAAO,IAAI,IAAI;IAIf,IAAI,OAAO,IAAI,KAAK,CAAC,KAAK,CAAC,CAE1B;IACD,SAAS,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAG7B,IAAI,OAAO,IAAI,KAAK,CAAC,IAAI,CAAC,CAEzB;IACD,SAAS,IAAI,IAAI;IAGjB,IAAI,gBAAgB,IAAI,KAAK,CAAC,kBAAkB,CAAC,CAEhD;IACD,kBAAkB,CAAC,IAAI,EAAE,kBAAkB,GAAG,IAAI;IAIlD,OAAO,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK;CAO7B;AAED;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,qBAAqB;IAC1D,SAAS,CAAC,KAAK,EAAE,SAAS,GAAG,WAAW,GAAG,QAAQ,CAAa;IAChE,SAAS,CAAC,QAAQ,EAAE,YAAY,GAAG,SAAS,CAAC;IAE7C,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE;QAAE,OAAO,CAAC,EAAE,GAAG,CAAC;QAAC,KAAK,CAAC,EAAE,GAAG,CAAA;KAAE,EAAE,CAAM;;IAMjE,MAAM,CAAC,QAAQ,EAAE,YAAY,GAAG,IAAI;IAiBpC,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAUlC,SAAS,CAAC,KAAK,EAAE,GAAG,GAAG,IAAI;IAQ3B,SAAS,IAAI,IAAI;CAQpB"}
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/********************************************************************************
|
|
3
|
-
* Copyright (C) 2018 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.PluginMessageReader = exports.AbstractMessageReader = void 0;
|
|
19
|
-
const vscode_ws_jsonrpc_1 = require("@theia/core/shared/vscode-ws-jsonrpc");
|
|
20
|
-
class AbstractMessageReader {
|
|
21
|
-
constructor() {
|
|
22
|
-
this.errorEmitter = new vscode_ws_jsonrpc_1.Emitter();
|
|
23
|
-
this.closeEmitter = new vscode_ws_jsonrpc_1.Emitter();
|
|
24
|
-
this.partialMessageEmitter = new vscode_ws_jsonrpc_1.Emitter();
|
|
25
|
-
}
|
|
26
|
-
dispose() {
|
|
27
|
-
this.errorEmitter.dispose();
|
|
28
|
-
this.closeEmitter.dispose();
|
|
29
|
-
}
|
|
30
|
-
get onError() {
|
|
31
|
-
return this.errorEmitter.event;
|
|
32
|
-
}
|
|
33
|
-
fireError(error) {
|
|
34
|
-
this.errorEmitter.fire(this.asError(error));
|
|
35
|
-
}
|
|
36
|
-
get onClose() {
|
|
37
|
-
return this.closeEmitter.event;
|
|
38
|
-
}
|
|
39
|
-
fireClose() {
|
|
40
|
-
this.closeEmitter.fire(undefined);
|
|
41
|
-
}
|
|
42
|
-
get onPartialMessage() {
|
|
43
|
-
return this.partialMessageEmitter.event;
|
|
44
|
-
}
|
|
45
|
-
firePartialMessage(info) {
|
|
46
|
-
this.partialMessageEmitter.fire(info);
|
|
47
|
-
}
|
|
48
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
49
|
-
asError(error) {
|
|
50
|
-
if (error instanceof Error) {
|
|
51
|
-
return error;
|
|
52
|
-
}
|
|
53
|
-
else {
|
|
54
|
-
return new Error(`Reader received error. Reason: ${typeof error.message === 'string' ? error.message : 'unknown'}`);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
exports.AbstractMessageReader = AbstractMessageReader;
|
|
59
|
-
/**
|
|
60
|
-
* Support for reading string message through RPC protocol.
|
|
61
|
-
*/
|
|
62
|
-
class PluginMessageReader extends AbstractMessageReader {
|
|
63
|
-
constructor() {
|
|
64
|
-
super();
|
|
65
|
-
this.state = 'initial';
|
|
66
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
67
|
-
this.events = [];
|
|
68
|
-
}
|
|
69
|
-
listen(callback) {
|
|
70
|
-
if (this.state === 'initial') {
|
|
71
|
-
this.state = 'listening';
|
|
72
|
-
this.callback = callback;
|
|
73
|
-
while (this.events.length !== 0) {
|
|
74
|
-
const event = this.events.pop();
|
|
75
|
-
if (event.message) {
|
|
76
|
-
this.readMessage(event.message);
|
|
77
|
-
}
|
|
78
|
-
else if (event.error) {
|
|
79
|
-
this.fireError(event.error);
|
|
80
|
-
}
|
|
81
|
-
else {
|
|
82
|
-
this.fireClose();
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
readMessage(message) {
|
|
88
|
-
if (this.state === 'initial') {
|
|
89
|
-
this.events.splice(0, 0, { message });
|
|
90
|
-
}
|
|
91
|
-
else if (this.state === 'listening') {
|
|
92
|
-
const data = JSON.parse(message);
|
|
93
|
-
this.callback(data);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
97
|
-
fireError(error) {
|
|
98
|
-
if (this.state === 'initial') {
|
|
99
|
-
this.events.splice(0, 0, { error });
|
|
100
|
-
}
|
|
101
|
-
else if (this.state === 'listening') {
|
|
102
|
-
super.fireError(error);
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
fireClose() {
|
|
106
|
-
if (this.state === 'initial') {
|
|
107
|
-
this.events.splice(0, 0, {});
|
|
108
|
-
}
|
|
109
|
-
else if (this.state === 'listening') {
|
|
110
|
-
super.fireClose();
|
|
111
|
-
}
|
|
112
|
-
this.state = 'closed';
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
exports.PluginMessageReader = PluginMessageReader;
|
|
116
|
-
//# sourceMappingURL=plugin-message-reader.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-message-reader.js","sourceRoot":"","sources":["../../src/common/plugin-message-reader.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;AAElF,4EAAwG;AAExG,MAAsB,qBAAqB;IAA3C;QACc,iBAAY,GAAG,IAAI,2BAAO,EAAS,CAAC;QACpC,iBAAY,GAAG,IAAI,2BAAO,EAAQ,CAAC;QACnC,0BAAqB,GAAG,IAAI,2BAAO,EAAsB,CAAC;IA+BxE,CAAC;IA9BG,OAAO;QACH,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC;QAC5B,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC;IAChC,CAAC;IACD,IAAI,OAAO;QACP,OAAO,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC;IACnC,CAAC;IACD,SAAS,CAAC,KAAY;QAClB,IAAI,CAAC,YAAY,CAAC,IAAI,CAA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********************************************************************************
|
|
2
|
-
* Copyright (C) 2018 Red Hat, Inc. and others.
|
|
3
|
-
*
|
|
4
|
-
* This program and the accompanying materials are made available under the
|
|
5
|
-
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
-
* http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
-
*
|
|
8
|
-
* This Source Code may also be made available under the following Secondary
|
|
9
|
-
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
-
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
-
* with the GNU Classpath Exception which is available at
|
|
12
|
-
* https://www.gnu.org/software/classpath/license.html.
|
|
13
|
-
*
|
|
14
|
-
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
|
-
********************************************************************************/
|
|
16
|
-
import { Message, MessageWriter, Emitter, Event } from '@theia/core/shared/vscode-ws-jsonrpc';
|
|
17
|
-
import { ConnectionMain, ConnectionExt } from './plugin-api-rpc';
|
|
18
|
-
export declare abstract class AbstractMessageWriter {
|
|
19
|
-
protected errorEmitter: Emitter<[Error, Message | undefined, number | undefined]>;
|
|
20
|
-
protected closeEmitter: Emitter<void>;
|
|
21
|
-
dispose(): void;
|
|
22
|
-
get onError(): Event<[Error, Message | undefined, number | undefined]>;
|
|
23
|
-
fireError(error: Error, message: Message | undefined, count: number | undefined): void;
|
|
24
|
-
get onClose(): Event<void>;
|
|
25
|
-
fireClose(): void;
|
|
26
|
-
asError(error: any): Error;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Support for writing string message through RPC protocol.
|
|
30
|
-
*/
|
|
31
|
-
export declare class PluginMessageWriter extends AbstractMessageWriter implements MessageWriter {
|
|
32
|
-
protected readonly id: string;
|
|
33
|
-
protected readonly proxy: ConnectionMain | ConnectionExt;
|
|
34
|
-
constructor(id: string, proxy: ConnectionMain | ConnectionExt);
|
|
35
|
-
write(message: string): void;
|
|
36
|
-
write(message: Message): void;
|
|
37
|
-
}
|
|
38
|
-
//# sourceMappingURL=plugin-message-writer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-message-writer.d.ts","sourceRoot":"","sources":["../../src/common/plugin-message-writer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAC9F,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjE,8BAAsB,qBAAqB;IACvC,SAAS,CAAC,YAAY,4DAAmE;IACzF,SAAS,CAAC,YAAY,gBAAuB;IAC7C,OAAO,IAAI,IAAI;IAIf,IAAI,OAAO,IAAI,KAAK,CAAC,CAAC,KAAK,EAAE,OAAO,GAAG,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,CAErE;IACD,SAAS,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,GAAG,SAAS,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI;IAGtF,IAAI,OAAO,IAAI,KAAK,CAAC,IAAI,CAAC,CAEzB;IACD,SAAS,IAAI,IAAI;IAIjB,OAAO,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK;CAO7B;AAED;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,qBAAsB,YAAW,aAAa;IAE/E,SAAS,CAAC,QAAQ,CAAC,EAAE,EAAE,MAAM;IAC7B,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,cAAc,GAAG,aAAa;gBADrC,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,cAAc,GAAG,aAAa;IAI5D,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAC5B,KAAK,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;CAKhC"}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/********************************************************************************
|
|
3
|
-
* Copyright (C) 2018 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.PluginMessageWriter = exports.AbstractMessageWriter = void 0;
|
|
19
|
-
const vscode_ws_jsonrpc_1 = require("@theia/core/shared/vscode-ws-jsonrpc");
|
|
20
|
-
class AbstractMessageWriter {
|
|
21
|
-
constructor() {
|
|
22
|
-
this.errorEmitter = new vscode_ws_jsonrpc_1.Emitter();
|
|
23
|
-
this.closeEmitter = new vscode_ws_jsonrpc_1.Emitter();
|
|
24
|
-
}
|
|
25
|
-
dispose() {
|
|
26
|
-
this.errorEmitter.dispose();
|
|
27
|
-
this.closeEmitter.dispose();
|
|
28
|
-
}
|
|
29
|
-
get onError() {
|
|
30
|
-
return this.errorEmitter.event;
|
|
31
|
-
}
|
|
32
|
-
fireError(error, message, count) {
|
|
33
|
-
this.errorEmitter.fire([this.asError(error), message, count]);
|
|
34
|
-
}
|
|
35
|
-
get onClose() {
|
|
36
|
-
return this.closeEmitter.event;
|
|
37
|
-
}
|
|
38
|
-
fireClose() {
|
|
39
|
-
this.closeEmitter.fire(undefined);
|
|
40
|
-
}
|
|
41
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
42
|
-
asError(error) {
|
|
43
|
-
if (error instanceof Error) {
|
|
44
|
-
return error;
|
|
45
|
-
}
|
|
46
|
-
else {
|
|
47
|
-
return new Error(`Writer received error. Reason: ${typeof error.message === 'string' ? error.message : 'unknown'}`);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
exports.AbstractMessageWriter = AbstractMessageWriter;
|
|
52
|
-
/**
|
|
53
|
-
* Support for writing string message through RPC protocol.
|
|
54
|
-
*/
|
|
55
|
-
class PluginMessageWriter extends AbstractMessageWriter {
|
|
56
|
-
constructor(id, proxy) {
|
|
57
|
-
super();
|
|
58
|
-
this.id = id;
|
|
59
|
-
this.proxy = proxy;
|
|
60
|
-
}
|
|
61
|
-
write(arg) {
|
|
62
|
-
const content = JSON.stringify(arg);
|
|
63
|
-
this.proxy.$sendMessage(this.id, content);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
exports.PluginMessageWriter = PluginMessageWriter;
|
|
67
|
-
//# sourceMappingURL=plugin-message-writer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-message-writer.js","sourceRoot":"","sources":["../../src/common/plugin-message-writer.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;AAElF,4EAA8F;AAG9F,MAAsB,qBAAqB;IAA3C;QACc,iBAAY,GAAG,IAAI,2BAAO,EAAoD,CAAC;QAC/E,iBAAY,GAAG,IAAI,2BAAO,EAAQ,CAAC;IAyBjD,CAAC;IAxBG,OAAO;QACH,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC;QAC5B,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC;IAChC,CAAC;IACD,IAAI,OAAO;QACP,OAAO,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC;IACnC,CAAC;IACD,SAAS,CAAC,KAAY,EAAE,OAA4B,EAAE,KAAyB;QAC3E,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC;IAClE,CAAC;IACD,IAAI,OAAO;QACP,OAAO,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC;IACnC,CAAC;IACD,SAAS;QACL,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACtC,CAAC;IACD,8DAA8D;IAC9D,OAAO,CAAC,KAAU;QACd,IAAI,KAAK,YAAY,KAAK,EAAE;YACxB,OAAO,KAAK,CAAC;SAChB;aAAM;YACH,OAAO,IAAI,KAAK,CAAC,kCAAkC,OAAO,KAAK,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC;SACvH;IACL,CAAC;CACJ;AA3BD,sDA2BC;AAED;;GAEG;AACH,MAAa,mBAAoB,SAAQ,qBAAqB;IAC1D,YACuB,EAAU,EACV,KAAqC;QACxD,KAAK,EAAE,CAAC;QAFW,OAAE,GAAF,EAAE,CAAQ;QACV,UAAK,GAAL,KAAK,CAAgC;IAE5D,CAAC;IAID,KAAK,CAAC,GAAqB;QACvB,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;QACpC,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;IAC9C,CAAC;CACJ;AAbD,kDAaC"}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
/********************************************************************************
|
|
2
|
-
* Copyright (C) 2018 Red Hat, Inc. and others.
|
|
3
|
-
*
|
|
4
|
-
* This program and the accompanying materials are made available under the
|
|
5
|
-
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
-
* http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
-
*
|
|
8
|
-
* This Source Code may also be made available under the following Secondary
|
|
9
|
-
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
-
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
-
* with the GNU Classpath Exception which is available at
|
|
12
|
-
* https://www.gnu.org/software/classpath/license.html.
|
|
13
|
-
*
|
|
14
|
-
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
|
-
********************************************************************************/
|
|
16
|
-
import { Disposable } from '@theia/core/lib/common/disposable';
|
|
17
|
-
import { ConnectionMain } from '../../common/plugin-api-rpc';
|
|
18
|
-
import { RPCProtocol } from '../../common/rpc-protocol';
|
|
19
|
-
import { PluginConnection } from '../../common/connection';
|
|
20
|
-
/**
|
|
21
|
-
* Implementation of connection system of the plugin API.
|
|
22
|
-
* Creates holds the connections to the plugins. Allows to send a message to the plugin by getting already created connection via id.
|
|
23
|
-
*/
|
|
24
|
-
export declare class ConnectionMainImpl implements ConnectionMain, Disposable {
|
|
25
|
-
private readonly proxy;
|
|
26
|
-
private readonly connections;
|
|
27
|
-
private readonly toDispose;
|
|
28
|
-
constructor(rpc: RPCProtocol);
|
|
29
|
-
dispose(): void;
|
|
30
|
-
/**
|
|
31
|
-
* Gets the connection between plugin by id and sends string message to it.
|
|
32
|
-
*
|
|
33
|
-
* @param id connection's id
|
|
34
|
-
* @param message incoming message
|
|
35
|
-
*/
|
|
36
|
-
$sendMessage(id: string, message: string): Promise<void>;
|
|
37
|
-
/**
|
|
38
|
-
* Instantiates a new connection by the given id.
|
|
39
|
-
* @param id the connection id
|
|
40
|
-
*/
|
|
41
|
-
$createConnection(id: string): Promise<void>;
|
|
42
|
-
/**
|
|
43
|
-
* Deletes a connection.
|
|
44
|
-
* @param id the connection id
|
|
45
|
-
*/
|
|
46
|
-
$deleteConnection(id: string): Promise<void>;
|
|
47
|
-
/**
|
|
48
|
-
* Returns existed connection or creates a new one.
|
|
49
|
-
* @param id the connection id
|
|
50
|
-
*/
|
|
51
|
-
ensureConnection(id: string): Promise<PluginConnection>;
|
|
52
|
-
/**
|
|
53
|
-
* Returns existed connection or creates a new one.
|
|
54
|
-
* @param id the connection id
|
|
55
|
-
*/
|
|
56
|
-
doEnsureConnection(id: string): Promise<PluginConnection>;
|
|
57
|
-
protected doCreateConnection(id: string): Promise<PluginConnection>;
|
|
58
|
-
}
|
|
59
|
-
//# sourceMappingURL=connection-main.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"connection-main.d.ts","sourceRoot":"","sources":["../../../src/main/browser/connection-main.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAE,UAAU,EAAwB,MAAM,mCAAmC,CAAC;AACrF,OAAO,EAAoB,cAAc,EAAiB,MAAM,6BAA6B,CAAC;AAC9F,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAI3D;;;GAGG;AACH,qBAAa,kBAAmB,YAAW,cAAc,EAAE,UAAU;IAEjE,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAgB;IACtC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAuC;IACnE,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA8B;gBAC5C,GAAG,EAAE,WAAW;IAI5B,OAAO,IAAI,IAAI;IAIf;;;;;OAKG;IACG,YAAY,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQ9D;;;OAGG;IACG,iBAAiB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIlD;;;OAGG;IACG,iBAAiB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIlD;;;OAGG;IACG,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAM7D;;;OAGG;IACG,kBAAkB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;cAM/C,kBAAkB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;CAgB5E"}
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/********************************************************************************
|
|
3
|
-
* Copyright (C) 2018 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.ConnectionMainImpl = void 0;
|
|
19
|
-
const disposable_1 = require("@theia/core/lib/common/disposable");
|
|
20
|
-
const plugin_api_rpc_1 = require("../../common/plugin-api-rpc");
|
|
21
|
-
const connection_1 = require("../../common/connection");
|
|
22
|
-
const plugin_message_reader_1 = require("../../common/plugin-message-reader");
|
|
23
|
-
const plugin_message_writer_1 = require("../../common/plugin-message-writer");
|
|
24
|
-
/**
|
|
25
|
-
* Implementation of connection system of the plugin API.
|
|
26
|
-
* Creates holds the connections to the plugins. Allows to send a message to the plugin by getting already created connection via id.
|
|
27
|
-
*/
|
|
28
|
-
class ConnectionMainImpl {
|
|
29
|
-
constructor(rpc) {
|
|
30
|
-
this.connections = new Map();
|
|
31
|
-
this.toDispose = new disposable_1.DisposableCollection();
|
|
32
|
-
this.proxy = rpc.getProxy(plugin_api_rpc_1.MAIN_RPC_CONTEXT.CONNECTION_EXT);
|
|
33
|
-
}
|
|
34
|
-
dispose() {
|
|
35
|
-
this.toDispose.dispose();
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Gets the connection between plugin by id and sends string message to it.
|
|
39
|
-
*
|
|
40
|
-
* @param id connection's id
|
|
41
|
-
* @param message incoming message
|
|
42
|
-
*/
|
|
43
|
-
async $sendMessage(id, message) {
|
|
44
|
-
if (this.connections.has(id)) {
|
|
45
|
-
this.connections.get(id).reader.readMessage(message);
|
|
46
|
-
}
|
|
47
|
-
else {
|
|
48
|
-
console.warn('It is not possible to read message. Connection missed.');
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Instantiates a new connection by the given id.
|
|
53
|
-
* @param id the connection id
|
|
54
|
-
*/
|
|
55
|
-
async $createConnection(id) {
|
|
56
|
-
await this.doEnsureConnection(id);
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Deletes a connection.
|
|
60
|
-
* @param id the connection id
|
|
61
|
-
*/
|
|
62
|
-
async $deleteConnection(id) {
|
|
63
|
-
this.connections.delete(id);
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Returns existed connection or creates a new one.
|
|
67
|
-
* @param id the connection id
|
|
68
|
-
*/
|
|
69
|
-
async ensureConnection(id) {
|
|
70
|
-
const connection = await this.doEnsureConnection(id);
|
|
71
|
-
await this.proxy.$createConnection(id);
|
|
72
|
-
return connection;
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* Returns existed connection or creates a new one.
|
|
76
|
-
* @param id the connection id
|
|
77
|
-
*/
|
|
78
|
-
async doEnsureConnection(id) {
|
|
79
|
-
const connection = this.connections.get(id) || await this.doCreateConnection(id);
|
|
80
|
-
this.connections.set(id, connection);
|
|
81
|
-
return connection;
|
|
82
|
-
}
|
|
83
|
-
async doCreateConnection(id) {
|
|
84
|
-
const reader = new plugin_message_reader_1.PluginMessageReader();
|
|
85
|
-
const writer = new plugin_message_writer_1.PluginMessageWriter(id, this.proxy);
|
|
86
|
-
const connection = new connection_1.PluginConnection(reader, writer, () => {
|
|
87
|
-
this.connections.delete(id);
|
|
88
|
-
if (!toClose.disposed) {
|
|
89
|
-
this.proxy.$deleteConnection(id);
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
const toClose = new disposable_1.DisposableCollection(disposable_1.Disposable.create(() => reader.fireClose()));
|
|
93
|
-
this.toDispose.push(toClose);
|
|
94
|
-
return connection;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
exports.ConnectionMainImpl = ConnectionMainImpl;
|
|
98
|
-
//# sourceMappingURL=connection-main.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"connection-main.js","sourceRoot":"","sources":["../../../src/main/browser/connection-main.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;AAElF,kEAAqF;AACrF,gEAA8F;AAE9F,wDAA2D;AAC3D,8EAAyE;AACzE,8EAAyE;AAEzE;;;GAGG;AACH,MAAa,kBAAkB;IAK3B,YAAY,GAAgB;QAFX,gBAAW,GAAG,IAAI,GAAG,EAA4B,CAAC;QAClD,cAAS,GAAG,IAAI,iCAAoB,EAAE,CAAC;QAEpD,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC,QAAQ,CAAC,iCAAgB,CAAC,cAAc,CAAC,CAAC;IAC/D,CAAC;IAED,OAAO;QACH,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC;IAC7B,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,YAAY,CAAC,EAAU,EAAE,OAAe;QAC1C,IAAI,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE;YAC1B,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,EAAE,CAAE,CAAC,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;SACzD;aAAM;YACH,OAAO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AC,CAAC;aACpC;QACL,CAAC,CAAC,CAAC;QACP,MAAM,OAAO,GAAG,IAAI,iCAAoB,CAAC,uBAAU,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;QACtF,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC7B,OAAO,UAAU,CAAC;IACtB,CAAC;CACJ;AA/ED,gDA+EC"}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
/********************************************************************************
|
|
2
|
-
* Copyright (C) 2018 Red Hat, Inc. and others.
|
|
3
|
-
*
|
|
4
|
-
* This program and the accompanying materials are made available under the
|
|
5
|
-
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
-
* http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
-
*
|
|
8
|
-
* This Source Code may also be made available under the following Secondary
|
|
9
|
-
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
-
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
-
* with the GNU Classpath Exception which is available at
|
|
12
|
-
* https://www.gnu.org/software/classpath/license.html.
|
|
13
|
-
*
|
|
14
|
-
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
|
-
********************************************************************************/
|
|
16
|
-
import { ConnectionExt } from '../common/plugin-api-rpc';
|
|
17
|
-
import { RPCProtocol } from '../common/rpc-protocol';
|
|
18
|
-
import { PluginConnection } from '../common/connection';
|
|
19
|
-
/**
|
|
20
|
-
* Implementation of connection system of the plugin API.
|
|
21
|
-
* It allows to communicate with main side to send and read messages.
|
|
22
|
-
*/
|
|
23
|
-
export declare class ConnectionExtImpl implements ConnectionExt {
|
|
24
|
-
private proxy;
|
|
25
|
-
private connections;
|
|
26
|
-
constructor(rpc: RPCProtocol);
|
|
27
|
-
/**
|
|
28
|
-
* Gets the connection between plugin by id and sends string message to it.
|
|
29
|
-
*
|
|
30
|
-
* @param id connection's id
|
|
31
|
-
* @param message incoming message
|
|
32
|
-
*/
|
|
33
|
-
$sendMessage(id: string, message: string): Promise<void>;
|
|
34
|
-
/**
|
|
35
|
-
* Instantiates a new connection by the given id.
|
|
36
|
-
* @param id the connection id
|
|
37
|
-
*/
|
|
38
|
-
$createConnection(id: string): Promise<void>;
|
|
39
|
-
/**
|
|
40
|
-
* Deletes a connection.
|
|
41
|
-
* @param id the connection id
|
|
42
|
-
*/
|
|
43
|
-
$deleteConnection(id: string): Promise<void>;
|
|
44
|
-
/**
|
|
45
|
-
* Returns existed connection or creates a new one.
|
|
46
|
-
* @param id the connection id
|
|
47
|
-
*/
|
|
48
|
-
ensureConnection(id: string): Promise<PluginConnection>;
|
|
49
|
-
/**
|
|
50
|
-
* Returns existed connection or creates a new one.
|
|
51
|
-
* @param id the connection id
|
|
52
|
-
*/
|
|
53
|
-
doEnsureConnection(id: string): Promise<PluginConnection>;
|
|
54
|
-
protected doCreateConnection(id: string): Promise<PluginConnection>;
|
|
55
|
-
}
|
|
56
|
-
//# sourceMappingURL=connection-ext.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"connection-ext.d.ts","sourceRoot":"","sources":["../../src/plugin/connection-ext.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAE,aAAa,EAAsC,MAAM,0BAA0B,CAAC;AAC7F,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAIxD;;;GAGG;AACH,qBAAa,iBAAkB,YAAW,aAAa;IACnD,OAAO,CAAC,KAAK,CAAiB;IAC9B,OAAO,CAAC,WAAW,CAAuC;gBAC9C,GAAG,EAAE,WAAW;IAI5B;;;;;OAKG;IACG,YAAY,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQ9D;;;OAGG;IACG,iBAAiB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIlD;;;OAGG;IACG,iBAAiB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIlD;;;OAGG;IACG,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAM7D;;;OAGG;IACG,kBAAkB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;cAM/C,kBAAkB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;CAW5E"}
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/********************************************************************************
|
|
3
|
-
* Copyright (C) 2018 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.ConnectionExtImpl = void 0;
|
|
19
|
-
const plugin_api_rpc_1 = require("../common/plugin-api-rpc");
|
|
20
|
-
const connection_1 = require("../common/connection");
|
|
21
|
-
const plugin_message_reader_1 = require("../common/plugin-message-reader");
|
|
22
|
-
const plugin_message_writer_1 = require("../common/plugin-message-writer");
|
|
23
|
-
/**
|
|
24
|
-
* Implementation of connection system of the plugin API.
|
|
25
|
-
* It allows to communicate with main side to send and read messages.
|
|
26
|
-
*/
|
|
27
|
-
class ConnectionExtImpl {
|
|
28
|
-
constructor(rpc) {
|
|
29
|
-
this.connections = new Map();
|
|
30
|
-
this.proxy = rpc.getProxy(plugin_api_rpc_1.PLUGIN_RPC_CONTEXT.CONNECTION_MAIN);
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Gets the connection between plugin by id and sends string message to it.
|
|
34
|
-
*
|
|
35
|
-
* @param id connection's id
|
|
36
|
-
* @param message incoming message
|
|
37
|
-
*/
|
|
38
|
-
async $sendMessage(id, message) {
|
|
39
|
-
if (this.connections.has(id)) {
|
|
40
|
-
this.connections.get(id).reader.readMessage(message);
|
|
41
|
-
}
|
|
42
|
-
else {
|
|
43
|
-
console.warn('It is not possible to read message. Connection missed.');
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Instantiates a new connection by the given id.
|
|
48
|
-
* @param id the connection id
|
|
49
|
-
*/
|
|
50
|
-
async $createConnection(id) {
|
|
51
|
-
await this.doEnsureConnection(id);
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Deletes a connection.
|
|
55
|
-
* @param id the connection id
|
|
56
|
-
*/
|
|
57
|
-
async $deleteConnection(id) {
|
|
58
|
-
this.connections.delete(id);
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Returns existed connection or creates a new one.
|
|
62
|
-
* @param id the connection id
|
|
63
|
-
*/
|
|
64
|
-
async ensureConnection(id) {
|
|
65
|
-
const connection = await this.doEnsureConnection(id);
|
|
66
|
-
this.proxy.$createConnection(id);
|
|
67
|
-
return connection;
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* Returns existed connection or creates a new one.
|
|
71
|
-
* @param id the connection id
|
|
72
|
-
*/
|
|
73
|
-
async doEnsureConnection(id) {
|
|
74
|
-
const connection = this.connections.get(id) || await this.doCreateConnection(id);
|
|
75
|
-
this.connections.set(id, connection);
|
|
76
|
-
return connection;
|
|
77
|
-
}
|
|
78
|
-
async doCreateConnection(id) {
|
|
79
|
-
const reader = new plugin_message_reader_1.PluginMessageReader();
|
|
80
|
-
const writer = new plugin_message_writer_1.PluginMessageWriter(id, this.proxy);
|
|
81
|
-
return new connection_1.PluginConnection(reader, writer, () => {
|
|
82
|
-
this.connections.delete(id);
|
|
83
|
-
this.proxy.$deleteConnection(id);
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
exports.ConnectionExtImpl = ConnectionExtImpl;
|
|
88
|
-
//# sourceMappingURL=connection-ext.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"connection-ext.js","sourceRoot":"","sources":["../../src/plugin/connection-ext.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;AAElF,6DAA6F;AAE7F,qDAAwD;AACxD,2EAAsE;AACtE,2EAAsE;AAEtE;;;GAGG;AACH,MAAa,iBAAiB;IAG1B,YAAY,GAAgB;QADpB,gBAAW,GAAG,IAAI,GAAG,EAA4B,CAAC;QAEtD,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC,QAAQ,CAAC,mCAAkB,CAAC,eAAe,CAAC,CAAC;IAClE,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,YAAY,CAAC,EAAU,EAAE,OAAe;QAC1C,IAAI,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE;YAC1B,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,EAAE,CAAE,CAAC,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;SACzD;aAAM;YACH,OAAO,CAAC,IAAI,CAAC,wDAAwD,CAAC,CAAC;SAC1E;IACL,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,iBAAiB,CAAC,EAAU;QAC9B,MAAM,IAAI,CAAC,kBAAkB,CAAC,EAAE,CAAC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