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

Function handler

src/commands/deviceprofiles/publish.ts:46–53  ·  view source on GitHub ↗
(argv: ArgumentsCamelCase<CommandArgs>)

Source from the content-addressed store, hash-verified

44 .epilog(buildEpilog({ command, apiDocs: ['getDeviceProfile', 'getDeviceConfiguration'] }))
45
46const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => {
47 const command = await apiOrganizationCommand(argv)
48
49 const id = await chooseDeviceProfile(command, argv.id)
50
51 const deviceProfile = await command.client.deviceProfiles.updateStatus(id, DeviceProfileStatus.PUBLISHED)
52 await formatAndWriteItem(command, { buildTableOutput: data => buildTableOutput(command.tableGenerator, data) }, deviceProfile)
53}
54
55const cmd: CommandModule<object, CommandArgs> = { command, describe, builder, handler }
56export default cmd

Callers

nothing calls this directly

Calls 3

apiOrganizationCommandFunction · 0.85
formatAndWriteItemFunction · 0.85
buildTableOutputFunction · 0.50

Tested by

no test coverage detected