Release 6.4.12 (#7446)

* wait app to be ready before creating a BrowserWindow for system proxy resolver (#7443)

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* Release 6.4.12

Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>

---------

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
Co-authored-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
Iku-tursoandJari Kolehmainen authored and GitHub committed 2023-03-31 15:38:37 +03:00
1 parent cef524a3bb
commit 578d3d8290
8 files changed
+26 -13

No files matched your search

+1 -1
View File
@@ -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"
@@ -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);
});
},
@@ -32,7 +32,7 @@ describe("technical: resolve-system-proxy-from-electron", () => {
di.override(
resolveSystemProxyWindowInjectable,
() => ({
async () => ({
webContents: {
session: {
resolveProxy: resolveSystemProxyMock,
@@ -73,7 +73,7 @@ describe("technical: resolve-system-proxy-from-electron", () => {
di.override(
resolveSystemProxyWindowInjectable,
() => ({
async () => ({
webContents: {
session: {
resolveProxy: () => {
@@ -9,7 +9,7 @@ import resolveSystemProxyWindowInjectable from "./resolve-system-proxy-window.in
export default getGlobalOverride(
resolveSystemProxyWindowInjectable,
() => ({
async () => ({
webContents: {
session: {
resolveProxy: () => "DIRECT",
@@ -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,
});