serverless/lib/cli/render-help/generate-command-usage.js
2024-05-29 11:51:04 -04:00

13 lines
325 B
JavaScript

import utils from '@serverlessinc/sf-core/src/utils.js'
const { style } = utils
export default (commandName, commandSchema) => {
const indentFillLength = 30
const usage = commandSchema.usage
return ` ${commandName} ${' '.repeat(
Math.max(indentFillLength - commandName.length, 0),
)} ${style.aside(usage)}`
}