mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Merge pull request #4214 from lensapp/release/v5.2.6-beta.0
Release/v5.2.6 beta.0
This commit is contained in:
commit
5cc663c18b
@ -15,7 +15,7 @@ trigger: none
|
|||||||
jobs:
|
jobs:
|
||||||
- job: Linux
|
- job: Linux
|
||||||
pool:
|
pool:
|
||||||
vmImage: ubuntu-16.04
|
vmImage: ubuntu-18.04
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
kube_1.16:
|
kube_1.16:
|
||||||
|
|||||||
@ -41,6 +41,9 @@ jobs:
|
|||||||
- bash: |
|
- bash: |
|
||||||
set -e
|
set -e
|
||||||
git clone "https://${GH_TOKEN}@github.com/lensapp/lens-ide.git" .lens-ide-overlay
|
git clone "https://${GH_TOKEN}@github.com/lensapp/lens-ide.git" .lens-ide-overlay
|
||||||
|
cd .lens-ide-overlay
|
||||||
|
git checkout -b v5.2 0d3d9140a0f151c3ca6d7651c092f8ba44091794
|
||||||
|
cd ..
|
||||||
rm -rf .lens-ide-overlay/.git
|
rm -rf .lens-ide-overlay/.git
|
||||||
cp -r .lens-ide-overlay/* ./
|
cp -r .lens-ide-overlay/* ./
|
||||||
jq -s '.[0] * .[1]' package.json package.ide.json > package.custom.json && mv package.custom.json package.json
|
jq -s '.[0] * .[1]' package.json package.ide.json > package.custom.json && mv package.custom.json package.json
|
||||||
@ -87,6 +90,9 @@ jobs:
|
|||||||
- bash: |
|
- bash: |
|
||||||
set -e
|
set -e
|
||||||
git clone "https://${GH_TOKEN}@github.com/lensapp/lens-ide.git" .lens-ide-overlay
|
git clone "https://${GH_TOKEN}@github.com/lensapp/lens-ide.git" .lens-ide-overlay
|
||||||
|
cd .lens-ide-overlay
|
||||||
|
git checkout -b v5.2 0d3d9140a0f151c3ca6d7651c092f8ba44091794
|
||||||
|
cd ..
|
||||||
rm -rf .lens-ide-overlay/.git
|
rm -rf .lens-ide-overlay/.git
|
||||||
cp -r .lens-ide-overlay/* ./
|
cp -r .lens-ide-overlay/* ./
|
||||||
jq -s '.[0] * .[1]' package.json package.ide.json > package.custom.json && mv package.custom.json package.json
|
jq -s '.[0] * .[1]' package.json package.ide.json > package.custom.json && mv package.custom.json package.json
|
||||||
@ -109,7 +115,7 @@ jobs:
|
|||||||
|
|
||||||
- job: Linux
|
- job: Linux
|
||||||
pool:
|
pool:
|
||||||
vmImage: ubuntu-16.04
|
vmImage: ubuntu-18.04
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
node_14.x:
|
node_14.x:
|
||||||
@ -135,6 +141,9 @@ jobs:
|
|||||||
- bash: |
|
- bash: |
|
||||||
set -e
|
set -e
|
||||||
git clone "https://${GH_TOKEN}@github.com/lensapp/lens-ide.git" .lens-ide-overlay
|
git clone "https://${GH_TOKEN}@github.com/lensapp/lens-ide.git" .lens-ide-overlay
|
||||||
|
cd .lens-ide-overlay
|
||||||
|
git checkout -b v5.2 0d3d9140a0f151c3ca6d7651c092f8ba44091794
|
||||||
|
cd ..
|
||||||
rm -rf .lens-ide-overlay/.git
|
rm -rf .lens-ide-overlay/.git
|
||||||
cp -r .lens-ide-overlay/* ./
|
cp -r .lens-ide-overlay/* ./
|
||||||
jq -s '.[0] * .[1]' package.json package.ide.json > package.custom.json && mv package.custom.json package.json
|
jq -s '.[0] * .[1]' package.json package.ide.json > package.custom.json && mv package.custom.json package.json
|
||||||
|
|||||||
2
.yarnrc
2
.yarnrc
@ -1,3 +1,3 @@
|
|||||||
disturl "https://atom.io/download/electron"
|
disturl "https://atom.io/download/electron"
|
||||||
target "12.2.1"
|
target "13.4.0"
|
||||||
runtime "electron"
|
runtime "electron"
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
"productName": "OpenLens",
|
"productName": "OpenLens",
|
||||||
"description": "OpenLens - Open Source IDE for Kubernetes",
|
"description": "OpenLens - Open Source IDE for Kubernetes",
|
||||||
"homepage": "https://github.com/lensapp/lens",
|
"homepage": "https://github.com/lensapp/lens",
|
||||||
"version": "5.2.5",
|
"version": "5.2.6-beta.0",
|
||||||
"main": "static/build/main.js",
|
"main": "static/build/main.js",
|
||||||
"copyright": "© 2021 OpenLens Authors",
|
"copyright": "© 2021 OpenLens Authors",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
@ -326,7 +326,7 @@
|
|||||||
"css-loader": "^5.2.6",
|
"css-loader": "^5.2.6",
|
||||||
"deepdash": "^5.3.5",
|
"deepdash": "^5.3.5",
|
||||||
"dompurify": "^2.3.1",
|
"dompurify": "^2.3.1",
|
||||||
"electron": "^12.2.1",
|
"electron": "^13.4.0",
|
||||||
"electron-builder": "^22.10.5",
|
"electron-builder": "^22.10.5",
|
||||||
"electron-notarize": "^0.3.0",
|
"electron-notarize": "^0.3.0",
|
||||||
"esbuild": "^0.12.24",
|
"esbuild": "^0.12.24",
|
||||||
|
|||||||
@ -114,7 +114,7 @@ export class ContextHandler {
|
|||||||
await this.ensureServer();
|
await this.ensureServer();
|
||||||
const path = this.clusterUrl.path !== "/" ? this.clusterUrl.path : "";
|
const path = this.clusterUrl.path !== "/" ? this.clusterUrl.path : "";
|
||||||
|
|
||||||
return `http://127.0.0.1:${this.kubeAuthProxy.port}${path}`;
|
return `http://127.0.0.1:${this.kubeAuthProxy.port}${this.kubeAuthProxy.apiPrefix}${path}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
async getApiTarget(isLongRunningRequest = false): Promise<httpProxy.ServerOptions> {
|
async getApiTarget(isLongRunningRequest = false): Promise<httpProxy.ServerOptions> {
|
||||||
|
|||||||
@ -21,6 +21,7 @@
|
|||||||
|
|
||||||
import { ChildProcess, spawn } from "child_process";
|
import { ChildProcess, spawn } from "child_process";
|
||||||
import { waitUntilUsed } from "tcp-port-used";
|
import { waitUntilUsed } from "tcp-port-used";
|
||||||
|
import { randomBytes } from "crypto";
|
||||||
import { broadcastMessage } from "../common/ipc";
|
import { broadcastMessage } from "../common/ipc";
|
||||||
import type { Cluster } from "./cluster";
|
import type { Cluster } from "./cluster";
|
||||||
import { Kubectl } from "./kubectl";
|
import { Kubectl } from "./kubectl";
|
||||||
@ -38,6 +39,7 @@ const startingServeRegex = /^starting to serve on (?<address>.+)/i;
|
|||||||
|
|
||||||
export class KubeAuthProxy {
|
export class KubeAuthProxy {
|
||||||
public lastError: string;
|
public lastError: string;
|
||||||
|
public readonly apiPrefix: string;
|
||||||
|
|
||||||
public get port(): number {
|
public get port(): number {
|
||||||
return this._port;
|
return this._port;
|
||||||
@ -56,6 +58,7 @@ export class KubeAuthProxy {
|
|||||||
this.env = env;
|
this.env = env;
|
||||||
this.cluster = cluster;
|
this.cluster = cluster;
|
||||||
this.kubectl = Kubectl.bundled();
|
this.kubectl = Kubectl.bundled();
|
||||||
|
this.apiPrefix = `/${randomBytes(8).toString("hex")}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
get acceptHosts() {
|
get acceptHosts() {
|
||||||
@ -78,7 +81,8 @@ export class KubeAuthProxy {
|
|||||||
"--kubeconfig", `${this.cluster.kubeConfigPath}`,
|
"--kubeconfig", `${this.cluster.kubeConfigPath}`,
|
||||||
"--context", `${this.cluster.contextName}`,
|
"--context", `${this.cluster.contextName}`,
|
||||||
"--accept-hosts", this.acceptHosts,
|
"--accept-hosts", this.acceptHosts,
|
||||||
"--reject-paths", "^[^/]"
|
"--reject-paths", "^[^/]",
|
||||||
|
"--api-prefix", this.apiPrefix
|
||||||
];
|
];
|
||||||
|
|
||||||
if (process.env.DEBUG_PROXY === "true") {
|
if (process.env.DEBUG_PROXY === "true") {
|
||||||
|
|||||||
@ -200,10 +200,6 @@ export class LensProxy extends Singleton {
|
|||||||
const proxyTarget = await this.getProxyTarget(req, cluster.contextHandler);
|
const proxyTarget = await this.getProxyTarget(req, cluster.contextHandler);
|
||||||
|
|
||||||
if (proxyTarget) {
|
if (proxyTarget) {
|
||||||
// allow to fetch apis in "clusterId.localhost:port" from "localhost:port"
|
|
||||||
// this should be safe because we have already validated cluster uuid
|
|
||||||
res.setHeader("Access-Control-Allow-Origin", "*");
|
|
||||||
|
|
||||||
return this.proxy.web(req, res, proxyTarget);
|
return this.proxy.web(req, res, proxyTarget);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -109,10 +109,6 @@ export class WindowManager extends Singleton {
|
|||||||
app.dock?.hide(); // hide icon in dock (mac-os)
|
app.dock?.hide(); // hide icon in dock (mac-os)
|
||||||
})
|
})
|
||||||
.webContents
|
.webContents
|
||||||
.on("new-window", (event, url) => {
|
|
||||||
event.preventDefault();
|
|
||||||
shell.openExternal(url);
|
|
||||||
})
|
|
||||||
.on("dom-ready", () => {
|
.on("dom-ready", () => {
|
||||||
appEventBus.emit({ name: "app", action: "dom-ready" });
|
appEventBus.emit({ name: "app", action: "dom-ready" });
|
||||||
})
|
})
|
||||||
@ -150,6 +146,10 @@ export class WindowManager extends Singleton {
|
|||||||
|
|
||||||
// Always disable Node.js integration for all webviews
|
// Always disable Node.js integration for all webviews
|
||||||
webPreferences.nodeIntegration = false;
|
webPreferences.nodeIntegration = false;
|
||||||
|
}).setWindowOpenHandler((details) => {
|
||||||
|
shell.openExternal(details.url);
|
||||||
|
|
||||||
|
return { action: "deny" };
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -5269,10 +5269,10 @@ electron@*:
|
|||||||
"@types/node" "^12.0.12"
|
"@types/node" "^12.0.12"
|
||||||
extract-zip "^1.0.3"
|
extract-zip "^1.0.3"
|
||||||
|
|
||||||
electron@^12.2.1:
|
electron@^13.4.0:
|
||||||
version "12.2.1"
|
version "13.4.0"
|
||||||
resolved "https://registry.yarnpkg.com/electron/-/electron-12.2.1.tgz#ef138fde11efd01743934c3e0df717cc53ee362b"
|
resolved "https://registry.yarnpkg.com/electron/-/electron-13.4.0.tgz#f9f9e518d8c6bf23bfa8b69580447eea3ca0f880"
|
||||||
integrity sha512-Gp+rO81qoaRDP7PTVtBOvnSgDgGlwUuAEWXxi621uOJMIlYFas9ChXe8pjdL0R0vyUpiHVzp6Vrjx41VZqEpsw==
|
integrity sha512-KJGWS2qa0xZXIMPMDUNkRVO8/JxRd4+M0ejYYOzu2LIQ5ijecPzNuNR9nvDkml9XyyRBzu975FkhJcwD17ietQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@electron/get" "^1.0.1"
|
"@electron/get" "^1.0.1"
|
||||||
"@types/node" "^14.6.2"
|
"@types/node" "^14.6.2"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user