mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Add more log entries on start up (#1955)
* Add more log entries on start up Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com> * And log entry about shell sync Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com> * Refactoring Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com> * Add new line Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com> * Apply suggestions from code review Co-authored-by: Sebastian Malton <sebastian@malton.name> Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com> Co-authored-by: Jari Kolehmainen <jari.kolehmainen@gmail.com> Co-authored-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
8 files changed
+64
-2
No files matched your search
@@ -1,3 +1,4 @@
|
||||
import requestPromise from "request-promise-native";
|
||||
import packageInfo from "../../../package.json";
|
||||
|
||||
export function getAppVersion(): string {
|
||||
@@ -11,3 +12,13 @@ export function getBundledKubectlVersion(): string {
|
||||
export function getBundledExtensions(): string[] {
|
||||
return packageInfo.lens?.extensions || [];
|
||||
}
|
||||
|
||||
export async function getAppVersionFromProxyServer(proxyPort: number): Promise<string> {
|
||||
const response = await requestPromise({
|
||||
method: "GET",
|
||||
uri: `http://localhost:${proxyPort}/version`,
|
||||
resolveWithFullResponse: true
|
||||
});
|
||||
|
||||
return JSON.parse(response.body).version;
|
||||
}
|
||||
Reference in new issue
Block a user