From 0732f51ecad5888a3fca4d4c16348441df0e65d8 Mon Sep 17 00:00:00 2001 From: Bruno Perel Date: Thu, 26 Dec 2024 14:20:42 +0100 Subject: [PATCH] whattheduck: Replace console.log() with console.info() --- apps/whattheduck/src/App.vue | 6 +++--- apps/whattheduck/src/composables/usePersistedData.ts | 6 +++--- apps/whattheduck/src/main.ts | 2 +- apps/whattheduck/src/stores/app.ts | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/apps/whattheduck/src/App.vue b/apps/whattheduck/src/App.vue index 94a46fea2..d4cd307e3 100644 --- a/apps/whattheduck/src/App.vue +++ b/apps/whattheduck/src/App.vue @@ -101,7 +101,7 @@ const updateBundle = async () => { const currentBundleVersion = (await CapacitorUpdater.current())?.bundle.version; try { const bundle = await socket.value!.app.services.getBundleUrl({ version: currentBundleVersion }); - console.log('Latest bundle', bundle); + console.info('Latest bundle', bundle); if (Capacitor.isNativePlatform() && 'url' in bundle && bundle.url) { CapacitorUpdater.addListener('download', ({ percent }) => { bundleDownloadProgress.value = percent / 100; @@ -116,11 +116,11 @@ const updateBundle = async () => { await CapacitorUpdater.set(bundleInfo); } } catch (e) { - console.log('getBundleUrl failed', e); + console.info('getBundleUrl failed', e); const { error, errorDetails } = e as unknown as { error: string; errorDetails: string }; switch (error) { case 'Already up to date': - console.log('Bundle is already up to date'); + console.info('Bundle is already up to date'); break; default: console.warn(error, errorDetails); diff --git a/apps/whattheduck/src/composables/usePersistedData.ts b/apps/whattheduck/src/composables/usePersistedData.ts index 8fda0f52b..8dfa91030 100644 --- a/apps/whattheduck/src/composables/usePersistedData.ts +++ b/apps/whattheduck/src/composables/usePersistedData.ts @@ -2,10 +2,10 @@ import type { Storage } from '@ionic/storage'; export default async (entries: Record>): Promise => { const storage = injectLocal('storage')!; - console.log('keys in cache: ', JSON.stringify(Object.entries(storage.keys()))); + console.info('keys in cache: ', JSON.stringify(Object.entries(storage.keys()))); for (const [storageKey, persistedRef] of Object.entries(entries)) { const storageValue = await storage.get(storageKey); - console.log({ storageKey, storageValue }); + console.info({ storageKey, storageValue }); if (storageValue !== null) { try { persistedRef.value = JSON.parse(storageValue); @@ -18,7 +18,7 @@ export default async (entries: Record>): Promise => { watch( Object.values(entries), async () => { - console.log('saving entries', entries); + console.info('saving entries', entries); for (const [storageKey, persistedRef] of Object.entries(entries)) { await storage.set(storageKey, JSON.stringify(persistedRef.value)); } diff --git a/apps/whattheduck/src/main.ts b/apps/whattheduck/src/main.ts index 3e6fb031d..2ad2cbc35 100644 --- a/apps/whattheduck/src/main.ts +++ b/apps/whattheduck/src/main.ts @@ -80,7 +80,7 @@ router.isReady().then(async () => { name: 'whattheduck', }); await storage.create(); - console.log({ 'storage driver': storage.driver }); + console.info({ 'storage driver': storage.driver }); app.provide('storage', storage); app.mount('#app'); }); diff --git a/apps/whattheduck/src/stores/app.ts b/apps/whattheduck/src/stores/app.ts index fa46d1ad0..af9512566 100644 --- a/apps/whattheduck/src/stores/app.ts +++ b/apps/whattheduck/src/stores/app.ts @@ -168,11 +168,11 @@ export const app = defineStore('app', () => { }, ] as const; - console.log('token before usePersistedData', token.value); + console.info('token before usePersistedData', token.value); usePersistedData({ token, }).then(() => { - console.log({ token: token.value }); + console.info({ token: token.value }); if (!token.value) { token.value = null; }