switch to Vencord/arrpc fork
This commit is contained in:
+2
-4
@@ -22,12 +22,10 @@
|
||||
"test": "pnpm lint && pnpm testTypes",
|
||||
"testTypes": "tsc --noEmit",
|
||||
"watch": "pnpm build --watch",
|
||||
"generateMeta": "tsx scripts/utils/generateMeta.mts",
|
||||
"updateArrpcDB": "node ./node_modules/arrpc/update_db.js",
|
||||
"postinstall": "pnpm updateArrpcDB"
|
||||
"generateMeta": "tsx scripts/utils/generateMeta.mts"
|
||||
},
|
||||
"dependencies": {
|
||||
"arrpc": "github:OpenAsar/arrpc#2234e9c9111f4c42ebcc3aa6a2215bfd979eef77",
|
||||
"arrpc": "github:Vencord/arrpc#82ece7442564d725d8202a8bb9bed5903ee85026",
|
||||
"electron-updater": "6.6.2"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
diff --git a/src/process/index.js b/src/process/index.js
|
||||
index 389b0845256a34b4536d6da99edb00d17f13a6b4..f17a0ac687e9110ebfd33cb91fd2f6250d318643 100644
|
||||
--- a/src/process/index.js
|
||||
+++ b/src/process/index.js
|
||||
@@ -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];
|
||||
Generated
+12
-24
@@ -5,7 +5,6 @@ settings:
|
||||
excludeLinksFromLockfile: false
|
||||
|
||||
patchedDependencies:
|
||||
arrpc@3.5.0: 4313fe844324a52ef0453078a86f5d1ee2d4f406331201211020d9fa243323c4
|
||||
electron-updater: 080505564abb2ebbda932bbf8fe91540c74dd905de994888d52ffce6f882f887
|
||||
|
||||
importers:
|
||||
@@ -13,8 +12,8 @@ importers:
|
||||
.:
|
||||
dependencies:
|
||||
arrpc:
|
||||
specifier: github:OpenAsar/arrpc#2234e9c9111f4c42ebcc3aa6a2215bfd979eef77
|
||||
version: https://codeload.github.com/OpenAsar/arrpc/tar.gz/2234e9c9111f4c42ebcc3aa6a2215bfd979eef77(patch_hash=4313fe844324a52ef0453078a86f5d1ee2d4f406331201211020d9fa243323c4)
|
||||
specifier: github:Vencord/arrpc#82ece7442564d725d8202a8bb9bed5903ee85026
|
||||
version: https://codeload.github.com/Vencord/arrpc/tar.gz/82ece7442564d725d8202a8bb9bed5903ee85026
|
||||
electron-updater:
|
||||
specifier: 6.6.2
|
||||
version: 6.6.2(patch_hash=080505564abb2ebbda932bbf8fe91540c74dd905de994888d52ffce6f882f887)(supports-color@7.2.0)
|
||||
@@ -682,9 +681,9 @@ packages:
|
||||
resolution: {integrity: sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
||||
arrpc@https://codeload.github.com/OpenAsar/arrpc/tar.gz/2234e9c9111f4c42ebcc3aa6a2215bfd979eef77:
|
||||
resolution: {gitHosted: true, tarball: https://codeload.github.com/OpenAsar/arrpc/tar.gz/2234e9c9111f4c42ebcc3aa6a2215bfd979eef77}
|
||||
version: 3.5.0
|
||||
arrpc@https://codeload.github.com/Vencord/arrpc/tar.gz/82ece7442564d725d8202a8bb9bed5903ee85026:
|
||||
resolution: {gitHosted: true, integrity: sha512-2Tj4F1K+WEmu2gOLZC3Do8NtIPlMhLFvA2OrlE3lOV/HV9Lf8i5KboRv+NWv86zyrlCMzZUSVnzjYKPKuP3Ssw==, tarball: https://codeload.github.com/Vencord/arrpc/tar.gz/82ece7442564d725d8202a8bb9bed5903ee85026}
|
||||
version: 3.7.0
|
||||
hasBin: true
|
||||
|
||||
asn1js@3.0.10:
|
||||
@@ -1359,10 +1358,6 @@ packages:
|
||||
resolution: {integrity: sha512-eXvGGwZ5CL17ZSwHWd3bbgk7UUpF6IFHtP57NYYakPvHOs8GDgDe5KJI36jIJzDkJ6eJjuzRA8eBQb6SkKue0g==}
|
||||
engines: {node: '>=14.14'}
|
||||
|
||||
fs-extra@11.3.6:
|
||||
resolution: {integrity: sha512-w8ZNZr2mKIc7qeNaQ9AVPT1+iFaI+Avd4xudVOvdDJ8VytREi1Ft5Ih7hd9jjehod8vAM5GMsfQ/TpPf4EyoEA==}
|
||||
engines: {node: '>=14.14'}
|
||||
|
||||
fs-extra@11.4.0:
|
||||
resolution: {integrity: sha512-EQsFzMUJkCKGr1ePqlYADkIUmHW1s3ZXr5Yqy6wbGrfUCphpl2maM/kyOIRA2HpP3AaFQTZXD4ldjek+nccddA==}
|
||||
engines: {node: '>=14.14'}
|
||||
@@ -2805,8 +2800,8 @@ packages:
|
||||
wrappy@1.0.2:
|
||||
resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==}
|
||||
|
||||
ws@8.21.0:
|
||||
resolution: {integrity: sha512-Vsp28b7DRcimFQvrqu2Wek3z1iYxDCWqHYB8Qsnk/S4RfaCQzPGPyBNuVjJV3cd6UiKtUtp6sNM77gWvzcCH+g==}
|
||||
ws@8.21.3:
|
||||
resolution: {integrity: sha512-201TZ/kPWxoPr/OKWjquZR1SWKXcvxdH+e1xrx89b3YbmzLMFCLfnaG1HFIgWzJOEWZ7MvpK++odZufgYR50Rw==}
|
||||
engines: {node: '>=10.0.0'}
|
||||
peerDependencies:
|
||||
bufferutil: ^4.0.1
|
||||
@@ -2931,7 +2926,7 @@ snapshots:
|
||||
'@malept/cross-spawn-promise': 2.0.0
|
||||
debug: 4.4.3(supports-color@7.2.0)
|
||||
dir-compare: 4.2.0
|
||||
fs-extra: 11.3.6
|
||||
fs-extra: 11.4.0
|
||||
minimatch: 9.0.9
|
||||
plist: 3.1.0
|
||||
transitivePeerDependencies:
|
||||
@@ -2941,7 +2936,7 @@ snapshots:
|
||||
dependencies:
|
||||
cross-dirname: 0.1.0
|
||||
debug: 4.4.3(supports-color@7.2.0)
|
||||
fs-extra: 11.3.6
|
||||
fs-extra: 11.4.0
|
||||
minimist: 1.2.8
|
||||
postject: 1.0.0-alpha.6
|
||||
transitivePeerDependencies:
|
||||
@@ -3518,9 +3513,9 @@ snapshots:
|
||||
get-intrinsic: 1.3.0
|
||||
is-array-buffer: 3.0.5
|
||||
|
||||
arrpc@https://codeload.github.com/OpenAsar/arrpc/tar.gz/2234e9c9111f4c42ebcc3aa6a2215bfd979eef77(patch_hash=4313fe844324a52ef0453078a86f5d1ee2d4f406331201211020d9fa243323c4):
|
||||
arrpc@https://codeload.github.com/Vencord/arrpc/tar.gz/82ece7442564d725d8202a8bb9bed5903ee85026:
|
||||
dependencies:
|
||||
ws: 8.21.0
|
||||
ws: 8.21.3
|
||||
transitivePeerDependencies:
|
||||
- bufferutil
|
||||
- utf-8-validate
|
||||
@@ -4424,18 +4419,11 @@ snapshots:
|
||||
jsonfile: 6.2.1
|
||||
universalify: 2.0.1
|
||||
|
||||
fs-extra@11.3.6:
|
||||
dependencies:
|
||||
graceful-fs: 4.2.11
|
||||
jsonfile: 6.2.1
|
||||
universalify: 2.0.1
|
||||
|
||||
fs-extra@11.4.0:
|
||||
dependencies:
|
||||
graceful-fs: 4.2.11
|
||||
jsonfile: 6.2.1
|
||||
universalify: 2.0.1
|
||||
optional: true
|
||||
|
||||
fs-extra@7.0.1:
|
||||
dependencies:
|
||||
@@ -6087,7 +6075,7 @@ snapshots:
|
||||
|
||||
wrappy@1.0.2: {}
|
||||
|
||||
ws@8.21.0: {}
|
||||
ws@8.21.3: {}
|
||||
|
||||
xml-formatter@3.7.0:
|
||||
dependencies:
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
patchedDependencies:
|
||||
arrpc@3.5.0: patches/arrpc@3.5.0.patch
|
||||
electron-updater: patches/electron-updater.patch
|
||||
nodeLinker: hoisted
|
||||
allowBuilds:
|
||||
|
||||
@@ -86,8 +86,7 @@ await Promise.all([
|
||||
...NodeCommonOpts,
|
||||
entryPoints: ["src/main/arrpc/worker.ts"],
|
||||
outfile: "dist/js/arRpcWorker.js",
|
||||
footer: { js: "//# sourceURL=VesktopArRpcWorker" },
|
||||
sourcemap: false
|
||||
footer: { js: "//# sourceURL=VesktopArRpcWorker" }
|
||||
}),
|
||||
createContext({
|
||||
...NodeCommonOpts,
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
import { resolve } from "path";
|
||||
import { SESSION_DATA_DIR } from "main/constants";
|
||||
import { join, resolve } from "path";
|
||||
import { IpcCommands } from "shared/IpcEvents";
|
||||
import { MessageChannel, Worker } from "worker_threads";
|
||||
|
||||
@@ -19,6 +20,8 @@ const inviteCodeRegex = /^(\w|-)+$/;
|
||||
export async function initArRPC() {
|
||||
if (worker || !Settings.store.arRPC) return;
|
||||
|
||||
process.env.ARRPC_DETECTABLE_CACHE_PATH = join(SESSION_DATA_DIR, "arrpc-detectable-db.json");
|
||||
|
||||
try {
|
||||
const { port1: hostPort, port2: workerPort } = new MessageChannel();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user