(yargs: Argv)
| 23 | const describe = 'execute a rule' |
| 24 | |
| 25 | export const builder = (yargs: Argv): Argv<CommandArgs> => |
| 26 | formatAndWriteItemBuilder(apiCommandBuilder(yargs)) |
| 27 | .positional('id', { describe: 'rule id', type: 'string' }) |
| 28 | .option('location', { |
| 29 | alias: 'l', |
| 30 | describe: 'include only rules from the specified location when prompting', |
| 31 | type: 'string', |
| 32 | }) |
| 33 | .example([ |
| 34 | [ |
| 35 | '$0 rules:execute', |
| 36 | 'prompt for a rule to execute and then execute it', |
| 37 | ], |
| 38 | [ |
| 39 | '$0 rules:execute 699c7308-8c72-4363-9571-880d0f5cc725', |
| 40 | 'execute the rule with the specified id', |
| 41 | ], |
| 42 | ]) |
| 43 | .epilog(buildEpilog({ command, apiDocs: ['executeRule'] })) |
| 44 | |
| 45 | const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => { |
| 46 | const command = await apiCommand(argv) |
nothing calls this directly
no test coverage detected