(yargs: Argv)
| 31 | const describe = 'update a rule' |
| 32 | |
| 33 | const builder = (yargs: Argv): Argv<CommandArgs> => |
| 34 | inputAndOutputItemBuilder(apiCommandBuilder(yargs)) |
| 35 | .positional('id', { describe: 'rule id', type: 'string' }) |
| 36 | .option('location', { |
| 37 | alias: 'l', |
| 38 | describe: 'a specific location to query', |
| 39 | type: 'string', |
| 40 | }) |
| 41 | .example([ |
| 42 | [ |
| 43 | '$0 rules:update -i my-rule.yaml', |
| 44 | 'prompt for a rule and update it using the data in "my-rule.yaml"', |
| 45 | ], |
| 46 | [ |
| 47 | '$0 rules:update 392bcb11-e251-44f3-b58b-17f93015f3aa -i my-rule.json', |
| 48 | 'update the rule with the given id using the data in "my-rule.json"', |
| 49 | ], |
| 50 | ]) |
| 51 | .epilog(buildEpilog({ command, apiDocs: ['updateRule'] })) |
| 52 | |
| 53 | const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => { |
| 54 | const command = await apiCommand(argv) |
nothing calls this directly
no test coverage detected