Skip to main content

Interface: DatabaseCommandContext

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

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:29

Site cache used for synchronization during operations.


configurationManager?

optional configurationManager?: ConfigurationManager

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

Optional configuration manager used for validation flows.


eventEmitter

eventEmitter: TypedEventBus<UptimeEvents>

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

Event bus for emitting command execution events.


serviceFactory

serviceFactory: DatabaseServiceFactory

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

Factory for creating database services/repositories.


updateHistoryLimit?

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

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

Optional history-limit updater for settings propagation.

Parameters

limit

number

Returns

Promise<void>