Skip to content

refactor: convert schema:regenerate command to yargs#714

Merged
rossiam merged 1 commit intoSmartThingsCommunity:yargsfrom
rossiam:yargs-schema-regenerate
Mar 31, 2025
Merged

refactor: convert schema:regenerate command to yargs#714
rossiam merged 1 commit intoSmartThingsCommunity:yargsfrom
rossiam:yargs-schema-regenerate

Conversation

@rossiam
Copy link
Copy Markdown
Collaborator

@rossiam rossiam commented Mar 31, 2025

  • converted schema:regenerate to yargs
  • updated associated unit tests
  • fixed a couple of other minor issues I noticed along the way (in particular, examples for presentation:device-config command)

@rossiam rossiam requested a review from a team March 31, 2025 17:49
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Mar 31, 2025

⚠️ No Changeset found

Latest commit: dd2771c

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

'$0 apps:settings 392bcb11-e251-44f3-b58b-17f93015f3aa',
'get the settings of the app with the given id',
'$0 presentation:device-config 392bcb11-e251-44f3-b58b-17f93015f3aa',
'get the device config for the given presentation id',
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.

Good catch!

command,
argv.id,
{ promptMessage: 'Select a schema app to regenerate its client id and secret.' },
)
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.

Can/should we repeat the warning about the old values being invalidated (and thus potentially breaking any existing installations) here as well? Not everyone takes the time to read documentation.

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.

That's a good idea but putting it here would only help those who use it in Q&A mode. I think it it would be better prompt for confirmation with the warning. I wrote an issue for it though since that's a bit more than a refactor (even though it is pretty simple).

@rossiam rossiam merged commit fb86022 into SmartThingsCommunity:yargs Mar 31, 2025
4 checks passed
@rossiam rossiam deleted the yargs-schema-regenerate branch March 31, 2025 21:07
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