runtime-node icon indicating copy to clipboard operation
runtime-node copied to clipboard

Add support for Fastify

Open timokoessler opened this issue 1 year ago • 1 comments

  • [x] Add sample app
  • [x] Wrap GET requests
  • [x] Wrap other request methods and other functions
  • [x] Patch default module function export - Adds a new wrapping method by hooking into require
  • [x] Add tests
  • [x] Add end2end tests

TODO: Investigate how require works with different versions (e.g. a package is installed multiple times)

timokoessler avatar Jun 16 '24 15:06 timokoessler

Codecov Report

Attention: Patch coverage is 95.60440% with 16 lines in your changes missing coverage. Please review.

Project coverage is 97.84%. Comparing base (fed363f) to head (191fb1d). Report is 368 commits behind head on main.

Files with missing lines Patch % Lines
library/agent/wrapRequire.ts 86.41% 11 Missing :warning:
library/sources/fastify/wrapRequestHandler.ts 93.02% 3 Missing :warning:
library/sources/fastify/contextFromRequest.ts 92.30% 2 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #246      +/-   ##
==========================================
- Coverage   97.95%   97.84%   -0.11%     
==========================================
  Files         128      134       +6     
  Lines        7319     7667     +348     
  Branches     1018     1064      +46     
==========================================
+ Hits         7169     7502     +333     
- Misses        148      163      +15     
  Partials        2        2              

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Jun 20 '24 15:06 codecov[bot]

See https://github.com/AikidoSec/firewall-node/pull/359

timokoessler avatar Sep 09 '24 09:09 timokoessler