Skip to content

Commit

Permalink
Release 6.4.12 (#7446)
Browse files Browse the repository at this point in the history
* wait app to be ready before creating a BrowserWindow for system proxy resolver (#7443)

Signed-off-by: Jari Kolehmainen <[email protected]>

* Release 6.4.12

Signed-off-by: Iku-turso <[email protected]>

---------

Signed-off-by: Jari Kolehmainen <[email protected]>
Signed-off-by: Iku-turso <[email protected]>
Co-authored-by: Jari Kolehmainen <[email protected]>
  • Loading branch information
Iku-turso and jakolehm authored Mar 31, 2023
1 parent cef524a commit 578d3d8
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 13 deletions.
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"packages": [
"packages/*"
],
"version": "6.4.11",
"version": "6.4.12",
"npmClient": "yarn",
"npmClientArgs": [
"--network-timeout=100000"
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"productName": "",
"description": "Lens Desktop Core",
"homepage": "https://github.com/lensapp/lens",
"version": "6.4.11",
"version": "6.4.12",
"repository": {
"type": "git",
"url": "git+https://github.com/lensapp/lens.git"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ const resolveSystemProxyFromElectronInjectable = getInjectable({
id: "resolve-system-proxy-from-electron",

instantiate: (di) => {
const helperWindow = di.inject(resolveSystemProxyWindowInjectable);
const withErrorLoggingFor = di.inject(withErrorLoggingInjectable);
const withErrorLogging = withErrorLoggingFor(() => "Error resolving proxy");

return withErrorLogging(async (url: string) => {
const helperWindow = await di.inject(resolveSystemProxyWindowInjectable);

return await helperWindow.webContents.session.resolveProxy(url);
});
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe("technical: resolve-system-proxy-from-electron", () => {

di.override(
resolveSystemProxyWindowInjectable,
() => ({
async () => ({
webContents: {
session: {
resolveProxy: resolveSystemProxyMock,
Expand Down Expand Up @@ -73,7 +73,7 @@ describe("technical: resolve-system-proxy-from-electron", () => {

di.override(
resolveSystemProxyWindowInjectable,
() => ({
async () => ({
webContents: {
session: {
resolveProxy: () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import resolveSystemProxyWindowInjectable from "./resolve-system-proxy-window.in

export default getGlobalOverride(
resolveSystemProxyWindowInjectable,
() => ({
async () => ({
webContents: {
session: {
resolveProxy: () => "DIRECT",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,24 @@
*/
import { getInjectable } from "@ogre-tools/injectable";
import { BrowserWindow } from "electron";
import electronAppInjectable from "../../electron-app/electron-app.injectable";

const resolveSystemProxyWindowInjectable = getInjectable({
id: "resolve-system-proxy-window",
instantiate: () => new BrowserWindow({
show: false,
}),
instantiate: async (di) => {
const app = di.inject(electronAppInjectable);

await app.whenReady();

const window = new BrowserWindow({
show: false,
paintWhenInitiallyHidden: false,
});

window.hide();

return window;
},
causesSideEffects: true,
});

Expand Down
4 changes: 2 additions & 2 deletions packages/extension-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@k8slens/extensions",
"productName": "OpenLens extensions",
"description": "OpenLens - Open Source Kubernetes IDE: extensions",
"version": "6.4.11",
"version": "6.4.12",
"copyright": "© 2022 OpenLens Authors",
"license": "MIT",
"main": "dist/extension-api.js",
Expand All @@ -26,7 +26,7 @@
"prepare:dev": "yarn run build"
},
"dependencies": {
"@k8slens/core": "^6.4.11"
"@k8slens/core": "^6.4.12"
},
"devDependencies": {
"@types/node": "^16.18.6",
Expand Down
4 changes: 2 additions & 2 deletions packages/open-lens/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"productName": "OpenLens",
"description": "OpenLens - Open Source IDE for Kubernetes",
"homepage": "https://github.com/lensapp/lens",
"version": "6.4.11",
"version": "6.4.12",
"repository": {
"type": "git",
"url": "git+https://github.com/lensapp/lens.git"
Expand Down Expand Up @@ -192,7 +192,7 @@
}
},
"dependencies": {
"@k8slens/core": "^6.4.11",
"@k8slens/core": "^6.4.12",
"@k8slens/ensure-binaries": "^6.4.0-beta.16",
"@k8slens/generate-tray-icons": "^6.4.0-beta.16",
"@ogre-tools/fp": "^12.0.1",
Expand Down

0 comments on commit 578d3d8

Please sign in to comment.