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

6.0.0 alpha.1 #1088

Open
wants to merge 570 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
570 commits
Select commit Hold shift + click to select a range
36465cb
Remove unneeded tests
Zooloo2014 Jul 23, 2019
4be2200
Merge branch '5.3.0-alpha.1' into OHM-831-add-back-request-matching
Jul 25, 2019
11db75a
Merge pull request #1048 from jembi/OHM-831-add-back-request-matching
Jul 25, 2019
d4faaab
fix responding to the client (responseBody -false)
bradsawadye Nov 4, 2019
9e10e40
fix spelling error
bradsawadye Nov 4, 2019
aaccbc9
fix rerun middlewares' order and typos
bradsawadye Nov 4, 2019
f72f09f
update the transaction error
bradsawadye Nov 5, 2019
c4126e6
await the collection of openhim mediator response
bradsawadye Nov 5, 2019
f7c9065
remove unnessesary call of setKoaResponse
bradsawadye Nov 5, 2019
728a04d
remove initiation of response on failure
bradsawadye Nov 5, 2019
e48444c
fix up tests
bradsawadye Nov 5, 2019
bbdbdcf
change the expected result for a test
bradsawadye Nov 5, 2019
e1e6c8a
Merge branch '5.3.0-alpha.1' of github.com:jembi/openhim-core-js into…
Nov 6, 2019
94939b4
Merge pull request #1056 from jembi/OHM-896-fix-openhim-responding
Nov 6, 2019
aa473c2
fix the storing of request bodies
bradsawadye Nov 7, 2019
29ebfbc
Merge pull request #1059 from jembi/OHM-898-do-not-store-request-body
Nov 7, 2019
65ec131
modify the logic for setting the autoRetry
bradsawadye Nov 7, 2019
b199cb0
set the property 'enabledAutoRetry' on test channels
bradsawadye Nov 7, 2019
ef4e9d4
Merge branch '5.3.0-alpha.1' into OHM-824-fix-auto-retry
bradsawadye Nov 7, 2019
ff46b16
update the response body id
bradsawadye Nov 7, 2019
2a5b430
set the response body id for openhim mediators
bradsawadye Nov 8, 2019
a27964b
update the ocrhestration response body id
bradsawadye Nov 11, 2019
5b406b0
modify setting of the body id
bradsawadye Nov 11, 2019
1882db6
store mediator response and orchestrations seperatelty
bradsawadye Nov 11, 2019
caaf4ed
fix and remove tests for non-existant function
bradsawadye Nov 12, 2019
e592967
store orchestartions when there is failure
bradsawadye Nov 12, 2019
449b0d2
fix route integration tests
bradsawadye Nov 12, 2019
38098e9
fix metrics unit tests
bradsawadye Nov 12, 2019
c144587
handle cases where the transaction does not exist
bradsawadye Nov 14, 2019
6a874d4
change message logged on error in setFinalStatus
bradsawadye Nov 14, 2019
e5dc024
modify functiolity that stores mediator bodies
bradsawadye Nov 14, 2019
52227da
modify func for extracting payloads into gridfs
bradsawadye Nov 14, 2019
0c9c036
Merge pull request #1058 from jembi/OHM-824-fix-auto-retry
Nov 15, 2019
430f80f
fix the handling of openhim mediator responses
bradsawadye Nov 15, 2019
8a7cbdc
Merge branch '5.3.0-alpha.1' of github.com:jembi/openhim-core-js into…
bradsawadye Nov 15, 2019
619b41f
Merge branch 'OHM-906-fix-non-primary-routes' into OHM-820-fix-all-br…
bradsawadye Nov 15, 2019
95e43c5
add methods used in tests
bradsawadye Nov 15, 2019
5f68940
fix route middleware functions' tests
bradsawadye Nov 15, 2019
8046914
remove unused method and make code cleaner
bradsawadye Nov 15, 2019
682eedf
modify functions for the rerun task
bradsawadye Nov 18, 2019
6104428
add the status message to the response
bradsawadye Nov 18, 2019
012b398
fix the rerun taks tests
bradsawadye Nov 18, 2019
d8ed5a8
tests for funs that extract payloads into chunks
bradsawadye Nov 18, 2019
76585e2
Merge pull request #1060 from jembi/OHM-906-fix-non-primary-routes
Nov 19, 2019
86e2a70
add tcp channel properties to the context
bradsawadye Nov 20, 2019
c5da82a
modify the logic for setting collectBody
bradsawadye Nov 20, 2019
b55ed04
logic for bypassing or streaming for tcp chanel
bradsawadye Nov 20, 2019
4759b24
modify the app for tcp routes
bradsawadye Nov 20, 2019
17b725e
clean up the storing response
bradsawadye Nov 20, 2019
c250f0c
modify the function that handles tcp routing
bradsawadye Nov 20, 2019
d07d058
Merge branch '5.3.0-alpha.1' of github.com:jembi/openhim-core-js into…
bradsawadye Nov 20, 2019
d40d2c2
handle cases where a transaction is not found
bradsawadye Nov 20, 2019
4e3bb69
modify how bodies stored in gridfs are deleted
bradsawadye Nov 20, 2019
cd49327
fix logic for handling cases where transaction does not exist
bradsawadye Nov 21, 2019
233fc77
bring back recording of events
bradsawadye Nov 21, 2019
c089346
uncomment test and change expected result for assertion
bradsawadye Nov 21, 2019
5e913dc
add the route name tot the routes
bradsawadye Nov 21, 2019
61a3cd1
update the transaction with body Id
bradsawadye Nov 22, 2019
b4fe0a7
refactor streaming functionality
bradsawadye Dec 6, 2019
d5d0887
Merge pull request #1063 from jembi/OHM-907-fix-tcp-route
MattyJ007 Jan 8, 2020
ab75350
Merge pull request #1061 from jembi/OHM-820-fix-all-broken-tests
MattyJ007 Jan 8, 2020
c6ba5cf
Remove docs from core repo
MattyJ007 Jan 9, 2020
f6f33f6
Remove scripts relating to Debian PPA releases
MattyJ007 Jan 9, 2020
b2184d7
Update packaging README
MattyJ007 Jan 9, 2020
785c12d
Add script to zip release
MattyJ007 Jan 9, 2020
e4f0c2f
Bump release version
MattyJ007 Jan 9, 2020
c5485cb
Merge pull request #1070 from jembi/bump-alpha-version
MattyJ007 Jan 9, 2020
a270043
Merge branch 'master' of github.com:jembi/openhim-core-js into 5.3.0-…
Jan 14, 2020
317d294
Fixed broken TCP-> TLS tests
Jan 15, 2020
381a33f
Updated travis file to ensure node 12 (erbium) passes
Jan 15, 2020
f3833f7
Merge pull request #1072 from jembi/OHM-938-fix-broken-tests
bradsawadye Jan 16, 2020
6867bce
Merge branch 'master' of github.com:jembi/openhim-core-js into 5.3.0-…
Jan 17, 2020
2201d8c
Merge branch '5.3.0-alpha.1' of github.com:jembi/openhim-core-js into…
Jan 17, 2020
10e4198
Merge branch 'master' of github.com:jembi/openhim-core-js into OHM-10…
bradsawadye Aug 21, 2020
ccc3a6a
Merge branch 'OHM-1028-fix-merge-conflicts' of github.com:jembi/openh…
Aug 24, 2020
41a6c90
Updated packages for Winston and Winston-mongodb
Aug 24, 2020
b1ae31b
Update Travis to have a waiting period for mongo
Aug 24, 2020
73e5104
Travis Test
Aug 24, 2020
b51ad20
Update mongo connection to use unified topology
Aug 24, 2020
0ca02cb
Updated Agenda to latest version
Aug 24, 2020
313c19b
Update mongoose connection to useCreateIndex
Aug 24, 2020
db496aa
Revert mongoose setting for useCreateIndex
Aug 24, 2020
5e02ed1
Remove before_script from travis
Aug 24, 2020
faa7abf
Updated chokidor deps
Aug 25, 2020
6b0f926
Updated cross-env deps
Aug 25, 2020
7ab144e
Updated faker deps
Aug 25, 2020
48f5369
Updated form-data, forever-monitor deps
Aug 25, 2020
b7fd83e
Revert deps update for mongoos-patch-history
Aug 25, 2020
2973992
Updated travis distribution to latest Ubuntu 20 (focal)
Aug 25, 2020
ba36a5c
Updated nyc deps
Aug 25, 2020
d2711c1
Increased testing timeout to 30seconds
Aug 25, 2020
0d03cf7
Updated request deps
Aug 25, 2020
c5a5827
Updated rewire deps
Aug 25, 2020
5d17393
Updated rimraf deps
Aug 25, 2020
d908341
updated semver deps
Aug 25, 2020
9151871
Updated sinon deps
Aug 25, 2020
b8acb76
Updated speculate deps
Aug 25, 2020
cb0198b
Updated standard deps
Aug 25, 2020
aae30c6
Updated package-lock file
Aug 25, 2020
20601a8
Updated xmldom deps
Aug 25, 2020
5f2e875
Updated xpath deps
Aug 25, 2020
5fa9446
Updated uuid eps
Aug 25, 2020
a6eb789
Merge pull request #1087 from jembi/OHM-1028-fix-merge-conflicts
MattyJ007 Aug 27, 2020
d888f35
Add migration for moving transaction bodies to GridFS
rcrichton Aug 27, 2020
f52551f
Ensure the process exits when a DB upgrade fails
rcrichton Aug 27, 2020
239535d
Merge remote-tracking branch 'origin/ohm-719-trasaction-grid-fs-migra…
rcrichton Aug 27, 2020
8f8acb1
Merge pull request #1089 from jembi/ohm-1034-add-transaction-upgrade-…
MattyJ007 Aug 28, 2020
0ca15e1
Fix formatting
rcrichton Aug 28, 2020
b891409
Remove killing of secondary routes when primary fails
rcrichton Aug 28, 2020
0ef903f
Fix test
rcrichton Aug 28, 2020
12c8777
Updated outdated dependencies
Aug 31, 2020
f8e86e6
Merge pull request #1090 from jembi/ohm-1047-keep-secondary-routes-alive
de-laz Aug 31, 2020
2d3cd90
Allow re-runs to function when body storage is turned off
rcrichton Sep 1, 2020
781958c
Fix linting to run correctly and execute when the tests run
rcrichton Sep 1, 2020
c8575a3
Fix existing lint issues in all files
rcrichton Sep 1, 2020
a50d8d5
Merge remote-tracking branch 'origin/6.0.0-alpha.1' into ohm-1046-dat…
rcrichton Sep 2, 2020
009750c
Compact transactions collection during GridFS migration
MattyJ007 Sep 3, 2020
adc1b97
Remove unused import
MattyJ007 Sep 3, 2020
727d8be
Add force option to collection compact command
MattyJ007 Sep 3, 2020
9f09133
Allow gridfs migration to run concurrently
rcrichton Sep 3, 2020
bba196a
Improve migration logging
rcrichton Sep 3, 2020
9b27020
Add additional logging to migration
rcrichton Sep 3, 2020
f88f1e2
Set default migration concurrency to 5
rcrichton Sep 3, 2020
83db80f
Improve logging for migration again
rcrichton Sep 3, 2020
a4dbbef
Fix promise check bug
rcrichton Sep 4, 2020
47e9a50
Fix transaction status bug
rcrichton Sep 4, 2020
6c38cfb
Merge pull request #1092 from jembi/ohm-1046-data-control-request-sto…
MattyJ007 Sep 4, 2020
de999f1
Merge pull request #1094 from jembi/ohm-1053-gridfs-migration-concurr…
MattyJ007 Sep 8, 2020
199f3e1
Remove logic that added transaction bodies
MattyJ007 Sep 8, 2020
fcb2fc9
Remove transaction body truncation
de-laz Sep 8, 2020
42bbf51
Remove unused confif references
de-laz Sep 8, 2020
8a32f13
Fix build errors
de-laz Sep 8, 2020
0e79b92
Correct transaction projection
rcrichton Sep 9, 2020
30d9714
Fix readme pro tips
rcrichton Sep 9, 2020
5ec7293
Add API endpoint to stream transaction bodies
rcrichton Sep 9, 2020
0e06c15
Fix error handling and imporve coverage
rcrichton Sep 9, 2020
8bb5fcf
fix deleting of autoretries
bradsawadye Sep 9, 2020
2f8661b
reset the transaction autoRetryAttempt number and add test
bradsawadye Sep 9, 2020
013562b
Merge pull request #1096 from jembi/ohm-1036-remove-truncation
MattyJ007 Sep 9, 2020
c422f52
Merge branch 'OHM-699-retrieve-bodies-via-streaming' of https://githu…
de-laz Sep 9, 2020
9c6a589
Merge pull request #1095 from jembi/OHM-1035-return-body-id
de-laz Sep 9, 2020
8b8c581
fix typo
bradsawadye Sep 9, 2020
58ef5ed
fix lint errors
bradsawadye Sep 9, 2020
9817871
fix lint error
bradsawadye Sep 9, 2020
27a1546
Update src/api/tasks.js
bradsawadye Sep 11, 2020
b076398
Add additional edge case tests and fix exclusive range bug
rcrichton Sep 11, 2020
4c24726
Merge remote-tracking branch 'origin/OHM-699-retrieve-bodies-via-stre…
rcrichton Sep 11, 2020
e8957de
Merge pull request #1098 from jembi/OHM-1049-fix-auto-retry-alpha
Sep 11, 2020
0d91586
Issue #1100: Request matching should include HTTP methods
mhawila Sep 11, 2020
40ab7ab
Merge branch '6.0.0-alpha.1' of github.com:jembi/openhim-core-js into…
Sep 14, 2020
c4e80b3
Fixed linting issues due to merge
Sep 14, 2020
d02ca10
Updated package-lock with optional module flags
Sep 14, 2020
48e2a9f
Merge branch 'OHM-699-retrieve-bodies-via-streaming' of github.com:je…
Sep 14, 2020
ba6aefe
Merge pull request #1093 from jembi/ohm-719-trasaction-grid-fs-migrat…
MattyJ007 Sep 14, 2020
ad908f5
Merge branch 'ohm-1031-dependency-updates' of github.com:jembi/openhi…
Sep 14, 2020
2de9215
Fixed linting issues
Sep 14, 2020
4e803ad
Updated babel packages to latest versions
Sep 14, 2020
288bb40
Updated moment to latest version
Sep 14, 2020
1ba7d31
Updated security vulnerabilies found by npm audit
Sep 14, 2020
d23b8ff
Updated winston-mongodb to latest version
Sep 14, 2020
509b1b0
Updated mongodb to latest version
Sep 14, 2020
e1fcf9d
Updated code that contained deprecation warnings
Sep 14, 2020
ba9e6ac
Fix typos
rcrichton Sep 15, 2020
f399d94
Correct bug to allow single bytes to be returned
rcrichton Sep 15, 2020
77a494b
Correct respone codes
rcrichton Sep 15, 2020
7d5c82c
Allow wildcard end values in range header
rcrichton Sep 15, 2020
1431009
Merge pull request #1097 from jembi/ohm-1037-new-transaction-bodies-e…
Sep 15, 2020
2e93cc6
Merge branch 'OHM-699-retrieve-bodies-via-streaming' of github.com:je…
Sep 16, 2020
faffd21
Merge branch '6.0.0-alpha.1' of github.com:jembi/openhim-core-js into…
Sep 16, 2020
eb1d432
Fixed linting issues on parent branch
Sep 16, 2020
1101837
Merge pull request #1102 from jembi/OHM-699-retrieve-bodies-via-strea…
Sep 16, 2020
6a804c7
send back the content-range header
bradsawadye Oct 27, 2020
ae5cd42
upgrade mongoose
bradsawadye Oct 30, 2020
240b8f2
fix the failing tests
bradsawadye Oct 30, 2020
f6ab03e
Merge branch '6.0.0-alpha.1' of github.com:jembi/openhim-core-js into…
bradsawadye Oct 30, 2020
fb94f70
upgrade the koa library
bradsawadye Nov 2, 2020
b09c091
upgrade lodash
bradsawadye Nov 2, 2020
8987bca
upgrade moment
bradsawadye Nov 2, 2020
69cbe01
upgrade nodemailer
bradsawadye Nov 2, 2020
6955d3f
upgrade pem library
bradsawadye Nov 2, 2020
f9c1fb7
upgrade xml2js
bradsawadye Nov 2, 2020
f9c6d1a
upgrade xmldom
bradsawadye Nov 2, 2020
31f3dad
upgrade xpath
bradsawadye Nov 2, 2020
caca27d
upgrade the mocha package
bradsawadye Nov 2, 2020
a273baa
update the babel/cli library
bradsawadye Nov 2, 2020
67d7061
upgrade the @babel/preset-env library
bradsawadye Nov 2, 2020
bebb8cd
upgrade codecov and @babel/register
bradsawadye Nov 2, 2020
4553125
update supertest standard snazzy and sinon
bradsawadye Nov 2, 2020
a8ff41c
update @babel/cli, chokidar etc
bradsawadye Nov 4, 2020
04c6a4a
replace request with axios
bradsawadye Nov 11, 2020
a4927dc
fix the polling functionality and the tests
bradsawadye Nov 12, 2020
b6221fd
update nodemailer, mongoose, mongodb and supertest
bradsawadye Nov 12, 2020
3fc1aab
Merge branch '6.0.0-alpha.1' of github.com:jembi/openhim-core-js into…
Nov 12, 2020
9bfe336
Merge branch 'ohm-1058-dependency-updates' of github.com:jembi/openhi…
Nov 12, 2020
cf9093c
Fixed linting errors
Nov 12, 2020
ecb22f1
Merge pull request #1103 from jembi/ohm-1058-dependency-updates
bradsawadye Nov 13, 2020
2b2e578
Merge pull request #1104 from jembi/OHM-1039-send-content-range-header
Nov 17, 2020
0e8fbbf
move line logging out succes message
bradsawadye Mar 25, 2021
a7bb40f
Merge pull request #1115 from jembi/DATO-8-alpha-fix-tls-issue
de-laz Mar 26, 2021
89cf908
Bump y18n from 3.2.1 to 3.2.2
dependabot[bot] Mar 29, 2021
8d01314
Upgrade supported nodejs version
de-laz May 4, 2021
8a3caa4
Remove unused dockerfile
de-laz May 4, 2021
9d9badf
Upgrade xmldom to 0.5.0
de-laz May 5, 2021
7cde43c
Switch package version to 6.0.0-alpha.1
de-laz May 5, 2021
95db724
Merge branch 'dato-3-release' into dependabot/npm_and_yarn/y18n-3.2.2
de-laz May 5, 2021
f0722b1
Sync package lock file with package file
de-laz May 5, 2021
df933ec
Merge pull request #1116 from jembi/dependabot/npm_and_yarn/y18n-3.2.2
de-laz May 5, 2021
759c206
Change the latest supported version
de-laz May 6, 2021
32f41e2
Bump handlebars from 4.7.6 to 4.7.7
dependabot[bot] May 6, 2021
cfab223
Upgrade dependencies to remove vulnerabilities
de-laz May 7, 2021
1322f93
Bump hosted-git-info from 2.8.8 to 2.8.9
dependabot[bot] May 9, 2021
fdc5479
Upgrade application dependencies
de-laz May 10, 2021
d7293ab
Update dev dependencies
de-laz May 10, 2021
297aedd
Upgrade standard to latest major version
de-laz May 10, 2021
7bb9be2
Merge pull request #1117 from jembi/dato-11-upgrade-node-version
MattyJ007 May 10, 2021
d984361
Merge branch 'dato-3-release' into dato-10-upgrade-dependencies
MattyJ007 May 10, 2021
196d3fd
Update mongoose minor version dependency
MattyJ007 May 10, 2021
13d1220
Update travis node test versions
MattyJ007 May 10, 2021
c06de4f
Merge pull request #1120 from jembi/dato-10-upgrade-dependencies
MattyJ007 May 10, 2021
48ab9ba
Merge pull request #1118 from jembi/dependabot/npm_and_yarn/handlebar…
MattyJ007 May 11, 2021
c281a34
Merge pull request #1121 from jembi/dependabot/npm_and_yarn/hosted-gi…
MattyJ007 May 11, 2021
5d8f63f
Merge branch 'dato-3-release' into ohm1100
MattyJ007 May 11, 2021
64ce864
Merge pull request #1101 from mhawila/ohm1100
MattyJ007 May 11, 2021
4ec8c1a
Revert "Issue #1100: Request matching should include HTTP methods"
MattyJ007 May 11, 2021
89ff179
Merge pull request #1123 from jembi/revert-1101-ohm1100
MattyJ007 May 11, 2021
e2fc5d1
Fix importing of polling channels
rcrichton May 11, 2021
d19e53b
Merge pull request #1125 from jembi/fix-import-of-polling-channels-6
bradsawadye May 11, 2021
32a0fe7
Merge pull request #1126 from jembi/dato-3-release
de-laz May 13, 2021
506d64c
Add logic for matching request method to channel method
bradsawadye Jul 6, 2021
b256861
Respond with the correct status
bradsawadye Jul 6, 2021
d6cb1cb
Add tests for new method
bradsawadye Jul 6, 2021
a833f3f
Fix the tests
bradsawadye Jul 6, 2021
fcd69d1
Merge pull request #1136 from jembi/OHM-1078-fix-request-matching-alpha
MattyJ007 Jul 8, 2021
7c0abb0
Add eslint files and libraries
bradsawadye Sep 13, 2021
a262deb
Apply eslint styling to the codebase
bradsawadye Sep 13, 2021
67aa19d
Apply eslinting to the transactions logic
bradsawadye Sep 13, 2021
462bf02
Add new line at end of file
bradsawadye Sep 13, 2021
1b09d54
Add new line to end of file
bradsawadye Sep 13, 2021
1645bec
Update core validation for audit log patientID filter
michaelloosen Sep 13, 2021
63372a2
Update API integration test to boost code coverage
michaelloosen Sep 13, 2021
9c869e1
Add more code coverage for testing audit.js
michaelloosen Sep 13, 2021
e6f3bdf
Apply linting to audit files
MattyJ007 Sep 14, 2021
cec6e6b
Remove unnecessary escape from regex
MattyJ007 Sep 14, 2021
c718948
Merge pull request #1144 from jembi/OHM-927-add-audit-validation-alpha
MattyJ007 Sep 14, 2021
9b3864f
Merge branch '6.0.0-alpha.1' into OHM-1082-add-eslint-alpha
MattyJ007 Sep 14, 2021
dc17ec1
Merge pull request #1142 from jembi/OHM-1082-add-eslint-alpha
MattyJ007 Sep 14, 2021
a0d7115
Apply npm audit fix
MattyJ007 Sep 14, 2021
7b087f9
Bump alpha release version
MattyJ007 Sep 14, 2021
da74af0
Add Dockerfile for building core image
MattyJ007 Sep 17, 2021
7d83820
Add unecessary directories to dockerignore
MattyJ007 Sep 21, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
node_modules
lib/*
packaging
infrastructure
test
4 changes: 2 additions & 2 deletions .env.test
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
NODE_ENV=test
NODE_ENV=test
NODE_TLS_REJECT_UNAUTHORIZED=0
NODE_OPTIONS=--tls-cipher-list=\"ECDHE-RSA-AES128-GCM-SHA256\"
NODE_OPTIONS=--tls-cipher-list=\"ECDHE-RSA-AES128-GCM-SHA256\"
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
docs/*
lib/*
15 changes: 15 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"env": {
"es6": true,
"node": true
},
"parserOptions": {
"ecmaVersion": 2017,
"sourceType": "module"
},
"plugins": ["prettier"],
"extends": ["eslint:recommended", "plugin:prettier/recommended"],
"rules": {
"require-atomic-updates": "off" // should be defaulted to "off" soon: https://github.com/eslint/eslint/issues/11899
}
}
5 changes: 5 additions & 0 deletions .prettierrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
semi: false
singleQuote: true
bracketSpacing: false
trailingComma: "none"
arrowParens: "avoid"
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
dist: focal
language: node_js
node_js:
- "lts/dubnium"
- "lts/erbium"
- "lts/fermium"
- "node"
matrix:
fast_finish: true
Expand Down
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM node:14.17-alpine

RUN apk upgrade --update-cache --available && \
apk add openssl && \
rm -rf /var/cache/apk/*

WORKDIR /app

COPY . .

RUN npm install

RUN npm run build

CMD ["node", "lib/server.js"]
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ This project uses [mocha](https://mochajs.org/) as a unit testing framework with

**Pro tips:**

- `npm run lint` - ensure the code is lint free, this is also run before an `npm test`
- `npm run lint` - ensure the code is lint free, this is also run after an `npm test`
- `npm link` - will symlink you local working directory to the globally installed openhim-core module. Use this so you can use the global openhim-core binary to run your current work in progress. Also, if you build any local changes the server will automatically restart.
- `npm test -- --grep <regex>` - will only run tests with names matching the regex.
- `npm test -- --inspect` - enabled the node debugger while running unit tests. Add `debugger` statements and use `node debug localhost:5858` to connect to the debugger instance.
- `npm test -- --bail` - exit on first test failure.
- `npm test:<int|unit> -- --grep <regex>` - will only run tests with names matching the regex.
- `npm test:<int|unit> -- --inspect` - enabled the node debugger while running unit tests. Add `debugger` statements and use `node debug localhost:5858` to connect to the debugger instance.
- `npm test:<int|unit> -- --bail` - exit on first test failure.

---

Expand Down
6 changes: 3 additions & 3 deletions bin/openhim-core.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,23 @@ if (args.indexOf('-v') >= 0 || args.indexOf('--version') >= 0) {
process.exit(0)
}

const child = new (forever.Monitor)('lib/server.js', {
const child = new forever.Monitor('lib/server.js', {
sourceDir: root,
command: 'node',
args,
watch: process.env.NODE_ENV !== 'production',
watchDirectory: 'lib'
})

child.on('watch:restart', (info) => {
child.on('watch:restart', info => {
console.error(`Restarting script because ${info.file} changed`)
})

child.on('restart', () => {
console.error(`Forever restarting script for ${child.times} time`)
})

child.on('exit:code', (code) => {
child.on('exit:code', code => {
console.error(`Forever detected script exited with code ${code}`)
})

Expand Down
9 changes: 0 additions & 9 deletions config/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,8 @@ The following config option are provided by the OpenHIM. All of these options ha
// API request are only valid for a particular window once made, this is
// the size of that window in seconds
"authWindowSeconds": 10,
// Max size allowed for ALL bodies in the transaction together
// Use min 1 MB to allow space for all routes on a transaction and max 15 MB leaving 1 MB available for the transaction metadata
"maxBodiesSizeMB": 15,
// Max size of a request payload to the API
// Due to the maximum size of a mongo document, the bodies in the request will be truncated if the request is larger than 16MB
"maxPayloadSizeMB": 50,
// Certain API endpoints allow for details to be truncated, e.g. transactions with very large bodies
// This setting sets the size to truncate to (number of characters)
"truncateSize": 15000,
// A message to append to detail strings that have been truncated
"truncateAppend": "\n[truncated ...]",
// The types of authentication to use for the API
// Supported types are "token" and "basic"
"authenicationTypes": ["token"]
Expand Down
6 changes: 2 additions & 4 deletions config/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"mongoLogger": {
"options": {
"w": 0,
"useNewUrlParser": true
"useNewUrlParser": true,
"useUnifiedTopology": true
}
},
"router": {
Expand All @@ -35,10 +36,7 @@
"protocol": "https",
"port": 8080,
"authWindowSeconds": 10,
"maxBodiesSizeMB": 15,
"maxPayloadSizeMB": 50,
"truncateSize": 15000,
"truncateAppend": "\n[truncated ...]",
"authenticationTypes": ["token"]
},
"rerun": {
Expand Down
3 changes: 0 additions & 3 deletions config/test.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@
"protocol": "https",
"port": 8080,
"authWindowSeconds": 50,
"maxBodiesSizeMB": 15,
"maxPayloadSizeMB": 50,
"truncateSize": 10,
"truncateAppend": "\n[truncated ...]",
"authenticationTypes": ["token", "basic"]
},
"caching": {
Expand Down
23 changes: 0 additions & 23 deletions infrastructure/development/docker/Dockerfile

This file was deleted.

Loading