Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface CliOpts<ConfigType>

Type parameters

  • ConfigType: Record<string, unknown>

Hierarchy

  • CliOpts

Index

Properties

Optional bridgeConfig

bridgeConfig: { affectsRegistration?: boolean; defaults: Record<string, unknown>; schema: string | Record<string, unknown> }

Bridge-specific config info. If not defined, --config option will not be present in the CLI

Type declaration

  • Optional affectsRegistration?: boolean

    If true, the config will be required when generating a registration file.

  • defaults: Record<string, unknown>

    The default options for the config file.

  • schema: string | Record<string, unknown>

    Path to a schema YAML file (string) or the parsed schema file (object).

Optional enableLocalpart

enableLocalpart: boolean

Enable '--localpart [-l]' to allow users to configure the bot localpart.

default

true

Optional enableRegistration

enableRegistration: boolean

Enable '--generate-registration' to allow users to generate a registration file.

default

true

Optional generateRegistration

generateRegistration: (reg: AppServiceRegistration, cb: (finalReg: AppServiceRegistration) => void) => void

The function called when you should generate a registration. Must be defined unless enableRegistration is false.

Type declaration

Optional noUrl

noUrl: boolean

Don't ask user for appservice url when generating registration.

default

false

Optional onConfigChanged

onConfigChanged: (config: ConfigType) => void

This function is when the config is hot-reloaded. If not defined, hot-reloading is disabled.

You can hot-reload the bridge by sending a SIGHUP signal to the bridge.

Type declaration

    • (config: ConfigType): void
    • Parameters

      • config: ConfigType

      Returns void

Optional registrationPath

registrationPath: string

The path to write the registration file to. Users can overwrite this with -f.

default

"registration.yaml"

run

run: (port: null | number, config: null | ConfigType, registration: null | AppServiceRegistration) => void

This function called when you should run the bridge.

Type declaration

Generated using TypeDoc