You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We need native way for watching AsyncAPI resource and reiterate given command on it. So basically asyncapi validate -w works in a way that whenever users introduce change in a file, validation runs on it again without invoking it.
sure user can now just install watcher like brew install watch and do watch asyncapi validate, but this should be considered as a temporary workaround that is not a good UX.
Description
When working on this functionality we need to look on current functionality on Generator CLI and its current issues, to fix them here in the CLI -> asyncapi/generator#537 (comment)
This issue has been automatically marked as stale because it has not had recent activity 😴
It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.
There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.
Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.
best would be if it is global but that you need to enable it for given command 😄
so validate, diff, should have it, but new, start not really. So would be awesome to have it generic in a sense that when we add new generate command, we easily enable watch for it
I got a bit in stuck moment when writing test for --watch flag using Mocha, @fmvilas because
Mocha is unable to close the stream once the test is completed, (as watch mode works in stream), hence npm run test runs for indefinite period of time.
Need some solutions on how do we approach it? Mocking Streams or any other way ?
tbh I'm not sure, I would first try to check if chokidar community figured it out already, maybe something is already in their issues, or you can check others that use chokidar and how they solved testing. I would go first this direction to see how others tacked it
Activity
github-actions commentedon Jan 19, 2022
This issue has been automatically marked as stale because it has not had recent activity 😴
It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.
There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.
Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.
Thank you for your patience ❤️
imabp commentedon Jan 31, 2022
@derberg Do you mean Native as the NodeJS Runtime or based on operating system?
hookis required to watch over the file and run the command using nodejs built in modulefs.hereWould like to take up this issue :)
imabp commentedon Feb 6, 2022
A question @derberg
Do we need
watchoption as a global flag, or specific tovalidate?derberg commentedon Feb 7, 2022
best would be if it is global but that you need to enable it for given command 😄
so validate, diff, should have it, but new, start not really. So would be awesome to have it generic in a sense that when we add new generate command, we easily enable watch for it
derberg commentedon Feb 8, 2022
we already do some watching here
cli/src/models/Studio.ts
Line 17 in 058114c
so it is a matter of making a global function that can be reused by a command that needs it
imabp commentedon Feb 8, 2022
That means the flow goes like this 👇
chokidar--watchflagCorrect me, if somewhere missing any point
imabp commentedon Feb 8, 2022
@derberg please review, #220

Relax and watch specification files 🍻
imabp commentedon Feb 9, 2022
@derberg The watcher PR is ready to review: #220
I got a bit in stuck moment when writing test for
--watchflag using Mocha, @fmvilas becausenpm run testruns for indefinite period of time.Need some solutions on how do we approach it? Mocking Streams or any other way ?
derberg commentedon Feb 9, 2022
tbh I'm not sure, I would first try to check if chokidar community figured it out already, maybe something is already in their issues, or you can check others that use chokidar and how they solved testing. I would go first this direction to see how others tacked it
imabp commentedon Feb 21, 2022
@derberg, we can close this issue, as #220 is merged :)
derberg commentedon Mar 1, 2022
@imabp well done 👏🏼