@theia/plugin-dev 1.34.2 → 1.34.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/LICENSE +641 -641
  2. package/README.md +31 -31
  3. package/lib/browser/hosted-plugin-controller.d.ts +74 -74
  4. package/lib/browser/hosted-plugin-controller.js +352 -352
  5. package/lib/browser/hosted-plugin-frontend-contribution.d.ts +6 -6
  6. package/lib/browser/hosted-plugin-frontend-contribution.js +56 -56
  7. package/lib/browser/hosted-plugin-informer.d.ts +25 -25
  8. package/lib/browser/hosted-plugin-informer.js +102 -102
  9. package/lib/browser/hosted-plugin-log-viewer.d.ts +14 -14
  10. package/lib/browser/hosted-plugin-log-viewer.js +69 -69
  11. package/lib/browser/hosted-plugin-manager-client.d.ts +79 -79
  12. package/lib/browser/hosted-plugin-manager-client.js +407 -407
  13. package/lib/browser/hosted-plugin-preferences.d.ts +13 -13
  14. package/lib/browser/hosted-plugin-preferences.js +60 -60
  15. package/lib/browser/plugin-dev-frontend-module.d.ts +3 -3
  16. package/lib/browser/plugin-dev-frontend-module.js +42 -42
  17. package/lib/common/index.d.ts +2 -2
  18. package/lib/common/index.js +31 -31
  19. package/lib/common/plugin-dev-protocol.d.ts +24 -24
  20. package/lib/common/plugin-dev-protocol.js +20 -20
  21. package/lib/node/hosted-instance-manager.d.ts +102 -102
  22. package/lib/node/hosted-instance-manager.js +316 -316
  23. package/lib/node/hosted-plugin-reader.d.ts +11 -11
  24. package/lib/node/hosted-plugin-reader.js +68 -68
  25. package/lib/node/hosted-plugin-uri-postprocessor.d.ts +6 -6
  26. package/lib/node/hosted-plugin-uri-postprocessor.js +27 -27
  27. package/lib/node/hosted-plugins-manager.d.ts +41 -41
  28. package/lib/node/hosted-plugins-manager.js +118 -118
  29. package/lib/node/plugin-dev-backend-module.d.ts +4 -4
  30. package/lib/node/plugin-dev-backend-module.js +53 -53
  31. package/lib/node/plugin-dev-service.d.ts +25 -25
  32. package/lib/node/plugin-dev-service.js +108 -108
  33. package/lib/node-electron/plugin-dev-electron-backend-module.d.ts +3 -3
  34. package/lib/node-electron/plugin-dev-electron-backend-module.js +28 -28
  35. package/lib/package.spec.js +25 -25
  36. package/package.json +9 -9
  37. package/src/browser/hosted-plugin-controller.ts +356 -356
  38. package/src/browser/hosted-plugin-frontend-contribution.ts +45 -45
  39. package/src/browser/hosted-plugin-informer.ts +93 -93
  40. package/src/browser/hosted-plugin-log-viewer.ts +52 -52
  41. package/src/browser/hosted-plugin-manager-client.ts +426 -426
  42. package/src/browser/hosted-plugin-preferences.ts +71 -71
  43. package/src/browser/plugin-dev-frontend-module.ts +45 -45
  44. package/src/common/index.ts +21 -21
  45. package/src/common/plugin-dev-protocol.ts +45 -45
  46. package/src/node/hosted-instance-manager.ts +381 -381
  47. package/src/node/hosted-plugin-reader.ts +58 -58
  48. package/src/node/hosted-plugin-uri-postprocessor.ts +32 -32
  49. package/src/node/hosted-plugins-manager.ts +146 -146
  50. package/src/node/plugin-dev-backend-module.ts +54 -54
  51. package/src/node/plugin-dev-service.ts +107 -107
  52. package/src/node-electron/plugin-dev-electron-backend-module.ts +29 -29
  53. package/src/package.spec.ts +28 -28
@@ -1,71 +1,71 @@
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
-
17
- import { interfaces } from '@theia/core/shared/inversify';
18
- import { createPreferenceProxy, PreferenceProxy, PreferenceService, PreferenceContribution, PreferenceSchema } from '@theia/core/lib/browser';
19
- import { nls } from '@theia/core/lib/common/nls';
20
-
21
- export const HostedPluginConfigSchema: PreferenceSchema = {
22
- 'type': 'object',
23
- properties: {
24
- 'hosted-plugin.watchMode': {
25
- type: 'boolean',
26
- description: nls.localize('theia/plugin-dev/watchMode', 'Run watcher on plugin under development'),
27
- default: true
28
- },
29
- 'hosted-plugin.debugMode': {
30
- type: 'string',
31
- description: nls.localize('theia/plugin-dev/debugMode', 'Using inspect or inspect-brk for Node.js debug'),
32
- default: 'inspect',
33
- enum: ['inspect', 'inspect-brk']
34
- },
35
- 'hosted-plugin.launchOutFiles': {
36
- type: 'array',
37
- items: {
38
- type: 'string'
39
- },
40
- markdownDescription: nls.localize(
41
- 'theia/plugin-dev/launchOutFiles',
42
- 'Array of glob patterns for locating generated JavaScript files (`${pluginPath}` will be replaced by plugin actual path).'
43
- ),
44
- default: ['${pluginPath}/out/**/*.js']
45
- }
46
- }
47
- };
48
-
49
- export interface HostedPluginConfiguration {
50
- 'hosted-plugin.watchMode': boolean;
51
- 'hosted-plugin.debugMode': string;
52
- 'hosted-plugin.launchOutFiles': string[];
53
- }
54
-
55
- export const HostedPluginPreferenceContribution = Symbol('HostedPluginPreferenceContribution');
56
- export const HostedPluginPreferences = Symbol('HostedPluginPreferences');
57
- export type HostedPluginPreferences = PreferenceProxy<HostedPluginConfiguration>;
58
-
59
- export function createNavigatorPreferences(preferences: PreferenceService, schema: PreferenceSchema = HostedPluginConfigSchema): HostedPluginPreferences {
60
- return createPreferenceProxy(preferences, schema);
61
- }
62
-
63
- export function bindHostedPluginPreferences(bind: interfaces.Bind): void {
64
- bind(HostedPluginPreferences).toDynamicValue(ctx => {
65
- const preferences = ctx.container.get<PreferenceService>(PreferenceService);
66
- const contribution = ctx.container.get<PreferenceContribution>(HostedPluginPreferenceContribution);
67
- return createNavigatorPreferences(preferences, contribution.schema);
68
- }).inSingletonScope();
69
- bind(HostedPluginPreferenceContribution).toConstantValue({ schema: HostedPluginConfigSchema });
70
- bind(PreferenceContribution).toService(HostedPluginPreferenceContribution);
71
- }
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
+
17
+ import { interfaces } from '@theia/core/shared/inversify';
18
+ import { createPreferenceProxy, PreferenceProxy, PreferenceService, PreferenceContribution, PreferenceSchema } from '@theia/core/lib/browser';
19
+ import { nls } from '@theia/core/lib/common/nls';
20
+
21
+ export const HostedPluginConfigSchema: PreferenceSchema = {
22
+ 'type': 'object',
23
+ properties: {
24
+ 'hosted-plugin.watchMode': {
25
+ type: 'boolean',
26
+ description: nls.localize('theia/plugin-dev/watchMode', 'Run watcher on plugin under development'),
27
+ default: true
28
+ },
29
+ 'hosted-plugin.debugMode': {
30
+ type: 'string',
31
+ description: nls.localize('theia/plugin-dev/debugMode', 'Using inspect or inspect-brk for Node.js debug'),
32
+ default: 'inspect',
33
+ enum: ['inspect', 'inspect-brk']
34
+ },
35
+ 'hosted-plugin.launchOutFiles': {
36
+ type: 'array',
37
+ items: {
38
+ type: 'string'
39
+ },
40
+ markdownDescription: nls.localize(
41
+ 'theia/plugin-dev/launchOutFiles',
42
+ 'Array of glob patterns for locating generated JavaScript files (`${pluginPath}` will be replaced by plugin actual path).'
43
+ ),
44
+ default: ['${pluginPath}/out/**/*.js']
45
+ }
46
+ }
47
+ };
48
+
49
+ export interface HostedPluginConfiguration {
50
+ 'hosted-plugin.watchMode': boolean;
51
+ 'hosted-plugin.debugMode': string;
52
+ 'hosted-plugin.launchOutFiles': string[];
53
+ }
54
+
55
+ export const HostedPluginPreferenceContribution = Symbol('HostedPluginPreferenceContribution');
56
+ export const HostedPluginPreferences = Symbol('HostedPluginPreferences');
57
+ export type HostedPluginPreferences = PreferenceProxy<HostedPluginConfiguration>;
58
+
59
+ export function createNavigatorPreferences(preferences: PreferenceService, schema: PreferenceSchema = HostedPluginConfigSchema): HostedPluginPreferences {
60
+ return createPreferenceProxy(preferences, schema);
61
+ }
62
+
63
+ export function bindHostedPluginPreferences(bind: interfaces.Bind): void {
64
+ bind(HostedPluginPreferences).toDynamicValue(ctx => {
65
+ const preferences = ctx.container.get<PreferenceService>(PreferenceService);
66
+ const contribution = ctx.container.get<PreferenceContribution>(HostedPluginPreferenceContribution);
67
+ return createNavigatorPreferences(preferences, contribution.schema);
68
+ }).inSingletonScope();
69
+ bind(HostedPluginPreferenceContribution).toConstantValue({ schema: HostedPluginConfigSchema });
70
+ bind(PreferenceContribution).toService(HostedPluginPreferenceContribution);
71
+ }
@@ -1,45 +1,45 @@
1
- // *****************************************************************************
2
- // Copyright (C) 2019 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
-
17
- import { HostedPluginLogViewer } from './hosted-plugin-log-viewer';
18
- import { HostedPluginManagerClient } from './hosted-plugin-manager-client';
19
- import { HostedPluginInformer } from './hosted-plugin-informer';
20
- import { bindHostedPluginPreferences } from './hosted-plugin-preferences';
21
- import { HostedPluginController } from './hosted-plugin-controller';
22
- import { ContainerModule } from '@theia/core/shared/inversify';
23
- import { FrontendApplicationContribution, WebSocketConnectionProvider } from '@theia/core/lib/browser';
24
- import { HostedPluginFrontendContribution } from './hosted-plugin-frontend-contribution';
25
- import { CommandContribution } from '@theia/core/lib/common/command';
26
- import { PluginDevServer, pluginDevServicePath } from '../common/plugin-dev-protocol';
27
- import { DebugContribution } from '@theia/debug/lib/browser/debug-contribution';
28
-
29
- export default new ContainerModule((bind, unbind, isBound, rebind) => {
30
- bindHostedPluginPreferences(bind);
31
- bind(HostedPluginLogViewer).toSelf().inSingletonScope();
32
- bind(HostedPluginManagerClient).toSelf().inSingletonScope();
33
- bind(DebugContribution).toService(HostedPluginManagerClient);
34
-
35
- bind(FrontendApplicationContribution).to(HostedPluginInformer).inSingletonScope();
36
- bind(FrontendApplicationContribution).to(HostedPluginController).inSingletonScope();
37
-
38
- bind(HostedPluginFrontendContribution).toSelf().inSingletonScope();
39
- bind(CommandContribution).toService(HostedPluginFrontendContribution);
40
-
41
- bind(PluginDevServer).toDynamicValue(ctx => {
42
- const connection = ctx.container.get(WebSocketConnectionProvider);
43
- return connection.createProxy<PluginDevServer>(pluginDevServicePath);
44
- }).inSingletonScope();
45
- });
1
+ // *****************************************************************************
2
+ // Copyright (C) 2019 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
+
17
+ import { HostedPluginLogViewer } from './hosted-plugin-log-viewer';
18
+ import { HostedPluginManagerClient } from './hosted-plugin-manager-client';
19
+ import { HostedPluginInformer } from './hosted-plugin-informer';
20
+ import { bindHostedPluginPreferences } from './hosted-plugin-preferences';
21
+ import { HostedPluginController } from './hosted-plugin-controller';
22
+ import { ContainerModule } from '@theia/core/shared/inversify';
23
+ import { FrontendApplicationContribution, WebSocketConnectionProvider } from '@theia/core/lib/browser';
24
+ import { HostedPluginFrontendContribution } from './hosted-plugin-frontend-contribution';
25
+ import { CommandContribution } from '@theia/core/lib/common/command';
26
+ import { PluginDevServer, pluginDevServicePath } from '../common/plugin-dev-protocol';
27
+ import { DebugContribution } from '@theia/debug/lib/browser/debug-contribution';
28
+
29
+ export default new ContainerModule((bind, unbind, isBound, rebind) => {
30
+ bindHostedPluginPreferences(bind);
31
+ bind(HostedPluginLogViewer).toSelf().inSingletonScope();
32
+ bind(HostedPluginManagerClient).toSelf().inSingletonScope();
33
+ bind(DebugContribution).toService(HostedPluginManagerClient);
34
+
35
+ bind(FrontendApplicationContribution).to(HostedPluginInformer).inSingletonScope();
36
+ bind(FrontendApplicationContribution).to(HostedPluginController).inSingletonScope();
37
+
38
+ bind(HostedPluginFrontendContribution).toSelf().inSingletonScope();
39
+ bind(CommandContribution).toService(HostedPluginFrontendContribution);
40
+
41
+ bind(PluginDevServer).toDynamicValue(ctx => {
42
+ const connection = ctx.container.get(WebSocketConnectionProvider);
43
+ return connection.createProxy<PluginDevServer>(pluginDevServicePath);
44
+ }).inSingletonScope();
45
+ });
@@ -1,21 +1,21 @@
1
- // *****************************************************************************
2
- // Copyright (C) 2019 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
-
17
- // Exports contribution point for uri postprocessor of hosted plugin manager.
18
- // This could be used to alter hosted instance uri, for example, change port.
19
- export * from '../node/hosted-plugin-uri-postprocessor';
20
-
21
- export * from './plugin-dev-protocol';
1
+ // *****************************************************************************
2
+ // Copyright (C) 2019 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
+
17
+ // Exports contribution point for uri postprocessor of hosted plugin manager.
18
+ // This could be used to alter hosted instance uri, for example, change port.
19
+ export * from '../node/hosted-plugin-uri-postprocessor';
20
+
21
+ export * from './plugin-dev-protocol';
@@ -1,45 +1,45 @@
1
- // *****************************************************************************
2
- // Copyright (C) 2019 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
-
17
- import { JsonRpcServer } from '@theia/core/lib/common/messaging/proxy-factory';
18
- import { PluginMetadata } from '@theia/plugin-ext/lib/common/plugin-protocol';
19
-
20
- export const pluginDevServicePath = '/services/plugin-dev';
21
- export const PluginDevServer = Symbol('PluginDevServer');
22
- export interface PluginDevServer extends JsonRpcServer<PluginDevClient> {
23
- getHostedPlugin(): Promise<PluginMetadata | undefined>;
24
- runHostedPluginInstance(uri: string): Promise<string>;
25
- runDebugHostedPluginInstance(uri: string, debugConfig: PluginDebugConfiguration): Promise<string>;
26
- terminateHostedPluginInstance(): Promise<void>;
27
- isHostedPluginInstanceRunning(): Promise<boolean>;
28
- getHostedPluginInstanceURI(): Promise<string>;
29
- getHostedPluginURI(): Promise<string>;
30
-
31
- runWatchCompilation(uri: string): Promise<void>;
32
- stopWatchCompilation(uri: string): Promise<void>;
33
- isWatchCompilationRunning(uri: string): Promise<boolean>;
34
-
35
- isPluginValid(uri: string): Promise<boolean>;
36
- }
37
-
38
- export interface PluginDevClient {
39
- }
40
-
41
- export interface PluginDebugConfiguration {
42
- debugMode?: string;
43
- pluginLocation?: string;
44
- debugPort?: string;
45
- }
1
+ // *****************************************************************************
2
+ // Copyright (C) 2019 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
+
17
+ import { JsonRpcServer } from '@theia/core/lib/common/messaging/proxy-factory';
18
+ import { PluginMetadata } from '@theia/plugin-ext/lib/common/plugin-protocol';
19
+
20
+ export const pluginDevServicePath = '/services/plugin-dev';
21
+ export const PluginDevServer = Symbol('PluginDevServer');
22
+ export interface PluginDevServer extends JsonRpcServer<PluginDevClient> {
23
+ getHostedPlugin(): Promise<PluginMetadata | undefined>;
24
+ runHostedPluginInstance(uri: string): Promise<string>;
25
+ runDebugHostedPluginInstance(uri: string, debugConfig: PluginDebugConfiguration): Promise<string>;
26
+ terminateHostedPluginInstance(): Promise<void>;
27
+ isHostedPluginInstanceRunning(): Promise<boolean>;
28
+ getHostedPluginInstanceURI(): Promise<string>;
29
+ getHostedPluginURI(): Promise<string>;
30
+
31
+ runWatchCompilation(uri: string): Promise<void>;
32
+ stopWatchCompilation(uri: string): Promise<void>;
33
+ isWatchCompilationRunning(uri: string): Promise<boolean>;
34
+
35
+ isPluginValid(uri: string): Promise<boolean>;
36
+ }
37
+
38
+ export interface PluginDevClient {
39
+ }
40
+
41
+ export interface PluginDebugConfiguration {
42
+ debugMode?: string;
43
+ pluginLocation?: string;
44
+ debugPort?: string;
45
+ }