mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
fix: removing sentry
This commit is contained in:
parent
74cd60ff3d
commit
8af29abd92
24 changed files with 72 additions and 1163 deletions
|
|
@ -1,5 +1,4 @@
|
|||
import jwt from "jsonwebtoken";
|
||||
import * as Sentry from "@sentry/electron/main";
|
||||
|
||||
import { userAuthRepository } from "@main/repository";
|
||||
import { registerEvent } from "../register-event";
|
||||
|
|
@ -10,8 +9,6 @@ const getSessionHash = async (_event: Electron.IpcMainInvokeEvent) => {
|
|||
if (!auth) return null;
|
||||
const payload = jwt.decode(auth.accessToken) as jwt.JwtPayload;
|
||||
|
||||
Sentry.setContext("sessionId", payload.sessionId);
|
||||
|
||||
return payload.sessionId;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import { registerEvent } from "../register-event";
|
||||
import * as Sentry from "@sentry/electron/main";
|
||||
import {
|
||||
DownloadManager,
|
||||
HydraApi,
|
||||
|
|
@ -29,9 +28,6 @@ const signOut = async (_event: Electron.IpcMainInvokeEvent) => {
|
|||
gamesPlaytime.clear();
|
||||
});
|
||||
|
||||
/* Removes user from Sentry */
|
||||
Sentry.setUser(null);
|
||||
|
||||
/* Cancels any ongoing downloads */
|
||||
DownloadManager.cancelDownload();
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import { app, BrowserWindow, net, protocol } from "electron";
|
||||
import { init } from "@sentry/electron/main";
|
||||
import updater from "electron-updater";
|
||||
import i18n from "i18next";
|
||||
import path from "node:path";
|
||||
|
|
@ -26,12 +25,6 @@ autoUpdater.logger = logger;
|
|||
const gotTheLock = app.requestSingleInstanceLock();
|
||||
if (!gotTheLock) app.quit();
|
||||
|
||||
if (import.meta.env.MAIN_VITE_SENTRY_DSN) {
|
||||
init({
|
||||
dsn: import.meta.env.MAIN_VITE_SENTRY_DSN,
|
||||
});
|
||||
}
|
||||
|
||||
app.commandLine.appendSwitch("--no-sandbox");
|
||||
|
||||
i18n.init({
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ export class Ludusavi {
|
|||
workerData: {
|
||||
binaryPath: this.binaryPath,
|
||||
},
|
||||
maxThreads: 1,
|
||||
});
|
||||
|
||||
static async getConfig() {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import {
|
|||
userAuthRepository,
|
||||
userSubscriptionRepository,
|
||||
} from "@main/repository";
|
||||
import * as Sentry from "@sentry/electron/main";
|
||||
import { UserNotLoggedInError } from "@shared";
|
||||
import { logger } from "../logger";
|
||||
|
||||
|
|
@ -39,8 +38,6 @@ export const getUserData = () => {
|
|||
await userSubscriptionRepository.delete({ id: 1 });
|
||||
}
|
||||
|
||||
Sentry.setUser({ id: me.id, username: me.username });
|
||||
|
||||
return me;
|
||||
})
|
||||
.catch(async (err) => {
|
||||
|
|
|
|||
1
src/main/vite-env.d.ts
vendored
1
src/main/vite-env.d.ts
vendored
|
|
@ -4,7 +4,6 @@ interface ImportMetaEnv {
|
|||
readonly MAIN_VITE_STEAMGRIDDB_API_KEY: string;
|
||||
readonly MAIN_VITE_API_URL: string;
|
||||
readonly MAIN_VITE_AUTH_URL: string;
|
||||
readonly MAIN_VITE_SENTRY_DSN: string;
|
||||
readonly MAIN_VITE_CHECKOUT_URL: string;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,8 +5,6 @@ import { workerData } from "node:worker_threads";
|
|||
|
||||
const { binaryPath } = workerData;
|
||||
|
||||
let backupGameProcess: cp.ChildProcess | null = null;
|
||||
|
||||
export const backupGame = ({
|
||||
title,
|
||||
backupPath,
|
||||
|
|
@ -18,11 +16,6 @@ export const backupGame = ({
|
|||
preview?: boolean;
|
||||
winePrefix?: string;
|
||||
}) => {
|
||||
if (backupGameProcess && !backupGameProcess.killed) {
|
||||
backupGameProcess.kill();
|
||||
backupGameProcess = null;
|
||||
}
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
const args = ["backup", title, "--api", "--force"];
|
||||
|
||||
|
|
@ -30,16 +23,14 @@ export const backupGame = ({
|
|||
if (backupPath) args.push("--path", backupPath);
|
||||
if (winePrefix) args.push("--wine-prefix", winePrefix);
|
||||
|
||||
backupGameProcess = cp.execFile(
|
||||
cp.execFile(
|
||||
binaryPath,
|
||||
args,
|
||||
(err: cp.ExecFileException | null, stdout: string) => {
|
||||
if (err) {
|
||||
backupGameProcess = null;
|
||||
return reject(err);
|
||||
}
|
||||
|
||||
backupGameProcess = null;
|
||||
return resolve(JSON.parse(stdout) as LudusaviBackup);
|
||||
}
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue