wix-incubator / repluggable

Pluggable micro frontends in React+Redux apps

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Extract runtime APIs from AppHost

felixb-wix opened this issue · comments

AppHost contains many utility/administration functions. These functions can be extracted into APIs. They will be treated as any other API, and stop being special cases.

Below is proposed API names and contents.

AppHostDebugAPI

  • getAllSlotKeys(): AnySlotKey[]
  • getAllFeatures(): FeatureInfo[]

AppHostAdminAPI

  • isFeatureInstalled(name: string): boolean
  • isLazyFeature(name: string): boolean
  • installFeatures(features: AnyFeature[]): void
  • uninstallFeatures(names: string[]): void

Here cfc516b I did first steps:

  • create AppHostServices entry point
  • create AppHostAPI (currently empty), which is contributed by AppHostServices entry point

Next step, the functions from AppHost need to be moved to AppHostAPI. Distinction between Admin and Debug API seems to be unnecessary.