A serverless microservice responsible for generating documents, such as test results for Candidates.
DVSA dependencies have been moved from npm to github so in order to install/update any private @DVSA packages
you are required to have an entry in your global ~/.npmrc
file as follows:
//npm.pkg.github.com/:_authToken=<your auth token here>
All serverless functions live in dedicated directories in src/functions
.
Code that is common between multiple functions should reside in src/common
.
As per the principles of Hexagonal Architecture, each function has the following directories to help us separate concerns:
framework
- contains all Inbound and Outbound Adapters, and all use of external/proprietary APIs - depends upon...application
- contains all Inbound and Outbound Ports, doesn't use any external/proprietary APIs - depends upon...domain
- contains all domain objects (Aggregates, Objects, Value classes etc) with all "business logic" (not just anaemic data holders), doesn't use any external/proprietary APIs.
To build a zip file for every function to build/artifacts
, run:
npm run package
Note: The build requires jq.
To run the unit tests, run:
npm run test
To run the integration tests, and generate pdf output for all templates, run:
npm run integration
Note: Not all markup will be perfectly rendered in the pdf templates as some of the markup is gov.notify specific