From 5e7862716656a1689a26ce052889cd41109074d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=B3bert=20Kiss?= Date: Sun, 15 Dec 2024 17:56:57 +0100 Subject: [PATCH] chore: delete unused electron-debug and electron-devtools-installer (#2456) --- package-lock.json | 151 ------------------------ package.json | 3 - packages/uhk-agent/src/dev-extension.ts | 20 ---- packages/uhk-agent/src/electron-main.ts | 4 +- 4 files changed, 1 insertion(+), 177 deletions(-) delete mode 100644 packages/uhk-agent/src/dev-extension.ts diff --git a/package-lock.json b/package-lock.json index 2cfc6e6b6e8..4b958b3ad2e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,6 @@ "@types/command-line-args": "5.2.3", "@types/command-line-usage": "5.0.4", "@types/decompress": "4.2.7", - "@types/electron-devtools-installer": "2.0.2", "@types/file-saver": "2.0.7", "@types/jasmine": "5.1.4", "@types/lodash": "4.17.10", @@ -31,8 +30,6 @@ "desm": "1.3.0", "electron": "33.2.0", "electron-builder": "25.1.8", - "electron-debug": "1.5.0", - "electron-devtools-installer": "2.2.3", "electron-log": "4.4.8", "electron-settings": "4.0.4", "electron-updater": "6.3.9", @@ -3716,13 +3713,6 @@ "@types/node": "*" } }, - "node_modules/@types/electron-devtools-installer": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@types/electron-devtools-installer/-/electron-devtools-installer-2.0.2.tgz", - "integrity": "sha512-DQdr2xx2qtS3OYLICYlHXEatV75233bimYFo2ronZ2O5dO3CRZEGg6+PH2Uzi04NMmVPt81xkLNwjr+cjWg7HA==", - "dev": true, - "license": "MIT" - }, "node_modules/@types/eslint": { "version": "9.6.1", "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-9.6.1.tgz", @@ -4453,16 +4443,6 @@ "js-yaml": "bin/js-yaml.js" } }, - "node_modules/7zip": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/7zip/-/7zip-0.0.6.tgz", - "integrity": "sha512-ns8vKbKhIQm338AeWo/YdDSWil3pldwCMoyR2npoM2qDAzF8Vuko8BtDxpNt/wE15SXOh5K5WbjSLR4kTOAHLA==", - "dev": true, - "license": "GNU LGPL", - "bin": { - "7z": "7zip-lite/7z.exe" - } - }, "node_modules/7zip-bin": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/7zip-bin/-/7zip-bin-5.2.0.tgz", @@ -6543,13 +6523,6 @@ "node": ">= 8" } }, - "node_modules/cross-unzip": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/cross-unzip/-/cross-unzip-0.0.2.tgz", - "integrity": "sha512-nRJ5c+aqHz0OJVU4V1bqoaDggydfauK/Gha/H/ScBvuIjhZvl8YIpdWVzSR3vUhzCloqB1tvBdQ4V7J8qK7HzQ==", - "dev": true, - "license": "GNU LGPL" - }, "node_modules/crypto-random-string": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", @@ -7613,116 +7586,6 @@ "node": ">=12" } }, - "node_modules/electron-debug": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/electron-debug/-/electron-debug-1.5.0.tgz", - "integrity": "sha512-23CLHQXW+gMgdlJbeW1EinPX7DpwuLtfdzSuFL0OnsqEhKGJVJufAZTyq2hc3sr+R53rr3P+mJiYoR5VzAHKJQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "electron-is-dev": "^0.3.0", - "electron-localshortcut": "^3.0.0" - } - }, - "node_modules/electron-devtools-installer": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/electron-devtools-installer/-/electron-devtools-installer-2.2.3.tgz", - "integrity": "sha512-KFVP2lt3guvhXsUKE3YxbddMOJtpdvTsWfloV/8395Df5Td9Z+YvNl8LFW864mVqdDJsiy2qQ8y95NT5C+avSA==", - "dev": true, - "license": "MIT", - "dependencies": { - "7zip": "0.0.6", - "cross-unzip": "0.0.2", - "rimraf": "^2.5.2", - "semver": "^5.3.0" - } - }, - "node_modules/electron-devtools-installer/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/electron-devtools-installer/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/electron-devtools-installer/node_modules/rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", - "deprecated": "Rimraf versions prior to v4 are no longer supported", - "dev": true, - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - } - }, - "node_modules/electron-devtools-installer/node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/electron-is-accelerator": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/electron-is-accelerator/-/electron-is-accelerator-0.1.2.tgz", - "integrity": "sha512-fLGSAjXZtdn1sbtZxx52+krefmtNuVwnJCV2gNiVt735/ARUboMl8jnNC9fZEqQdlAv2ZrETfmBUsoQci5evJA==", - "dev": true, - "license": "MIT" - }, - "node_modules/electron-is-dev": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/electron-is-dev/-/electron-is-dev-0.3.0.tgz", - "integrity": "sha512-jLttuuq8QK67n3mXmIe9pkrO7IH3LGIk12xJkhTmc852U2sCJaRAOpRGPSh+1Xnzck5v9escd9YXzuze9nGejg==", - "dev": true, - "license": "MIT" - }, - "node_modules/electron-localshortcut": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/electron-localshortcut/-/electron-localshortcut-3.2.1.tgz", - "integrity": "sha512-DWvhKv36GsdXKnaFFhEiK8kZZA+24/yFLgtTwJJHc7AFgDjNRIBJZ/jq62Y/dWv9E4ypYwrVWN2bVrCYw1uv7Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "^4.0.1", - "electron-is-accelerator": "^0.1.0", - "keyboardevent-from-electron-accelerator": "^2.0.0", - "keyboardevents-areequal": "^0.2.1" - } - }, "node_modules/electron-log": { "version": "4.4.8", "resolved": "https://registry.npmjs.org/electron-log/-/electron-log-4.4.8.tgz", @@ -10984,20 +10847,6 @@ "dev": true, "license": "MIT" }, - "node_modules/keyboardevent-from-electron-accelerator": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/keyboardevent-from-electron-accelerator/-/keyboardevent-from-electron-accelerator-2.0.0.tgz", - "integrity": "sha512-iQcmNA0M4ETMNi0kG/q0h/43wZk7rMeKYrXP7sqKIJbHkTU8Koowgzv+ieR/vWJbOwxx5nDC3UnudZ0aLSu4VA==", - "dev": true, - "license": "MIT" - }, - "node_modules/keyboardevents-areequal": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/keyboardevents-areequal/-/keyboardevents-areequal-0.2.2.tgz", - "integrity": "sha512-Nv+Kr33T0mEjxR500q+I6IWisOQ0lK1GGOncV0kWE6n4KFmpcu7RUX5/2B0EUtX51Cb0HjZ9VJsSY3u4cBa0kw==", - "dev": true, - "license": "MIT" - }, "node_modules/keyv": { "version": "4.5.4", "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", diff --git a/package.json b/package.json index bb5569da05c..9228a1982f2 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,6 @@ "@types/command-line-args": "5.2.3", "@types/command-line-usage": "5.0.4", "@types/decompress": "4.2.7", - "@types/electron-devtools-installer": "2.0.2", "@types/file-saver": "2.0.7", "@types/jasmine": "5.1.4", "@types/lodash": "4.17.10", @@ -40,8 +39,6 @@ "desm": "1.3.0", "electron": "33.2.0", "electron-builder": "25.1.8", - "electron-debug": "1.5.0", - "electron-devtools-installer": "2.2.3", "electron-log": "4.4.8", "electron-settings": "4.0.4", "electron-updater": "6.3.9", diff --git a/packages/uhk-agent/src/dev-extension.ts b/packages/uhk-agent/src/dev-extension.ts deleted file mode 100644 index fdab310b0be..00000000000 --- a/packages/uhk-agent/src/dev-extension.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Install DevTool extensions when Electron is in development mode - */ -import { app } from 'electron'; -import isDev from 'electron-is-dev'; - -if (isDev) { - - app.once('ready', () => { - - const { default: installExtension, REDUX_DEVTOOLS } = require('electron-devtools-installer'); - - installExtension(REDUX_DEVTOOLS) - .then((name: string) => console.log(`Added Extension: ${name}`)) - .catch((err: any) => console.log('An error occurred: ', err)); - - require('electron-debug')({ showDevTools: true }); - }); - -} diff --git a/packages/uhk-agent/src/electron-main.ts b/packages/uhk-agent/src/electron-main.ts index 32992039f31..32530eb8db2 100644 --- a/packages/uhk-agent/src/electron-main.ts +++ b/packages/uhk-agent/src/electron-main.ts @@ -13,7 +13,7 @@ systemPreferences.getAnimationSettings().prefersReducedMotion = false; import * as path from 'path'; import * as url from 'url'; import { UhkHidDevice, UhkOperations } from 'uhk-usb'; -// import { ElectronDataStorageRepositoryService } from './services/electron-datastorage-repository.service'; + import { getLogOptions } from 'uhk-common'; import { DeviceService } from './services/device.service'; import { ElectronLogService } from './services/logger.service'; @@ -26,8 +26,6 @@ import { setMenu } from './electron-menu'; import { printUsbDevices } from './util'; import { loadWindowState, saveWindowState } from './util/window'; import { getWindowBackgroundColor, options, cliUsage, reenumerateAndExit } from './util'; -// import './dev-extension'; -// require('electron-debug')({ showDevTools: true, enabled: true }); if (options.help) { console.log(cliUsage);