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

fluxService - update shell commands and refactor #1271

Merged
merged 6 commits into from Apr 10, 2024

Conversation

MorningLightMountain713
Copy link
Contributor

What this pull does

  • Update fluxService to use serviceHelper command runner.
  • Remove listeners for req body - the request body is fully finalized before it gets to the post handler, so don't need to use event listeners anymore. This simplifies things and makes the tests a lot easier too.
  • Unify the fs calls, these are all async now.
  • Fix typing.
  • Add a couple of git methods for branches and stuff (unused at the moment).
  • Alpha sort exports for easy lookup.
  • Update all the tests (passing).

To Do

I'd like to revisit this again in the future and tidy up some of the path stuff, i.e. can just use process.cwd() for a lot of the directory stuff. Look at refactoring some of the methods, as a lot of them are quite similar and could probably remove a lot of lines of code here. Shame commonJS doesn't have decorators, as this would be a perfect place to use them.

@MorningLightMountain713
Copy link
Contributor Author

Screenshot 2024-04-08 at 9 47 48 AM

Copy link

codecov bot commented Apr 8, 2024

Codecov Report

Attention: Patch coverage is 75.50201% with 61 lines in your changes are missing coverage. Please review.

Project coverage is 47.34%. Comparing base (fb077b8) to head (c84e169).
Report is 3 commits behind head on development.

❗ Current head c84e169 differs from pull request most recent head a3f0b97. Consider uploading reports for the commit a3f0b97 to get more accurate results

Files Patch % Lines
ZelBack/src/services/fluxService.js 75.50% 61 Missing ⚠️
Additional details and impacted files
@@               Coverage Diff               @@
##           development    #1271      +/-   ##
===============================================
- Coverage        47.44%   47.34%   -0.11%     
===============================================
  Files               47       47              
  Lines            15446    15444       -2     
===============================================
- Hits              7329     7312      -17     
- Misses            8117     8132      +15     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@MorningLightMountain713
Copy link
Contributor Author

I forgot to make the helpers executable on this branch... have done so now.

Have also tested this on nodeJS 14.21.3 on a live node... working.

Copy link
Member

@Cabecinha84 Cabecinha84 left a comment

Choose a reason for hiding this comment

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

Ack

@Cabecinha84 Cabecinha84 merged commit c9bb836 into development Apr 10, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants