Skip to main content

Interface: DatabaseCommandContext

Defined in: electron/services/commands/databaseCommandContext.ts:28

Dependencies required by database commands.

Remarks

Database commands are designed to support two construction patterns:

  1. Explicit arguments: (serviceFactory, eventEmitter, cache, ...)
  2. Context object: ({ serviceFactory, eventEmitter, cache, ... })

This interface centralizes the context contract and enables shared runtime narrowing helpers.

Properties

cache

cache: StandardizedCache<Site>;

Defined in: electron/services/commands/databaseCommandContext.ts:30

Site cache used for synchronization during operations.


configurationManager?

optional configurationManager?: ConfigurationManager;

Defined in: electron/services/commands/databaseCommandContext.ts:32

Optional configuration manager used for validation flows.


eventEmitter

eventEmitter: TypedEventBus<UptimeEvents>;

Defined in: electron/services/commands/databaseCommandContext.ts:34

Event bus for emitting command execution events.


serviceFactory

serviceFactory: DatabaseCommandServiceFactory;

Defined in: electron/services/commands/databaseCommandContext.ts:36

Factory for creating database services/repositories.


updateHistoryLimit?

optional updateHistoryLimit?: (limit: number) => Promise<void>;

Defined in: electron/services/commands/databaseCommandContext.ts:38

Optional history-limit updater for settings propagation.

Parameters

limit

number

Returns

Promise<void>