@theia/plugin-dev 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/lib/browser/hosted-plugin-controller.d.ts +2 -2
- package/lib/browser/hosted-plugin-controller.d.ts.map +1 -1
- package/lib/browser/hosted-plugin-controller.js +12 -11
- package/lib/browser/hosted-plugin-controller.js.map +1 -1
- package/lib/browser/hosted-plugin-informer.d.ts +2 -2
- package/lib/browser/hosted-plugin-informer.d.ts.map +1 -1
- package/lib/browser/hosted-plugin-informer.js +3 -2
- package/lib/browser/hosted-plugin-informer.js.map +1 -1
- package/lib/browser/hosted-plugin-log-viewer.d.ts +1 -1
- package/lib/browser/hosted-plugin-log-viewer.d.ts.map +1 -1
- package/lib/browser/hosted-plugin-log-viewer.js +1 -1
- package/lib/browser/hosted-plugin-log-viewer.js.map +1 -1
- package/lib/browser/hosted-plugin-manager-client.d.ts +2 -2
- package/lib/browser/hosted-plugin-manager-client.d.ts.map +1 -1
- package/lib/browser/hosted-plugin-manager-client.js +32 -28
- package/lib/browser/hosted-plugin-manager-client.js.map +1 -1
- package/lib/browser/hosted-plugin-preferences.d.ts.map +1 -1
- package/lib/browser/hosted-plugin-preferences.js +4 -3
- package/lib/browser/hosted-plugin-preferences.js.map +1 -1
- package/lib/browser/plugin-dev-frontend-module.d.ts.map +1 -1
- package/lib/browser/plugin-dev-frontend-module.js +2 -4
- package/lib/browser/plugin-dev-frontend-module.js.map +1 -1
- package/lib/common/plugin-dev-protocol.d.ts +4 -4
- package/lib/common/plugin-dev-protocol.d.ts.map +1 -1
- package/lib/common/plugin-dev-protocol.js +3 -3
- package/lib/common/plugin-dev-protocol.js.map +1 -1
- package/lib/node/plugin-dev-backend-module.js +4 -4
- package/lib/node/plugin-dev-backend-module.js.map +1 -1
- package/lib/node/{hosted-plugin-service.d.ts → plugin-dev-service.d.ts} +4 -4
- package/lib/node/plugin-dev-service.d.ts.map +1 -0
- package/lib/node/{hosted-plugin-service.js → plugin-dev-service.js} +10 -10
- package/lib/node/plugin-dev-service.js.map +1 -0
- package/package.json +10 -10
- package/src/browser/hosted-plugin-controller.ts +14 -13
- package/src/browser/hosted-plugin-informer.ts +5 -4
- package/src/browser/hosted-plugin-log-viewer.ts +1 -1
- package/src/browser/hosted-plugin-manager-client.ts +36 -30
- package/src/browser/hosted-plugin-preferences.ts +7 -3
- package/src/browser/plugin-dev-frontend-module.ts +3 -5
- package/src/common/plugin-dev-protocol.ts +4 -4
- package/src/node/plugin-dev-backend-module.ts +5 -5
- package/src/node/{hosted-plugin-service.ts → plugin-dev-service.ts} +3 -3
- package/lib/node/hosted-plugin-service.d.ts.map +0 -1
- package/lib/node/hosted-plugin-service.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hosted-plugin-preferences.js","sourceRoot":"","sources":["../../src/browser/hosted-plugin-preferences.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;AAGlF,qDAA8I;
|
|
1
|
+
{"version":3,"file":"hosted-plugin-preferences.js","sourceRoot":"","sources":["../../src/browser/hosted-plugin-preferences.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;AAGlF,qDAA8I;AAC9I,oDAAiD;AAEpC,QAAA,wBAAwB,GAAqB;IACtD,MAAM,EAAE,QAAQ;IAChB,UAAU,EAAE;QACR,yBAAyB,EAAE;YACvB,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,SAAG,CAAC,QAAQ,CAAC,4BAA4B,EAAE,yCAAyC,CAAC;YAClG,OAAO,EAAE,IAAI;SAChB;QACD,yBAAyB,EAAE;YACvB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,SAAG,CAAC,QAAQ,CAAC,4BAA4B,EAAE,gDAAgD,CAAC;YACzG,OAAO,EAAE,SAAS;YAClB,IAAI,EAAE,CAAC,SAAS,EAAE,aAAa,CAAC;SACnC;QACD,8BAA8B,EAAE;YAC5B,IA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,CAAC;;
|
|
1
|
+
{"version":3,"file":"plugin-dev-frontend-module.d.ts","sourceRoot":"","sources":["../../src/browser/plugin-dev-frontend-module.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAOlF,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;;AAO/D,wBAgBG"}
|
|
@@ -25,7 +25,6 @@ const browser_1 = require("@theia/core/lib/browser");
|
|
|
25
25
|
const hosted_plugin_frontend_contribution_1 = require("./hosted-plugin-frontend-contribution");
|
|
26
26
|
const command_1 = require("@theia/core/lib/common/command");
|
|
27
27
|
const plugin_dev_protocol_1 = require("../common/plugin-dev-protocol");
|
|
28
|
-
const hosted_plugin_watcher_1 = require("@theia/plugin-ext/lib/hosted/browser/hosted-plugin-watcher");
|
|
29
28
|
const debug_contribution_1 = require("@theia/debug/lib/browser/debug-contribution");
|
|
30
29
|
exports.default = new inversify_1.ContainerModule((bind, unbind, isBound, rebind) => {
|
|
31
30
|
hosted_plugin_preferences_1.bindHostedPluginPreferences(bind);
|
|
@@ -36,10 +35,9 @@ exports.default = new inversify_1.ContainerModule((bind, unbind, isBound, rebind
|
|
|
36
35
|
bind(browser_1.FrontendApplicationContribution).to(hosted_plugin_controller_1.HostedPluginController).inSingletonScope();
|
|
37
36
|
bind(hosted_plugin_frontend_contribution_1.HostedPluginFrontendContribution).toSelf().inSingletonScope();
|
|
38
37
|
bind(command_1.CommandContribution).toService(hosted_plugin_frontend_contribution_1.HostedPluginFrontendContribution);
|
|
39
|
-
bind(plugin_dev_protocol_1.
|
|
38
|
+
bind(plugin_dev_protocol_1.PluginDevServer).toDynamicValue(ctx => {
|
|
40
39
|
const connection = ctx.container.get(browser_1.WebSocketConnectionProvider);
|
|
41
|
-
|
|
42
|
-
return connection.createProxy(plugin_dev_protocol_1.hostedServicePath, hostedWatcher.getHostedPluginClient());
|
|
40
|
+
return connection.createProxy(plugin_dev_protocol_1.pluginDevServicePath);
|
|
43
41
|
}).inSingletonScope();
|
|
44
42
|
});
|
|
45
43
|
//# sourceMappingURL=plugin-dev-frontend-module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-dev-frontend-module.js","sourceRoot":"","sources":["../../src/browser/plugin-dev-frontend-module.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;AAElF,yEAAmE;AACnE,iFAA2E;AAC3E,qEAAgE;AAChE,2EAA0E;AAC1E,yEAAoE;AACpE,4DAA+D;AAC/D,qDAAuG;AACvG,+FAAyF;AACzF,4DAAqE;AACrE,uEAAsF;AACtF,
|
|
1
|
+
{"version":3,"file":"plugin-dev-frontend-module.js","sourceRoot":"","sources":["../../src/browser/plugin-dev-frontend-module.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;AAElF,yEAAmE;AACnE,iFAA2E;AAC3E,qEAAgE;AAChE,2EAA0E;AAC1E,yEAAoE;AACpE,4DAA+D;AAC/D,qDAAuG;AACvG,+FAAyF;AACzF,4DAAqE;AACrE,uEAAsF;AACtF,oFAAgF;AAEhF,kBAAe,IAAI,2BAAe,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE;IACjE,uDAA2B,CAAC,IAAI,CAAC,CAAC;IAClC,IAAI,CAAC,gDAAqB,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IACxD,IAAI,CAAC,wDAAyB,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IAC5D,IAAI,CAAC,sCAAiB,CAAC,CAAC,SAAS,CAAC,wDAAyB,CAAC,CAAC;IAE7D,IAAI,CAAC,yCAA+B,CAAC,CAAC,EAAE,CAAC,6CAAoB,CAAC,CAAC,gBAAgB,EAAE,CAAC;IAClF,IAAI,CAAC,yCAA+B,CAAC,CAAC,EAAE,CAAC,iDAAsB,CAAC,CAAC,gBAAgB,EAAE,CAAC;IAEpF,IAAI,CAAC,sEAAgC,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IACnE,IAAI,CAAC,6BAAmB,CAAC,CAAC,SAAS,CAAC,sEAAgC,CAAC,CAAC;IAEtE,IAAI,CAAC,qCAAe,CAAC,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;QACvC,MAAM,UAAU,GAAG,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,qCAA2B,CAAC,CAAC;QAClE,OAAO,UAAU,CAAC,WAAW,CAAkB,0CAAoB,CAAC,CAAC;IACzE,CAAC,CAAC,CAAC,gBAAgB,EAAE,CAAC;AAC1B,CAAC,CAAC,CAAC"}
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
import { JsonRpcServer } from '@theia/core/lib/common/messaging/proxy-factory';
|
|
17
17
|
import { DebugPluginConfiguration } from '@theia/debug/lib/browser/debug-contribution';
|
|
18
18
|
import { PluginMetadata } from '@theia/plugin-ext/lib/common/plugin-protocol';
|
|
19
|
-
export declare const
|
|
20
|
-
export declare const
|
|
21
|
-
export interface
|
|
19
|
+
export declare const pluginDevServicePath = "/services/plugin-dev";
|
|
20
|
+
export declare const PluginDevServer: unique symbol;
|
|
21
|
+
export interface PluginDevServer extends JsonRpcServer<PluginDevClient> {
|
|
22
22
|
getHostedPlugin(): Promise<PluginMetadata | undefined>;
|
|
23
23
|
runHostedPluginInstance(uri: string): Promise<string>;
|
|
24
24
|
runDebugHostedPluginInstance(uri: string, debugConfig: DebugPluginConfiguration): Promise<string>;
|
|
@@ -31,6 +31,6 @@ export interface HostedPluginServer extends JsonRpcServer<HostedPluginClient> {
|
|
|
31
31
|
isWatchCompilationRunning(uri: string): Promise<boolean>;
|
|
32
32
|
isPluginValid(uri: string): Promise<boolean>;
|
|
33
33
|
}
|
|
34
|
-
export interface
|
|
34
|
+
export interface PluginDevClient {
|
|
35
35
|
}
|
|
36
36
|
//# sourceMappingURL=plugin-dev-protocol.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-dev-protocol.d.ts","sourceRoot":"","sources":["../../src/common/plugin-dev-protocol.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAE,aAAa,EAAE,MAAM,gDAAgD,CAAC;AAE/E,OAAO,EAAE,wBAAwB,EAAE,MAAM,6CAA6C,CAAC;AACvF,OAAO,EAAE,cAAc,EAAE,MAAM,8CAA8C,CAAC;AAE9E,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"plugin-dev-protocol.d.ts","sourceRoot":"","sources":["../../src/common/plugin-dev-protocol.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAE,aAAa,EAAE,MAAM,gDAAgD,CAAC;AAE/E,OAAO,EAAE,wBAAwB,EAAE,MAAM,6CAA6C,CAAC;AACvF,OAAO,EAAE,cAAc,EAAE,MAAM,8CAA8C,CAAC;AAE9E,eAAO,MAAM,oBAAoB,yBAAyB,CAAC;AAC3D,eAAO,MAAM,eAAe,eAA4B,CAAC;AACzD,MAAM,WAAW,eAAgB,SAAQ,aAAa,CAAC,eAAe,CAAC;IACnE,eAAe,IAAI,OAAO,CAAC,cAAc,GAAG,SAAS,CAAC,CAAC;IACvD,uBAAuB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACtD,4BAA4B,CAAC,GAAG,EAAE,MAAM,EAAE,WAAW,EAAE,wBAAwB,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAClG,6BAA6B,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/C,6BAA6B,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IAClD,0BAA0B,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAC9C,kBAAkB,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAEtC,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAChD,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACjD,yBAAyB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAEzD,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CAChD;AAED,MAAM,WAAW,eAAe;CAC/B"}
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
16
16
|
********************************************************************************/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.
|
|
19
|
-
exports.
|
|
20
|
-
exports.
|
|
18
|
+
exports.PluginDevServer = exports.pluginDevServicePath = void 0;
|
|
19
|
+
exports.pluginDevServicePath = '/services/plugin-dev';
|
|
20
|
+
exports.PluginDevServer = Symbol('PluginDevServer');
|
|
21
21
|
//# sourceMappingURL=plugin-dev-protocol.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-dev-protocol.js","sourceRoot":"","sources":["../../src/common/plugin-dev-protocol.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;AAOrE,QAAA,
|
|
1
|
+
{"version":3,"file":"plugin-dev-protocol.js","sourceRoot":"","sources":["../../src/common/plugin-dev-protocol.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;AAOrE,QAAA,oBAAoB,GAAG,sBAAsB,CAAC;AAC9C,QAAA,eAAe,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC"}
|
|
@@ -22,16 +22,16 @@ const hosted_plugins_manager_1 = require("./hosted-plugins-manager");
|
|
|
22
22
|
const inversify_1 = require("@theia/core/shared/inversify");
|
|
23
23
|
const connection_container_module_1 = require("@theia/core/lib/node/messaging/connection-container-module");
|
|
24
24
|
const contribution_provider_1 = require("@theia/core/lib/common/contribution-provider");
|
|
25
|
-
const
|
|
25
|
+
const plugin_dev_service_1 = require("./plugin-dev-service");
|
|
26
26
|
const plugin_dev_protocol_1 = require("../common/plugin-dev-protocol");
|
|
27
27
|
const hosted_plugin_reader_1 = require("./hosted-plugin-reader");
|
|
28
28
|
const backend_application_1 = require("@theia/core/lib/node/backend-application");
|
|
29
29
|
const commonHostedConnectionModule = connection_container_module_1.ConnectionContainerModule.create(({ bind, bindBackendService }) => {
|
|
30
30
|
bind(hosted_plugins_manager_1.HostedPluginsManagerImpl).toSelf().inSingletonScope();
|
|
31
31
|
bind(hosted_plugins_manager_1.HostedPluginsManager).toService(hosted_plugins_manager_1.HostedPluginsManagerImpl);
|
|
32
|
-
bind(
|
|
33
|
-
bind(plugin_dev_protocol_1.
|
|
34
|
-
bindBackendService(plugin_dev_protocol_1.
|
|
32
|
+
bind(plugin_dev_service_1.PluginDevServerImpl).toSelf().inSingletonScope();
|
|
33
|
+
bind(plugin_dev_protocol_1.PluginDevServer).toService(plugin_dev_service_1.PluginDevServerImpl);
|
|
34
|
+
bindBackendService(plugin_dev_protocol_1.pluginDevServicePath, plugin_dev_protocol_1.PluginDevServer, (server, client) => {
|
|
35
35
|
server.setClient(client);
|
|
36
36
|
client.onDidCloseConnection(() => server.dispose());
|
|
37
37
|
return server;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-dev-backend-module.js","sourceRoot":"","sources":["../../src/node/plugin-dev-backend-module.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;AAElF,uEAA0F;AAC1F,uFAA2F;AAC3F,qEAA0F;AAC1F,4DAA2E;AAC3E,4GAAuG;AACvG,wFAAwF;AACxF,
|
|
1
|
+
{"version":3,"file":"plugin-dev-backend-module.js","sourceRoot":"","sources":["../../src/node/plugin-dev-backend-module.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;AAElF,uEAA0F;AAC1F,uFAA2F;AAC3F,qEAA0F;AAC1F,4DAA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CAAC;IACnF,IAAI,CAAC,+CAAqB,CAAC,CAAC,EAAE,CAAC,gDAAsB,CAAC,CAAC,gBAAgB,EAAE,CAAC;AAC9E,CAAC,CAAC,CAAC;AAEH,kBAAe,IAAI,2BAAe,CAAC,IAAI,CAAC,EAAE;IACtC,uBAAuB,CAAC,IAAI,CAAC,CAAC;IAC9B,IAAI,CAAC,uDAAyB,CAAC,CAAC,eAAe,CAAC,6BAA6B,CAAC,CAAC;AACnF,CAAC,CAAC,CAAC"}
|
|
@@ -13,19 +13,19 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
-
import {
|
|
16
|
+
import { PluginDevServer, PluginDevClient } from '../common/plugin-dev-protocol';
|
|
17
17
|
import { HostedInstanceManager } from './hosted-instance-manager';
|
|
18
18
|
import { PluginMetadata } from '@theia/plugin-ext/lib/common/plugin-protocol';
|
|
19
19
|
import URI from '@theia/core/lib/common/uri';
|
|
20
20
|
import { HostedPluginsManager } from './hosted-plugins-manager';
|
|
21
21
|
import { DebugPluginConfiguration } from '@theia/debug/lib/browser/debug-contribution';
|
|
22
|
-
export declare class
|
|
22
|
+
export declare class PluginDevServerImpl implements PluginDevServer {
|
|
23
23
|
protected readonly hostedPluginsManager: HostedPluginsManager;
|
|
24
24
|
protected readonly hostedInstanceManager: HostedInstanceManager;
|
|
25
25
|
private readonly reader;
|
|
26
26
|
private readonly hostedPlugin;
|
|
27
27
|
dispose(): void;
|
|
28
|
-
setClient(client:
|
|
28
|
+
setClient(client: PluginDevClient): void;
|
|
29
29
|
getHostedPlugin(): Promise<PluginMetadata | undefined>;
|
|
30
30
|
isPluginValid(uri: string): Promise<boolean>;
|
|
31
31
|
runHostedPluginInstance(uri: string): Promise<string>;
|
|
@@ -39,4 +39,4 @@ export declare class HostedPluginServerImpl implements HostedPluginServer {
|
|
|
39
39
|
stopWatchCompilation(path: string): Promise<void>;
|
|
40
40
|
isWatchCompilationRunning(path: string): Promise<boolean>;
|
|
41
41
|
}
|
|
42
|
-
//# sourceMappingURL=
|
|
42
|
+
//# sourceMappingURL=plugin-dev-service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-dev-service.d.ts","sourceRoot":"","sources":["../../src/node/plugin-dev-service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEjF,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,8CAA8C,CAAC;AAC9E,OAAO,GAAG,MAAM,4BAA4B,CAAC;AAE7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAGhE,OAAO,EAAE,wBAAwB,EAAE,MAAM,6CAA6C,CAAC;AAEvF,qBACa,mBAAoB,YAAW,eAAe;IAGvD,SAAS,CAAC,QAAQ,CAAC,oBAAoB,EAAE,oBAAoB,CAAC;IAG9D,SAAS,CAAC,QAAQ,CAAC,qBAAqB,EAAE,qBAAqB,CAAC;IAGhE,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqB;IAG5C,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAsB;IAEnD,OAAO,IAAI,IAAI;IAMf,SAAS,CAAC,MAAM,EAAE,eAAe,GAAG,IAAI;IAIlC,eAAe,IAAI,OAAO,CAAC,cAAc,GAAG,SAAS,CAAC;IAQ5D,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAI5C,uBAAuB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAIrD,4BAA4B,CAAC,GAAG,EAAE,MAAM,EAAE,WAAW,EAAE,wBAAwB,GAAG,OAAO,CAAC,MAAM,CAAC;IAIjG,6BAA6B,IAAI,OAAO,CAAC,IAAI,CAAC;IAK9C,6BAA6B,IAAI,OAAO,CAAC,OAAO,CAAC;IAIjD,0BAA0B,IAAI,OAAO,CAAC,MAAM,CAAC;IAI7C,kBAAkB,IAAI,OAAO,CAAC,MAAM,CAAC;IAIrC,SAAS,CAAC,eAAe,CAAC,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC;IAQjE,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIhD,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIjD,yBAAyB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;CAG5D"}
|
|
@@ -24,14 +24,14 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
24
24
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
25
25
|
};
|
|
26
26
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
-
exports.
|
|
27
|
+
exports.PluginDevServerImpl = void 0;
|
|
28
28
|
const inversify_1 = require("@theia/core/shared/inversify");
|
|
29
29
|
const hosted_instance_manager_1 = require("./hosted-instance-manager");
|
|
30
30
|
const uri_1 = require("@theia/core/lib/common/uri");
|
|
31
31
|
const hosted_plugin_reader_1 = require("./hosted-plugin-reader");
|
|
32
32
|
const hosted_plugins_manager_1 = require("./hosted-plugins-manager");
|
|
33
33
|
const hosted_plugin_1 = require("@theia/plugin-ext/lib/hosted/node/hosted-plugin");
|
|
34
|
-
let
|
|
34
|
+
let PluginDevServerImpl = class PluginDevServerImpl {
|
|
35
35
|
dispose() {
|
|
36
36
|
// Terminate the hosted instance if it is currently running.
|
|
37
37
|
if (this.hostedInstanceManager.isRunning()) {
|
|
@@ -89,21 +89,21 @@ let HostedPluginServerImpl = class HostedPluginServerImpl {
|
|
|
89
89
|
__decorate([
|
|
90
90
|
inversify_1.inject(hosted_plugins_manager_1.HostedPluginsManager),
|
|
91
91
|
__metadata("design:type", Object)
|
|
92
|
-
],
|
|
92
|
+
], PluginDevServerImpl.prototype, "hostedPluginsManager", void 0);
|
|
93
93
|
__decorate([
|
|
94
94
|
inversify_1.inject(hosted_instance_manager_1.HostedInstanceManager),
|
|
95
95
|
__metadata("design:type", Object)
|
|
96
|
-
],
|
|
96
|
+
], PluginDevServerImpl.prototype, "hostedInstanceManager", void 0);
|
|
97
97
|
__decorate([
|
|
98
98
|
inversify_1.inject(hosted_plugin_reader_1.HostedPluginReader),
|
|
99
99
|
__metadata("design:type", hosted_plugin_reader_1.HostedPluginReader)
|
|
100
|
-
],
|
|
100
|
+
], PluginDevServerImpl.prototype, "reader", void 0);
|
|
101
101
|
__decorate([
|
|
102
102
|
inversify_1.inject(hosted_plugin_1.HostedPluginSupport),
|
|
103
103
|
__metadata("design:type", hosted_plugin_1.HostedPluginSupport)
|
|
104
|
-
],
|
|
105
|
-
|
|
104
|
+
], PluginDevServerImpl.prototype, "hostedPlugin", void 0);
|
|
105
|
+
PluginDevServerImpl = __decorate([
|
|
106
106
|
inversify_1.injectable()
|
|
107
|
-
],
|
|
108
|
-
exports.
|
|
109
|
-
//# sourceMappingURL=
|
|
107
|
+
], PluginDevServerImpl);
|
|
108
|
+
exports.PluginDevServerImpl = PluginDevServerImpl;
|
|
109
|
+
//# sourceMappingURL=plugin-dev-service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-dev-service.js","sourceRoot":"","sources":["../../src/node/plugin-dev-service.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;;;;AAGlF,4DAAkE;AAClE,uEAAkE;AAElE,oDAA6C;AAC7C,iEAA4D;AAC5D,qEAAgE;AAChE,mFAAsF;AAKtF,IAAa,mBAAmB,GAAhC,MAAa,mBAAmB;IAc5B,OAAO;QACH,4DAA4D;QAC5D,IAAI,IAAI,CAAC,qBA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|
"name": "@theia/plugin-dev",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.21.0-next.12+c8248f736ed",
|
|
4
4
|
"description": "Theia - Plugin Development Extension",
|
|
5
5
|
"main": "lib/common/index.js",
|
|
6
6
|
"typings": "lib/common/index.d.ts",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@theia/core": "1.
|
|
9
|
-
"@theia/debug": "1.
|
|
10
|
-
"@theia/filesystem": "1.
|
|
11
|
-
"@theia/output": "1.
|
|
12
|
-
"@theia/plugin-ext": "1.
|
|
13
|
-
"@theia/preferences": "1.
|
|
14
|
-
"@theia/workspace": "1.
|
|
8
|
+
"@theia/core": "1.21.0-next.12+c8248f736ed",
|
|
9
|
+
"@theia/debug": "1.21.0-next.12+c8248f736ed",
|
|
10
|
+
"@theia/filesystem": "1.21.0-next.12+c8248f736ed",
|
|
11
|
+
"@theia/output": "1.21.0-next.12+c8248f736ed",
|
|
12
|
+
"@theia/plugin-ext": "1.21.0-next.12+c8248f736ed",
|
|
13
|
+
"@theia/preferences": "1.21.0-next.12+c8248f736ed",
|
|
14
|
+
"@theia/workspace": "1.21.0-next.12+c8248f736ed",
|
|
15
15
|
"@types/request": "^2.0.3",
|
|
16
16
|
"ps-tree": "^1.2.0",
|
|
17
17
|
"request": "^2.82.0"
|
|
@@ -51,10 +51,10 @@
|
|
|
51
51
|
"watch": "theiaext watch"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@theia/ext-scripts": "1.
|
|
54
|
+
"@theia/ext-scripts": "1.20.0"
|
|
55
55
|
},
|
|
56
56
|
"nyc": {
|
|
57
57
|
"extends": "../../configs/nyc.json"
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "c8248f736edb4939155711987333ed39d9394b11"
|
|
60
60
|
}
|
|
@@ -22,10 +22,11 @@ import { CommandRegistry } from '@theia/core/shared/@phosphor/commands';
|
|
|
22
22
|
import { Menu } from '@theia/core/shared/@phosphor/widgets';
|
|
23
23
|
import { FrontendApplicationStateService } from '@theia/core/lib/browser/frontend-application-state';
|
|
24
24
|
import { ConnectionStatusService, ConnectionStatus } from '@theia/core/lib/browser/connection-status-service';
|
|
25
|
-
import {
|
|
25
|
+
import { PluginDevServer } from '../common/plugin-dev-protocol';
|
|
26
26
|
import { HostedPluginManagerClient, HostedInstanceState, HostedPluginCommands, HostedInstanceData } from './hosted-plugin-manager-client';
|
|
27
27
|
import { HostedPluginLogViewer } from './hosted-plugin-log-viewer';
|
|
28
28
|
import { HostedPluginPreferences } from './hosted-plugin-preferences';
|
|
29
|
+
import { nls } from '@theia/core/lib/common/nls';
|
|
29
30
|
|
|
30
31
|
/**
|
|
31
32
|
* Adds a status bar element displaying the state of secondary Theia instance with hosted plugin and
|
|
@@ -44,8 +45,8 @@ export class HostedPluginController implements FrontendApplicationContribution {
|
|
|
44
45
|
@inject(FrontendApplicationStateService)
|
|
45
46
|
protected readonly frontendApplicationStateService: FrontendApplicationStateService;
|
|
46
47
|
|
|
47
|
-
@inject(
|
|
48
|
-
protected readonly hostedPluginServer:
|
|
48
|
+
@inject(PluginDevServer)
|
|
49
|
+
protected readonly hostedPluginServer: PluginDevServer;
|
|
49
50
|
|
|
50
51
|
@inject(HostedPluginManagerClient)
|
|
51
52
|
protected readonly hostedPluginManagerClient: HostedPluginManagerClient;
|
|
@@ -114,7 +115,7 @@ export class HostedPluginController implements FrontendApplicationContribution {
|
|
|
114
115
|
this.pluginState = HostedInstanceState.STOPPED;
|
|
115
116
|
|
|
116
117
|
this.entry = {
|
|
117
|
-
text: 'Hosted Plugin: Stopped $(angle-up)
|
|
118
|
+
text: `${nls.localize('theia/plugin-dev/hostedPluginStopped', 'Hosted Plugin: Stopped')} $(angle-up)`,
|
|
118
119
|
alignment: StatusBarAlignment.LEFT,
|
|
119
120
|
priority: 100,
|
|
120
121
|
onclick: e => {
|
|
@@ -135,7 +136,7 @@ export class HostedPluginController implements FrontendApplicationContribution {
|
|
|
135
136
|
this.hostedPluginLogViewer.showLogConsole();
|
|
136
137
|
|
|
137
138
|
this.entry = {
|
|
138
|
-
text:
|
|
139
|
+
text: `$(cog~spin) ${nls.localize('theia/plugin-dev/hostedPluginStarting', 'Hosted Plugin: Starting')}`,
|
|
139
140
|
alignment: StatusBarAlignment.LEFT,
|
|
140
141
|
priority: 100
|
|
141
142
|
};
|
|
@@ -152,9 +153,9 @@ export class HostedPluginController implements FrontendApplicationContribution {
|
|
|
152
153
|
|
|
153
154
|
let entryText: string;
|
|
154
155
|
if (this.hostedPluginPreferences['hosted-plugin.watchMode'] && this.watcherSuccess) {
|
|
155
|
-
entryText =
|
|
156
|
+
entryText = `$(cog~spin) ${nls.localize('theia/plugin-dev/hostedPluginWatching', 'Hosted Plugin: Watching')}$(angle-up)`;
|
|
156
157
|
} else {
|
|
157
|
-
entryText =
|
|
158
|
+
entryText = `$(cog~spin) ${nls.localize('theia/plugin-dev/hostedPluginRunning', 'Hosted Plugin: Running')} $(angle-up)`;
|
|
158
159
|
}
|
|
159
160
|
|
|
160
161
|
this.entry = {
|
|
@@ -177,7 +178,7 @@ export class HostedPluginController implements FrontendApplicationContribution {
|
|
|
177
178
|
this.pluginState = HostedInstanceState.FAILED;
|
|
178
179
|
|
|
179
180
|
this.entry = {
|
|
180
|
-
text: 'Hosted Plugin: Stopped $(angle-up)
|
|
181
|
+
text: `${nls.localize('theia/plugin-dev/hostedPluginStopped', 'Hosted Plugin: Stopped')} $(angle-up)`,
|
|
181
182
|
alignment: StatusBarAlignment.LEFT,
|
|
182
183
|
priority: 100,
|
|
183
184
|
onclick: e => {
|
|
@@ -258,7 +259,7 @@ export class HostedPluginController implements FrontendApplicationContribution {
|
|
|
258
259
|
// Re-set the element only if it's visible on status bar
|
|
259
260
|
if (this.entry) {
|
|
260
261
|
const offlineElement = {
|
|
261
|
-
text: 'Hosted Plugin: Stopped',
|
|
262
|
+
text: nls.localize('theia/plugin-dev/hostedPluginStopped', 'Hosted Plugin: Stopped'),
|
|
262
263
|
alignment: StatusBarAlignment.LEFT,
|
|
263
264
|
priority: 100
|
|
264
265
|
};
|
|
@@ -303,7 +304,7 @@ export class HostedPluginController implements FrontendApplicationContribution {
|
|
|
303
304
|
*/
|
|
304
305
|
protected addCommandsForRunningPlugin(commands: CommandRegistry, menu: Menu): void {
|
|
305
306
|
commands.addCommand(HostedPluginCommands.STOP.id, {
|
|
306
|
-
label: 'Stop Instance',
|
|
307
|
+
label: nls.localize('theia/plugin-dev/stopInstance', 'Stop Instance'),
|
|
307
308
|
icon: codicon('debug-stop'),
|
|
308
309
|
execute: () => setTimeout(() => this.hostedPluginManagerClient.stop(), 100)
|
|
309
310
|
});
|
|
@@ -314,7 +315,7 @@ export class HostedPluginController implements FrontendApplicationContribution {
|
|
|
314
315
|
});
|
|
315
316
|
|
|
316
317
|
commands.addCommand(HostedPluginCommands.RESTART.id, {
|
|
317
|
-
label: 'Restart Instance',
|
|
318
|
+
label: nls.localize('theia/plugin-dev/restartInstance', 'Restart Instance'),
|
|
318
319
|
icon: codicon('debug-restart'),
|
|
319
320
|
execute: () => setTimeout(() => this.hostedPluginManagerClient.restart(), 100)
|
|
320
321
|
});
|
|
@@ -330,7 +331,7 @@ export class HostedPluginController implements FrontendApplicationContribution {
|
|
|
330
331
|
*/
|
|
331
332
|
protected addCommandsForStoppedPlugin(commands: CommandRegistry, menu: Menu): void {
|
|
332
333
|
commands.addCommand(HostedPluginCommands.START.id, {
|
|
333
|
-
label: 'Start Instance',
|
|
334
|
+
label: nls.localize('theia/plugin-dev/startInstance', 'Start Instance'),
|
|
334
335
|
icon: codicon('play'),
|
|
335
336
|
execute: () => setTimeout(() => this.hostedPluginManagerClient.start(), 100)
|
|
336
337
|
});
|
|
@@ -341,7 +342,7 @@ export class HostedPluginController implements FrontendApplicationContribution {
|
|
|
341
342
|
});
|
|
342
343
|
|
|
343
344
|
commands.addCommand(HostedPluginCommands.DEBUG.id, {
|
|
344
|
-
label: 'Debug Instance',
|
|
345
|
+
label: nls.localize('theia/plugin-dev/debugInstance', 'Debug Instance'),
|
|
345
346
|
icon: codicon('debug'),
|
|
346
347
|
execute: () => setTimeout(() => this.hostedPluginManagerClient.debug(), 100)
|
|
347
348
|
});
|
|
@@ -18,10 +18,11 @@ import { injectable, inject } from '@theia/core/shared/inversify';
|
|
|
18
18
|
import { StatusBar } from '@theia/core/lib/browser/status-bar/status-bar';
|
|
19
19
|
import { StatusBarAlignment, StatusBarEntry, FrontendApplicationContribution } from '@theia/core/lib/browser';
|
|
20
20
|
import { WorkspaceService } from '@theia/workspace/lib/browser';
|
|
21
|
-
import {
|
|
21
|
+
import { PluginDevServer } from '../common/plugin-dev-protocol';
|
|
22
22
|
import { ConnectionStatusService, ConnectionStatus } from '@theia/core/lib/browser/connection-status-service';
|
|
23
23
|
import { FileStat } from '@theia/filesystem/lib/common/files';
|
|
24
24
|
import { FrontendApplicationStateService } from '@theia/core/lib/browser/frontend-application-state';
|
|
25
|
+
import { nls } from '@theia/core/lib/common/nls';
|
|
25
26
|
|
|
26
27
|
/**
|
|
27
28
|
* Informs the user whether Theia is running with hosted plugin.
|
|
@@ -44,8 +45,8 @@ export class HostedPluginInformer implements FrontendApplicationContribution {
|
|
|
44
45
|
@inject(WorkspaceService)
|
|
45
46
|
protected readonly workspaceService: WorkspaceService;
|
|
46
47
|
|
|
47
|
-
@inject(
|
|
48
|
-
protected readonly hostedPluginServer:
|
|
48
|
+
@inject(PluginDevServer)
|
|
49
|
+
protected readonly hostedPluginServer: PluginDevServer;
|
|
49
50
|
|
|
50
51
|
@inject(ConnectionStatusService)
|
|
51
52
|
protected readonly connectionStatusService: ConnectionStatusService;
|
|
@@ -62,7 +63,7 @@ export class HostedPluginInformer implements FrontendApplicationContribution {
|
|
|
62
63
|
|
|
63
64
|
this.entry = {
|
|
64
65
|
text: `$(cube) ${HostedPluginInformer.DEVELOPMENT_HOST_TITLE}`,
|
|
65
|
-
tooltip:
|
|
66
|
+
tooltip: `${nls.localize('theia/plugin-dev/hostedPlugin', 'Hosted Plugin')} '${pluginMetadata.model.name}'`,
|
|
66
67
|
alignment: StatusBarAlignment.LEFT,
|
|
67
68
|
priority: 100
|
|
68
69
|
};
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
|
|
17
17
|
import { injectable, inject, postConstruct } from '@theia/core/shared/inversify';
|
|
18
|
-
import { OutputChannel, OutputChannelManager } from '@theia/output/lib/
|
|
18
|
+
import { OutputChannel, OutputChannelManager } from '@theia/output/lib/browser/output-channel';
|
|
19
19
|
import { OutputContribution } from '@theia/output/lib/browser/output-contribution';
|
|
20
20
|
import { LogPart } from '@theia/plugin-ext/lib/common/types';
|
|
21
21
|
import { HostedPluginWatcher } from '@theia/plugin-ext/lib/hosted/browser/hosted-plugin-watcher';
|
|
@@ -22,46 +22,50 @@ import { LabelProvider, isNative, AbstractDialog } from '@theia/core/lib/browser
|
|
|
22
22
|
import { WindowService } from '@theia/core/lib/browser/window/window-service';
|
|
23
23
|
import { WorkspaceService } from '@theia/workspace/lib/browser';
|
|
24
24
|
import { FileDialogService } from '@theia/filesystem/lib/browser';
|
|
25
|
-
import {
|
|
25
|
+
import { PluginDevServer } from '../common/plugin-dev-protocol';
|
|
26
26
|
import { DebugPluginConfiguration, LaunchVSCodeArgument, LaunchVSCodeRequest, LaunchVSCodeResult } from '@theia/debug/lib/browser/debug-contribution';
|
|
27
27
|
import { DebugSessionManager } from '@theia/debug/lib/browser/debug-session-manager';
|
|
28
28
|
import { HostedPluginPreferences } from './hosted-plugin-preferences';
|
|
29
29
|
import { FileService } from '@theia/filesystem/lib/browser/file-service';
|
|
30
30
|
import { EnvVariablesServer } from '@theia/core/lib/common/env-variables';
|
|
31
31
|
import { DebugSessionConnection } from '@theia/debug/lib/browser/debug-session-connection';
|
|
32
|
+
import { nls } from '@theia/core/lib/common/nls';
|
|
32
33
|
|
|
33
34
|
/**
|
|
34
35
|
* Commands to control Hosted plugin instances.
|
|
35
36
|
*/
|
|
36
37
|
export namespace HostedPluginCommands {
|
|
38
|
+
const HOSTED_PLUGIN_CATEGORY_KEY = 'theia/plugin-dev/hostedPlugin';
|
|
37
39
|
const HOSTED_PLUGIN_CATEGORY = 'Hosted Plugin';
|
|
38
|
-
export const START
|
|
40
|
+
export const START = Command.toLocalizedCommand({
|
|
39
41
|
id: 'hosted-plugin:start',
|
|
40
42
|
category: HOSTED_PLUGIN_CATEGORY,
|
|
41
43
|
label: 'Start Instance'
|
|
42
|
-
};
|
|
44
|
+
}, 'theia/plugin-dev/startInstance', HOSTED_PLUGIN_CATEGORY_KEY);
|
|
43
45
|
|
|
44
|
-
export const DEBUG
|
|
46
|
+
export const DEBUG = Command.toLocalizedCommand({
|
|
45
47
|
id: 'hosted-plugin:debug',
|
|
46
48
|
category: HOSTED_PLUGIN_CATEGORY,
|
|
47
49
|
label: 'Debug Instance'
|
|
48
|
-
};
|
|
50
|
+
}, 'theia/plugin-dev/debugInstance', HOSTED_PLUGIN_CATEGORY_KEY);
|
|
49
51
|
|
|
50
|
-
export const STOP
|
|
52
|
+
export const STOP = Command.toLocalizedCommand({
|
|
51
53
|
id: 'hosted-plugin:stop',
|
|
52
54
|
category: HOSTED_PLUGIN_CATEGORY,
|
|
53
55
|
label: 'Stop Instance'
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
+
}, 'theia/plugin-dev/stopInstance', HOSTED_PLUGIN_CATEGORY_KEY);
|
|
57
|
+
|
|
58
|
+
export const RESTART = Command.toLocalizedCommand({
|
|
56
59
|
id: 'hosted-plugin:restart',
|
|
57
60
|
category: HOSTED_PLUGIN_CATEGORY,
|
|
58
61
|
label: 'Restart Instance'
|
|
59
|
-
};
|
|
60
|
-
|
|
62
|
+
}, 'theia/plugin-dev/restartInstance', HOSTED_PLUGIN_CATEGORY_KEY);
|
|
63
|
+
|
|
64
|
+
export const SELECT_PATH = Command.toLocalizedCommand({
|
|
61
65
|
id: 'hosted-plugin:select-path',
|
|
62
66
|
category: HOSTED_PLUGIN_CATEGORY,
|
|
63
67
|
label: 'Select Path'
|
|
64
|
-
};
|
|
68
|
+
}, 'theia/plugin-dev/selectPath', HOSTED_PLUGIN_CATEGORY_KEY);
|
|
65
69
|
}
|
|
66
70
|
|
|
67
71
|
/**
|
|
@@ -103,8 +107,8 @@ export class HostedPluginManagerClient {
|
|
|
103
107
|
return this.stateChanged.event;
|
|
104
108
|
}
|
|
105
109
|
|
|
106
|
-
@inject(
|
|
107
|
-
protected readonly hostedPluginServer:
|
|
110
|
+
@inject(PluginDevServer)
|
|
111
|
+
protected readonly hostedPluginServer: PluginDevServer;
|
|
108
112
|
@inject(MessageService)
|
|
109
113
|
protected readonly messageService: MessageService;
|
|
110
114
|
@inject(LabelProvider)
|
|
@@ -143,7 +147,7 @@ export class HostedPluginManagerClient {
|
|
|
143
147
|
|
|
144
148
|
async start(debugConfig?: DebugPluginConfiguration): Promise<void> {
|
|
145
149
|
if (await this.hostedPluginServer.isHostedPluginInstanceRunning()) {
|
|
146
|
-
this.messageService.warn('Hosted instance is already running.');
|
|
150
|
+
this.messageService.warn(nls.localize('theia/plugin-dev/alreadyRunning', 'Hosted instance is already running.'));
|
|
147
151
|
return;
|
|
148
152
|
}
|
|
149
153
|
|
|
@@ -157,7 +161,7 @@ export class HostedPluginManagerClient {
|
|
|
157
161
|
|
|
158
162
|
try {
|
|
159
163
|
this.stateChanged.fire({ state: HostedInstanceState.STARTING, pluginLocation: this.pluginLocation });
|
|
160
|
-
this.messageService.info('Starting hosted instance server ...');
|
|
164
|
+
this.messageService.info(nls.localize('theia/plugin-dev/starting', 'Starting hosted instance server ...'));
|
|
161
165
|
|
|
162
166
|
if (debugConfig) {
|
|
163
167
|
this.isDebug = true;
|
|
@@ -168,10 +172,10 @@ export class HostedPluginManagerClient {
|
|
|
168
172
|
}
|
|
169
173
|
await this.openPluginWindow();
|
|
170
174
|
|
|
171
|
-
this.messageService.info('Hosted instance is running at:
|
|
175
|
+
this.messageService.info(`${nls.localize('theia/plugin-dev/running', 'Hosted instance is running at:')} ${this.pluginInstanceURL}`);
|
|
172
176
|
this.stateChanged.fire({ state: HostedInstanceState.RUNNING, pluginLocation: this.pluginLocation });
|
|
173
177
|
} catch (error) {
|
|
174
|
-
this.messageService.error('Failed to run hosted plugin instance: '
|
|
178
|
+
this.messageService.error(nls.localize('theia/plugin-dev/failed', 'Failed to run hosted plugin instance: {0}', this.getErrorMessage(error)));
|
|
175
179
|
this.stateChanged.fire({ state: HostedInstanceState.FAILED, pluginLocation: this.pluginLocation });
|
|
176
180
|
this.stop();
|
|
177
181
|
}
|
|
@@ -199,7 +203,7 @@ export class HostedPluginManagerClient {
|
|
|
199
203
|
type: 'node',
|
|
200
204
|
request: 'attach',
|
|
201
205
|
timeout: 30000,
|
|
202
|
-
name: 'Hosted Plugin',
|
|
206
|
+
name: nls.localize('theia/plugin-dev/hostedPlugin', 'Hosted Plugin'),
|
|
203
207
|
smartStep: true,
|
|
204
208
|
sourceMaps: !!outFiles,
|
|
205
209
|
outFiles
|
|
@@ -209,13 +213,15 @@ export class HostedPluginManagerClient {
|
|
|
209
213
|
|
|
210
214
|
async stop(checkRunning: boolean = true): Promise<void> {
|
|
211
215
|
if (checkRunning && !await this.hostedPluginServer.isHostedPluginInstanceRunning()) {
|
|
212
|
-
this.messageService.warn('Hosted instance is not running.');
|
|
216
|
+
this.messageService.warn(nls.localize('theia/plugin-dev/notRunning', 'Hosted instance is not running.'));
|
|
213
217
|
return;
|
|
214
218
|
}
|
|
215
219
|
try {
|
|
216
220
|
this.stateChanged.fire({ state: HostedInstanceState.STOPPING, pluginLocation: this.pluginLocation! });
|
|
217
221
|
await this.hostedPluginServer.terminateHostedPluginInstance();
|
|
218
|
-
this.messageService.info((this.pluginInstanceURL
|
|
222
|
+
this.messageService.info((this.pluginInstanceURL
|
|
223
|
+
? nls.localize('theia/plugin-dev/instanceTerminated', '{0} has been terminated', this.pluginInstanceURL)
|
|
224
|
+
: nls.localize('theia/plugin-dev/unknownTerminated', 'The instance has been terminated')));
|
|
219
225
|
this.stateChanged.fire({ state: HostedInstanceState.STOPPED, pluginLocation: this.pluginLocation! });
|
|
220
226
|
} catch (error) {
|
|
221
227
|
this.messageService.error(this.getErrorMessage(error));
|
|
@@ -226,7 +232,7 @@ export class HostedPluginManagerClient {
|
|
|
226
232
|
if (await this.hostedPluginServer.isHostedPluginInstanceRunning()) {
|
|
227
233
|
await this.stop(false);
|
|
228
234
|
|
|
229
|
-
this.messageService.info('Starting hosted instance server ...');
|
|
235
|
+
this.messageService.info(nls.localize('theia/plugin-dev/starting', 'Starting hosted instance server ...'));
|
|
230
236
|
|
|
231
237
|
// It takes some time before OS released all resources e.g. port.
|
|
232
238
|
// Keep trying to run hosted instance with delay.
|
|
@@ -243,7 +249,7 @@ export class HostedPluginManagerClient {
|
|
|
243
249
|
this.pluginInstanceURL = await this.hostedPluginServer.runHostedPluginInstance(this.pluginLocation!.toString());
|
|
244
250
|
}
|
|
245
251
|
await this.openPluginWindow();
|
|
246
|
-
this.messageService.info('Hosted instance is running at:
|
|
252
|
+
this.messageService.info(`${nls.localize('theia/plugin-dev/running', 'Hosted instance is running at:')} ${this.pluginInstanceURL}`);
|
|
247
253
|
this.stateChanged.fire({
|
|
248
254
|
state: HostedInstanceState.RUNNING,
|
|
249
255
|
pluginLocation: this.pluginLocation!
|
|
@@ -254,11 +260,11 @@ export class HostedPluginManagerClient {
|
|
|
254
260
|
await new Promise(resolve => setTimeout(resolve, 500));
|
|
255
261
|
}
|
|
256
262
|
}
|
|
257
|
-
this.messageService.error('Failed to run hosted plugin instance: '
|
|
263
|
+
this.messageService.error(nls.localize('theia/plugin-dev/failed', 'Failed to run hosted plugin instance: {0}', this.getErrorMessage(lastError)));
|
|
258
264
|
this.stateChanged.fire({ state: HostedInstanceState.FAILED, pluginLocation: this.pluginLocation! });
|
|
259
265
|
this.stop();
|
|
260
266
|
} else {
|
|
261
|
-
this.messageService.warn('Hosted
|
|
267
|
+
this.messageService.warn(nls.localize('theia/plugin-dev/notRunning', 'Hosted instance is not running.'));
|
|
262
268
|
this.start();
|
|
263
269
|
}
|
|
264
270
|
}
|
|
@@ -274,7 +280,7 @@ export class HostedPluginManagerClient {
|
|
|
274
280
|
|
|
275
281
|
const result = await this.fileDialogService.showOpenDialog({
|
|
276
282
|
title: HostedPluginCommands.SELECT_PATH.label!,
|
|
277
|
-
openLabel: 'Select',
|
|
283
|
+
openLabel: nls.localize('theia/plugin-dev/select', 'Select'),
|
|
278
284
|
canSelectFiles: false,
|
|
279
285
|
canSelectFolders: true,
|
|
280
286
|
canSelectMany: false
|
|
@@ -283,9 +289,9 @@ export class HostedPluginManagerClient {
|
|
|
283
289
|
if (result) {
|
|
284
290
|
if (await this.hostedPluginServer.isPluginValid(result.toString())) {
|
|
285
291
|
this.pluginLocation = result;
|
|
286
|
-
this.messageService.info('Plugin folder is set to: '
|
|
292
|
+
this.messageService.info(nls.localize('theia/plugin-dev/pluginFolder', 'Plugin folder is set to: {0}', this.labelProvider.getLongName(result)));
|
|
287
293
|
} else {
|
|
288
|
-
this.messageService.error('Specified folder does not contain valid plugin.');
|
|
294
|
+
this.messageService.error(nls.localize('theia/plugin-dev/noValidPlugin', 'Specified folder does not contain valid plugin.'));
|
|
289
295
|
}
|
|
290
296
|
}
|
|
291
297
|
}
|
|
@@ -334,7 +340,7 @@ export class HostedPluginManagerClient {
|
|
|
334
340
|
and new ones will be created by running `startDebugSessionManager()`
|
|
335
341
|
*/
|
|
336
342
|
if (sessions.length > 0) {
|
|
337
|
-
sessions.forEach(session =>
|
|
343
|
+
sessions.forEach(session => this.debugSessionManager.terminateSession(session));
|
|
338
344
|
await this.startDebugSessionManager();
|
|
339
345
|
instanceURI = this.pluginInstanceURL;
|
|
340
346
|
} else {
|
|
@@ -386,7 +392,7 @@ class OpenHostedInstanceLinkDialog extends AbstractDialog<string> {
|
|
|
386
392
|
|
|
387
393
|
constructor(windowService: WindowService) {
|
|
388
394
|
super({
|
|
389
|
-
title: 'Your browser prevented opening of a new tab'
|
|
395
|
+
title: nls.localize('theia/plugin-dev/preventedNewTab', 'Your browser prevented opening of a new tab')
|
|
390
396
|
});
|
|
391
397
|
this.windowService = windowService;
|
|
392
398
|
|
|
@@ -396,7 +402,7 @@ class OpenHostedInstanceLinkDialog extends AbstractDialog<string> {
|
|
|
396
402
|
this.contentNode.appendChild(this.linkNode);
|
|
397
403
|
|
|
398
404
|
const messageNode = document.createElement('div');
|
|
399
|
-
messageNode.innerText = 'Hosted instance is
|
|
405
|
+
messageNode.innerText = nls.localize('theia/plugin-dev/running', 'Hosted instance is running at:') + ' ';
|
|
400
406
|
messageNode.appendChild(this.linkNode);
|
|
401
407
|
this.contentNode.appendChild(messageNode);
|
|
402
408
|
|