bump version for this branch, and enhance logging with times
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
14
package-lock.json
generated
14
package-lock.json
generated
@@ -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",
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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,
|
||||
);
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user