(yargs: Argv)
| 29 | const describe = 'create a rule' |
| 30 | |
| 31 | const builder = (yargs: Argv): Argv<CommandArgs> => |
| 32 | inputAndOutputItemBuilder(apiCommandBuilder(yargs)) |
| 33 | .option('location', { |
| 34 | alias: 'l', |
| 35 | describe: 'the location for the rule', |
| 36 | type: 'string', |
| 37 | }) |
| 38 | .example([ |
| 39 | [ |
| 40 | '$0 rules:create -i my-rule.yaml', |
| 41 | 'create a rule defined in "my-rule.yaml"', |
| 42 | ], |
| 43 | ]) |
| 44 | .epilog(buildEpilog({ command, apiDocs: ['createRule'] })) |
| 45 | |
| 46 | const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => { |
| 47 | const command = await apiCommand(argv) |
nothing calls this directly
no test coverage detected