@mojaloop/central-services-shared 17.6.0-snapshot.0 → 17.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,27 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ## [17.6.0](https://github.com/mojaloop/central-services-shared/compare/v17.5.3...v17.6.0) (2023-08-17)
6
+
7
+
8
+ ### Features
9
+
10
+ * configure keepalive ([#342](https://github.com/mojaloop/central-services-shared/issues/342)) ([b753382](https://github.com/mojaloop/central-services-shared/commit/b753382c5ea1864eb8a869bc7a75c16d9da433d8))
11
+
12
+ ### [17.5.3](https://github.com/mojaloop/central-services-shared/compare/v17.5.2...v17.5.3) (2023-08-17)
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * add null check before passing payload to getRawBody ([#344](https://github.com/mojaloop/central-services-shared/issues/344)) ([a4dcccc](https://github.com/mojaloop/central-services-shared/commit/a4dccccef9224bdd0dba85b5cd751ca1477d4082))
18
+
19
+ ### [17.5.2](https://github.com/mojaloop/central-services-shared/compare/v17.5.1...v17.5.2) (2023-08-16)
20
+
21
+
22
+ ### Bug Fixes
23
+
24
+ * **mojaloop/#3480:** change performance impacting log statements to debug ([#343](https://github.com/mojaloop/central-services-shared/issues/343)) ([20c2fdb](https://github.com/mojaloop/central-services-shared/commit/20c2fdb3d1b1ad86308c602b0d69e95038d1c91a)), closes [mojaloop/#3480](https://github.com/mojaloop/project/issues/3480)
25
+
5
26
  ### [17.5.1](https://github.com/mojaloop/central-services-shared/compare/v17.5.0...v17.5.1) (2023-02-23)
6
27
 
7
28
  ## [17.5.0](https://github.com/mojaloop/central-services-shared/compare/v17.4.0...v17.5.0) (2023-01-16)
package/audit-ci.jsonc CHANGED
@@ -22,7 +22,7 @@
22
22
  "GHSA-8cf7-32gw-wr33",
23
23
  "GHSA-qwph-4952-7xr6",
24
24
  "GHSA-27h2-hvpr-p74q",
25
- // TODO: Need to fix this
26
- "GHSA-h755-8qp9-cq85"
25
+ "GHSA-h755-8qp9-cq85", // https://github.com/advisories/GHSA-h755-8qp9-cq85
26
+ "GHSA-c2qf-rxjj-qqgw" // https://github.com/advisories/GHSA-c2qf-rxjj-qqgw
27
27
  ]
28
28
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mojaloop/central-services-shared",
3
- "version": "17.6.0-snapshot.0",
3
+ "version": "17.6.0",
4
4
  "description": "Shared code for mojaloop central services",
5
5
  "license": "Apache-2.0",
6
6
  "author": "ModusBox",
@@ -62,7 +62,7 @@
62
62
  "dotenv": "16.3.1",
63
63
  "env-var": "7.3.1",
64
64
  "event-stream": "4.0.1",
65
- "immutable": "4.3.1",
65
+ "immutable": "4.3.2",
66
66
  "lodash": "4.17.21",
67
67
  "mustache": "4.2.0",
68
68
  "openapi-backend": "5.9.2",
@@ -79,12 +79,12 @@
79
79
  "audit-ci": "^6.6.1",
80
80
  "base64url": "3.0.1",
81
81
  "chance": "1.1.11",
82
- "npm-check-updates": "16.10.16",
82
+ "npm-check-updates": "16.12.1",
83
83
  "nyc": "15.1.0",
84
84
  "pre-commit": "1.2.2",
85
85
  "proxyquire": "2.1.3",
86
86
  "replace": "^1.2.2",
87
- "rewire": "6.0.0",
87
+ "rewire": "7.0.0",
88
88
  "sinon": "15.2.0",
89
89
  "standard": "17.1.0",
90
90
  "standard-version": "9.5.0",
@@ -75,15 +75,18 @@ module.exports.plugin = {
75
75
  server.ext([{
76
76
  type: 'onPostAuth',
77
77
  method: async (request, h) => {
78
- return getRawBody(request.payload)
79
- .then(rawBuffer => {
80
- if (Buffer.byteLength(rawBuffer) !== 0) {
81
- request = requestRawPayloadTransform(request, rawBuffer)
82
- }
83
- return h.continue
84
- }).catch(() => {
85
- return h.continue
86
- })
78
+ if (request.payload) {
79
+ return getRawBody(request.payload)
80
+ .then(rawBuffer => {
81
+ if (Buffer.byteLength(rawBuffer) !== 0) {
82
+ request = requestRawPayloadTransform(request, rawBuffer)
83
+ }
84
+ return h.continue
85
+ }).catch(() => {
86
+ return h.continue
87
+ })
88
+ }
89
+ return h.continue
87
90
  }
88
91
  }])
89
92
  }
@@ -104,9 +104,9 @@ const sendRequest = async (url, headers, source, destination, method = enums.Htt
104
104
  requestOptions = span.injectContextToHttpRequest(requestOptions)
105
105
  span.audit(requestOptions, EventSdk.AuditEventAction.egress)
106
106
  }
107
- Logger.isInfoEnabled && Logger.info(`sendRequest::request ${JSON.stringify(requestOptions)}`)
107
+ Logger.isDebugEnabled && Logger.debug(`sendRequest::request ${JSON.stringify(requestOptions)}`)
108
108
  const response = await request(requestOptions)
109
- Logger.isInfoEnabled && Logger.info(`Success: sendRequest::response ${JSON.stringify(response, Object.getOwnPropertyNames(response))}`)
109
+ Logger.isDebugEnabled && Logger.debug(`Success: sendRequest::response ${JSON.stringify(response, Object.getOwnPropertyNames(response))}`)
110
110
  !!sendRequestSpan && await sendRequestSpan.finish()
111
111
  !!histTimerEnd && histTimerEnd({ success: true, source, destination, method })
112
112
  return response