diff --git a/app.js b/app.js index e277bc2..9ba577d 100644 --- a/app.js +++ b/app.js @@ -17,8 +17,13 @@ const Bonjour = require('bonjour-service'); const bonjour = new Bonjour.Bonjour(); const logger = require('electron-log'); const config = require('./config'); +const updateUrl = `https://update.iprodanov.com/files`; autoUpdater.logger = logger; +autoUpdater.setFeedURL({ + provider: 'generic', + url: updateUrl, +}); logger.catchErrors(); logger.info(`${app.name} started`); logger.info(`Platform: ${process.platform} ${process.arch}`); @@ -56,10 +61,11 @@ function unregisterKeyboardShortcut() { globalShortcut.unregisterAll(); } -function useAutoUpdater() { - autoUpdater.on('error', (message) => { +async function useAutoUpdater() { + autoUpdater.on('error', async (message) => { logger.error('There was a problem updating the application'); logger.error(message); + clearInterval(updateCheckerInterval); }); autoUpdater.on('update-downloaded', () => { @@ -68,11 +74,18 @@ function useAutoUpdater() { }); if (!updateCheckerInterval && config.get('autoUpdate')) { - updateCheckerInterval = setInterval(() => { - autoUpdater.checkForUpdates(); - }, 1000 * 60 * 60 * 4); + updateCheckerInterval = setInterval(checkForUpdates, 1000 * 60 * 60 * 4); + } + + await checkForUpdates(); +} - autoUpdater.checkForUpdates(); +async function checkForUpdates() { + try { + await autoUpdater.checkForUpdates(); + } catch (error) { + logger.error(error); + clearInterval(updateCheckerInterval); } } @@ -98,10 +111,10 @@ function availabilityCheck() { let url = new URL(instance); const request = net.request(`${url.origin}/auth/providers`); - request.on('response', (response) => { + request.on('response', async (response) => { if (response.statusCode !== 200) { logger.error('Response error: ' + response); - showError(true); + await showError(true); } }); @@ -109,7 +122,7 @@ function availabilityCheck() { logger.error(error); clearInterval(availabilityCheckerInterval); availabilityCheckerInterval = null; - showError(true); + await showError(true); if (config.get('automaticSwitching')) { checkForAvailableInstance(); @@ -200,8 +213,8 @@ function getMenu() { { label: 'Open in Browser', enabled: currentInstance(), - click: () => { - shell.openExternal(currentInstance()); + click: async () => { + await shell.openExternal(currentInstance()); }, }, { @@ -217,9 +230,9 @@ function getMenu() { label: e, type: 'checkbox', checked: currentInstance() === e, - click: () => { + click: async () => { currentInstance(e); - mainWindow.loadURL(e); + await mainWindow.loadURL(e); mainWindow.show(); }, }); @@ -231,9 +244,9 @@ function getMenu() { }, { label: 'Add another Instance...', - click: () => { + click: async () => { config.delete('currentInstance'); - mainWindow.loadURL(indexFile); + await mainWindow.loadURL(indexFile); mainWindow.show(); }, }, @@ -330,10 +343,10 @@ function getMenu() { label: 'Use detached Window', type: 'checkbox', checked: config.get('detachedMode'), - click: () => { + click: async () => { config.set('detachedMode', !config.get('detachedMode')); mainWindow.hide(); - createMainWindow(config.get('detachedMode')); + await createMainWindow(config.get('detachedMode')); }, }, { @@ -356,7 +369,7 @@ function getMenu() { label: 'Automatic Updates', type: 'checkbox', checked: config.get('autoUpdate'), - click: () => { + click: async () => { const currentStatus = config.get('autoUpdate'); config.set('autoUpdate', !currentStatus); @@ -364,14 +377,14 @@ function getMenu() { clearInterval(updateCheckerInterval); updateCheckerInterval = null; } else { - useAutoUpdater(); + await useAutoUpdater(); } }, }, { label: 'Open on github.com', - click: () => { - shell.openExternal('https://github.com/iprodanovbg/homeassistant-desktop'); + click: async () => { + await shell.openExternal('https://github.com/iprodanovbg/homeassistant-desktop'); }, }, { @@ -392,12 +405,12 @@ function getMenu() { message: 'Are you sure you want to reset Home Assistant Desktop?', buttons: ['Reset Everything!', 'Reset Windows', 'Cancel'], }) - .then((res) => { + .then(async (res) => { if (res.response !== 2) { if (res.response === 0) { config.clear(); - mainWindow.webContents.session.clearCache(); - mainWindow.webContents.session.clearStorageData(); + await mainWindow.webContents.session.clearCache(); + await mainWindow.webContents.session.clearStorageData(); } else { config.delete('windowSizeDetached'); config.delete('windowSize'); @@ -425,7 +438,7 @@ function getMenu() { ]); } -function createMainWindow(show = false) { +async function createMainWindow(show = false) { logger.info('Initialized main window'); mainWindow = new BrowserWindow({ width: 420, @@ -443,22 +456,22 @@ function createMainWindow(show = false) { }); // mainWindow.webContents.openDevTools(); - mainWindow.loadURL(indexFile); + await mainWindow.loadURL(indexFile); createTray(); // open external links in default browser - mainWindow.webContents.on("new-window", function (e, url) { - e.preventDefault(); - shell.openExternal(url).catch((err) => logger.error(err)); + mainWindow.webContents.setWindowOpenHandler(({ url }) => { + shell.openExternal(url); + return { action: 'deny' }; }); // hide scrollbar - mainWindow.webContents.on('did-finish-load', function () { - mainWindow.webContents.insertCSS('::-webkit-scrollbar { display: none; } body { -webkit-user-select: none; }'); + mainWindow.webContents.on('did-finish-load', async function () { + await mainWindow.webContents.insertCSS('::-webkit-scrollbar { display: none; } body { -webkit-user-select: none; }'); if (config.get('detachedMode') && process.platform === 'darwin') { - mainWindow.webContents.insertCSS('body { -webkit-app-region: drag; }'); + await mainWindow.webContents.insertCSS('body { -webkit-app-region: drag; }'); } // let code = `document.addEventListener('mousemove', () => { ipcRenderer.send('mousemove'); });`; @@ -541,11 +554,11 @@ function createMainWindow(show = false) { initialized = true; } -function reinitMainWindow() { +async function reinitMainWindow() { logger.info('Re-initialized main window'); mainWindow.destroy(); mainWindow = null; - createMainWindow(!config.has('currentInstance')); + await createMainWindow(!config.has('currentInstance')); if (!availabilityCheckerInterval) { logger.info('Re-initialized availability check'); @@ -692,21 +705,21 @@ function addInstance(url) { currentInstance(url); } -function showError(isError) { +async function showError(isError) { if (!isError && mainWindow.webContents.getURL().includes('error.html')) { - mainWindow.loadURL(indexFile); + await mainWindow.loadURL(indexFile); } if (isError && currentInstance() && !mainWindow.webContents.getURL().includes('error.html')) { - mainWindow.loadURL(errorFile); + await mainWindow.loadURL(errorFile); } } -app.whenReady().then(() => { - useAutoUpdater(); +app.whenReady().then(async () => { + await useAutoUpdater(); checkAutoStart(); - createMainWindow(!config.has('currentInstance')); + await createMainWindow(!config.has('currentInstance')); if (process.platform === 'linux') { tray.setContextMenu(getMenu()); @@ -761,8 +774,8 @@ ipcMain.on('ha-instance', (event, url) => { } }); -ipcMain.on('reconnect', () => { - reinitMainWindow(); +ipcMain.on('reconnect', async () => { + await reinitMainWindow(); }); ipcMain.on('restart', () => { diff --git a/package-lock.json b/package-lock.json index db80d60..f78335c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "homeassistant-desktop", - "version": "1.5.1", + "version": "1.5.3", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -219,9 +219,9 @@ } }, "@types/semver": { - "version": "7.3.12", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.12.tgz", - "integrity": "sha512-WwA1MW0++RfXmCr12xeYOOC5baSC9mSb0ZqCquFzKhcoF4TvHu5MKOuXsncgZcpVFhB1pXd5hZmM0ryAoCp12A==" + "version": "7.3.13", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.13.tgz", + "integrity": "sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==" }, "@types/verror": { "version": "1.10.6", @@ -245,6 +245,16 @@ "integrity": "sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==", "dev": true }, + "@types/yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==", + "dev": true, + "optional": true, + "requires": { + "@types/node": "*" + } + }, "agent-base": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", @@ -674,11 +684,11 @@ } }, "builder-util-runtime": { - "version": "9.0.3", - "resolved": "https://registry.npmjs.org/builder-util-runtime/-/builder-util-runtime-9.0.3.tgz", - "integrity": "sha512-SfG2wnyjpUbbdtpnqDpWwklujofC6GarGpvdWrEkg9p5AD/xJmTF2buTNaqs3qtsNBEVQDDjZz9xc2GGpVyMfA==", + "version": "8.9.2", + "resolved": "https://registry.npmjs.org/builder-util-runtime/-/builder-util-runtime-8.9.2.tgz", + "integrity": "sha512-rhuKm5vh7E0aAmT6i8aoSfEjxzdYEFX7zDApK+eNgOhjofnWb74d9SRJv0H/8nsgOkos0TZ4zxW0P8J4N7xQ2A==", "requires": { - "debug": "^4.3.4", + "debug": "^4.3.2", "sax": "^1.2.4" } }, @@ -821,18 +831,6 @@ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true }, - "concat-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" - } - }, "conf": { "version": "10.2.0", "resolved": "https://registry.npmjs.org/conf/-/conf-10.2.0.tgz", @@ -891,7 +889,8 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", - "dev": true + "dev": true, + "optional": true }, "crc": { "version": "3.8.0", @@ -1113,22 +1112,14 @@ } }, "electron": { - "version": "11.5.0", - "resolved": "https://registry.npmjs.org/electron/-/electron-11.5.0.tgz", - "integrity": "sha512-WjNDd6lGpxyiNjE3LhnFCAk/D9GIj1rU3GSDealVShhkkkPR3Vh4q8ErXGDl1OAO/faomVa10KoFPUN/pLbNxg==", + "version": "21.2.0", + "resolved": "https://registry.npmjs.org/electron/-/electron-21.2.0.tgz", + "integrity": "sha512-oKV4fo8l6jlOZ1cYZ4RpZz02ZxLuBo3SO7DH+FrJ8uDyCirP+eVJ/qlzu23odtNe0P7S/mYAZbC6abZHWoqtLg==", "dev": true, "requires": { - "@electron/get": "^1.0.1", - "@types/node": "^12.0.12", - "extract-zip": "^1.0.3" - }, - "dependencies": { - "@types/node": { - "version": "12.20.55", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", - "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==", - "dev": true - } + "@electron/get": "^1.14.1", + "@types/node": "^16.11.26", + "extract-zip": "^2.0.1" } }, "electron-builder": { @@ -1304,19 +1295,18 @@ "integrity": "sha512-z3GGSaaAJf8HnY9lyAFae3o89+Sfg2zHFrJE9AUgOosQ0rqQsx48V3nzcjrmXCm994meNhjLjgq/Q916LdSLqg==" }, "electron-updater": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/electron-updater/-/electron-updater-5.2.1.tgz", - "integrity": "sha512-OQZVIvqcK8j03HjT07uVPgvguP/r8RY2wZcwCM26+fcDOjtrm01Dfz3G8Eru+69znbrR+F9pDzr98ewMavBrWQ==", + "version": "4.6.5", + "resolved": "https://registry.npmjs.org/electron-updater/-/electron-updater-4.6.5.tgz", + "integrity": "sha512-kdTly8O9mSZfm9fslc1mnCY+mYOeaYRy7ERa2Fed240u01BKll3aiupzkd07qKw69KvhBSzuHroIW3mF0D8DWA==", "requires": { "@types/semver": "^7.3.6", - "builder-util-runtime": "9.0.3", + "builder-util-runtime": "8.9.2", "fs-extra": "^10.0.0", "js-yaml": "^4.1.0", "lazy-val": "^1.0.5", "lodash.escaperegexp": "^4.1.2", "lodash.isequal": "^4.5.0", - "semver": "^7.3.5", - "typed-emitter": "^2.1.0" + "semver": "^7.3.5" }, "dependencies": { "fs-extra": { @@ -1339,9 +1329,9 @@ } }, "semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", "requires": { "lru-cache": "^6.0.0" } @@ -1401,31 +1391,25 @@ "optional": true }, "extract-zip": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.7.0.tgz", - "integrity": "sha512-xoh5G1W/PB0/27lXgMQyIhP5DSY/LhoCsOyZgb+6iMmRtCwVBo55uKaMoEYrDCKQhWvqEip5ZPKAc6eFNyf/MA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", + "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", "dev": true, "requires": { - "concat-stream": "^1.6.2", - "debug": "^2.6.9", - "mkdirp": "^0.5.4", + "@types/yauzl": "^2.9.1", + "debug": "^4.1.1", + "get-stream": "^5.1.0", "yauzl": "^2.10.0" }, "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", "dev": true, "requires": { - "ms": "2.0.0" + "pump": "^3.0.0" } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true } } }, @@ -1544,9 +1528,9 @@ "dev": true }, "get-intrinsic": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz", - "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.0.tgz", + "integrity": "sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==", "dev": true, "optional": true, "requires": { @@ -1701,9 +1685,9 @@ } }, "http-cache-semantics": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", - "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", + "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==", "dev": true }, "http-proxy-agent": { @@ -1797,12 +1781,6 @@ "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==" }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", - "dev": true - }, "isbinaryfile": { "version": "4.0.10", "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-4.0.10.tgz", @@ -2150,12 +2128,6 @@ "integrity": "sha512-ravE6m9Atw9Z/jjttRUZ+clIXogdghyZAuWJ3qEzjT+jI/dL1ifAqhZeC5VHzQp1MSt1+jxKkFNemj/iO7tVUA==", "dev": true }, - "process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "dev": true - }, "progress": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", @@ -2197,21 +2169,6 @@ "lazy-val": "^1.0.4" } }, - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -2256,21 +2213,6 @@ "sprintf-js": "^1.1.2" } }, - "rxjs": { - "version": "7.5.6", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.6.tgz", - "integrity": "sha512-dnyv2/YsXhnm461G+R/Pe5bWP41Nm6LBXEYWI6eiFP4fiwx6WRI/CD0zbdVAudd9xwLEF2IDcKXLHit0FYjUzw==", - "optional": true, - "requires": { - "tslib": "^2.1.0" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -2414,15 +2356,6 @@ "strip-ansi": "^6.0.1" } }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, "strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -2549,12 +2482,6 @@ "utf8-byte-length": "^1.0.1" } }, - "tslib": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", - "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", - "optional": true - }, "tunnel": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", @@ -2567,20 +2494,6 @@ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz", "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==" }, - "typed-emitter": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/typed-emitter/-/typed-emitter-2.1.0.tgz", - "integrity": "sha512-g/KzbYKbH5C2vPkaXGu8DJlHrGKHLsM25Zg9WuC9pMGfuvT+X25tZQWo5fK1BjBm8+UrVE9LDCvaY0CQk+fXDA==", - "requires": { - "rxjs": "*" - } - }, - "typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==", - "dev": true - }, "universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", @@ -2615,12 +2528,6 @@ "integrity": "sha512-4+wkEYLBbWxqTahEsWrhxepcoVOJ+1z5PGIjPZxRkytcdSUaNjIjBM7Xn8E+pdSuV7SzvWovBFA54FO0JSoqhA==", "dev": true }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true - }, "verror": { "version": "1.10.1", "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.1.tgz", diff --git a/package.json b/package.json index 98829a5..f42c03c 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "type": "git", "url": "https://github.com/iprodanovbg/homeassistant-desktop" }, - "version": "1.5.2", + "version": "1.5.3", "description": "Desktop App (Windows / macOS / Linux) for Home Assistant built with Electron", "author": "Ivan Prodanov", "license": "Apache-2.0", @@ -25,11 +25,14 @@ "electron-log": "^4.4.8", "electron-store": "^8.1.0", "electron-traywindow-positioner": "^1.1.1", - "electron-updater": "^5.2.1" + "electron-updater": "^4.6.5" }, "devDependencies": { - "electron": "^11.5.0", - "electron-builder": "^23.5.0" + "electron": "21.2.0", + "electron-builder": "^23.0.0" + }, + "engines": { + "node": ">= 16" }, "build": { "appId": "com.electron.homeassistant-desktop",