From c0678385dfdd8e5aac2bf102de9bebb5eb294ca4 Mon Sep 17 00:00:00 2001 From: Trent Larson Date: Sun, 15 Mar 2026 19:33:43 -0600 Subject: [PATCH] bump version for this branch, and enhance logging with times --- BUILDING.md | 4 ++-- android/app/build.gradle | 4 ++-- package-lock.json | 14 ++++++++++++-- package.json | 2 +- src/db/databaseUtil.ts | 7 ++++--- src/utils/logger.ts | 4 ++-- 6 files changed, 23 insertions(+), 12 deletions(-) diff --git a/BUILDING.md b/BUILDING.md index 12486b32a1..2745c767b5 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -1419,8 +1419,8 @@ The recommended way to build for Android is using the automated build script: ##### 1. Bump the version in package.json, then update these versions & run: ```bash -perl -p -i -e 's/versionCode .*/versionCode 65/g' android/app/build.gradle -perl -p -i -e 's/versionName .*/versionName "1.3.8"/g' android/app/build.gradle +perl -p -i -e 's/versionCode .*/versionCode 66/g' android/app/build.gradle +perl -p -i -e 's/versionName .*/versionName "1.4.1"/g' android/app/build.gradle ``` ##### 2. Build diff --git a/android/app/build.gradle b/android/app/build.gradle index 05f4bfa841..bad4b63e61 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -37,8 +37,8 @@ android { applicationId "app.timesafari.app" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 65 - versionName "1.3.8" + versionCode 66 + versionName "1.4.1" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" aaptOptions { // Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps. diff --git a/package-lock.json b/package-lock.json index 29051497c4..646d6fbdad 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "timesafari", - "version": "1.3.8-beta", + "version": "1.4.1-beta", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "timesafari", - "version": "1.3.8-beta", + "version": "1.4.1-beta", "dependencies": { "@capacitor-community/electron": "^5.0.1", "@capacitor-community/sqlite": "6.0.2", @@ -15597,6 +15597,16 @@ "expo": "*" } }, + "node_modules/expo-server": { + "version": "55.0.6", + "resolved": "https://registry.npmjs.org/expo-server/-/expo-server-55.0.6.tgz", + "integrity": "sha512-xI72FTm469FfuuBL2R5aNtthgH+GR7ygOpsx/KcPS0K8AZaZd7VjtEExbzn9/qyyYkWW3T+3dAmCDKOMX8gdmQ==", + "optional": true, + "peer": true, + "engines": { + "node": ">=20.16.0" + } + }, "node_modules/expo/node_modules/@jest/schemas": { "version": "29.6.3", "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", diff --git a/package.json b/package.json index 54970ee1e4..a98bd98c82 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "timesafari", - "version": "1.3.8-beta", + "version": "1.4.1-beta", "description": "Gift Economies Application", "author": { "name": "Gift Economies Team" diff --git a/src/db/databaseUtil.ts b/src/db/databaseUtil.ts index 487742c968..b3aac0c7df 100644 --- a/src/db/databaseUtil.ts +++ b/src/db/databaseUtil.ts @@ -258,13 +258,14 @@ export async function logToDb( try { const platform = PlatformServiceFactory.getInstance(); + const timestamp = new Date().toISOString(); const todayKey = new Date().toDateString(); try { - memoryLogs.push(`${new Date().toISOString()} ${message}`); + memoryLogs.push(`${timestamp} ${message}`); // Insert using actual schema: date, message (no level column) await platform.dbExec("INSERT INTO logs (date, message) VALUES (?, ?)", [ - todayKey, // Use date string to match schema + timestamp, `[${level.toUpperCase()}] ${message}`, // Include level in message ]); @@ -273,7 +274,7 @@ export async function logToDb( if (!lastCleanupDate || lastCleanupDate !== todayKey) { const sevenDaysAgo = new Date( new Date().getTime() - 7 * 24 * 60 * 60 * 1000, - ).toDateString(); // Use date string to match schema + ).toISOString(); memoryLogs = memoryLogs.filter( (log) => log.split(" ")[0] > sevenDaysAgo, ); diff --git a/src/utils/logger.ts b/src/utils/logger.ts index 07e1566baa..f0f4977e75 100644 --- a/src/utils/logger.ts +++ b/src/utils/logger.ts @@ -164,10 +164,10 @@ async function logToDatabase( try { const platform = PlatformServiceFactory.getInstance(); - const todayKey = new Date().toDateString(); + const timestamp = new Date().toISOString(); await platform.dbExec("INSERT INTO logs (date, message) VALUES (?, ?)", [ - todayKey, + timestamp, `[${level.toUpperCase()}] ${message}`, ]); } catch (error) {