@mojaloop/sdk-scheme-adapter 24.9.7 → 24.9.8-snapshot.3

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 (44) hide show
  1. package/.yarn/cache/{@mojaloop-central-services-shared-npm-18.26.2-e822c6028a-504c725d38.zip → @mojaloop-central-services-shared-npm-18.27.0-66f0d90603-bf265a09bd.zip} +0 -0
  2. package/.yarn/cache/{@mojaloop-inter-scheme-proxy-cache-lib-npm-2.5.0-eeb80fe407-bf7e14ce33.zip → @mojaloop-inter-scheme-proxy-cache-lib-npm-2.6.0-94424a1568-2f05e6e272.zip} +0 -0
  3. package/.yarn/cache/{@redis-bloom-npm-5.1.1-c40a006b49-acf551ecd9.zip → @redis-bloom-npm-5.5.5-08ba788570-bde4c98288.zip} +0 -0
  4. package/.yarn/cache/{@redis-client-npm-5.1.1-1bf41c09fc-5d31776707.zip → @redis-client-npm-5.5.5-de45fa1462-638e7e85fb.zip} +0 -0
  5. package/.yarn/cache/{@redis-json-npm-5.1.1-cafaa4c2f2-4dd9fa324d.zip → @redis-json-npm-5.5.5-6caae5d1e6-26c0deb195.zip} +0 -0
  6. package/.yarn/cache/{@redis-search-npm-5.1.1-f91b17a98d-6626955a56.zip → @redis-search-npm-5.5.5-be3d1b0301-6b269f544a.zip} +0 -0
  7. package/.yarn/cache/{@redis-time-series-npm-5.1.1-2e2f40066a-94de04e8a3.zip → @redis-time-series-npm-5.5.5-3a80ea3c7f-5d5d7cc857.zip} +0 -0
  8. package/.yarn/cache/{@typescript-eslint-eslint-plugin-npm-8.33.0-0c4da18297-d9d009e644.zip → @typescript-eslint-eslint-plugin-npm-8.33.1-ac6a7a1440-8732c42790.zip} +0 -0
  9. package/.yarn/cache/{@typescript-eslint-parser-npm-8.33.0-67664fe1c4-16b4e34626.zip → @typescript-eslint-parser-npm-8.33.1-9a3fc183f0-2b527529a1.zip} +0 -0
  10. package/.yarn/cache/{@typescript-eslint-project-service-npm-8.33.0-0b8e3c7267-efb90f2fea.zip → @typescript-eslint-project-service-npm-8.33.1-fd3317e16e-237618a025.zip} +0 -0
  11. package/.yarn/cache/{@typescript-eslint-scope-manager-npm-8.33.0-bdad5df8b4-e5a82f102a.zip → @typescript-eslint-scope-manager-npm-8.33.1-2e7c814c1c-fbc3ec340f.zip} +0 -0
  12. package/.yarn/cache/{@typescript-eslint-tsconfig-utils-npm-8.33.0-d26e1ec245-5bb139be99.zip → @typescript-eslint-tsconfig-utils-npm-8.33.1-82226a8649-9e0e348af4.zip} +0 -0
  13. package/.yarn/cache/{@typescript-eslint-type-utils-npm-8.33.0-36d614815a-edd6bb629f.zip → @typescript-eslint-type-utils-npm-8.33.1-0cc601298c-54099177a5.zip} +0 -0
  14. package/.yarn/cache/{@typescript-eslint-types-npm-8.33.0-a3afab3a2a-3fa8c45989.zip → @typescript-eslint-types-npm-8.33.1-e7c6a5abd5-80ad8b8573.zip} +0 -0
  15. package/.yarn/cache/{@typescript-eslint-typescript-estree-npm-8.33.0-575e7dfb97-365de7456d.zip → @typescript-eslint-typescript-estree-npm-8.33.1-83df5ea6f8-aacb925257.zip} +0 -0
  16. package/.yarn/cache/{@typescript-eslint-utils-npm-8.33.0-909f5cda94-e654ceac6a.zip → @typescript-eslint-utils-npm-8.33.1-27dd8aa528-aef41fe93d.zip} +0 -0
  17. package/.yarn/cache/{@typescript-eslint-visitor-keys-npm-8.33.0-f53e6c2cd3-c92eacedd9.zip → @typescript-eslint-visitor-keys-npm-8.33.1-f3a9c59a3a-d8bbb35ff2.zip} +0 -0
  18. package/.yarn/cache/async-exit-hook-npm-2.0.1-09570c5c6b-b72cbdd19e.zip +0 -0
  19. package/.yarn/cache/async-retry-npm-1.3.3-bc90c5cee0-38a7152ff7.zip +0 -0
  20. package/.yarn/cache/colorette-npm-2.0.19-f73dfe6a4e-888cf5493f.zip +0 -0
  21. package/.yarn/cache/debug-npm-4.3.4-4513954577-3dbad3f94e.zip +0 -0
  22. package/.yarn/cache/esm-npm-3.2.25-762b3ebd40-978aabe2de.zip +0 -0
  23. package/.yarn/cache/getopts-npm-2.3.0-4b1830217c-bbb5fcef8d.zip +0 -0
  24. package/.yarn/cache/interpret-npm-2.2.0-3603a544e1-f51efef7cb.zip +0 -0
  25. package/.yarn/cache/knex-npm-3.1.0-87fad39c7a-3905f8d279.zip +0 -0
  26. package/.yarn/cache/ms-npm-2.1.2-ec0c1512ff-673cdb2c31.zip +0 -0
  27. package/.yarn/cache/pg-connection-string-npm-2.6.2-43a4a40be5-22265882c3.zip +0 -0
  28. package/.yarn/cache/rechoir-npm-0.8.0-fb660b3bc8-ad3caed8af.zip +0 -0
  29. package/.yarn/cache/redis-npm-5.5.5-e30d8c3be4-fa4864e201.zip +0 -0
  30. package/.yarn/cache/retry-npm-0.13.1-89eb100ab6-47c4d5be67.zip +0 -0
  31. package/.yarn/cache/tarn-npm-3.0.2-4324dc10b0-27a69658f0.zip +0 -0
  32. package/.yarn/cache/tildify-npm-2.0.0-324bfdd523-0f5fee9362.zip +0 -0
  33. package/.yarn/install-state.gz +0 -0
  34. package/modules/api-svc/package.json +4 -3
  35. package/modules/api-svc/src/InboundServer/api.yaml +3 -1
  36. package/modules/api-svc/src/InboundServer/index.js +0 -11
  37. package/modules/api-svc/src/index.js +45 -5
  38. package/modules/api-svc/test/unit/InboundServer.test.js +0 -54
  39. package/modules/outbound-command-event-handler/package.json +5 -5
  40. package/modules/outbound-domain-event-handler/package.json +4 -4
  41. package/modules/private-shared-lib/package.json +5 -5
  42. package/package.json +3 -3
  43. package/.yarn/cache/@mojaloop-central-services-logger-npm-11.8.1-b87fd96eee-32d5d8371e.zip +0 -0
  44. package/.yarn/cache/redis-npm-5.1.1-42b1539552-99d33a2430.zip +0 -0
Binary file
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mojaloop/sdk-scheme-adapter-api-svc",
3
- "version": "21.0.0-snapshot.37",
3
+ "version": "21.0.0-snapshot.41",
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",
@@ -68,7 +68,7 @@
68
68
  "@mojaloop/central-services-error-handling": "13.1.0",
69
69
  "@mojaloop/central-services-logger": "11.9.0",
70
70
  "@mojaloop/central-services-metrics": "12.6.0",
71
- "@mojaloop/central-services-shared": "18.26.2",
71
+ "@mojaloop/central-services-shared": "18.27.0",
72
72
  "@mojaloop/event-sdk": "14.5.1",
73
73
  "@mojaloop/logging-bc-client-lib": "0.5.8",
74
74
  "@mojaloop/ml-schema-transformer-lib": "2.7.1",
@@ -86,6 +86,7 @@
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",
89
90
  "koa": "3.0.0",
90
91
  "koa-body": "6.0.1",
91
92
  "lodash": "4.17.21",
@@ -95,7 +96,7 @@
95
96
  "prom-client": "15.1.3",
96
97
  "promise-timeout": "1.3.0",
97
98
  "random-word-slugs": "0.1.7",
98
- "redis": "5.1.1",
99
+ "redis": "5.5.5",
99
100
  "uuidv4": "6.2.13",
100
101
  "ws": "8.18.2"
101
102
  },
@@ -67,7 +67,9 @@ paths:
67
67
  - ping
68
68
  operationId: handlePostPing
69
69
  requestBody:
70
- description: The object sent in the POST/PUT `/ping` requests with validation request ID.
70
+ description: >-
71
+ The object sent in the POST/PUT `/ping` requests with validation
72
+ request ID.
71
73
  required: true
72
74
  content:
73
75
  application/json:
@@ -26,7 +26,6 @@
26
26
  ******/
27
27
  const Koa = require('koa');
28
28
 
29
- const _ = require('lodash');
30
29
  const assert = require('assert').strict;
31
30
  const https = require('https');
32
31
  const http = require('http');
@@ -87,16 +86,6 @@ class InboundApi extends EventEmitter {
87
86
  return this._api.callback();
88
87
  }
89
88
 
90
- _updatePeerJwsKeys(peerJwsKeys) {
91
- if (this._conf.pm4mlEnabled && !_.isEqual(this._jwsVerificationKeys, peerJwsKeys) &&
92
- this._jwsVerificationKeys && typeof this._jwsVerificationKeys === 'object') {
93
- this._logger && this._logger.isVerboseEnabled && this._logger.verbose('Clearing existing JWS verification keys');
94
- Object.keys(this._jwsVerificationKeys).forEach(key => delete this._jwsVerificationKeys[key]);
95
- this._logger && this._logger.isVerboseEnabled && this._logger.verbose('Assigning new peer JWS keys');
96
- Object.assign(this._jwsVerificationKeys, peerJwsKeys);
97
- }
98
- }
99
-
100
89
  _startJwsWatcher() {
101
90
  const FS_EVENT_TYPES = {
102
91
  CHANGE: 'change',
@@ -140,8 +140,50 @@ class Server extends EventEmitter {
140
140
  }
141
141
 
142
142
  _shouldUpdateInboundServer(newConf) {
143
- return !_.isEqual(this.conf.inbound, newConf.inbound)
144
- || !_.isEqual(this.conf.outbound, newConf.outbound);
143
+ const isInboundDifferent = !_.isEqual(this.conf.inbound, newConf.inbound);
144
+ const isOutboundDifferent = !_.isEqual(this.conf.outbound, newConf.outbound);
145
+ const isPeerJWSKeysDifferent = !_.isEqual(this.conf.peerJWSKeys, newConf.peerJWSKeys);
146
+
147
+ if (isInboundDifferent) {
148
+ this.logger.debug('Inbound config is different', {
149
+ oldInbound: this.conf.inbound,
150
+ newInbound: newConf.inbound
151
+ });
152
+ }
153
+ if (isOutboundDifferent) {
154
+ this.logger.debug('Outbound config is different (checked in inbound update)', {
155
+ oldOutbound: this.conf.outbound,
156
+ newOutbound: newConf.outbound
157
+ });
158
+ }
159
+ if (isPeerJWSKeysDifferent) {
160
+ this.logger.debug('Peer JWS Keys config is different', {
161
+ oldPeerJWSKeys: this.conf.peerJWSKeys,
162
+ newPeerJWSKeys: newConf.peerJWSKeys
163
+ });
164
+ }
165
+
166
+ return isInboundDifferent || isOutboundDifferent || isPeerJWSKeysDifferent;
167
+ }
168
+
169
+ _shouldUpdateOutboundServer(newConf) {
170
+ const isOutboundDifferent = !_.isEqual(this.conf.outbound, newConf.outbound);
171
+ const isJwsSigningKeyDifferent = !_.isEqual(this.conf.jwsSigningKey, newConf.jwsSigningKey);
172
+
173
+ if (isOutboundDifferent) {
174
+ this.logger.debug('Outbound config is different', {
175
+ oldOutbound: this.conf.outbound,
176
+ newOutbound: newConf.outbound
177
+ });
178
+ }
179
+ if (isJwsSigningKeyDifferent) {
180
+ this.logger.debug('JWS signing key is different', {
181
+ oldJwsSigningKey: this.conf.jwsSigningKey,
182
+ newJwsSigningKey: newConf.jwsSigningKey
183
+ });
184
+ }
185
+
186
+ return isOutboundDifferent || isJwsSigningKeyDifferent;
145
187
  }
146
188
 
147
189
  async start() {
@@ -247,10 +289,8 @@ class Server extends EventEmitter {
247
289
  restartActionsTaken.updateInboundServer = true;
248
290
  }
249
291
 
250
- this.inboundServer._api._updatePeerJwsKeys(newConf.peerJWSKeys);
251
-
252
292
  this.logger.isDebugEnabled && this.logger.push({ oldConf: this.conf.outbound, newConf: newConf.outbound }).debug('Outbound server configuration');
253
- const updateOutboundServer = !_.isEqual(this.conf.outbound, newConf.outbound);
293
+ const updateOutboundServer = this._shouldUpdateOutboundServer(this.conf, newConf);
254
294
  if (updateOutboundServer) {
255
295
  await this.outboundServer.stop();
256
296
  this.outboundServer = new OutboundServer(
@@ -490,59 +490,5 @@ describe('Inbound Server', () => {
490
490
 
491
491
  expect(Jws.validator.__validationKeys['mock-jws'].toString()).toEqual('foo-key-updated');
492
492
  });
493
-
494
- it('should overwrite an existing peer JWS key when _updatePeerJwsKeys is called with the same key name', async () => {
495
- // Arrange
496
- const serverConfig = JSON.parse(JSON.stringify(defaultConfig));
497
- serverConfig.validateInboundJws = true;
498
- const cache = new Cache({
499
- cacheUrl: serverConfig.cacheUrl,
500
- logger: logger.push({ component: 'cache' }),
501
- unsubscribeTimeoutMs: serverConfig.unsubscribeTimeoutMs,
502
- });
503
- serverConfig.validateInboundJws = true;
504
- serverConfig.pm4mlEnabled = true;
505
- serverConfig.peerJWSKeys = {
506
- 'peer1': 'original-key'
507
- };
508
- const svr = new InboundServer(serverConfig, logger, cache);
509
-
510
- // Save reference before update
511
- const keysRef = svr._api._jwsVerificationKeys;
512
-
513
- // Act: Overwrite the key
514
- svr._api._updatePeerJwsKeys({ 'peer1': 'new-key' });
515
-
516
- // Assert
517
- expect(svr._api._jwsVerificationKeys['peer1']).toBe('new-key');
518
- expect(svr._api._jwsVerificationKeys).toBe(keysRef); // memory reference unchanged
519
- });
520
-
521
- it('should add a new peer JWS key when _updatePeerJwsKeys is called with a new key name', async () => {
522
- // Arrange
523
- const serverConfig = JSON.parse(JSON.stringify(defaultConfig));
524
- serverConfig.validateInboundJws = true;
525
- const cache = new Cache({
526
- cacheUrl: serverConfig.cacheUrl,
527
- logger: logger.push({ component: 'cache' }),
528
- unsubscribeTimeoutMs: serverConfig.unsubscribeTimeoutMs,
529
- });
530
- serverConfig.validateInboundJws = true;
531
- serverConfig.pm4mlEnabled = true;
532
- serverConfig.peerJWSKeys = {
533
- 'peer1': 'original-key'
534
- };
535
- const svr = new InboundServer(serverConfig, logger, cache);
536
-
537
- // Save reference before update
538
- const keysRef = svr._api._jwsVerificationKeys;
539
-
540
- // Act: Add a new key
541
- svr._api._updatePeerJwsKeys({ 'peer1': 'original-key', 'peer2': 'another-key' });
542
- // Assert
543
- expect(svr._api._jwsVerificationKeys['peer1']).toBe('original-key');
544
- expect(svr._api._jwsVerificationKeys['peer2']).toBe('another-key');
545
- expect(svr._api._jwsVerificationKeys).toBe(keysRef); // memory reference unchanged
546
- });
547
493
  });
548
494
  });
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mojaloop/sdk-scheme-adapter-outbound-command-event-handler",
3
- "version": "0.3.0-snapshot.34",
3
+ "version": "0.3.0-snapshot.38",
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/",
@@ -42,7 +42,7 @@
42
42
  },
43
43
  "dependencies": {
44
44
  "@mojaloop/api-snippets": "17.10.3",
45
- "@mojaloop/central-services-shared": "18.26.2",
45
+ "@mojaloop/central-services-shared": "18.27.0",
46
46
  "@mojaloop/logging-bc-client-lib": "0.5.8",
47
47
  "@mojaloop/logging-bc-public-types-lib": "0.5.5",
48
48
  "@mojaloop/sdk-scheme-adapter-private-shared-lib": "workspace:^",
@@ -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.1",
54
+ "redis": "5.5.5",
55
55
  "swagger-ui-express": "5.0.1",
56
56
  "yamljs": "0.3.0"
57
57
  },
@@ -65,8 +65,8 @@
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.33.0",
69
- "@typescript-eslint/parser": "8.33.0",
68
+ "@typescript-eslint/eslint-plugin": "8.33.1",
69
+ "@typescript-eslint/parser": "8.33.1",
70
70
  "copyfiles": "2.4.1",
71
71
  "eslint": "9.15.0",
72
72
  "jest": "29.7.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mojaloop/sdk-scheme-adapter-outbound-domain-event-handler",
3
- "version": "0.3.0-snapshot.34",
3
+ "version": "0.3.0-snapshot.38",
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,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.1",
52
+ "redis": "5.5.5",
53
53
  "swagger-ui-express": "5.0.1",
54
54
  "yamljs": "0.3.0"
55
55
  },
@@ -62,8 +62,8 @@
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.33.0",
66
- "@typescript-eslint/parser": "8.33.0",
65
+ "@typescript-eslint/eslint-plugin": "8.33.1",
66
+ "@typescript-eslint/parser": "8.33.1",
67
67
  "copyfiles": "2.4.1",
68
68
  "eslint": "9.15.0",
69
69
  "jest": "29.7.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mojaloop/sdk-scheme-adapter-private-shared-lib",
3
- "version": "0.4.0-snapshot.34",
3
+ "version": "0.4.0-snapshot.38",
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",
@@ -30,20 +30,20 @@
30
30
  },
31
31
  "dependencies": {
32
32
  "@mojaloop/api-snippets": "17.10.3",
33
- "@mojaloop/central-services-shared": "18.26.2",
33
+ "@mojaloop/central-services-shared": "18.27.0",
34
34
  "@mojaloop/logging-bc-public-types-lib": "0.5.5",
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.1",
38
+ "redis": "5.5.5",
39
39
  "uuid": "11.1.0"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@eslint/compat": "1.2.9",
43
43
  "@types/node": "22.15.29",
44
44
  "@types/uuid": "10.0.0",
45
- "@typescript-eslint/eslint-plugin": "8.33.0",
46
- "@typescript-eslint/parser": "8.33.0",
45
+ "@typescript-eslint/eslint-plugin": "8.33.1",
46
+ "@typescript-eslint/parser": "8.33.1",
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.7",
3
+ "version": "24.9.8-snapshot.3",
4
4
  "description": "mojaloop sdk-scheme-adapter",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/mojaloop/sdk-scheme-adapter",
@@ -84,8 +84,8 @@
84
84
  "@types/jest": "29.5.14",
85
85
  "@types/node": "22.15.29",
86
86
  "@types/node-cache": "4.2.5",
87
- "@typescript-eslint/eslint-plugin": "8.33.0",
88
- "@typescript-eslint/parser": "8.33.0",
87
+ "@typescript-eslint/eslint-plugin": "8.33.1",
88
+ "@typescript-eslint/parser": "8.33.1",
89
89
  "audit-ci": "7.1.0",
90
90
  "eslint": "9.15.0",
91
91
  "eslint-config-airbnb-typescript": "18.0.0",