diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index b96345d..7a0d099 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -112,10 +112,8 @@ body: attributes: label: Debug Logs description: Run vesktop from the command line. Include the relevant command line output here. If there are any lines that seem relevant, try googling them or searching existing issues - value: | - ``` - Replace this text with your crash-log. Do not remove the backticks - ``` + placeholder: Paste your crash-log here. + render: shell validations: required: true diff --git a/meta/dev.vencord.Vesktop.metainfo.xml b/meta/dev.vencord.Vesktop.metainfo.xml index ef52535..5339de6 100644 --- a/meta/dev.vencord.Vesktop.metainfo.xml +++ b/meta/dev.vencord.Vesktop.metainfo.xml @@ -28,6 +28,21 @@ + + https://github.com/Vencord/Vesktop/releases/tag/v1.5.5 + +

What's Changed

+
    +
  • Now remembers your previous Screenshare resolution & FPS
  • +
  • You can now disable the splash screen in Vesktop Settings
  • +
  • Now supports deep links (opening Discord Message Links in Vesktop) by @Covkie
  • +
  • Now supports discord:// uri scheme, allowing it to open things like invites from your Browser even while closed by @Covkie
  • +
  • Added 4k resolution to screenshare by @makindotcc
  • +
  • Fixed some performance issues caused by a recent Discord update
  • +
  • Updated Electron to v34 & chromium to v132, bringing new features and fixes
  • +
+
+
https://github.com/Vencord/Vesktop/releases/tag/v1.5.4 diff --git a/package.json b/package.json index 63eda39..0553f1d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vesktop", - "version": "1.5.4", + "version": "1.5.5", "private": true, "description": "Vesktop is a custom Discord desktop app", "keywords": [], @@ -34,19 +34,19 @@ }, "devDependencies": { "@fal-works/esbuild-plugin-global-externals": "^2.1.2", - "@stylistic/eslint-plugin": "^2.13.0", - "@types/node": "^22.10.7", - "@types/react": "^18.3.12", + "@stylistic/eslint-plugin": "^3.0.1", + "@types/node": "^22.13.1", + "@types/react": "18.3.12", "@vencord/types": "^1.8.4", "dotenv": "^16.4.7", - "electron": "^34.0.1", + "electron": "^34.1.0", "electron-builder": "^25.1.8", "esbuild": "^0.24.2", - "eslint": "^9.18.0", + "eslint": "^9.19.0", "eslint-import-resolver-alias": "^1.1.2", "eslint-plugin-path-alias": "^2.1.0", "eslint-plugin-prettier": "^5.2.3", - "eslint-plugin-simple-header": "^1.2.1", + "eslint-plugin-simple-header": "^1.2.2", "eslint-plugin-simple-import-sort": "^12.1.1", "eslint-plugin-unused-imports": "^4.1.4", "prettier": "^3.4.2", @@ -54,8 +54,8 @@ "tsx": "^4.19.2", "type-fest": "^4.33.0", "typescript": "^5.7.3", - "typescript-eslint": "^8.21.0", - "xml-formatter": "^3.6.3" + "typescript-eslint": "^8.23.0", + "xml-formatter": "^3.6.4" }, "packageManager": "pnpm@9.1.0", "engines": { @@ -73,6 +73,12 @@ "package.json", "LICENSE" ], + "protocols": { + "name": "Discord", + "schemes": [ + "discord" + ] + }, "beforePack": "scripts/build/sandboxFix.js", "linux": { "icon": "build/icon.icns", @@ -113,7 +119,8 @@ "GenericName": "Internet Messenger", "Type": "Application", "Categories": "Network;InstantMessaging;Chat;", - "Keywords": "discord;vencord;electron;chat;" + "Keywords": "discord;vencord;electron;chat;", + "MimeType": "x-scheme-handler/discord" } }, "mac": { diff --git a/patches/arrpc@3.5.0.patch b/patches/arrpc@3.5.0.patch index 8dfd9f6..baae84c 100644 --- a/patches/arrpc@3.5.0.patch +++ b/patches/arrpc@3.5.0.patch @@ -1,14 +1,27 @@ diff --git a/src/process/index.js b/src/process/index.js -index 97ea6514b54dd9c5df588c78f0397d31ab5f882a..c2bdbd6aaa5611bc6ff1d993beeb380b1f5ec575 100644 +index 389b0845256a34b4536d6da99edb00d17f13a6b4..f17a0ac687e9110ebfd33cb91fd2f6250d318643 100644 --- a/src/process/index.js +++ b/src/process/index.js -@@ -5,8 +5,7 @@ import fs from 'node:fs'; +@@ -5,8 +5,20 @@ import fs from 'node:fs'; import { dirname, join } from 'path'; import { fileURLToPath } from 'url'; -const __dirname = dirname(fileURLToPath(import.meta.url)); -const DetectableDB = JSON.parse(fs.readFileSync(join(__dirname, 'detectable.json'), 'utf8')); +const DetectableDB = require('./detectable.json'); ++DetectableDB.push( ++ { ++ aliases: ["Obs"], ++ executables: [ ++ { is_launcher: false, name: "obs", os: "linux" }, ++ { is_launcher: false, name: "obs.exe", os: "win32" }, ++ { is_launcher: false, name: "obs.app", os: "darwin" } ++ ], ++ hook: true, ++ id: "STREAMERMODE", ++ name: "OBS" ++ } ++); import * as Natives from './native/index.js'; const Native = Natives[process.platform]; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cef6eb7..a97c567 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -6,7 +6,7 @@ settings: patchedDependencies: arrpc@3.5.0: - hash: biyukfa6dww2wxujy4eyvkhrti + hash: sczviclcirm3d4e2soabfniygq path: patches/arrpc@3.5.0.patch importers: @@ -15,7 +15,7 @@ importers: dependencies: arrpc: specifier: github:OpenAsar/arrpc#2234e9c9111f4c42ebcc3aa6a2215bfd979eef77 - version: https://codeload.github.com/OpenAsar/arrpc/tar.gz/2234e9c9111f4c42ebcc3aa6a2215bfd979eef77(patch_hash=biyukfa6dww2wxujy4eyvkhrti) + version: https://codeload.github.com/OpenAsar/arrpc/tar.gz/2234e9c9111f4c42ebcc3aa6a2215bfd979eef77(patch_hash=sczviclcirm3d4e2soabfniygq) electron-updater: specifier: ^6.3.9 version: 6.3.9 @@ -28,14 +28,14 @@ importers: specifier: ^2.1.2 version: 2.1.2 '@stylistic/eslint-plugin': - specifier: ^2.13.0 - version: 2.13.0(eslint@9.18.0)(typescript@5.7.3) + specifier: ^3.0.1 + version: 3.0.1(eslint@9.19.0)(typescript@5.7.3) '@types/node': - specifier: ^22.10.7 - version: 22.10.7 + specifier: ^22.13.1 + version: 22.13.1 '@types/react': - specifier: ^18.3.12 - version: 18.3.18 + specifier: 18.3.12 + version: 18.3.12 '@vencord/types': specifier: ^1.8.4 version: 1.8.4 @@ -43,8 +43,8 @@ importers: specifier: ^16.4.7 version: 16.4.7 electron: - specifier: ^34.0.1 - version: 34.0.1 + specifier: ^34.1.0 + version: 34.1.0 electron-builder: specifier: ^25.1.8 version: 25.1.8(electron-builder-squirrel-windows@25.1.8(dmg-builder@25.1.8)) @@ -52,26 +52,26 @@ importers: specifier: ^0.24.2 version: 0.24.2 eslint: - specifier: ^9.18.0 - version: 9.18.0 + specifier: ^9.19.0 + version: 9.19.0 eslint-import-resolver-alias: specifier: ^1.1.2 - version: 1.1.2(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.21.0(eslint@9.18.0)(typescript@5.7.3))(eslint@9.18.0)) + version: 1.1.2(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.23.0(eslint@9.19.0)(typescript@5.7.3))(eslint@9.19.0)) eslint-plugin-path-alias: specifier: ^2.1.0 - version: 2.1.0(eslint@9.18.0) + version: 2.1.0(eslint@9.19.0) eslint-plugin-prettier: specifier: ^5.2.3 - version: 5.2.3(eslint-config-prettier@10.0.1(eslint@9.18.0))(eslint@9.18.0)(prettier@3.4.2) + version: 5.2.3(eslint-config-prettier@10.0.1(eslint@9.19.0))(eslint@9.19.0)(prettier@3.4.2) eslint-plugin-simple-header: - specifier: ^1.2.1 - version: 1.2.1(eslint@9.18.0) + specifier: ^1.2.2 + version: 1.2.2(eslint@9.19.0) eslint-plugin-simple-import-sort: specifier: ^12.1.1 - version: 12.1.1(eslint@9.18.0) + version: 12.1.1(eslint@9.19.0) eslint-plugin-unused-imports: specifier: ^4.1.4 - version: 4.1.4(@typescript-eslint/eslint-plugin@8.21.0(@typescript-eslint/parser@8.21.0(eslint@9.18.0)(typescript@5.7.3))(eslint@9.18.0)(typescript@5.7.3))(eslint@9.18.0) + version: 4.1.4(@typescript-eslint/eslint-plugin@8.23.0(@typescript-eslint/parser@8.23.0(eslint@9.19.0)(typescript@5.7.3))(eslint@9.19.0)(typescript@5.7.3))(eslint@9.19.0) prettier: specifier: ^3.4.2 version: 3.4.2 @@ -88,11 +88,11 @@ importers: specifier: ^5.7.3 version: 5.7.3 typescript-eslint: - specifier: ^8.21.0 - version: 8.21.0(eslint@9.18.0)(typescript@5.7.3) + specifier: ^8.23.0 + version: 8.23.0(eslint@9.19.0)(typescript@5.7.3) xml-formatter: - specifier: ^3.6.3 - version: 3.6.3 + specifier: ^3.6.4 + version: 3.6.4 packages: @@ -434,8 +434,8 @@ packages: resolution: {integrity: sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - '@eslint/config-array@0.19.1': - resolution: {integrity: sha512-fo6Mtm5mWyKjA/Chy1BYTdn5mGJoDNjC7C64ug20ADsRDGrA85bN3uK3MaKbeRkRuuIEAR5N33Jr1pbm411/PA==} + '@eslint/config-array@0.19.2': + resolution: {integrity: sha512-GNKqxfHG2ySmJOBSHg7LxeUx4xpuCoFjacmlCoYWEbaPXLwvfIjixRI12xCQZeULksQb23uiA8F40w5TojpV7w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@eslint/core@0.10.0': @@ -446,12 +446,12 @@ packages: resolution: {integrity: sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/js@9.18.0': - resolution: {integrity: sha512-fK6L7rxcq6/z+AaQMtiFTkvbHkBLNlwyRxHpKawP0x3u9+NC6MQTnFW+AdpwC6gfHTW0051cokQgtTN2FqlxQA==} + '@eslint/js@9.19.0': + resolution: {integrity: sha512-rbq9/g38qjfqFLOVPvwjIvFFdNziEC5S65jmjPw5r6A//QH+W91akh9irMwjDN8zKUTak6W9EsAv4m/7Wnw0UQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/object-schema@2.1.5': - resolution: {integrity: sha512-o0bhxnL89h5Bae5T318nFoFzGy+YE5i/gGkoPAgkmTVdRKTiv3p8JHevPiPaMwoloKfEiiaHlawCqaZMqRm+XQ==} + '@eslint/object-schema@2.1.6': + resolution: {integrity: sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@eslint/plugin-kit@0.2.5': @@ -532,8 +532,8 @@ packages: resolution: {integrity: sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==} engines: {node: '>=10'} - '@stylistic/eslint-plugin@2.13.0': - resolution: {integrity: sha512-RnO1SaiCFHn666wNz2QfZEFxvmiNRqhzaMXHXxXXKt+MEP7aajlPxUSMIQpKAaJfverpovEYqjBOXDq6dDcaOQ==} + '@stylistic/eslint-plugin@3.0.1': + resolution: {integrity: sha512-rQ3tcT5N2cynofJfbjUsnL4seoewTaOVBLyUEwtNldo7iNMPo3h/GUQk+Cl3iHEWwRxjq2wuH6q0FufQrbVL1A==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: '>=8.40.0' @@ -570,20 +570,20 @@ packages: '@types/keyv@3.1.4': resolution: {integrity: sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==} - '@types/lodash@4.17.14': - resolution: {integrity: sha512-jsxagdikDiDBeIRaPYtArcT8my4tN1og7MtMRquFT3XNA6axxyHDRUemqDz/taRDdOUn0GnGHRCuff4q48sW9A==} + '@types/lodash@4.17.15': + resolution: {integrity: sha512-w/P33JFeySuhN6JLkysYUK2gEmy9kHHFN7E8ro0tkfmlDOgxBDzWEZ/J8cWA+fHqFevpswDTFZnDx+R9lbL6xw==} '@types/ms@2.1.0': resolution: {integrity: sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==} - '@types/node@18.19.71': - resolution: {integrity: sha512-evXpcgtZm8FY4jqBSN8+DmOTcVkkvTmAayeo4Wf3m1xAruyVGzGuDh/Fb/WWX2yLItUiho42ozyJjB0dw//Tkw==} + '@types/node@18.19.75': + resolution: {integrity: sha512-UIksWtThob6ZVSyxcOqCLOUNg/dyO1Qvx4McgeuhrEtHTLFTf7BBhEazaE4K806FGTPtzd/2sE90qn4fVr7cyw==} - '@types/node@20.17.14': - resolution: {integrity: sha512-w6qdYetNL5KRBiSClK/KWai+2IMEJuAj+EujKCumalFOwXtvOXaEan9AuwcRID2IcOIAWSIfR495hBtgKlx2zg==} + '@types/node@20.17.17': + resolution: {integrity: sha512-/WndGO4kIfMicEQLTi/mDANUu/iVUhT7KboZPdEqqHQ4aTS+3qT3U5gIqWDFV+XouorjfgGqvKILJeHhuQgFYg==} - '@types/node@22.10.7': - resolution: {integrity: sha512-V09KvXxFiutGp6B7XkpaDXlNadZxrzajcY50EuoLIpQ6WWYCSvf19lVIazzfIzQvhUN2HjX12spLojTnhuKlGg==} + '@types/node@22.13.1': + resolution: {integrity: sha512-jK8uzQlrvXqEU91UxiK5J7pKHyzgnI1Qnl0QDHIgVGuolJhRb9EEl28Cj9b3rGR8B2lhFCtvIm5os8lFnO/1Ew==} '@types/plist@3.0.5': resolution: {integrity: sha512-E6OCaRmAe4WDmWNsL/9RMqdkkzDCY1etutkflWk4c+AcjDU07Pcz1fQwTX0TQz+Pxqn9i4L1TU3UFpjnrcDgxA==} @@ -599,8 +599,8 @@ packages: '@types/react@17.0.2': resolution: {integrity: sha512-Xt40xQsrkdvjn1EyWe1Bc0dJLcil/9x2vAuW7ya+PuQip4UYUaXyhzWmAbwRsdMgwOFHpfp7/FFZebDU6Y8VHA==} - '@types/react@18.3.18': - resolution: {integrity: sha512-t4yC+vtgnkYjNSKlFx1jkAhH8LgTo2N/7Qvi83kdEaUtMDiwpbLAktKDaAMlRcJ5eSxZkH74eEGt1ky31d7kfQ==} + '@types/react@18.3.12': + resolution: {integrity: sha512-D2wOSq/d6Agt28q7rSI3jhU7G6aiuzljDGZ2hTZHIkrTLUI+AF3WMeKkEZ9nN2fkBAlcktT6vcZjDFiIhMYEQw==} '@types/responselike@1.0.3': resolution: {integrity: sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw==} @@ -611,51 +611,51 @@ packages: '@types/yauzl@2.10.3': resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==} - '@typescript-eslint/eslint-plugin@8.21.0': - resolution: {integrity: sha512-eTH+UOR4I7WbdQnG4Z48ebIA6Bgi7WO8HvFEneeYBxG8qCOYgTOFPSg6ek9ITIDvGjDQzWHcoWHCDO2biByNzA==} + '@typescript-eslint/eslint-plugin@8.23.0': + resolution: {integrity: sha512-vBz65tJgRrA1Q5gWlRfvoH+w943dq9K1p1yDBY2pc+a1nbBLZp7fB9+Hk8DaALUbzjqlMfgaqlVPT1REJdkt/w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.8.0' - '@typescript-eslint/parser@8.21.0': - resolution: {integrity: sha512-Wy+/sdEH9kI3w9civgACwabHbKl+qIOu0uFZ9IMKzX3Jpv9og0ZBJrZExGrPpFAY7rWsXuxs5e7CPPP17A4eYA==} + '@typescript-eslint/parser@8.23.0': + resolution: {integrity: sha512-h2lUByouOXFAlMec2mILeELUbME5SZRN/7R9Cw2RD2lRQQY08MWMM+PmVVKKJNK1aIwqTo9t/0CvOxwPbRIE2Q==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.8.0' - '@typescript-eslint/scope-manager@8.21.0': - resolution: {integrity: sha512-G3IBKz0/0IPfdeGRMbp+4rbjfSSdnGkXsM/pFZA8zM9t9klXDnB/YnKOBQ0GoPmoROa4bCq2NeHgJa5ydsQ4mA==} + '@typescript-eslint/scope-manager@8.23.0': + resolution: {integrity: sha512-OGqo7+dXHqI7Hfm+WqkZjKjsiRtFUQHPdGMXzk5mYXhJUedO7e/Y7i8AK3MyLMgZR93TX4bIzYrfyVjLC+0VSw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/type-utils@8.21.0': - resolution: {integrity: sha512-95OsL6J2BtzoBxHicoXHxgk3z+9P3BEcQTpBKriqiYzLKnM2DeSqs+sndMKdamU8FosiadQFT3D+BSL9EKnAJQ==} + '@typescript-eslint/type-utils@8.23.0': + resolution: {integrity: sha512-iIuLdYpQWZKbiH+RkCGc6iu+VwscP5rCtQ1lyQ7TYuKLrcZoeJVpcLiG8DliXVkUxirW/PWlmS+d6yD51L9jvA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.8.0' - '@typescript-eslint/types@8.21.0': - resolution: {integrity: sha512-PAL6LUuQwotLW2a8VsySDBwYMm129vFm4tMVlylzdoTybTHaAi0oBp7Ac6LhSrHHOdLM3efH+nAR6hAWoMF89A==} + '@typescript-eslint/types@8.23.0': + resolution: {integrity: sha512-1sK4ILJbCmZOTt9k4vkoulT6/y5CHJ1qUYxqpF1K/DBAd8+ZUL4LlSCxOssuH5m4rUaaN0uS0HlVPvd45zjduQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/typescript-estree@8.21.0': - resolution: {integrity: sha512-x+aeKh/AjAArSauz0GiQZsjT8ciadNMHdkUSwBB9Z6PrKc/4knM4g3UfHml6oDJmKC88a6//cdxnO/+P2LkMcg==} + '@typescript-eslint/typescript-estree@8.23.0': + resolution: {integrity: sha512-LcqzfipsB8RTvH8FX24W4UUFk1bl+0yTOf9ZA08XngFwMg4Kj8A+9hwz8Cr/ZS4KwHrmo9PJiLZkOt49vPnuvQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <5.8.0' - '@typescript-eslint/utils@8.21.0': - resolution: {integrity: sha512-xcXBfcq0Kaxgj7dwejMbFyq7IOHgpNMtVuDveK7w3ZGwG9owKzhALVwKpTF2yrZmEwl9SWdetf3fxNzJQaVuxw==} + '@typescript-eslint/utils@8.23.0': + resolution: {integrity: sha512-uB/+PSo6Exu02b5ZEiVtmY6RVYO7YU5xqgzTIVZwTHvvK3HsL8tZZHFaTLFtRG3CsV4A5mhOv+NZx5BlhXPyIA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.8.0' - '@typescript-eslint/visitor-keys@8.21.0': - resolution: {integrity: sha512-BkLMNpdV6prozk8LlyK/SOoWLmUFi+ZD+pcqti9ILCbVvHGk1ui1g4jJOc2WDLaeExz2qWwojxlPce5PljcT3w==} + '@typescript-eslint/visitor-keys@8.23.0': + resolution: {integrity: sha512-oWWhcWDLwDfu++BGTZcmXWqpwtkwb5o7fxUIGksMQQDSdPW9prsSnfIOZMlsj4vBOSrcnjIUZMiIjODgGosFhQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@vencord/types@1.8.4': @@ -813,6 +813,10 @@ packages: resolution: {integrity: sha512-NW2cX8m1Q7KPA7a5M2ULQeZ2wR5qI5PAbw5L0UOMxdioVk9PMZ0h1TmyZEkPYrCvYjDlFICusOu1dlEKAAeXBw==} engines: {node: '>=0.12.0'} + async-function@1.0.0: + resolution: {integrity: sha512-hsU18Ae8CDTR6Kgu9DYf0EbCr/a5iGL0rytQDobUcdpYOKokk8LEjVphnXkDkgpi0wYVsqrXuP0bZxJaTqdgoA==} + engines: {node: '>= 0.4'} + async@3.2.6: resolution: {integrity: sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==} @@ -1185,8 +1189,8 @@ packages: electron-updater@6.3.9: resolution: {integrity: sha512-2PJNONi+iBidkoC5D1nzT9XqsE8Q1X28Fn6xRQhO3YX8qRRyJ3mkV4F1aQsuRnYPqq6Hw+E51y27W75WgDoofw==} - electron@34.0.1: - resolution: {integrity: sha512-aArw5tAM80i3CKwEREnyZSM1SkARf5Jd1yBMTIdOL4pB1M+p/oDeyWSFI9Dl+vujyfJKiK4SS5+j19wna1onMw==} + electron@34.1.0: + resolution: {integrity: sha512-ZUid8XrGPA0dfes97PPADc8ecWOUX/qYRNp1glze9coZLEYc+PsMvgjVDCHSvjfHfiI+V3unwngSVpBouX71YQ==} engines: {node: '>= 12.20.55'} hasBin: true @@ -1322,8 +1326,8 @@ packages: eslint-config-prettier: optional: true - eslint-plugin-simple-header@1.2.1: - resolution: {integrity: sha512-l9eEOpBkd4T6yVE09WADLVPU6eKHjQ7QjowMChsbYwsge+98NxyIlqvYpQQJWVxakgW7uooFGNVEFdFWzEMcVg==} + eslint-plugin-simple-header@1.2.2: + resolution: {integrity: sha512-LO4PejdYPraY5GKd9hutst82yAAL21MGIiFbHKIpoPDOWOW8zz3ZaDdQB3vx/yQGjWd5GifyQ/AGfNkr5c9kPw==} peerDependencies: eslint: '>=8.41.0' @@ -1353,8 +1357,8 @@ packages: resolution: {integrity: sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - eslint@9.18.0: - resolution: {integrity: sha512-+waTfRWQlSbpt3KWE+CjrPPYnbq9kfZIYUqapc0uBXyjTp8aYXZDsUH16m39Ryq3NjAVP4tjuF7KaukeqoCoaA==} + eslint@9.19.0: + resolution: {integrity: sha512-ug92j0LepKlbbEv6hD911THhoRHmbdXt2gX+VDABAW/Ir7D3nqKdv5Pf5vtlyY6HQMTEP2skXY43ueqTCWssEA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} hasBin: true peerDependencies: @@ -1423,8 +1427,8 @@ packages: fast-levenshtein@2.0.6: resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} - fastq@1.18.0: - resolution: {integrity: sha512-QKHXPW0hD8g4UET03SdOdunzSouc9N4AuHdsX8XNcTsuz+yYFILVNIX4l9yHABMhiEI9Db0JTTIpu0wB+Y1QQw==} + fastq@1.19.0: + resolution: {integrity: sha512-7SFSRCNjBQIZH/xZR3iy5iQYR8aGBE0h3VG6/cwlbrpdciNYBMotQav8c1XI3HjHH+NikUpP53nPdlZSdWmFzA==} fd-slicer@1.1.0: resolution: {integrity: sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==} @@ -1468,8 +1472,9 @@ packages: debug: optional: true - for-each@0.3.3: - resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} + for-each@0.3.4: + resolution: {integrity: sha512-kKaIINnFpzW6ffJNDjjyjrk21BkDx38c0xa/klsT8VzLCaMEefv4ZTacrcVR4DmgTeBra++jMDAfS/tS799YDw==} + engines: {node: '>= 0.4'} for-in@1.0.2: resolution: {integrity: sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==} @@ -1711,8 +1716,8 @@ packages: resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} engines: {node: '>= 4'} - import-fresh@3.3.0: - resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} + import-fresh@3.3.1: + resolution: {integrity: sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==} engines: {node: '>=6'} imurmurhash@0.1.4: @@ -1752,16 +1757,16 @@ packages: resolution: {integrity: sha512-DDfANUiiG2wC1qawP66qlTugJeL5HyzMpfr8lLK+jMQirGzNod0B12cFB/9q838Ru27sBwfw78/rdoU7RERz6A==} engines: {node: '>= 0.4'} - is-async-function@2.1.0: - resolution: {integrity: sha512-GExz9MtyhlZyXYLxzlJRj5WUCE661zhDa1Yna52CN57AJsymh+DvXXjyveSioqSRdxvUrdKdvqB1b5cVKsNpWQ==} + is-async-function@2.1.1: + resolution: {integrity: sha512-9dgM/cZBnNvjzaMYHVoxxfPj2QXt22Ev7SuuPrs+xav0ukGB0S6d4ydZdEiM48kLx5kDV+QBPrpVnFyefL8kkQ==} engines: {node: '>= 0.4'} is-bigint@1.1.0: resolution: {integrity: sha512-n4ZT37wG78iz03xPRKJrHTdZbe3IicyucEtdRsV5yglwc3GyUfbAfpSeD0FJ41NbUNSt5wbhqfp1fS+BgnvDFQ==} engines: {node: '>= 0.4'} - is-boolean-object@1.2.1: - resolution: {integrity: sha512-l9qO6eFlUETHtuihLcYOaLKByJ1f+N4kthcU9YjHy3N+B3hWv0y/2Nd0mu/7lTFnRQHTrSdXF50HQ3bl5fEnng==} + is-boolean-object@1.2.2: + resolution: {integrity: sha512-wa56o2/ElJMYqjCjGkXri7it5FbebW5usLw/nPmCMs5DeZ7eziSYZhSmPRn0txqeW4LnAmQQU7FgqLpsEFKM4A==} engines: {node: '>= 0.4'} is-buffer@1.1.6: @@ -1886,8 +1891,8 @@ packages: resolution: {integrity: sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==} engines: {node: '>= 0.4'} - is-weakref@1.1.0: - resolution: {integrity: sha512-SXM8Nwyys6nT5WP6pltOwKytLV7FqQ4UiibxVmW+EIosHcmCqkkjViTb5SNssDlkCiEYRP1/pdWUKVvZBmsR2Q==} + is-weakref@1.1.1: + resolution: {integrity: sha512-6i9mGWSlqzNMEqpCp93KwRS1uUOodk2OJ6b+sq7ZPDSy2WuI5NFIxp/254TytR8ftefexkWn5xNiHUNpPOfSew==} engines: {node: '>= 0.4'} is-weakset@2.0.4: @@ -2009,6 +2014,7 @@ packages: lodash.isequal@4.5.0: resolution: {integrity: sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==} + deprecated: This package is deprecated. Use require('node:util').isDeepStrictEqual instead. lodash.isplainobject@4.0.6: resolution: {integrity: sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==} @@ -2180,8 +2186,8 @@ packages: resolution: {integrity: sha512-myRT3DiWPHqho5PrJaIRyaMv2kgYf0mUVgBNOYMuCH5Ki1yEiQaf/ZJuQ62nvpc44wL5WDbTX7yGJi1Neevw8w==} engines: {node: '>= 0.6'} - node-abi@3.73.0: - resolution: {integrity: sha512-z8iYzQGBu35ZkTQ9mtR8RqugJZ9RCLn8fv3d7LsgDBzOijGQP3RdKTX4LA7LXw03ZhU5z0l4xfhIMgSES31+cg==} + node-abi@3.74.0: + resolution: {integrity: sha512-c5XK0MjkGBrQPGYG24GBADZud0NCbznxNx0ZkS+ebUTrmV1qTDxPxSL8zEAPURXSbLRWVexxmP4986BziahL5w==} engines: {node: '>=10'} node-addon-api@1.7.2: @@ -2224,8 +2230,8 @@ packages: resolution: {integrity: sha512-79LYn6VAb63zgtmAteVOWo9Vdj71ZVBy3Pbse+VqxDpEP83XuujMrGqHIwAXJ5I/aM0zU7dIyIAhifVTPrNItQ==} engines: {node: '>=0.10.0'} - object-inspect@1.13.3: - resolution: {integrity: sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA==} + object-inspect@1.13.4: + resolution: {integrity: sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==} engines: {node: '>= 0.4'} object-keys@1.1.1: @@ -2531,8 +2537,8 @@ packages: resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} hasBin: true - semver@7.6.3: - resolution: {integrity: sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==} + semver@7.7.1: + resolution: {integrity: sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==} engines: {node: '>=10'} hasBin: true @@ -2753,8 +2759,8 @@ packages: truncate-utf8-bytes@1.0.2: resolution: {integrity: sha512-95Pu1QXQvruGEhv62XCMO3Mm90GscOCClvrIUwCM0PYOXK3kaF3l3sIHxx71ThJfcbM2O5Au6SO3AWCSEfW4mQ==} - ts-api-utils@2.0.0: - resolution: {integrity: sha512-xCt/TOAc+EOHS1XPnijD3/yzpH6qg2xppZO1YDqGoVsNXfQfzHpOdNuXwrwOU8u4ITXJyDCTyt8w5g1sZv9ynQ==} + ts-api-utils@2.0.1: + resolution: {integrity: sha512-dnlgjFSVetynI8nzgJ+qF62efpglpWRk8isUEWZGWlJYySCTD6aKvbUDu+zbPeDakk3bg5H4XpitHukgfL1m9w==} engines: {node: '>=18.12'} peerDependencies: typescript: '>=4.8.4' @@ -2802,8 +2808,8 @@ packages: resolution: {integrity: sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg==} engines: {node: '>= 0.4'} - typescript-eslint@8.21.0: - resolution: {integrity: sha512-txEKYY4XMKwPXxNkN8+AxAdX6iIJAPiJbHE/FpQccs/sxw8Lf26kqwC3cn0xkHlW8kEbLhkhCsjWuMveaY9Rxw==} + typescript-eslint@8.23.0: + resolution: {integrity: sha512-/LBRo3HrXr5LxmrdYSOCvoAMm7p2jNizNfbIpCgvG4HMsnoprRUOce/+8VJ9BDYWW68rqIENE/haVLWPeFZBVQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -2933,8 +2939,8 @@ packages: utf-8-validate: optional: true - xml-formatter@3.6.3: - resolution: {integrity: sha512-++x1TlRO1FRlQ82AZ4WnoCSufaI/PT/sycn4K8nRl4gnrNC1uYY2VV/67aALZ2m0Q4Q/BLj/L69K360Itw9NNg==} + xml-formatter@3.6.4: + resolution: {integrity: sha512-vkvTNw4u9mp72lMmJHw771NE9EJLX0kfwIcP+ZEo9eJ6HmotX23vmykyROyIQ9Y3a+ckdUdhxIE2ZO66rYuPrg==} engines: {node: '>= 16'} xml-parser-xo@4.1.3: @@ -3027,12 +3033,12 @@ snapshots: detect-libc: 2.0.3 fs-extra: 10.1.0 got: 11.8.6 - node-abi: 3.73.0 + node-abi: 3.74.0 node-api-version: 0.2.0 node-gyp: 9.4.1 ora: 5.4.1 read-binary-file-arch: 1.0.6 - semver: 7.6.3 + semver: 7.7.1 tar: 6.2.1 yargs: 17.7.2 transitivePeerDependencies: @@ -3198,16 +3204,16 @@ snapshots: '@esbuild/win32-x64@0.24.2': optional: true - '@eslint-community/eslint-utils@4.4.1(eslint@9.18.0)': + '@eslint-community/eslint-utils@4.4.1(eslint@9.19.0)': dependencies: - eslint: 9.18.0 + eslint: 9.19.0 eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.12.1': {} - '@eslint/config-array@0.19.1': + '@eslint/config-array@0.19.2': dependencies: - '@eslint/object-schema': 2.1.5 + '@eslint/object-schema': 2.1.6 debug: 4.4.0 minimatch: 3.1.2 transitivePeerDependencies: @@ -3224,16 +3230,16 @@ snapshots: espree: 10.3.0 globals: 14.0.0 ignore: 5.3.2 - import-fresh: 3.3.0 + import-fresh: 3.3.1 js-yaml: 4.1.0 minimatch: 3.1.2 strip-json-comments: 3.1.1 transitivePeerDependencies: - supports-color - '@eslint/js@9.18.0': {} + '@eslint/js@9.19.0': {} - '@eslint/object-schema@2.1.5': {} + '@eslint/object-schema@2.1.6': {} '@eslint/plugin-kit@0.2.5': dependencies: @@ -3289,12 +3295,12 @@ snapshots: '@nodelib/fs.walk@1.2.8': dependencies: '@nodelib/fs.scandir': 2.1.5 - fastq: 1.18.0 + fastq: 1.19.0 '@npmcli/fs@2.1.2': dependencies: '@gar/promisify': 1.1.3 - semver: 7.6.3 + semver: 7.7.1 '@npmcli/move-file@2.0.1': dependencies: @@ -3310,10 +3316,10 @@ snapshots: '@sindresorhus/is@4.6.0': {} - '@stylistic/eslint-plugin@2.13.0(eslint@9.18.0)(typescript@5.7.3)': + '@stylistic/eslint-plugin@3.0.1(eslint@9.19.0)(typescript@5.7.3)': dependencies: - '@typescript-eslint/utils': 8.21.0(eslint@9.18.0)(typescript@5.7.3) - eslint: 9.18.0 + '@typescript-eslint/utils': 8.23.0(eslint@9.19.0)(typescript@5.7.3) + eslint: 9.19.0 eslint-visitor-keys: 4.2.0 espree: 10.3.0 estraverse: 5.3.0 @@ -3332,7 +3338,7 @@ snapshots: dependencies: '@types/http-cache-semantics': 4.0.4 '@types/keyv': 3.1.4 - '@types/node': 22.10.7 + '@types/node': 22.13.1 '@types/responselike': 1.0.3 '@types/debug@4.1.12': @@ -3343,7 +3349,7 @@ snapshots: '@types/fs-extra@9.0.13': dependencies: - '@types/node': 22.10.7 + '@types/node': 22.13.1 '@types/http-cache-semantics@4.0.4': {} @@ -3353,141 +3359,141 @@ snapshots: '@types/keyv@3.1.4': dependencies: - '@types/node': 22.10.7 + '@types/node': 22.13.1 - '@types/lodash@4.17.14': {} + '@types/lodash@4.17.15': {} '@types/ms@2.1.0': {} - '@types/node@18.19.71': + '@types/node@18.19.75': dependencies: undici-types: 5.26.5 - '@types/node@20.17.14': + '@types/node@20.17.17': dependencies: undici-types: 6.19.8 - '@types/node@22.10.7': + '@types/node@22.13.1': dependencies: undici-types: 6.20.0 '@types/plist@3.0.5': dependencies: - '@types/node': 22.10.7 + '@types/node': 22.13.1 xmlbuilder: 15.1.1 optional: true '@types/prop-types@15.7.14': {} - '@types/react-dom@18.3.5(@types/react@18.3.18)': + '@types/react-dom@18.3.5(@types/react@18.3.12)': dependencies: - '@types/react': 18.3.18 + '@types/react': 18.3.12 '@types/react@17.0.2': dependencies: '@types/prop-types': 15.7.14 csstype: 3.1.3 - '@types/react@18.3.18': + '@types/react@18.3.12': dependencies: '@types/prop-types': 15.7.14 csstype: 3.1.3 '@types/responselike@1.0.3': dependencies: - '@types/node': 22.10.7 + '@types/node': 22.13.1 '@types/verror@1.10.10': optional: true '@types/yauzl@2.10.3': dependencies: - '@types/node': 22.10.7 + '@types/node': 22.13.1 optional: true - '@typescript-eslint/eslint-plugin@8.21.0(@typescript-eslint/parser@8.21.0(eslint@9.18.0)(typescript@5.7.3))(eslint@9.18.0)(typescript@5.7.3)': + '@typescript-eslint/eslint-plugin@8.23.0(@typescript-eslint/parser@8.23.0(eslint@9.19.0)(typescript@5.7.3))(eslint@9.19.0)(typescript@5.7.3)': dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.21.0(eslint@9.18.0)(typescript@5.7.3) - '@typescript-eslint/scope-manager': 8.21.0 - '@typescript-eslint/type-utils': 8.21.0(eslint@9.18.0)(typescript@5.7.3) - '@typescript-eslint/utils': 8.21.0(eslint@9.18.0)(typescript@5.7.3) - '@typescript-eslint/visitor-keys': 8.21.0 - eslint: 9.18.0 + '@typescript-eslint/parser': 8.23.0(eslint@9.19.0)(typescript@5.7.3) + '@typescript-eslint/scope-manager': 8.23.0 + '@typescript-eslint/type-utils': 8.23.0(eslint@9.19.0)(typescript@5.7.3) + '@typescript-eslint/utils': 8.23.0(eslint@9.19.0)(typescript@5.7.3) + '@typescript-eslint/visitor-keys': 8.23.0 + eslint: 9.19.0 graphemer: 1.4.0 ignore: 5.3.2 natural-compare: 1.4.0 - ts-api-utils: 2.0.0(typescript@5.7.3) + ts-api-utils: 2.0.1(typescript@5.7.3) typescript: 5.7.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.21.0(eslint@9.18.0)(typescript@5.7.3)': + '@typescript-eslint/parser@8.23.0(eslint@9.19.0)(typescript@5.7.3)': dependencies: - '@typescript-eslint/scope-manager': 8.21.0 - '@typescript-eslint/types': 8.21.0 - '@typescript-eslint/typescript-estree': 8.21.0(typescript@5.7.3) - '@typescript-eslint/visitor-keys': 8.21.0 + '@typescript-eslint/scope-manager': 8.23.0 + '@typescript-eslint/types': 8.23.0 + '@typescript-eslint/typescript-estree': 8.23.0(typescript@5.7.3) + '@typescript-eslint/visitor-keys': 8.23.0 debug: 4.4.0 - eslint: 9.18.0 + eslint: 9.19.0 typescript: 5.7.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/scope-manager@8.21.0': + '@typescript-eslint/scope-manager@8.23.0': dependencies: - '@typescript-eslint/types': 8.21.0 - '@typescript-eslint/visitor-keys': 8.21.0 + '@typescript-eslint/types': 8.23.0 + '@typescript-eslint/visitor-keys': 8.23.0 - '@typescript-eslint/type-utils@8.21.0(eslint@9.18.0)(typescript@5.7.3)': + '@typescript-eslint/type-utils@8.23.0(eslint@9.19.0)(typescript@5.7.3)': dependencies: - '@typescript-eslint/typescript-estree': 8.21.0(typescript@5.7.3) - '@typescript-eslint/utils': 8.21.0(eslint@9.18.0)(typescript@5.7.3) + '@typescript-eslint/typescript-estree': 8.23.0(typescript@5.7.3) + '@typescript-eslint/utils': 8.23.0(eslint@9.19.0)(typescript@5.7.3) debug: 4.4.0 - eslint: 9.18.0 - ts-api-utils: 2.0.0(typescript@5.7.3) + eslint: 9.19.0 + ts-api-utils: 2.0.1(typescript@5.7.3) typescript: 5.7.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/types@8.21.0': {} + '@typescript-eslint/types@8.23.0': {} - '@typescript-eslint/typescript-estree@8.21.0(typescript@5.7.3)': + '@typescript-eslint/typescript-estree@8.23.0(typescript@5.7.3)': dependencies: - '@typescript-eslint/types': 8.21.0 - '@typescript-eslint/visitor-keys': 8.21.0 + '@typescript-eslint/types': 8.23.0 + '@typescript-eslint/visitor-keys': 8.23.0 debug: 4.4.0 fast-glob: 3.3.3 is-glob: 4.0.3 minimatch: 9.0.5 - semver: 7.6.3 - ts-api-utils: 2.0.0(typescript@5.7.3) + semver: 7.7.1 + ts-api-utils: 2.0.1(typescript@5.7.3) typescript: 5.7.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.21.0(eslint@9.18.0)(typescript@5.7.3)': + '@typescript-eslint/utils@8.23.0(eslint@9.19.0)(typescript@5.7.3)': dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.18.0) - '@typescript-eslint/scope-manager': 8.21.0 - '@typescript-eslint/types': 8.21.0 - '@typescript-eslint/typescript-estree': 8.21.0(typescript@5.7.3) - eslint: 9.18.0 + '@eslint-community/eslint-utils': 4.4.1(eslint@9.19.0) + '@typescript-eslint/scope-manager': 8.23.0 + '@typescript-eslint/types': 8.23.0 + '@typescript-eslint/typescript-estree': 8.23.0(typescript@5.7.3) + eslint: 9.19.0 typescript: 5.7.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/visitor-keys@8.21.0': + '@typescript-eslint/visitor-keys@8.23.0': dependencies: - '@typescript-eslint/types': 8.21.0 + '@typescript-eslint/types': 8.23.0 eslint-visitor-keys: 4.2.0 '@vencord/types@1.8.4': dependencies: - '@types/lodash': 4.17.14 - '@types/node': 18.19.71 - '@types/react': 18.3.18 - '@types/react-dom': 18.3.5(@types/react@18.3.18) + '@types/lodash': 4.17.15 + '@types/node': 18.19.75 + '@types/react': 18.3.12 + '@types/react-dom': 18.3.5(@types/react@18.3.12) discord-types: 1.3.26 standalone-electron-types: 1.0.0 type-fest: 3.13.1 @@ -3584,7 +3590,7 @@ snapshots: minimatch: 10.0.1 resedit: 1.7.2 sanitize-filename: 1.6.3 - semver: 7.6.3 + semver: 7.7.1 tar: 6.2.1 temp-file: 3.4.0 transitivePeerDependencies: @@ -3689,7 +3695,7 @@ snapshots: get-intrinsic: 1.2.7 is-array-buffer: 3.0.5 - arrpc@https://codeload.github.com/OpenAsar/arrpc/tar.gz/2234e9c9111f4c42ebcc3aa6a2215bfd979eef77(patch_hash=biyukfa6dww2wxujy4eyvkhrti): + arrpc@https://codeload.github.com/OpenAsar/arrpc/tar.gz/2234e9c9111f4c42ebcc3aa6a2215bfd979eef77(patch_hash=sczviclcirm3d4e2soabfniygq): dependencies: ws: 8.18.0 transitivePeerDependencies: @@ -3706,6 +3712,8 @@ snapshots: async-exit-hook@2.0.1: {} + async-function@1.0.0: {} + async@3.2.6: {} asynckit@0.4.0: {} @@ -3926,7 +3934,7 @@ snapshots: node-api-headers: 1.5.0 npmlog: 6.0.2 rc: 1.2.8 - semver: 7.6.3 + semver: 7.7.1 tar: 6.2.1 url-join: 4.0.1 which: 2.0.2 @@ -4189,15 +4197,15 @@ snapshots: lazy-val: 1.0.5 lodash.escaperegexp: 4.1.2 lodash.isequal: 4.5.0 - semver: 7.6.3 + semver: 7.7.1 tiny-typed-emitter: 2.1.0 transitivePeerDependencies: - supports-color - electron@34.0.1: + electron@34.1.0: dependencies: '@electron/get': 2.0.3 - '@types/node': 20.17.14 + '@types/node': 20.17.17 extract-zip: 2.0.1 transitivePeerDependencies: - supports-color @@ -4252,9 +4260,9 @@ snapshots: is-shared-array-buffer: 1.0.4 is-string: 1.1.1 is-typed-array: 1.1.15 - is-weakref: 1.1.0 + is-weakref: 1.1.1 math-intrinsics: 1.1.0 - object-inspect: 1.13.3 + object-inspect: 1.13.4 object-keys: 1.1.1 object.assign: 4.1.7 own-keys: 1.0.1 @@ -4360,14 +4368,14 @@ snapshots: escape-string-regexp@4.0.0: {} - eslint-config-prettier@10.0.1(eslint@9.18.0): + eslint-config-prettier@10.0.1(eslint@9.19.0): dependencies: - eslint: 9.18.0 + eslint: 9.19.0 optional: true - eslint-import-resolver-alias@1.1.2(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.21.0(eslint@9.18.0)(typescript@5.7.3))(eslint@9.18.0)): + eslint-import-resolver-alias@1.1.2(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.23.0(eslint@9.19.0)(typescript@5.7.3))(eslint@9.19.0)): dependencies: - eslint-plugin-import: 2.31.0(@typescript-eslint/parser@8.21.0(eslint@9.18.0)(typescript@5.7.3))(eslint@9.18.0) + eslint-plugin-import: 2.31.0(@typescript-eslint/parser@8.23.0(eslint@9.19.0)(typescript@5.7.3))(eslint@9.19.0) eslint-import-resolver-node@0.3.9: dependencies: @@ -4377,17 +4385,17 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-module-utils@2.12.0(@typescript-eslint/parser@8.21.0(eslint@9.18.0)(typescript@5.7.3))(eslint-import-resolver-node@0.3.9)(eslint@9.18.0): + eslint-module-utils@2.12.0(@typescript-eslint/parser@8.23.0(eslint@9.19.0)(typescript@5.7.3))(eslint-import-resolver-node@0.3.9)(eslint@9.19.0): dependencies: debug: 3.2.7 optionalDependencies: - '@typescript-eslint/parser': 8.21.0(eslint@9.18.0)(typescript@5.7.3) - eslint: 9.18.0 + '@typescript-eslint/parser': 8.23.0(eslint@9.19.0)(typescript@5.7.3) + eslint: 9.19.0 eslint-import-resolver-node: 0.3.9 transitivePeerDependencies: - supports-color - eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.21.0(eslint@9.18.0)(typescript@5.7.3))(eslint@9.18.0): + eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.23.0(eslint@9.19.0)(typescript@5.7.3))(eslint@9.19.0): dependencies: '@rtsao/scc': 1.1.0 array-includes: 3.1.8 @@ -4396,9 +4404,9 @@ snapshots: array.prototype.flatmap: 1.3.3 debug: 3.2.7 doctrine: 2.1.0 - eslint: 9.18.0 + eslint: 9.19.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.0(@typescript-eslint/parser@8.21.0(eslint@9.18.0)(typescript@5.7.3))(eslint-import-resolver-node@0.3.9)(eslint@9.18.0) + eslint-module-utils: 2.12.0(@typescript-eslint/parser@8.23.0(eslint@9.19.0)(typescript@5.7.3))(eslint-import-resolver-node@0.3.9)(eslint@9.19.0) hasown: 2.0.2 is-core-module: 2.16.1 is-glob: 4.0.3 @@ -4410,43 +4418,43 @@ snapshots: string.prototype.trimend: 1.0.9 tsconfig-paths: 3.15.0 optionalDependencies: - '@typescript-eslint/parser': 8.21.0(eslint@9.18.0)(typescript@5.7.3) + '@typescript-eslint/parser': 8.23.0(eslint@9.19.0)(typescript@5.7.3) transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack - supports-color - eslint-plugin-path-alias@2.1.0(eslint@9.18.0): + eslint-plugin-path-alias@2.1.0(eslint@9.19.0): dependencies: - eslint: 9.18.0 + eslint: 9.19.0 find-pkg: 2.0.0 get-tsconfig: 4.10.0 nanomatch: 1.2.13 transitivePeerDependencies: - supports-color - eslint-plugin-prettier@5.2.3(eslint-config-prettier@10.0.1(eslint@9.18.0))(eslint@9.18.0)(prettier@3.4.2): + eslint-plugin-prettier@5.2.3(eslint-config-prettier@10.0.1(eslint@9.19.0))(eslint@9.19.0)(prettier@3.4.2): dependencies: - eslint: 9.18.0 + eslint: 9.19.0 prettier: 3.4.2 prettier-linter-helpers: 1.0.0 synckit: 0.9.2 optionalDependencies: - eslint-config-prettier: 10.0.1(eslint@9.18.0) + eslint-config-prettier: 10.0.1(eslint@9.19.0) - eslint-plugin-simple-header@1.2.1(eslint@9.18.0): + eslint-plugin-simple-header@1.2.2(eslint@9.19.0): dependencies: - eslint: 9.18.0 + eslint: 9.19.0 - eslint-plugin-simple-import-sort@12.1.1(eslint@9.18.0): + eslint-plugin-simple-import-sort@12.1.1(eslint@9.19.0): dependencies: - eslint: 9.18.0 + eslint: 9.19.0 - eslint-plugin-unused-imports@4.1.4(@typescript-eslint/eslint-plugin@8.21.0(@typescript-eslint/parser@8.21.0(eslint@9.18.0)(typescript@5.7.3))(eslint@9.18.0)(typescript@5.7.3))(eslint@9.18.0): + eslint-plugin-unused-imports@4.1.4(@typescript-eslint/eslint-plugin@8.23.0(@typescript-eslint/parser@8.23.0(eslint@9.19.0)(typescript@5.7.3))(eslint@9.19.0)(typescript@5.7.3))(eslint@9.19.0): dependencies: - eslint: 9.18.0 + eslint: 9.19.0 optionalDependencies: - '@typescript-eslint/eslint-plugin': 8.21.0(@typescript-eslint/parser@8.21.0(eslint@9.18.0)(typescript@5.7.3))(eslint@9.18.0)(typescript@5.7.3) + '@typescript-eslint/eslint-plugin': 8.23.0(@typescript-eslint/parser@8.23.0(eslint@9.19.0)(typescript@5.7.3))(eslint@9.19.0)(typescript@5.7.3) eslint-scope@8.2.0: dependencies: @@ -4457,14 +4465,14 @@ snapshots: eslint-visitor-keys@4.2.0: {} - eslint@9.18.0: + eslint@9.19.0: dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.18.0) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.19.0) '@eslint-community/regexpp': 4.12.1 - '@eslint/config-array': 0.19.1 + '@eslint/config-array': 0.19.2 '@eslint/core': 0.10.0 '@eslint/eslintrc': 3.2.0 - '@eslint/js': 9.18.0 + '@eslint/js': 9.19.0 '@eslint/plugin-kit': 0.2.5 '@humanfs/node': 0.16.6 '@humanwhocodes/module-importer': 1.0.1 @@ -4558,7 +4566,7 @@ snapshots: fast-levenshtein@2.0.6: {} - fastq@1.18.0: + fastq@1.19.0: dependencies: reusify: 1.0.4 @@ -4603,7 +4611,7 @@ snapshots: debug: 4.4.0 optional: true - for-each@0.3.3: + for-each@0.3.4: dependencies: is-callable: 1.2.7 @@ -4760,7 +4768,7 @@ snapshots: es6-error: 4.1.1 matcher: 3.0.0 roarr: 2.15.4 - semver: 7.6.3 + semver: 7.7.1 serialize-error: 7.0.1 optional: true @@ -4910,7 +4918,7 @@ snapshots: ignore@5.3.2: {} - import-fresh@3.3.0: + import-fresh@3.3.1: dependencies: parent-module: 1.0.1 resolve-from: 4.0.0 @@ -4951,8 +4959,9 @@ snapshots: call-bound: 1.0.3 get-intrinsic: 1.2.7 - is-async-function@2.1.0: + is-async-function@2.1.1: dependencies: + async-function: 1.0.0 call-bound: 1.0.3 get-proto: 1.0.1 has-tostringtag: 1.0.2 @@ -4962,7 +4971,7 @@ snapshots: dependencies: has-bigints: 1.1.0 - is-boolean-object@1.2.1: + is-boolean-object@1.2.2: dependencies: call-bound: 1.0.3 has-tostringtag: 1.0.2 @@ -5082,7 +5091,7 @@ snapshots: is-weakmap@2.0.2: {} - is-weakref@1.1.0: + is-weakref@1.1.1: dependencies: call-bound: 1.0.3 @@ -5364,9 +5373,9 @@ snapshots: negotiator@0.6.4: {} - node-abi@3.73.0: + node-abi@3.74.0: dependencies: - semver: 7.6.3 + semver: 7.7.1 node-addon-api@1.7.2: optional: true @@ -5379,7 +5388,7 @@ snapshots: node-api-version@0.2.0: dependencies: - semver: 7.6.3 + semver: 7.7.1 node-gyp@9.4.1: dependencies: @@ -5391,7 +5400,7 @@ snapshots: nopt: 6.0.0 npmlog: 6.0.2 rimraf: 3.0.2 - semver: 7.6.3 + semver: 7.7.1 tar: 6.2.1 which: 2.0.2 transitivePeerDependencies: @@ -5419,7 +5428,7 @@ snapshots: define-property: 0.2.5 kind-of: 3.2.2 - object-inspect@1.13.3: {} + object-inspect@1.13.4: {} object-keys@1.1.1: {} @@ -5743,7 +5752,7 @@ snapshots: semver@6.3.1: {} - semver@7.6.3: {} + semver@7.7.1: {} serialize-error@7.0.1: dependencies: @@ -5790,27 +5799,27 @@ snapshots: side-channel-list@1.0.0: dependencies: es-errors: 1.3.0 - object-inspect: 1.13.3 + object-inspect: 1.13.4 side-channel-map@1.0.1: dependencies: call-bound: 1.0.3 es-errors: 1.3.0 get-intrinsic: 1.2.7 - object-inspect: 1.13.3 + object-inspect: 1.13.4 side-channel-weakmap@1.0.2: dependencies: call-bound: 1.0.3 es-errors: 1.3.0 get-intrinsic: 1.2.7 - object-inspect: 1.13.3 + object-inspect: 1.13.4 side-channel-map: 1.0.1 side-channel@1.1.0: dependencies: es-errors: 1.3.0 - object-inspect: 1.13.3 + object-inspect: 1.13.4 side-channel-list: 1.0.0 side-channel-map: 1.0.1 side-channel-weakmap: 1.0.2 @@ -5821,7 +5830,7 @@ snapshots: simple-update-notifier@2.0.0: dependencies: - semver: 7.6.3 + semver: 7.7.1 slice-ansi@3.0.0: dependencies: @@ -5889,7 +5898,7 @@ snapshots: standalone-electron-types@1.0.0: dependencies: - '@types/node': 18.19.71 + '@types/node': 18.19.75 stat-mode@1.0.0: {} @@ -6022,7 +6031,7 @@ snapshots: dependencies: utf8-byte-length: 1.0.5 - ts-api-utils@2.0.0(typescript@5.7.3): + ts-api-utils@2.0.1(typescript@5.7.3): dependencies: typescript: 5.7.3 @@ -6062,7 +6071,7 @@ snapshots: typed-array-byte-length@1.0.3: dependencies: call-bind: 1.0.8 - for-each: 0.3.3 + for-each: 0.3.4 gopd: 1.2.0 has-proto: 1.2.0 is-typed-array: 1.1.15 @@ -6071,7 +6080,7 @@ snapshots: dependencies: available-typed-arrays: 1.0.7 call-bind: 1.0.8 - for-each: 0.3.3 + for-each: 0.3.4 gopd: 1.2.0 has-proto: 1.2.0 is-typed-array: 1.1.15 @@ -6080,18 +6089,18 @@ snapshots: typed-array-length@1.0.7: dependencies: call-bind: 1.0.8 - for-each: 0.3.3 + for-each: 0.3.4 gopd: 1.2.0 is-typed-array: 1.1.15 possible-typed-array-names: 1.0.0 reflect.getprototypeof: 1.0.10 - typescript-eslint@8.21.0(eslint@9.18.0)(typescript@5.7.3): + typescript-eslint@8.23.0(eslint@9.19.0)(typescript@5.7.3): dependencies: - '@typescript-eslint/eslint-plugin': 8.21.0(@typescript-eslint/parser@8.21.0(eslint@9.18.0)(typescript@5.7.3))(eslint@9.18.0)(typescript@5.7.3) - '@typescript-eslint/parser': 8.21.0(eslint@9.18.0)(typescript@5.7.3) - '@typescript-eslint/utils': 8.21.0(eslint@9.18.0)(typescript@5.7.3) - eslint: 9.18.0 + '@typescript-eslint/eslint-plugin': 8.23.0(@typescript-eslint/parser@8.23.0(eslint@9.19.0)(typescript@5.7.3))(eslint@9.19.0)(typescript@5.7.3) + '@typescript-eslint/parser': 8.23.0(eslint@9.19.0)(typescript@5.7.3) + '@typescript-eslint/utils': 8.23.0(eslint@9.19.0)(typescript@5.7.3) + eslint: 9.19.0 typescript: 5.7.3 transitivePeerDependencies: - supports-color @@ -6164,7 +6173,7 @@ snapshots: which-boxed-primitive@1.1.1: dependencies: is-bigint: 1.1.0 - is-boolean-object: 1.2.1 + is-boolean-object: 1.2.2 is-number-object: 1.1.1 is-string: 1.1.1 is-symbol: 1.1.1 @@ -6174,12 +6183,12 @@ snapshots: call-bound: 1.0.3 function.prototype.name: 1.1.8 has-tostringtag: 1.0.2 - is-async-function: 2.1.0 + is-async-function: 2.1.1 is-date-object: 1.1.0 is-finalizationregistry: 1.1.1 is-generator-function: 1.1.0 is-regex: 1.2.1 - is-weakref: 1.1.0 + is-weakref: 1.1.1 isarray: 2.0.5 which-boxed-primitive: 1.1.1 which-collection: 1.0.2 @@ -6197,7 +6206,7 @@ snapshots: available-typed-arrays: 1.0.7 call-bind: 1.0.8 call-bound: 1.0.3 - for-each: 0.3.3 + for-each: 0.3.4 gopd: 1.2.0 has-tostringtag: 1.0.2 @@ -6231,7 +6240,7 @@ snapshots: ws@8.18.0: {} - xml-formatter@3.6.3: + xml-formatter@3.6.4: dependencies: xml-parser-xo: 4.1.3 diff --git a/src/main/arrpc.ts b/src/main/arrpc.ts index c92745a..a47cd42 100644 --- a/src/main/arrpc.ts +++ b/src/main/arrpc.ts @@ -5,10 +5,10 @@ */ import { resolve } from "path"; -import { IpcEvents } from "shared/IpcEvents"; +import { IpcCommands, IpcEvents } from "shared/IpcEvents"; import { MessageChannel, Worker } from "worker_threads"; -import { mainWin } from "./mainWindow"; +import { sendRendererCommand } from "./ipcCommands"; import { Settings } from "./settings"; import { ArrpcEvent, ArrpcHostEvent } from "./utils/arrpcWorkerTypes"; @@ -27,10 +27,10 @@ export async function initArRPC() { }, transferList: [workerPort] }); - hostPort.on("message", (e: ArrpcEvent) => { + hostPort.on("message", async (e: ArrpcEvent) => { switch (e.eventType) { case IpcEvents.ARRPC_ACTIVITY: { - mainWin.webContents.send(IpcEvents.ARRPC_ACTIVITY, e.data); + sendRendererCommand(IpcCommands.RPC_ACTIVITY, JSON.stringify(e.data)); break; } case "invite": { @@ -45,18 +45,37 @@ export async function initArRPC() { return hostPort.postMessage(hostEvent); } - mainWin.webContents - // Safety: Result of JSON.stringify should always be safe to equal - // Also, just to be super super safe, invite is regex validated above - .executeJavaScript(`Vesktop.openInviteModal(${JSON.stringify(invite)})`) - .then(() => { - const hostEvent: ArrpcHostEvent = { - eventType: "ack-invite", - data: true, - inviteId: e.inviteId - }; - hostPort.postMessage(hostEvent); - }); + await sendRendererCommand(IpcCommands.RPC_INVITE, invite).then(() => { + const hostEvent: ArrpcHostEvent = { + eventType: "ack-invite", + data: true, + inviteId: e.inviteId + }; + hostPort.postMessage(hostEvent); + }); + + break; + } + case "link": { + const link = String(e.data); + if (!inviteCodeRegex.test(link)) { + const hostEvent: ArrpcHostEvent = { + eventType: "ack-link", + data: false, + linkId: e.linkId + }; + return hostPort.postMessage(hostEvent); + } + + await sendRendererCommand(IpcCommands.RPC_DEEP_LINK, link).then(() => { + const hostEvent: ArrpcHostEvent = { + eventType: "ack-link", + data: true, + linkId: e.linkId + }; + hostPort.postMessage(hostEvent); + }); + break; } } diff --git a/src/main/arrpcWorker.ts b/src/main/arrpcWorker.ts index d26d6ec..fb4eadf 100644 --- a/src/main/arrpcWorker.ts +++ b/src/main/arrpcWorker.ts @@ -13,8 +13,10 @@ import { ArrpcEvent, ArrpcHostEvent } from "./utils/arrpcWorkerTypes"; let server: any; type InviteCallback = (valid: boolean) => void; +type LinkCallback = InviteCallback; let inviteCallbacks: Array = []; +let linkCallbacks: Array = []; (async function () { const { workerPort }: { workerPort: MessagePort } = workerData; @@ -36,7 +38,17 @@ let inviteCallbacks: Array = []; }); workerPort.on("message", (e: ArrpcHostEvent) => { - inviteCallbacks[e.inviteId](e.data); - inviteCallbacks = [...inviteCallbacks.slice(0, e.inviteId), ...inviteCallbacks.slice(e.inviteId + 1)]; + switch (e.eventType) { + case "ack-invite": { + inviteCallbacks[e.inviteId](e.data); + inviteCallbacks = [...inviteCallbacks.slice(0, e.inviteId), ...inviteCallbacks.slice(e.inviteId + 1)]; + break; + } + case "ack-link": { + linkCallbacks[e.linkId](e.data); + linkCallbacks = [...inviteCallbacks.slice(0, e.linkId), ...inviteCallbacks.slice(e.linkId + 1)]; + break; + } + } }); })(); diff --git a/src/main/firstLaunch.ts b/src/main/firstLaunch.ts index dee4882..9c2edec 100644 --- a/src/main/firstLaunch.ts +++ b/src/main/firstLaunch.ts @@ -28,6 +28,7 @@ interface Data { export function createFirstLaunchTour() { const win = new BrowserWindow({ ...SplashProps, + transparent: false, frame: true, autoHideMenuBar: true, height: 470, diff --git a/src/main/index.ts b/src/main/index.ts index 4eb863d..9e9244f 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -23,10 +23,14 @@ if (IS_DEV) { autoUpdater.checkForUpdatesAndNotify(); } +console.log("Vesktop v" + app.getVersion()); + // Make the Vencord files use our DATA_DIR process.env.VENCORD_USER_DATA_DIR = DATA_DIR; function init() { + app.setAsDefaultProtocolClient("discord"); + const { disableSmoothScroll, hardwareAcceleration } = Settings.store; const enabledFeatures = app.commandLine.getSwitchValue("enable-features").split(","); @@ -35,7 +39,12 @@ function init() { if (hardwareAcceleration === false) { app.disableHardwareAcceleration(); } else { - enabledFeatures.push("VaapiVideoDecodeLinuxGL", "VaapiVideoEncoder", "VaapiVideoDecoder"); + enabledFeatures.push( + "AcceleratedVideoDecodeLinuxGL", + "AcceleratedVideoEncoder", + "AcceleratedVideoDecoder", + "AcceleratedVideoDecodeLinuxZeroCopyGL" + ); } if (disableSmoothScroll) { @@ -112,6 +121,12 @@ async function bootstrap() { } } +// MacOS only event +export let darwinURL: string | undefined; +app.on("open-url", (_, url) => { + darwinURL = url; +}); + app.on("window-all-closed", () => { if (process.platform !== "darwin") app.quit(); }); diff --git a/src/main/ipcCommands.ts b/src/main/ipcCommands.ts new file mode 100644 index 0000000..2349b75 --- /dev/null +++ b/src/main/ipcCommands.ts @@ -0,0 +1,56 @@ +/* + * SPDX-License-Identifier: GPL-3.0 + * Vesktop, a desktop app aiming to give you a snappier Discord Experience + * Copyright (c) 2023 Vendicated and Vencord contributors + */ + +import { randomUUID } from "crypto"; +import { ipcMain } from "electron"; +import { IpcEvents } from "shared/IpcEvents"; + +import { mainWin } from "./mainWindow"; + +const resolvers = new Map void>>(); + +export interface IpcMessage { + nonce: string; + message: string; + data?: any; +} + +export interface IpcResponse { + nonce: string; + ok: boolean; + data?: any; +} + +/** + * Sends a message to the renderer process and waits for a response. + * `data` must be serializable as it will be sent over IPC. + * + * You must add a handler for the message in the renderer process. + */ +export function sendRendererCommand(message: string, data?: any) { + const nonce = randomUUID(); + + const promise = new Promise((resolve, reject) => { + resolvers.set(nonce, { resolve, reject }); + }); + + mainWin.webContents.send(IpcEvents.IPC_COMMAND, { nonce, message, data }); + + return promise; +} + +ipcMain.on(IpcEvents.IPC_COMMAND, (_event, { nonce, ok, data }: IpcResponse) => { + const resolver = resolvers.get(nonce); + if (!resolver) throw new Error(`Unknown message: ${nonce}`); + + if (ok) { + resolver.resolve(data); + } else { + resolver.reject(data); + } + + resolvers.delete(nonce); +}); diff --git a/src/main/mainWindow.ts b/src/main/mainWindow.ts index d860b37..cbb0def 100644 --- a/src/main/mainWindow.ts +++ b/src/main/mainWindow.ts @@ -18,7 +18,7 @@ import { } from "electron"; import { rm } from "fs/promises"; import { join } from "path"; -import { IpcEvents } from "shared/IpcEvents"; +import { IpcCommands, IpcEvents } from "shared/IpcEvents"; import { isTruthy } from "shared/utils/guards"; import { once } from "shared/utils/once"; import type { SettingsStore } from "shared/utils/SettingsStore"; @@ -36,6 +36,8 @@ import { MIN_WIDTH, VENCORD_FILES_DIR } from "./constants"; +import { darwinURL } from "./index"; +import { sendRendererCommand } from "./ipcCommands"; import { Settings, State, VencordSettings } from "./settings"; import { createSplashWindow } from "./splash"; import { makeLinksOpenExternally } from "./utils/makeLinksOpenExternally"; @@ -198,9 +200,7 @@ function initMenuBar(win: BrowserWindow) { label: "Settings", accelerator: "CmdOrCtrl+,", async click() { - mainWin.webContents.executeJavaScript( - "Vencord.Webpack.Common.SettingsRouter.open('My Account')" - ); + sendRendererCommand(IpcCommands.NAVIGATE_SETTINGS); } }, { @@ -271,7 +271,7 @@ function getWindowBoundsOptions(): BrowserWindowConstructorOptions { height: height ?? DEFAULT_HEIGHT } as BrowserWindowConstructorOptions; - const storedDisplay = screen.getAllDisplays().find(display => display.id === State.store.displayid); + const storedDisplay = screen.getAllDisplays().find(display => display.id === State.store.displayId); if (x != null && y != null && storedDisplay) { options.x = x; @@ -299,7 +299,7 @@ function getDarwinOptions(): BrowserWindowConstructorOptions { options.vibrancy = "sidebar"; options.backgroundColor = "#ffffff00"; } else { - if (splashTheming) { + if (splashTheming !== false) { options.backgroundColor = splashBackground; } else { options.backgroundColor = nativeTheme.shouldUseDarkColors ? "#313338" : "#ffffff"; @@ -321,7 +321,7 @@ function initWindowBoundsListeners(win: BrowserWindow) { const saveBounds = () => { State.store.windowBounds = win.getBounds(); - State.store.displayid = screen.getDisplayMatching(State.store.windowBounds).id; + State.store.displayId = screen.getDisplayMatching(State.store.windowBounds).id; }; win.on("resize", saveBounds); @@ -333,6 +333,7 @@ function initSettingsListeners(win: BrowserWindow) { if (enable) initTray(win); else tray?.destroy(); }); + addSettingsListener("disableMinSize", disable => { if (disable) { // 0 no work @@ -366,7 +367,7 @@ function initSettingsListeners(win: BrowserWindow) { } async function initSpellCheckLanguages(win: BrowserWindow, languages?: string[]) { - languages ??= await win.webContents.executeJavaScript("[...new Set(navigator.languages)]").catch(() => []); + languages ??= await sendRendererCommand(IpcCommands.GET_LANGUAGES); if (!languages) return; const ses = session.defaultSession; @@ -384,19 +385,38 @@ function initSpellCheck(win: BrowserWindow) { initSpellCheckLanguages(win, Settings.store.spellCheckLanguages); } +function initStaticTitle(win: BrowserWindow) { + const listener = (e: { preventDefault: Function }) => e.preventDefault(); + + if (Settings.store.staticTitle) win.on("page-title-updated", listener); + + addSettingsListener("staticTitle", enabled => { + if (enabled) { + win.setTitle("Vesktop"); + win.on("page-title-updated", listener); + } else { + win.off("page-title-updated", listener); + } + }); +} + function createMainWindow() { // Clear up previous settings listeners removeSettingsListeners(); removeVencordSettingsListeners(); - const { staticTitle, transparencyOption, enableMenu, customTitleBar } = Settings.store; + const { staticTitle, transparencyOption, enableMenu, customTitleBar, splashTheming, splashBackground } = + Settings.store; const { frameless, transparent } = VencordSettings.store; const noFrame = frameless === true || customTitleBar === true; + const backgroundColor = + splashTheming !== false ? splashBackground : nativeTheme.shouldUseDarkColors ? "#313338" : "#ffffff"; const win = (mainWin = new BrowserWindow({ - show: false, + show: Settings.store.enableSplashScreen === false, + backgroundColor, webPreferences: { nodeIntegration: false, sandbox: false, @@ -444,44 +464,51 @@ function createMainWindow() { return false; }); - if (Settings.store.staticTitle) win.on("page-title-updated", e => e.preventDefault()); - initWindowBoundsListeners(win); if (!isDeckGameMode && (Settings.store.tray ?? true) && process.platform !== "darwin") initTray(win); initMenuBar(win); makeLinksOpenExternally(win); initSettingsListeners(win); initSpellCheck(win); + initStaticTitle(win); win.webContents.setUserAgent(BrowserUserAgent); - const subdomain = - Settings.store.discordBranch === "canary" || Settings.store.discordBranch === "ptb" - ? `${Settings.store.discordBranch}.` - : ""; - - win.loadURL(`https://${subdomain}discord.com/app`); + // if the open-url event is fired (in index.ts) while starting up, darwinURL will be set. If not fall back to checking the process args (which Windows and Linux use for URI calling.) + loadUrl(darwinURL || process.argv.find(arg => arg.startsWith("discord://"))); return win; } const runVencordMain = once(() => require(join(VENCORD_FILES_DIR, "vencordDesktopMain.js"))); +export function loadUrl(uri: string | undefined) { + const branch = Settings.store.discordBranch; + const subdomain = branch === "canary" || branch === "ptb" ? `${branch}.` : ""; + mainWin.loadURL(`https://${subdomain}discord.com/${uri ? new URL(uri).pathname.slice(1) || "app" : "app"}`); +} + export async function createWindows() { const startMinimized = process.argv.includes("--start-minimized"); - const splash = createSplashWindow(startMinimized); - // SteamOS letterboxes and scales it terribly, so just full screen it - if (isDeckGameMode) splash.setFullScreen(true); + + let splash: BrowserWindow | undefined; + if (Settings.store.enableSplashScreen !== false) { + splash = createSplashWindow(startMinimized); + + // SteamOS letterboxes and scales it terribly, so just full screen it + if (isDeckGameMode) splash.setFullScreen(true); + } + await ensureVencordFiles(); runVencordMain(); mainWin = createMainWindow(); mainWin.webContents.on("did-finish-load", () => { - splash.destroy(); + splash?.destroy(); if (!startMinimized) { - mainWin!.show(); + if (splash) mainWin!.show(); if (State.store.maximized && !isDeckGameMode) mainWin!.maximize(); } @@ -499,5 +526,13 @@ export async function createWindows() { }); }); + mainWin.webContents.on("did-navigate", (_, url: string, responseCode: number) => { + // check url to ensure app doesn't loop + if (responseCode >= 300 && new URL(url).pathname !== `/app`) { + loadUrl(undefined); + console.warn(`'did-navigate': Caught bad page response: ${responseCode}, redirecting to main app`); + } + }); + initArRPC(); } diff --git a/src/main/splash.ts b/src/main/splash.ts index 7c05de9..2a26761 100644 --- a/src/main/splash.ts +++ b/src/main/splash.ts @@ -22,7 +22,7 @@ export function createSplashWindow(startMinimized = false) { const { splashBackground, splashColor, splashTheming } = Settings.store; - if (splashTheming) { + if (splashTheming !== false) { if (splashColor) { const semiTransparentSplashColor = splashColor.replace("rgb(", "rgba(").replace(")", ", 0.2)"); diff --git a/src/main/utils/arrpcWorkerTypes.ts b/src/main/utils/arrpcWorkerTypes.ts index 5e45173..e2d74c7 100644 --- a/src/main/utils/arrpcWorkerTypes.ts +++ b/src/main/utils/arrpcWorkerTypes.ts @@ -6,7 +6,8 @@ import { IpcEvents } from "shared/IpcEvents"; -export type ArrpcEvent = ArrpcActivityEvent | ArrpcInviteEvent; +export type ArrpcEvent = ArrpcActivityEvent | ArrpcInviteEvent | ArrpcLinkEvent; +export type ArrpcHostEvent = ArrpcHostAckInviteEvent | ArrpcHostAckLinkEvent; export interface ArrpcActivityEvent { eventType: IpcEvents.ARRPC_ACTIVITY; @@ -19,8 +20,20 @@ export interface ArrpcInviteEvent { inviteId: number; } -export interface ArrpcHostEvent { +export interface ArrpcLinkEvent { + eventType: "link"; + data: string; + linkId: number; +} + +export interface ArrpcHostAckInviteEvent { eventType: "ack-invite"; inviteId: number; data: boolean; } + +export interface ArrpcHostAckLinkEvent { + eventType: "ack-link"; + linkId: number; + data: boolean; +} diff --git a/src/preload/VesktopNative.ts b/src/preload/VesktopNative.ts index 136bcf1..1d200bc 100644 --- a/src/preload/VesktopNative.ts +++ b/src/preload/VesktopNative.ts @@ -6,6 +6,7 @@ import { Node } from "@vencord/venmic"; import { ipcRenderer } from "electron"; +import { IpcMessage, IpcResponse } from "main/ipcCommands"; import type { Settings } from "shared/settings"; import { IpcEvents } from "../shared/IpcEvents"; @@ -70,11 +71,6 @@ export const VesktopNative = { startSystem: (exclude: Node[]) => invoke(IpcEvents.VIRT_MIC_START_SYSTEM, exclude), stop: () => invoke(IpcEvents.VIRT_MIC_STOP) }, - arrpc: { - onActivity(cb: (data: string) => void) { - ipcRenderer.on(IpcEvents.ARRPC_ACTIVITY, (_, data: string) => cb(data)); - } - }, clipboard: { copyImage: (imageBuffer: Uint8Array, imageSrc: string) => invoke(IpcEvents.CLIPBOARD_COPY_IMAGE, imageBuffer, imageSrc) @@ -82,5 +78,11 @@ export const VesktopNative = { debug: { launchGpu: () => invoke(IpcEvents.DEBUG_LAUNCH_GPU), launchWebrtcInternals: () => invoke(IpcEvents.DEBUG_LAUNCH_WEBRTC_INTERNALS) + }, + commands: { + onCommand(cb: (message: IpcMessage) => void) { + ipcRenderer.on(IpcEvents.IPC_COMMAND, (_, message) => cb(message)); + }, + respond: (response: IpcResponse) => ipcRenderer.send(IpcEvents.IPC_COMMAND, response) } }; diff --git a/src/renderer/appBadge.ts b/src/renderer/appBadge.ts index b55d488..a6491c2 100644 --- a/src/renderer/appBadge.ts +++ b/src/renderer/appBadge.ts @@ -7,6 +7,7 @@ import { filters, waitFor } from "@vencord/types/webpack"; import { RelationshipStore } from "@vencord/types/webpack/common"; +import { VesktopLogger } from "./logger"; import { Settings } from "./settings"; let GuildReadStateStore: any; @@ -26,7 +27,7 @@ export function setBadge() { VesktopNative.app.setBadgeCount(totalCount); } catch (e) { - console.error(e); + VesktopLogger.error("Failed to update badge count", e); } } diff --git a/src/renderer/arrpc.ts b/src/renderer/arrpc.ts new file mode 100644 index 0000000..b307d37 --- /dev/null +++ b/src/renderer/arrpc.ts @@ -0,0 +1,68 @@ +/* + * SPDX-License-Identifier: GPL-3.0 + * Vesktop, a desktop app aiming to give you a snappier Discord Experience + * Copyright (c) 2023 Vendicated and Vencord contributors + */ + +import { Logger } from "@vencord/types/utils"; +import { findLazy, findStoreLazy, onceReady } from "@vencord/types/webpack"; +import { FluxDispatcher, InviteActions } from "@vencord/types/webpack/common"; +import { IpcCommands } from "shared/IpcEvents"; + +import { onIpcCommand } from "./ipcCommands"; +import { Settings } from "./settings"; + +const logger = new Logger("VesktopRPC", "#5865f2"); +const StreamerModeStore = findStoreLazy("StreamerModeStore"); + +const arRPC = Vencord.Plugins.plugins["WebRichPresence (arRPC)"] as any as { + handleEvent(e: MessageEvent): void; +}; + +onIpcCommand(IpcCommands.RPC_ACTIVITY, async jsonData => { + if (!Settings.store.arRPC) return; + + await onceReady; + + const data = JSON.parse(jsonData); + + if (data.socketId === "STREAMERMODE" && StreamerModeStore.autoToggle) { + FluxDispatcher.dispatch({ + type: "STREAMER_MODE_UPDATE", + key: "enabled", + value: data.activity?.application_id === "STREAMERMODE" + }); + return; + } + + arRPC.handleEvent(new MessageEvent("message", { data: jsonData })); +}); + +onIpcCommand(IpcCommands.RPC_INVITE, async code => { + const { invite } = await InviteActions.resolveInvite(code, "Desktop Modal"); + if (!invite) return false; + + VesktopNative.win.focus(); + + FluxDispatcher.dispatch({ + type: "INVITE_MODAL_OPEN", + invite, + code, + context: "APP" + }); + + return true; +}); + +const { DEEP_LINK } = findLazy(m => m.DEEP_LINK?.handler); + +onIpcCommand(IpcCommands.RPC_DEEP_LINK, async data => { + logger.debug("Opening deep link:", data); + try { + DEEP_LINK.handler({ args: data }); + return true; + } catch (err) { + logger.error("Failed to open deep link:", err); + return false; + } +}); diff --git a/src/renderer/components/ScreenSharePicker.tsx b/src/renderer/components/ScreenSharePicker.tsx index acdc593..f69f9d5 100644 --- a/src/renderer/components/ScreenSharePicker.tsx +++ b/src/renderer/components/ScreenSharePicker.tsx @@ -22,12 +22,14 @@ import { import { Node } from "@vencord/venmic"; import type { Dispatch, SetStateAction } from "react"; import { addPatch } from "renderer/patches/shared"; -import { useSettings } from "renderer/settings"; -import { isLinux, isWindows } from "renderer/utils"; +import { State, useSettings, useVesktopState } from "renderer/settings"; +import { classNameFactory, isLinux, isWindows } from "renderer/utils"; const StreamResolutions = ["480", "720", "1080", "1440", "2160"] as const; const StreamFps = ["15", "30", "60"] as const; +const cl = classNameFactory("vcd-screen-picker-"); + const MediaEngineStore = findStoreLazy("MediaEngineStore"); export type StreamResolution = (typeof StreamResolutions)[number]; @@ -44,8 +46,6 @@ interface AudioItem { } interface StreamSettings { - resolution: StreamResolution; - fps: StreamFps; audio: boolean; contentHint?: string; includeSources?: AudioSources; @@ -77,10 +77,11 @@ addPatch({ } ], patchStreamQuality(opts: any) { - if (!currentSettings) return; + const { screenshareQuality } = State.store; + if (!screenshareQuality) return; - const framerate = Number(currentSettings.fps); - const height = Number(currentSettings.resolution); + const framerate = Number(screenshareQuality.frameRate); + const height = Number(screenshareQuality.resolution); const width = Math.round(height * (16 / 9)); Object.assign(opts, { @@ -161,13 +162,21 @@ export function openScreenSharePicker(screens: Source[], skipPicker: boolean) { function ScreenPicker({ screens, chooseScreen }: { screens: Source[]; chooseScreen: (id: string) => void }) { return ( -
+
{screens.map(({ id, name, url }) => ( -
@@ -187,11 +196,13 @@ function AudioSettingsModal({ return ( - - Venmic Settings + + + Venmic Settings + - + (Settings.audio = { ...Settings.audio, workaround: v })} @@ -295,7 +306,7 @@ function AudioSettingsModal({ Device Selection - + @@ -304,7 +315,35 @@ function AudioSettingsModal({ ); } -function StreamSettings({ +function OptionRadio(props: { + options: Array | ReadonlyArray; + labels?: Array; + settings: Settings; + settingsKey: Key; + onChange: (option: string) => void; +}) { + const { options, settings, settingsKey, labels, onChange } = props; + + return ( +
+ {(options as string[]).map((option, idx) => ( + + ))} +
+ ); +} + +function StreamSettingsUi({ source, settings, setSettings, @@ -316,6 +355,7 @@ function StreamSettings({ skipPicker: boolean; }) { const Settings = useSettings(); + const qualitySettings = State.store.screenshareQuality!; const [thumb] = useAwaiter( () => (skipPicker ? Promise.resolve(source.url) : VesktopNative.capturer.getLargeThumbnail(source.id)), @@ -340,88 +380,47 @@ function StreamSettings({ return (
What you're streaming - - + + {source.name} Stream Settings - -
-
+ +
+
Resolution -
- {StreamResolutions.map(res => ( - - ))} -
+ (qualitySettings.resolution = value)} + />
-
+
Frame Rate -
- {StreamFps.map(fps => ( - - ))} -
+ (qualitySettings.frameRate = value)} + />
-
-
+
+
Content Type
-
- - -
-
+ setSettings(s => ({ ...s, contentHint: option }))} + /> +

Choosing "Prefer Clarity" will result in a significantly lower framerate in exchange for a much sharper and clearer image. @@ -433,7 +432,7 @@ function StreamSettings({ value={settings.audio} onChange={checked => setSettings(s => ({ ...s, audio: checked }))} hideBorder - className="vcd-screen-picker-audio" + className={cl("audio")} > Stream With Audio @@ -639,7 +638,7 @@ function AudioSourcePickerLinux({ return ( <> -

+
{loading ? "Loading Sources..." : "Audio Sources"}