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

Function handler

src/commands/presentation/device-config.ts:40–50  ·  view source on GitHub ↗
(argv: ArgumentsCamelCase<CommandArgs>)

Source from the content-addressed store, hash-verified

38 .epilog(buildEpilog({ command, apiDocs: 'getDeviceConfiguration' }))
39
40const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => {
41 const command = await apiCommand(argv)
42
43 await outputItem(
44 command,
45 { buildTableOutput: data => buildTableOutput(command.tableGenerator, data) },
46 // presentationId is required in the `positional` argument above so it will always be set here.
47 // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
48 () => command.client.presentation.get(argv.presentationId!, argv.manufacturerName),
49 )
50}
51
52const cmd: CommandModule<object, CommandArgs> = { command, describe, builder, handler }
53export default cmd

Callers

nothing calls this directly

Calls 3

apiCommandFunction · 0.85
outputItemFunction · 0.85
buildTableOutputFunction · 0.50

Tested by

no test coverage detected