account-lookup-service 17.11.1-snapshot.0 → 17.12.0-snapshot.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 +8 -0
- package/config/default.json +3 -2
- package/config/knexfile.js +1 -3
- package/docker/account-lookup-service/default.json +3 -2
- package/docker/central-ledger/default.json +2 -1
- package/package.json +5 -4
- package/src/api/health.js +2 -3
- package/src/handlers/monitoring/plugins/health.js +2 -2
- package/src/lib/config.js +2 -1
- package/src/lib/healthCheck/subServiceHealth.js +1 -25
- package/test/integration-config.json +3 -2
- package/test/unit/api/health.test.js +4 -4
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,14 @@
|
|
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.11.1](https://github.com/mojaloop/account-lookup-service/compare/v17.11.0...v17.11.1) (2025-07-11)
|
6
|
+
|
7
|
+
|
8
|
+
### Chore
|
9
|
+
|
10
|
+
* **snapshot:** 17.11.1-snapshot.0 ([399c0d9](https://github.com/mojaloop/account-lookup-service/commit/399c0d91a34df68e3269c93faecfe3eabb897d8b))
|
11
|
+
* update deps ([e024c9f](https://github.com/mojaloop/account-lookup-service/commit/e024c9f3fa0b15c4e7ab3c1ae9c7f4fd27cc98e1))
|
12
|
+
|
5
13
|
## [17.11.0](https://github.com/mojaloop/account-lookup-service/compare/v17.10.3...v17.11.0) (2025-07-07)
|
6
14
|
|
7
15
|
|
package/config/default.json
CHANGED
@@ -7,7 +7,7 @@
|
|
7
7
|
"API_PORT": 4002,
|
8
8
|
"API_TYPE": "fspiop",
|
9
9
|
"DATABASE": {
|
10
|
-
"DIALECT": "
|
10
|
+
"DIALECT": "mysql2",
|
11
11
|
"HOST": "localhost",
|
12
12
|
"PORT": 3306,
|
13
13
|
"USER": "account_lookup",
|
@@ -21,7 +21,8 @@
|
|
21
21
|
"DESTROY_TIMEOUT_MILLIS": 5000,
|
22
22
|
"IDLE_TIMEOUT_MILLIS": 30000,
|
23
23
|
"REAP_INTERVAL_MILLIS": 1000,
|
24
|
-
"CREATE_RETRY_INTERVAL_MILLIS": 200
|
24
|
+
"CREATE_RETRY_INTERVAL_MILLIS": 200,
|
25
|
+
"ADDITIONAL_CONNECTION_OPTIONS": {}
|
25
26
|
},
|
26
27
|
"PROTOCOL_VERSIONS": {
|
27
28
|
"CONTENT": {
|
package/config/knexfile.js
CHANGED
@@ -6,10 +6,8 @@ const seedsDirectory = '../seeds'
|
|
6
6
|
const Config = require('../src/lib/config')
|
7
7
|
|
8
8
|
module.exports = {
|
9
|
-
|
9
|
+
...Config.DATABASE,
|
10
10
|
version: '5.7',
|
11
|
-
connection: Config.DATABASE.connection,
|
12
|
-
pool: Config.DATABASE.pool,
|
13
11
|
migrations: {
|
14
12
|
directory: migrationsDirectory,
|
15
13
|
tableName: 'migration'
|
@@ -7,7 +7,7 @@
|
|
7
7
|
"ADMIN_PORT": 4001,
|
8
8
|
"API_PORT": 4002,
|
9
9
|
"DATABASE": {
|
10
|
-
"DIALECT": "
|
10
|
+
"DIALECT": "mysql2",
|
11
11
|
"HOST": "mysql-als",
|
12
12
|
"PORT": 3306,
|
13
13
|
"USER": "account_lookup",
|
@@ -20,7 +20,8 @@
|
|
20
20
|
"DESTROY_TIMEOUT_MILLIS": 5000,
|
21
21
|
"IDLE_TIMEOUT_MILLIS": 30000,
|
22
22
|
"REAP_INTERVAL_MILLIS": 1000,
|
23
|
-
"CREATE_RETRY_INTERVAL_MILLIS": 200
|
23
|
+
"CREATE_RETRY_INTERVAL_MILLIS": 200,
|
24
|
+
"ADDITIONAL_CONNECTION_OPTIONS": {}
|
24
25
|
},
|
25
26
|
"PROTOCOL_VERSIONS": {
|
26
27
|
"CONTENT": {
|
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.12.0-snapshot.0",
|
5
5
|
"license": "Apache-2.0",
|
6
6
|
"author": "ModusBox",
|
7
7
|
"contributors": [
|
@@ -96,8 +96,8 @@
|
|
96
96
|
"@mojaloop/central-services-logger": "11.9.0",
|
97
97
|
"@mojaloop/central-services-metrics": "12.6.0",
|
98
98
|
"@mojaloop/central-services-shared": "18.29.0",
|
99
|
-
"@mojaloop/central-services-stream": "
|
100
|
-
"@mojaloop/database-lib": "11.2.1",
|
99
|
+
"@mojaloop/central-services-stream": "11.8.1",
|
100
|
+
"@mojaloop/database-lib": "^11.2.1",
|
101
101
|
"@mojaloop/event-sdk": "14.6.1",
|
102
102
|
"@mojaloop/inter-scheme-proxy-cache-lib": "2.6.0",
|
103
103
|
"@mojaloop/ml-schema-transformer-lib": "2.7.1",
|
@@ -114,6 +114,7 @@
|
|
114
114
|
"knex": "3.1.0",
|
115
115
|
"mustache": "4.2.0",
|
116
116
|
"mysql": "2.18.1",
|
117
|
+
"mysql2": "^3.14.2",
|
117
118
|
"npm-run-all": "4.1.5",
|
118
119
|
"parse-strings-in-object": "2.0.0",
|
119
120
|
"rc": "1.2.8"
|
@@ -166,7 +167,7 @@
|
|
166
167
|
"axios": "1.10.0",
|
167
168
|
"axios-retry": "^4.5.0",
|
168
169
|
"docdash": "2.0.2",
|
169
|
-
"dotenv": "^17.
|
170
|
+
"dotenv": "^17.2.0",
|
170
171
|
"get-port": "5.1.1",
|
171
172
|
"ioredis-mock": "^8.9.0",
|
172
173
|
"jest": "29.7.0",
|
package/src/api/health.js
CHANGED
@@ -27,7 +27,7 @@
|
|
27
27
|
'use strict'
|
28
28
|
|
29
29
|
const HealthCheck = require('@mojaloop/central-services-shared').HealthCheck.HealthCheck
|
30
|
-
const { getSubServiceHealthDatastore, getProxyCacheHealth
|
30
|
+
const { getSubServiceHealthDatastore, getProxyCacheHealth } = require('../lib/healthCheck/subServiceHealth')
|
31
31
|
const packageJson = require('../../package.json')
|
32
32
|
const Config = require('../lib/config')
|
33
33
|
|
@@ -36,8 +36,7 @@ const getSubServices = (appConfig, isAdmin) => {
|
|
36
36
|
return [getSubServiceHealthDatastore]
|
37
37
|
}
|
38
38
|
|
39
|
-
const subServices = [getSubServiceHealthDatastore
|
40
|
-
|
39
|
+
const subServices = [getSubServiceHealthDatastore]
|
41
40
|
if (appConfig.PROXY_CACHE_CONFIG.enabled) {
|
42
41
|
subServices.push(getProxyCacheHealth)
|
43
42
|
}
|
@@ -20,14 +20,14 @@
|
|
20
20
|
|
21
21
|
const { HealthCheck } = require('@mojaloop/central-services-shared').HealthCheck
|
22
22
|
const { defaultHealthHandler } = require('@mojaloop/central-services-health')
|
23
|
-
const { getProxyCacheHealth
|
23
|
+
const { getProxyCacheHealth } = require('../../../lib/healthCheck/subServiceHealth')
|
24
24
|
const packageJson = require('../../../../package.json')
|
25
25
|
|
26
26
|
let healthCheck
|
27
27
|
|
28
28
|
const createHealthCheck = ({ proxyCache }) => {
|
29
29
|
return new HealthCheck(packageJson, [
|
30
|
-
() => getProxyCacheHealth(proxyCache)
|
30
|
+
() => getProxyCacheHealth(proxyCache)
|
31
31
|
])
|
32
32
|
}
|
33
33
|
|
package/src/lib/config.js
CHANGED
@@ -115,7 +115,8 @@ const config = {
|
|
115
115
|
port: RC.DATABASE.PORT,
|
116
116
|
user: RC.DATABASE.USER,
|
117
117
|
password: RC.DATABASE.PASSWORD,
|
118
|
-
database: RC.DATABASE.DATABASE
|
118
|
+
database: RC.DATABASE.DATABASE,
|
119
|
+
...RC.DATABASE.ADDITIONAL_CONNECTION_OPTIONS
|
119
120
|
},
|
120
121
|
maxPendingAcquire: RC.DATABASE.MAX_PENDING_ACQUIRE,
|
121
122
|
pool: {
|
@@ -26,7 +26,6 @@
|
|
26
26
|
const { statusEnum, serviceName } = require('@mojaloop/central-services-shared').HealthCheck.HealthCheckEnums
|
27
27
|
const { logger } = require('../../lib')
|
28
28
|
const MigrationLockModel = require('../../models/misc/migrationLock')
|
29
|
-
const Producer = require('@mojaloop/central-services-stream').Util.Producer
|
30
29
|
|
31
30
|
/**
|
32
31
|
* @function getSubServiceHealthDatastore
|
@@ -55,28 +54,6 @@ const getSubServiceHealthDatastore = async () => {
|
|
55
54
|
}
|
56
55
|
}
|
57
56
|
|
58
|
-
/**
|
59
|
-
* @function getSubServiceHealthBroker
|
60
|
-
*
|
61
|
-
* @description Gets the health for the Notification broker
|
62
|
-
* @returns Promise<object> The SubService health object for the broker
|
63
|
-
*/
|
64
|
-
const getSubServiceHealthBroker = async () => {
|
65
|
-
let status = statusEnum.OK
|
66
|
-
try {
|
67
|
-
await Producer.allConnected()
|
68
|
-
status = statusEnum.OK
|
69
|
-
} catch (err) {
|
70
|
-
logger.isDebugEnabled && logger.debug(`getSubServiceHealthBroker failed with error: ${err.message}.`)
|
71
|
-
status = statusEnum.DOWN
|
72
|
-
}
|
73
|
-
|
74
|
-
return {
|
75
|
-
name: serviceName.broker,
|
76
|
-
status
|
77
|
-
}
|
78
|
-
}
|
79
|
-
|
80
57
|
/**
|
81
58
|
* @function getProxyCacheHealth
|
82
59
|
*
|
@@ -102,6 +79,5 @@ const getProxyCacheHealth = async (proxyCache) => {
|
|
102
79
|
|
103
80
|
module.exports = {
|
104
81
|
getSubServiceHealthDatastore,
|
105
|
-
getProxyCacheHealth
|
106
|
-
getSubServiceHealthBroker
|
82
|
+
getProxyCacheHealth
|
107
83
|
}
|
@@ -7,7 +7,7 @@
|
|
7
7
|
"ADMIN_PORT": 4001,
|
8
8
|
"API_PORT": 4002,
|
9
9
|
"DATABASE": {
|
10
|
-
"DIALECT": "
|
10
|
+
"DIALECT": "mysql2",
|
11
11
|
"HOST": "mysql-als",
|
12
12
|
"PORT": 3306,
|
13
13
|
"USER": "account_lookup",
|
@@ -21,7 +21,8 @@
|
|
21
21
|
"IDLE_TIMEOUT_MILLIS": 30000,
|
22
22
|
"REAP_INTERVAL_MILLIS": 1000,
|
23
23
|
"CREATE_RETRY_INTERVAL_MILLIS": 200,
|
24
|
-
"DEBUG": false
|
24
|
+
"DEBUG": false,
|
25
|
+
"ADDITIONAL_CONNECTION_OPTIONS": {}
|
25
26
|
},
|
26
27
|
"PROTOCOL_VERSIONS": {
|
27
28
|
"CONTENT": {
|
@@ -86,7 +86,7 @@ describe('/health', () => {
|
|
86
86
|
expect(response.statusCode).toBe(200)
|
87
87
|
const payload = JSON.parse(response.payload)
|
88
88
|
expect(payload.status).toBe('OK')
|
89
|
-
expect(payload.services.length).toBe(
|
89
|
+
expect(payload.services.length).toBe(1)
|
90
90
|
expect(payload.services[0].name).toBe('datastore')
|
91
91
|
})
|
92
92
|
|
@@ -108,7 +108,7 @@ describe('/health', () => {
|
|
108
108
|
expect(response.statusCode).toBe(503)
|
109
109
|
const payload = JSON.parse(response.payload)
|
110
110
|
expect(payload.status).toBe('DOWN')
|
111
|
-
expect(payload.services.length).toBe(
|
111
|
+
expect(payload.services.length).toBe(1)
|
112
112
|
expect(payload.services[0].name).toBe('datastore')
|
113
113
|
})
|
114
114
|
|
@@ -135,8 +135,8 @@ describe('/health', () => {
|
|
135
135
|
// Assert
|
136
136
|
const payload = JSON.parse(response.payload)
|
137
137
|
expect(response.statusCode).toBe(200)
|
138
|
-
expect(payload.services.length).toBe(
|
139
|
-
expect(payload.services[
|
138
|
+
expect(payload.services.length).toBe(2)
|
139
|
+
expect(payload.services[1].name).toBe('proxyCache')
|
140
140
|
} finally {
|
141
141
|
serverWithProxy && await serverWithProxy.stop()
|
142
142
|
}
|