-
-
Notifications
You must be signed in to change notification settings - Fork 168
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
Improve new glee
command
#683
Comments
@KhudaDad414 Ultimately should our CLI look something like nestjs cli |
Cool, how soon do we need this done? it looks interesting |
🤣 just for validation if all required parts are there, like |
I have some ideas for next iterations of
Any thoughts on this? @KhudaDad414 @Souvikns @fmvilas Once we have agreed on something, I'd like to start working on a PR proposal 💪 |
I am not exactly sure. I mean nestjs cli is used for generating templates for specific components in nestjs right? I mean at the end since we have the AsyncAPI spec file then we should be able to get a working project from the file itself. |
Up for discussion. but I think before releasing glee 1.0 we should have this in place for CLI. |
why not Typescript file? glee supports typescript and this way we can add type safety and type generation for message payload using Modelina as well. 🤔 or at least giving the option for user to select between Typescript and Javascript. |
@derberg sorry, I don't understand how we can do it without code. the best way that I can think of is creating a JSON Schema to enforce things like having |
@KhudaDad414 Yeah, I was just following the conventions established so far for Glee functions but I think it's a good idea opting for Typescript or giving the chance to select between both languages if that's possible 👍 |
@KhudaDad414 Spectral is the answer imho. We already use it in parser. It is common for governance of json documents. So you can use spectral config to specify what and where should be in a given document. Last time I checked you provide a simple json file |
@ayushnau hey man I would suggest the following steps:
|
ok @KhudaDad414 will try to do that. |
@ayushnau Once you get familiarized yourself with the Glee project, I think it could be a nice starting point for you trying to work on:
Don't hesitate to ask for any questions or concerns about it 😄 |
ok sure @peter-rr will do that. |
@peter-rr i am able to get the operationId now. and made a file with that name of it. I am halting work on this for now. |
@AyushNautiyalDeveloper Nice! Could you open a PR about it so we can review the progress of that work? Thanks 😄 |
@ayushnau glee will only support the spec v3 from now on, so there is no publish. and operationId is always there by spec definitions. so you have to create the function from the |
ok @KhudaDad414 will work on that. |
@peter-rr @KhudaDad414 when can i start working on this again. |
This issue has been selected for participation in the Bounty Program's calendar round |
Bounty Issue's End Of Life (EOL): 2024-02-29 23:59:59 UTC-12:00 |
@aeworxet @KhudaDad414 @derberg Thanks |
@KhudaDad414 please assign this issue to me as i have already started working on this. |
Bounty Issue's Timeline
Please note that the dates given represent deadlines, not specific dates, so if the goal is reached sooner, it's better. |
ok will try to complete as soon as possible. |
@Souvikns i am creating Delieverables list here. please let me know if there are any other that needs to be added here.
|
What I am Doing currently.
|
@KhudaDad414 actually i was trying to use glee with v3 but I couldnt, getting error no support for v3. can you bit clearify how can i test v3 in glee. |
@ayushnau I just check and it seems to work fine for me.
|
ok I have it is resolved now. |
#876 here is the pr. |
@KhudaDad414 @Souvikns once i fetch the server components what should i create the respective function for that.
let suppose this is the code how should the server component should look like. |
@ayushnau From this AsyncAPI document I would extract the following info:
const atHello: AtHelloFunction = ({ payload }) => {
// the logic here...
// the payload type is generated by Modelina from the message schema.
// The current function definitation is:
// type GleeFunction = (
// event: GleeFunctionEvent
// ) => Promise<GleeFunctionReturn>
// can be imported from src/lib/index.d.ts
}
export default atHello you can create the there is no authentication here so we skip that part. |
@ayushnau Please provide the Draft PR. |
Due to the online absence of the AsyncAPI Maintainer (@KhudaDad414) in Slack for a period of more than three working days in a row, all target dates of the Bounty Issue's Timeline have been increased by two calendar weeks. Bounty Issue's Timeline Extended
Please note that the dates given represent deadlines, not specific dates, so if the goal is reached sooner, it's better. |
@asyncapi/bounty_team |
Because the requirements for this issue have changed drastically, AsyncAPI Maintainer (@KhudaDad414) has requested that this Bounty Issue be reclassified as Bounty Issue is Reclassified and its Timeline Extended
Please note that the dates given represent deadlines, not specific dates, so if the goal is reached sooner, it's better. |
@KhudaDad414 Currently, when a new project is created, it does not appear under a project folder. Will this remain final, or will it change? We have a flag for the folder name in the glee command. |
@ayushnau generator supports specifying the output folder. I think it's ''--output", but you can check its docs. |
@KhudaDad414 Added the template in the cli glee command. can you check. |
Bounty Issue Completed 🎉@ayushnau, please go to the AsyncAPI page on Open Collective and submit an invoice for |
@aeworxet i have raised the invoice. please check. |
Reason/Context
Alright, so when you're rolling with the
asyncapi new glee
command to create a fresh Glee app, what you get is a pretty neat and basic app. Good starting point, right? However, you, the user, gotta roll up your sleeves and get your hands dirty with the nitty-gritty:asyncapi.yaml
file across.operationId
.operationId
.Description
Look, we get it - a lot of frameworks are out there handing out templates like candy at Halloween to help you get going. We could do that, too - some nifty templates for different protocols, all set and ready for action. You could grab one, tweak it to your heart's content, and boom, it's all you. But we're thinking big here - we're looking at something way better, especially if you're sitting there with an AsyncAPI spec file in your back pocket.
Picture this: you've got your AsyncAPI spec file and you're ready to hit the ground running with your app. You're firing off
asyncapi new glee asyncapi.yaml
and here's what the CLI's doing for you:operationId
? Any other Glee-essentials? Check and check.modelina
to churn out the types.operationId
s with the fresh types to cook up an empty function. This puppy's just there to nod and confirm the message receipt. And with all that in place, you're now getting type suggestions popping up in your functions.With all that heavy lifting out of the way, you're all set to just dive right in and start cooking up your functions. No setup, no fuss - just you and your code.
cc: @peter-rr @Souvikns @fmvilas anything from your side?
The text was updated successfully, but these errors were encountered: