@ -1,47 +1,31 @@
/ * *
* @file Capacitor Platform Entry Point
* @description Initializes the application for Capacitor platform ( iOS / Android )
* @file Capacitor Main Entry Point
* @author Matthew Raymer
* @version 0.4 . 4
*
* Process Flow :
* 1 . Initialization
* - Logs start of initialization
* - Logs current platform
* - Initializes core application via main . common
* This file initializes the deep linking system for the TimeSafari app .
* It sets up the connection between Capacitor ' s URL handling and our deep link processor .
*
* 2 . Error Handling Setup
* - Registers global unhandled promise rejection handler
* - Routes API errors to error handling system
* Deep Linking Flow :
* 1 . Capacitor receives URL open event
* 2 . Event is passed to DeepLinkHandler
* 3 . URL is validated and processed
* 4 . Router navigates to appropriate view
*
* 3 . Deep Linking Configuration
* - Registers URL scheme handler ( timesafari : //)
* - Supports 11 parameterized routes :
* * claim - add - raw
* * claim - cert
* * claim
* * confirm - gift
* * contact - edit
* * contact - import
* * did
* * invite - one - accept
* * offer - details
* * project
* * userProfile
* Integration Points :
* - Capacitor App plugin for URL handling
* - Vue Router for navigation
* - Error handling system
* - Logging system
*
* 4 . Application Mounting
* - Mounts Vue application to DOM
* - Logs completion of mounting process
* Type Safety :
* - Uses DeepLinkHandler for type - safe parameter processing
* - Ensures type safety between Capacitor events and app routing
* - Maintains type checking through the entire deep link flow
*
* Security Measures :
* - URL validation before processing
* - Type - safe error handling
* - Parameterized route pattern matching
* - Comprehensive error logging
*
* @example Deep Link Format
* timesafari : //<route>/<parameter>
* timesafari : //claim/01JMAAFZRNSRTQ0EBSD70A8E1H
* @example
* // URL open event from OS
* timesafari : //claim/123?view=details
* // Processed and routed to appropriate view with type-safe parameters
* /
import { initializeApp } from "./main.common" ;
@ -88,7 +72,9 @@ const handleDeepLink = async (data: { url: string }) => {
await deepLinkHandler . handleDeepLink ( data . url ) ;
} catch ( error ) {
logConsoleAndDb ( "[DeepLink] Error handling deep link: " + error , true ) ;
handleApiError ( error , "deep-link" ) ;
handleApiError ( {
message : error instanceof Error ? error.message : String ( error )
} as AxiosError , "deep-link" ) ;
}
} ;