serverless/lib/cli/render-help/generate-command-usage.js
Austen 158f644cd0
feat: Refactor logging to reduce complexity (#12432)
* chore: Change logger

* chore: continue refactor

* chore: WIP

* chore: Sync
2024-04-17 13:26:31 -07:00

13 lines
328 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)}`;
};