@flowscripter/dynamic-cli-framework
    Preparing search index...

    Interface ServiceProvider

    Interface allowing a service to be provided to the CLI.

    interface ServiceProvider {
        serviceId: string;
        servicePriority: number;
        getServiceInfo(cliConfig: CLIConfig): Promise<ServiceInfo>;
        initService(context: Context): Promise<void>;
    }

    Implemented by

    Index
    serviceId: string

    The ID which identifies the service provided.

    servicePriority: number

    Used to determine the order in which multiple service instances will be initialised. Higher values will be initialised before lower values.

    • Return ServiceInfo containing the service and any commands it provides which should be registered in the CLI.

      Parameters

      Returns Promise<ServiceInfo>

    • Initialise the service. This will be invoked AFTER any GlobalModifierCommand provided in the ServiceInfo have been invoked (if specified as CLI arguments or CLI configuration).

      NOTE: Other services within the provided context will only have been initialised if they have a higher servicePriority value than the current service.

      Parameters

      Returns Promise<void>