lib/classes/PluginManager.js/PluginManager/run
class PluginManager:  run(commandsArray) {
    const command = this.getCommand(commandsArray);

    this.convertShortcutsIntoOptions(command);
    this.validateOptions(command);

    const events = this.getEvents(command);
    const hooks = _.flatMap(events, (event) => this.hooks[event] || []);

    if (hooks.length === 0) {
      const errorMessage = 'The command you entered did not catch on any hooks';
      throw new this.serverless.classes.Error(errorMessage);
    }

    return BbPromise.reduce(hooks, (__, hook) => hook(), null);
  }