@theia/plugin-dev 1.45.0 → 1.46.0-next.72

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 (54) hide show
  1. package/README.md +31 -31
  2. package/lib/browser/hosted-plugin-controller.d.ts +74 -74
  3. package/lib/browser/hosted-plugin-controller.js +352 -352
  4. package/lib/browser/hosted-plugin-frontend-contribution.d.ts +6 -6
  5. package/lib/browser/hosted-plugin-frontend-contribution.js +56 -56
  6. package/lib/browser/hosted-plugin-informer.d.ts +25 -25
  7. package/lib/browser/hosted-plugin-informer.js +102 -102
  8. package/lib/browser/hosted-plugin-log-viewer.d.ts +14 -14
  9. package/lib/browser/hosted-plugin-log-viewer.js +69 -69
  10. package/lib/browser/hosted-plugin-manager-client.d.ts +80 -80
  11. package/lib/browser/hosted-plugin-manager-client.js +410 -410
  12. package/lib/browser/hosted-plugin-preferences.d.ts +13 -13
  13. package/lib/browser/hosted-plugin-preferences.js +60 -60
  14. package/lib/browser/plugin-dev-frontend-module.d.ts +3 -3
  15. package/lib/browser/plugin-dev-frontend-module.js +42 -42
  16. package/lib/common/index.d.ts +2 -2
  17. package/lib/common/index.js +31 -31
  18. package/lib/common/plugin-dev-protocol.d.ts +24 -24
  19. package/lib/common/plugin-dev-protocol.js +20 -20
  20. package/lib/node/hosted-instance-manager.d.ts +104 -104
  21. package/lib/node/hosted-instance-manager.js +320 -320
  22. package/lib/node/hosted-instance-manager.js.map +1 -1
  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-reader.js.map +1 -1
  26. package/lib/node/hosted-plugin-uri-postprocessor.d.ts +6 -6
  27. package/lib/node/hosted-plugin-uri-postprocessor.js +27 -27
  28. package/lib/node/hosted-plugins-manager.d.ts +41 -41
  29. package/lib/node/hosted-plugins-manager.js +119 -119
  30. package/lib/node/plugin-dev-backend-module.d.ts +4 -4
  31. package/lib/node/plugin-dev-backend-module.js +53 -53
  32. package/lib/node/plugin-dev-service.d.ts +25 -25
  33. package/lib/node/plugin-dev-service.js +108 -108
  34. package/lib/node-electron/plugin-dev-electron-backend-module.d.ts +3 -3
  35. package/lib/node-electron/plugin-dev-electron-backend-module.js +28 -28
  36. package/lib/package.spec.js +25 -25
  37. package/package.json +9 -9
  38. package/src/browser/hosted-plugin-controller.ts +356 -356
  39. package/src/browser/hosted-plugin-frontend-contribution.ts +45 -45
  40. package/src/browser/hosted-plugin-informer.ts +93 -93
  41. package/src/browser/hosted-plugin-log-viewer.ts +52 -52
  42. package/src/browser/hosted-plugin-manager-client.ts +430 -430
  43. package/src/browser/hosted-plugin-preferences.ts +71 -71
  44. package/src/browser/plugin-dev-frontend-module.ts +45 -45
  45. package/src/common/index.ts +21 -21
  46. package/src/common/plugin-dev-protocol.ts +45 -45
  47. package/src/node/hosted-instance-manager.ts +382 -382
  48. package/src/node/hosted-plugin-reader.ts +58 -58
  49. package/src/node/hosted-plugin-uri-postprocessor.ts +32 -32
  50. package/src/node/hosted-plugins-manager.ts +146 -146
  51. package/src/node/plugin-dev-backend-module.ts +54 -54
  52. package/src/node/plugin-dev-service.ts +107 -107
  53. package/src/node-electron/plugin-dev-electron-backend-module.ts +29 -29
  54. 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-only 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-only 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-only 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-only 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-only 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-only 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-only WITH Classpath-exception-2.0
15
- // *****************************************************************************
16
-
17
- import { RpcServer } 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 RpcServer<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-only WITH Classpath-exception-2.0
15
+ // *****************************************************************************
16
+
17
+ import { RpcServer } 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 RpcServer<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
+ }