@mojaloop/sdk-scheme-adapter 24.9.3 → 24.9.4
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/.yarn/cache/{@babel-core-npm-7.27.1-0f1bf48e52-fce205f9ee.zip → @babel-core-npm-7.27.3-86995da3eb-d70d5e4e99.zip} +0 -0
- package/.yarn/cache/@babel-generator-npm-7.27.3-9f345034e6-c0b1b399ff.zip +0 -0
- package/.yarn/cache/@babel-helper-module-transforms-npm-7.27.3-90dc30d3d9-c611d42d3c.zip +0 -0
- package/.yarn/cache/{@babel-helpers-npm-7.27.1-cd553908c9-19ede1e996.zip → @babel-helpers-npm-7.27.3-fb2512a0e0-c572acf07c.zip} +0 -0
- package/.yarn/cache/@babel-parser-npm-7.27.3-3085b3fa96-aef2cfd154.zip +0 -0
- package/.yarn/cache/@babel-traverse-npm-7.27.3-340ab882dc-9144023829.zip +0 -0
- package/.yarn/cache/@babel-types-npm-7.27.3-7b6a22808d-f0d43c0231.zip +0 -0
- package/.yarn/cache/{@redis-bloom-npm-5.1.0-323d34032e-d59e173944.zip → @redis-bloom-npm-5.1.1-c40a006b49-acf551ecd9.zip} +0 -0
- package/.yarn/cache/{@redis-client-npm-5.1.0-b981e68f86-bd7cd019ac.zip → @redis-client-npm-5.1.1-1bf41c09fc-5d31776707.zip} +0 -0
- package/.yarn/cache/{@redis-json-npm-5.1.0-029036681e-89ff085315.zip → @redis-json-npm-5.1.1-cafaa4c2f2-4dd9fa324d.zip} +0 -0
- package/.yarn/cache/{@redis-search-npm-5.1.0-366c78e895-167d86c9f6.zip → @redis-search-npm-5.1.1-f91b17a98d-6626955a56.zip} +0 -0
- package/.yarn/cache/{@redis-time-series-npm-5.1.0-0de38641ac-b408065311.zip → @redis-time-series-npm-5.1.1-2e2f40066a-94de04e8a3.zip} +0 -0
- package/.yarn/cache/{@types-node-npm-22.15.21-a4f238de1a-989f1ce3a9.zip → @types-node-npm-22.15.27-e786b3c41a-bf621456bf.zip} +0 -0
- package/.yarn/cache/@typescript-eslint-eslint-plugin-npm-8.33.0-0c4da18297-d9d009e644.zip +0 -0
- package/.yarn/cache/@typescript-eslint-parser-npm-8.33.0-67664fe1c4-16b4e34626.zip +0 -0
- package/.yarn/cache/@typescript-eslint-project-service-npm-8.33.0-0b8e3c7267-efb90f2fea.zip +0 -0
- package/.yarn/cache/@typescript-eslint-scope-manager-npm-8.33.0-bdad5df8b4-e5a82f102a.zip +0 -0
- package/.yarn/cache/@typescript-eslint-tsconfig-utils-npm-8.33.0-d26e1ec245-5bb139be99.zip +0 -0
- package/.yarn/cache/@typescript-eslint-type-utils-npm-8.33.0-36d614815a-edd6bb629f.zip +0 -0
- package/.yarn/cache/@typescript-eslint-types-npm-8.33.0-a3afab3a2a-3fa8c45989.zip +0 -0
- package/.yarn/cache/@typescript-eslint-typescript-estree-npm-8.33.0-575e7dfb97-365de7456d.zip +0 -0
- package/.yarn/cache/@typescript-eslint-utils-npm-8.33.0-909f5cda94-e654ceac6a.zip +0 -0
- package/.yarn/cache/@typescript-eslint-visitor-keys-npm-8.33.0-f53e6c2cd3-c92eacedd9.zip +0 -0
- package/.yarn/cache/{eslint-plugin-jest-npm-28.11.0-a208fceab5-809ec7f0d4.zip → eslint-plugin-jest-npm-28.12.0-a05d8a1874-8d0bcb2133.zip} +0 -0
- package/.yarn/cache/{redis-npm-5.1.0-37820eea51-a1ee60be3b.zip → redis-npm-5.1.1-42b1539552-99d33a2430.zip} +0 -0
- package/.yarn/install-state.gz +0 -0
- package/CHANGELOG.md +7 -0
- package/modules/api-svc/package.json +3 -3
- package/modules/api-svc/src/index.js +7 -2
- package/modules/api-svc/test/unit/index.test.js +43 -0
- package/modules/outbound-command-event-handler/package.json +4 -4
- package/modules/outbound-domain-event-handler/package.json +4 -4
- package/modules/private-shared-lib/package.json +4 -4
- package/package.json +4 -4
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/.yarn/install-state.gz
CHANGED
|
Binary file
|
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
# Changelog: [mojaloop/sdk-scheme-adapter](https://github.com/mojaloop/sdk-scheme-adapter)
|
|
2
|
+
### [24.9.4](https://github.com/mojaloop/sdk-scheme-adapter/compare/v24.9.3...v24.9.4) (2025-05-30)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Chore
|
|
6
|
+
|
|
7
|
+
* restart inbound on diff peerJwsKeys ([#582](https://github.com/mojaloop/sdk-scheme-adapter/issues/582)) ([c388481](https://github.com/mojaloop/sdk-scheme-adapter/commit/c388481185ff7aab08c6e6151825adc849bf6124))
|
|
8
|
+
|
|
2
9
|
### [24.9.3](https://github.com/mojaloop/sdk-scheme-adapter/compare/v24.9.2...v24.9.3) (2025-05-27)
|
|
3
10
|
|
|
4
11
|
|
|
@@ -95,12 +95,12 @@
|
|
|
95
95
|
"prom-client": "15.1.3",
|
|
96
96
|
"promise-timeout": "1.3.0",
|
|
97
97
|
"random-word-slugs": "0.1.7",
|
|
98
|
-
"redis": "5.1.
|
|
98
|
+
"redis": "5.1.1",
|
|
99
99
|
"uuidv4": "6.2.13",
|
|
100
100
|
"ws": "8.18.2"
|
|
101
101
|
},
|
|
102
102
|
"devDependencies": {
|
|
103
|
-
"@babel/core": "7.27.
|
|
103
|
+
"@babel/core": "7.27.3",
|
|
104
104
|
"@babel/preset-env": "7.27.2",
|
|
105
105
|
"@redocly/openapi-cli": "1.0.0-beta.95",
|
|
106
106
|
"@types/jest": "29.5.14",
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
"eslint": "9.15.0",
|
|
110
110
|
"eslint-config-airbnb-base": "15.0.0",
|
|
111
111
|
"eslint-plugin-import": "2.31.0",
|
|
112
|
-
"eslint-plugin-jest": "28.
|
|
112
|
+
"eslint-plugin-jest": "28.12.0",
|
|
113
113
|
"jest": "29.7.0",
|
|
114
114
|
"jest-junit": "16.0.0",
|
|
115
115
|
"npm-check-updates": "16.7.10",
|
|
@@ -139,6 +139,12 @@ class Server extends EventEmitter {
|
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
+
_shouldUpdateInboundServer(newConf) {
|
|
143
|
+
return !_.isEqual(this.conf.inbound, newConf.inbound)
|
|
144
|
+
|| !_.isEqual(this.conf.outbound, newConf.outbound)
|
|
145
|
+
|| !_.isEqual(this.conf.peerJWSKeys, newConf.peerJWSKeys);
|
|
146
|
+
}
|
|
147
|
+
|
|
142
148
|
async start() {
|
|
143
149
|
await this.cache.connect();
|
|
144
150
|
await this.wso2.auth.start();
|
|
@@ -224,8 +230,7 @@ class Server extends EventEmitter {
|
|
|
224
230
|
}
|
|
225
231
|
|
|
226
232
|
this.logger.isDebugEnabled && this.logger.push({ oldConf: this.conf.inbound, newConf: newConf.inbound }).debug('Inbound server configuration');
|
|
227
|
-
const updateInboundServer =
|
|
228
|
-
|| !_.isEqual(this.conf.outbound, newConf.outbound);
|
|
233
|
+
const updateInboundServer = this._shouldUpdateInboundServer(this.conf, newConf);
|
|
229
234
|
if (updateInboundServer) {
|
|
230
235
|
await this.inboundServer.stop();
|
|
231
236
|
this.inboundServer = new InboundServer(
|
|
@@ -98,5 +98,48 @@ describe('Server', () => {
|
|
|
98
98
|
expect(server.restart).toHaveBeenCalledTimes(1);
|
|
99
99
|
expect(server.restart).toHaveBeenCalledWith(newConf);
|
|
100
100
|
});
|
|
101
|
+
|
|
102
|
+
it('restarts inbound server if peerJWSKeys config is different', async () => {
|
|
103
|
+
// Clone the conf and change peerJWSKeys
|
|
104
|
+
const newConf = JSON.parse(JSON.stringify(conf));
|
|
105
|
+
newConf.peerJWSKeys = [{ kid: 'new-key', key: 'abc123' }];
|
|
106
|
+
|
|
107
|
+
// _shouldUpdateInboundServer should return true
|
|
108
|
+
expect(server._shouldUpdateInboundServer(newConf)).toBe(true);
|
|
109
|
+
|
|
110
|
+
// Simulate a config change event from control server
|
|
111
|
+
controlServer.broadcastConfigChange(newConf);
|
|
112
|
+
|
|
113
|
+
// Wait for the restart to be triggered
|
|
114
|
+
await new Promise((wait) => setTimeout(wait, 1000));
|
|
115
|
+
|
|
116
|
+
expect(server.restart).toHaveBeenCalledTimes(1);
|
|
117
|
+
expect(server.restart).toHaveBeenCalledWith(newConf);
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
it('restarts inbound server if inbound or outbound is different', async () => {
|
|
121
|
+
// Clone the conf and change inbound config
|
|
122
|
+
const newConfInbound = JSON.parse(JSON.stringify(conf));
|
|
123
|
+
newConfInbound.inbound = { ...conf.inbound, newProp: 'value' };
|
|
124
|
+
|
|
125
|
+
expect(server._shouldUpdateInboundServer(newConfInbound)).toBe(true);
|
|
126
|
+
|
|
127
|
+
controlServer.broadcastConfigChange(newConfInbound);
|
|
128
|
+
await new Promise((wait) => setTimeout(wait, 1000));
|
|
129
|
+
expect(server.restart).toHaveBeenCalledWith(newConfInbound);
|
|
130
|
+
|
|
131
|
+
// Reset mock
|
|
132
|
+
server.restart.mockClear();
|
|
133
|
+
|
|
134
|
+
// Clone the conf and change outbound config
|
|
135
|
+
const newConfOutbound = JSON.parse(JSON.stringify(conf));
|
|
136
|
+
newConfOutbound.outbound = { ...conf.outbound, anotherProp: 'value' };
|
|
137
|
+
|
|
138
|
+
expect(server._shouldUpdateInboundServer(newConfOutbound)).toBe(true);
|
|
139
|
+
|
|
140
|
+
controlServer.broadcastConfigChange(newConfOutbound);
|
|
141
|
+
await new Promise((wait) => setTimeout(wait, 1000));
|
|
142
|
+
expect(server.restart).toHaveBeenCalledWith(newConfOutbound);
|
|
143
|
+
});
|
|
101
144
|
});
|
|
102
145
|
});
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"convict": "6.2.4",
|
|
52
52
|
"express": "4.21.2",
|
|
53
53
|
"openapi-backend": "5.12.0",
|
|
54
|
-
"redis": "5.1.
|
|
54
|
+
"redis": "5.1.1",
|
|
55
55
|
"swagger-ui-express": "5.0.1",
|
|
56
56
|
"yamljs": "0.3.0"
|
|
57
57
|
},
|
|
@@ -60,13 +60,13 @@
|
|
|
60
60
|
"@types/convict": "6.1.6",
|
|
61
61
|
"@types/express": "5.0.2",
|
|
62
62
|
"@types/jest": "29.5.14",
|
|
63
|
-
"@types/node": "22.15.
|
|
63
|
+
"@types/node": "22.15.27",
|
|
64
64
|
"@types/node-cache": "4.2.5",
|
|
65
65
|
"@types/supertest": "6.0.3",
|
|
66
66
|
"@types/swagger-ui-express": "4.1.8",
|
|
67
67
|
"@types/yamljs": "0.2.34",
|
|
68
|
-
"@typescript-eslint/eslint-plugin": "8.
|
|
69
|
-
"@typescript-eslint/parser": "8.
|
|
68
|
+
"@typescript-eslint/eslint-plugin": "8.33.0",
|
|
69
|
+
"@typescript-eslint/parser": "8.33.0",
|
|
70
70
|
"copyfiles": "2.4.1",
|
|
71
71
|
"eslint": "9.15.0",
|
|
72
72
|
"jest": "29.7.0",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"convict": "6.2.4",
|
|
50
50
|
"express": "4.21.2",
|
|
51
51
|
"openapi-backend": "5.12.0",
|
|
52
|
-
"redis": "5.1.
|
|
52
|
+
"redis": "5.1.1",
|
|
53
53
|
"swagger-ui-express": "5.0.1",
|
|
54
54
|
"yamljs": "0.3.0"
|
|
55
55
|
},
|
|
@@ -57,13 +57,13 @@
|
|
|
57
57
|
"@types/convict": "6.1.6",
|
|
58
58
|
"@types/express": "5.0.2",
|
|
59
59
|
"@types/jest": "29.5.14",
|
|
60
|
-
"@types/node": "22.15.
|
|
60
|
+
"@types/node": "22.15.27",
|
|
61
61
|
"@types/node-cache": "4.2.5",
|
|
62
62
|
"@types/supertest": "6.0.3",
|
|
63
63
|
"@types/swagger-ui-express": "4.1.8",
|
|
64
64
|
"@types/yamljs": "0.2.34",
|
|
65
|
-
"@typescript-eslint/eslint-plugin": "8.
|
|
66
|
-
"@typescript-eslint/parser": "8.
|
|
65
|
+
"@typescript-eslint/eslint-plugin": "8.33.0",
|
|
66
|
+
"@typescript-eslint/parser": "8.33.0",
|
|
67
67
|
"copyfiles": "2.4.1",
|
|
68
68
|
"eslint": "9.15.0",
|
|
69
69
|
"jest": "29.7.0",
|
|
@@ -35,15 +35,15 @@
|
|
|
35
35
|
"@mojaloop/platform-shared-lib-messaging-types-lib": "0.7.2",
|
|
36
36
|
"@mojaloop/platform-shared-lib-nodejs-kafka-client-lib": "0.5.18",
|
|
37
37
|
"ajv": "8.17.1",
|
|
38
|
-
"redis": "5.1.
|
|
38
|
+
"redis": "5.1.1",
|
|
39
39
|
"uuid": "11.1.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@eslint/compat": "1.2.9",
|
|
43
|
-
"@types/node": "22.15.
|
|
43
|
+
"@types/node": "22.15.27",
|
|
44
44
|
"@types/uuid": "10.0.0",
|
|
45
|
-
"@typescript-eslint/eslint-plugin": "8.
|
|
46
|
-
"@typescript-eslint/parser": "8.
|
|
45
|
+
"@typescript-eslint/eslint-plugin": "8.33.0",
|
|
46
|
+
"@typescript-eslint/parser": "8.33.0",
|
|
47
47
|
"eslint": "9.15.0",
|
|
48
48
|
"jest": "29.7.0",
|
|
49
49
|
"npm-check-updates": "16.7.10",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mojaloop/sdk-scheme-adapter",
|
|
3
|
-
"version": "24.9.
|
|
3
|
+
"version": "24.9.4",
|
|
4
4
|
"description": "mojaloop sdk-scheme-adapter",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://github.com/mojaloop/sdk-scheme-adapter",
|
|
@@ -82,10 +82,10 @@
|
|
|
82
82
|
},
|
|
83
83
|
"devDependencies": {
|
|
84
84
|
"@types/jest": "29.5.14",
|
|
85
|
-
"@types/node": "22.15.
|
|
85
|
+
"@types/node": "22.15.27",
|
|
86
86
|
"@types/node-cache": "4.2.5",
|
|
87
|
-
"@typescript-eslint/eslint-plugin": "8.
|
|
88
|
-
"@typescript-eslint/parser": "8.
|
|
87
|
+
"@typescript-eslint/eslint-plugin": "8.33.0",
|
|
88
|
+
"@typescript-eslint/parser": "8.33.0",
|
|
89
89
|
"audit-ci": "7.1.0",
|
|
90
90
|
"eslint": "9.15.0",
|
|
91
91
|
"eslint-config-airbnb-typescript": "18.0.0",
|