Browse Source

make fixes to help my Mac build electron

pull/134/head
Trent Larson 5 days ago
parent
commit
59d711bd90
  1. 2
      package.json
  2. 0
      scripts/build-electron.cjs
  3. 8
      src/services/platforms/ElectronPlatformService.ts

2
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 .",

0
scripts/build-electron.js → scripts/build-electron.cjs

8
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<void> | null = null;
private dbName = "timesafari";
private readonly MAX_RETRIES = 3;
private readonly RETRY_DELAY = 1000; // 1 second
private dbFatalError = false;
constructor() {

Loading…
Cancel
Save