vat-db-npm
v0.0.1
Published
VAT sql dump to test staging and production data locally
Readme
vat-prod-db
This repo is used to publish the VAT database (DB) in the NPM registry. When VAT application is started locally, the application may pull the DB based off of dependencies in package.json.
Setup
Prerequisite
- New personal access token (PAT)
- Go to code.il2
- Click Add new token
- Give the token a name
- For Scope* select
apiread_apiread_repository
- Click Create personal access token
- Copy the newly created PAT NOTE: The token will be inaccessible afterwards if not copied right away.
Steps
- Clone vat-db-npm repo to the same directory as
vat-backend- From vat-db-npm, click Code
- Click clipboard button next to URL
- Go to terminal
- Run
git cloneand paste in git URL from Step 1.2 - Follow authentication instructions
NOTE: A password manager should be used to ensure the credentials are not saved into
.git-credentialsas plaintext. On the Mac, the keychain store may be used by runninggit config --global credential.helper osxkeychain(More info). NOTE: Use your repo1 access token to clone the repository
- In terminal, run
cd vat-db-npm - Run
npm config set -- '//code.il2.dso.mil/api/v4/projects/4651/packages/npm/:_authToken' "PASTE_TOKEN_HERE_WITH_QUOTES"PASTE_TOKEN_HERE_WITH_QUOTESshould be replaced with PAT created in Prerequisite
npm install
Manually Publishing New DB
- Ensure NPM registry is setup (In Setup->Steps 3)
- Update the version for
@vat-db-npm/vat-dbin thedependenciesofpackage.jsonNOTE: The version for@vat-db-npm/vat-dbis to the right of the colon. The older versions can be found here
"dependencies": {
"@vat-db-npm/vat-db": "^0.0.142"
}- To publish run
npm publish
