-
-
Notifications
You must be signed in to change notification settings - Fork 234
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: new command asyncapi start preview
implemented.
#1753
Conversation
🦋 Changeset detectedLatest commit: 1e879a8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
asyncapi start preview
implemented.
ac34adb
to
d85b480
Compare
Below is a attached demo of the same using the latest studio package and a file having ref. As seen from below the when file is updated or changed the changes sync correctly through the websocket. Screen.Recording.2025-04-03.075657.mp4If no file is passed studio doesn't start. Also if there is an error while bundling the file like incorrect |
…nd for cloud sonar .
…Preview function for cloud sonar.
Hey @Shurtu-gal done with all the changes for the preview command with the approach mentioned as above :- Approach :- #1753 (comment) Demo of working with the latest studio :- #1753 (comment). Just before marking this PR ready for review wanted to confirm one thing that as we are bundling the files should we also allow to use the flags of the bundle command like Please take a look at the approach and the implemented checks form cli side. After confirmation will mark this ready for review and also will add corresponding docs and changeset. |
Let me play around with it a bit will let you know. |
Yeah , sure. |
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.
There still some problems.
- Reloading the site makes it go away from readOnly and opens a full studio.
- The tour guide modal still appears, need to disable that.
- Maybe just me but logos not working 🤔
Yes, we should. The description should be verbose though to explain this. |
I didn't modify this behaviour as the command is preview so i thought refreshing studio is not expected as the changes will already be synchronised through websockets and any way editing a file with ref is not supported either in studio.
|
Okay will do. So should i add all the flags of bundle or just these mentioned two? |
… startPreview function for windows.
|
Okay. Will do. |
…iew function with additional parameters for base, baseDir, and xOrigin
Also anything on these, are modifications required or will work? For first maybe we can add that refresh is not allowed in this mode. |
Yep, its fine then. Will try once more. |
Sure, let me know if anything else is also expected but i missed. When all good will mark this ready for review and will add docs. |
… error diagnostics
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.
Just some final things:
- Below comment
- Please run prettier and linter once.
- Solve the
Sonarcloud
issues: https://sonarcloud.io/project/issues?id=asyncapi_cli&pullRequest=1753&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true
After resolving the above just add docs and mark it ready for review 🚀 |
…gs by default and suppress if flag is passed.
Everything done @Shurtu-gal . Please review. The failing test as known will only be solved after the merge of #1748. |
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.
Awesome job! LGTM 🚀
|
@asyncapi/bounty_team |
Description
This PR introduces the changes to implement the new command
asyncapi start preview
to open the studio in a minimalreadOnly
mode along with bundling the ref files internally. An argument to file needs to be passed that is to be opened.Approach :-
findPathsToWatchFromSchemaRef
the path to ref files are extracted.ref
files from schema and then adding them to be watched for changespreview:connected
to the frontend so that frontend of studio can confirm and set thereadOnly
mode in studio.Related issue(s)
Resolves #1627