@theia/plugin-dev 1.67.0-next.3 → 1.67.0-next.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +8 -8
- package/lib/browser/hosted-plugin-controller.d.ts +0 -75
- package/lib/browser/hosted-plugin-controller.d.ts.map +0 -1
- package/lib/browser/hosted-plugin-controller.js +0 -345
- package/lib/browser/hosted-plugin-controller.js.map +0 -1
- package/lib/browser/hosted-plugin-frontend-contribution.d.ts +0 -7
- package/lib/browser/hosted-plugin-frontend-contribution.d.ts.map +0 -1
- package/lib/browser/hosted-plugin-frontend-contribution.js +0 -49
- package/lib/browser/hosted-plugin-frontend-contribution.js.map +0 -1
- package/lib/browser/hosted-plugin-informer.d.ts +0 -26
- package/lib/browser/hosted-plugin-informer.d.ts.map +0 -1
- package/lib/browser/hosted-plugin-informer.js +0 -95
- package/lib/browser/hosted-plugin-informer.js.map +0 -1
- package/lib/browser/hosted-plugin-log-viewer.d.ts +0 -15
- package/lib/browser/hosted-plugin-log-viewer.d.ts.map +0 -1
- package/lib/browser/hosted-plugin-log-viewer.js +0 -62
- package/lib/browser/hosted-plugin-log-viewer.js.map +0 -1
- package/lib/browser/hosted-plugin-manager-client.d.ts +0 -81
- package/lib/browser/hosted-plugin-manager-client.d.ts.map +0 -1
- package/lib/browser/hosted-plugin-manager-client.js +0 -407
- package/lib/browser/hosted-plugin-manager-client.js.map +0 -1
- package/lib/browser/plugin-dev-frontend-module.d.ts +0 -4
- package/lib/browser/plugin-dev-frontend-module.d.ts.map +0 -1
- package/lib/browser/plugin-dev-frontend-module.js +0 -43
- package/lib/browser/plugin-dev-frontend-module.js.map +0 -1
- package/lib/common/hosted-plugin-preferences.d.ts +0 -16
- package/lib/common/hosted-plugin-preferences.d.ts.map +0 -1
- package/lib/common/hosted-plugin-preferences.js +0 -81
- package/lib/common/hosted-plugin-preferences.js.map +0 -1
- package/lib/common/index.d.ts +0 -3
- package/lib/common/index.d.ts.map +0 -1
- package/lib/common/index.js +0 -23
- package/lib/common/index.js.map +0 -1
- package/lib/common/plugin-dev-protocol.d.ts +0 -29
- package/lib/common/plugin-dev-protocol.d.ts.map +0 -1
- package/lib/common/plugin-dev-protocol.js +0 -21
- package/lib/common/plugin-dev-protocol.js.map +0 -1
- package/lib/node/hosted-instance-manager.d.ts +0 -105
- package/lib/node/hosted-instance-manager.d.ts.map +0 -1
- package/lib/node/hosted-instance-manager.js +0 -329
- package/lib/node/hosted-instance-manager.js.map +0 -1
- package/lib/node/hosted-plugin-reader.d.ts +0 -11
- package/lib/node/hosted-plugin-reader.d.ts.map +0 -1
- package/lib/node/hosted-plugin-reader.js +0 -61
- package/lib/node/hosted-plugin-reader.js.map +0 -1
- package/lib/node/hosted-plugin-uri-postprocessor.d.ts +0 -7
- package/lib/node/hosted-plugin-uri-postprocessor.d.ts.map +0 -1
- package/lib/node/hosted-plugin-uri-postprocessor.js +0 -28
- package/lib/node/hosted-plugin-uri-postprocessor.js.map +0 -1
- package/lib/node/hosted-plugins-manager.d.ts +0 -44
- package/lib/node/hosted-plugins-manager.d.ts.map +0 -1
- package/lib/node/hosted-plugins-manager.js +0 -111
- package/lib/node/hosted-plugins-manager.js.map +0 -1
- package/lib/node/plugin-dev-backend-module.d.ts +0 -5
- package/lib/node/plugin-dev-backend-module.d.ts.map +0 -1
- package/lib/node/plugin-dev-backend-module.js +0 -56
- package/lib/node/plugin-dev-backend-module.js.map +0 -1
- package/lib/node/plugin-dev-service.d.ts +0 -26
- package/lib/node/plugin-dev-service.d.ts.map +0 -1
- package/lib/node/plugin-dev-service.js +0 -101
- package/lib/node/plugin-dev-service.js.map +0 -1
- package/lib/node-electron/plugin-dev-electron-backend-module.d.ts +0 -4
- package/lib/node-electron/plugin-dev-electron-backend-module.d.ts.map +0 -1
- package/lib/node-electron/plugin-dev-electron-backend-module.js +0 -29
- package/lib/node-electron/plugin-dev-electron-backend-module.js.map +0 -1
- package/lib/package.spec.d.ts +0 -1
- package/lib/package.spec.d.ts.map +0 -1
- package/lib/package.spec.js +0 -26
- package/lib/package.spec.js.map +0 -1
|
@@ -1,407 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// *****************************************************************************
|
|
3
|
-
// Copyright (C) 2018 Red Hat, Inc. and others.
|
|
4
|
-
//
|
|
5
|
-
// This program and the accompanying materials are made available under the
|
|
6
|
-
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
-
// http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
-
//
|
|
9
|
-
// This Source Code may also be made available under the following Secondary
|
|
10
|
-
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
-
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
-
// with the GNU Classpath Exception which is available at
|
|
13
|
-
// https://www.gnu.org/software/classpath/license.html.
|
|
14
|
-
//
|
|
15
|
-
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
|
-
// *****************************************************************************
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.HostedPluginManagerClient = exports.HostedInstanceState = exports.HostedPluginCommands = void 0;
|
|
19
|
-
const tslib_1 = require("tslib");
|
|
20
|
-
const inversify_1 = require("@theia/core/shared/inversify");
|
|
21
|
-
const uri_1 = require("@theia/core/lib/common/uri");
|
|
22
|
-
const path_1 = require("@theia/core/lib/common/path");
|
|
23
|
-
const common_1 = require("@theia/core/lib/common");
|
|
24
|
-
const browser_1 = require("@theia/core/lib/browser");
|
|
25
|
-
const window_service_1 = require("@theia/core/lib/browser/window/window-service");
|
|
26
|
-
const browser_2 = require("@theia/workspace/lib/browser");
|
|
27
|
-
const browser_3 = require("@theia/filesystem/lib/browser");
|
|
28
|
-
const plugin_dev_protocol_1 = require("../common/plugin-dev-protocol");
|
|
29
|
-
const debug_session_manager_1 = require("@theia/debug/lib/browser/debug-session-manager");
|
|
30
|
-
const hosted_plugin_preferences_1 = require("../common/hosted-plugin-preferences");
|
|
31
|
-
const file_service_1 = require("@theia/filesystem/lib/browser/file-service");
|
|
32
|
-
const env_variables_1 = require("@theia/core/lib/common/env-variables");
|
|
33
|
-
const nls_1 = require("@theia/core/lib/common/nls");
|
|
34
|
-
/**
|
|
35
|
-
* Commands to control Hosted plugin instances.
|
|
36
|
-
*/
|
|
37
|
-
var HostedPluginCommands;
|
|
38
|
-
(function (HostedPluginCommands) {
|
|
39
|
-
const HOSTED_PLUGIN_CATEGORY_KEY = 'theia/plugin-dev/hostedPlugin';
|
|
40
|
-
const HOSTED_PLUGIN_CATEGORY = 'Hosted Plugin';
|
|
41
|
-
HostedPluginCommands.START = common_1.Command.toLocalizedCommand({
|
|
42
|
-
id: 'hosted-plugin:start',
|
|
43
|
-
category: HOSTED_PLUGIN_CATEGORY,
|
|
44
|
-
label: 'Start Instance'
|
|
45
|
-
}, 'theia/plugin-dev/startInstance', HOSTED_PLUGIN_CATEGORY_KEY);
|
|
46
|
-
HostedPluginCommands.DEBUG = common_1.Command.toLocalizedCommand({
|
|
47
|
-
id: 'hosted-plugin:debug',
|
|
48
|
-
category: HOSTED_PLUGIN_CATEGORY,
|
|
49
|
-
label: 'Debug Instance'
|
|
50
|
-
}, 'theia/plugin-dev/debugInstance', HOSTED_PLUGIN_CATEGORY_KEY);
|
|
51
|
-
HostedPluginCommands.STOP = common_1.Command.toLocalizedCommand({
|
|
52
|
-
id: 'hosted-plugin:stop',
|
|
53
|
-
category: HOSTED_PLUGIN_CATEGORY,
|
|
54
|
-
label: 'Stop Instance'
|
|
55
|
-
}, 'theia/plugin-dev/stopInstance', HOSTED_PLUGIN_CATEGORY_KEY);
|
|
56
|
-
HostedPluginCommands.RESTART = common_1.Command.toLocalizedCommand({
|
|
57
|
-
id: 'hosted-plugin:restart',
|
|
58
|
-
category: HOSTED_PLUGIN_CATEGORY,
|
|
59
|
-
label: 'Restart Instance'
|
|
60
|
-
}, 'theia/plugin-dev/restartInstance', HOSTED_PLUGIN_CATEGORY_KEY);
|
|
61
|
-
HostedPluginCommands.SELECT_PATH = common_1.Command.toLocalizedCommand({
|
|
62
|
-
id: 'hosted-plugin:select-path',
|
|
63
|
-
category: HOSTED_PLUGIN_CATEGORY,
|
|
64
|
-
label: 'Select Path'
|
|
65
|
-
}, 'theia/plugin-dev/selectPath', HOSTED_PLUGIN_CATEGORY_KEY);
|
|
66
|
-
})(HostedPluginCommands || (exports.HostedPluginCommands = HostedPluginCommands = {}));
|
|
67
|
-
/**
|
|
68
|
-
* Available states of hosted plugin instance.
|
|
69
|
-
*/
|
|
70
|
-
var HostedInstanceState;
|
|
71
|
-
(function (HostedInstanceState) {
|
|
72
|
-
HostedInstanceState["STOPPED"] = "stopped";
|
|
73
|
-
HostedInstanceState["STARTING"] = "starting";
|
|
74
|
-
HostedInstanceState["RUNNING"] = "running";
|
|
75
|
-
HostedInstanceState["STOPPING"] = "stopping";
|
|
76
|
-
HostedInstanceState["FAILED"] = "failed";
|
|
77
|
-
})(HostedInstanceState || (exports.HostedInstanceState = HostedInstanceState = {}));
|
|
78
|
-
/**
|
|
79
|
-
* Responsible for UI to set up and control Hosted Plugin Instance.
|
|
80
|
-
*/
|
|
81
|
-
let HostedPluginManagerClient = class HostedPluginManagerClient {
|
|
82
|
-
constructor() {
|
|
83
|
-
this.isDebug = false;
|
|
84
|
-
this.stateChanged = new common_1.Emitter();
|
|
85
|
-
}
|
|
86
|
-
get onStateChanged() {
|
|
87
|
-
return this.stateChanged.event;
|
|
88
|
-
}
|
|
89
|
-
init() {
|
|
90
|
-
this.doInit();
|
|
91
|
-
}
|
|
92
|
-
async doInit() {
|
|
93
|
-
this.openNewTabAskDialog = new OpenHostedInstanceLinkDialog(this.windowService);
|
|
94
|
-
// is needed for case when page is loaded when hosted instance is already running.
|
|
95
|
-
if (await this.hostedPluginServer.isHostedPluginInstanceRunning()) {
|
|
96
|
-
this.pluginLocation = new uri_1.default(await this.hostedPluginServer.getHostedPluginURI());
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
get lastPluginLocation() {
|
|
100
|
-
if (this.pluginLocation) {
|
|
101
|
-
return this.pluginLocation.toString();
|
|
102
|
-
}
|
|
103
|
-
return undefined;
|
|
104
|
-
}
|
|
105
|
-
async start(debugConfig) {
|
|
106
|
-
if (await this.hostedPluginServer.isHostedPluginInstanceRunning()) {
|
|
107
|
-
this.messageService.warn(nls_1.nls.localize('theia/plugin-dev/alreadyRunning', 'Hosted instance is already running.'));
|
|
108
|
-
return;
|
|
109
|
-
}
|
|
110
|
-
if (!this.pluginLocation) {
|
|
111
|
-
await this.selectPluginPath();
|
|
112
|
-
if (!this.pluginLocation) {
|
|
113
|
-
// selection was cancelled
|
|
114
|
-
return;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
try {
|
|
118
|
-
this.stateChanged.fire({ state: HostedInstanceState.STARTING, pluginLocation: this.pluginLocation });
|
|
119
|
-
this.messageService.info(nls_1.nls.localize('theia/plugin-dev/starting', 'Starting hosted instance server ...'));
|
|
120
|
-
if (debugConfig) {
|
|
121
|
-
this.isDebug = true;
|
|
122
|
-
this.pluginInstanceURL = await this.hostedPluginServer.runDebugHostedPluginInstance(this.pluginLocation.toString(), debugConfig);
|
|
123
|
-
}
|
|
124
|
-
else {
|
|
125
|
-
this.isDebug = false;
|
|
126
|
-
this.pluginInstanceURL = await this.hostedPluginServer.runHostedPluginInstance(this.pluginLocation.toString());
|
|
127
|
-
}
|
|
128
|
-
await this.openPluginWindow();
|
|
129
|
-
this.messageService.info(`${nls_1.nls.localize('theia/plugin-dev/running', 'Hosted instance is running at:')} ${this.pluginInstanceURL}`);
|
|
130
|
-
this.stateChanged.fire({ state: HostedInstanceState.RUNNING, pluginLocation: this.pluginLocation });
|
|
131
|
-
}
|
|
132
|
-
catch (error) {
|
|
133
|
-
this.messageService.error(nls_1.nls.localize('theia/plugin-dev/failed', 'Failed to run hosted plugin instance: {0}', this.getErrorMessage(error)));
|
|
134
|
-
this.stateChanged.fire({ state: HostedInstanceState.FAILED, pluginLocation: this.pluginLocation });
|
|
135
|
-
this.stop();
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
async debug(config) {
|
|
139
|
-
await this.start(this.setDebugConfig(config));
|
|
140
|
-
await this.startDebugSessionManager();
|
|
141
|
-
return this.pluginInstanceURL;
|
|
142
|
-
}
|
|
143
|
-
async startDebugSessionManager() {
|
|
144
|
-
let outFiles = undefined;
|
|
145
|
-
if (this.pluginLocation && this.hostedPluginPreferences['hosted-plugin.launchOutFiles'].length > 0) {
|
|
146
|
-
const fsPath = await this.fileService.fsPath(this.pluginLocation);
|
|
147
|
-
if (fsPath) {
|
|
148
|
-
outFiles = this.hostedPluginPreferences['hosted-plugin.launchOutFiles'].map(outFile => outFile.replace('${pluginPath}', new path_1.Path(fsPath).toString()));
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
const name = nls_1.nls.localize('theia/plugin-dev/hostedPlugin', 'Hosted Plugin');
|
|
152
|
-
await this.debugSessionManager.start({
|
|
153
|
-
name,
|
|
154
|
-
configuration: {
|
|
155
|
-
type: 'node',
|
|
156
|
-
request: 'attach',
|
|
157
|
-
timeout: 30000,
|
|
158
|
-
name,
|
|
159
|
-
smartStep: true,
|
|
160
|
-
sourceMaps: !!outFiles,
|
|
161
|
-
outFiles
|
|
162
|
-
}
|
|
163
|
-
});
|
|
164
|
-
}
|
|
165
|
-
async stop(checkRunning = true) {
|
|
166
|
-
if (checkRunning && !await this.hostedPluginServer.isHostedPluginInstanceRunning()) {
|
|
167
|
-
this.messageService.warn(nls_1.nls.localize('theia/plugin-dev/notRunning', 'Hosted instance is not running.'));
|
|
168
|
-
return;
|
|
169
|
-
}
|
|
170
|
-
try {
|
|
171
|
-
this.stateChanged.fire({ state: HostedInstanceState.STOPPING, pluginLocation: this.pluginLocation });
|
|
172
|
-
await this.hostedPluginServer.terminateHostedPluginInstance();
|
|
173
|
-
this.messageService.info((this.pluginInstanceURL
|
|
174
|
-
? nls_1.nls.localize('theia/plugin-dev/instanceTerminated', '{0} has been terminated', this.pluginInstanceURL)
|
|
175
|
-
: nls_1.nls.localize('theia/plugin-dev/unknownTerminated', 'The instance has been terminated')));
|
|
176
|
-
this.stateChanged.fire({ state: HostedInstanceState.STOPPED, pluginLocation: this.pluginLocation });
|
|
177
|
-
}
|
|
178
|
-
catch (error) {
|
|
179
|
-
this.messageService.error(this.getErrorMessage(error));
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
async restart() {
|
|
183
|
-
if (await this.hostedPluginServer.isHostedPluginInstanceRunning()) {
|
|
184
|
-
await this.stop(false);
|
|
185
|
-
this.messageService.info(nls_1.nls.localize('theia/plugin-dev/starting', 'Starting hosted instance server ...'));
|
|
186
|
-
// It takes some time before OS released all resources e.g. port.
|
|
187
|
-
// Keep trying to run hosted instance with delay.
|
|
188
|
-
this.stateChanged.fire({ state: HostedInstanceState.STARTING, pluginLocation: this.pluginLocation });
|
|
189
|
-
let lastError;
|
|
190
|
-
for (let tries = 0; tries < 15; tries++) {
|
|
191
|
-
try {
|
|
192
|
-
if (this.isDebug) {
|
|
193
|
-
this.pluginInstanceURL = await this.hostedPluginServer.runDebugHostedPluginInstance(this.pluginLocation.toString(), {
|
|
194
|
-
debugMode: this.hostedPluginPreferences['hosted-plugin.debugMode'],
|
|
195
|
-
debugPort: [...this.hostedPluginPreferences['hosted-plugin.debugPorts']]
|
|
196
|
-
});
|
|
197
|
-
await this.startDebugSessionManager();
|
|
198
|
-
}
|
|
199
|
-
else {
|
|
200
|
-
this.pluginInstanceURL = await this.hostedPluginServer.runHostedPluginInstance(this.pluginLocation.toString());
|
|
201
|
-
}
|
|
202
|
-
await this.openPluginWindow();
|
|
203
|
-
this.messageService.info(`${nls_1.nls.localize('theia/plugin-dev/running', 'Hosted instance is running at:')} ${this.pluginInstanceURL}`);
|
|
204
|
-
this.stateChanged.fire({
|
|
205
|
-
state: HostedInstanceState.RUNNING,
|
|
206
|
-
pluginLocation: this.pluginLocation
|
|
207
|
-
});
|
|
208
|
-
return;
|
|
209
|
-
}
|
|
210
|
-
catch (error) {
|
|
211
|
-
lastError = error;
|
|
212
|
-
await new Promise(resolve => setTimeout(resolve, 500));
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
this.messageService.error(nls_1.nls.localize('theia/plugin-dev/failed', 'Failed to run hosted plugin instance: {0}', this.getErrorMessage(lastError)));
|
|
216
|
-
this.stateChanged.fire({ state: HostedInstanceState.FAILED, pluginLocation: this.pluginLocation });
|
|
217
|
-
this.stop();
|
|
218
|
-
}
|
|
219
|
-
else {
|
|
220
|
-
this.messageService.warn(nls_1.nls.localize('theia/plugin-dev/notRunning', 'Hosted instance is not running.'));
|
|
221
|
-
this.start();
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
/**
|
|
225
|
-
* Creates directory choose dialog and set selected folder into pluginLocation field.
|
|
226
|
-
*/
|
|
227
|
-
async selectPluginPath() {
|
|
228
|
-
const workspaceFolder = (await this.workspaceService.roots)[0] || await this.fileService.resolve(new uri_1.default(await this.environments.getHomeDirUri()));
|
|
229
|
-
if (!workspaceFolder) {
|
|
230
|
-
throw new Error('Unable to find the root');
|
|
231
|
-
}
|
|
232
|
-
const result = await this.fileDialogService.showOpenDialog({
|
|
233
|
-
title: HostedPluginCommands.SELECT_PATH.label,
|
|
234
|
-
openLabel: nls_1.nls.localize('theia/plugin-dev/select', 'Select'),
|
|
235
|
-
canSelectFiles: false,
|
|
236
|
-
canSelectFolders: true,
|
|
237
|
-
canSelectMany: false
|
|
238
|
-
}, workspaceFolder);
|
|
239
|
-
if (result) {
|
|
240
|
-
if (await this.hostedPluginServer.isPluginValid(result.toString())) {
|
|
241
|
-
this.pluginLocation = result;
|
|
242
|
-
this.messageService.info(nls_1.nls.localize('theia/plugin-dev/pluginFolder', 'Plugin folder is set to: {0}', this.labelProvider.getLongName(result)));
|
|
243
|
-
}
|
|
244
|
-
else {
|
|
245
|
-
this.messageService.error(nls_1.nls.localize('theia/plugin-dev/noValidPlugin', 'Specified folder does not contain valid plugin.'));
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
register(configType, connection) {
|
|
250
|
-
if (configType === 'pwa-extensionHost') {
|
|
251
|
-
this.connection = connection;
|
|
252
|
-
this.connection.onRequest('launchVSCode', (request) => this.launchVSCode(request));
|
|
253
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
254
|
-
this.connection.on('exited', async (args) => {
|
|
255
|
-
await this.stop();
|
|
256
|
-
});
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
/**
|
|
260
|
-
* Opens window with URL to the running plugin instance.
|
|
261
|
-
*/
|
|
262
|
-
async openPluginWindow() {
|
|
263
|
-
// do nothing for electron browser
|
|
264
|
-
if (browser_1.isNative) {
|
|
265
|
-
return;
|
|
266
|
-
}
|
|
267
|
-
if (this.pluginInstanceURL) {
|
|
268
|
-
try {
|
|
269
|
-
this.windowService.openNewWindow(this.pluginInstanceURL);
|
|
270
|
-
}
|
|
271
|
-
catch (err) {
|
|
272
|
-
// browser blocked opening of a new tab
|
|
273
|
-
this.openNewTabAskDialog.showOpenNewTabAskDialog(this.pluginInstanceURL);
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
async launchVSCode({ arguments: { args } }) {
|
|
278
|
-
let result = {};
|
|
279
|
-
let instanceURI;
|
|
280
|
-
const sessions = this.debugSessionManager.sessions.filter(session => session.id !== this.connection.sessionId);
|
|
281
|
-
/* if `launchVSCode` is invoked and sessions do not exist - it means that `start` debug was invoked.
|
|
282
|
-
if `launchVSCode` is invoked and sessions do exist - it means that `restartSessions()` was invoked,
|
|
283
|
-
which invoked `this.sendRequest('restart', {})`, which restarted `vscode-builtin-js-debug` plugin which is
|
|
284
|
-
connected to first session (sessions[0]), which means that other existing (child) sessions need to be terminated
|
|
285
|
-
and new ones will be created by running `startDebugSessionManager()`
|
|
286
|
-
*/
|
|
287
|
-
if (sessions.length > 0) {
|
|
288
|
-
sessions.forEach(session => this.debugSessionManager.terminateSession(session));
|
|
289
|
-
await this.startDebugSessionManager();
|
|
290
|
-
instanceURI = this.pluginInstanceURL;
|
|
291
|
-
}
|
|
292
|
-
else {
|
|
293
|
-
instanceURI = await this.debug(this.getDebugPluginConfig(args));
|
|
294
|
-
}
|
|
295
|
-
if (instanceURI) {
|
|
296
|
-
const instanceURL = new URL(instanceURI);
|
|
297
|
-
if (instanceURL.port) {
|
|
298
|
-
result = Object.assign(result, { rendererDebugPort: instanceURL.port });
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
return result;
|
|
302
|
-
}
|
|
303
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
304
|
-
getErrorMessage(error) {
|
|
305
|
-
var _a;
|
|
306
|
-
return ((_a = error === null || error === void 0 ? void 0 : error.message) === null || _a === void 0 ? void 0 : _a.substring(error.message.indexOf(':') + 1)) || '';
|
|
307
|
-
}
|
|
308
|
-
setDebugConfig(config) {
|
|
309
|
-
config = Object.assign(config || {}, { debugMode: this.hostedPluginPreferences['hosted-plugin.debugMode'] });
|
|
310
|
-
if (config.pluginLocation) {
|
|
311
|
-
this.pluginLocation = new uri_1.default((!config.pluginLocation.startsWith('/') ? '/' : '') + config.pluginLocation.replace(/\\/g, '/')).withScheme('file');
|
|
312
|
-
}
|
|
313
|
-
if (config.debugPort === undefined) {
|
|
314
|
-
config.debugPort = [...this.hostedPluginPreferences['hosted-plugin.debugPorts']];
|
|
315
|
-
}
|
|
316
|
-
return config;
|
|
317
|
-
}
|
|
318
|
-
getDebugPluginConfig(args) {
|
|
319
|
-
let pluginLocation;
|
|
320
|
-
for (const arg of args) {
|
|
321
|
-
if ((arg === null || arg === void 0 ? void 0 : arg.prefix) === '--extensionDevelopmentPath=') {
|
|
322
|
-
pluginLocation = arg.path;
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
return {
|
|
326
|
-
pluginLocation
|
|
327
|
-
};
|
|
328
|
-
}
|
|
329
|
-
};
|
|
330
|
-
exports.HostedPluginManagerClient = HostedPluginManagerClient;
|
|
331
|
-
tslib_1.__decorate([
|
|
332
|
-
(0, inversify_1.inject)(plugin_dev_protocol_1.PluginDevServer),
|
|
333
|
-
tslib_1.__metadata("design:type", Object)
|
|
334
|
-
], HostedPluginManagerClient.prototype, "hostedPluginServer", void 0);
|
|
335
|
-
tslib_1.__decorate([
|
|
336
|
-
(0, inversify_1.inject)(common_1.MessageService),
|
|
337
|
-
tslib_1.__metadata("design:type", common_1.MessageService)
|
|
338
|
-
], HostedPluginManagerClient.prototype, "messageService", void 0);
|
|
339
|
-
tslib_1.__decorate([
|
|
340
|
-
(0, inversify_1.inject)(browser_1.LabelProvider),
|
|
341
|
-
tslib_1.__metadata("design:type", browser_1.LabelProvider)
|
|
342
|
-
], HostedPluginManagerClient.prototype, "labelProvider", void 0);
|
|
343
|
-
tslib_1.__decorate([
|
|
344
|
-
(0, inversify_1.inject)(window_service_1.WindowService),
|
|
345
|
-
tslib_1.__metadata("design:type", Object)
|
|
346
|
-
], HostedPluginManagerClient.prototype, "windowService", void 0);
|
|
347
|
-
tslib_1.__decorate([
|
|
348
|
-
(0, inversify_1.inject)(file_service_1.FileService),
|
|
349
|
-
tslib_1.__metadata("design:type", file_service_1.FileService)
|
|
350
|
-
], HostedPluginManagerClient.prototype, "fileService", void 0);
|
|
351
|
-
tslib_1.__decorate([
|
|
352
|
-
(0, inversify_1.inject)(env_variables_1.EnvVariablesServer),
|
|
353
|
-
tslib_1.__metadata("design:type", Object)
|
|
354
|
-
], HostedPluginManagerClient.prototype, "environments", void 0);
|
|
355
|
-
tslib_1.__decorate([
|
|
356
|
-
(0, inversify_1.inject)(browser_2.WorkspaceService),
|
|
357
|
-
tslib_1.__metadata("design:type", browser_2.WorkspaceService)
|
|
358
|
-
], HostedPluginManagerClient.prototype, "workspaceService", void 0);
|
|
359
|
-
tslib_1.__decorate([
|
|
360
|
-
(0, inversify_1.inject)(debug_session_manager_1.DebugSessionManager),
|
|
361
|
-
tslib_1.__metadata("design:type", debug_session_manager_1.DebugSessionManager)
|
|
362
|
-
], HostedPluginManagerClient.prototype, "debugSessionManager", void 0);
|
|
363
|
-
tslib_1.__decorate([
|
|
364
|
-
(0, inversify_1.inject)(hosted_plugin_preferences_1.HostedPluginPreferences),
|
|
365
|
-
tslib_1.__metadata("design:type", Object)
|
|
366
|
-
], HostedPluginManagerClient.prototype, "hostedPluginPreferences", void 0);
|
|
367
|
-
tslib_1.__decorate([
|
|
368
|
-
(0, inversify_1.inject)(browser_3.FileDialogService),
|
|
369
|
-
tslib_1.__metadata("design:type", Object)
|
|
370
|
-
], HostedPluginManagerClient.prototype, "fileDialogService", void 0);
|
|
371
|
-
tslib_1.__decorate([
|
|
372
|
-
(0, inversify_1.postConstruct)(),
|
|
373
|
-
tslib_1.__metadata("design:type", Function),
|
|
374
|
-
tslib_1.__metadata("design:paramtypes", []),
|
|
375
|
-
tslib_1.__metadata("design:returntype", void 0)
|
|
376
|
-
], HostedPluginManagerClient.prototype, "init", null);
|
|
377
|
-
exports.HostedPluginManagerClient = HostedPluginManagerClient = tslib_1.__decorate([
|
|
378
|
-
(0, inversify_1.injectable)()
|
|
379
|
-
], HostedPluginManagerClient);
|
|
380
|
-
class OpenHostedInstanceLinkDialog extends browser_1.AbstractDialog {
|
|
381
|
-
constructor(windowService) {
|
|
382
|
-
super({
|
|
383
|
-
title: nls_1.nls.localize('theia/plugin-dev/preventedNewTab', 'Your browser prevented opening of a new tab')
|
|
384
|
-
});
|
|
385
|
-
this.windowService = windowService;
|
|
386
|
-
this.linkNode = document.createElement('a');
|
|
387
|
-
this.linkNode.target = '_blank';
|
|
388
|
-
this.linkNode.setAttribute('style', 'color: var(--theia-editorWidget-foreground);');
|
|
389
|
-
this.contentNode.appendChild(this.linkNode);
|
|
390
|
-
const messageNode = document.createElement('div');
|
|
391
|
-
messageNode.innerText = nls_1.nls.localize('theia/plugin-dev/running', 'Hosted instance is running at:') + ' ';
|
|
392
|
-
messageNode.appendChild(this.linkNode);
|
|
393
|
-
this.contentNode.appendChild(messageNode);
|
|
394
|
-
this.appendCloseButton();
|
|
395
|
-
this.openButton = this.appendAcceptButton(nls_1.nls.localizeByDefault('Open'));
|
|
396
|
-
}
|
|
397
|
-
showOpenNewTabAskDialog(uri) {
|
|
398
|
-
this.value = uri;
|
|
399
|
-
this.linkNode.textContent = uri;
|
|
400
|
-
this.linkNode.href = uri;
|
|
401
|
-
this.openButton.onclick = () => {
|
|
402
|
-
this.windowService.openNewWindow(uri);
|
|
403
|
-
};
|
|
404
|
-
this.open();
|
|
405
|
-
}
|
|
406
|
-
}
|
|
407
|
-
//# sourceMappingURL=hosted-plugin-manager-client.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hosted-plugin-manager-client.js","sourceRoot":"","sources":["../../src/browser/hosted-plugin-manager-client.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,4DAAiF;AACjF,oDAA6C;AAC7C,sDAAmD;AACnD,mDAAiF;AACjF,qDAAkF;AAClF,kFAA8E;AAC9E,0DAAgE;AAChE,2DAAkE;AAClE,uEAA0F;AAE1F,0FAAqF;AACrF,mFAA8E;AAC9E,6EAAyE;AACzE,wEAA0E;AAE1E,oDAAiD;AAEjD;;GAEG;AACH,IAAiB,oBAAoB,CAgCpC;AAhCD,WAAiB,oBAAoB;IACjC,MAAM,0BAA0B,GAAG,+BAA+B,CAAC;IACnE,MAAM,sBAAsB,GAAG,eAAe,CAAC;IAClC,0BAAK,GAAG,gBAAO,CAAC,kBAAkB,CAAC;QAC5C,EAAE,EAAE,qBAAqB;QACz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,SAAG,CAAC,QAAQ,CAAC,0BAA0B,EAAE,gCAAgC,CAAC,GAAG,GAAG,CAAC;QACzG,WAAW,CAAC,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACvC,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;QAE1C,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACzB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,kBAAkB,CAAC,SAAG,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC;IAC7E,CAAC;IAED,uBAAuB,CAAC,GAAW;QAC/B,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC;QAEjB,IAAI,CAAC,QAAQ,CAAC,WAAW,GAAG,GAAG,CAAC;QAChC,IAAI,CAAC,QAAQ,CAAC,IAAI,GAAG,GAAG,CAAC;QACzB,IAAI,CAAC,UAAU,CAAC,OAAO,GAAG,GAAG,EAAE;YAC3B,IAAI,CAAC,aAAa,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;QAC1C,CAAC,CAAC;QAEF,IAAI,CAAC,IAAI,EAAE,CAAC;IAChB,CAAC;CACJ"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-dev-frontend-module.d.ts","sourceRoot":"","sources":["../../src/browser/plugin-dev-frontend-module.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;;AAO/D,wBAgBG"}
|
|
@@ -1,43 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,16 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// *****************************************************************************
|
|
3
|
-
// Copyright (C) 2018 Red Hat, Inc. and others.
|
|
4
|
-
//
|
|
5
|
-
// This program and the accompanying materials are made available under the
|
|
6
|
-
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
-
// http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
-
//
|
|
9
|
-
// This Source Code may also be made available under the following Secondary
|
|
10
|
-
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
-
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
-
// with the GNU Classpath Exception which is available at
|
|
13
|
-
// https://www.gnu.org/software/classpath/license.html.
|
|
14
|
-
//
|
|
15
|
-
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-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
|
|
@@ -1 +0,0 @@
|
|
|
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,4BAA4B,EAAE,gDAAgD,CAAC;YACzG,OAAO,EAAE,SAAS;YAClB,IAAI,EAAE,CAAC,SAAS,EAAE,aAAa,CAAC;SACnC;QACD,8BAA8B,EAAE;YAC5B,IAAI,EAAE,OAAO;YACb,KAAK,EAAE;gBACH,IAAI,EAAE,QAAQ;aACjB;YACD,mBAAmB,EAAE,SAAG,CAAC,QAAQ,CAC7B,iCAAiC,EACjC,0HAA0H,CAC7H;YACD,OAAO,EAAE,CAAC,2BAA2B,CAAC;SACzC;QACD,0BAA0B,EAAE;YACxB,IAAI,EAAE,OAAO;YACb,KAAK,E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C;IAC/F,IAAI,CAAC,+BAAsB,CAAC,CAAC,SAAS,CAAC,0CAAkC,CAAC,CAAC;AAC/E,CAAC;AARD,kEAQC"}
|
package/lib/common/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":"AAkBA,cAAc,yCAAyC,CAAC;AAExD,cAAc,uBAAuB,CAAC"}
|
package/lib/common/index.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
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
|
package/lib/common/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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"}
|