Skip to main content

Interface: DatabaseCommandContext

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

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

Site cache used for synchronization during operations.


configurationManager?

optional configurationManager: ConfigurationManager

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

Optional configuration manager used for validation flows.


eventEmitter

eventEmitter: TypedEventBus<UptimeEvents>

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

Event bus for emitting command execution events.


serviceFactory

serviceFactory: DatabaseServiceFactory

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

Factory for creating database services/repositories.


updateHistoryLimit()?

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

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

Optional history-limit updater for settings propagation.

Parameters

limit

number

Returns

Promise<void>