mirror of
https://github.com/ivabus/gui
synced 2025-06-06 23:30:26 +03:00
Tea cli version tracking (#608)
* bump 0.2.7 * #595 track tea version in sentry * #595 add teaVersion to sesssion * bump v0.2.13 --------- Co-authored-by: neil molina <neil@neils-MacBook-Pro.local>
This commit is contained in:
parent
34cd8324ea
commit
24ff5f23ee
6 changed files with 11 additions and 6 deletions
|
@ -14,7 +14,7 @@ import initializePushNotification, {
|
|||
syncPackageTopicSubscriptions
|
||||
} from "./libs/push-notification";
|
||||
|
||||
import init from "./libs/initialize";
|
||||
import init, { initializeTeaCli } from "./libs/initialize";
|
||||
import { readSessionData } from "./libs/auth";
|
||||
|
||||
import { isDev } from "./libs/auto-updater";
|
||||
|
@ -38,10 +38,11 @@ if (app.isPackaged) {
|
|||
}
|
||||
});
|
||||
Sentry.configureScope(async (scope) => {
|
||||
const session = await readSessionData();
|
||||
const [session, cliVersion] = await Promise.all([readSessionData(), initializeTeaCli()]);
|
||||
scope.setUser({
|
||||
id: session.device_id, // device_id this should exist in our pg db: developer_id is to many device_id
|
||||
username: session?.user?.login || "" // github username or handler
|
||||
username: session?.user?.login || "", // github username or handler
|
||||
tea: cliVersion
|
||||
});
|
||||
});
|
||||
setSentryLogging(Sentry);
|
||||
|
|
|
@ -18,6 +18,7 @@ export interface Session {
|
|||
key?: string;
|
||||
user?: any;
|
||||
locale?: string;
|
||||
teaVersion?: string;
|
||||
}
|
||||
|
||||
let sessionMemory: Session = { device_id: "", locale: "en" };
|
||||
|
|
|
@ -40,7 +40,8 @@ export default function initializeHandlers({ notifyMainWindow }: HandlerOptions)
|
|||
ipcMain.handle("get-session", async () => {
|
||||
try {
|
||||
log.info("getting session");
|
||||
const session = await readSessionData();
|
||||
const [session, cliVersion] = await Promise.all([readSessionData(), initializeTeaCli()]);
|
||||
session.teaVersion = cliVersion;
|
||||
log.debug(session ? "found session data" : "no session data found");
|
||||
return session;
|
||||
} catch (error) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "tea",
|
||||
"version": "0.2.12",
|
||||
"version": "0.2.13",
|
||||
"private": true,
|
||||
"description": "tea gui app",
|
||||
"author": "tea.xyz",
|
||||
|
|
|
@ -15,7 +15,8 @@ export async function initSentry(session?: Session) {
|
|||
Sentry.configureScope(async (scope) => {
|
||||
scope.setUser({
|
||||
id: session.device_id, // device_id this should exist in our pg db: developer_id is to many device_id
|
||||
username: session?.user?.login || "" // github username or handler
|
||||
username: session?.user?.login || "", // github username or handler
|
||||
tea: session?.teaVersion || "unknown"
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
@ -57,6 +57,7 @@ export interface Session {
|
|||
key?: string;
|
||||
user?: Developer;
|
||||
locale?: string;
|
||||
teaVersion?: string;
|
||||
}
|
||||
|
||||
export enum SideMenuOptions {
|
||||
|
|
Loading…
Reference in a new issue