bump electron

This commit is contained in:
smartfrigde 2023-12-28 10:24:35 +01:00
parent da4463beb8
commit 8d34ef23e3
3 changed files with 9 additions and 8 deletions

View file

@ -36,7 +36,7 @@
"@typescript-eslint/eslint-plugin": "^5.59.2", "@typescript-eslint/eslint-plugin": "^5.59.2",
"@typescript-eslint/parser": "^5.59.2", "@typescript-eslint/parser": "^5.59.2",
"copyfiles": "^2.4.1", "copyfiles": "^2.4.1",
"electron": "27.0.2", "electron": "28.1.0",
"electron-builder": "^24.6.3", "electron-builder": "^24.6.3",
"eslint": "^8.40.0", "eslint": "^8.40.0",
"eslint-config-dmitmel": "github:dmitmel/eslint-config-dmitmel", "eslint-config-dmitmel": "github:dmitmel/eslint-config-dmitmel",

View file

@ -41,8 +41,8 @@ devDependencies:
specifier: ^2.4.1 specifier: ^2.4.1
version: 2.4.1 version: 2.4.1
electron: electron:
specifier: 27.0.2 specifier: 28.1.0
version: 27.0.2 version: 28.1.0
electron-builder: electron-builder:
specifier: ^24.6.3 specifier: ^24.6.3
version: 24.6.3 version: 24.6.3
@ -1027,8 +1027,8 @@ packages:
- supports-color - supports-color
dev: true dev: true
/electron@27.0.2: /electron@28.1.0:
resolution: {integrity: sha512-4fbcHQ40ZDlqhr5Pamm+M5BF7ry2lGqjFTWTJ/mrBwuiPWu6xhV/RWgUhKBaLqKNfAaNl3eMxV3Jc82gv6JauQ==} resolution: {integrity: sha512-82Y7o4PSWPn1o/aVwYPsgmBw6Gyf2lVHpaBu3Ef8LrLWXxytg7ZRZr/RtDqEMOzQp3+mcuy3huH84MyjdmP50Q==}
engines: {node: '>= 12.20.55'} engines: {node: '>= 12.20.55'}
hasBin: true hasBin: true
requiresBuild: true requiresBuild: true

View file

@ -6,14 +6,16 @@
apps = {}; apps = {};
ArmCordRPC.listen(async (msg) => { ArmCordRPC.listen(async (msg) => {
console.warn(msg);
if (!Dispatcher) { if (!Dispatcher) {
let wpRequire; let wpRequire;
window.webpackChunkdiscord_app.push([[Symbol()], {}, (x) => (wpRequire = x)]); window.webpackChunkdiscord_app.push([[Symbol()], {}, (x) => (wpRequire = x)]);
window.webpackChunkdiscord_app.pop(); window.webpackChunkdiscord_app.pop();
const modules = wpRequire.c; const modules = wpRequire.c;
lookupAsset = Object.values(modules).find(m => m.exports?.fetchAssetIds).exports.fetchAssetIds; lookupAsset = Object.values(modules).find((m) => m.exports?.fetchAssetIds).exports.fetchAssetIds;
lookupApp = Object.values(modules).find(m => m.exports?.fetchApplicationsRPC).exports.fetchApplicationsRPC; lookupApp = Object.values(modules).find((m) => m.exports?.fetchApplicationsRPC).exports
.fetchApplicationsRPC;
for (const id in modules) { for (const id in modules) {
const mod = modules[id].exports; const mod = modules[id].exports;
@ -51,7 +53,6 @@
const app = apps[appId]; const app = apps[appId];
if (!msg.activity.name) msg.activity.name = app.name; if (!msg.activity.name) msg.activity.name = app.name;
} }
Dispatcher.dispatch({type: "LOCAL_ACTIVITY_UPDATE", ...msg}); // set RPC status Dispatcher.dispatch({type: "LOCAL_ACTIVITY_UPDATE", ...msg}); // set RPC status
}); });
}; };