Skip to content

refactor: convert locations:modes:(create|delete) commands to yargs#738

Merged
rossiam merged 1 commit intoSmartThingsCommunity:yargsfrom
rossiam:yargs-locations-modes-create-and-delete
May 20, 2025
Merged

refactor: convert locations:modes:(create|delete) commands to yargs#738
rossiam merged 1 commit intoSmartThingsCommunity:yargsfrom
rossiam:yargs-locations-modes-create-and-delete

Conversation

@rossiam
Copy link
Copy Markdown
Collaborator

@rossiam rossiam commented May 20, 2025

  • converted locations:modes:create and locations:modes:delete commands to yargs

@rossiam rossiam requested a review from a team May 20, 2025 15:15
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 20, 2025

⚠️ No Changeset found

Latest commit: a72a54f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Comment thread src/commands/locations/modes/delete.ts Outdated
const builder = (yargs: Argv): Argv<CommandArgs> =>
apiCommandBuilder(yargs)
.positional('id', { describe: 'mode id', type: 'string' })
.option('location', { alias: 'l', describe: 'a specific location to create the mode in', type: 'string' })
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"to delete the mode from"

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops. Ugh, this is another one of those that's super weird to write correctly. It's not really "to delete the mode from" either though, it's just a filter for when the user doesn't specify a node. I've changed it to the generic "to query" we've been using everywhere else.

Comment thread src/commands/locations/modes/delete.ts Outdated
'delete the mode with the specified id',
],
])
.epilog(apiDocsURL('createMode'))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something along the lines of deleteMode?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, fixed.

@rossiam rossiam force-pushed the yargs-locations-modes-create-and-delete branch from 44fd2e0 to 710c8b0 Compare May 20, 2025 17:14
@rossiam rossiam force-pushed the yargs-locations-modes-create-and-delete branch from 710c8b0 to a72a54f Compare May 20, 2025 17:24
@rossiam rossiam merged commit ad8ce87 into SmartThingsCommunity:yargs May 20, 2025
4 checks passed
@rossiam rossiam deleted the yargs-locations-modes-create-and-delete branch May 20, 2025 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants