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

Function builder

src/commands/apps/create.ts:37–56  ·  view source on GitHub ↗
(yargs: Argv)

Source from the content-addressed store, hash-verified

35const describe = 'create an app'
36
37const builder = (yargs: Argv): Argv<CommandArgs> =>
38 inputAndOutputItemBuilder(lambdaAuthBuilder(apiCommandBuilder(yargs)))
39 .option(
40 'authorize',
41 {
42 describe: 'authorize Lambda functions to be called by SmartThings',
43 type: 'boolean',
44 default: false,
45 },
46 )
47 .example([
48 [ '$0 apps:create', 'create an OAuth-In app from prompted input'],
49 ['$0 apps:create -i my-app.yaml', 'create an app defined in "my-app.yaml'],
50 [
51 '$0 apps:create -i my-app.json --authorize',
52 'create an app defined in "my-app.json" and then authorize it\n' +
53 '(See "smartthings apps:authorize" for more information on authorization.)',
54 ],
55 ])
56 .epilog(buildEpilog({ command, apiDocs: ['createApp'] }))
57
58const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => {
59 const command = await apiCommand(argv)

Callers

nothing calls this directly

Calls 4

lambdaAuthBuilderFunction · 0.85
apiCommandBuilderFunction · 0.85
buildEpilogFunction · 0.85

Tested by

no test coverage detected