@dvsa/cvs-feature-flags
v0.25.0
Published
Common package to be used in CVS to manage feature flags
Downloads
369
Readme
cvs-feature-flags
Feature flags for the Commercial Vehicle Services (CVS) system, published as a GitHub package.
Pre-requisites
- Node.js (Please see
.nvmrcfor specific version) npm(If using n or nvm, this will be automatically managed)- Security
- Git secrets
- ScanRepo
- Unzip
repo-security-scanner_<version>_Darwin_<architercture>.tar.gzand rename the executable inside the folder toscanrepo- Add executable to path (usingecho $PATHto find your path)
- Unzip
Getting started
Run the following command after cloning the project
npm install(ornpm i)
The code that will be published lives inside the ./src directory.
If wishing to add new top level directories to the output, then they must be included in the files array inside package.json as well as included in the clean:temp command.
Naming conventions followed for RDS Migration
When adding a new RDS migration object, the following conventions should be adhered to:
The object should be named
<domain>DBe.g. "testFacilityDB", "defectDB", "testTypeDB"A typical object should follow this structure:
enabled: A boolean indicating if the feature is enabled.<function>readDDB: A boolean indicating if reading from DynamoDB is enabled.<function>readAurora: A boolean indicating if reading from Aurora is enabled.<function>writeDDB: A boolean indicating if writing to DynamoDB is enabled.<function>writeAurora: A boolean indicating if writing to Aurora is enabled.
(*Note: If Reads/Writes aren't required, the omit the flag)
Example
testFacilityDB: {
enabled: true,
// these flags control the /test-station/{+proxy}
testStationReadDDB: true,
testStationReadAurora: false,
// The only writes that occur in "test stations" are via the put, therefore no need for distinct flags
testStationWriteDDB: true,
testStationWriteAurora: false,
// these flags control the /activities/{+proxy}
activityReadDDB: true,
activityReadAurora: false,
activityWriteDDB: true
activityWriteAurora: false
}
