Options
All
  • Public
  • Public/Protected
  • All
Menu

StorageSyncer will install every module what is declared into the storage When the module is redeclared, module is installed and uninstalled

TODO: Probably only installer because here we do not use any advantages of the syncer

collboard-system

Hierarchy

  • AbstractSyncer
    • StorageSyncer

Implements

Index

Constructors

  • new StorageSyncer(systems: ISystemsExtended, options?: IStorageSyncerOptions): StorageSyncer
  • Parameters

    • systems: ISystemsExtended
    • Optional options: IStorageSyncerOptions

    Returns StorageSyncer

Properties

declareOneModule: any
modulesStorage: IModulesStorageStrong
options: any
ready: Promise<void>

Promise which is resolved when the system is initialized and ready to use.

systems: ISystemsExtended

Accessors

  • get firstSynchronization(): Promise<void>
  • Promise that resolves when the first synchronization is done

    Returns Promise<void>

  • get installations(): ModuleInstallation[]
  • Returns ModuleInstallation[]

  • get isDestroyed(): boolean
  • Is this object destroyed?

    Returns boolean

  • get isReady(): boolean
  • Checks if the system is initialized and ready to use.

    Returns boolean

  • get statusOf(): (moduleManifest: IModuleManifest) => BehaviorSubject<ModuleStatus>
  • Returns (moduleManifest: IModuleManifest) => BehaviorSubject<ModuleStatus>

Methods

  • addSubdestroyable(...subdestroyable: ITeardownLogic[]): StorageSyncer
  • Binds new registration with itself. This registration/destroyable will be destroyed with this.

    Parameters

    • Rest ...subdestroyable: ITeardownLogic[]

    Returns StorageSyncer

  • checkIsReady(): void
  • Checks if the system is initialized and ready to use. If not, throws an error. If it is, do nothing.

    Returns void

  • checkWhetherNotDestroyed(errorMessage?: string, runBeforeError?: () => void): void
  • Checks, whether the object is not destroyed

    Parameters

    • Optional errorMessage: string

      Message that will replace default one before error

    • Optional runBeforeError: () => void

      Callback runed before error is thrown; typically this can be some logging

        • (): void
        • Returns void

    Returns void

  • declareModule(...modules: IModule[]): Promise<void>
  • Parameters

    Returns Promise<void>

  • destroy(): Promise<void>
  • Returns Promise<void>

  • proxy

    Returns IModuleDefinition[]

  • proxy

    Parameters

    • name: string

    Returns null | IModuleDefinition

  • init(): Promise<void>
  • Returns Promise<void>

  • initSyncer(): void | Promise<void>
  • Returns void | Promise<void>

  • install(dependency: IDependency, syncerName?: string): Promise<void>
  • Parameters

    • dependency: IDependency
    • Optional syncerName: string

    Returns Promise<void>

  • proxy

    Returns Observable<IModuleDefinition[]>

  • sync(dependenciesTarget: IDependenciesRecord): Promise<void>
  • TODO: !! Probbably do not use confusing shortcut sync but synchronize

    Parameters

    • dependenciesTarget: IDependenciesRecord

    Returns Promise<void>

  • uninstall(dependency: IDependency): Promise<void>
  • Parameters

    • dependency: IDependency

    Returns Promise<void>

  • uninstallAll(): Promise<void>
  • Returns Promise<void>

  • isDestroyable(obj: any): obj is IDestroyable
  • Chcek whether the given object is destroyable

    Parameters

    • obj: any

    Returns obj is IDestroyable