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

Refactor Mc-Auth and introduce automated tests #182

Merged
merged 41 commits into from
Jun 15, 2022
Merged

Conversation

SpraxDev
Copy link
Member

@SpraxDev SpraxDev commented Jan 18, 2022

This is going to be a tough journey...
I plan to cover as much as possible with unit tests and use it to refactor and recode parts of Mc-Auth.

This should make maintaining it easier and I can learn something new ^^

Planned

This is going to be a tough journey... I plan to cover as much as possible with unit tests and use it to refactor and recode parts of Mc-Auth.
This should make maintaining it easier and I can learn something new ^^
@SpraxDev SpraxDev self-assigned this Jan 18, 2022
Should be extracted into its own package in the future
The main focus was on writing unit test with only small changes to the implementation so I can update all the dependencies and then continue refactoring while having tests to rely on.
Everything relies on each other and relying on the index.ts for example starts the whole WebServer 'n stuff - That's why most things have been moved into classes
* Dev builds contain source maps while production builds don't.
* The docker image builds the project itself to isolate external factors introduced by the host system
* Some npm scripts now expect a `bash` shell (won't work on usual windows setup, but I don't care right now)
GitHub Actions: Don't use external dependency for SonarCloud


GitHub Actions: Fixes SonarCloud not installing dependencies
If the config on the file system is missing something compared to the default config (or doesn't even exist), this will make sure that a new version is written to the file system
When mounting a volume to these directories, those had their permissions set to the user that is creating the container (e.g. root:root) instead of the node user of the container
@SpraxDev SpraxDev marked this pull request as ready for review June 15, 2022 16:54
I'm not sure what values make any sense for rate-limiting. But better a limit that's too high then a limit that doesn't exist.

Login and some other routes need rate limits too!
@sonarqubecloud
Copy link

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 70 Code Smells

14.7% 14.7% Coverage
0.0% 0.0% Duplication

@SpraxDev SpraxDev merged commit d109f6f into master Jun 15, 2022
@SpraxDev SpraxDev deleted the the-big-cleanup branch June 15, 2022 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant