@theia/remote 1.45.1 → 1.46.0-next.72

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/README.md +61 -61
  2. package/lib/electron-browser/remote-electron-file-dialog-service.d.ts +13 -13
  3. package/lib/electron-browser/remote-electron-file-dialog-service.js +57 -57
  4. package/lib/electron-browser/remote-frontend-contribution.d.ts +25 -25
  5. package/lib/electron-browser/remote-frontend-contribution.js +164 -164
  6. package/lib/electron-browser/remote-frontend-module.d.ts +3 -3
  7. package/lib/electron-browser/remote-frontend-module.js +42 -42
  8. package/lib/electron-browser/remote-preferences.d.ts +10 -10
  9. package/lib/electron-browser/remote-preferences.js +48 -48
  10. package/lib/electron-browser/remote-registry-contribution.d.ts +18 -18
  11. package/lib/electron-browser/remote-registry-contribution.js +74 -74
  12. package/lib/electron-browser/remote-service.d.ts +5 -5
  13. package/lib/electron-browser/remote-service.js +37 -37
  14. package/lib/electron-browser/remote-ssh-contribution.d.ts +17 -17
  15. package/lib/electron-browser/remote-ssh-contribution.js +117 -117
  16. package/lib/electron-common/remote-ssh-connection-provider.d.ts +10 -10
  17. package/lib/electron-common/remote-ssh-connection-provider.js +20 -20
  18. package/lib/electron-common/remote-status-service.d.ts +14 -14
  19. package/lib/electron-common/remote-status-service.js +20 -20
  20. package/lib/electron-node/backend-remote-service-impl.d.ts +11 -11
  21. package/lib/electron-node/backend-remote-service-impl.js +50 -50
  22. package/lib/electron-node/remote-backend-module.d.ts +4 -4
  23. package/lib/electron-node/remote-backend-module.js +74 -74
  24. package/lib/electron-node/remote-connection-service.d.ts +14 -14
  25. package/lib/electron-node/remote-connection-service.js +65 -65
  26. package/lib/electron-node/remote-connection-socket-provider.d.ts +8 -8
  27. package/lib/electron-node/remote-connection-socket-provider.js +37 -37
  28. package/lib/electron-node/remote-proxy-server-provider.d.ts +5 -5
  29. package/lib/electron-node/remote-proxy-server-provider.js +43 -43
  30. package/lib/electron-node/remote-status-service.d.ts +6 -6
  31. package/lib/electron-node/remote-status-service.js +54 -54
  32. package/lib/electron-node/remote-types.d.ts +34 -34
  33. package/lib/electron-node/remote-types.js +17 -17
  34. package/lib/electron-node/setup/app-native-dependency-contribution.d.ts +7 -7
  35. package/lib/electron-node/setup/app-native-dependency-contribution.js +57 -57
  36. package/lib/electron-node/setup/main-copy-contribution.d.ts +4 -4
  37. package/lib/electron-node/setup/main-copy-contribution.js +37 -37
  38. package/lib/electron-node/setup/remote-copy-contribution.d.ts +28 -28
  39. package/lib/electron-node/setup/remote-copy-contribution.js +78 -78
  40. package/lib/electron-node/setup/remote-copy-service.d.ts +18 -18
  41. package/lib/electron-node/setup/remote-copy-service.js +126 -126
  42. package/lib/electron-node/setup/remote-native-dependency-contribution.d.ts +34 -34
  43. package/lib/electron-node/setup/remote-native-dependency-contribution.js +34 -34
  44. package/lib/electron-node/setup/remote-native-dependency-service.d.ts +23 -23
  45. package/lib/electron-node/setup/remote-native-dependency-service.js +118 -118
  46. package/lib/electron-node/setup/remote-node-setup-service.d.ts +22 -22
  47. package/lib/electron-node/setup/remote-node-setup-service.js +132 -132
  48. package/lib/electron-node/setup/remote-setup-script-service.d.ts +40 -40
  49. package/lib/electron-node/setup/remote-setup-script-service.js +132 -132
  50. package/lib/electron-node/setup/remote-setup-service.d.ts +28 -28
  51. package/lib/electron-node/setup/remote-setup-service.js +198 -198
  52. package/lib/electron-node/ssh/remote-ssh-connection-provider.d.ts +55 -55
  53. package/lib/electron-node/ssh/remote-ssh-connection-provider.d.ts.map +1 -1
  54. package/lib/electron-node/ssh/remote-ssh-connection-provider.js +344 -342
  55. package/lib/electron-node/ssh/remote-ssh-connection-provider.js.map +1 -1
  56. package/lib/electron-node/ssh/ssh-identity-file-collector.d.ts +12 -12
  57. package/lib/electron-node/ssh/ssh-identity-file-collector.js +131 -131
  58. package/lib/package.spec.js +25 -25
  59. package/package.json +6 -7
  60. package/src/electron-browser/remote-electron-file-dialog-service.ts +47 -47
  61. package/src/electron-browser/remote-frontend-contribution.ts +145 -145
  62. package/src/electron-browser/remote-frontend-module.ts +49 -49
  63. package/src/electron-browser/remote-preferences.ts +62 -62
  64. package/src/electron-browser/remote-registry-contribution.ts +70 -70
  65. package/src/electron-browser/remote-service.ts +31 -31
  66. package/src/electron-browser/remote-ssh-contribution.ts +102 -102
  67. package/src/electron-common/remote-ssh-connection-provider.ts +29 -29
  68. package/src/electron-common/remote-status-service.ts +35 -35
  69. package/src/electron-node/backend-remote-service-impl.ts +45 -45
  70. package/src/electron-node/remote-backend-module.ts +80 -80
  71. package/src/electron-node/remote-connection-service.ts +55 -55
  72. package/src/electron-node/remote-connection-socket-provider.ts +34 -34
  73. package/src/electron-node/remote-proxy-server-provider.ts +37 -37
  74. package/src/electron-node/remote-status-service.ts +41 -41
  75. package/src/electron-node/remote-types.ts +56 -56
  76. package/src/electron-node/setup/app-native-dependency-contribution.ts +48 -48
  77. package/src/electron-node/setup/main-copy-contribution.ts +28 -28
  78. package/src/electron-node/setup/remote-copy-contribution.ts +90 -90
  79. package/src/electron-node/setup/remote-copy-service.ts +114 -114
  80. package/src/electron-node/setup/remote-native-dependency-contribution.ts +63 -63
  81. package/src/electron-node/setup/remote-native-dependency-service.ts +111 -111
  82. package/src/electron-node/setup/remote-node-setup-service.ts +123 -123
  83. package/src/electron-node/setup/remote-setup-script-service.ts +146 -146
  84. package/src/electron-node/setup/remote-setup-service.ts +197 -197
  85. package/src/electron-node/ssh/remote-ssh-connection-provider.ts +358 -356
  86. package/src/electron-node/ssh/ssh-identity-file-collector.ts +137 -137
  87. package/src/package.spec.ts +29 -29
@@ -1,70 +1,70 @@
1
- // *****************************************************************************
2
- // Copyright (C) 2023 TypeFox and others.
3
- //
4
- // This program and the accompanying materials are made available under the
5
- // terms of the Eclipse Public License v. 2.0 which is available at
6
- // http://www.eclipse.org/legal/epl-2.0.
7
- //
8
- // This Source Code may also be made available under the following Secondary
9
- // Licenses when the conditions for such availability set forth in the Eclipse
10
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
- // with the GNU Classpath Exception which is available at
12
- // https://www.gnu.org/software/classpath/license.html.
13
- //
14
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
- // *****************************************************************************
16
-
17
- import { Command, CommandHandler, Emitter, Event } from '@theia/core';
18
- import { inject, injectable } from '@theia/core/shared/inversify';
19
- import { WindowService } from '@theia/core/lib/browser/window/window-service';
20
- import { WindowSearchParams } from '@theia/core/lib/common/window';
21
-
22
- export const RemoteRegistryContribution = Symbol('RemoteRegistryContribution');
23
-
24
- export interface RemoteRegistryContribution {
25
- registerRemoteCommands(registry: RemoteRegistry): void;
26
- }
27
-
28
- @injectable()
29
- export abstract class AbstractRemoteRegistryContribution implements RemoteRegistryContribution {
30
-
31
- @inject(WindowService)
32
- protected readonly windowService: WindowService;
33
-
34
- abstract registerRemoteCommands(registry: RemoteRegistry): void;
35
-
36
- protected openRemote(port: string, newWindow: boolean): void {
37
- const searchParams = new URLSearchParams(location.search);
38
- const localPort = searchParams.get('localPort') || searchParams.get('port');
39
- const options: WindowSearchParams = {
40
- port
41
- };
42
- if (localPort) {
43
- options.localPort = localPort;
44
- }
45
- if (newWindow) {
46
- this.windowService.openNewDefaultWindow(options);
47
- } else {
48
- this.windowService.reload(options);
49
- }
50
- }
51
- }
52
-
53
- export class RemoteRegistry {
54
-
55
- protected _commands: Command[] = [];
56
- protected onDidRegisterCommandEmitter = new Emitter<[Command, CommandHandler | undefined]>();
57
-
58
- get commands(): readonly Command[] {
59
- return this._commands;
60
- }
61
-
62
- get onDidRegisterCommand(): Event<[Command, CommandHandler | undefined]> {
63
- return this.onDidRegisterCommandEmitter.event;
64
- }
65
-
66
- registerCommand(command: Command, handler?: CommandHandler): void {
67
- this.onDidRegisterCommandEmitter.fire([command, handler]);
68
- this._commands.push(command);
69
- }
70
- }
1
+ // *****************************************************************************
2
+ // Copyright (C) 2023 TypeFox and others.
3
+ //
4
+ // This program and the accompanying materials are made available under the
5
+ // terms of the Eclipse Public License v. 2.0 which is available at
6
+ // http://www.eclipse.org/legal/epl-2.0.
7
+ //
8
+ // This Source Code may also be made available under the following Secondary
9
+ // Licenses when the conditions for such availability set forth in the Eclipse
10
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ // with the GNU Classpath Exception which is available at
12
+ // https://www.gnu.org/software/classpath/license.html.
13
+ //
14
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
+ // *****************************************************************************
16
+
17
+ import { Command, CommandHandler, Emitter, Event } from '@theia/core';
18
+ import { inject, injectable } from '@theia/core/shared/inversify';
19
+ import { WindowService } from '@theia/core/lib/browser/window/window-service';
20
+ import { WindowSearchParams } from '@theia/core/lib/common/window';
21
+
22
+ export const RemoteRegistryContribution = Symbol('RemoteRegistryContribution');
23
+
24
+ export interface RemoteRegistryContribution {
25
+ registerRemoteCommands(registry: RemoteRegistry): void;
26
+ }
27
+
28
+ @injectable()
29
+ export abstract class AbstractRemoteRegistryContribution implements RemoteRegistryContribution {
30
+
31
+ @inject(WindowService)
32
+ protected readonly windowService: WindowService;
33
+
34
+ abstract registerRemoteCommands(registry: RemoteRegistry): void;
35
+
36
+ protected openRemote(port: string, newWindow: boolean): void {
37
+ const searchParams = new URLSearchParams(location.search);
38
+ const localPort = searchParams.get('localPort') || searchParams.get('port');
39
+ const options: WindowSearchParams = {
40
+ port
41
+ };
42
+ if (localPort) {
43
+ options.localPort = localPort;
44
+ }
45
+ if (newWindow) {
46
+ this.windowService.openNewDefaultWindow(options);
47
+ } else {
48
+ this.windowService.reload(options);
49
+ }
50
+ }
51
+ }
52
+
53
+ export class RemoteRegistry {
54
+
55
+ protected _commands: Command[] = [];
56
+ protected onDidRegisterCommandEmitter = new Emitter<[Command, CommandHandler | undefined]>();
57
+
58
+ get commands(): readonly Command[] {
59
+ return this._commands;
60
+ }
61
+
62
+ get onDidRegisterCommand(): Event<[Command, CommandHandler | undefined]> {
63
+ return this.onDidRegisterCommandEmitter.event;
64
+ }
65
+
66
+ registerCommand(command: Command, handler?: CommandHandler): void {
67
+ this.onDidRegisterCommandEmitter.fire([command, handler]);
68
+ this._commands.push(command);
69
+ }
70
+ }
@@ -1,31 +1,31 @@
1
- // *****************************************************************************
2
- // Copyright (C) 2023 TypeFox and others.
3
- //
4
- // This program and the accompanying materials are made available under the
5
- // terms of the Eclipse Public License v. 2.0 which is available at
6
- // http://www.eclipse.org/legal/epl-2.0.
7
- //
8
- // This Source Code may also be made available under the following Secondary
9
- // Licenses when the conditions for such availability set forth in the Eclipse
10
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
- // with the GNU Classpath Exception which is available at
12
- // https://www.gnu.org/software/classpath/license.html.
13
- //
14
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
- // *****************************************************************************
16
-
17
- import { injectable } from '@theia/core/shared/inversify';
18
-
19
- @injectable()
20
- export class RemoteService {
21
-
22
- protected _connected: boolean;
23
-
24
- isConnected(): boolean {
25
- return this._connected;
26
- }
27
-
28
- setConnected(value: boolean): void {
29
- this._connected = value;
30
- }
31
- }
1
+ // *****************************************************************************
2
+ // Copyright (C) 2023 TypeFox and others.
3
+ //
4
+ // This program and the accompanying materials are made available under the
5
+ // terms of the Eclipse Public License v. 2.0 which is available at
6
+ // http://www.eclipse.org/legal/epl-2.0.
7
+ //
8
+ // This Source Code may also be made available under the following Secondary
9
+ // Licenses when the conditions for such availability set forth in the Eclipse
10
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ // with the GNU Classpath Exception which is available at
12
+ // https://www.gnu.org/software/classpath/license.html.
13
+ //
14
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
+ // *****************************************************************************
16
+
17
+ import { injectable } from '@theia/core/shared/inversify';
18
+
19
+ @injectable()
20
+ export class RemoteService {
21
+
22
+ protected _connected: boolean;
23
+
24
+ isConnected(): boolean {
25
+ return this._connected;
26
+ }
27
+
28
+ setConnected(value: boolean): void {
29
+ this._connected = value;
30
+ }
31
+ }
@@ -1,102 +1,102 @@
1
- // *****************************************************************************
2
- // Copyright (C) 2023 TypeFox and others.
3
- //
4
- // This program and the accompanying materials are made available under the
5
- // terms of the Eclipse Public License v. 2.0 which is available at
6
- // http://www.eclipse.org/legal/epl-2.0.
7
- //
8
- // This Source Code may also be made available under the following Secondary
9
- // Licenses when the conditions for such availability set forth in the Eclipse
10
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
- // with the GNU Classpath Exception which is available at
12
- // https://www.gnu.org/software/classpath/license.html.
13
- //
14
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
- // *****************************************************************************
16
-
17
- import { Command, MessageService, nls, QuickInputService } from '@theia/core';
18
- import { inject, injectable } from '@theia/core/shared/inversify';
19
- import { RemoteSSHConnectionProvider } from '../electron-common/remote-ssh-connection-provider';
20
- import { AbstractRemoteRegistryContribution, RemoteRegistry } from './remote-registry-contribution';
21
- import { RemotePreferences } from './remote-preferences';
22
-
23
- export namespace RemoteSSHCommands {
24
- export const CONNECT: Command = Command.toLocalizedCommand({
25
- id: 'remote.ssh.connect',
26
- category: 'SSH',
27
- label: 'Connect to Host...',
28
- }, 'theia/remoteSSH/connect');
29
- export const CONNECT_CURRENT_WINDOW: Command = Command.toLocalizedCommand({
30
- id: 'remote.ssh.connectCurrentWindow',
31
- category: 'SSH',
32
- label: 'Connect Current Window to Host...',
33
- }, 'theia/remoteSSH/connect');
34
- }
35
-
36
- @injectable()
37
- export class RemoteSSHContribution extends AbstractRemoteRegistryContribution {
38
-
39
- @inject(QuickInputService)
40
- protected readonly quickInputService: QuickInputService;
41
-
42
- @inject(RemoteSSHConnectionProvider)
43
- protected readonly sshConnectionProvider: RemoteSSHConnectionProvider;
44
-
45
- @inject(MessageService)
46
- protected readonly messageService: MessageService;
47
-
48
- @inject(RemotePreferences)
49
- protected readonly remotePreferences: RemotePreferences;
50
-
51
- registerRemoteCommands(registry: RemoteRegistry): void {
52
- registry.registerCommand(RemoteSSHCommands.CONNECT, {
53
- execute: () => this.connect(true)
54
- });
55
- registry.registerCommand(RemoteSSHCommands.CONNECT_CURRENT_WINDOW, {
56
- execute: () => this.connect(false)
57
- });
58
- }
59
-
60
- async connect(newWindow: boolean): Promise<void> {
61
- let host: string | undefined;
62
- let user: string | undefined;
63
- host = await this.quickInputService.input({
64
- title: nls.localize('theia/remote/enterHost', 'Enter SSH host name'),
65
- placeHolder: nls.localize('theia/remote/hostPlaceHolder', 'E.g. hello@example.com')
66
- });
67
- if (!host) {
68
- this.messageService.error(nls.localize('theia/remote/needsHost', 'Please enter a host name.'));
69
- return;
70
- }
71
- if (host.includes('@')) {
72
- const split = host.split('@');
73
- user = split[0];
74
- host = split[1];
75
- }
76
- if (!user) {
77
- user = await this.quickInputService.input({
78
- title: nls.localize('theia/remote/enterUser', 'Enter SSH user name'),
79
- placeHolder: nls.localize('theia/remote/userPlaceHolder', 'E.g. hello')
80
- });
81
- }
82
- if (!user) {
83
- this.messageService.error(nls.localize('theia/remote/needsUser', 'Please enter a user name.'));
84
- return;
85
- }
86
-
87
- try {
88
- const remotePort = await this.sendSSHConnect(host!, user!);
89
- this.openRemote(remotePort, newWindow);
90
- } catch (err) {
91
- this.messageService.error(`${nls.localize('theia/remote/sshFailure', 'Could not open SSH connection to remote.')} ${err.message ?? String(err)}`);
92
- }
93
- }
94
-
95
- async sendSSHConnect(host: string, user: string): Promise<string> {
96
- return this.sshConnectionProvider.establishConnection({
97
- host,
98
- user,
99
- nodeDownloadTemplate: this.remotePreferences['remote.nodeDownloadTemplate']
100
- });
101
- }
102
- }
1
+ // *****************************************************************************
2
+ // Copyright (C) 2023 TypeFox and others.
3
+ //
4
+ // This program and the accompanying materials are made available under the
5
+ // terms of the Eclipse Public License v. 2.0 which is available at
6
+ // http://www.eclipse.org/legal/epl-2.0.
7
+ //
8
+ // This Source Code may also be made available under the following Secondary
9
+ // Licenses when the conditions for such availability set forth in the Eclipse
10
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ // with the GNU Classpath Exception which is available at
12
+ // https://www.gnu.org/software/classpath/license.html.
13
+ //
14
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
+ // *****************************************************************************
16
+
17
+ import { Command, MessageService, nls, QuickInputService } from '@theia/core';
18
+ import { inject, injectable } from '@theia/core/shared/inversify';
19
+ import { RemoteSSHConnectionProvider } from '../electron-common/remote-ssh-connection-provider';
20
+ import { AbstractRemoteRegistryContribution, RemoteRegistry } from './remote-registry-contribution';
21
+ import { RemotePreferences } from './remote-preferences';
22
+
23
+ export namespace RemoteSSHCommands {
24
+ export const CONNECT: Command = Command.toLocalizedCommand({
25
+ id: 'remote.ssh.connect',
26
+ category: 'SSH',
27
+ label: 'Connect to Host...',
28
+ }, 'theia/remoteSSH/connect');
29
+ export const CONNECT_CURRENT_WINDOW: Command = Command.toLocalizedCommand({
30
+ id: 'remote.ssh.connectCurrentWindow',
31
+ category: 'SSH',
32
+ label: 'Connect Current Window to Host...',
33
+ }, 'theia/remoteSSH/connect');
34
+ }
35
+
36
+ @injectable()
37
+ export class RemoteSSHContribution extends AbstractRemoteRegistryContribution {
38
+
39
+ @inject(QuickInputService)
40
+ protected readonly quickInputService: QuickInputService;
41
+
42
+ @inject(RemoteSSHConnectionProvider)
43
+ protected readonly sshConnectionProvider: RemoteSSHConnectionProvider;
44
+
45
+ @inject(MessageService)
46
+ protected readonly messageService: MessageService;
47
+
48
+ @inject(RemotePreferences)
49
+ protected readonly remotePreferences: RemotePreferences;
50
+
51
+ registerRemoteCommands(registry: RemoteRegistry): void {
52
+ registry.registerCommand(RemoteSSHCommands.CONNECT, {
53
+ execute: () => this.connect(true)
54
+ });
55
+ registry.registerCommand(RemoteSSHCommands.CONNECT_CURRENT_WINDOW, {
56
+ execute: () => this.connect(false)
57
+ });
58
+ }
59
+
60
+ async connect(newWindow: boolean): Promise<void> {
61
+ let host: string | undefined;
62
+ let user: string | undefined;
63
+ host = await this.quickInputService.input({
64
+ title: nls.localize('theia/remote/enterHost', 'Enter SSH host name'),
65
+ placeHolder: nls.localize('theia/remote/hostPlaceHolder', 'E.g. hello@example.com')
66
+ });
67
+ if (!host) {
68
+ this.messageService.error(nls.localize('theia/remote/needsHost', 'Please enter a host name.'));
69
+ return;
70
+ }
71
+ if (host.includes('@')) {
72
+ const split = host.split('@');
73
+ user = split[0];
74
+ host = split[1];
75
+ }
76
+ if (!user) {
77
+ user = await this.quickInputService.input({
78
+ title: nls.localize('theia/remote/enterUser', 'Enter SSH user name'),
79
+ placeHolder: nls.localize('theia/remote/userPlaceHolder', 'E.g. hello')
80
+ });
81
+ }
82
+ if (!user) {
83
+ this.messageService.error(nls.localize('theia/remote/needsUser', 'Please enter a user name.'));
84
+ return;
85
+ }
86
+
87
+ try {
88
+ const remotePort = await this.sendSSHConnect(host!, user!);
89
+ this.openRemote(remotePort, newWindow);
90
+ } catch (err) {
91
+ this.messageService.error(`${nls.localize('theia/remote/sshFailure', 'Could not open SSH connection to remote.')} ${err.message ?? String(err)}`);
92
+ }
93
+ }
94
+
95
+ async sendSSHConnect(host: string, user: string): Promise<string> {
96
+ return this.sshConnectionProvider.establishConnection({
97
+ host,
98
+ user,
99
+ nodeDownloadTemplate: this.remotePreferences['remote.nodeDownloadTemplate']
100
+ });
101
+ }
102
+ }
@@ -1,29 +1,29 @@
1
- // *****************************************************************************
2
- // Copyright (C) 2023 TypeFox and others.
3
- //
4
- // This program and the accompanying materials are made available under the
5
- // terms of the Eclipse Public License v. 2.0 which is available at
6
- // http://www.eclipse.org/legal/epl-2.0.
7
- //
8
- // This Source Code may also be made available under the following Secondary
9
- // Licenses when the conditions for such availability set forth in the Eclipse
10
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
- // with the GNU Classpath Exception which is available at
12
- // https://www.gnu.org/software/classpath/license.html.
13
- //
14
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
- // *****************************************************************************
16
-
17
- export const RemoteSSHConnectionProviderPath = '/remote/ssh';
18
-
19
- export const RemoteSSHConnectionProvider = Symbol('RemoteSSHConnectionProvider');
20
-
21
- export interface RemoteSSHConnectionProviderOptions {
22
- user: string;
23
- host: string;
24
- nodeDownloadTemplate?: string;
25
- }
26
-
27
- export interface RemoteSSHConnectionProvider {
28
- establishConnection(options: RemoteSSHConnectionProviderOptions): Promise<string>;
29
- }
1
+ // *****************************************************************************
2
+ // Copyright (C) 2023 TypeFox and others.
3
+ //
4
+ // This program and the accompanying materials are made available under the
5
+ // terms of the Eclipse Public License v. 2.0 which is available at
6
+ // http://www.eclipse.org/legal/epl-2.0.
7
+ //
8
+ // This Source Code may also be made available under the following Secondary
9
+ // Licenses when the conditions for such availability set forth in the Eclipse
10
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ // with the GNU Classpath Exception which is available at
12
+ // https://www.gnu.org/software/classpath/license.html.
13
+ //
14
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
+ // *****************************************************************************
16
+
17
+ export const RemoteSSHConnectionProviderPath = '/remote/ssh';
18
+
19
+ export const RemoteSSHConnectionProvider = Symbol('RemoteSSHConnectionProvider');
20
+
21
+ export interface RemoteSSHConnectionProviderOptions {
22
+ user: string;
23
+ host: string;
24
+ nodeDownloadTemplate?: string;
25
+ }
26
+
27
+ export interface RemoteSSHConnectionProvider {
28
+ establishConnection(options: RemoteSSHConnectionProviderOptions): Promise<string>;
29
+ }
@@ -1,35 +1,35 @@
1
- // *****************************************************************************
2
- // Copyright (C) 2023 TypeFox and others.
3
- //
4
- // This program and the accompanying materials are made available under the
5
- // terms of the Eclipse Public License v. 2.0 which is available at
6
- // http://www.eclipse.org/legal/epl-2.0.
7
- //
8
- // This Source Code may also be made available under the following Secondary
9
- // Licenses when the conditions for such availability set forth in the Eclipse
10
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
- // with the GNU Classpath Exception which is available at
12
- // https://www.gnu.org/software/classpath/license.html.
13
- //
14
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
- // *****************************************************************************
16
-
17
- export type RemoteStatus = RemoteConnectedStatus | RemoteDisconnectedStatus;
18
-
19
- export interface RemoteDisconnectedStatus {
20
- alive: false;
21
- }
22
-
23
- export interface RemoteConnectedStatus {
24
- alive: true;
25
- type: string;
26
- name: string;
27
- }
28
-
29
- export const RemoteStatusServicePath = '/remote/status';
30
-
31
- export const RemoteStatusService = Symbol('RemoteStatusService');
32
-
33
- export interface RemoteStatusService {
34
- getStatus(localPort: number): Promise<RemoteStatus>
35
- }
1
+ // *****************************************************************************
2
+ // Copyright (C) 2023 TypeFox and others.
3
+ //
4
+ // This program and the accompanying materials are made available under the
5
+ // terms of the Eclipse Public License v. 2.0 which is available at
6
+ // http://www.eclipse.org/legal/epl-2.0.
7
+ //
8
+ // This Source Code may also be made available under the following Secondary
9
+ // Licenses when the conditions for such availability set forth in the Eclipse
10
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ // with the GNU Classpath Exception which is available at
12
+ // https://www.gnu.org/software/classpath/license.html.
13
+ //
14
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
+ // *****************************************************************************
16
+
17
+ export type RemoteStatus = RemoteConnectedStatus | RemoteDisconnectedStatus;
18
+
19
+ export interface RemoteDisconnectedStatus {
20
+ alive: false;
21
+ }
22
+
23
+ export interface RemoteConnectedStatus {
24
+ alive: true;
25
+ type: string;
26
+ name: string;
27
+ }
28
+
29
+ export const RemoteStatusServicePath = '/remote/status';
30
+
31
+ export const RemoteStatusService = Symbol('RemoteStatusService');
32
+
33
+ export interface RemoteStatusService {
34
+ getStatus(localPort: number): Promise<RemoteStatus>
35
+ }
@@ -1,45 +1,45 @@
1
- // *****************************************************************************
2
- // Copyright (C) 2023 TypeFox and others.
3
- //
4
- // This program and the accompanying materials are made available under the
5
- // terms of the Eclipse Public License v. 2.0 which is available at
6
- // http://www.eclipse.org/legal/epl-2.0.
7
- //
8
- // This Source Code may also be made available under the following Secondary
9
- // Licenses when the conditions for such availability set forth in the Eclipse
10
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
- // with the GNU Classpath Exception which is available at
12
- // https://www.gnu.org/software/classpath/license.html.
13
- //
14
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
- // *****************************************************************************
16
-
17
- import { CliContribution } from '@theia/core/lib/node';
18
- import { injectable } from '@theia/core/shared/inversify';
19
- import { Arguments, Argv } from '@theia/core/shared/yargs';
20
- import { BackendRemoteService } from '@theia/core/lib/node/backend-remote-service';
21
-
22
- export const REMOTE_START = 'remote';
23
-
24
- @injectable()
25
- export class BackendRemoteServiceImpl extends BackendRemoteService implements CliContribution {
26
-
27
- protected isRemote: boolean = false;
28
-
29
- configure(conf: Argv): void {
30
- conf.option(REMOTE_START, {
31
- description: 'Starts the server as an endpoint for a remote connection (i.e. through SSH)',
32
- type: 'boolean',
33
- default: false
34
- });
35
- }
36
-
37
- setArguments(args: Arguments): void {
38
- this.isRemote = Boolean(args[REMOTE_START]);
39
- }
40
-
41
- override isRemoteServer(): boolean {
42
- return this.isRemote;
43
- }
44
-
45
- }
1
+ // *****************************************************************************
2
+ // Copyright (C) 2023 TypeFox and others.
3
+ //
4
+ // This program and the accompanying materials are made available under the
5
+ // terms of the Eclipse Public License v. 2.0 which is available at
6
+ // http://www.eclipse.org/legal/epl-2.0.
7
+ //
8
+ // This Source Code may also be made available under the following Secondary
9
+ // Licenses when the conditions for such availability set forth in the Eclipse
10
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ // with the GNU Classpath Exception which is available at
12
+ // https://www.gnu.org/software/classpath/license.html.
13
+ //
14
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
+ // *****************************************************************************
16
+
17
+ import { CliContribution } from '@theia/core/lib/node';
18
+ import { injectable } from '@theia/core/shared/inversify';
19
+ import { Arguments, Argv } from '@theia/core/shared/yargs';
20
+ import { BackendRemoteService } from '@theia/core/lib/node/backend-remote-service';
21
+
22
+ export const REMOTE_START = 'remote';
23
+
24
+ @injectable()
25
+ export class BackendRemoteServiceImpl extends BackendRemoteService implements CliContribution {
26
+
27
+ protected isRemote: boolean = false;
28
+
29
+ configure(conf: Argv): void {
30
+ conf.option(REMOTE_START, {
31
+ description: 'Starts the server as an endpoint for a remote connection (i.e. through SSH)',
32
+ type: 'boolean',
33
+ default: false
34
+ });
35
+ }
36
+
37
+ setArguments(args: Arguments): void {
38
+ this.isRemote = Boolean(args[REMOTE_START]);
39
+ }
40
+
41
+ override isRemoteServer(): boolean {
42
+ return this.isRemote;
43
+ }
44
+
45
+ }