- architecture tweaks for scalability
- added option for global debug logs
- added option for cef debug mode to run in browser only
This commit is contained in:
2024-10-27 14:53:55 +00:00
parent 640adae8a5
commit e2e58e100a
6 changed files with 156 additions and 50 deletions
+22 -14
View File
@@ -18,6 +18,28 @@ export enum Errors {
EVENT_RESPONSE_TIMEOUT = 'Response was timed out after 10s of inactivity',
}
export type RPCState = {
eventName: string
uuid: string
calledFrom: Environment
calledTo: Environment
knownError?: string
data?: any
type: RPCEventType
}
export type PlayerMp = {
call: (event: string, args?: unknown[]) => void
}
export interface RpcWrapperConfig {
forceBrowserDevMode?: boolean
}
export interface RpcConfig extends RpcWrapperConfig {
debugLogs?: boolean
}
export class Utils {
public static getEnvironment(): Environment {
if ('joaat' in mp) return Environment.SERVER
@@ -67,25 +89,11 @@ export class Utils {
}
}
export type RPCState = {
eventName: string
uuid: string
calledFrom: Environment
calledTo: Environment
knownError?: string
data?: any
type: RPCEventType
}
export enum RPCEventType {
EVENT = 'event',
RESPONSE = 'response',
}
export type PlayerMp = {
call: (event: string, args?: unknown[]) => void
}
export const nativeClientEvents = new Set([
'browserCreated',
'browserDomReady',