MCPcopy Create free account
hub / github.com/SmartThingsCommunity/smartthings-cli / builder

Function builder

src/commands/rules/create.ts:31–44  ·  view source on GitHub ↗
(yargs: Argv)

Source from the content-addressed store, hash-verified

29const describe = 'create a rule'
30
31const 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
46const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => {
47 const command = await apiCommand(argv)

Callers

nothing calls this directly

Calls 3

apiCommandBuilderFunction · 0.85
buildEpilogFunction · 0.85

Tested by

no test coverage detected