-
-
Notifications
You must be signed in to change notification settings - Fork 147
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
feat: add new context command to make it easier to work with multiple files #14
Conversation
@derberg it's not complete, can you check if it is going in the right direction. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking awesome, so clean! just left some comments.
@jotamusik man, you did great job with initial setup
I think we should persist in the context not globally in the ScenarioSuppose I have multiple separate projects in my system, and I have installed the CLI as a dev dependency on all my projects. So I am using individual CLI instances for my different projects. They all might have different versions. Saving the context what do you think @derberg |
@Souvikns this must be validated with tools like Thing is that CLI users are not JS only, and there are many non-JS devs that consider it a shame to install nodejs 🤷🏼 I'm not gonna judge 😄 we need to respect that and to get wider CLI adoption, try making in available without forcing people to use |
This is was causing the test cases to fail.
@jotamusik I tried something with the command router can you check once if it's fine. It is still a work in progress. |
@derberg I have changed the architecture of the hook now every function will return a response object and an error object accordingly if there won't be any error then the error object will be undefined and if there will be an error the response object will be undefined. let {list, err} = useContexFilet().list();
let {specFile, err} = useContextFile().loadSpecFile();
let {contextFile, err} = useContextFile().addContext(key, value);
let {contextFile, err} = useContextFile().changeCurrent("home");
let {contextFile, err} = useContextFile().remove(); |
Hey, sorry for the late review but was super busy with 2.1 spec release.
I believe you are missing ContextService and context related components are not really used |
@derberg Context Releated component I am yet to hook up with the router was am waiting to hear from @jotamusik as he suggested changes for the router logic to be shifted from the context components itself. |
@Souvikns sound good, ping me when you need me |
@derberg I have moved to ContextService, having doubt about the naming convention for the removal of the context and the current.
|
@Souvikns I think I need more data here, what exactly you have a challenge with? |
I just need some opinion from you about the command naming with deletion of a context and clearing the current I was thinking something like this |
ok then, autodetection of files or context will be done in a separate PR. I see but fixes are solved. The URL fetching I would drop for now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- manual tests 🚀
- there are some issues that are not much related to this PR or can be done later, I wrote about followup issues, please create them 💪🏼
- what we definitely need to fix before merge is
- making sure we check file exists before we add it to the context
- make sure tests do not messup with global context
so far so good!
Also, be aware that the default tab size is 2 spaces and there are some new files that have a tab size of 4 instead. 😅 |
you sure you wanna do a tab-fight on Friday 😆 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
🎉 This PR is included in version 0.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
@Souvikns please do not forget to create all the follow-up issues that were mentioned here in the comments and also on slack. Remember that first improvement that we need to do here is to make sure tests do not operate on global |
Description
.asyncapi
file at the home directory to persist the context.Related issue(s)
Fixes #8