-
-
Notifications
You must be signed in to change notification settings - Fork 179
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: improve glee command #890
Conversation
merging.
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.
./bin/run new glee
works and it generates all the files, but when I try to generate from a file using ./bin/run new glee -f asyncapi.yaml
then it reads the file and asks me to select the servers but it fails to create all the necessary files. It is creating an empty project folder.
export default class NewGlee extends Command { | ||
static description = 'Creates a new Glee project'; | ||
|
||
protected commandName = 'glee'; | ||
|
||
static flags = { | ||
help: Flags.help({ char: 'h' }), | ||
name: Flags.string({ char: 'n', description: 'name of the project', default: 'project' }), | ||
template: Flags.string({ char: 't', description: 'name of the template', default: 'default' }), | ||
name: Flags.string({ |
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 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.
it is a requirement by the generator. you can't generate on a git repository with upstaged changes.
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.
Yeah, but can't we pass in the flag from our CLI, since generate fromTemplate
does that?
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 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.
ok sure will do that.
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.
@KhudaDad414 Added the required changes. please review.
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.
/rtm
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.
@KhudaDad414 i have Added force-write flag. please review.
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.
@AyushNautiyalDeveloper
--force-write
flag addition LGTM 👍
…or. and added forcewrite.
asyncapi/cli to ayush/cli
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.
@AyushNautiyalDeveloper Have you considered to add some tests mostly for the new functions added?
@peter-rr can add but can we merge this before that. |
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.
I am getting this error when I run the ./bin/run new glee -f asyncapi.yaml
, @AyushNautiyalDeveloper can you check it once
can you share the file you are using. |
I don't think the file is incorrect I double-checked it in the studio as well, it is the file that you get from running the command asyncapi: 3.0.0
info:
title: Account Service
version: 1.0.0
description: This service is in charge of processing user signups
channels:
userSignedUp:
address: user/signedup
messages:
UserSignedUp:
$ref: '#/components/messages/UserSignedUp'
operations:
onUserSignUp:
action: receive
channel:
$ref: '#/channels/userSignedUp'
messages:
- $ref: '#/channels/userSignedUp/messages/UserSignedUp'
components:
messages:
UserSignedUp:
payload:
type: object
properties:
displayName:
type: string
description: Name of the user
email:
type: string
format: email
description: Email of the user
|
@Souvikns can you check now. |
Ok, please double check that with @Souvikns or @KhudaDad414 as well :) |
ok sure. |
@AyushNautiyalDeveloper You can replace import { resolve, join } from 'path';
import path from 'path'; with import path, { resolve, join } from 'path'; to keep sonarcloud happy. |
done @aeworxet |
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.
Yeah, it is working now, I suggest you open a new PR with tests. Good Job @AyushNautiyalDeveloper
Quality Gate passedKudos, no new issues were introduced! 0 New issues |
/rtm |
🎉 This PR is included in version 1.5.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
thanks. @Souvikns |
Resolves #683