@theia/remote 1.67.0-next.13 → 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 +6 -6
- package/src/electron-browser/port-forwarding/port-forwarding-service.ts +1 -1
- package/src/electron-browser/port-forwarding/port-forwarding-widget.tsx +1 -1
- package/lib/electron-browser/local-backend-services.d.ts +0 -11
- package/lib/electron-browser/local-backend-services.d.ts.map +0 -1
- package/lib/electron-browser/local-backend-services.js +0 -37
- package/lib/electron-browser/local-backend-services.js.map +0 -1
- package/lib/electron-browser/port-forwarding/port-forwading-contribution.d.ts +0 -6
- package/lib/electron-browser/port-forwarding/port-forwading-contribution.d.ts.map +0 -1
- package/lib/electron-browser/port-forwarding/port-forwading-contribution.js +0 -40
- package/lib/electron-browser/port-forwarding/port-forwading-contribution.js.map +0 -1
- package/lib/electron-browser/port-forwarding/port-forwarding-service.d.ts +0 -20
- package/lib/electron-browser/port-forwarding/port-forwarding-service.d.ts.map +0 -1
- package/lib/electron-browser/port-forwarding/port-forwarding-service.js +0 -89
- package/lib/electron-browser/port-forwarding/port-forwarding-service.js.map +0 -1
- package/lib/electron-browser/port-forwarding/port-forwarding-widget.d.ts +0 -17
- package/lib/electron-browser/port-forwarding/port-forwarding-widget.d.ts.map +0 -1
- package/lib/electron-browser/port-forwarding/port-forwarding-widget.js +0 -125
- package/lib/electron-browser/port-forwarding/port-forwarding-widget.js.map +0 -1
- package/lib/electron-browser/remote-electron-file-dialog-service.d.ts +0 -14
- package/lib/electron-browser/remote-electron-file-dialog-service.d.ts.map +0 -1
- package/lib/electron-browser/remote-electron-file-dialog-service.js +0 -50
- package/lib/electron-browser/remote-electron-file-dialog-service.js.map +0 -1
- package/lib/electron-browser/remote-frontend-contribution.d.ts +0 -26
- package/lib/electron-browser/remote-frontend-contribution.d.ts.map +0 -1
- package/lib/electron-browser/remote-frontend-contribution.js +0 -160
- package/lib/electron-browser/remote-frontend-contribution.js.map +0 -1
- package/lib/electron-browser/remote-frontend-module.d.ts +0 -5
- package/lib/electron-browser/remote-frontend-module.d.ts.map +0 -1
- package/lib/electron-browser/remote-frontend-module.js +0 -70
- package/lib/electron-browser/remote-frontend-module.js.map +0 -1
- package/lib/electron-browser/remote-registry-contribution.d.ts +0 -19
- package/lib/electron-browser/remote-registry-contribution.d.ts.map +0 -1
- package/lib/electron-browser/remote-registry-contribution.js +0 -70
- package/lib/electron-browser/remote-registry-contribution.js.map +0 -1
- package/lib/electron-browser/remote-service.d.ts +0 -6
- package/lib/electron-browser/remote-service.d.ts.map +0 -1
- package/lib/electron-browser/remote-service.js +0 -33
- package/lib/electron-browser/remote-service.js.map +0 -1
- package/lib/electron-browser/remote-ssh-contribution.d.ts +0 -23
- package/lib/electron-browser/remote-ssh-contribution.d.ts.map +0 -1
- package/lib/electron-browser/remote-ssh-contribution.js +0 -183
- package/lib/electron-browser/remote-ssh-contribution.js.map +0 -1
- package/lib/electron-browser/remote-user-storage-provider.d.ts +0 -21
- package/lib/electron-browser/remote-user-storage-provider.d.ts.map +0 -1
- package/lib/electron-browser/remote-user-storage-provider.js +0 -75
- package/lib/electron-browser/remote-user-storage-provider.js.map +0 -1
- package/lib/electron-common/remote-port-forwarding-provider.d.ts +0 -12
- package/lib/electron-common/remote-port-forwarding-provider.d.ts.map +0 -1
- package/lib/electron-common/remote-port-forwarding-provider.js +0 -21
- package/lib/electron-common/remote-port-forwarding-provider.js.map +0 -1
- package/lib/electron-common/remote-preferences.d.ts +0 -13
- package/lib/electron-common/remote-preferences.d.ts.map +0 -1
- package/lib/electron-common/remote-preferences.js +0 -54
- package/lib/electron-common/remote-preferences.js.map +0 -1
- package/lib/electron-common/remote-ssh-connection-provider.d.ts +0 -16
- package/lib/electron-common/remote-ssh-connection-provider.d.ts.map +0 -1
- package/lib/electron-common/remote-ssh-connection-provider.js +0 -21
- package/lib/electron-common/remote-ssh-connection-provider.js.map +0 -1
- package/lib/electron-common/remote-status-service.d.ts +0 -16
- package/lib/electron-common/remote-status-service.d.ts.map +0 -1
- package/lib/electron-common/remote-status-service.js +0 -21
- package/lib/electron-common/remote-status-service.js.map +0 -1
- package/lib/electron-node/backend-remote-service-impl.d.ts +0 -12
- package/lib/electron-node/backend-remote-service-impl.d.ts.map +0 -1
- package/lib/electron-node/backend-remote-service-impl.js +0 -46
- package/lib/electron-node/backend-remote-service-impl.js.map +0 -1
- package/lib/electron-node/remote-backend-module.d.ts +0 -5
- package/lib/electron-node/remote-backend-module.d.ts.map +0 -1
- package/lib/electron-node/remote-backend-module.js +0 -83
- package/lib/electron-node/remote-backend-module.js.map +0 -1
- package/lib/electron-node/remote-connection-service.d.ts +0 -15
- package/lib/electron-node/remote-connection-service.d.ts.map +0 -1
- package/lib/electron-node/remote-connection-service.js +0 -64
- package/lib/electron-node/remote-connection-service.js.map +0 -1
- package/lib/electron-node/remote-connection-socket-provider.d.ts +0 -9
- package/lib/electron-node/remote-connection-socket-provider.d.ts.map +0 -1
- package/lib/electron-node/remote-connection-socket-provider.js +0 -33
- package/lib/electron-node/remote-connection-socket-provider.js.map +0 -1
- package/lib/electron-node/remote-port-forwarding-provider.d.ts +0 -19
- package/lib/electron-node/remote-port-forwarding-provider.d.ts.map +0 -1
- package/lib/electron-node/remote-port-forwarding-provider.js +0 -59
- package/lib/electron-node/remote-port-forwarding-provider.js.map +0 -1
- package/lib/electron-node/remote-proxy-server-provider.d.ts +0 -6
- package/lib/electron-node/remote-proxy-server-provider.d.ts.map +0 -1
- package/lib/electron-node/remote-proxy-server-provider.js +0 -39
- package/lib/electron-node/remote-proxy-server-provider.js.map +0 -1
- package/lib/electron-node/remote-status-service.d.ts +0 -8
- package/lib/electron-node/remote-status-service.d.ts.map +0 -1
- package/lib/electron-node/remote-status-service.js +0 -53
- package/lib/electron-node/remote-status-service.js.map +0 -1
- package/lib/electron-node/remote-types.d.ts +0 -49
- package/lib/electron-node/remote-types.d.ts.map +0 -1
- package/lib/electron-node/remote-types.js +0 -18
- package/lib/electron-node/remote-types.js.map +0 -1
- package/lib/electron-node/setup/app-native-dependency-contribution.d.ts +0 -8
- package/lib/electron-node/setup/app-native-dependency-contribution.d.ts.map +0 -1
- package/lib/electron-node/setup/app-native-dependency-contribution.js +0 -53
- package/lib/electron-node/setup/app-native-dependency-contribution.js.map +0 -1
- package/lib/electron-node/setup/main-copy-contribution.d.ts +0 -5
- package/lib/electron-node/setup/main-copy-contribution.d.ts.map +0 -1
- package/lib/electron-node/setup/main-copy-contribution.js +0 -33
- package/lib/electron-node/setup/main-copy-contribution.js.map +0 -1
- package/lib/electron-node/setup/remote-copy-contribution.d.ts +0 -13
- package/lib/electron-node/setup/remote-copy-contribution.d.ts.map +0 -1
- package/lib/electron-node/setup/remote-copy-contribution.js +0 -74
- package/lib/electron-node/setup/remote-copy-contribution.js.map +0 -1
- package/lib/electron-node/setup/remote-copy-service.d.ts +0 -21
- package/lib/electron-node/setup/remote-copy-service.d.ts.map +0 -1
- package/lib/electron-node/setup/remote-copy-service.js +0 -120
- package/lib/electron-node/setup/remote-copy-service.js.map +0 -1
- package/lib/electron-node/setup/remote-native-dependency-contribution.d.ts +0 -36
- package/lib/electron-node/setup/remote-native-dependency-contribution.d.ts.map +0 -1
- package/lib/electron-node/setup/remote-native-dependency-contribution.js +0 -35
- package/lib/electron-node/setup/remote-native-dependency-contribution.js.map +0 -1
- package/lib/electron-node/setup/remote-native-dependency-service.d.ts +0 -25
- package/lib/electron-node/setup/remote-native-dependency-service.d.ts.map +0 -1
- package/lib/electron-node/setup/remote-native-dependency-service.js +0 -116
- package/lib/electron-node/setup/remote-native-dependency-service.js.map +0 -1
- package/lib/electron-node/setup/remote-node-setup-service.d.ts +0 -23
- package/lib/electron-node/setup/remote-node-setup-service.d.ts.map +0 -1
- package/lib/electron-node/setup/remote-node-setup-service.js +0 -125
- package/lib/electron-node/setup/remote-node-setup-service.js.map +0 -1
- package/lib/electron-node/setup/remote-setup-script-service.d.ts +0 -41
- package/lib/electron-node/setup/remote-setup-script-service.d.ts.map +0 -1
- package/lib/electron-node/setup/remote-setup-script-service.js +0 -125
- package/lib/electron-node/setup/remote-setup-script-service.js.map +0 -1
- package/lib/electron-node/setup/remote-setup-service.d.ts +0 -36
- package/lib/electron-node/setup/remote-setup-service.d.ts.map +0 -1
- package/lib/electron-node/setup/remote-setup-service.js +0 -215
- package/lib/electron-node/setup/remote-setup-service.js.map +0 -1
- package/lib/electron-node/ssh/remote-ssh-connection-provider.d.ts +0 -60
- package/lib/electron-node/ssh/remote-ssh-connection-provider.d.ts.map +0 -1
- package/lib/electron-node/ssh/remote-ssh-connection-provider.js +0 -394
- package/lib/electron-node/ssh/remote-ssh-connection-provider.js.map +0 -1
- package/lib/electron-node/ssh/ssh-identity-file-collector.d.ts +0 -13
- package/lib/electron-node/ssh/ssh-identity-file-collector.d.ts.map +0 -1
- package/lib/electron-node/ssh/ssh-identity-file-collector.js +0 -127
- package/lib/electron-node/ssh/ssh-identity-file-collector.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,160 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// *****************************************************************************
|
|
3
|
-
// Copyright (C) 2023 TypeFox 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.RemoteFrontendContribution = exports.RemoteCommands = void 0;
|
|
19
|
-
const tslib_1 = require("tslib");
|
|
20
|
-
const core_1 = require("@theia/core");
|
|
21
|
-
const browser_1 = require("@theia/core/lib/browser");
|
|
22
|
-
const inversify_1 = require("@theia/core/shared/inversify");
|
|
23
|
-
const remote_status_service_1 = require("../electron-common/remote-status-service");
|
|
24
|
-
const remote_registry_contribution_1 = require("./remote-registry-contribution");
|
|
25
|
-
const remote_service_1 = require("./remote-service");
|
|
26
|
-
const window_service_1 = require("@theia/core/lib/browser/window/window-service");
|
|
27
|
-
const electron_local_ws_connection_source_1 = require("@theia/core/lib/electron-browser/messaging/electron-local-ws-connection-source");
|
|
28
|
-
var RemoteCommands;
|
|
29
|
-
(function (RemoteCommands) {
|
|
30
|
-
RemoteCommands.REMOTE_SELECT = {
|
|
31
|
-
id: 'remote.select'
|
|
32
|
-
};
|
|
33
|
-
RemoteCommands.REMOTE_DISCONNECT = core_1.Command.toDefaultLocalizedCommand({
|
|
34
|
-
id: 'remote.disconnect',
|
|
35
|
-
label: 'Close Remote Connection',
|
|
36
|
-
});
|
|
37
|
-
})(RemoteCommands || (exports.RemoteCommands = RemoteCommands = {}));
|
|
38
|
-
let RemoteFrontendContribution = class RemoteFrontendContribution {
|
|
39
|
-
constructor() {
|
|
40
|
-
this.remoteRegistry = new remote_registry_contribution_1.RemoteRegistry();
|
|
41
|
-
}
|
|
42
|
-
async configure() {
|
|
43
|
-
const port = (0, electron_local_ws_connection_source_1.getCurrentPort)();
|
|
44
|
-
if (port) {
|
|
45
|
-
const status = await this.remoteStatusService.getStatus(Number(port));
|
|
46
|
-
await this.setStatusBar(status);
|
|
47
|
-
}
|
|
48
|
-
else {
|
|
49
|
-
await this.setStatusBar({
|
|
50
|
-
alive: false
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
async setStatusBar(info) {
|
|
55
|
-
this.remoteService.setConnected(info.alive);
|
|
56
|
-
const entry = {
|
|
57
|
-
alignment: browser_1.StatusBarAlignment.LEFT,
|
|
58
|
-
command: RemoteCommands.REMOTE_SELECT.id,
|
|
59
|
-
backgroundColor: 'var(--theia-statusBarItem-remoteBackground)',
|
|
60
|
-
color: 'var(--theia-statusBarItem-remoteForeground)',
|
|
61
|
-
priority: 10000,
|
|
62
|
-
...(info.alive
|
|
63
|
-
? {
|
|
64
|
-
text: `$(codicon-remote) ${info.type}: ${info.name.length > 35 ? info.name.substring(0, 32) + '...' : info.name}`,
|
|
65
|
-
tooltip: core_1.nls.localizeByDefault('Editing on {0}', info.name),
|
|
66
|
-
} : {
|
|
67
|
-
text: '$(codicon-remote)',
|
|
68
|
-
tooltip: core_1.nls.localizeByDefault('Open a Remote Window'),
|
|
69
|
-
})
|
|
70
|
-
};
|
|
71
|
-
this.statusBar.setElement('remoteStatus', entry);
|
|
72
|
-
}
|
|
73
|
-
registerCommands(commands) {
|
|
74
|
-
this.remoteRegistry.onDidRegisterCommand(([command, handler]) => {
|
|
75
|
-
commands.registerCommand(command, handler);
|
|
76
|
-
});
|
|
77
|
-
for (const contribution of this.remoteRegistryContributions.getContributions()) {
|
|
78
|
-
contribution.registerRemoteCommands(this.remoteRegistry);
|
|
79
|
-
}
|
|
80
|
-
commands.registerCommand(RemoteCommands.REMOTE_SELECT, {
|
|
81
|
-
execute: () => this.selectRemote()
|
|
82
|
-
});
|
|
83
|
-
commands.registerCommand(RemoteCommands.REMOTE_DISCONNECT, {
|
|
84
|
-
execute: () => this.disconnectRemote()
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
async disconnectRemote() {
|
|
88
|
-
const localPort = (0, electron_local_ws_connection_source_1.getLocalPort)();
|
|
89
|
-
if (localPort) {
|
|
90
|
-
const searchParams = new URLSearchParams(location.search);
|
|
91
|
-
const currentPort = searchParams.get('port');
|
|
92
|
-
this.remoteStatusService.connectionClosed(parseInt(currentPort !== null && currentPort !== void 0 ? currentPort : '0'));
|
|
93
|
-
this.windowService.reload({ search: { port: localPort } });
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
async selectRemote() {
|
|
97
|
-
var _a;
|
|
98
|
-
const commands = [...this.remoteRegistry.commands
|
|
99
|
-
.filter(command => this.commandRegistry.isVisible(command.id))];
|
|
100
|
-
if (this.remoteService.isConnected()) {
|
|
101
|
-
commands.push(RemoteCommands.REMOTE_DISCONNECT);
|
|
102
|
-
}
|
|
103
|
-
const quickPicks = [];
|
|
104
|
-
let previousCategory = undefined;
|
|
105
|
-
for (const command of commands) {
|
|
106
|
-
if (previousCategory !== command.category) {
|
|
107
|
-
quickPicks.push({
|
|
108
|
-
type: 'separator',
|
|
109
|
-
label: command.category
|
|
110
|
-
});
|
|
111
|
-
previousCategory = command.category;
|
|
112
|
-
}
|
|
113
|
-
quickPicks.push({
|
|
114
|
-
label: command.label,
|
|
115
|
-
id: command.id
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
const selection = await ((_a = this.quickInputService) === null || _a === void 0 ? void 0 : _a.showQuickPick(quickPicks, {
|
|
119
|
-
placeholder: core_1.nls.localizeByDefault('Select an option to open a Remote Window')
|
|
120
|
-
}));
|
|
121
|
-
if (selection) {
|
|
122
|
-
this.commandRegistry.executeCommand(selection.id);
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
};
|
|
126
|
-
exports.RemoteFrontendContribution = RemoteFrontendContribution;
|
|
127
|
-
tslib_1.__decorate([
|
|
128
|
-
(0, inversify_1.inject)(browser_1.StatusBar),
|
|
129
|
-
tslib_1.__metadata("design:type", Object)
|
|
130
|
-
], RemoteFrontendContribution.prototype, "statusBar", void 0);
|
|
131
|
-
tslib_1.__decorate([
|
|
132
|
-
(0, inversify_1.inject)(core_1.QuickInputService),
|
|
133
|
-
(0, inversify_1.optional)(),
|
|
134
|
-
tslib_1.__metadata("design:type", Object)
|
|
135
|
-
], RemoteFrontendContribution.prototype, "quickInputService", void 0);
|
|
136
|
-
tslib_1.__decorate([
|
|
137
|
-
(0, inversify_1.inject)(core_1.CommandRegistry),
|
|
138
|
-
tslib_1.__metadata("design:type", core_1.CommandRegistry)
|
|
139
|
-
], RemoteFrontendContribution.prototype, "commandRegistry", void 0);
|
|
140
|
-
tslib_1.__decorate([
|
|
141
|
-
(0, inversify_1.inject)(remote_service_1.RemoteService),
|
|
142
|
-
tslib_1.__metadata("design:type", remote_service_1.RemoteService)
|
|
143
|
-
], RemoteFrontendContribution.prototype, "remoteService", void 0);
|
|
144
|
-
tslib_1.__decorate([
|
|
145
|
-
(0, inversify_1.inject)(remote_status_service_1.RemoteStatusService),
|
|
146
|
-
tslib_1.__metadata("design:type", Object)
|
|
147
|
-
], RemoteFrontendContribution.prototype, "remoteStatusService", void 0);
|
|
148
|
-
tslib_1.__decorate([
|
|
149
|
-
(0, inversify_1.inject)(window_service_1.WindowService),
|
|
150
|
-
tslib_1.__metadata("design:type", Object)
|
|
151
|
-
], RemoteFrontendContribution.prototype, "windowService", void 0);
|
|
152
|
-
tslib_1.__decorate([
|
|
153
|
-
(0, inversify_1.inject)(core_1.ContributionProvider),
|
|
154
|
-
(0, inversify_1.named)(remote_registry_contribution_1.RemoteRegistryContribution),
|
|
155
|
-
tslib_1.__metadata("design:type", Object)
|
|
156
|
-
], RemoteFrontendContribution.prototype, "remoteRegistryContributions", void 0);
|
|
157
|
-
exports.RemoteFrontendContribution = RemoteFrontendContribution = tslib_1.__decorate([
|
|
158
|
-
(0, inversify_1.injectable)()
|
|
159
|
-
], RemoteFrontendContribution);
|
|
160
|
-
//# sourceMappingURL=remote-frontend-contribution.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"remote-frontend-contribution.js","sourceRoot":"","sources":["../../src/electron-browser/remote-frontend-contribution.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE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AAC,CAAC;gBACH,gBAAgB,GAAG,OAAO,CAAC,QAAQ,CAAC;YACxC,CAAC;YACD,UAAU,CAAC,IAAI,CAAC;gBACZ,KAAK,EAAE,OAAO,CAAC,KAAM;gBACrB,EAAE,EAAE,OAAO,CAAC,EAAE;aACjB,CAAC,CAAC;QACP,CAAC;QACD,MAAM,SAAS,GAAG,MAAM,CAAA,MAAA,IAAI,CAAC,iBAAiB,0CAAE,aAAa,CAAC,UAAU,EAAE;YACtE,WAAW,EAAE,UAAG,CAAC,iBAAiB,CAAC,0CAA0C,CAAC;SACjF,CAAC,CAAA,CAAC;QACH,IAAI,SAAS,EAAE,CAAC;YACZ,IAAI,CAAC,eAAe,CAAC,cAAc,CAAC,SAAS,CAAC,EAAG,CAAC,CAAC;QACvD,CAAC;IACL,CAAC;CAEJ,CAAA;AA/GY,gEAA0B;AAGhB;IADlB,IAAA,kBAAM,EAAC,mBAAS,CAAC;;6DACsB;AAGrB;IADlB,IAAA,kBAAM,EAAC,wBAAiB,CAAC;IAAE,IAAA,oBAAQ,GAAE;;qEACmB;AAGtC;IADlB,IAAA,kBAAM,EAAC,sBAAe,CAAC;sCACY,sBAAe;mEAAC;AAGjC;IADlB,IAAA,kBAAM,EAAC,8BAAa,CAAC;sCACY,8BAAa;iEAAC;AAG7B;IADlB,IAAA,kBAAM,EAAC,2CAAmB,CAAC;;uEACgC;AAGzC;IADlB,IAAA,kBAAM,EAAC,8BAAa,CAAC;;iEAC0B;AAG7B;IADlB,IAAA,kBAAM,EAAC,2BAAoB,CAAC;IAAE,IAAA,iBAAK,EAAC,yDAA0B,CAAC;;+EACiC;qCArBxF,0BAA0B;IADtC,IAAA,sBAAU,GAAE;GACA,0BAA0B,CA+GtC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"remote-frontend-module.d.ts","sourceRoot":"","sources":["../../src/electron-browser/remote-frontend-module.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAgB/D,OAAO,6DAA6D,CAAC;;AAOrE,wBA2CG"}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// *****************************************************************************
|
|
3
|
-
// Copyright (C) 2023 TypeFox 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 core_1 = require("@theia/core");
|
|
19
|
-
const inversify_1 = require("@theia/core/shared/inversify");
|
|
20
|
-
const browser_1 = require("@theia/core/lib/browser");
|
|
21
|
-
const remote_ssh_contribution_1 = require("./remote-ssh-contribution");
|
|
22
|
-
const remote_ssh_connection_provider_1 = require("../electron-common/remote-ssh-connection-provider");
|
|
23
|
-
const remote_frontend_contribution_1 = require("./remote-frontend-contribution");
|
|
24
|
-
const remote_registry_contribution_1 = require("./remote-registry-contribution");
|
|
25
|
-
const remote_service_1 = require("./remote-service");
|
|
26
|
-
const remote_status_service_1 = require("../electron-common/remote-status-service");
|
|
27
|
-
const electron_file_dialog_service_1 = require("@theia/filesystem/lib/electron-browser/file-dialog/electron-file-dialog-service");
|
|
28
|
-
const remote_electron_file_dialog_service_1 = require("./remote-electron-file-dialog-service");
|
|
29
|
-
const remote_preferences_1 = require("../electron-common/remote-preferences");
|
|
30
|
-
const port_forwarding_widget_1 = require("./port-forwarding/port-forwarding-widget");
|
|
31
|
-
const port_forwading_contribution_1 = require("./port-forwarding/port-forwading-contribution");
|
|
32
|
-
const port_forwarding_service_1 = require("./port-forwarding/port-forwarding-service");
|
|
33
|
-
const remote_port_forwarding_provider_1 = require("../electron-common/remote-port-forwarding-provider");
|
|
34
|
-
const service_connection_provider_1 = require("@theia/core/lib/browser/messaging/service-connection-provider");
|
|
35
|
-
require("../../src/electron-browser/style/port-forwarding-widget.css");
|
|
36
|
-
const user_storage_contribution_1 = require("@theia/userstorage/lib/browser/user-storage-contribution");
|
|
37
|
-
const remote_user_storage_provider_1 = require("./remote-user-storage-provider");
|
|
38
|
-
const remote_file_system_provider_1 = require("@theia/filesystem/lib/common/remote-file-system-provider");
|
|
39
|
-
const local_backend_services_1 = require("./local-backend-services");
|
|
40
|
-
const env_variables_1 = require("@theia/core/lib/common/env-variables");
|
|
41
|
-
exports.default = new inversify_1.ContainerModule((bind, _, __, rebind) => {
|
|
42
|
-
bind(remote_frontend_contribution_1.RemoteFrontendContribution).toSelf().inSingletonScope();
|
|
43
|
-
bind(browser_1.FrontendApplicationContribution).toService(remote_frontend_contribution_1.RemoteFrontendContribution);
|
|
44
|
-
bind(core_1.CommandContribution).toService(remote_frontend_contribution_1.RemoteFrontendContribution);
|
|
45
|
-
(0, core_1.bindContributionProvider)(bind, remote_registry_contribution_1.RemoteRegistryContribution);
|
|
46
|
-
bind(remote_ssh_contribution_1.RemoteSSHContribution).toSelf().inSingletonScope();
|
|
47
|
-
bind(remote_registry_contribution_1.RemoteRegistryContribution).toService(remote_ssh_contribution_1.RemoteSSHContribution);
|
|
48
|
-
(0, remote_preferences_1.bindRemotePreferences)(bind);
|
|
49
|
-
rebind(electron_file_dialog_service_1.ElectronFileDialogService).to(remote_electron_file_dialog_service_1.RemoteElectronFileDialogService).inSingletonScope();
|
|
50
|
-
bind(remote_service_1.RemoteService).toSelf().inSingletonScope();
|
|
51
|
-
bind(port_forwarding_widget_1.PortForwardingWidget).toSelf();
|
|
52
|
-
bind(browser_1.WidgetFactory).toDynamicValue(context => ({
|
|
53
|
-
id: port_forwarding_widget_1.PORT_FORWARDING_WIDGET_ID,
|
|
54
|
-
createWidget: () => context.container.get(port_forwarding_widget_1.PortForwardingWidget)
|
|
55
|
-
}));
|
|
56
|
-
(0, browser_1.bindViewContribution)(bind, port_forwading_contribution_1.PortForwardingContribution);
|
|
57
|
-
bind(port_forwarding_service_1.PortForwardingService).toSelf().inSingletonScope();
|
|
58
|
-
bind(remote_ssh_connection_provider_1.RemoteSSHConnectionProvider).toDynamicValue(ctx => service_connection_provider_1.ServiceConnectionProvider.createLocalProxy(ctx.container, remote_ssh_connection_provider_1.RemoteSSHConnectionProviderPath)).inSingletonScope();
|
|
59
|
-
bind(remote_status_service_1.RemoteStatusService).toDynamicValue(ctx => service_connection_provider_1.ServiceConnectionProvider.createLocalProxy(ctx.container, remote_status_service_1.RemoteStatusServicePath)).inSingletonScope();
|
|
60
|
-
bind(remote_port_forwarding_provider_1.RemotePortForwardingProvider).toDynamicValue(ctx => service_connection_provider_1.ServiceConnectionProvider.createLocalProxy(ctx.container, remote_port_forwarding_provider_1.RemoteRemotePortForwardingProviderPath)).inSingletonScope();
|
|
61
|
-
bind(local_backend_services_1.LocalRemoteFileSytemServer).toDynamicValue(ctx => browser_1.isRemote ?
|
|
62
|
-
service_connection_provider_1.ServiceConnectionProvider.createLocalProxy(ctx.container, remote_file_system_provider_1.remoteFileSystemPath, new remote_file_system_provider_1.RemoteFileSystemProxyFactory()) :
|
|
63
|
-
ctx.container.get(remote_file_system_provider_1.RemoteFileSystemServer));
|
|
64
|
-
bind(local_backend_services_1.LocalEnvVariablesServer).toDynamicValue(ctx => browser_1.isRemote ?
|
|
65
|
-
service_connection_provider_1.ServiceConnectionProvider.createLocalProxy(ctx.container, env_variables_1.envVariablesPath) :
|
|
66
|
-
ctx.container.get(env_variables_1.EnvVariablesServer));
|
|
67
|
-
bind(local_backend_services_1.LocalRemoteFileSystemProvider).toSelf().inSingletonScope();
|
|
68
|
-
rebind(user_storage_contribution_1.UserStorageContribution).to(remote_user_storage_provider_1.RemoteUserStorageContribution);
|
|
69
|
-
});
|
|
70
|
-
//# sourceMappingURL=remote-frontend-module.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"remote-frontend-module.js","sourceRoot":"","sources":["../../src/electron-browser/remote-frontend-module.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,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,sCAA4E;AAC5E,4DAA+D;AAC/D,qDAAyH;AACzH,uEAAkE;AAClE,sGAAiI;AACjI,iFAA4E;AAC5E,iFAA4E;AAC5E,qDAAiD;AACjD,oFAAwG;AACxG,kIAA4H;AAC5H,+FAAwF;AACxF,8EAA8E;AAC9E,qFAA2G;AAC3G,+FAA2F;AAC3F,uFAAkF;AAClF,wGAA0I;AAC1I,+GAA0G;AAC1G,uEAAqE;AACrE,wGAAmG;AACnG,iFAA+E;AAC/E,0GAAsJ;AACtJ,qEAA8H;AAC9H,wEAA4F;AAE5F,kBAAe,IAAI,2BAAe,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE;IACvD,IAAI,CAAC,yDAA0B,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IAC7D,IAAI,CAAC,yCAA+B,CAAC,CAAC,SAAS,CAAC,yDAA0B,CAAC,CAAC;IAC5E,IAAI,CAAC,0BAAmB,CAAC,CAAC,SAAS,CAAC,yDAA0B,CAAC,CAAC;IAEhE,IAAA,+BAAwB,EAAC,IAAI,EAAE,yDAA0B,CAAC,CAAC;IAC3D,IAAI,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AAC,SAAS,EAAE,wEAAsC,CAAC,CAAC,CAAC,gBAAgB,EAAE,CAAC;IAExJ,IAAI,CAAC,mDAA0B,CAAC,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,CAClD,kBAAQ,CAAC,CAAC;QACN,uDAAyB,CAAC,gBAAgB,CAAC,GAAG,CAAC,SAAS,EAAE,kDAAoB,EAAE,IAAI,0DAA4B,EAAE,CAAC,CAAC,CAAC;QACrH,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,oDAAsB,CAAC,CAAC,CAAC;IACnD,IAAI,CAAC,gDAAuB,CAAC,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,CAC/C,kBAAQ,CAAC,CAAC;QACN,uDAAyB,CAAC,gBAAgB,CAAqB,GAAG,CAAC,SAAS,EAAE,gCAAgB,CAAC,CAAC,CAAC;QACjG,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,kCAAkB,CAAC,CAAC,CAAC;IAC/C,IAAI,CAAC,sDAA6B,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IAChE,MAAM,CAAC,mDAAuB,CAAC,CAAC,EAAE,CAAC,4DAA6B,CAAC,CAAC;AAEtE,CAAC,CAAC,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Command, CommandHandler, Emitter, Event } from '@theia/core';
|
|
2
|
-
import { WindowService } from '@theia/core/lib/browser/window/window-service';
|
|
3
|
-
export declare const RemoteRegistryContribution: unique symbol;
|
|
4
|
-
export interface RemoteRegistryContribution {
|
|
5
|
-
registerRemoteCommands(registry: RemoteRegistry): void;
|
|
6
|
-
}
|
|
7
|
-
export declare abstract class AbstractRemoteRegistryContribution implements RemoteRegistryContribution {
|
|
8
|
-
protected readonly windowService: WindowService;
|
|
9
|
-
abstract registerRemoteCommands(registry: RemoteRegistry): void;
|
|
10
|
-
protected openRemote(port: string, newWindow: boolean, workspace?: string): void;
|
|
11
|
-
}
|
|
12
|
-
export declare class RemoteRegistry {
|
|
13
|
-
protected _commands: Command[];
|
|
14
|
-
protected onDidRegisterCommandEmitter: Emitter<[Command, CommandHandler | undefined]>;
|
|
15
|
-
get commands(): readonly Command[];
|
|
16
|
-
get onDidRegisterCommand(): Event<[Command, CommandHandler | undefined]>;
|
|
17
|
-
registerCommand(command: Command, handler?: CommandHandler): void;
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=remote-registry-contribution.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"remote-registry-contribution.d.ts","sourceRoot":"","sources":["../../src/electron-browser/remote-registry-contribution.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEtE,OAAO,EAAE,aAAa,EAAuB,MAAM,+CAA+C,CAAC;AAEnG,eAAO,MAAM,0BAA0B,eAAuC,CAAC;AAE/E,MAAM,WAAW,0BAA0B;IACvC,sBAAsB,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI,CAAC;CAC1D;AAED,8BACsB,kCAAmC,YAAW,0BAA0B;IAG1F,SAAS,CAAC,QAAQ,CAAC,aAAa,EAAE,aAAa,CAAC;IAEhD,QAAQ,CAAC,sBAAsB,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI;IAE/D,SAAS,CAAC,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI;CAmBnF;AAED,qBAAa,cAAc;IAEvB,SAAS,CAAC,SAAS,EAAE,OAAO,EAAE,CAAM;IACpC,SAAS,CAAC,2BAA2B,iDAAwD;IAE7F,IAAI,QAAQ,IAAI,SAAS,OAAO,EAAE,CAEjC;IAED,IAAI,oBAAoB,IAAI,KAAK,CAAC,CAAC,OAAO,EAAE,cAAc,GAAG,SAAS,CAAC,CAAC,CAEvE;IAED,eAAe,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,IAAI;CAIpE"}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// *****************************************************************************
|
|
3
|
-
// Copyright (C) 2023 TypeFox 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.RemoteRegistry = exports.AbstractRemoteRegistryContribution = exports.RemoteRegistryContribution = void 0;
|
|
19
|
-
const tslib_1 = require("tslib");
|
|
20
|
-
const core_1 = require("@theia/core");
|
|
21
|
-
const inversify_1 = require("@theia/core/shared/inversify");
|
|
22
|
-
const window_service_1 = require("@theia/core/lib/browser/window/window-service");
|
|
23
|
-
exports.RemoteRegistryContribution = Symbol('RemoteRegistryContribution');
|
|
24
|
-
let AbstractRemoteRegistryContribution = class AbstractRemoteRegistryContribution {
|
|
25
|
-
openRemote(port, newWindow, workspace) {
|
|
26
|
-
const searchParams = new URLSearchParams(location.search);
|
|
27
|
-
const localPort = searchParams.get('localPort') || searchParams.get('port');
|
|
28
|
-
const options = {
|
|
29
|
-
search: { port }
|
|
30
|
-
};
|
|
31
|
-
if (localPort) {
|
|
32
|
-
options.search.localPort = localPort;
|
|
33
|
-
}
|
|
34
|
-
if (workspace) {
|
|
35
|
-
options.hash = workspace;
|
|
36
|
-
}
|
|
37
|
-
if (newWindow) {
|
|
38
|
-
this.windowService.openNewDefaultWindow(options);
|
|
39
|
-
}
|
|
40
|
-
else {
|
|
41
|
-
this.windowService.reload(options);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
exports.AbstractRemoteRegistryContribution = AbstractRemoteRegistryContribution;
|
|
46
|
-
tslib_1.__decorate([
|
|
47
|
-
(0, inversify_1.inject)(window_service_1.WindowService),
|
|
48
|
-
tslib_1.__metadata("design:type", Object)
|
|
49
|
-
], AbstractRemoteRegistryContribution.prototype, "windowService", void 0);
|
|
50
|
-
exports.AbstractRemoteRegistryContribution = AbstractRemoteRegistryContribution = tslib_1.__decorate([
|
|
51
|
-
(0, inversify_1.injectable)()
|
|
52
|
-
], AbstractRemoteRegistryContribution);
|
|
53
|
-
class RemoteRegistry {
|
|
54
|
-
constructor() {
|
|
55
|
-
this._commands = [];
|
|
56
|
-
this.onDidRegisterCommandEmitter = new core_1.Emitter();
|
|
57
|
-
}
|
|
58
|
-
get commands() {
|
|
59
|
-
return this._commands;
|
|
60
|
-
}
|
|
61
|
-
get onDidRegisterCommand() {
|
|
62
|
-
return this.onDidRegisterCommandEmitter.event;
|
|
63
|
-
}
|
|
64
|
-
registerCommand(command, handler) {
|
|
65
|
-
this.onDidRegisterCommandEmitter.fire([command, handler]);
|
|
66
|
-
this._commands.push(command);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
exports.RemoteRegistry = RemoteRegistry;
|
|
70
|
-
//# sourceMappingURL=remote-registry-contribution.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"remote-registry-contribution.js","sourceRoot":"","sources":["../../src/electron-browser/remote-registry-contribution.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5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I,CAAC,SAAS,CAAC;IAC1B,CAAC;IAED,IAAI,oBAAoB;QACpB,OAAO,IAAI,CAAC,2BAA2B,CAAC,KAAK,CAAC;IAClD,CAAC;IAED,eAAe,CAAC,OAAgB,EAAE,OAAwB;QACtD,IAAI,CAAC,2BAA2B,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;QAC1D,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACjC,CAAC;CACJ;AAjBD,wCAiBC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"remote-service.d.ts","sourceRoot":"","sources":["../../src/electron-browser/remote-service.ts"],"names":[],"mappings":"AAkBA,qBACa,aAAa;IAEtB,SAAS,CAAC,UAAU,EAAE,OAAO,CAAC;IAE9B,WAAW,IAAI,OAAO;IAItB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI;CAGrC"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// *****************************************************************************
|
|
3
|
-
// Copyright (C) 2023 TypeFox 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.RemoteService = void 0;
|
|
19
|
-
const tslib_1 = require("tslib");
|
|
20
|
-
const inversify_1 = require("@theia/core/shared/inversify");
|
|
21
|
-
let RemoteService = class RemoteService {
|
|
22
|
-
isConnected() {
|
|
23
|
-
return this._connected;
|
|
24
|
-
}
|
|
25
|
-
setConnected(value) {
|
|
26
|
-
this._connected = value;
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
exports.RemoteService = RemoteService;
|
|
30
|
-
exports.RemoteService = RemoteService = tslib_1.__decorate([
|
|
31
|
-
(0, inversify_1.injectable)()
|
|
32
|
-
], RemoteService);
|
|
33
|
-
//# sourceMappingURL=remote-service.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"remote-service.js","sourceRoot":"","sources":["../../src/electron-browser/remote-service.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,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,4DAA0D;AAGnD,IAAM,aAAa,GAAnB,MAAM,aAAa;IAItB,WAAW;QACP,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;IAED,YAAY,CAAC,KAAc;QACvB,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;IAC5B,CAAC;CACJ,CAAA;AAXY,sCAAa;wBAAb,aAAa;IADzB,IAAA,sBAAU,GAAE;GACA,aAAa,CAWzB"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { Command, MessageService, QuickInputService } from '@theia/core';
|
|
2
|
-
import { VariableResolverService } from '@theia/variable-resolver/lib/browser';
|
|
3
|
-
import { RemoteSSHConnectionProvider } from '../electron-common/remote-ssh-connection-provider';
|
|
4
|
-
import { AbstractRemoteRegistryContribution, RemoteRegistry } from './remote-registry-contribution';
|
|
5
|
-
import { RemotePreferences } from '../electron-common/remote-preferences';
|
|
6
|
-
export declare namespace RemoteSSHCommands {
|
|
7
|
-
const CONNECT: Command;
|
|
8
|
-
const CONNECT_CURRENT_WINDOW: Command;
|
|
9
|
-
const CONNECT_CURRENT_WINDOW_TO_CONFIG_HOST: Command;
|
|
10
|
-
}
|
|
11
|
-
export declare class RemoteSSHContribution extends AbstractRemoteRegistryContribution {
|
|
12
|
-
protected readonly quickInputService: QuickInputService;
|
|
13
|
-
protected readonly sshConnectionProvider: RemoteSSHConnectionProvider;
|
|
14
|
-
protected readonly messageService: MessageService;
|
|
15
|
-
protected readonly remotePreferences: RemotePreferences;
|
|
16
|
-
protected readonly variableResolver: VariableResolverService;
|
|
17
|
-
registerRemoteCommands(registry: RemoteRegistry): void;
|
|
18
|
-
getConfigFilePath(): Promise<string | undefined>;
|
|
19
|
-
connectToConfigHost(): Promise<void>;
|
|
20
|
-
connect(newWindow: boolean): Promise<void>;
|
|
21
|
-
sendSSHConnect(host: string, user: string): Promise<string>;
|
|
22
|
-
}
|
|
23
|
-
//# sourceMappingURL=remote-ssh-contribution.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"remote-ssh-contribution.d.ts","sourceRoot":"","sources":["../../src/electron-browser/remote-ssh-contribution.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,OAAO,EAAE,cAAc,EAAO,iBAAiB,EAAkB,MAAM,aAAa,CAAC;AAE9F,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,EAAE,2BAA2B,EAAE,MAAM,mDAAmD,CAAC;AAChG,OAAO,EAAE,kCAAkC,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AACpG,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAG1E,yBAAiB,iBAAiB,CAAC;IACxB,MAAM,OAAO,EAAE,OAIQ,CAAC;IACxB,MAAM,sBAAsB,EAAE,OAIP,CAAC;IACxB,MAAM,qCAAqC,EAAE,OAIV,CAAC;CAC9C;AAED,qBACa,qBAAsB,SAAQ,kCAAkC;IAGzE,SAAS,CAAC,QAAQ,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;IAGxD,SAAS,CAAC,QAAQ,CAAC,qBAAqB,EAAE,2BAA2B,CAAC;IAGtE,SAAS,CAAC,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;IAGlD,SAAS,CAAC,QAAQ,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;IAGxD,SAAS,CAAC,QAAQ,CAAC,gBAAgB,EAAE,uBAAuB,CAAC;IAE7D,sBAAsB,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI;IAYhD,iBAAiB,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAKhD,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC;IAuDpC,OAAO,CAAC,SAAS,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IA4C1C,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAQpE"}
|
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// *****************************************************************************
|
|
3
|
-
// Copyright (C) 2023 TypeFox 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.RemoteSSHContribution = exports.RemoteSSHCommands = void 0;
|
|
19
|
-
const tslib_1 = require("tslib");
|
|
20
|
-
const core_1 = require("@theia/core");
|
|
21
|
-
const inversify_1 = require("@theia/core/shared/inversify");
|
|
22
|
-
const browser_1 = require("@theia/variable-resolver/lib/browser");
|
|
23
|
-
const remote_ssh_connection_provider_1 = require("../electron-common/remote-ssh-connection-provider");
|
|
24
|
-
const remote_registry_contribution_1 = require("./remote-registry-contribution");
|
|
25
|
-
const remote_preferences_1 = require("../electron-common/remote-preferences");
|
|
26
|
-
const ssh_config_1 = require("ssh-config");
|
|
27
|
-
var RemoteSSHCommands;
|
|
28
|
-
(function (RemoteSSHCommands) {
|
|
29
|
-
RemoteSSHCommands.CONNECT = core_1.Command.toLocalizedCommand({
|
|
30
|
-
id: 'remote.ssh.connect',
|
|
31
|
-
category: 'SSH',
|
|
32
|
-
label: 'Connect to Host...',
|
|
33
|
-
}, 'theia/remote/ssh/connect');
|
|
34
|
-
RemoteSSHCommands.CONNECT_CURRENT_WINDOW = core_1.Command.toLocalizedCommand({
|
|
35
|
-
id: 'remote.ssh.connectCurrentWindow',
|
|
36
|
-
category: 'SSH',
|
|
37
|
-
label: 'Connect Current Window to Host...',
|
|
38
|
-
}, 'theia/remote/ssh/connect');
|
|
39
|
-
RemoteSSHCommands.CONNECT_CURRENT_WINDOW_TO_CONFIG_HOST = core_1.Command.toLocalizedCommand({
|
|
40
|
-
id: 'remote.ssh.connectToConfigHost',
|
|
41
|
-
category: 'SSH',
|
|
42
|
-
label: 'Connect Current Window to Host in Config File...',
|
|
43
|
-
}, 'theia/remote/ssh/connectToConfigHost');
|
|
44
|
-
})(RemoteSSHCommands || (exports.RemoteSSHCommands = RemoteSSHCommands = {}));
|
|
45
|
-
let RemoteSSHContribution = class RemoteSSHContribution extends remote_registry_contribution_1.AbstractRemoteRegistryContribution {
|
|
46
|
-
registerRemoteCommands(registry) {
|
|
47
|
-
registry.registerCommand(RemoteSSHCommands.CONNECT, {
|
|
48
|
-
execute: () => this.connect(true)
|
|
49
|
-
});
|
|
50
|
-
registry.registerCommand(RemoteSSHCommands.CONNECT_CURRENT_WINDOW, {
|
|
51
|
-
execute: () => this.connect(false)
|
|
52
|
-
});
|
|
53
|
-
registry.registerCommand(RemoteSSHCommands.CONNECT_CURRENT_WINDOW_TO_CONFIG_HOST, {
|
|
54
|
-
execute: () => this.connectToConfigHost()
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
async getConfigFilePath() {
|
|
58
|
-
const preference = this.remotePreferences['remote.ssh.configFile'];
|
|
59
|
-
return this.variableResolver.resolve(preference);
|
|
60
|
-
}
|
|
61
|
-
async connectToConfigHost() {
|
|
62
|
-
var _a, _b;
|
|
63
|
-
const quickPicks = [];
|
|
64
|
-
const filePath = await this.getConfigFilePath();
|
|
65
|
-
if (!filePath) {
|
|
66
|
-
this.messageService.error(core_1.nls.localize('theia/remote/sshNoConfigPath', 'No SSH config path found.'));
|
|
67
|
-
return;
|
|
68
|
-
}
|
|
69
|
-
const sshConfig = await this.sshConnectionProvider.getSSHConfig(filePath);
|
|
70
|
-
const wildcardCheck = /[\?\*\%]/;
|
|
71
|
-
for (const record of sshConfig) {
|
|
72
|
-
// check if its a section and if it has a single value
|
|
73
|
-
if (!('config' in record) || !(typeof record.value === 'string')) {
|
|
74
|
-
continue;
|
|
75
|
-
}
|
|
76
|
-
if (record.param.toLowerCase() === 'host' && !wildcardCheck.test(record.value)) {
|
|
77
|
-
const rec = ((record.config)
|
|
78
|
-
.filter((entry) => entry.type === ssh_config_1.default.DIRECTIVE))
|
|
79
|
-
.reduce((pv, item) => ({ ...pv, [item.param.toLowerCase()]: item.value }), { 'host': record.value });
|
|
80
|
-
const host = (rec.hostname || rec.host) + ':' + (rec.port || '22');
|
|
81
|
-
const user = rec.user || 'root';
|
|
82
|
-
quickPicks.push({
|
|
83
|
-
label: rec.host,
|
|
84
|
-
id: user + '@' + host
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
if (quickPicks.length === 0) {
|
|
89
|
-
this.messageService.info(core_1.nls.localize('theia/remote/noConfigHosts', 'No SSH hosts found in the config file: ' + filePath));
|
|
90
|
-
return;
|
|
91
|
-
}
|
|
92
|
-
const selection = await ((_a = this.quickInputService) === null || _a === void 0 ? void 0 : _a.showQuickPick(quickPicks, {
|
|
93
|
-
placeholder: core_1.nls.localizeByDefault('Select an option to open a Remote Window')
|
|
94
|
-
}));
|
|
95
|
-
if (selection === null || selection === void 0 ? void 0 : selection.id) {
|
|
96
|
-
try {
|
|
97
|
-
let [user, host] = selection.id.split('@', 2);
|
|
98
|
-
host = selection.label;
|
|
99
|
-
const remotePort = await this.sendSSHConnect(host, user);
|
|
100
|
-
this.openRemote(remotePort, false);
|
|
101
|
-
}
|
|
102
|
-
catch (err) {
|
|
103
|
-
this.messageService.error(`${core_1.nls.localize('theia/remote/ssh/failure', 'Could not open SSH connection to remote.')} ${(_b = err.message) !== null && _b !== void 0 ? _b : String(err)}`);
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
async connect(newWindow) {
|
|
108
|
-
var _a;
|
|
109
|
-
let host;
|
|
110
|
-
let user;
|
|
111
|
-
host = await this.quickInputService.input({
|
|
112
|
-
title: core_1.nls.localize('theia/remote/ssh/enterHost', 'Enter SSH host name'),
|
|
113
|
-
placeHolder: core_1.nls.localize('theia/remote/ssh/hostPlaceHolder', 'E.g. hello@example.com')
|
|
114
|
-
});
|
|
115
|
-
if (!host) {
|
|
116
|
-
this.messageService.error(core_1.nls.localize('theia/remote/ssh/needsHost', 'Please enter a host name.'));
|
|
117
|
-
return;
|
|
118
|
-
}
|
|
119
|
-
if (host.includes('@')) {
|
|
120
|
-
const split = host.split('@');
|
|
121
|
-
user = split[0];
|
|
122
|
-
host = split[1];
|
|
123
|
-
}
|
|
124
|
-
if (!user) {
|
|
125
|
-
const configHost = await this.sshConnectionProvider.matchSSHConfigHost(host, undefined, await this.getConfigFilePath());
|
|
126
|
-
if (configHost) {
|
|
127
|
-
if (!user && configHost.user) {
|
|
128
|
-
user = configHost.user;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
if (!user) {
|
|
133
|
-
user = await this.quickInputService.input({
|
|
134
|
-
title: core_1.nls.localize('theia/remote/ssh/enterUser', 'Enter SSH user name'),
|
|
135
|
-
placeHolder: core_1.nls.localize('theia/remote/ssh/userPlaceHolder', 'E.g. hello')
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
|
-
if (!user) {
|
|
139
|
-
this.messageService.error(core_1.nls.localize('theia/remote/ssh/needsUser', 'Please enter a user name.'));
|
|
140
|
-
return;
|
|
141
|
-
}
|
|
142
|
-
try {
|
|
143
|
-
const remotePort = await this.sendSSHConnect(host, user);
|
|
144
|
-
this.openRemote(remotePort, newWindow);
|
|
145
|
-
}
|
|
146
|
-
catch (err) {
|
|
147
|
-
this.messageService.error(`${core_1.nls.localize('theia/remote/ssh/failure', 'Could not open SSH connection to remote.')} ${(_a = err.message) !== null && _a !== void 0 ? _a : String(err)}`);
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
async sendSSHConnect(host, user) {
|
|
151
|
-
return this.sshConnectionProvider.establishConnection({
|
|
152
|
-
host,
|
|
153
|
-
user,
|
|
154
|
-
nodeDownloadTemplate: this.remotePreferences['remote.nodeDownloadTemplate'],
|
|
155
|
-
customConfigFile: await this.getConfigFilePath()
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
|
-
};
|
|
159
|
-
exports.RemoteSSHContribution = RemoteSSHContribution;
|
|
160
|
-
tslib_1.__decorate([
|
|
161
|
-
(0, inversify_1.inject)(core_1.QuickInputService),
|
|
162
|
-
tslib_1.__metadata("design:type", Object)
|
|
163
|
-
], RemoteSSHContribution.prototype, "quickInputService", void 0);
|
|
164
|
-
tslib_1.__decorate([
|
|
165
|
-
(0, inversify_1.inject)(remote_ssh_connection_provider_1.RemoteSSHConnectionProvider),
|
|
166
|
-
tslib_1.__metadata("design:type", Object)
|
|
167
|
-
], RemoteSSHContribution.prototype, "sshConnectionProvider", void 0);
|
|
168
|
-
tslib_1.__decorate([
|
|
169
|
-
(0, inversify_1.inject)(core_1.MessageService),
|
|
170
|
-
tslib_1.__metadata("design:type", core_1.MessageService)
|
|
171
|
-
], RemoteSSHContribution.prototype, "messageService", void 0);
|
|
172
|
-
tslib_1.__decorate([
|
|
173
|
-
(0, inversify_1.inject)(remote_preferences_1.RemotePreferences),
|
|
174
|
-
tslib_1.__metadata("design:type", Object)
|
|
175
|
-
], RemoteSSHContribution.prototype, "remotePreferences", void 0);
|
|
176
|
-
tslib_1.__decorate([
|
|
177
|
-
(0, inversify_1.inject)(browser_1.VariableResolverService),
|
|
178
|
-
tslib_1.__metadata("design:type", browser_1.VariableResolverService)
|
|
179
|
-
], RemoteSSHContribution.prototype, "variableResolver", void 0);
|
|
180
|
-
exports.RemoteSSHContribution = RemoteSSHContribution = tslib_1.__decorate([
|
|
181
|
-
(0, inversify_1.injectable)()
|
|
182
|
-
], RemoteSSHContribution);
|
|
183
|
-
//# sourceMappingURL=remote-ssh-contribution.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"remote-ssh-contribution.js","sourceRoot":"","sources":["../../src/electron-browser/remote-ssh-contribution.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,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,sCAA8F;AAC9F,4DAAkE;AAClE,kEAA+E;AAC/E,sGAAgG;AAChG,iFAAoG;AACpG,8EAA0E;AAC1E,2CAAkD;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