- Add proper handling of QRScannerOptions in startScan method
- Implement camera selection (front/back) via options.camera
- Add video preview toggle via options.showPreview
- Store options as class property for persistence
- Improve logging with options context
- Fix TypeScript error for unused options parameter
This change makes the QR scanner more configurable and properly
implements the QRScannerService interface contract.
- Add early validation for route paths to prevent undefined access
- Introduce INVALID_ROUTE error type with detailed error information
- Simplify parameter mapping using nullish coalescing operator
- Improve type safety in parseDeepLink method
- Add better error details for invalid route paths
This change prevents potential runtime errors from undefined route access
and provides clearer error messages for invalid deep links.
- Add camera state tracking and listener management
- Implement addCameraStateListener and removeCameraStateListener methods
- Add state transitions during scanning operations
- Improve error handling with state updates
- Add proper type imports for CameraState and CameraStateListener
This change ensures CapacitorQRScanner fully implements the QRScannerService
interface and provides proper camera state feedback to consumers. Camera state
is now tracked through the entire lifecycle of scanning operations, with
appropriate state transitions for initialization, active scanning, errors,
and cleanup.
- Create type declarations in interfaces/absurd-sql.d.ts
- Import and use proper QueryExecResult and SqlValue types
- Add declarations for all required modules:
- @jlongster/sql.js
- absurd-sql
- absurd-sql/dist/indexeddb-backend
- absurd-sql/dist/indexeddb-main-thread
- Ensure type safety for database operations
This change resolves TypeScript errors about missing type declarations
while maintaining proper type safety for database operations. The
declarations are placed in the interfaces folder to match the project's
type organization.
- Move external module type declarations to dedicated .d.ts file
- Make SQL.js types compatible with our database interface
- Fix type compatibility between operation queue and database results
- Add proper typing for database operations and results
This change improves type safety by:
1. Properly declaring types for external modules
2. Ensuring database operation results match our interface
3. Making the operation queue type-safe with generics
4. Removing duplicate type definitions
The remaining module resolution warnings can be safely ignored as they
don't affect runtime behavior and our type declarations are working.
- Make QueuedOperation interface generic to properly handle operation types
- Fix type compatibility between queue operations and their resolvers
- Use explicit typing for operation queue to handle generic types
- Maintain type safety while allowing different operation return types
This fixes a TypeScript error where the operation queue's resolve function
was not properly typed to handle generic return types from database operations.
- Add permission checks before writeFile and writeAndShareFile operations
- Reuse existing checkStoragePermissions method for Android devices
- Maintain iOS-specific handling (early return for iOS permission model)
- Improve error handling and logging for permission-related issues
This change ensures proper storage permission handling on Android devices
while maintaining the existing iOS behavior. The permission checks run
before any file write operations, providing better error handling and
user experience.
- Update worker format to ESM in Vite config to fix IIFE format error
- Increase PWA precache file size limit to 10MB to accommodate SQL.js files
- Fix type declarations for worker configuration
- Add proper type annotations for Vite config
- Add type declarations for absurd-sql module
- Configure ESLint to ignore node_modules
- Add VS Code settings for Java diagnostics
This fixes the Android build issues and improves the development
environment by properly ignoring node_modules in linting and
diagnostics.
- Move queryResult and allResult declarations outside switch statement
- Change const declarations to let since they're now in outer scope
- Remove const declarations from inside case blocks
This fixes the 'no-case-declarations' linter errors by ensuring variables
are declared in a scope that encompasses all case blocks, preventing
potential scoping issues.
Note: Type definition errors for external modules remain and should be
addressed separately.
- Replace any[] with SqlValue[] type for SQL parameters in runMigrations
- Update import to use QueryExecResult from interfaces/database
- Add proper typing for SQL parameter values (string | number | null | Uint8Array)
This change improves type safety and helps catch potential SQL parameter
type mismatches at compile time, reducing the risk of runtime errors
or data corruption.
Add SQLite database implementation with comprehensive features:
- Core database functionality:
- Connection management and pooling
- Schema creation and validation
- Transaction support with rollback
- Backup and restore capabilities
- Health checks and integrity verification
- Data migration:
- Migration utilities from Dexie to SQLite
- Data transformation and validation
- Migration verification and rollback
- Backup before migration
- CRUD operations for all entities:
- Accounts, contacts, and contact methods
- Settings and secrets
- Logging and audit trails
- Type safety and error handling:
- Full TypeScript type definitions
- Runtime data validation
- Comprehensive error handling
- Transaction safety
Note: Requires @wa-sqlite/sql.js package to be installed