forked from trent_larson/crowd-funder-for-time-pwa
Integrate TypeScript type checking into build process with conditional execution
- Add type checking to build scripts for production/test builds only - Fix TypeScript errors in migration service, router, and platform services - Add electronAPI type declarations for Electron platform - Remove type checking from development builds for faster hot reload - Update tsconfig.node.json to resolve configuration conflicts - Ensure type safety for production while maintaining fast development workflow
This commit is contained in:
@@ -11,7 +11,6 @@ import {
|
||||
SQLiteConnection,
|
||||
SQLiteDBConnection,
|
||||
CapacitorSQLite,
|
||||
capSQLiteChanges,
|
||||
DBSQLiteValues,
|
||||
} from "@capacitor-community/sqlite";
|
||||
|
||||
@@ -496,19 +495,17 @@ export class CapacitorPlatformService implements PlatformService {
|
||||
const sqlExec = async (
|
||||
sql: string,
|
||||
params?: unknown[],
|
||||
): Promise<capSQLiteChanges> => {
|
||||
): Promise<void> => {
|
||||
logger.debug(`🔧 [CapacitorMigration] Executing SQL:`, sql);
|
||||
|
||||
if (params && params.length > 0) {
|
||||
// Use run method for parameterized queries (prepared statements)
|
||||
// This is essential for proper parameter binding and SQL injection prevention
|
||||
const result = await this.db!.run(sql, params);
|
||||
return result;
|
||||
await this.db!.run(sql, params);
|
||||
} else {
|
||||
// Use execute method for non-parameterized queries
|
||||
// This is more efficient for simple DDL statements
|
||||
const result = await this.db!.execute(sql);
|
||||
return result;
|
||||
await this.db!.execute(sql);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user