| 24 | }, |
| 25 | |
| 26 | async display(plugins) { |
| 27 | if (plugins && plugins.length) { |
| 28 | // order plugins by name |
| 29 | const orderedPlugins = _.orderBy(plugins, ['name'], ['asc']) |
| 30 | orderedPlugins.forEach((plugin) => { |
| 31 | writeText( |
| 32 | `${style.title(plugin.name)} ${style.aside(plugin.description)}`, |
| 33 | ) |
| 34 | }) |
| 35 | writeText( |
| 36 | null, |
| 37 | 'Install a plugin by running:', |
| 38 | ' serverless plugin install --name ...', |
| 39 | null, |
| 40 | 'It will be automatically downloaded and added to package.json and serverless.yml', |
| 41 | ) |
| 42 | } else { |
| 43 | log.aside('There are no plugins available to display') |
| 44 | } |
| 45 | }, |
| 46 | } |