diff --git a/modules/desktop/electron/libs/cli.ts b/modules/desktop/electron/libs/cli.ts index 32fa8cc..4ac4c88 100644 --- a/modules/desktop/electron/libs/cli.ts +++ b/modules/desktop/electron/libs/cli.ts @@ -6,7 +6,7 @@ import { hooks } from "@teaxyz/lib"; import log from "./logger"; import { MainWindowNotifier } from "./types"; -import { Installation, Package, porcelain } from "@teaxyz/lib"; +import { Installation, porcelain } from "@teaxyz/lib"; import type { Resolution } from "@teaxyz/lib/script/src/plumbing/resolve"; export async function installPackage( @@ -19,7 +19,7 @@ export async function installPackage( const qualifedPackage = `${full_name}@${version}`; log.info(`installing package ${qualifedPackage}`); const result = await porcelain.install(qualifedPackage, notifier); - console.log(`successfully installed ${qualifedPackage}`, result); + log.info(`successfully installed ${qualifedPackage}`, result); } function newInstallProgressNotifier(full_name: string, notifyMainWindow: MainWindowNotifier) { diff --git a/modules/desktop/electron/libs/tea-dir.ts b/modules/desktop/electron/libs/tea-dir.ts index 809031c..a178031 100644 --- a/modules/desktop/electron/libs/tea-dir.ts +++ b/modules/desktop/electron/libs/tea-dir.ts @@ -184,12 +184,12 @@ export async function cacheImage(url: string): Promise { if (!fs.existsSync(imagePath)) { try { await downloadImage(url, imagePath); - console.log("Image downloaded and cached:", imagePath); + log.info("Image downloaded and cached:", imagePath); } catch (error) { - console.error("Failed to download image:", error); + log.error("Failed to download image:", error); } } else { - console.log("Image already cached:", imagePath); + log.info("Image already cached:", imagePath); } return `file://${imagePath}`; diff --git a/modules/desktop/src/components/discover-packages/discover-packages.svelte b/modules/desktop/src/components/discover-packages/discover-packages.svelte index 386ec1e..7e2096b 100644 --- a/modules/desktop/src/components/discover-packages/discover-packages.svelte +++ b/modules/desktop/src/components/discover-packages/discover-packages.svelte @@ -21,7 +21,6 @@ .sort((a, b) => { return a.manual_sorting - b.manual_sorting; }); - console.log("test", packages);
diff --git a/modules/desktop/src/libs/v1-client.ts b/modules/desktop/src/libs/v1-client.ts index afe7b02..fd4042f 100644 --- a/modules/desktop/src/libs/v1-client.ts +++ b/modules/desktop/src/libs/v1-client.ts @@ -3,6 +3,7 @@ import type { Session } from "$libs/types"; import bcrypt from "bcryptjs"; import { getSession } from "$libs/stores/auth"; import { getHeaders } from "@native"; +import log from "./logger"; export const baseUrl = "https://api.tea.xyz/v1"; @@ -10,7 +11,7 @@ export async function get( urlPath: string, params?: { [key: string]: string } ): Promise { - console.log(`GET /v1/${urlPath}`); + log.info(`GET /v1/${urlPath}`); const headers = await getHeaders(`GET/${urlPath}`); delete headers["User-Agent"]; // this is in the browser, not allowed to modify UserAgent