@theia/plugin-dev 1.67.0-next.56 → 1.67.0-next.86
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 +75 -0
- package/lib/browser/hosted-plugin-controller.d.ts.map +1 -0
- package/lib/browser/hosted-plugin-controller.js +345 -0
- package/lib/browser/hosted-plugin-controller.js.map +1 -0
- package/lib/browser/hosted-plugin-frontend-contribution.d.ts +7 -0
- package/lib/browser/hosted-plugin-frontend-contribution.d.ts.map +1 -0
- package/lib/browser/hosted-plugin-frontend-contribution.js +49 -0
- package/lib/browser/hosted-plugin-frontend-contribution.js.map +1 -0
- package/lib/browser/hosted-plugin-informer.d.ts +26 -0
- package/lib/browser/hosted-plugin-informer.d.ts.map +1 -0
- package/lib/browser/hosted-plugin-informer.js +95 -0
- package/lib/browser/hosted-plugin-informer.js.map +1 -0
- package/lib/browser/hosted-plugin-log-viewer.d.ts +15 -0
- package/lib/browser/hosted-plugin-log-viewer.d.ts.map +1 -0
- package/lib/browser/hosted-plugin-log-viewer.js +62 -0
- package/lib/browser/hosted-plugin-log-viewer.js.map +1 -0
- package/lib/browser/hosted-plugin-manager-client.d.ts +81 -0
- package/lib/browser/hosted-plugin-manager-client.d.ts.map +1 -0
- package/lib/browser/hosted-plugin-manager-client.js +407 -0
- package/lib/browser/hosted-plugin-manager-client.js.map +1 -0
- package/lib/browser/plugin-dev-frontend-module.d.ts +4 -0
- package/lib/browser/plugin-dev-frontend-module.d.ts.map +1 -0
- package/lib/browser/plugin-dev-frontend-module.js +43 -0
- package/lib/browser/plugin-dev-frontend-module.js.map +1 -0
- package/lib/common/hosted-plugin-preferences.d.ts +16 -0
- package/lib/common/hosted-plugin-preferences.d.ts.map +1 -0
- package/lib/common/hosted-plugin-preferences.js +81 -0
- package/lib/common/hosted-plugin-preferences.js.map +1 -0
- package/lib/common/index.d.ts +3 -0
- package/lib/common/index.d.ts.map +1 -0
- package/lib/common/index.js +23 -0
- package/lib/common/index.js.map +1 -0
- package/lib/common/plugin-dev-protocol.d.ts +29 -0
- package/lib/common/plugin-dev-protocol.d.ts.map +1 -0
- package/lib/common/plugin-dev-protocol.js +21 -0
- package/lib/common/plugin-dev-protocol.js.map +1 -0
- package/lib/node/hosted-instance-manager.d.ts +105 -0
- package/lib/node/hosted-instance-manager.d.ts.map +1 -0
- package/lib/node/hosted-instance-manager.js +329 -0
- package/lib/node/hosted-instance-manager.js.map +1 -0
- package/lib/node/hosted-plugin-reader.d.ts +11 -0
- package/lib/node/hosted-plugin-reader.d.ts.map +1 -0
- package/lib/node/hosted-plugin-reader.js +61 -0
- package/lib/node/hosted-plugin-reader.js.map +1 -0
- package/lib/node/hosted-plugin-uri-postprocessor.d.ts +7 -0
- package/lib/node/hosted-plugin-uri-postprocessor.d.ts.map +1 -0
- package/lib/node/hosted-plugin-uri-postprocessor.js +28 -0
- package/lib/node/hosted-plugin-uri-postprocessor.js.map +1 -0
- package/lib/node/hosted-plugins-manager.d.ts +44 -0
- package/lib/node/hosted-plugins-manager.d.ts.map +1 -0
- package/lib/node/hosted-plugins-manager.js +111 -0
- package/lib/node/hosted-plugins-manager.js.map +1 -0
- package/lib/node/plugin-dev-backend-module.d.ts +5 -0
- package/lib/node/plugin-dev-backend-module.d.ts.map +1 -0
- package/lib/node/plugin-dev-backend-module.js +56 -0
- package/lib/node/plugin-dev-backend-module.js.map +1 -0
- package/lib/node/plugin-dev-service.d.ts +26 -0
- package/lib/node/plugin-dev-service.d.ts.map +1 -0
- package/lib/node/plugin-dev-service.js +101 -0
- package/lib/node/plugin-dev-service.js.map +1 -0
- package/lib/node-electron/plugin-dev-electron-backend-module.d.ts +4 -0
- package/lib/node-electron/plugin-dev-electron-backend-module.d.ts.map +1 -0
- package/lib/node-electron/plugin-dev-electron-backend-module.js +29 -0
- package/lib/node-electron/plugin-dev-electron-backend-module.js.map +1 -0
- package/lib/package.spec.d.ts +1 -0
- package/lib/package.spec.d.ts.map +1 -0
- package/lib/package.spec.js +26 -0
- package/lib/package.spec.js.map +1 -0
- package/package.json +8 -8
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *****************************************************************************
|
|
3
|
+
// Copyright (C) 2019 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-only WITH Classpath-exception-2.0
|
|
16
|
+
// *****************************************************************************
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
const hosted_plugin_log_viewer_1 = require("./hosted-plugin-log-viewer");
|
|
19
|
+
const hosted_plugin_manager_client_1 = require("./hosted-plugin-manager-client");
|
|
20
|
+
const hosted_plugin_informer_1 = require("./hosted-plugin-informer");
|
|
21
|
+
const hosted_plugin_preferences_1 = require("../common/hosted-plugin-preferences");
|
|
22
|
+
const hosted_plugin_controller_1 = require("./hosted-plugin-controller");
|
|
23
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
24
|
+
const browser_1 = require("@theia/core/lib/browser");
|
|
25
|
+
const hosted_plugin_frontend_contribution_1 = require("./hosted-plugin-frontend-contribution");
|
|
26
|
+
const command_1 = require("@theia/core/lib/common/command");
|
|
27
|
+
const plugin_dev_protocol_1 = require("../common/plugin-dev-protocol");
|
|
28
|
+
const debug_contribution_1 = require("@theia/debug/lib/browser/debug-contribution");
|
|
29
|
+
exports.default = new inversify_1.ContainerModule((bind, unbind, isBound, rebind) => {
|
|
30
|
+
(0, hosted_plugin_preferences_1.bindHostedPluginPreferences)(bind);
|
|
31
|
+
bind(hosted_plugin_log_viewer_1.HostedPluginLogViewer).toSelf().inSingletonScope();
|
|
32
|
+
bind(hosted_plugin_manager_client_1.HostedPluginManagerClient).toSelf().inSingletonScope();
|
|
33
|
+
bind(debug_contribution_1.DebugContribution).toService(hosted_plugin_manager_client_1.HostedPluginManagerClient);
|
|
34
|
+
bind(browser_1.FrontendApplicationContribution).to(hosted_plugin_informer_1.HostedPluginInformer).inSingletonScope();
|
|
35
|
+
bind(browser_1.FrontendApplicationContribution).to(hosted_plugin_controller_1.HostedPluginController).inSingletonScope();
|
|
36
|
+
bind(hosted_plugin_frontend_contribution_1.HostedPluginFrontendContribution).toSelf().inSingletonScope();
|
|
37
|
+
bind(command_1.CommandContribution).toService(hosted_plugin_frontend_contribution_1.HostedPluginFrontendContribution);
|
|
38
|
+
bind(plugin_dev_protocol_1.PluginDevServer).toDynamicValue(ctx => {
|
|
39
|
+
const connection = ctx.container.get(browser_1.WebSocketConnectionProvider);
|
|
40
|
+
return connection.createProxy(plugin_dev_protocol_1.pluginDevServicePath);
|
|
41
|
+
}).inSingletonScope();
|
|
42
|
+
});
|
|
43
|
+
//# sourceMappingURL=plugin-dev-frontend-module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-dev-frontend-module.js","sourceRoot":"","sources":["../../src/browser/plugin-dev-frontend-module.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,+CAA+C;AAC/C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;AAEhF,yEAAmE;AACnE,iFAA2E;AAC3E,qEAAgE;AAChE,mFAAkF;AAClF,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,IAAA,uDAA2B,EAAC,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"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { interfaces } from '@theia/core/shared/inversify';
|
|
2
|
+
import { PreferenceProxy, PreferenceSchema, PreferenceService } from '@theia/core/lib/common';
|
|
3
|
+
import { PluginDebugPort } from './plugin-dev-protocol';
|
|
4
|
+
export declare const HostedPluginConfigSchema: PreferenceSchema;
|
|
5
|
+
export interface HostedPluginConfiguration {
|
|
6
|
+
'hosted-plugin.watchMode': boolean;
|
|
7
|
+
'hosted-plugin.debugMode': string;
|
|
8
|
+
'hosted-plugin.launchOutFiles': string[];
|
|
9
|
+
'hosted-plugin.debugPorts': PluginDebugPort[];
|
|
10
|
+
}
|
|
11
|
+
export declare const HostedPluginPreferenceContribution: unique symbol;
|
|
12
|
+
export declare const HostedPluginPreferences: unique symbol;
|
|
13
|
+
export type HostedPluginPreferences = PreferenceProxy<HostedPluginConfiguration>;
|
|
14
|
+
export declare function createNavigatorPreferences(preferences: PreferenceService, schema?: PreferenceSchema): HostedPluginPreferences;
|
|
15
|
+
export declare function bindHostedPluginPreferences(bind: interfaces.Bind): void;
|
|
16
|
+
//# sourceMappingURL=hosted-plugin-preferences.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hosted-plugin-preferences.d.ts","sourceRoot":"","sources":["../../src/common/hosted-plugin-preferences.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAiD,eAAe,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE7I,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,eAAO,MAAM,wBAAwB,EAAE,gBA+CtC,CAAC;AAEF,MAAM,WAAW,yBAAyB;IACtC,yBAAyB,EAAE,OAAO,CAAC;IACnC,yBAAyB,EAAE,MAAM,CAAC;IAClC,8BAA8B,EAAE,MAAM,EAAE,CAAC;IACzC,0BAA0B,EAAE,eAAe,EAAE,CAAC;CACjD;AAED,eAAO,MAAM,kCAAkC,eAA+C,CAAC;AAC/F,eAAO,MAAM,uBAAuB,eAAoC,CAAC;AACzE,MAAM,MAAM,uBAAuB,GAAG,eAAe,CAAC,yBAAyB,CAAC,CAAC;AAEjF,wBAAgB,0BAA0B,CAAC,WAAW,EAAE,iBAAiB,EAAE,MAAM,GAAE,gBAA2C,GAAG,uBAAuB,CAEvJ;AAED,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,UAAU,CAAC,IAAI,GAAG,IAAI,CAQvE"}
|
|
@@ -0,0 +1,81 @@
|
|
|
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-only WITH Classpath-exception-2.0
|
|
16
|
+
// *****************************************************************************
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.bindHostedPluginPreferences = exports.createNavigatorPreferences = exports.HostedPluginPreferences = exports.HostedPluginPreferenceContribution = exports.HostedPluginConfigSchema = void 0;
|
|
19
|
+
const common_1 = require("@theia/core/lib/common");
|
|
20
|
+
const nls_1 = require("@theia/core/lib/common/nls");
|
|
21
|
+
exports.HostedPluginConfigSchema = {
|
|
22
|
+
properties: {
|
|
23
|
+
'hosted-plugin.watchMode': {
|
|
24
|
+
type: 'boolean',
|
|
25
|
+
description: nls_1.nls.localize('theia/plugin-dev/watchMode', 'Run watcher on plugin under development'),
|
|
26
|
+
default: true
|
|
27
|
+
},
|
|
28
|
+
'hosted-plugin.debugMode': {
|
|
29
|
+
type: 'string',
|
|
30
|
+
description: nls_1.nls.localize('theia/plugin-dev/debugMode', 'Using inspect or inspect-brk for Node.js debug'),
|
|
31
|
+
default: 'inspect',
|
|
32
|
+
enum: ['inspect', 'inspect-brk']
|
|
33
|
+
},
|
|
34
|
+
'hosted-plugin.launchOutFiles': {
|
|
35
|
+
type: 'array',
|
|
36
|
+
items: {
|
|
37
|
+
type: 'string'
|
|
38
|
+
},
|
|
39
|
+
markdownDescription: nls_1.nls.localize('theia/plugin-dev/launchOutFiles', 'Array of glob patterns for locating generated JavaScript files (`${pluginPath}` will be replaced by plugin actual path).'),
|
|
40
|
+
default: ['${pluginPath}/out/**/*.js']
|
|
41
|
+
},
|
|
42
|
+
'hosted-plugin.debugPorts': {
|
|
43
|
+
type: 'array',
|
|
44
|
+
items: {
|
|
45
|
+
type: 'object',
|
|
46
|
+
properties: {
|
|
47
|
+
'serverName': {
|
|
48
|
+
type: 'string',
|
|
49
|
+
description: nls_1.nls.localize('theia/plugin-dev/debugPorts/serverName', 'The plugin host server name, e.g. "hosted-plugin" as in "--hosted-plugin-inspect=" ' +
|
|
50
|
+
'or "headless-hosted-plugin" as in "--headless-hosted-plugin-inspect="'),
|
|
51
|
+
},
|
|
52
|
+
'debugPort': {
|
|
53
|
+
type: 'number',
|
|
54
|
+
minimum: 0,
|
|
55
|
+
maximum: 65535,
|
|
56
|
+
description: nls_1.nls.localize('theia/plugin-dev/debugPorts/debugPort', 'Port to use for this server\'s Node.js debug'),
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
default: undefined,
|
|
61
|
+
description: nls_1.nls.localize('theia/plugin-dev/debugPorts', 'Port configuration per server for Node.js debug'),
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
exports.HostedPluginPreferenceContribution = Symbol('HostedPluginPreferenceContribution');
|
|
66
|
+
exports.HostedPluginPreferences = Symbol('HostedPluginPreferences');
|
|
67
|
+
function createNavigatorPreferences(preferences, schema = exports.HostedPluginConfigSchema) {
|
|
68
|
+
return (0, common_1.createPreferenceProxy)(preferences, schema);
|
|
69
|
+
}
|
|
70
|
+
exports.createNavigatorPreferences = createNavigatorPreferences;
|
|
71
|
+
function bindHostedPluginPreferences(bind) {
|
|
72
|
+
bind(exports.HostedPluginPreferences).toDynamicValue(ctx => {
|
|
73
|
+
const preferences = ctx.container.get(common_1.PreferenceService);
|
|
74
|
+
const contribution = ctx.container.get(exports.HostedPluginPreferenceContribution);
|
|
75
|
+
return createNavigatorPreferences(preferences, contribution.schema);
|
|
76
|
+
}).inSingletonScope();
|
|
77
|
+
bind(exports.HostedPluginPreferenceContribution).toConstantValue({ schema: exports.HostedPluginConfigSchema });
|
|
78
|
+
bind(common_1.PreferenceContribution).toService(exports.HostedPluginPreferenceContribution);
|
|
79
|
+
}
|
|
80
|
+
exports.bindHostedPluginPreferences = bindHostedPluginPreferences;
|
|
81
|
+
//# sourceMappingURL=hosted-plugin-preferences.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hosted-plugin-preferences.js","sourceRoot":"","sources":["../../src/common/hosted-plugin-preferences.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,+CAA+C;AAC/C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;AAGhF,mDAA6I;AAC7I,oDAAiD;AAGpC,QAAA,wBAAwB,GAAqB;IACtD,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,4B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QAC/C,MAAM,WAAW,GAAG,GAAG,CAAC,SAAS,CAAC,GAAG,CAAoB,0BAAiB,CAAC,CAAC;QAC5E,MAAM,YAAY,GAAG,GAAG,CAAC,SAAS,CAAC,GAAG,CAAyB,0CAAkC,CAAC,CAAC;QACnG,OAAO,0BAA0B,CAAC,WAAW,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IACxE,CAAC,CAAC,CAAC,gBAAgB,EAAE,CAAC;IACtB,IAAI,CAAC,0CAAkC,CAAC,CAAC,eAAe,CAAC,EAAE,MAAM,EAAE,gCAAwB,EAAE,CAAC,CAAC;IAC/F,IAAI,CAAC,+BAAsB,CAAC,CAAC,SAAS,CAAC,0CAAkC,CAAC,CAAC;AAC/E,CAAC;AARD,kEAQC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":"AAkBA,cAAc,yCAAyC,CAAC;AAExD,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *****************************************************************************
|
|
3
|
+
// Copyright (C) 2019 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-only WITH Classpath-exception-2.0
|
|
16
|
+
// *****************************************************************************
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
const tslib_1 = require("tslib");
|
|
19
|
+
// Exports contribution point for uri postprocessor of hosted plugin manager.
|
|
20
|
+
// This could be used to alter hosted instance uri, for example, change port.
|
|
21
|
+
tslib_1.__exportStar(require("../node/hosted-plugin-uri-postprocessor"), exports);
|
|
22
|
+
tslib_1.__exportStar(require("./plugin-dev-protocol"), exports);
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,+CAA+C;AAC/C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;AAEhF,6EAA6E;AAC7E,6EAA6E;AAC7E,kFAAwD;AAExD,gEAAsC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { RpcServer } from '@theia/core/lib/common/messaging/proxy-factory';
|
|
2
|
+
import { PluginMetadata } from '@theia/plugin-ext/lib/common/plugin-protocol';
|
|
3
|
+
export declare const pluginDevServicePath = "/services/plugin-dev";
|
|
4
|
+
export declare const PluginDevServer: unique symbol;
|
|
5
|
+
export interface PluginDevServer extends RpcServer<PluginDevClient> {
|
|
6
|
+
getHostedPlugin(): Promise<PluginMetadata | undefined>;
|
|
7
|
+
runHostedPluginInstance(uri: string): Promise<string>;
|
|
8
|
+
runDebugHostedPluginInstance(uri: string, debugConfig: PluginDebugConfiguration): Promise<string>;
|
|
9
|
+
terminateHostedPluginInstance(): Promise<void>;
|
|
10
|
+
isHostedPluginInstanceRunning(): Promise<boolean>;
|
|
11
|
+
getHostedPluginInstanceURI(): Promise<string>;
|
|
12
|
+
getHostedPluginURI(): Promise<string>;
|
|
13
|
+
runWatchCompilation(uri: string): Promise<void>;
|
|
14
|
+
stopWatchCompilation(uri: string): Promise<void>;
|
|
15
|
+
isWatchCompilationRunning(uri: string): Promise<boolean>;
|
|
16
|
+
isPluginValid(uri: string): Promise<boolean>;
|
|
17
|
+
}
|
|
18
|
+
export interface PluginDevClient {
|
|
19
|
+
}
|
|
20
|
+
export interface PluginDebugPort {
|
|
21
|
+
serverName: string;
|
|
22
|
+
debugPort: number;
|
|
23
|
+
}
|
|
24
|
+
export interface PluginDebugConfiguration {
|
|
25
|
+
debugMode?: string;
|
|
26
|
+
pluginLocation?: string;
|
|
27
|
+
debugPort?: string | PluginDebugPort[];
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=plugin-dev-protocol.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-dev-protocol.d.ts","sourceRoot":"","sources":["../../src/common/plugin-dev-protocol.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,SAAS,EAAE,MAAM,gDAAgD,CAAC;AAC3E,OAAO,EAAE,cAAc,EAAE,MAAM,8CAA8C,CAAC;AAE9E,eAAO,MAAM,oBAAoB,yBAAyB,CAAC;AAC3D,eAAO,MAAM,eAAe,eAA4B,CAAC;AACzD,MAAM,WAAW,eAAgB,SAAQ,SAAS,CAAC,eAAe,CAAC;IAC/D,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;AAED,MAAM,WAAW,eAAe;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,wBAAwB;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,GAAG,eAAe,EAAE,CAAA;CACzC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *****************************************************************************
|
|
3
|
+
// Copyright (C) 2019 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-only WITH Classpath-exception-2.0
|
|
16
|
+
// *****************************************************************************
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.PluginDevServer = exports.pluginDevServicePath = void 0;
|
|
19
|
+
exports.pluginDevServicePath = '/services/plugin-dev';
|
|
20
|
+
exports.PluginDevServer = Symbol('PluginDevServer');
|
|
21
|
+
//# sourceMappingURL=plugin-dev-protocol.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-dev-protocol.js","sourceRoot":"","sources":["../../src/common/plugin-dev-protocol.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,+CAA+C;AAC/C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;AAKnE,QAAA,oBAAoB,GAAG,sBAAsB,CAAC;AAC9C,QAAA,eAAe,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { RequestOptions, RequestService } from '@theia/core/shared/@theia/request';
|
|
3
|
+
import * as cp from 'child_process';
|
|
4
|
+
import URI from '@theia/core/lib/common/uri';
|
|
5
|
+
import { ContributionProvider } from '@theia/core/lib/common/contribution-provider';
|
|
6
|
+
import { HostedPluginUriPostProcessor } from './hosted-plugin-uri-postprocessor';
|
|
7
|
+
import { HostedPluginSupport } from '@theia/plugin-ext/lib/hosted/node/hosted-plugin';
|
|
8
|
+
import { MetadataScanner } from '@theia/plugin-ext/lib/hosted/node/metadata-scanner';
|
|
9
|
+
import { PluginDebugConfiguration } from '../common/plugin-dev-protocol';
|
|
10
|
+
import { HostedPluginProcess } from '@theia/plugin-ext/lib/hosted/node/hosted-plugin-process';
|
|
11
|
+
export declare const HostedInstanceManager: unique symbol;
|
|
12
|
+
/**
|
|
13
|
+
* Is responsible for running and handling separate Theia instance with given plugin.
|
|
14
|
+
*/
|
|
15
|
+
export interface HostedInstanceManager {
|
|
16
|
+
/**
|
|
17
|
+
* Checks whether hosted instance is run.
|
|
18
|
+
*/
|
|
19
|
+
isRunning(): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Runs specified by the given uri plugin in separate Theia instance.
|
|
22
|
+
*
|
|
23
|
+
* @param pluginUri uri to the plugin source location
|
|
24
|
+
* @param port port on which new instance of Theia should be run. Optional.
|
|
25
|
+
* @returns uri where new Theia instance is run
|
|
26
|
+
*/
|
|
27
|
+
run(pluginUri: URI, port?: number): Promise<URI>;
|
|
28
|
+
/**
|
|
29
|
+
* Runs specified by the given uri plugin with debug in separate Theia instance.
|
|
30
|
+
* @param pluginUri uri to the plugin source location
|
|
31
|
+
* @param debugConfig debug configuration
|
|
32
|
+
* @returns uri where new Theia instance is run
|
|
33
|
+
*/
|
|
34
|
+
debug(pluginUri: URI, debugConfig: PluginDebugConfiguration): Promise<URI>;
|
|
35
|
+
/**
|
|
36
|
+
* Terminates hosted plugin instance.
|
|
37
|
+
* Throws error if instance is not running.
|
|
38
|
+
*/
|
|
39
|
+
terminate(): void;
|
|
40
|
+
/**
|
|
41
|
+
* Returns uri where hosted instance is run.
|
|
42
|
+
* Throws error if instance is not running.
|
|
43
|
+
*/
|
|
44
|
+
getInstanceURI(): URI;
|
|
45
|
+
/**
|
|
46
|
+
* Returns uri where plugin loaded into hosted instance is located.
|
|
47
|
+
* Throws error if instance is not running.
|
|
48
|
+
*/
|
|
49
|
+
getPluginURI(): URI;
|
|
50
|
+
/**
|
|
51
|
+
* Checks whether given uri points to a valid plugin.
|
|
52
|
+
*
|
|
53
|
+
* @param uri uri to the plugin source location
|
|
54
|
+
*/
|
|
55
|
+
isPluginValid(uri: URI): Promise<boolean>;
|
|
56
|
+
}
|
|
57
|
+
export declare abstract class AbstractHostedInstanceManager implements HostedInstanceManager {
|
|
58
|
+
protected hostedInstanceProcess: cp.ChildProcess;
|
|
59
|
+
protected isPluginRunning: boolean;
|
|
60
|
+
protected instanceUri: URI;
|
|
61
|
+
protected pluginUri: URI;
|
|
62
|
+
protected instanceOptions: Omit<RequestOptions, 'url'>;
|
|
63
|
+
protected readonly hostedPluginSupport: HostedPluginSupport;
|
|
64
|
+
protected readonly metadata: MetadataScanner;
|
|
65
|
+
protected readonly hostedPluginProcess: HostedPluginProcess;
|
|
66
|
+
protected readonly request: RequestService;
|
|
67
|
+
isRunning(): boolean;
|
|
68
|
+
run(pluginUri: URI, port?: number): Promise<URI>;
|
|
69
|
+
debug(pluginUri: URI, debugConfig: PluginDebugConfiguration): Promise<URI>;
|
|
70
|
+
private doRun;
|
|
71
|
+
terminate(): void;
|
|
72
|
+
getInstanceURI(): URI;
|
|
73
|
+
getPluginURI(): URI;
|
|
74
|
+
/**
|
|
75
|
+
* Checks that the `instanceUri` is responding before exiting method
|
|
76
|
+
*/
|
|
77
|
+
checkInstanceUriReady(): Promise<void>;
|
|
78
|
+
/**
|
|
79
|
+
* Start a loop to ping, if ping is OK return immediately, else start a new ping after 1second. We iterate for the given amount of loops provided in remainingCount
|
|
80
|
+
* @param remainingCount the number of occurrence to check
|
|
81
|
+
* @param resolve resolve function if ok
|
|
82
|
+
* @param reject reject function if error
|
|
83
|
+
*/
|
|
84
|
+
private pingLoop;
|
|
85
|
+
/**
|
|
86
|
+
* Ping the plugin URI (checking status of the head)
|
|
87
|
+
*/
|
|
88
|
+
private ping;
|
|
89
|
+
isPluginValid(uri: URI): Promise<boolean>;
|
|
90
|
+
protected getStartCommand(port?: number, debugConfig?: PluginDebugConfiguration): Promise<string[]>;
|
|
91
|
+
protected postProcessInstanceUri(uri: URI): Promise<URI>;
|
|
92
|
+
protected postProcessInstanceOptions(options: Omit<RequestOptions, 'url'>): Promise<Omit<RequestOptions, 'url'>>;
|
|
93
|
+
protected runHostedPluginTheiaInstance(command: string[], options: cp.SpawnOptions): Promise<URI>;
|
|
94
|
+
protected validatePort(port: number): Promise<void>;
|
|
95
|
+
protected isPortFree(port: number): Promise<boolean>;
|
|
96
|
+
}
|
|
97
|
+
export declare class NodeHostedPluginRunner extends AbstractHostedInstanceManager {
|
|
98
|
+
protected readonly uriPostProcessors: ContributionProvider<HostedPluginUriPostProcessor>;
|
|
99
|
+
protected postProcessInstanceUri(uri: URI): Promise<URI>;
|
|
100
|
+
protected postProcessInstanceOptions(options: object): Promise<object>;
|
|
101
|
+
protected getStartCommand(port?: number, debugConfig?: PluginDebugConfiguration): Promise<string[]>;
|
|
102
|
+
}
|
|
103
|
+
export declare class ElectronNodeHostedPluginRunner extends AbstractHostedInstanceManager {
|
|
104
|
+
}
|
|
105
|
+
//# sourceMappingURL=hosted-instance-manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hosted-instance-manager.d.ts","sourceRoot":"","sources":["../../src/node/hosted-instance-manager.ts"],"names":[],"mappings":";AAgBA,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAEnF,OAAO,KAAK,EAAE,MAAM,eAAe,CAAC;AAIpC,OAAO,GAAG,MAAM,4BAA4B,CAAC;AAC7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,8CAA8C,CAAC;AACpF,OAAO,EAAE,4BAA4B,EAA0C,MAAM,mCAAmC,CAAC;AAIzH,OAAO,EAAE,mBAAmB,EAAE,MAAM,iDAAiD,CAAC;AACtF,OAAO,EAAE,eAAe,EAAE,MAAM,oDAAoD,CAAC;AACrF,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yDAAyD,CAAC;AAK9F,eAAO,MAAM,qBAAqB,eAAkC,CAAC;AAErE;;GAEG;AACH,MAAM,WAAW,qBAAqB;IAClC;;OAEG;IACH,SAAS,IAAI,OAAO,CAAC;IAErB;;;;;;OAMG;IACH,GAAG,CAAC,SAAS,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;IAEjD;;;;;OAKG;IACH,KAAK,CAAC,SA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