@theia/remote 1.45.0 → 1.46.0-next.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +61 -61
- package/lib/electron-browser/remote-electron-file-dialog-service.d.ts +13 -13
- package/lib/electron-browser/remote-electron-file-dialog-service.js +57 -57
- package/lib/electron-browser/remote-frontend-contribution.d.ts +25 -25
- package/lib/electron-browser/remote-frontend-contribution.js +164 -164
- package/lib/electron-browser/remote-frontend-module.d.ts +3 -3
- package/lib/electron-browser/remote-frontend-module.js +42 -42
- package/lib/electron-browser/remote-preferences.d.ts +10 -10
- package/lib/electron-browser/remote-preferences.js +48 -48
- package/lib/electron-browser/remote-registry-contribution.d.ts +18 -18
- package/lib/electron-browser/remote-registry-contribution.js +74 -74
- package/lib/electron-browser/remote-service.d.ts +5 -5
- package/lib/electron-browser/remote-service.js +37 -37
- package/lib/electron-browser/remote-ssh-contribution.d.ts +17 -17
- package/lib/electron-browser/remote-ssh-contribution.js +117 -117
- package/lib/electron-common/remote-ssh-connection-provider.d.ts +10 -10
- package/lib/electron-common/remote-ssh-connection-provider.js +20 -20
- package/lib/electron-common/remote-status-service.d.ts +14 -14
- package/lib/electron-common/remote-status-service.js +20 -20
- package/lib/electron-node/backend-remote-service-impl.d.ts +11 -11
- package/lib/electron-node/backend-remote-service-impl.js +50 -50
- package/lib/electron-node/remote-backend-module.d.ts +4 -4
- package/lib/electron-node/remote-backend-module.js +74 -74
- package/lib/electron-node/remote-connection-service.d.ts +14 -14
- package/lib/electron-node/remote-connection-service.js +65 -65
- package/lib/electron-node/remote-connection-socket-provider.d.ts +8 -8
- package/lib/electron-node/remote-connection-socket-provider.js +37 -37
- package/lib/electron-node/remote-proxy-server-provider.d.ts +5 -5
- package/lib/electron-node/remote-proxy-server-provider.js +43 -43
- package/lib/electron-node/remote-status-service.d.ts +6 -6
- package/lib/electron-node/remote-status-service.js +54 -54
- package/lib/electron-node/remote-types.d.ts +34 -34
- package/lib/electron-node/remote-types.js +17 -17
- package/lib/electron-node/setup/app-native-dependency-contribution.d.ts +7 -7
- package/lib/electron-node/setup/app-native-dependency-contribution.js +57 -57
- package/lib/electron-node/setup/main-copy-contribution.d.ts +4 -4
- package/lib/electron-node/setup/main-copy-contribution.js +37 -37
- package/lib/electron-node/setup/remote-copy-contribution.d.ts +28 -28
- package/lib/electron-node/setup/remote-copy-contribution.js +78 -78
- package/lib/electron-node/setup/remote-copy-service.d.ts +18 -18
- package/lib/electron-node/setup/remote-copy-service.js +126 -126
- package/lib/electron-node/setup/remote-native-dependency-contribution.d.ts +34 -34
- package/lib/electron-node/setup/remote-native-dependency-contribution.js +34 -34
- package/lib/electron-node/setup/remote-native-dependency-service.d.ts +23 -23
- package/lib/electron-node/setup/remote-native-dependency-service.js +118 -118
- package/lib/electron-node/setup/remote-node-setup-service.d.ts +22 -22
- package/lib/electron-node/setup/remote-node-setup-service.js +132 -132
- package/lib/electron-node/setup/remote-setup-script-service.d.ts +40 -40
- package/lib/electron-node/setup/remote-setup-script-service.js +132 -132
- package/lib/electron-node/setup/remote-setup-service.d.ts +28 -28
- package/lib/electron-node/setup/remote-setup-service.js +198 -198
- package/lib/electron-node/ssh/remote-ssh-connection-provider.d.ts +55 -55
- package/lib/electron-node/ssh/remote-ssh-connection-provider.d.ts.map +1 -1
- package/lib/electron-node/ssh/remote-ssh-connection-provider.js +344 -342
- package/lib/electron-node/ssh/remote-ssh-connection-provider.js.map +1 -1
- package/lib/electron-node/ssh/ssh-identity-file-collector.d.ts +12 -12
- package/lib/electron-node/ssh/ssh-identity-file-collector.js +131 -131
- package/lib/package.spec.js +25 -25
- package/package.json +6 -7
- package/src/electron-browser/remote-electron-file-dialog-service.ts +47 -47
- package/src/electron-browser/remote-frontend-contribution.ts +145 -145
- package/src/electron-browser/remote-frontend-module.ts +49 -49
- package/src/electron-browser/remote-preferences.ts +62 -62
- package/src/electron-browser/remote-registry-contribution.ts +70 -70
- package/src/electron-browser/remote-service.ts +31 -31
- package/src/electron-browser/remote-ssh-contribution.ts +102 -102
- package/src/electron-common/remote-ssh-connection-provider.ts +29 -29
- package/src/electron-common/remote-status-service.ts +35 -35
- package/src/electron-node/backend-remote-service-impl.ts +45 -45
- package/src/electron-node/remote-backend-module.ts +80 -80
- package/src/electron-node/remote-connection-service.ts +55 -55
- package/src/electron-node/remote-connection-socket-provider.ts +34 -34
- package/src/electron-node/remote-proxy-server-provider.ts +37 -37
- package/src/electron-node/remote-status-service.ts +41 -41
- package/src/electron-node/remote-types.ts +56 -56
- package/src/electron-node/setup/app-native-dependency-contribution.ts +48 -48
- package/src/electron-node/setup/main-copy-contribution.ts +28 -28
- package/src/electron-node/setup/remote-copy-contribution.ts +90 -90
- package/src/electron-node/setup/remote-copy-service.ts +114 -114
- package/src/electron-node/setup/remote-native-dependency-contribution.ts +63 -63
- package/src/electron-node/setup/remote-native-dependency-service.ts +111 -111
- package/src/electron-node/setup/remote-node-setup-service.ts +123 -123
- package/src/electron-node/setup/remote-setup-script-service.ts +146 -146
- package/src/electron-node/setup/remote-setup-service.ts +197 -197
- package/src/electron-node/ssh/remote-ssh-connection-provider.ts +358 -356
- package/src/electron-node/ssh/ssh-identity-file-collector.ts +137 -137
- package/src/package.spec.ts +29 -29
|
@@ -1,75 +1,75 @@
|
|
|
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
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
21
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
-
};
|
|
23
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
24
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
25
|
-
};
|
|
26
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
-
exports.RemoteRegistry = exports.AbstractRemoteRegistryContribution = exports.RemoteRegistryContribution = void 0;
|
|
28
|
-
const core_1 = require("@theia/core");
|
|
29
|
-
const inversify_1 = require("@theia/core/shared/inversify");
|
|
30
|
-
const window_service_1 = require("@theia/core/lib/browser/window/window-service");
|
|
31
|
-
exports.RemoteRegistryContribution = Symbol('RemoteRegistryContribution');
|
|
32
|
-
let AbstractRemoteRegistryContribution = class AbstractRemoteRegistryContribution {
|
|
33
|
-
openRemote(port, newWindow) {
|
|
34
|
-
const searchParams = new URLSearchParams(location.search);
|
|
35
|
-
const localPort = searchParams.get('localPort') || searchParams.get('port');
|
|
36
|
-
const options = {
|
|
37
|
-
port
|
|
38
|
-
};
|
|
39
|
-
if (localPort) {
|
|
40
|
-
options.localPort = localPort;
|
|
41
|
-
}
|
|
42
|
-
if (newWindow) {
|
|
43
|
-
this.windowService.openNewDefaultWindow(options);
|
|
44
|
-
}
|
|
45
|
-
else {
|
|
46
|
-
this.windowService.reload(options);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
__decorate([
|
|
51
|
-
(0, inversify_1.inject)(window_service_1.WindowService),
|
|
52
|
-
__metadata("design:type", Object)
|
|
53
|
-
], AbstractRemoteRegistryContribution.prototype, "windowService", void 0);
|
|
54
|
-
AbstractRemoteRegistryContribution = __decorate([
|
|
55
|
-
(0, inversify_1.injectable)()
|
|
56
|
-
], AbstractRemoteRegistryContribution);
|
|
57
|
-
exports.AbstractRemoteRegistryContribution = AbstractRemoteRegistryContribution;
|
|
58
|
-
class RemoteRegistry {
|
|
59
|
-
constructor() {
|
|
60
|
-
this._commands = [];
|
|
61
|
-
this.onDidRegisterCommandEmitter = new core_1.Emitter();
|
|
62
|
-
}
|
|
63
|
-
get commands() {
|
|
64
|
-
return this._commands;
|
|
65
|
-
}
|
|
66
|
-
get onDidRegisterCommand() {
|
|
67
|
-
return this.onDidRegisterCommandEmitter.event;
|
|
68
|
-
}
|
|
69
|
-
registerCommand(command, handler) {
|
|
70
|
-
this.onDidRegisterCommandEmitter.fire([command, handler]);
|
|
71
|
-
this._commands.push(command);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
exports.RemoteRegistry = RemoteRegistry;
|
|
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
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
21
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
+
};
|
|
23
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
24
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
25
|
+
};
|
|
26
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
+
exports.RemoteRegistry = exports.AbstractRemoteRegistryContribution = exports.RemoteRegistryContribution = void 0;
|
|
28
|
+
const core_1 = require("@theia/core");
|
|
29
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
30
|
+
const window_service_1 = require("@theia/core/lib/browser/window/window-service");
|
|
31
|
+
exports.RemoteRegistryContribution = Symbol('RemoteRegistryContribution');
|
|
32
|
+
let AbstractRemoteRegistryContribution = class AbstractRemoteRegistryContribution {
|
|
33
|
+
openRemote(port, newWindow) {
|
|
34
|
+
const searchParams = new URLSearchParams(location.search);
|
|
35
|
+
const localPort = searchParams.get('localPort') || searchParams.get('port');
|
|
36
|
+
const options = {
|
|
37
|
+
port
|
|
38
|
+
};
|
|
39
|
+
if (localPort) {
|
|
40
|
+
options.localPort = localPort;
|
|
41
|
+
}
|
|
42
|
+
if (newWindow) {
|
|
43
|
+
this.windowService.openNewDefaultWindow(options);
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
this.windowService.reload(options);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, inversify_1.inject)(window_service_1.WindowService),
|
|
52
|
+
__metadata("design:type", Object)
|
|
53
|
+
], AbstractRemoteRegistryContribution.prototype, "windowService", void 0);
|
|
54
|
+
AbstractRemoteRegistryContribution = __decorate([
|
|
55
|
+
(0, inversify_1.injectable)()
|
|
56
|
+
], AbstractRemoteRegistryContribution);
|
|
57
|
+
exports.AbstractRemoteRegistryContribution = AbstractRemoteRegistryContribution;
|
|
58
|
+
class RemoteRegistry {
|
|
59
|
+
constructor() {
|
|
60
|
+
this._commands = [];
|
|
61
|
+
this.onDidRegisterCommandEmitter = new core_1.Emitter();
|
|
62
|
+
}
|
|
63
|
+
get commands() {
|
|
64
|
+
return this._commands;
|
|
65
|
+
}
|
|
66
|
+
get onDidRegisterCommand() {
|
|
67
|
+
return this.onDidRegisterCommandEmitter.event;
|
|
68
|
+
}
|
|
69
|
+
registerCommand(command, handler) {
|
|
70
|
+
this.onDidRegisterCommandEmitter.fire([command, handler]);
|
|
71
|
+
this._commands.push(command);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
exports.RemoteRegistry = RemoteRegistry;
|
|
75
75
|
//# sourceMappingURL=remote-registry-contribution.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export declare class RemoteService {
|
|
2
|
-
protected _connected: boolean;
|
|
3
|
-
isConnected(): boolean;
|
|
4
|
-
setConnected(value: boolean): void;
|
|
5
|
-
}
|
|
1
|
+
export declare class RemoteService {
|
|
2
|
+
protected _connected: boolean;
|
|
3
|
+
isConnected(): boolean;
|
|
4
|
+
setConnected(value: boolean): void;
|
|
5
|
+
}
|
|
6
6
|
//# sourceMappingURL=remote-service.d.ts.map
|
|
@@ -1,38 +1,38 @@
|
|
|
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
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
21
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
-
};
|
|
23
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
-
exports.RemoteService = void 0;
|
|
25
|
-
const inversify_1 = require("@theia/core/shared/inversify");
|
|
26
|
-
let RemoteService = class RemoteService {
|
|
27
|
-
isConnected() {
|
|
28
|
-
return this._connected;
|
|
29
|
-
}
|
|
30
|
-
setConnected(value) {
|
|
31
|
-
this._connected = value;
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
RemoteService = __decorate([
|
|
35
|
-
(0, inversify_1.injectable)()
|
|
36
|
-
], RemoteService);
|
|
37
|
-
exports.RemoteService = RemoteService;
|
|
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
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
21
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
+
};
|
|
23
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
+
exports.RemoteService = void 0;
|
|
25
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
26
|
+
let RemoteService = class RemoteService {
|
|
27
|
+
isConnected() {
|
|
28
|
+
return this._connected;
|
|
29
|
+
}
|
|
30
|
+
setConnected(value) {
|
|
31
|
+
this._connected = value;
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
RemoteService = __decorate([
|
|
35
|
+
(0, inversify_1.injectable)()
|
|
36
|
+
], RemoteService);
|
|
37
|
+
exports.RemoteService = RemoteService;
|
|
38
38
|
//# sourceMappingURL=remote-service.js.map
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { Command, MessageService, QuickInputService } from '@theia/core';
|
|
2
|
-
import { RemoteSSHConnectionProvider } from '../electron-common/remote-ssh-connection-provider';
|
|
3
|
-
import { AbstractRemoteRegistryContribution, RemoteRegistry } from './remote-registry-contribution';
|
|
4
|
-
import { RemotePreferences } from './remote-preferences';
|
|
5
|
-
export declare namespace RemoteSSHCommands {
|
|
6
|
-
const CONNECT: Command;
|
|
7
|
-
const CONNECT_CURRENT_WINDOW: Command;
|
|
8
|
-
}
|
|
9
|
-
export declare class RemoteSSHContribution extends AbstractRemoteRegistryContribution {
|
|
10
|
-
protected readonly quickInputService: QuickInputService;
|
|
11
|
-
protected readonly sshConnectionProvider: RemoteSSHConnectionProvider;
|
|
12
|
-
protected readonly messageService: MessageService;
|
|
13
|
-
protected readonly remotePreferences: RemotePreferences;
|
|
14
|
-
registerRemoteCommands(registry: RemoteRegistry): void;
|
|
15
|
-
connect(newWindow: boolean): Promise<void>;
|
|
16
|
-
sendSSHConnect(host: string, user: string): Promise<string>;
|
|
17
|
-
}
|
|
1
|
+
import { Command, MessageService, QuickInputService } from '@theia/core';
|
|
2
|
+
import { RemoteSSHConnectionProvider } from '../electron-common/remote-ssh-connection-provider';
|
|
3
|
+
import { AbstractRemoteRegistryContribution, RemoteRegistry } from './remote-registry-contribution';
|
|
4
|
+
import { RemotePreferences } from './remote-preferences';
|
|
5
|
+
export declare namespace RemoteSSHCommands {
|
|
6
|
+
const CONNECT: Command;
|
|
7
|
+
const CONNECT_CURRENT_WINDOW: Command;
|
|
8
|
+
}
|
|
9
|
+
export declare class RemoteSSHContribution extends AbstractRemoteRegistryContribution {
|
|
10
|
+
protected readonly quickInputService: QuickInputService;
|
|
11
|
+
protected readonly sshConnectionProvider: RemoteSSHConnectionProvider;
|
|
12
|
+
protected readonly messageService: MessageService;
|
|
13
|
+
protected readonly remotePreferences: RemotePreferences;
|
|
14
|
+
registerRemoteCommands(registry: RemoteRegistry): void;
|
|
15
|
+
connect(newWindow: boolean): Promise<void>;
|
|
16
|
+
sendSSHConnect(host: string, user: string): Promise<string>;
|
|
17
|
+
}
|
|
18
18
|
//# sourceMappingURL=remote-ssh-contribution.d.ts.map
|
|
@@ -1,118 +1,118 @@
|
|
|
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
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
21
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
-
};
|
|
23
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
24
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
25
|
-
};
|
|
26
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
-
exports.RemoteSSHContribution = exports.RemoteSSHCommands = void 0;
|
|
28
|
-
const core_1 = require("@theia/core");
|
|
29
|
-
const inversify_1 = require("@theia/core/shared/inversify");
|
|
30
|
-
const remote_ssh_connection_provider_1 = require("../electron-common/remote-ssh-connection-provider");
|
|
31
|
-
const remote_registry_contribution_1 = require("./remote-registry-contribution");
|
|
32
|
-
const remote_preferences_1 = require("./remote-preferences");
|
|
33
|
-
var RemoteSSHCommands;
|
|
34
|
-
(function (RemoteSSHCommands) {
|
|
35
|
-
RemoteSSHCommands.CONNECT = core_1.Command.toLocalizedCommand({
|
|
36
|
-
id: 'remote.ssh.connect',
|
|
37
|
-
category: 'SSH',
|
|
38
|
-
label: 'Connect to Host...',
|
|
39
|
-
}, 'theia/remoteSSH/connect');
|
|
40
|
-
RemoteSSHCommands.CONNECT_CURRENT_WINDOW = core_1.Command.toLocalizedCommand({
|
|
41
|
-
id: 'remote.ssh.connectCurrentWindow',
|
|
42
|
-
category: 'SSH',
|
|
43
|
-
label: 'Connect Current Window to Host...',
|
|
44
|
-
}, 'theia/remoteSSH/connect');
|
|
45
|
-
})(RemoteSSHCommands = exports.RemoteSSHCommands || (exports.RemoteSSHCommands = {}));
|
|
46
|
-
let RemoteSSHContribution = class RemoteSSHContribution extends remote_registry_contribution_1.AbstractRemoteRegistryContribution {
|
|
47
|
-
registerRemoteCommands(registry) {
|
|
48
|
-
registry.registerCommand(RemoteSSHCommands.CONNECT, {
|
|
49
|
-
execute: () => this.connect(true)
|
|
50
|
-
});
|
|
51
|
-
registry.registerCommand(RemoteSSHCommands.CONNECT_CURRENT_WINDOW, {
|
|
52
|
-
execute: () => this.connect(false)
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
async connect(newWindow) {
|
|
56
|
-
var _a;
|
|
57
|
-
let host;
|
|
58
|
-
let user;
|
|
59
|
-
host = await this.quickInputService.input({
|
|
60
|
-
title: core_1.nls.localize('theia/remote/enterHost', 'Enter SSH host name'),
|
|
61
|
-
placeHolder: core_1.nls.localize('theia/remote/hostPlaceHolder', 'E.g. hello@example.com')
|
|
62
|
-
});
|
|
63
|
-
if (!host) {
|
|
64
|
-
this.messageService.error(core_1.nls.localize('theia/remote/needsHost', 'Please enter a host name.'));
|
|
65
|
-
return;
|
|
66
|
-
}
|
|
67
|
-
if (host.includes('@')) {
|
|
68
|
-
const split = host.split('@');
|
|
69
|
-
user = split[0];
|
|
70
|
-
host = split[1];
|
|
71
|
-
}
|
|
72
|
-
if (!user) {
|
|
73
|
-
user = await this.quickInputService.input({
|
|
74
|
-
title: core_1.nls.localize('theia/remote/enterUser', 'Enter SSH user name'),
|
|
75
|
-
placeHolder: core_1.nls.localize('theia/remote/userPlaceHolder', 'E.g. hello')
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
if (!user) {
|
|
79
|
-
this.messageService.error(core_1.nls.localize('theia/remote/needsUser', 'Please enter a user name.'));
|
|
80
|
-
return;
|
|
81
|
-
}
|
|
82
|
-
try {
|
|
83
|
-
const remotePort = await this.sendSSHConnect(host, user);
|
|
84
|
-
this.openRemote(remotePort, newWindow);
|
|
85
|
-
}
|
|
86
|
-
catch (err) {
|
|
87
|
-
this.messageService.error(`${core_1.nls.localize('theia/remote/sshFailure', 'Could not open SSH connection to remote.')} ${(_a = err.message) !== null && _a !== void 0 ? _a : String(err)}`);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
async sendSSHConnect(host, user) {
|
|
91
|
-
return this.sshConnectionProvider.establishConnection({
|
|
92
|
-
host,
|
|
93
|
-
user,
|
|
94
|
-
nodeDownloadTemplate: this.remotePreferences['remote.nodeDownloadTemplate']
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
};
|
|
98
|
-
__decorate([
|
|
99
|
-
(0, inversify_1.inject)(core_1.QuickInputService),
|
|
100
|
-
__metadata("design:type", Object)
|
|
101
|
-
], RemoteSSHContribution.prototype, "quickInputService", void 0);
|
|
102
|
-
__decorate([
|
|
103
|
-
(0, inversify_1.inject)(remote_ssh_connection_provider_1.RemoteSSHConnectionProvider),
|
|
104
|
-
__metadata("design:type", Object)
|
|
105
|
-
], RemoteSSHContribution.prototype, "sshConnectionProvider", void 0);
|
|
106
|
-
__decorate([
|
|
107
|
-
(0, inversify_1.inject)(core_1.MessageService),
|
|
108
|
-
__metadata("design:type", core_1.MessageService)
|
|
109
|
-
], RemoteSSHContribution.prototype, "messageService", void 0);
|
|
110
|
-
__decorate([
|
|
111
|
-
(0, inversify_1.inject)(remote_preferences_1.RemotePreferences),
|
|
112
|
-
__metadata("design:type", Object)
|
|
113
|
-
], RemoteSSHContribution.prototype, "remotePreferences", void 0);
|
|
114
|
-
RemoteSSHContribution = __decorate([
|
|
115
|
-
(0, inversify_1.injectable)()
|
|
116
|
-
], RemoteSSHContribution);
|
|
117
|
-
exports.RemoteSSHContribution = RemoteSSHContribution;
|
|
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
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
21
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
+
};
|
|
23
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
24
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
25
|
+
};
|
|
26
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
+
exports.RemoteSSHContribution = exports.RemoteSSHCommands = void 0;
|
|
28
|
+
const core_1 = require("@theia/core");
|
|
29
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
30
|
+
const remote_ssh_connection_provider_1 = require("../electron-common/remote-ssh-connection-provider");
|
|
31
|
+
const remote_registry_contribution_1 = require("./remote-registry-contribution");
|
|
32
|
+
const remote_preferences_1 = require("./remote-preferences");
|
|
33
|
+
var RemoteSSHCommands;
|
|
34
|
+
(function (RemoteSSHCommands) {
|
|
35
|
+
RemoteSSHCommands.CONNECT = core_1.Command.toLocalizedCommand({
|
|
36
|
+
id: 'remote.ssh.connect',
|
|
37
|
+
category: 'SSH',
|
|
38
|
+
label: 'Connect to Host...',
|
|
39
|
+
}, 'theia/remoteSSH/connect');
|
|
40
|
+
RemoteSSHCommands.CONNECT_CURRENT_WINDOW = core_1.Command.toLocalizedCommand({
|
|
41
|
+
id: 'remote.ssh.connectCurrentWindow',
|
|
42
|
+
category: 'SSH',
|
|
43
|
+
label: 'Connect Current Window to Host...',
|
|
44
|
+
}, 'theia/remoteSSH/connect');
|
|
45
|
+
})(RemoteSSHCommands = exports.RemoteSSHCommands || (exports.RemoteSSHCommands = {}));
|
|
46
|
+
let RemoteSSHContribution = class RemoteSSHContribution extends remote_registry_contribution_1.AbstractRemoteRegistryContribution {
|
|
47
|
+
registerRemoteCommands(registry) {
|
|
48
|
+
registry.registerCommand(RemoteSSHCommands.CONNECT, {
|
|
49
|
+
execute: () => this.connect(true)
|
|
50
|
+
});
|
|
51
|
+
registry.registerCommand(RemoteSSHCommands.CONNECT_CURRENT_WINDOW, {
|
|
52
|
+
execute: () => this.connect(false)
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
async connect(newWindow) {
|
|
56
|
+
var _a;
|
|
57
|
+
let host;
|
|
58
|
+
let user;
|
|
59
|
+
host = await this.quickInputService.input({
|
|
60
|
+
title: core_1.nls.localize('theia/remote/enterHost', 'Enter SSH host name'),
|
|
61
|
+
placeHolder: core_1.nls.localize('theia/remote/hostPlaceHolder', 'E.g. hello@example.com')
|
|
62
|
+
});
|
|
63
|
+
if (!host) {
|
|
64
|
+
this.messageService.error(core_1.nls.localize('theia/remote/needsHost', 'Please enter a host name.'));
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
if (host.includes('@')) {
|
|
68
|
+
const split = host.split('@');
|
|
69
|
+
user = split[0];
|
|
70
|
+
host = split[1];
|
|
71
|
+
}
|
|
72
|
+
if (!user) {
|
|
73
|
+
user = await this.quickInputService.input({
|
|
74
|
+
title: core_1.nls.localize('theia/remote/enterUser', 'Enter SSH user name'),
|
|
75
|
+
placeHolder: core_1.nls.localize('theia/remote/userPlaceHolder', 'E.g. hello')
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
if (!user) {
|
|
79
|
+
this.messageService.error(core_1.nls.localize('theia/remote/needsUser', 'Please enter a user name.'));
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
try {
|
|
83
|
+
const remotePort = await this.sendSSHConnect(host, user);
|
|
84
|
+
this.openRemote(remotePort, newWindow);
|
|
85
|
+
}
|
|
86
|
+
catch (err) {
|
|
87
|
+
this.messageService.error(`${core_1.nls.localize('theia/remote/sshFailure', 'Could not open SSH connection to remote.')} ${(_a = err.message) !== null && _a !== void 0 ? _a : String(err)}`);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
async sendSSHConnect(host, user) {
|
|
91
|
+
return this.sshConnectionProvider.establishConnection({
|
|
92
|
+
host,
|
|
93
|
+
user,
|
|
94
|
+
nodeDownloadTemplate: this.remotePreferences['remote.nodeDownloadTemplate']
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
__decorate([
|
|
99
|
+
(0, inversify_1.inject)(core_1.QuickInputService),
|
|
100
|
+
__metadata("design:type", Object)
|
|
101
|
+
], RemoteSSHContribution.prototype, "quickInputService", void 0);
|
|
102
|
+
__decorate([
|
|
103
|
+
(0, inversify_1.inject)(remote_ssh_connection_provider_1.RemoteSSHConnectionProvider),
|
|
104
|
+
__metadata("design:type", Object)
|
|
105
|
+
], RemoteSSHContribution.prototype, "sshConnectionProvider", void 0);
|
|
106
|
+
__decorate([
|
|
107
|
+
(0, inversify_1.inject)(core_1.MessageService),
|
|
108
|
+
__metadata("design:type", core_1.MessageService)
|
|
109
|
+
], RemoteSSHContribution.prototype, "messageService", void 0);
|
|
110
|
+
__decorate([
|
|
111
|
+
(0, inversify_1.inject)(remote_preferences_1.RemotePreferences),
|
|
112
|
+
__metadata("design:type", Object)
|
|
113
|
+
], RemoteSSHContribution.prototype, "remotePreferences", void 0);
|
|
114
|
+
RemoteSSHContribution = __decorate([
|
|
115
|
+
(0, inversify_1.injectable)()
|
|
116
|
+
], RemoteSSHContribution);
|
|
117
|
+
exports.RemoteSSHContribution = RemoteSSHContribution;
|
|
118
118
|
//# sourceMappingURL=remote-ssh-contribution.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export declare const RemoteSSHConnectionProviderPath = "/remote/ssh";
|
|
2
|
-
export declare const RemoteSSHConnectionProvider: unique symbol;
|
|
3
|
-
export interface RemoteSSHConnectionProviderOptions {
|
|
4
|
-
user: string;
|
|
5
|
-
host: string;
|
|
6
|
-
nodeDownloadTemplate?: string;
|
|
7
|
-
}
|
|
8
|
-
export interface RemoteSSHConnectionProvider {
|
|
9
|
-
establishConnection(options: RemoteSSHConnectionProviderOptions): Promise<string>;
|
|
10
|
-
}
|
|
1
|
+
export declare const RemoteSSHConnectionProviderPath = "/remote/ssh";
|
|
2
|
+
export declare const RemoteSSHConnectionProvider: unique symbol;
|
|
3
|
+
export interface RemoteSSHConnectionProviderOptions {
|
|
4
|
+
user: string;
|
|
5
|
+
host: string;
|
|
6
|
+
nodeDownloadTemplate?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface RemoteSSHConnectionProvider {
|
|
9
|
+
establishConnection(options: RemoteSSHConnectionProviderOptions): Promise<string>;
|
|
10
|
+
}
|
|
11
11
|
//# sourceMappingURL=remote-ssh-connection-provider.d.ts.map
|
|
@@ -1,21 +1,21 @@
|
|
|
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.RemoteSSHConnectionProvider = exports.RemoteSSHConnectionProviderPath = void 0;
|
|
19
|
-
exports.RemoteSSHConnectionProviderPath = '/remote/ssh';
|
|
20
|
-
exports.RemoteSSHConnectionProvider = Symbol('RemoteSSHConnectionProvider');
|
|
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.RemoteSSHConnectionProvider = exports.RemoteSSHConnectionProviderPath = void 0;
|
|
19
|
+
exports.RemoteSSHConnectionProviderPath = '/remote/ssh';
|
|
20
|
+
exports.RemoteSSHConnectionProvider = Symbol('RemoteSSHConnectionProvider');
|
|
21
21
|
//# sourceMappingURL=remote-ssh-connection-provider.js.map
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
export declare type RemoteStatus = RemoteConnectedStatus | RemoteDisconnectedStatus;
|
|
2
|
-
export interface RemoteDisconnectedStatus {
|
|
3
|
-
alive: false;
|
|
4
|
-
}
|
|
5
|
-
export interface RemoteConnectedStatus {
|
|
6
|
-
alive: true;
|
|
7
|
-
type: string;
|
|
8
|
-
name: string;
|
|
9
|
-
}
|
|
10
|
-
export declare const RemoteStatusServicePath = "/remote/status";
|
|
11
|
-
export declare const RemoteStatusService: unique symbol;
|
|
12
|
-
export interface RemoteStatusService {
|
|
13
|
-
getStatus(localPort: number): Promise<RemoteStatus>;
|
|
14
|
-
}
|
|
1
|
+
export declare type RemoteStatus = RemoteConnectedStatus | RemoteDisconnectedStatus;
|
|
2
|
+
export interface RemoteDisconnectedStatus {
|
|
3
|
+
alive: false;
|
|
4
|
+
}
|
|
5
|
+
export interface RemoteConnectedStatus {
|
|
6
|
+
alive: true;
|
|
7
|
+
type: string;
|
|
8
|
+
name: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const RemoteStatusServicePath = "/remote/status";
|
|
11
|
+
export declare const RemoteStatusService: unique symbol;
|
|
12
|
+
export interface RemoteStatusService {
|
|
13
|
+
getStatus(localPort: number): Promise<RemoteStatus>;
|
|
14
|
+
}
|
|
15
15
|
//# sourceMappingURL=remote-status-service.d.ts.map
|