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

Function handler

src/commands/edge/channels/drivers.ts:45–61  ·  view source on GitHub ↗
(argv: ArgumentsCamelCase<CommandArgs>)

Source from the content-addressed store, hash-verified

43 .epilog(buildEpilog({ command, apiDocs: ['getChannelDrivers', 'getDriverChannel'] }))
44
45const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => {
46 const command = await apiCommand(argv)
47
48 const config: OutputListConfig<DriverChannelDetailsWithName> = {
49 primaryKeyName: 'channelId',
50 sortKeyName: 'name',
51 listTableFieldDefinitions: ['name', 'driverId', 'version', 'createdDate', 'lastModifiedDate'],
52 }
53
54 const channelId = await chooseChannelFn({ includeReadOnly: true })(
55 command,
56 argv.idOrIndex,
57 { allowIndex: true, useConfigDefault: true },
58 )
59
60 await outputList(command, config, () => listAssignedDriversWithNames(command.client, channelId))
61}
62
63const cmd: CommandModule<object, CommandArgs> = { command, describe, builder, handler }
64export default cmd

Callers

nothing calls this directly

Calls 4

apiCommandFunction · 0.85
chooseChannelFnFunction · 0.85
outputListFunction · 0.85

Tested by

no test coverage detected