Skip to content
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: implement 'new glee' command #418

Merged
merged 42 commits into from
Apr 20, 2023

Conversation

peter-rr
Copy link
Member

@peter-rr peter-rr commented Dec 16, 2022

Related issue(s)
Resolves #184

@sonarcloud
Copy link

sonarcloud bot commented Dec 16, 2022

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 4 Code Smells

No Coverage information No Coverage information
55.7% 55.7% Duplication

Copy link
Member

@fmvilas fmvilas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is going great! 💪

I left a few suggestions. Also, if I recall correctly, the asyncapi new glee command should have an alias called asyncapi new project. You should add that by creating the project.ts file in the same directory. It can simply be a file that imports the glee.ts and exports everything it's exporting (same as with new/index.ts, which is an alias of new/file.ts). Also, make sure console messages suggest asyncapi new project or asyncapi new glee, depending on which one has been used.

Keep up the great work 🙌

create-glee-app/templates/default/README-template.md Outdated Show resolved Hide resolved
create-glee-app/templates/default/README-template.md Outdated Show resolved Hide resolved
src/commands/new/glee.ts Outdated Show resolved Hide resolved
src/commands/new/glee.ts Outdated Show resolved Hide resolved
src/commands/new/glee.ts Outdated Show resolved Hide resolved
src/commands/new/glee.ts Outdated Show resolved Hide resolved
src/commands/new/index.ts Outdated Show resolved Hide resolved
src/commands/new/glee.ts Outdated Show resolved Hide resolved
src/commands/new/glee.ts Outdated Show resolved Hide resolved
src/commands/new/glee.ts Outdated Show resolved Hide resolved
Copy link
Member

@fmvilas fmvilas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some comments but it's already looking good to get out of the Draft PR stage 🙌

src/commands/new/glee.ts Outdated Show resolved Hide resolved
src/commands/new/glee.ts Outdated Show resolved Hide resolved
src/commands/new/glee.ts Outdated Show resolved Hide resolved
Copy link
Member

@fmvilas fmvilas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have conflicts in the package-lock.json file. My suggestion is that you fix it by doing git pull (you'll get the conflicts in your machine), remove package-lock.json and node_modules, and then run npm install. After that, just continue the usual git commit workflow.

Copy link
Member

derberg commented Feb 6, 2023

just my suggestion is that better do not remove package-lock.json as the installation that will follow will pump all the available patches of all dependencies. I once in the past got nice tip that it is enough to resolve conflicts in package.json and then run npm i --verbose and package-lock.json will be properly fixed

@Souvikns
Copy link
Member

Souvikns commented Apr 6, 2023

getting this error in tests

(node:51125) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 21 error listeners added to [WriteStream]. Use emitter.setMaxListeners() to increase limit
    (Use `node --trace-warnings ...` to show where the warning was created)

I see that the MaxListeners were increased,

require('events').EventEmitter.defaultMaxListeners = 20;

I am unable to understand why this has to be increased and does this affect this error.

@derberg, @magicmatatjahu

@peter-rr
Copy link
Member Author

peter-rr commented Apr 7, 2023

I just ran the command locally and it works like a charm, one thing though I see it is not generating any spec file, when I do npm run dev it gives me this error. Screenshot 2023-03-20 at 12 08 51 PM

I think we can solve this by generating a spec file to go with the functions.

This should be working fine after updating the .gitignore file. Could you check it?

@peter-rr peter-rr requested a review from Souvikns April 7, 2023 12:32
Souvikns
Souvikns previously approved these changes Apr 13, 2023
@derberg
Copy link
Member

derberg commented Apr 17, 2023

@peter-rr @Souvikns this PR resolves #184 imho, and if we want similar stuff for Generator templates, IMHO would be better if @peter-rr opens a new issue really

wdyt?

@derberg
Copy link
Member

derberg commented Apr 17, 2023

@peter-rr @Souvikns sorry, actually #337 is there already, so @peter-rr imho just update PR description that #184 will be resolved with merge of this PR

@sonarcloud
Copy link

sonarcloud bot commented Apr 20, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@peter-rr
Copy link
Member Author

/rtm

@asyncapi-bot asyncapi-bot merged commit 8276671 into asyncapi:master Apr 20, 2023
@asyncapi-bot
Copy link
Contributor

🎉 This PR is included in version 0.39.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@peter-rr peter-rr deleted the create-new-glee-project branch February 2, 2024 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make it easier to create templates and glee projects
5 participants