@theia/remote 1.43.0
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 -0
- package/lib/electron-browser/remote-electron-file-dialog-service.d.ts +14 -0
- package/lib/electron-browser/remote-electron-file-dialog-service.d.ts.map +1 -0
- package/lib/electron-browser/remote-electron-file-dialog-service.js +58 -0
- package/lib/electron-browser/remote-electron-file-dialog-service.js.map +1 -0
- package/lib/electron-browser/remote-frontend-contribution.d.ts +26 -0
- package/lib/electron-browser/remote-frontend-contribution.d.ts.map +1 -0
- package/lib/electron-browser/remote-frontend-contribution.js +165 -0
- package/lib/electron-browser/remote-frontend-contribution.js.map +1 -0
- package/lib/electron-browser/remote-frontend-module.d.ts +4 -0
- package/lib/electron-browser/remote-frontend-module.d.ts.map +1 -0
- package/lib/electron-browser/remote-frontend-module.js +43 -0
- package/lib/electron-browser/remote-frontend-module.js.map +1 -0
- package/lib/electron-browser/remote-preferences.d.ts +11 -0
- package/lib/electron-browser/remote-preferences.d.ts.map +1 -0
- package/lib/electron-browser/remote-preferences.js +49 -0
- package/lib/electron-browser/remote-preferences.js.map +1 -0
- package/lib/electron-browser/remote-registry-contribution.d.ts +19 -0
- package/lib/electron-browser/remote-registry-contribution.d.ts.map +1 -0
- package/lib/electron-browser/remote-registry-contribution.js +75 -0
- package/lib/electron-browser/remote-registry-contribution.js.map +1 -0
- package/lib/electron-browser/remote-service.d.ts +6 -0
- package/lib/electron-browser/remote-service.d.ts.map +1 -0
- package/lib/electron-browser/remote-service.js +38 -0
- package/lib/electron-browser/remote-service.js.map +1 -0
- package/lib/electron-browser/remote-ssh-contribution.d.ts +18 -0
- package/lib/electron-browser/remote-ssh-contribution.d.ts.map +1 -0
- package/lib/electron-browser/remote-ssh-contribution.js +118 -0
- package/lib/electron-browser/remote-ssh-contribution.js.map +1 -0
- package/lib/electron-common/remote-ssh-connection-provider.d.ts +11 -0
- package/lib/electron-common/remote-ssh-connection-provider.d.ts.map +1 -0
- package/lib/electron-common/remote-ssh-connection-provider.js +21 -0
- package/lib/electron-common/remote-ssh-connection-provider.js.map +1 -0
- package/lib/electron-common/remote-status-service.d.ts +15 -0
- package/lib/electron-common/remote-status-service.d.ts.map +1 -0
- package/lib/electron-common/remote-status-service.js +21 -0
- package/lib/electron-common/remote-status-service.js.map +1 -0
- package/lib/electron-node/backend-remote-service-impl.d.ts +12 -0
- package/lib/electron-node/backend-remote-service-impl.d.ts.map +1 -0
- package/lib/electron-node/backend-remote-service-impl.js +51 -0
- package/lib/electron-node/backend-remote-service-impl.js.map +1 -0
- package/lib/electron-node/remote-backend-module.d.ts +5 -0
- package/lib/electron-node/remote-backend-module.d.ts.map +1 -0
- package/lib/electron-node/remote-backend-module.js +75 -0
- package/lib/electron-node/remote-backend-module.js.map +1 -0
- package/lib/electron-node/remote-connection-service.d.ts +15 -0
- package/lib/electron-node/remote-connection-service.d.ts.map +1 -0
- package/lib/electron-node/remote-connection-service.js +66 -0
- package/lib/electron-node/remote-connection-service.js.map +1 -0
- package/lib/electron-node/remote-connection-socket-provider.d.ts +9 -0
- package/lib/electron-node/remote-connection-socket-provider.d.ts.map +1 -0
- package/lib/electron-node/remote-connection-socket-provider.js +38 -0
- package/lib/electron-node/remote-connection-socket-provider.js.map +1 -0
- package/lib/electron-node/remote-proxy-server-provider.d.ts +6 -0
- package/lib/electron-node/remote-proxy-server-provider.d.ts.map +1 -0
- package/lib/electron-node/remote-proxy-server-provider.js +44 -0
- package/lib/electron-node/remote-proxy-server-provider.js.map +1 -0
- package/lib/electron-node/remote-status-service.d.ts +7 -0
- package/lib/electron-node/remote-status-service.d.ts.map +1 -0
- package/lib/electron-node/remote-status-service.js +55 -0
- package/lib/electron-node/remote-status-service.js.map +1 -0
- package/lib/electron-node/remote-types.d.ts +35 -0
- package/lib/electron-node/remote-types.d.ts.map +1 -0
- package/lib/electron-node/remote-types.js +18 -0
- package/lib/electron-node/remote-types.js.map +1 -0
- package/lib/electron-node/setup/app-native-dependency-contribution.d.ts +8 -0
- package/lib/electron-node/setup/app-native-dependency-contribution.d.ts.map +1 -0
- package/lib/electron-node/setup/app-native-dependency-contribution.js +58 -0
- package/lib/electron-node/setup/app-native-dependency-contribution.js.map +1 -0
- package/lib/electron-node/setup/main-copy-contribution.d.ts +5 -0
- package/lib/electron-node/setup/main-copy-contribution.d.ts.map +1 -0
- package/lib/electron-node/setup/main-copy-contribution.js +38 -0
- package/lib/electron-node/setup/main-copy-contribution.js.map +1 -0
- package/lib/electron-node/setup/remote-copy-contribution.d.ts +29 -0
- package/lib/electron-node/setup/remote-copy-contribution.d.ts.map +1 -0
- package/lib/electron-node/setup/remote-copy-contribution.js +79 -0
- package/lib/electron-node/setup/remote-copy-contribution.js.map +1 -0
- package/lib/electron-node/setup/remote-copy-service.d.ts +19 -0
- package/lib/electron-node/setup/remote-copy-service.d.ts.map +1 -0
- package/lib/electron-node/setup/remote-copy-service.js +127 -0
- package/lib/electron-node/setup/remote-copy-service.js.map +1 -0
- package/lib/electron-node/setup/remote-native-dependency-contribution.d.ts +35 -0
- package/lib/electron-node/setup/remote-native-dependency-contribution.d.ts.map +1 -0
- package/lib/electron-node/setup/remote-native-dependency-contribution.js +35 -0
- package/lib/electron-node/setup/remote-native-dependency-contribution.js.map +1 -0
- package/lib/electron-node/setup/remote-native-dependency-service.d.ts +24 -0
- package/lib/electron-node/setup/remote-native-dependency-service.d.ts.map +1 -0
- package/lib/electron-node/setup/remote-native-dependency-service.js +119 -0
- package/lib/electron-node/setup/remote-native-dependency-service.js.map +1 -0
- package/lib/electron-node/setup/remote-node-setup-service.d.ts +23 -0
- package/lib/electron-node/setup/remote-node-setup-service.d.ts.map +1 -0
- package/lib/electron-node/setup/remote-node-setup-service.js +133 -0
- package/lib/electron-node/setup/remote-node-setup-service.js.map +1 -0
- package/lib/electron-node/setup/remote-setup-script-service.d.ts +41 -0
- package/lib/electron-node/setup/remote-setup-script-service.d.ts.map +1 -0
- package/lib/electron-node/setup/remote-setup-script-service.js +133 -0
- package/lib/electron-node/setup/remote-setup-script-service.js.map +1 -0
- package/lib/electron-node/setup/remote-setup-service.d.ts +29 -0
- package/lib/electron-node/setup/remote-setup-service.d.ts.map +1 -0
- package/lib/electron-node/setup/remote-setup-service.js +199 -0
- package/lib/electron-node/setup/remote-setup-service.js.map +1 -0
- package/lib/electron-node/ssh/remote-ssh-connection-provider.d.ts +56 -0
- package/lib/electron-node/ssh/remote-ssh-connection-provider.d.ts.map +1 -0
- package/lib/electron-node/ssh/remote-ssh-connection-provider.js +343 -0
- package/lib/electron-node/ssh/remote-ssh-connection-provider.js.map +1 -0
- package/lib/electron-node/ssh/ssh-identity-file-collector.d.ts +13 -0
- package/lib/electron-node/ssh/ssh-identity-file-collector.d.ts.map +1 -0
- package/lib/electron-node/ssh/ssh-identity-file-collector.js +132 -0
- package/lib/electron-node/ssh/ssh-identity-file-collector.js.map +1 -0
- package/lib/package.spec.d.ts +1 -0
- package/lib/package.spec.d.ts.map +1 -0
- package/lib/package.spec.js +26 -0
- package/lib/package.spec.js.map +1 -0
- package/package.json +67 -0
- package/src/electron-browser/remote-electron-file-dialog-service.ts +47 -0
- package/src/electron-browser/remote-frontend-contribution.ts +145 -0
- package/src/electron-browser/remote-frontend-module.ts +49 -0
- package/src/electron-browser/remote-preferences.ts +62 -0
- package/src/electron-browser/remote-registry-contribution.ts +70 -0
- package/src/electron-browser/remote-service.ts +31 -0
- package/src/electron-browser/remote-ssh-contribution.ts +102 -0
- package/src/electron-common/remote-ssh-connection-provider.ts +29 -0
- package/src/electron-common/remote-status-service.ts +35 -0
- package/src/electron-node/backend-remote-service-impl.ts +45 -0
- package/src/electron-node/remote-backend-module.ts +80 -0
- package/src/electron-node/remote-connection-service.ts +55 -0
- package/src/electron-node/remote-connection-socket-provider.ts +34 -0
- package/src/electron-node/remote-proxy-server-provider.ts +37 -0
- package/src/electron-node/remote-status-service.ts +41 -0
- package/src/electron-node/remote-types.ts +56 -0
- package/src/electron-node/setup/app-native-dependency-contribution.ts +48 -0
- package/src/electron-node/setup/main-copy-contribution.ts +28 -0
- package/src/electron-node/setup/remote-copy-contribution.ts +90 -0
- package/src/electron-node/setup/remote-copy-service.ts +114 -0
- package/src/electron-node/setup/remote-native-dependency-contribution.ts +63 -0
- package/src/electron-node/setup/remote-native-dependency-service.ts +111 -0
- package/src/electron-node/setup/remote-node-setup-service.ts +123 -0
- package/src/electron-node/setup/remote-setup-script-service.ts +146 -0
- package/src/electron-node/setup/remote-setup-service.ts +197 -0
- package/src/electron-node/ssh/remote-ssh-connection-provider.ts +356 -0
- package/src/electron-node/ssh/ssh-identity-file-collector.ts +137 -0
- package/src/package.spec.ts +29 -0
package/README.md
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
<div align='center'>
|
|
2
|
+
|
|
3
|
+
<br />
|
|
4
|
+
|
|
5
|
+
<img src='https://raw.githubusercontent.com/eclipse-theia/theia/master/logo/theia.svg?sanitize=true' alt='theia-ext-logo' width='100px' />
|
|
6
|
+
|
|
7
|
+
<h2>ECLIPSE THEIA - REMOTE EXTENSION</h2>
|
|
8
|
+
|
|
9
|
+
<hr />
|
|
10
|
+
|
|
11
|
+
</div>
|
|
12
|
+
|
|
13
|
+
## Description
|
|
14
|
+
|
|
15
|
+
This package implements functionality to connect to remote systems using Theia.
|
|
16
|
+
This facilitates features similar to the features offered by Microsoft's popular `Remote-SSH`, `Dev Containers` or `WSL` extensions for VSCode.
|
|
17
|
+
|
|
18
|
+
## Package Architecture
|
|
19
|
+
|
|
20
|
+
The following explains the basic flow of any remote connection. It will be exemplified using the remote SSH feature:
|
|
21
|
+
|
|
22
|
+
1. When the user runs the `SSH: Connect to Host...` command, we send the host info to the local backend.
|
|
23
|
+
The corresponding `RemoteSSHConnectionProvider` is scoped to the current connection and can request additional information from the user, such as SSH key passphrases.
|
|
24
|
+
2. Once the `RemoteSSHConnectionProvider` has every information it needs, it creates a SSH connection and registers this connection to the general `RemoteConnectionService`.
|
|
25
|
+
Every `RemoteConnection` type implements an interface that is able to handle 3 kinds of messages to the remote system:
|
|
26
|
+
1. Executing commands in the shell of the remote system
|
|
27
|
+
2. Copying data to the remote
|
|
28
|
+
3. Once the connection has been established, a setup process takes place on the remote system:
|
|
29
|
+
1. Identifying the remote platform (i.e. Windows, MacOS or Linux). This information is needed for all the following steps.
|
|
30
|
+
2. Setting up various directories for storing the application and its dependencies.
|
|
31
|
+
3. Download and install the correct Node.js version for the remote platform.
|
|
32
|
+
4. Packaging, copying, and unpackaging the local backend to the remote backend.
|
|
33
|
+
1. Every Theia extension can register `RemoteCopyContribution` binding to copy certain files from the current system.
|
|
34
|
+
This contribution point is used for files that are used in all operating systems.
|
|
35
|
+
2. They can also register `RemoteNativeDependencyContribution` bindings to download and copy native dependencies for the remote system.
|
|
36
|
+
The downloaded files are on a per-platform basis.
|
|
37
|
+
5. Using the node version that was installed in step 3, we now start the `main.js` of the backend application.
|
|
38
|
+
We start the backend with `--port=0`, so that it searches for any available port. It will print the port to the console.
|
|
39
|
+
The setup either returns with a setup error or the port of the remote server on the remote system.
|
|
40
|
+
4. With the remote server/port in place, the backend sets up a local proxy server on a random port.
|
|
41
|
+
It instructs the `RemoteConnection` object to forward any HTTP request to this proxy server to the remote server.
|
|
42
|
+
5. The backend will return from the initial request from (1) with a new local proxy port. The frontend sets this port in the url and reload itself.
|
|
43
|
+
6. The frontend is now connected to the remote backend by connecting to the local proxy port.
|
|
44
|
+
7. The frontend now performs its normal messaging lifecycle, establishing connections to backend services.
|
|
45
|
+
Although these backend services live on a different remote system, the frontend handles them as if they belong to the local backend.
|
|
46
|
+
|
|
47
|
+
## Additional Information
|
|
48
|
+
|
|
49
|
+
- [API documentation for `@theia/remote`](https://eclipse-theia.github.io/theia/docs/next/modules/remote.html)
|
|
50
|
+
- [Theia - GitHub](https://github.com/eclipse-theia/theia)
|
|
51
|
+
- [Theia - Website](https://theia-ide.org/)
|
|
52
|
+
|
|
53
|
+
## License
|
|
54
|
+
|
|
55
|
+
- [Eclipse Public License 2.0](http://www.eclipse.org/legal/epl-2.0/)
|
|
56
|
+
- [一 (Secondary) GNU General Public License, version 2 with the GNU Classpath Exception](https://projects.eclipse.org/license/secondary-gpl-2.0-cp)
|
|
57
|
+
|
|
58
|
+
## Trademark
|
|
59
|
+
|
|
60
|
+
"Theia" is a trademark of the Eclipse Foundation
|
|
61
|
+
https://www.eclipse.org/theia
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { MaybeArray, URI } from '@theia/core';
|
|
2
|
+
import { OpenFileDialogProps, SaveFileDialogProps } from '@theia/filesystem/lib/browser/file-dialog';
|
|
3
|
+
import { FileStat } from '@theia/filesystem/lib/common/files';
|
|
4
|
+
import { ElectronFileDialogService } from '@theia/filesystem/lib/electron-browser/file-dialog/electron-file-dialog-service';
|
|
5
|
+
import { RemoteService } from './remote-service';
|
|
6
|
+
export declare class RemoteElectronFileDialogService extends ElectronFileDialogService {
|
|
7
|
+
protected readonly remoteService: RemoteService;
|
|
8
|
+
showOpenDialog(props: OpenFileDialogProps & {
|
|
9
|
+
canSelectMany: true;
|
|
10
|
+
}, folder?: FileStat | undefined): Promise<MaybeArray<URI> | undefined>;
|
|
11
|
+
showOpenDialog(props: OpenFileDialogProps, folder?: FileStat | undefined): Promise<URI | undefined>;
|
|
12
|
+
showSaveDialog(props: SaveFileDialogProps, folder?: FileStat | undefined): Promise<URI | undefined>;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=remote-electron-file-dialog-service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remote-electron-file-dialog-service.d.ts","sourceRoot":"","sources":["../../src/electron-browser/remote-electron-file-dialog-service.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAE9C,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AACrG,OAAO,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AAE9D,OAAO,EAAE,yBAAyB,EAAE,MAAM,iFAAiF,CAAC;AAC5H,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,qBACa,+BAAgC,SAAQ,yBAAyB;IAEnD,SAAS,CAAC,QAAQ,CAAC,aAAa,EAAE,aAAa,CAAC;IAE9D,cAAc,CAAC,KAAK,EAAE,mBAAmB,GAAG;QAAE,aAAa,EAAE,IAAI,CAAC;KAAE,EAAE,MAAM,CAAC,EAAE,QAAQ,GAAG,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC;IAC1I,cAAc,CAAC,KAAK,EAAE,mBAAmB,EAAE,MAAM,CAAC,EAAE,QAAQ,GAAG,SAAS,GAAG,OAAO,CAAC,GAAG,GAAG,SAAS,CAAC;IASnG,cAAc,CAAC,KAAK,EAAE,mBAAmB,EAAE,MAAM,CAAC,EAAE,QAAQ,GAAG,SAAS,GAAG,OAAO,CAAC,GAAG,GAAG,SAAS,CAAC;CAO/G"}
|
|
@@ -0,0 +1,58 @@
|
|
|
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.RemoteElectronFileDialogService = void 0;
|
|
28
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
29
|
+
const file_dialog_service_1 = require("@theia/filesystem/lib/browser/file-dialog/file-dialog-service");
|
|
30
|
+
const electron_file_dialog_service_1 = require("@theia/filesystem/lib/electron-browser/file-dialog/electron-file-dialog-service");
|
|
31
|
+
const remote_service_1 = require("./remote-service");
|
|
32
|
+
let RemoteElectronFileDialogService = class RemoteElectronFileDialogService extends electron_file_dialog_service_1.ElectronFileDialogService {
|
|
33
|
+
showOpenDialog(props, folder) {
|
|
34
|
+
if (this.remoteService.isConnected()) {
|
|
35
|
+
return file_dialog_service_1.DefaultFileDialogService.prototype.showOpenDialog.call(this, props, folder);
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
return super.showOpenDialog(props, folder);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
showSaveDialog(props, folder) {
|
|
42
|
+
if (this.remoteService.isConnected()) {
|
|
43
|
+
return file_dialog_service_1.DefaultFileDialogService.prototype.showSaveDialog.call(this, props, folder);
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
return super.showSaveDialog(props, folder);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, inversify_1.inject)(remote_service_1.RemoteService),
|
|
52
|
+
__metadata("design:type", remote_service_1.RemoteService)
|
|
53
|
+
], RemoteElectronFileDialogService.prototype, "remoteService", void 0);
|
|
54
|
+
RemoteElectronFileDialogService = __decorate([
|
|
55
|
+
(0, inversify_1.injectable)()
|
|
56
|
+
], RemoteElectronFileDialogService);
|
|
57
|
+
exports.RemoteElectronFileDialogService = RemoteElectronFileDialogService;
|
|
58
|
+
//# sourceMappingURL=remote-electron-file-dialog-service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remote-electron-file-dialog-service.js","sourceRoot":"","sources":["../../src/electron-browser/remote-electron-file-dialog-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;;;;;;;;;;;;AAGhF,4DAAkE;AAGlE,uGAAyG;AACzG,kIAA4H;AAC5H,qDAAiD;AAGjD,IAAa,+BAA+B,GAA5C,MAAa,+BAAgC,SAAQ,wDAAyB;IAMjE,cAAc,CAAC,KAA0B,EAAE,MAAiB;QACjE,IAAI,IAAI,CAAC,aAAa,CAAC,WAAW,EAAE,EAAE;YAClC,OAAO,8CAAwB,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;SACtF;aAAM;YACH,OAAO,KAAK,CAAC,cAAc,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;SAC9C;IACL,CAAC;IAEQ,cAAc,CAAC,KAA0B,EAAE,MAA6B;QAC7E,IAAI,IAAI,CAAC,aAAa,CAAC,WAAW,EAAE,EAAE;YAClC,OAAO,8CAAwB,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;SACtF;aAAM;YACH,OAAO,KAAK,CAAC,cAAc,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;SAC9C;IACL,CAAC;CACJ,CAAA;AAnB0B;IAAtB,IAAA,kBAAM,EAAC,8BAAa,CAAC;8BAAmC,8BAAa;sEAAC;AAF9D,+BAA+B;IAD3C,IAAA,sBAAU,GAAE;GACA,+BAA+B,CAqB3C;AArBY,0EAA+B"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Command, CommandContribution, CommandRegistry, ContributionProvider, QuickInputService } from '@theia/core';
|
|
2
|
+
import { FrontendApplicationContribution, StatusBar } from '@theia/core/lib/browser';
|
|
3
|
+
import { RemoteStatus, RemoteStatusService } from '../electron-common/remote-status-service';
|
|
4
|
+
import { RemoteRegistry, RemoteRegistryContribution } from './remote-registry-contribution';
|
|
5
|
+
import { RemoteService } from './remote-service';
|
|
6
|
+
import { WindowService } from '@theia/core/lib/browser/window/window-service';
|
|
7
|
+
export declare namespace RemoteCommands {
|
|
8
|
+
const REMOTE_SELECT: Command;
|
|
9
|
+
const REMOTE_DISCONNECT: Command;
|
|
10
|
+
}
|
|
11
|
+
export declare class RemoteFrontendContribution implements CommandContribution, FrontendApplicationContribution {
|
|
12
|
+
protected readonly statusBar: StatusBar;
|
|
13
|
+
protected readonly quickInputService?: QuickInputService;
|
|
14
|
+
protected readonly commandRegistry: CommandRegistry;
|
|
15
|
+
protected readonly remoteService: RemoteService;
|
|
16
|
+
protected readonly remoteStatusService: RemoteStatusService;
|
|
17
|
+
protected readonly windowService: WindowService;
|
|
18
|
+
protected readonly remoteRegistryContributions: ContributionProvider<RemoteRegistryContribution>;
|
|
19
|
+
protected remoteRegistry: RemoteRegistry;
|
|
20
|
+
configure(): Promise<void>;
|
|
21
|
+
protected setStatusBar(info: RemoteStatus): Promise<void>;
|
|
22
|
+
registerCommands(commands: CommandRegistry): void;
|
|
23
|
+
protected disconnectRemote(): void;
|
|
24
|
+
protected selectRemote(): Promise<void>;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=remote-frontend-contribution.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remote-frontend-contribution.d.ts","sourceRoot":"","sources":["../../src/electron-browser/remote-frontend-contribution.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,oBAAoB,EAAO,iBAAiB,EAAkB,MAAM,aAAa,CAAC;AAC1I,OAAO,EAAE,+BAA+B,EAAE,SAAS,EAAsC,MAAM,yBAAyB,CAAC;AAEzH,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAC7F,OAAO,EAAE,cAAc,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAC5F,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,+CAA+C,CAAC;AAE9E,yBAAiB,cAAc,CAAC;IACrB,MAAM,aAAa,EAAE,OAE3B,CAAC;IACK,MAAM,iBAAiB,EAAE,OAG9B,CAAC;CACN;AAED,qBACa,0BAA2B,YAAW,mBAAmB,EAAE,+BAA+B;IAGnG,SAAS,CAAC,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAGxC,SAAS,CAAC,QAAQ,CAAC,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IAGzD,SAAS,CAAC,QAAQ,CAAC,eAAe,EAAE,eAAe,CAAC;IAGpD,SAAS,CAAC,QAAQ,CAAC,aAAa,EAAE,aAAa,CAAC;IAGhD,SAAS,CAAC,QAAQ,CAAC,mBAAmB,EAAE,mBAAmB,CAAC;IAG5D,SAAS,CAAC,QAAQ,CAAC,aAAa,EAAE,aAAa,CAAC;IAGhD,SAAS,CAAC,QAAQ,CAAC,2BAA2B,EAAE,oBAAoB,CAAC,0BAA0B,CAAC,CAAC;IAEjG,SAAS,CAAC,cAAc,iBAAwB;IAE1C,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;cAYhB,YAAY,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IAoB/D,gBAAgB,CAAC,QAAQ,EAAE,eAAe,GAAG,IAAI;IAejD,SAAS,CAAC,gBAAgB,IAAI,IAAI;cASlB,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;CA4BhD"}
|
|
@@ -0,0 +1,165 @@
|
|
|
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.RemoteFrontendContribution = exports.RemoteCommands = void 0;
|
|
28
|
+
const core_1 = require("@theia/core");
|
|
29
|
+
const browser_1 = require("@theia/core/lib/browser");
|
|
30
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
31
|
+
const remote_status_service_1 = require("../electron-common/remote-status-service");
|
|
32
|
+
const remote_registry_contribution_1 = require("./remote-registry-contribution");
|
|
33
|
+
const remote_service_1 = require("./remote-service");
|
|
34
|
+
const window_service_1 = require("@theia/core/lib/browser/window/window-service");
|
|
35
|
+
var RemoteCommands;
|
|
36
|
+
(function (RemoteCommands) {
|
|
37
|
+
RemoteCommands.REMOTE_SELECT = {
|
|
38
|
+
id: 'remote.select'
|
|
39
|
+
};
|
|
40
|
+
RemoteCommands.REMOTE_DISCONNECT = core_1.Command.toDefaultLocalizedCommand({
|
|
41
|
+
id: 'remote.disconnect',
|
|
42
|
+
label: 'Close Remote Connection',
|
|
43
|
+
});
|
|
44
|
+
})(RemoteCommands = exports.RemoteCommands || (exports.RemoteCommands = {}));
|
|
45
|
+
let RemoteFrontendContribution = class RemoteFrontendContribution {
|
|
46
|
+
constructor() {
|
|
47
|
+
this.remoteRegistry = new remote_registry_contribution_1.RemoteRegistry();
|
|
48
|
+
}
|
|
49
|
+
async configure() {
|
|
50
|
+
const port = new URLSearchParams(location.search).get('port');
|
|
51
|
+
if (port) {
|
|
52
|
+
const status = await this.remoteStatusService.getStatus(Number(port));
|
|
53
|
+
await this.setStatusBar(status);
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
await this.setStatusBar({
|
|
57
|
+
alive: false
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
async setStatusBar(info) {
|
|
62
|
+
this.remoteService.setConnected(info.alive);
|
|
63
|
+
const entry = {
|
|
64
|
+
alignment: browser_1.StatusBarAlignment.LEFT,
|
|
65
|
+
command: RemoteCommands.REMOTE_SELECT.id,
|
|
66
|
+
backgroundColor: 'var(--theia-statusBarItem-remoteBackground)',
|
|
67
|
+
color: 'var(--theia-statusBarItem-remoteForeground)',
|
|
68
|
+
priority: 10000,
|
|
69
|
+
...(info.alive
|
|
70
|
+
? {
|
|
71
|
+
text: `$(codicon-remote) ${info.type}: ${info.name.length > 35 ? info.name.substring(0, 32) + '...' : info.name}`,
|
|
72
|
+
tooltip: core_1.nls.localizeByDefault('Editing on {0}', info.name),
|
|
73
|
+
} : {
|
|
74
|
+
text: '$(codicon-remote)',
|
|
75
|
+
tooltip: core_1.nls.localizeByDefault('Open a Remote Window'),
|
|
76
|
+
})
|
|
77
|
+
};
|
|
78
|
+
this.statusBar.setElement('remoteStatus', entry);
|
|
79
|
+
}
|
|
80
|
+
registerCommands(commands) {
|
|
81
|
+
this.remoteRegistry.onDidRegisterCommand(([command, handler]) => {
|
|
82
|
+
commands.registerCommand(command, handler);
|
|
83
|
+
});
|
|
84
|
+
for (const contribution of this.remoteRegistryContributions.getContributions()) {
|
|
85
|
+
contribution.registerRemoteCommands(this.remoteRegistry);
|
|
86
|
+
}
|
|
87
|
+
commands.registerCommand(RemoteCommands.REMOTE_SELECT, {
|
|
88
|
+
execute: () => this.selectRemote()
|
|
89
|
+
});
|
|
90
|
+
commands.registerCommand(RemoteCommands.REMOTE_DISCONNECT, {
|
|
91
|
+
execute: () => this.disconnectRemote()
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
disconnectRemote() {
|
|
95
|
+
const port = new URLSearchParams(location.search).get('localPort');
|
|
96
|
+
if (port) {
|
|
97
|
+
this.windowService.reload({
|
|
98
|
+
port
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
async selectRemote() {
|
|
103
|
+
var _a;
|
|
104
|
+
const commands = [...this.remoteRegistry.commands];
|
|
105
|
+
if (this.remoteService.isConnected()) {
|
|
106
|
+
commands.push(RemoteCommands.REMOTE_DISCONNECT);
|
|
107
|
+
}
|
|
108
|
+
const quickPicks = [];
|
|
109
|
+
let previousCategory = undefined;
|
|
110
|
+
for (const command of commands) {
|
|
111
|
+
if (previousCategory !== command.category) {
|
|
112
|
+
quickPicks.push({
|
|
113
|
+
type: 'separator',
|
|
114
|
+
label: command.category
|
|
115
|
+
});
|
|
116
|
+
previousCategory = command.category;
|
|
117
|
+
}
|
|
118
|
+
quickPicks.push({
|
|
119
|
+
label: command.label,
|
|
120
|
+
id: command.id
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
const selection = await ((_a = this.quickInputService) === null || _a === void 0 ? void 0 : _a.showQuickPick(quickPicks, {
|
|
124
|
+
placeholder: core_1.nls.localizeByDefault('Select an option to open a Remote Window')
|
|
125
|
+
}));
|
|
126
|
+
if (selection) {
|
|
127
|
+
this.commandRegistry.executeCommand(selection.id);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
__decorate([
|
|
132
|
+
(0, inversify_1.inject)(browser_1.StatusBar),
|
|
133
|
+
__metadata("design:type", Object)
|
|
134
|
+
], RemoteFrontendContribution.prototype, "statusBar", void 0);
|
|
135
|
+
__decorate([
|
|
136
|
+
(0, inversify_1.inject)(core_1.QuickInputService),
|
|
137
|
+
(0, inversify_1.optional)(),
|
|
138
|
+
__metadata("design:type", Object)
|
|
139
|
+
], RemoteFrontendContribution.prototype, "quickInputService", void 0);
|
|
140
|
+
__decorate([
|
|
141
|
+
(0, inversify_1.inject)(core_1.CommandRegistry),
|
|
142
|
+
__metadata("design:type", core_1.CommandRegistry)
|
|
143
|
+
], RemoteFrontendContribution.prototype, "commandRegistry", void 0);
|
|
144
|
+
__decorate([
|
|
145
|
+
(0, inversify_1.inject)(remote_service_1.RemoteService),
|
|
146
|
+
__metadata("design:type", remote_service_1.RemoteService)
|
|
147
|
+
], RemoteFrontendContribution.prototype, "remoteService", void 0);
|
|
148
|
+
__decorate([
|
|
149
|
+
(0, inversify_1.inject)(remote_status_service_1.RemoteStatusService),
|
|
150
|
+
__metadata("design:type", Object)
|
|
151
|
+
], RemoteFrontendContribution.prototype, "remoteStatusService", void 0);
|
|
152
|
+
__decorate([
|
|
153
|
+
(0, inversify_1.inject)(window_service_1.WindowService),
|
|
154
|
+
__metadata("design:type", Object)
|
|
155
|
+
], RemoteFrontendContribution.prototype, "windowService", void 0);
|
|
156
|
+
__decorate([
|
|
157
|
+
(0, inversify_1.inject)(core_1.ContributionProvider),
|
|
158
|
+
(0, inversify_1.named)(remote_registry_contribution_1.RemoteRegistryContribution),
|
|
159
|
+
__metadata("design:type", Object)
|
|
160
|
+
], RemoteFrontendContribution.prototype, "remoteRegistryContributions", void 0);
|
|
161
|
+
RemoteFrontendContribution = __decorate([
|
|
162
|
+
(0, inversify_1.injectable)()
|
|
163
|
+
], RemoteFrontendContribution);
|
|
164
|
+
exports.RemoteFrontendContribution = RemoteFrontendContribution;
|
|
165
|
+
//# sourceMappingURL=remote-frontend-contribution.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;;;;;;;;;;AAEhF,sCAA0I;AAC1I,qDAAyH;AACzH,4DAAmF;AACnF,oFAA6F;AAC7F,iFAA4F;AAC5F,qDAAiD;AACjD,kFAA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AAM,EAAC,sBAAe,CAAC;8BACY,sBAAe;mEAAC;AAGpD;IADC,IAAA,kBAAM,EAAC,8BAAa,CAAC;8BACY,8BAAa;iEAAC;AAGhD;IADC,IAAA,kBAAM,EAAC,2CAAmB,CAAC;;uEACgC;AAG5D;IADC,IAAA,kBAAM,EAAC,8BAAa,CAAC;;iEAC0B;AAGhD;IADC,IAAA,kBAAM,EAAC,2BAAoB,CAAC;IAAE,IAAA,iBAAK,EAAC,yDAA0B,CAAC;;+EACiC;AArBxF,0BAA0B;IADtC,IAAA,sBAAU,GAAE;GACA,0BAA0B,CA6GtC;AA7GY,gEAA0B"}
|
|
@@ -0,0 +1 @@
|
|
|
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;;AAY/D,wBAmBG"}
|
|
@@ -0,0 +1,43 @@
|
|
|
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("./remote-preferences");
|
|
30
|
+
exports.default = new inversify_1.ContainerModule((bind, _, __, rebind) => {
|
|
31
|
+
bind(remote_frontend_contribution_1.RemoteFrontendContribution).toSelf().inSingletonScope();
|
|
32
|
+
bind(browser_1.FrontendApplicationContribution).toService(remote_frontend_contribution_1.RemoteFrontendContribution);
|
|
33
|
+
bind(core_1.CommandContribution).toService(remote_frontend_contribution_1.RemoteFrontendContribution);
|
|
34
|
+
(0, core_1.bindContributionProvider)(bind, remote_registry_contribution_1.RemoteRegistryContribution);
|
|
35
|
+
bind(remote_ssh_contribution_1.RemoteSSHContribution).toSelf().inSingletonScope();
|
|
36
|
+
bind(remote_registry_contribution_1.RemoteRegistryContribution).toService(remote_ssh_contribution_1.RemoteSSHContribution);
|
|
37
|
+
(0, remote_preferences_1.bindRemotePreferences)(bind);
|
|
38
|
+
rebind(electron_file_dialog_service_1.ElectronFileDialogService).to(remote_electron_file_dialog_service_1.RemoteElectronFileDialogService).inSingletonScope();
|
|
39
|
+
bind(remote_service_1.RemoteService).toSelf().inSingletonScope();
|
|
40
|
+
bind(remote_ssh_connection_provider_1.RemoteSSHConnectionProvider).toDynamicValue(ctx => browser_1.WebSocketConnectionProvider.createLocalProxy(ctx.container, remote_ssh_connection_provider_1.RemoteSSHConnectionProviderPath)).inSingletonScope();
|
|
41
|
+
bind(remote_status_service_1.RemoteStatusService).toDynamicValue(ctx => browser_1.WebSocketConnectionProvider.createLocalProxy(ctx.container, remote_status_service_1.RemoteStatusServicePath)).inSingletonScope();
|
|
42
|
+
});
|
|
43
|
+
//# sourceMappingURL=remote-frontend-module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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,qDAAuG;AACvG,uEAAkE;AAClE,sGAAiI;AACjI,iFAA4E;AAC5E,iFAA4E;AAC5E,qDAAiD;AACjD,oFAAwG;AACxG,kIAA4H;AAC5H,+FAAwF;AACxF,6DAA6D;AAE7D,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,CAAC,+CAAqB,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IACxD,IAAI,CAAC,yDAA0B,CAAC,CAAC,SAAS,CAAC,+CAAqB,CAAC,CAAC;IAElE,IAAA,0CAAqB,EAAC,IAAI,CAAC,CAAC;IAE5B,MAAM,CAAC,wDAAyB,CAAC,CAAC,EAAE,CAAC,qEAA+B,CAAC,CAAC,gBAAgB,EAAE,CAAC;IAEzF,IAAI,CAAC,8BAAa,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IAEhD,IAAI,CAAC,4DAA2B,CAAC,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,CACnD,qCAA2B,CAAC,gBAAgB,CAA8B,GAAG,CAAC,SAAS,EAAE,gEAA+B,CAAC,CAAC,CAAC,gBAAgB,EAAE,CAAC;IAClJ,IAAI,CAAC,2CAAmB,CAAC,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,CAC3C,qCAA2B,CAAC,gBAAgB,CAAsB,GAAG,CAAC,SAAS,EAAE,+CAAuB,CAAC,CAAC,CAAC,gBAAgB,EAAE,CAAC;AACtI,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { interfaces } from '@theia/core/shared/inversify';
|
|
2
|
+
import { PreferenceProxy, PreferenceSchema } from '@theia/core/lib/browser/preferences';
|
|
3
|
+
export declare const RemotePreferenceSchema: PreferenceSchema;
|
|
4
|
+
export interface RemoteConfiguration {
|
|
5
|
+
'remote.nodeDownloadTemplate': string;
|
|
6
|
+
}
|
|
7
|
+
export declare const RemotePreferenceContribution: unique symbol;
|
|
8
|
+
export declare const RemotePreferences: unique symbol;
|
|
9
|
+
export declare type RemotePreferences = PreferenceProxy<RemoteConfiguration>;
|
|
10
|
+
export declare function bindRemotePreferences(bind: interfaces.Bind): void;
|
|
11
|
+
//# sourceMappingURL=remote-preferences.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remote-preferences.d.ts","sourceRoot":"","sources":["../../src/electron-browser/remote-preferences.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EACH,eAAe,EACf,gBAAgB,EAEnB,MAAM,qCAAqC,CAAC;AAW7C,eAAO,MAAM,sBAAsB,EAAE,gBAYpC,CAAC;AAEF,MAAM,WAAW,mBAAmB;IAChC,6BAA6B,EAAE,MAAM,CAAC;CACzC;AAED,eAAO,MAAM,4BAA4B,eAAyC,CAAC;AACnF,eAAO,MAAM,iBAAiB,eAAsC,CAAC;AACrE,oBAAY,iBAAiB,GAAG,eAAe,CAAC,mBAAmB,CAAC,CAAC;AAErE,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,UAAU,CAAC,IAAI,GAAG,IAAI,CAOjE"}
|
|
@@ -0,0 +1,49 @@
|
|
|
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.bindRemotePreferences = exports.RemotePreferences = exports.RemotePreferenceContribution = exports.RemotePreferenceSchema = void 0;
|
|
19
|
+
const preferences_1 = require("@theia/core/lib/browser/preferences");
|
|
20
|
+
const nls_1 = require("@theia/core/lib/common/nls");
|
|
21
|
+
const injectable_preference_proxy_1 = require("@theia/core/lib/browser/preferences/injectable-preference-proxy");
|
|
22
|
+
const nodeDownloadTemplateParts = [
|
|
23
|
+
nls_1.nls.localize('theia/remote/nodeDownloadTemplateVersion', '`{version}` for the used node version'),
|
|
24
|
+
nls_1.nls.localize('theia/remote/nodeDownloadTemplateOS', '`{os}` for the remote operating system. Either `win`, `linux` or `darwin`.'),
|
|
25
|
+
nls_1.nls.localize('theia/remote/nodeDownloadTemplateArch', '`{arch}` for the remote system architecture.'),
|
|
26
|
+
nls_1.nls.localize('theia/remote/nodeDownloadTemplateExt', '`{ext}` for the file extension. Either `zip`, `tar.xz` or `tar.xz`, depending on the operating system.')
|
|
27
|
+
];
|
|
28
|
+
exports.RemotePreferenceSchema = {
|
|
29
|
+
'type': 'object',
|
|
30
|
+
properties: {
|
|
31
|
+
'remote.nodeDownloadTemplate': {
|
|
32
|
+
type: 'string',
|
|
33
|
+
default: '',
|
|
34
|
+
markdownDescription: nls_1.nls.localize('theia/remote/nodeDownloadTemplate', 'Controls the template used to download the node.js binaries for the remote backend. Points to the official node.js website by default. Uses multiple placeholders:') + '\n- ' + nodeDownloadTemplateParts.join('\n- ')
|
|
35
|
+
},
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
exports.RemotePreferenceContribution = Symbol('RemotePreferenceContribution');
|
|
39
|
+
exports.RemotePreferences = Symbol('GettingStartedPreferences');
|
|
40
|
+
function bindRemotePreferences(bind) {
|
|
41
|
+
bind(exports.RemotePreferences).toDynamicValue(ctx => {
|
|
42
|
+
const factory = ctx.container.get(injectable_preference_proxy_1.PreferenceProxyFactory);
|
|
43
|
+
return factory(exports.RemotePreferenceSchema);
|
|
44
|
+
}).inSingletonScope();
|
|
45
|
+
bind(exports.RemotePreferenceContribution).toConstantValue({ schema: exports.RemotePreferenceSchema });
|
|
46
|
+
bind(preferences_1.PreferenceContribution).toService(exports.RemotePreferenceContribution);
|
|
47
|
+
}
|
|
48
|
+
exports.bindRemotePreferences = bindRemotePreferences;
|
|
49
|
+
//# sourceMappingURL=remote-preferences.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remote-preferences.js","sourceRoot":"","sources":["../../src/electron-browser/remote-preferences.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;;;AAGhF,qEAI6C;AAC7C,oDAAiD;AACjD,iHAAyG;AAEzG,MAAM,yBAAyB,GAAG;IAC9B,SAAG,CAAC,QAAQ,CAAC,0CAA0C,EAAE,uCAAuC,CAAC;IACjG,SAAG,CAAC,QAAQ,CAAC,qCAAqC,EAAE,4EAA4E,CAAC;IACjI,SAAG,CAAC,QAAQ,CAAC,uCAAuC,EAAE,8CAA8C,CAAC;IACrG,SAAG,CAAC,QAAQ,CAAC,sCAAsC,EAAE,wGAAwG,CAAC;CACjK,CAAC;AAEW,QAAA,sBAAsB,GAAqB;IACpD,MAAM,EAAE,QAAQ;IAChB,UAAU,EAAE;QACR,6BAA6B,EAAE;YAC3B,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,EAAE;YACX,mBAAmB,EAAE,SAAG,CAAC,QAAQ,CAC7B,mCAAmC,EACnC,oKAAoK,CACvK,GAAG,MAAM,GAAG,yBAAyB,CAAC,IAAI,CAAC,MAAM,CAAC;SACtD;KACJ;CACJ,CAAC;AAMW,QAAA,4BAA4B,GAAG,MAAM,CAAC,8BAA8B,CAAC,CAAC;AACtE,QAAA,iBAAiB,GAAG,MAAM,CAAC,2BAA2B,CAAC,CAAC;AAGrE,SAAgB,qBAAqB,CAAC,IAAqB;IACvD,IAAI,CAAC,yBAAiB,CAAC,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;QACzC,MAAM,OAAO,GAAG,GAAG,CAAC,SAAS,CAAC,GAAG,CAAyB,oDAAsB,CAAC,CAAC;QAClF,OAAO,OAAO,CAAC,8BAAsB,CAAC,CAAC;IAC3C,CAAC,CAAC,CAAC,gBAAgB,EAAE,CAAC;IACtB,IAAI,CAAC,oCAA4B,CAAC,CAAC,eAAe,CAAC,EAAE,MAAM,EAAE,8BAAsB,EAAE,CAAC,CAAC;IACvF,IAAI,CAAC,oCAAsB,CAAC,CAAC,SAAS,CAAC,oCAA4B,CAAC,CAAC;AACzE,CAAC;AAPD,sDAOC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
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): 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
|
|
@@ -0,0 +1 @@
|
|
|
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,EAAE,MAAM,+CAA+C,CAAC;AAG9E,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,GAAG,IAAI;CAe/D;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"}
|
|
@@ -0,0 +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;
|
|
75
|
+
//# sourceMappingURL=remote-registry-contribution.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;;;;;;;;;;AAEhF,s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