From 4f4efb407eae334cc54051d9cc9cc0ab379087f6 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 28 Jul 2024 19:21:35 +0900 Subject: [PATCH] fix(deps): update dependency @xhayper/discord-rpc to v1.1.4 (#2279) * fix(deps): update dependency @xhayper/discord-rpc to v1.1.4 * Update and rename @xhayper__discord-rpc@1.1.2.patch to @xhayper__discord-rpc@1.1.4.patch * Update package.json * fix: update pnpm-lock.yaml * fix: use Listening instead of Playing --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: JellyBrick --- package.json | 4 ++-- ...atch => @xhayper__discord-rpc@1.1.4.patch} | 8 +++---- pnpm-lock.yaml | 24 +++++++++---------- src/plugins/discord/main.ts | 4 +++- 4 files changed, 21 insertions(+), 19 deletions(-) rename patches/{@xhayper__discord-rpc@1.1.2.patch => @xhayper__discord-rpc@1.1.4.patch} (76%) diff --git a/package.json b/package.json index fc23b5ba..8a691499 100644 --- a/package.json +++ b/package.json @@ -149,7 +149,7 @@ }, "patchedDependencies": { "vudio@2.1.1": "patches/vudio@2.1.1.patch", - "@xhayper/discord-rpc@1.1.2": "patches/@xhayper__discord-rpc@1.1.2.patch", + "@xhayper/discord-rpc@1.1.4": "patches/@xhayper__discord-rpc@1.1.4.patch", "app-builder-lib@24.13.3": "patches/app-builder-lib@24.13.3.patch" } }, @@ -164,7 +164,7 @@ "@foobar404/wave": "2.0.5", "@jellybrick/electron-better-web-request": "1.0.4", "@jellybrick/mpris-service": "2.1.4", - "@xhayper/discord-rpc": "1.1.2", + "@xhayper/discord-rpc": "1.1.4", "async-mutex": "0.5.0", "butterchurn": "3.0.0-beta.4", "butterchurn-presets": "3.0.0-beta.4", diff --git a/patches/@xhayper__discord-rpc@1.1.2.patch b/patches/@xhayper__discord-rpc@1.1.4.patch similarity index 76% rename from patches/@xhayper__discord-rpc@1.1.2.patch rename to patches/@xhayper__discord-rpc@1.1.4.patch index 6f1988f1..88bc81de 100644 --- a/patches/@xhayper__discord-rpc@1.1.2.patch +++ b/patches/@xhayper__discord-rpc@1.1.4.patch @@ -5,13 +5,13 @@ index 40db5dfbd8a4455ce2987d8115eca9882e1f9f14..414fc6986b9c0cc288908eb0107b90c4 @@ -25,11 +25,7 @@ }, "dependencies": { - "axios": "^1.6.2", -- "ws": "^8.15.1" + "axios": "^1.7.2", +- "ws": "^8.18.0" - }, - "optionalDependencies": { - "bufferutil": "^4.0.8", -- "utf-8-validate": "^6.0.3" -+ "ws": "^8.16.0" +- "utf-8-validate": "^6.0.4" ++ "ws": "^8.18.0" }, "devDependencies": { "@types/node": "^14.*", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3779cd38..29cc6979 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,9 +13,9 @@ overrides: '@babel/runtime': 7.25.0 patchedDependencies: - '@xhayper/discord-rpc@1.1.2': - hash: 7eeaht6k4r7cw3nunras7mx7iu - path: patches/@xhayper__discord-rpc@1.1.2.patch + '@xhayper/discord-rpc@1.1.4': + hash: n7icacbfxuqlodunyqwwt5lccm + path: patches/@xhayper__discord-rpc@1.1.4.patch app-builder-lib@24.13.3: hash: zcnm2qnjaggm2keyecnhiglkke path: patches/app-builder-lib@24.13.3.patch @@ -58,8 +58,8 @@ importers: specifier: 2.1.4 version: 2.1.4 '@xhayper/discord-rpc': - specifier: 1.1.2 - version: 1.1.2(patch_hash=7eeaht6k4r7cw3nunras7mx7iu) + specifier: 1.1.4 + version: 1.1.4(patch_hash=n7icacbfxuqlodunyqwwt5lccm) async-mutex: specifier: 0.5.0 version: 0.5.0 @@ -1173,8 +1173,8 @@ packages: '@ungap/structured-clone@1.2.0': resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} - '@xhayper/discord-rpc@1.1.2': - resolution: {integrity: sha512-QOeSFRqEK/pfSNl9PSIIi6ypKzD2zy1B8IHdzpvw4WsqXNoJaymfg9lE0wsei4zD5eT2bfnlcILBW9ociJMnKw==} + '@xhayper/discord-rpc@1.1.4': + resolution: {integrity: sha512-yq2ybstOWsfAN6LP5vogUpnxkaiKV1yXQ+8N4Sgo8YbE+3atgxuNiZWnGG6yO+XdxswvbD04AkLhnq7f9r8h3w==} engines: {node: '>=14.18.0'} '@xmldom/xmldom@0.8.10': @@ -1357,8 +1357,8 @@ packages: resolution: {integrity: sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==} engines: {node: '>= 0.4'} - axios@1.6.5: - resolution: {integrity: sha512-Ii012v05KEVuUoFWmMW/UQv9aRIc3ZwkWDcM+h5Il8izZCtRVpDUfwpoFf7eOtajT3QiGR4yDUx7lPqHJULgbg==} + axios@1.7.2: + resolution: {integrity: sha512-2A8QhOMrbomlDuiLeK9XibIBzuHeRcqqNOHp0Cyp5EoJ1IFDh+XZH3A6BkXtv0K4gFGCI0Y4BM7B1wOEi0Rmgw==} babel-plugin-jsx-dom-expressions@0.37.16: resolution: {integrity: sha512-ItMD16axbk+FqVb9vIbc7AOpNowy46VaSUHaMYPn+erPGpMCxsahQ1Iv+qhPMthjxtn5ROVMZ5AJtQvzjxjiNA==} @@ -4886,9 +4886,9 @@ snapshots: '@ungap/structured-clone@1.2.0': {} - '@xhayper/discord-rpc@1.1.2(patch_hash=7eeaht6k4r7cw3nunras7mx7iu)': + '@xhayper/discord-rpc@1.1.4(patch_hash=n7icacbfxuqlodunyqwwt5lccm)': dependencies: - axios: 1.6.5 + axios: 1.7.2 ws: 8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.4) optionalDependencies: bufferutil: 4.0.8 @@ -5134,7 +5134,7 @@ snapshots: available-typed-arrays@1.0.5: {} - axios@1.6.5: + axios@1.7.2: dependencies: follow-redirects: 1.15.6 form-data: 4.0.0 diff --git a/src/plugins/discord/main.ts b/src/plugins/discord/main.ts index 582245de..ec9d380d 100644 --- a/src/plugins/discord/main.ts +++ b/src/plugins/discord/main.ts @@ -2,11 +2,12 @@ import { app, dialog, ipcMain } from 'electron'; import { Client as DiscordClient } from '@xhayper/discord-rpc'; import { dev } from 'electron-is'; +import { ActivityType, GatewayActivityButton } from 'discord-api-types/v10'; + import registerCallback, { type SongInfo } from '@/providers/song-info'; import { createBackend, LoggerPrefix } from '@/utils'; import { t } from '@/i18n'; -import type { GatewayActivityButton } from 'discord-api-types/v10'; import type { SetActivity } from '@xhayper/discord-rpc/dist/structures/ClientUser'; import type { DiscordPluginConfig } from './index'; @@ -180,6 +181,7 @@ export const backend = createBackend< } const activityInfo: SetActivity = { + type: ActivityType.Listening, details: songInfo.title, state: songInfo.artist, largeImageKey: songInfo.imageSrc ?? '',