make fixes to help my Mac build electron
This commit is contained in:
@@ -24,7 +24,7 @@
|
|||||||
"build:pywebview": "vite build --config vite.config.pywebview.mts",
|
"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": "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: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",
|
"build:capacitor": "vite build --mode capacitor --config vite.config.capacitor.mts",
|
||||||
"electron:dev": "npm run build && electron .",
|
"electron:dev": "npm run build && electron .",
|
||||||
"electron:start": "electron .",
|
"electron:start": "electron .",
|
||||||
|
|||||||
@@ -5,10 +5,7 @@ import {
|
|||||||
} from "../PlatformService";
|
} from "../PlatformService";
|
||||||
import { logger } from "../../utils/logger";
|
import { logger } from "../../utils/logger";
|
||||||
import { QueryExecResult } from "@/interfaces/database";
|
import { QueryExecResult } from "@/interfaces/database";
|
||||||
import {
|
import { SQLiteDBConnection } from "@capacitor-community/sqlite";
|
||||||
SQLiteConnection,
|
|
||||||
SQLiteDBConnection,
|
|
||||||
} from "@capacitor-community/sqlite";
|
|
||||||
import { DEFAULT_ENDORSER_API_SERVER } from "@/constants/app";
|
import { DEFAULT_ENDORSER_API_SERVER } from "@/constants/app";
|
||||||
import { DatabaseConnectionPool } from "../database/ConnectionPool";
|
import { DatabaseConnectionPool } from "../database/ConnectionPool";
|
||||||
|
|
||||||
@@ -30,9 +27,6 @@ export class ElectronPlatformService implements PlatformService {
|
|||||||
private connection: SQLiteDBConnection | null = null;
|
private connection: SQLiteDBConnection | null = null;
|
||||||
private connectionPool: DatabaseConnectionPool;
|
private connectionPool: DatabaseConnectionPool;
|
||||||
private initializationPromise: Promise<void> | null = null;
|
private initializationPromise: Promise<void> | null = null;
|
||||||
private dbName = "timesafari";
|
|
||||||
private readonly MAX_RETRIES = 3;
|
|
||||||
private readonly RETRY_DELAY = 1000; // 1 second
|
|
||||||
private dbFatalError = false;
|
private dbFatalError = false;
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
|
|||||||
Reference in New Issue
Block a user