BSB Node.js Type Definitions
    Preparing search index...

    Class SBPlugins

    BSB Plugins Controller

    This class is responsible for loading the plugins in the BSB framework. If you have a specific way of loading plugins, you can extend this class and then use your own class when creating the ServiceBase instance.

    Index

    Constructors

    • Parameters

      • cwd: string
      • devMode: boolean

      Returns SBPlugins

    Properties

    cwd: string
    nodeModulesPluginDir: string
    referencedPluginDir: string | null = null
    devMode: boolean

    Methods

    • Type Parameters

      • NamedType extends PluginType
      • ClassType extends
            | typeof BSBServiceRef
            | typeof BSBObservableRef
            | typeof BSBConfigRef
            | typeof BSBEventsRef = PluginTypeDefinitionRef<NamedType>

      Parameters

      • log: IPluginLogging
      • npmPackage: string | null
      • plugin: string
      • name: string

      Returns Promise<Result<LoadedPlugin<NamedType, ClassType>, Error>>

    • Type Parameters

      • NamedType extends PluginType
      • ClassType extends
            | typeof BSBServiceRef
            | typeof BSBObservableRef
            | typeof BSBConfigRef
            | typeof BSBEventsRef

      Parameters

      • pluginPath: string
      • pluginName: string
      • packageCwd: string
      • version: string

      Returns Promise<LoadedPlugin<NamedType, ClassType>>