Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: convert installedapps:delete command to yargs #691

Merged

Conversation

rossiam
Copy link
Collaborator

@rossiam rossiam commented Feb 24, 2025

  • converted installedapps:delete command to yargs
  • converted associated unit tests
  • updated generated choose functions to support a custom prompt message (changes to util-util.ts)

@rossiam rossiam requested a review from a team February 24, 2025 20:53
Copy link

changeset-bot bot commented Feb 24, 2025

⚠️ No Changeset found

Latest commit: 2f8e617

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

const command = 'installedapps:delete [id]'

// TODO: should this be worded "uninstall an app"?
const describe = 'delete an installed app'
Copy link
Collaborator

Choose a reason for hiding this comment

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

TODO? either change the describe, or remove the todo?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oops, fixed.

apiCommandBuilder(yargs)
.option('location', {
alias: 'l',
describe: 'if prompting for an installed apps, include only installed apps in the specified location(s)',
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit.. grammar?
'an installed apps'

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oops, also fixed. Thanks for the notes!

@rossiam rossiam force-pushed the yargs-installedapps-delete branch from f3de4e9 to 676c8cd Compare February 25, 2025 15:44
@rossiam rossiam force-pushed the yargs-installedapps-delete branch from 676c8cd to 2f8e617 Compare February 25, 2025 15:45
@rossiam rossiam merged commit d7b8de6 into SmartThingsCommunity:yargs Feb 25, 2025
4 checks passed
@rossiam rossiam deleted the yargs-installedapps-delete branch February 25, 2025 15:54
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