@mojaloop/sdk-scheme-adapter 24.9.8-snapshot.9 → 24.10.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.
Files changed (30) hide show
  1. package/.circleci/config.yml +1 -1
  2. package/.grype.yaml +15 -0
  3. package/.nvmrc +1 -1
  4. package/.yarn/cache/{@babel-helpers-npm-7.26.9-629d8a6154-06363f8288.zip → @babel-helpers-npm-7.26.10-4eb1d94ec4-daa3689024.zip} +0 -0
  5. package/.yarn/cache/@redis-bloom-npm-5.5.6-4d657f1bec-72cef8eef4.zip +0 -0
  6. package/.yarn/cache/@redis-client-npm-5.5.6-94287e1111-dbf486100a.zip +0 -0
  7. package/.yarn/cache/@redis-json-npm-5.5.6-6730f82510-804cec9bb4.zip +0 -0
  8. package/.yarn/cache/@redis-search-npm-5.5.6-f14acc1d78-efe82ab0a6.zip +0 -0
  9. package/.yarn/cache/@redis-time-series-npm-5.5.6-bba24eca4c-0db2337daf.zip +0 -0
  10. package/.yarn/cache/@types-express-npm-5.0.3-78da63908b-bb6f10c14c.zip +0 -0
  11. package/.yarn/cache/{@types-node-npm-22.15.29-b40796f35f-201aabe361.zip → @types-node-npm-22.15.30-04ae714c4d-c380ad1765.zip} +0 -0
  12. package/.yarn/cache/{eslint-plugin-jest-npm-28.12.0-a05d8a1874-8d0bcb2133.zip → eslint-plugin-jest-npm-28.13.0-f1bc2edf00-1be5c0fcc4.zip} +0 -0
  13. package/.yarn/cache/redis-npm-5.5.6-882f3de1bd-1d383caedf.zip +0 -0
  14. package/.yarn/install-state.gz +0 -0
  15. package/CHANGELOG.md +7 -0
  16. package/audit-ci.jsonc +0 -2
  17. package/modules/api-svc/package.json +3 -4
  18. package/modules/api-svc/src/index.js +31 -32
  19. package/modules/api-svc/test/unit/index.test.js +32 -0
  20. package/modules/outbound-command-event-handler/package.json +4 -4
  21. package/modules/outbound-domain-event-handler/package.json +4 -4
  22. package/modules/private-shared-lib/package.json +3 -3
  23. package/package.json +3 -2
  24. package/.yarn/cache/@redis-bloom-npm-5.5.5-08ba788570-bde4c98288.zip +0 -0
  25. package/.yarn/cache/@redis-client-npm-5.5.5-de45fa1462-638e7e85fb.zip +0 -0
  26. package/.yarn/cache/@redis-json-npm-5.5.5-6caae5d1e6-26c0deb195.zip +0 -0
  27. package/.yarn/cache/@redis-search-npm-5.5.5-be3d1b0301-6b269f544a.zip +0 -0
  28. package/.yarn/cache/@redis-time-series-npm-5.5.5-3a80ea3c7f-5d5d7cc857.zip +0 -0
  29. package/.yarn/cache/@types-express-npm-5.0.2-da02de3116-c6f73c75c2.zip +0 -0
  30. package/.yarn/cache/redis-npm-5.5.5-e30d8c3be4-fa4864e201.zip +0 -0
@@ -1,7 +1,7 @@
1
1
  version: 2.1
2
2
  setup: true
3
3
  orbs:
4
- build: mojaloop/build@1.0.55
4
+ build: mojaloop/build@1.0.67
5
5
  workflows:
6
6
  setup:
7
7
  jobs:
package/.grype.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ignore:
2
+ - vulnerability: CVE-2025-3277 # sqlite-libs 3.48.0-r2
3
+ - vulnerability: CVE-2024-9410 # ada-libs 2.9.2-r1
4
+
5
+
6
+ # Set output format defaults
7
+ output:
8
+ - "table"
9
+ - "json"
10
+
11
+ # Modify your CircleCI job to check critical count
12
+ search:
13
+ scope: "squashed"
14
+ quiet: false
15
+ check-for-app-update: false
package/.nvmrc CHANGED
@@ -1 +1 @@
1
- 18.20.4
1
+ 22.15.1
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.10.0](https://github.com/mojaloop/sdk-scheme-adapter/compare/v24.9.7...v24.10.0) (2025-06-05)
3
+
4
+
5
+ ### Features
6
+
7
+ * bump up the node version to v22.15.1 ([#586](https://github.com/mojaloop/sdk-scheme-adapter/issues/586)) ([2c09d28](https://github.com/mojaloop/sdk-scheme-adapter/commit/2c09d28363d065c826899b5613c148dc8d0dd0b4))
8
+
2
9
  ### [24.9.7](https://github.com/mojaloop/sdk-scheme-adapter/compare/v24.9.6...v24.9.7) (2025-06-02)
3
10
 
4
11
 
package/audit-ci.jsonc CHANGED
@@ -4,7 +4,5 @@
4
4
  // Only use one of ["low": true, "moderate": true, "high": true, "critical": true]
5
5
  "moderate": true,
6
6
  "allowlist": [
7
- "GHSA-968p-4wvh-cqc8", // https://github.com/advisories/GHSA-968p-4wvh-cqc8
8
- "GHSA-jr5f-v2jv-69x6" // https://github.com/advisories/GHSA-jr5f-v2jv-69x6
9
7
  ]
10
8
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mojaloop/sdk-scheme-adapter-api-svc",
3
- "version": "21.0.0-snapshot.47",
3
+ "version": "21.0.0-snapshot.50",
4
4
  "description": "An adapter for connecting to Mojaloop API enabled switches.",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
@@ -86,7 +86,6 @@
86
86
  "javascript-state-machine": "3.1.0",
87
87
  "js-yaml": "4.1.0",
88
88
  "json-schema-ref-parser": "9.0.9",
89
- "knex": "3.1.0",
90
89
  "koa": "3.0.0",
91
90
  "koa-body": "6.0.1",
92
91
  "lodash": "4.17.21",
@@ -96,7 +95,7 @@
96
95
  "prom-client": "15.1.3",
97
96
  "promise-timeout": "1.3.0",
98
97
  "random-word-slugs": "0.1.7",
99
- "redis": "5.5.5",
98
+ "redis": "5.5.6",
100
99
  "uuidv4": "6.2.13",
101
100
  "ws": "8.18.2"
102
101
  },
@@ -110,7 +109,7 @@
110
109
  "eslint": "9.15.0",
111
110
  "eslint-config-airbnb-base": "15.0.0",
112
111
  "eslint-plugin-import": "2.31.0",
113
- "eslint-plugin-jest": "28.12.0",
112
+ "eslint-plugin-jest": "28.13.0",
114
113
  "jest": "29.7.0",
115
114
  "jest-junit": "16.0.0",
116
115
  "npm-check-updates": "16.7.10",
@@ -142,8 +142,6 @@ class Server extends EventEmitter {
142
142
  _shouldUpdateInboundServer(newConf) {
143
143
  const isInboundDifferent = !_.isEqual(this.conf.inbound, newConf.inbound);
144
144
  const isOutboundDifferent = !_.isEqual(this.conf.outbound, newConf.outbound);
145
- const isPeerJWSKeysDifferent = !_.isEqual(this.conf.peerJWSKeys, newConf.peerJWSKeys);
146
- const isJwsSigningKeyDifferent = !_.isEqual(this.conf.jwsSigningKey, newConf.jwsSigningKey);
147
145
 
148
146
  if (isInboundDifferent) {
149
147
  this.logger.debug('Inbound config is different', {
@@ -158,26 +156,11 @@ class Server extends EventEmitter {
158
156
  });
159
157
  }
160
158
 
161
- if (isPeerJWSKeysDifferent) {
162
- this.logger.debug('Peer JWS Keys config is different', {
163
- oldPeerJWSKeys: this.conf.peerJWSKeys,
164
- newPeerJWSKeys: newConf.peerJWSKeys
165
- });
166
- }
167
-
168
- if (isJwsSigningKeyDifferent) {
169
- this.logger.debug('JWS Signing Key config is different', {
170
- oldJwsSigningKey: this.conf.jwsSigningKey,
171
- newJwsSigningKey: newConf.jwsSigningKey
172
- });
173
- }
174
-
175
- return isInboundDifferent || isOutboundDifferent || isPeerJWSKeysDifferent || isJwsSigningKeyDifferent;
159
+ return isInboundDifferent || isOutboundDifferent;
176
160
  }
177
161
 
178
162
  _shouldUpdateOutboundServer(newConf) {
179
163
  const isOutboundDifferent = !_.isEqual(this.conf.outbound, newConf.outbound);
180
- const isJwsSigningKeyDifferent = !_.isEqual(this.conf.jwsSigningKey, newConf.jwsSigningKey);
181
164
 
182
165
  if (isOutboundDifferent) {
183
166
  this.logger.debug('Outbound config is different', {
@@ -186,14 +169,29 @@ class Server extends EventEmitter {
186
169
  });
187
170
  }
188
171
 
172
+ return isOutboundDifferent;
173
+ }
174
+
175
+ _shouldUpdatePeerJWSKeys(newConf) {
176
+ const isPeerJWSKeysDifferent = !_.isEqual(this.conf.peerJWSKeys, newConf.peerJWSKeys);
177
+ if (isPeerJWSKeysDifferent) {
178
+ this.logger.debug('Peer JWS Keys config is different', {
179
+ oldPeerJWSKeys: this.conf.peerJWSKeys,
180
+ newPeerJWSKeys: newConf.peerJWSKeys
181
+ });
182
+ }
183
+ return isPeerJWSKeysDifferent;
184
+ }
185
+
186
+ _shouldUpdateJwsSigningKey(newConf) {
187
+ const isJwsSigningKeyDifferent = !_.isEqual(this.conf.jwsSigningKey, newConf.jwsSigningKey);
189
188
  if (isJwsSigningKeyDifferent) {
190
189
  this.logger.debug('JWS Signing Key config is different', {
191
190
  oldJwsSigningKey: this.conf.jwsSigningKey,
192
191
  newJwsSigningKey: newConf.jwsSigningKey
193
192
  });
194
193
  }
195
-
196
- return isOutboundDifferent || isJwsSigningKeyDifferent;
194
+ return isJwsSigningKeyDifferent;
197
195
  }
198
196
 
199
197
  async start() {
@@ -283,9 +281,6 @@ class Server extends EventEmitter {
283
281
  this.logger.isDebugEnabled && this.logger.push({ oldConf: this.conf.inbound, newConf: newConf.inbound }).debug('Inbound server configuration');
284
282
  const updateInboundServer = this._shouldUpdateInboundServer(newConf);
285
283
  if (updateInboundServer) {
286
- const stopStartLabel = 'InboundServer stop/start duration';
287
- // eslint-disable-next-line no-console
288
- console.time(stopStartLabel);
289
284
  await this.inboundServer.stop();
290
285
  this.inboundServer = new InboundServer(
291
286
  newConf,
@@ -299,17 +294,12 @@ class Server extends EventEmitter {
299
294
  this.emit('error', errMessage);
300
295
  });
301
296
  await this.inboundServer.start();
302
- // eslint-disable-next-line no-console
303
- console.timeEnd(stopStartLabel);
304
297
  restartActionsTaken.updateInboundServer = true;
305
298
  }
306
299
 
307
300
  this.logger.isDebugEnabled && this.logger.push({ oldConf: this.conf.outbound, newConf: newConf.outbound }).debug('Outbound server configuration');
308
301
  const updateOutboundServer = this._shouldUpdateOutboundServer(newConf);
309
302
  if (updateOutboundServer) {
310
- const stopStartLabel = 'OutboundServer stop/start duration';
311
- // eslint-disable-next-line no-console
312
- console.time(stopStartLabel);
313
303
  await this.outboundServer.stop();
314
304
  this.outboundServer = new OutboundServer(
315
305
  newConf,
@@ -324,11 +314,22 @@ class Server extends EventEmitter {
324
314
  this.emit('error', errMessage);
325
315
  });
326
316
  await this.outboundServer.start();
327
- // eslint-disable-next-line no-console
328
- console.timeEnd(stopStartLabel);
329
317
  restartActionsTaken.updateOutboundServer = true;
330
318
  }
331
319
 
320
+ const updatePeerJWSKeys = this._shouldUpdatePeerJWSKeys(newConf);
321
+ if (updatePeerJWSKeys) {
322
+ Object.keys(this.conf.peerJWSKeys).forEach(key => { delete this.conf.peerJWSKeys[key]; });
323
+ Object.assign(this.conf.peerJWSKeys, _.cloneDeep(newConf.peerJWSKeys));
324
+ restartActionsTaken.updatePeerJWSKeys = true;
325
+ }
326
+
327
+ const updateJwsSigningKey = this._shouldUpdateJwsSigningKey(newConf);
328
+ if (updateJwsSigningKey) {
329
+ this.conf.jwsSigningKey = newConf.jwsSigningKey;
330
+ restartActionsTaken.updateJwsSigningKey = true;
331
+ }
332
+
332
333
  const updateFspiopEventHandler = !_.isEqual(this.conf.outbound, newConf.outbound)
333
334
  && this.conf.fspiopEventHandler.enabled;
334
335
  if (updateFspiopEventHandler) {
@@ -420,8 +421,6 @@ class Server extends EventEmitter {
420
421
  }
421
422
 
422
423
  this.conf = newConf;
423
- this.conf.peerJWSKeys = newConf?.peerJWSKeys;
424
- this.conf.jwsSigningKey = newConf?.jwsSigningKey;
425
424
 
426
425
  await oldCache?.disconnect();
427
426
 
@@ -123,5 +123,37 @@ describe('Server', () => {
123
123
  await new Promise((wait) => setTimeout(wait, 1000));
124
124
  expect(server.restart).toHaveBeenCalledWith(newConfOutbound);
125
125
  });
126
+
127
+ it('restarts when peerJWSKeys is different', async () => {
128
+ const newConfPeerJWSKeys = JSON.parse(JSON.stringify(conf));
129
+ newConfPeerJWSKeys.peerJWSKeys = { ...conf.peerJWSKeys, newKey: 'newValue' };
130
+
131
+ expect(server._shouldUpdatePeerJWSKeys(newConfPeerJWSKeys)).toBe(true);
132
+
133
+ controlServer.broadcastConfigChange(newConfPeerJWSKeys);
134
+ await new Promise((wait) => setTimeout(wait, 1000));
135
+ expect(server.restart).toHaveBeenCalledWith(newConfPeerJWSKeys);
136
+ });
137
+
138
+ it('does not update when peerJWSKeys is the same', async () => {
139
+ const newConfPeerJWSKeys = JSON.parse(JSON.stringify(conf));
140
+ expect(server._shouldUpdatePeerJWSKeys(newConfPeerJWSKeys)).toBe(false);
141
+ });
142
+
143
+ it('restarts when jwsSigningKey is different', async () => {
144
+ const newConfJwsSigningKey = JSON.parse(JSON.stringify(conf));
145
+ newConfJwsSigningKey.jwsSigningKey = { ...conf.jwsSigningKey, key: 'differentKey' };
146
+
147
+ expect(server._shouldUpdateJwsSigningKey(newConfJwsSigningKey)).toBe(true);
148
+
149
+ controlServer.broadcastConfigChange(newConfJwsSigningKey);
150
+ await new Promise((wait) => setTimeout(wait, 1000));
151
+ expect(server.restart).toHaveBeenCalledWith(newConfJwsSigningKey);
152
+ });
153
+
154
+ it('does not update when jwsSigningKey is the same', async () => {
155
+ const newConfJwsSigningKey = JSON.parse(JSON.stringify(conf));
156
+ expect(server._shouldUpdateJwsSigningKey(newConfJwsSigningKey)).toBe(false);
157
+ });
126
158
  });
127
159
  });
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mojaloop/sdk-scheme-adapter-outbound-command-event-handler",
3
- "version": "0.3.0-snapshot.44",
3
+ "version": "0.3.0-snapshot.47",
4
4
  "description": "Mojaloop sdk scheme adapter command event handler",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/mojaloop/sdk-scheme-adapter/",
@@ -51,16 +51,16 @@
51
51
  "convict": "6.2.4",
52
52
  "express": "4.21.2",
53
53
  "openapi-backend": "5.12.0",
54
- "redis": "5.5.5",
54
+ "redis": "5.5.6",
55
55
  "swagger-ui-express": "5.0.1",
56
56
  "yamljs": "0.3.0"
57
57
  },
58
58
  "devDependencies": {
59
59
  "@eslint/compat": "1.2.9",
60
60
  "@types/convict": "6.1.6",
61
- "@types/express": "5.0.2",
61
+ "@types/express": "5.0.3",
62
62
  "@types/jest": "29.5.14",
63
- "@types/node": "22.15.29",
63
+ "@types/node": "22.15.30",
64
64
  "@types/node-cache": "4.2.5",
65
65
  "@types/supertest": "6.0.3",
66
66
  "@types/swagger-ui-express": "4.1.8",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mojaloop/sdk-scheme-adapter-outbound-domain-event-handler",
3
- "version": "0.3.0-snapshot.44",
3
+ "version": "0.3.0-snapshot.47",
4
4
  "description": "mojaloop sdk scheme adapter outbound domain event handler",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/mojaloop/sdk-scheme-adapter/",
@@ -49,15 +49,15 @@
49
49
  "convict": "6.2.4",
50
50
  "express": "4.21.2",
51
51
  "openapi-backend": "5.12.0",
52
- "redis": "5.5.5",
52
+ "redis": "5.5.6",
53
53
  "swagger-ui-express": "5.0.1",
54
54
  "yamljs": "0.3.0"
55
55
  },
56
56
  "devDependencies": {
57
57
  "@types/convict": "6.1.6",
58
- "@types/express": "5.0.2",
58
+ "@types/express": "5.0.3",
59
59
  "@types/jest": "29.5.14",
60
- "@types/node": "22.15.29",
60
+ "@types/node": "22.15.30",
61
61
  "@types/node-cache": "4.2.5",
62
62
  "@types/supertest": "6.0.3",
63
63
  "@types/swagger-ui-express": "4.1.8",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mojaloop/sdk-scheme-adapter-private-shared-lib",
3
- "version": "0.4.0-snapshot.44",
3
+ "version": "0.4.0-snapshot.47",
4
4
  "description": "SDK Scheme Adapter private shared library.",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/mojaloop/accounts-and-balances-bc/tree/main/modules/private-types",
@@ -35,12 +35,12 @@
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.5.5",
38
+ "redis": "5.5.6",
39
39
  "uuid": "11.1.0"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@eslint/compat": "1.2.9",
43
- "@types/node": "22.15.29",
43
+ "@types/node": "22.15.30",
44
44
  "@types/uuid": "10.0.0",
45
45
  "@typescript-eslint/eslint-plugin": "8.33.1",
46
46
  "@typescript-eslint/parser": "8.33.1",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mojaloop/sdk-scheme-adapter",
3
- "version": "24.9.8-snapshot.9",
3
+ "version": "24.10.0-snapshot.0",
4
4
  "description": "mojaloop sdk-scheme-adapter",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/mojaloop/sdk-scheme-adapter",
@@ -82,7 +82,7 @@
82
82
  },
83
83
  "devDependencies": {
84
84
  "@types/jest": "29.5.14",
85
- "@types/node": "22.15.29",
85
+ "@types/node": "22.15.30",
86
86
  "@types/node-cache": "4.2.5",
87
87
  "@typescript-eslint/eslint-plugin": "8.33.1",
88
88
  "@typescript-eslint/parser": "8.33.1",
@@ -92,6 +92,7 @@
92
92
  "eslint-plugin-import": "2.31.0",
93
93
  "husky": "9.1.7",
94
94
  "jest": "29.7.0",
95
+ "knex": "3.1.0",
95
96
  "nodemon": "3.1.10",
96
97
  "npm-check-updates": "16.7.10",
97
98
  "replace": "1.2.2",