diff --git a/package.json b/package.json index 56e97c53..9ec0b17a 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "build:pywebview": "vite build --config vite.config.pywebview.mts", "build:web": "VITE_GIT_HASH=`git log -1 --pretty=format:%h` vite build --config vite.config.web.mts", "build:web:electron": "VITE_GIT_HASH=`git log -1 --pretty=format:%h` vite build --config vite.config.web.mts && VITE_GIT_HASH=`git log -1 --pretty=format:%h` vite build --config vite.config.electron.mts --mode electron", - "build:electron": "npm run clean:electron && npm run build:web:electron && tsc -p tsconfig.electron.json && vite build --config vite.config.electron.mts && node scripts/build-electron.js", + "build:electron": "npm run clean:electron && npm run build:web:electron && tsc -p tsconfig.electron.json && vite build --config vite.config.electron.mts && node scripts/build-electron.cjs", "build:capacitor": "vite build --mode capacitor --config vite.config.capacitor.mts", "electron:dev": "npm run build && electron .", "electron:start": "electron .", diff --git a/scripts/build-electron.js b/scripts/build-electron.cjs similarity index 100% rename from scripts/build-electron.js rename to scripts/build-electron.cjs diff --git a/src/services/platforms/ElectronPlatformService.ts b/src/services/platforms/ElectronPlatformService.ts index 65cbf1ba..3ba1be0c 100644 --- a/src/services/platforms/ElectronPlatformService.ts +++ b/src/services/platforms/ElectronPlatformService.ts @@ -5,10 +5,7 @@ import { } from "../PlatformService"; import { logger } from "../../utils/logger"; import { QueryExecResult } from "@/interfaces/database"; -import { - SQLiteConnection, - SQLiteDBConnection, -} from "@capacitor-community/sqlite"; +import { SQLiteDBConnection } from "@capacitor-community/sqlite"; import { DEFAULT_ENDORSER_API_SERVER } from "@/constants/app"; import { DatabaseConnectionPool } from "../database/ConnectionPool"; @@ -30,9 +27,6 @@ export class ElectronPlatformService implements PlatformService { private connection: SQLiteDBConnection | null = null; private connectionPool: DatabaseConnectionPool; private initializationPromise: Promise | null = null; - private dbName = "timesafari"; - private readonly MAX_RETRIES = 3; - private readonly RETRY_DELAY = 1000; // 1 second private dbFatalError = false; constructor() {