account-lookup-service 17.4.1-csi-1300.6 → 17.5.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 +15 -0
- package/package.json +4 -4
- package/src/lib/config.js +1 -2
- package/src/lib/util.js +3 -1
- package/src/server.js +3 -9
- package/test/unit/api/health.test.js +0 -1
- package/test/unit/domain/oracle/oracle.test.js +1 -1
- package/test/unit/domain/participants/participants.test.js +1 -1
- package/test/unit/domain/parties/parties.test.js +1 -1
- package/test/unit/domain/timeout/index.test.js +1 -1
- package/test/unit/models/participantEndpoint/facade.test.js +1 -0
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,21 @@
|
|
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.5.0](https://github.com/mojaloop/account-lookup-service/compare/v17.4.1...v17.5.0) (2025-03-18)
|
6
|
+
|
7
|
+
|
8
|
+
### Features
|
9
|
+
|
10
|
+
* rethrow with context ([#540](https://github.com/mojaloop/account-lookup-service/issues/540)) ([c1037e9](https://github.com/mojaloop/account-lookup-service/commit/c1037e9ee3d78224074ca2c7ecc24c68a81c7e9e))
|
11
|
+
|
12
|
+
### [17.4.1](https://github.com/mojaloop/account-lookup-service/compare/v17.3.2...v17.4.1) (2025-03-14)
|
13
|
+
|
14
|
+
|
15
|
+
### Chore
|
16
|
+
|
17
|
+
* **csi-1300:** refactor get/put parties code to add new functionality easier ([#535](https://github.com/mojaloop/account-lookup-service/issues/535)) ([80a17df](https://github.com/mojaloop/account-lookup-service/commit/80a17df55419368e36a2c8acc3c4a5d1059c30f0))
|
18
|
+
* remove proxy map onboarding ([#538](https://github.com/mojaloop/account-lookup-service/issues/538)) ([560b42d](https://github.com/mojaloop/account-lookup-service/commit/560b42d37a266f635609d18e04aa7ea99688cebd))
|
19
|
+
|
5
20
|
### [17.3.2](https://github.com/mojaloop/account-lookup-service/compare/v17.3.1...v17.3.2) (2025-03-13)
|
6
21
|
|
7
22
|
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "account-lookup-service",
|
3
3
|
"description": "Account Lookup Service is used to validate Party and Participant lookups.",
|
4
|
-
"version": "17.
|
4
|
+
"version": "17.5.0",
|
5
5
|
"license": "Apache-2.0",
|
6
6
|
"author": "ModusBox",
|
7
7
|
"contributors": [
|
@@ -93,9 +93,9 @@
|
|
93
93
|
"@hapi/vision": "7.0.3",
|
94
94
|
"@mojaloop/central-services-error-handling": "13.0.7",
|
95
95
|
"@mojaloop/central-services-health": "15.0.4",
|
96
|
-
"@mojaloop/central-services-logger": "11.
|
97
|
-
"@mojaloop/central-services-metrics": "12.
|
98
|
-
"@mojaloop/central-services-shared": "18.
|
96
|
+
"@mojaloop/central-services-logger": "11.7.0",
|
97
|
+
"@mojaloop/central-services-metrics": "12.5.0",
|
98
|
+
"@mojaloop/central-services-shared": "18.23.0",
|
99
99
|
"@mojaloop/central-services-stream": "11.5.1",
|
100
100
|
"@mojaloop/database-lib": "11.1.4",
|
101
101
|
"@mojaloop/event-sdk": "14.3.2",
|
package/src/lib/config.js
CHANGED
@@ -173,8 +173,7 @@ const config = {
|
|
173
173
|
API_DOC_ENDPOINTS_ENABLED: RC.API_DOC_ENDPOINTS_ENABLED || false,
|
174
174
|
FEATURE_ENABLE_EXTENDED_PARTY_ID_TYPE: RC.FEATURE_ENABLE_EXTENDED_PARTY_ID_TYPE || false,
|
175
175
|
PROTOCOL_VERSIONS: getProtocolVersions(DEFAULT_PROTOCOL_VERSION, RC.PROTOCOL_VERSIONS),
|
176
|
-
PROXY_CACHE_CONFIG: RC.PROXY_CACHE
|
177
|
-
proxyMap: RC.PROXY_MAP
|
176
|
+
PROXY_CACHE_CONFIG: RC.PROXY_CACHE
|
178
177
|
}
|
179
178
|
|
180
179
|
if (config.JWS_SIGN) {
|
package/src/lib/util.js
CHANGED
@@ -29,7 +29,9 @@ const util = require('node:util')
|
|
29
29
|
const Path = require('node:path')
|
30
30
|
const EventSdk = require('@mojaloop/event-sdk')
|
31
31
|
const Enum = require('@mojaloop/central-services-shared').Enum
|
32
|
-
const { HeaderValidation, Hapi
|
32
|
+
const { HeaderValidation, Hapi } = require('@mojaloop/central-services-shared').Util
|
33
|
+
const rethrow = require('@mojaloop/central-services-shared').Util.rethrow.with('ALS')
|
34
|
+
|
33
35
|
const Config = require('../lib/config')
|
34
36
|
const { logger } = require('./index')
|
35
37
|
|
package/src/server.js
CHANGED
@@ -72,7 +72,7 @@ const createConnectedProxyCache = async (proxyCacheConfig) => {
|
|
72
72
|
* @param {array} routes array of API routes
|
73
73
|
* @returns {Promise<Server>} Returns the Server object
|
74
74
|
*/
|
75
|
-
const createServer = async (port, api, routes, isAdmin, proxyCacheConfig
|
75
|
+
const createServer = async (port, api, routes, isAdmin, proxyCacheConfig) => {
|
76
76
|
const server = await new Hapi.Server({
|
77
77
|
port,
|
78
78
|
routes: {
|
@@ -97,11 +97,6 @@ const createServer = async (port, api, routes, isAdmin, proxyCacheConfig, proxyM
|
|
97
97
|
|
98
98
|
if (!isAdmin && proxyCacheConfig.enabled) {
|
99
99
|
server.app.proxyCache = await createConnectedProxyCache(proxyCacheConfig)
|
100
|
-
if (proxyMap) {
|
101
|
-
for (const [dfspId, proxyId] of Object.entries(proxyMap)) {
|
102
|
-
await server.app.proxyCache.addDfspIdToProxyMapping(dfspId, proxyId)
|
103
|
-
}
|
104
|
-
}
|
105
100
|
}
|
106
101
|
|
107
102
|
await Plugins.registerPlugins(server, api, isAdmin)
|
@@ -127,8 +122,7 @@ const initializeApi = async (appConfig) => {
|
|
127
122
|
CENTRAL_SHARED_PARTICIPANT_CACHE_CONFIG,
|
128
123
|
DATABASE,
|
129
124
|
API_PORT,
|
130
|
-
PROXY_CACHE_CONFIG
|
131
|
-
proxyMap
|
125
|
+
PROXY_CACHE_CONFIG
|
132
126
|
} = appConfig
|
133
127
|
|
134
128
|
if (!INSTRUMENTATION_METRICS_DISABLED) {
|
@@ -149,7 +143,7 @@ const initializeApi = async (appConfig) => {
|
|
149
143
|
Cache.initCache()
|
150
144
|
])
|
151
145
|
|
152
|
-
return createServer(API_PORT, api, Routes.APIRoutes(api), false, PROXY_CACHE_CONFIG
|
146
|
+
return createServer(API_PORT, api, Routes.APIRoutes(api), false, PROXY_CACHE_CONFIG)
|
153
147
|
}
|
154
148
|
|
155
149
|
const initializeAdmin = async (appConfig) => {
|
@@ -51,6 +51,7 @@ jest.mock('@mojaloop/central-services-shared', () => ({
|
|
51
51
|
Request: { sendRequest: mockSendRequest },
|
52
52
|
Http: { SwitchDefaultHeaders: jest.fn() },
|
53
53
|
HeaderValidation: { getHubNameRegex: jest.fn().mockReturnValue(new RegExp(mockHubName)) },
|
54
|
+
rethrow: jest.requireActual('@mojaloop/central-services-shared').Util.rethrow,
|
54
55
|
Hapi: jest.requireActual('@mojaloop/central-services-shared').Util.Hapi
|
55
56
|
},
|
56
57
|
Enum: mockEnums
|