mirror of
https://github.com/serverless/serverless.git
synced 2026-01-18 14:58:43 +00:00
do async plugin init in load all plugins
This commit is contained in:
parent
9748b4e124
commit
ad0252dec3
@ -75,8 +75,7 @@ class Serverless {
|
||||
})
|
||||
.then(() => {
|
||||
// load all plugins
|
||||
this.pluginManager.loadAllPlugins(this.service.plugins);
|
||||
return this.pluginManager.asyncPluginInit();
|
||||
return this.pluginManager.loadAllPlugins(this.service.plugins);
|
||||
})
|
||||
.then(() => {
|
||||
// give the CLI the plugins and commands so that it can print out
|
||||
|
||||
@ -185,7 +185,6 @@ describe('Serverless', () => {
|
||||
|
||||
return serverless.init().then(() => {
|
||||
expect(loadAllPluginsStub.calledOnce).to.equal(true);
|
||||
expect(asyncPluginInitStub.calledOnce).to.equal(true);
|
||||
expect(updateAutocompleteCacheFileStub.calledOnce).to.equal(true);
|
||||
});
|
||||
});
|
||||
|
||||
@ -96,6 +96,7 @@ class PluginManager {
|
||||
this.loadCorePlugins();
|
||||
this.loadServicePlugins(servicePlugins);
|
||||
this.loadEnterprisePlugin();
|
||||
return this.asyncPluginInit();
|
||||
}
|
||||
|
||||
loadPlugins(plugins) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user