Yargs command handler for the command.
({files, check}: Arguments<Options>)
| 30 | |
| 31 | /** Yargs command handler for the command. */ |
| 32 | async function handler({files, check}: Arguments<Options>) { |
| 33 | const expandedFiles = glob.sync( |
| 34 | files.map((file) => file.replace(/\/...$/, '/**/*')), |
| 35 | {onlyFiles: true}, |
| 36 | ); |
| 37 | const executionCmd = check ? checkFiles : formatFiles; |
| 38 | process.exitCode = await executionCmd(expandedFiles); |
| 39 | } |
| 40 | |
| 41 | /** CLI command module. */ |
| 42 | export const FilesModule: CommandModule<{}, Options> = { |
nothing calls this directly
no outgoing calls
no test coverage detected