mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-03-25 00:11:26 -07:00
feat(core): add Electron runtime, services, and app composition
This commit is contained in:
16
src/main/runtime/protocol-url-handlers-main-deps.ts
Normal file
16
src/main/runtime/protocol-url-handlers-main-deps.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import type { registerProtocolUrlHandlers } from './protocol-url-handlers';
|
||||
|
||||
type RegisterProtocolUrlHandlersMainDeps = Parameters<typeof registerProtocolUrlHandlers>[0];
|
||||
|
||||
export function createBuildRegisterProtocolUrlHandlersMainDepsHandler(
|
||||
deps: RegisterProtocolUrlHandlersMainDeps,
|
||||
) {
|
||||
return (): RegisterProtocolUrlHandlersMainDeps => ({
|
||||
registerOpenUrl: (listener) => deps.registerOpenUrl(listener),
|
||||
registerSecondInstance: (listener) => deps.registerSecondInstance(listener),
|
||||
handleAnilistSetupProtocolUrl: (rawUrl: string) => deps.handleAnilistSetupProtocolUrl(rawUrl),
|
||||
findAnilistSetupDeepLinkArgvUrl: (argv: string[]) => deps.findAnilistSetupDeepLinkArgvUrl(argv),
|
||||
logUnhandledOpenUrl: (rawUrl: string) => deps.logUnhandledOpenUrl(rawUrl),
|
||||
logUnhandledSecondInstanceUrl: (rawUrl: string) => deps.logUnhandledSecondInstanceUrl(rawUrl),
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user