MCPcopy Index your code
hub / github.com/SmartThingsCommunity/smartthings-cli / handler

Function handler

src/commands/presentation.ts:57–69  ·  view source on GitHub ↗
(argv: ArgumentsCamelCase<CommandArgs>)

Source from the content-addressed store, hash-verified

55 }))
56
57const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => {
58 const command = await apiCommand(argv)
59
60 const config = {
61 buildTableOutput: (data: PresentationDevicePresentation) => buildTableOutput(command.tableGenerator, data),
62 }
63 await outputItem(
64 command,
65 config,
66 // presentationId is required in the `positional` argument above so it will always be set here.
67 // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
68 () => command.client.presentation.getPresentation(argv.presentationId!, argv.manufacturerName))
69}
70
71const cmd: CommandModule<object, CommandArgs> = { command, describe, builder, handler }
72export default cmd

Callers

nothing calls this directly

Calls 3

apiCommandFunction · 0.85
outputItemFunction · 0.85
buildTableOutputFunction · 0.50

Tested by

no test coverage detected