fusion-core
                                
                                 fusion-core copied to clipboard
                                
                                    fusion-core copied to clipboard
                            
                            
                            
                        Support `async provides` in Fusion.js plugins
Type of issue
Feature request
Description
Support an async provides method for Fusion.js plugins.  These should be resolved prior to being passed in as dependencies to other plugins.
Current behavior
createPlugin({
   deps: {},
   provides: async (deps) => {
      const service: SomeLibraryType = new SomeLibrary();
      await service.init();
      return service;
   }
});
If the above plugin were used as a dependency, it would resolve to Promise<SomeLibraryType>.
Expected behavior
Ideally consumers can use the underlying library directly, and dependents would have access to the underlying service:
createPlugin({
   deps: { someLibrary: SomeLibraryToken },
   provides: (deps) => {
      const someLibrary: SomeLibraryType = deps.someLibrary; // not a Promise
   }
}