Skip to content

Commit

Permalink
fix: improve channels:unassign prompt text (#551)
Browse files Browse the repository at this point in the history
  • Loading branch information
Doczillar authored Oct 16, 2023
1 parent 60a9126 commit 8b18df3
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 18 deletions.
6 changes: 6 additions & 0 deletions .changeset/smooth-lamps-shake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@smartthings/cli": patch
"@smartthings/plugin-cli-edge": patch
---

Improved channels:unassign prompt text
44 changes: 28 additions & 16 deletions packages/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5379,13 +5379,16 @@ list all ST Schema Apps currently available in a user account

```
USAGE
$ smartthings schema [ID] [-h] [-p <value>] [-t <value>] [--language <value>] [-j] [-y] [-o <value>] [-v]
$ smartthings schema [ID] [-h] [-p <value>] [-t <value>] [--language <value>] [-O <value>] [-j] [-y] [-o
<value>] [-A] [-v]
ARGUMENTS
ID the schema connector id
FLAGS
-v, --verbose include ARN in output
-A, --all-organizations include entities from all organizations the user belongs to
-O, --organization=<value> the organization ID to use for this command
-v, --verbose include ARN in output
COMMON FLAGS
-h, --help Show CLI help.
Expand Down Expand Up @@ -5457,14 +5460,15 @@ create an ST Schema connector

```
USAGE
$ smartthings schema:create [-h] [-p <value>] [-t <value>] [--language <value>] [-j] [-y] [-i <value>] [-o
<value>] [-d] [--authorize] [--principal <value>] [--statement <value>]
$ smartthings schema:create [-h] [-p <value>] [-t <value>] [--language <value>] [-O <value>] [-j] [-y] [-i
<value>] [-o <value>] [-d] [--authorize] [--principal <value>] [--statement <value>]
FLAGS
-d, --dry-run produce JSON but don't actually submit
--authorize authorize connector's Lambda functions to be called by SmartThings
--principal=<value> use this principal instead of the default when authorizing lambda functions
--statement=<value> use this statement id instead of the default when authorizing lambda functions
-O, --organization=<value> the organization ID to use for this command
-d, --dry-run produce JSON but don't actually submit
--authorize authorize connector's Lambda functions to be called by SmartThings
--principal=<value> use this principal instead of the default when authorizing lambda functions
--statement=<value> use this statement id instead of the default when authorizing lambda functions
COMMON FLAGS
-h, --help Show CLI help.
Expand Down Expand Up @@ -5492,11 +5496,14 @@ delete an ST Schema connector

```
USAGE
$ smartthings schema:delete [ID] [-h] [-p <value>] [-t <value>] [--language <value>]
$ smartthings schema:delete [ID] [-h] [-p <value>] [-t <value>] [--language <value>] [-O <value>]
ARGUMENTS
ID schema app id
FLAGS
-O, --organization=<value> the organization ID to use for this command
COMMON FLAGS
-h, --help Show CLI help.
-p, --profile=<value> [default: default] configuration profile
Expand All @@ -5519,11 +5526,15 @@ regenerate the clientId and clientSecret of the ST Schema connector

```
USAGE
$ smartthings schema:regenerate [ID] [-h] [-p <value>] [-t <value>] [--language <value>] [-j] [-y] [-o <value>]
$ smartthings schema:regenerate [ID] [-h] [-p <value>] [-t <value>] [--language <value>] [-O <value>] [-j] [-y] [-o
<value>]
ARGUMENTS
ID schema app id
FLAGS
-O, --organization=<value> the organization ID to use for this command
COMMON FLAGS
-h, --help Show CLI help.
-j, --json use JSON format of input and/or output
Expand Down Expand Up @@ -5551,17 +5562,18 @@ update an ST Schema connector

```
USAGE
$ smartthings schema:update [ID] [-h] [-p <value>] [-t <value>] [--language <value>] [-j] [-y] [-i <value>] [-d]
[--authorize] [--principal <value>] [--statement <value>]
$ smartthings schema:update [ID] [-h] [-p <value>] [-t <value>] [--language <value>] [-O <value>] [-j] [-y] [-i
<value>] [-d] [--authorize] [--principal <value>] [--statement <value>]
ARGUMENTS
ID the app id
FLAGS
-d, --dry-run produce JSON but don't actually submit
--authorize authorize Lambda functions to be called by SmartThings
--principal=<value> use this principal instead of the default when authorizing lambda functions
--statement=<value> use this statement id instead of the default when authorizing lambda functions
-O, --organization=<value> the organization ID to use for this command
-d, --dry-run produce JSON but don't actually submit
--authorize authorize Lambda functions to be called by SmartThings
--principal=<value> use this principal instead of the default when authorizing lambda functions
--statement=<value> use this statement id instead of the default when authorizing lambda functions
COMMON FLAGS
-h, --help Show CLI help.
Expand Down
4 changes: 2 additions & 2 deletions packages/edge/src/commands/edge/channels/unassign.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ export class ChannelsUnassignCommand extends EdgeCommand<typeof ChannelsUnassign
]

async run(): Promise<void> {
const channelId = await chooseChannel(this, 'Select a channel for the driver.',
const channelId = await chooseChannel(this, 'Select a channel:',
this.flags.channel, { useConfigDefault: true })
const driverId = await chooseAssignedDriver(this, 'Select a driver to remove from channel.',
const driverId = await chooseAssignedDriver(this, 'Select a driver to remove from the selected channel:',
channelId, this.args.driverId)

await this.client.channels.unassignDriver(channelId, driverId)
Expand Down

0 comments on commit 8b18df3

Please sign in to comment.