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

fix: solved asyncapi help #843

Merged
merged 22 commits into from
Oct 20, 2023
Merged

fix: solved asyncapi help #843

merged 22 commits into from
Oct 20, 2023

Conversation

ayushnau
Copy link
Contributor

@ayushnau ayushnau commented Oct 13, 2023

image
fixed the bug of asyncpi help

Description

Related issue(s)
#559

@ayushnau ayushnau changed the title bug: solved asyncapi help fix: solved asyncapi help Oct 13, 2023
@ayushnau
Copy link
Contributor Author

@Souvikns @derberg please review it

Copy link
Member

@Souvikns Souvikns left a comment

Choose a reason for hiding this comment

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

@ayushnau good progress, I see you figured out how the hooks work, I have a couple of things to add.

  1. Instead of logging help command not found. it would be useful to point the user, on how to get help. Since we have the --help flag we can talk about how to use that flag to access help.
  2. We are currently using an oclif plugin called @oclif/plugin-not-found which helps users by giving suggestions on the commands, I think with your current change this library is not working correctly. (have a look at this, open a new branch from the master to check how it works)

@ayushnau
Copy link
Contributor Author

@ayushnau good progress, I see you figured out how the hooks work, I have a couple of things to add.

1. Instead of logging `help command not found.` it would be useful to point the user, on how to get help. Since we have the `--help` flag we can talk about how to use that flag to access help.

2. We are currently using an oclif plugin called [@oclif/plugin-not-found](https://www.npmjs.com/package/@oclif/plugin-not-found) which helps users by giving suggestions on the commands, I think with your current change this library is not working correctly. (have a look at this, open a new branch from the master to check how it works)

@Souvikns I have already seen through the pluggin command not found and understood, how it works upto certain extent. now I am thinking to implement it as a hook (it is also actually a hook ). with same code as it had. just need to know specification how should i go about this.

and also if command not found is triggered how should I point to --flag. means let suppose user type asyncapi help should i print it as try asynapi --help

@AyushNautiyalDeveloper
Copy link

image
@Souvikns i have successfully removed the bug. i have used reused the code with pluggin not found. and handled the case with help. please let me know if we need any changes. in this.

@Souvikns
Copy link
Member

@ayushnau there are some issues with lint can you check it, also sonar cloud is failing have a look at that as well.

@sonarcloud
Copy link

sonarcloud bot commented Oct 19, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

@ayushnau
Copy link
Contributor Author

@Souvikns please merge this.

Copy link
Member

@Souvikns Souvikns left a comment

Choose a reason for hiding this comment

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

Awesome work @ayushnau, I checked the commands locally, and it works as expected 👍🏼

@AyushNautiyalDeveloper
Copy link

AyushNautiyalDeveloper commented Oct 20, 2023

Awesome work @ayushnau, I checked the commands locally, and it works as expected 👍🏼

thank you @Souvikns
/rtm

@Souvikns
Copy link
Member

/rtm

@asyncapi-bot asyncapi-bot merged commit 4724987 into asyncapi:master Oct 20, 2023
11 checks passed
@asyncapi-bot
Copy link
Contributor

🎉 This PR is included in version 0.58.11 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants