mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-05-04 04:42:37 +02:00
tighten browser DI registration and extract page scripts
This commit is contained in:
parent
397c499b72
commit
5ee4f8a848
4 changed files with 564 additions and 553 deletions
|
|
@ -15,6 +15,7 @@ import { IAbortRegistry, InMemoryAbortRegistry } from "../runs/abort-registry.js
|
|||
import { FSAgentScheduleRepo, IAgentScheduleRepo } from "../agent-schedule/repo.js";
|
||||
import { FSAgentScheduleStateRepo, IAgentScheduleStateRepo } from "../agent-schedule/state-repo.js";
|
||||
import { FSSlackConfigRepo, ISlackConfigRepo } from "../slack/repo.js";
|
||||
import type { IBrowserControlService } from "../application/browser-control/service.js";
|
||||
|
||||
const container = createContainer({
|
||||
injectionMode: InjectionMode.PROXY,
|
||||
|
|
@ -43,9 +44,8 @@ container.register({
|
|||
|
||||
export default container;
|
||||
|
||||
export function registerContainerValues(values: Record<string, unknown>): void {
|
||||
const registrations = Object.fromEntries(
|
||||
Object.entries(values).map(([key, value]) => [key, asValue(value)]),
|
||||
);
|
||||
container.register(registrations);
|
||||
export function registerBrowserControlService(service: IBrowserControlService): void {
|
||||
container.register({
|
||||
browserControlService: asValue(service),
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue