mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-02-28 06:22:45 -08:00
refactor: extract overlay bootstrap runtime wiring
This commit is contained in:
30
src/main/runtime/overlay-runtime-bootstrap-handlers.ts
Normal file
30
src/main/runtime/overlay-runtime-bootstrap-handlers.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
import { createBuildInitializeOverlayRuntimeBootstrapMainDepsHandler } from './app-runtime-main-deps';
|
||||
import { createInitializeOverlayRuntimeHandler } from './overlay-runtime-bootstrap';
|
||||
import { createBuildInitializeOverlayRuntimeOptionsHandler } from './overlay-runtime-options';
|
||||
import { createBuildInitializeOverlayRuntimeMainDepsHandler } from './overlay-runtime-options-main-deps';
|
||||
|
||||
type InitializeOverlayRuntimeMainDeps = Parameters<
|
||||
typeof createBuildInitializeOverlayRuntimeMainDepsHandler
|
||||
>[0];
|
||||
type InitializeOverlayRuntimeBootstrapMainDeps = Parameters<
|
||||
typeof createBuildInitializeOverlayRuntimeBootstrapMainDepsHandler
|
||||
>[0];
|
||||
|
||||
export function createOverlayRuntimeBootstrapHandlers(deps: {
|
||||
initializeOverlayRuntimeMainDeps: InitializeOverlayRuntimeMainDeps;
|
||||
initializeOverlayRuntimeBootstrapDeps: Omit<InitializeOverlayRuntimeBootstrapMainDeps, 'buildOptions'>;
|
||||
}) {
|
||||
const buildInitializeOverlayRuntimeOptionsHandler = createBuildInitializeOverlayRuntimeOptionsHandler(
|
||||
createBuildInitializeOverlayRuntimeMainDepsHandler(deps.initializeOverlayRuntimeMainDeps)(),
|
||||
);
|
||||
const initializeOverlayRuntime = createInitializeOverlayRuntimeHandler(
|
||||
createBuildInitializeOverlayRuntimeBootstrapMainDepsHandler({
|
||||
...deps.initializeOverlayRuntimeBootstrapDeps,
|
||||
buildOptions: () => buildInitializeOverlayRuntimeOptionsHandler(),
|
||||
})(),
|
||||
);
|
||||
|
||||
return {
|
||||
initializeOverlayRuntime,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user