@mojaloop/sdk-scheme-adapter 24.12.0-snapshot.6 → 24.12.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.
Binary file
package/CHANGELOG.md CHANGED
@@ -1,4 +1,16 @@
1
1
  # Changelog: [mojaloop/sdk-scheme-adapter](https://github.com/mojaloop/sdk-scheme-adapter)
2
+ ## [24.12.0](https://github.com/mojaloop/sdk-scheme-adapter/compare/v24.11.0...v24.12.0) (2025-09-22)
3
+
4
+
5
+ ### Bug Fixes
6
+
7
+ * http agent recreation ([#615](https://github.com/mojaloop/sdk-scheme-adapter/issues/615)) ([dc1b9d7](https://github.com/mojaloop/sdk-scheme-adapter/commit/dc1b9d7c0f67d6d42116c128822c65f96d9fef97))
8
+
9
+
10
+ ### Chore
11
+
12
+ * **sbom:** update sbom [skip ci] ([35b52c9](https://github.com/mojaloop/sdk-scheme-adapter/commit/35b52c92872c4aee37dc274263ddb9a9e9486cac))
13
+
2
14
  ## [24.11.0](https://github.com/mojaloop/sdk-scheme-adapter/compare/v24.10.11...v24.11.0) (2025-09-18)
3
15
 
4
16
 
@@ -66,7 +66,7 @@
66
66
  "@koa/cors": "5.0.0",
67
67
  "@mojaloop/api-snippets": "18.1.1",
68
68
  "@mojaloop/central-services-error-handling": "13.1.2",
69
- "@mojaloop/central-services-logger": "11.10.0",
69
+ "@mojaloop/central-services-logger": "11.10.1",
70
70
  "@mojaloop/central-services-metrics": "12.7.1",
71
71
  "@mojaloop/central-services-shared": "18.33.3",
72
72
  "@mojaloop/event-sdk": "14.7.0",
@@ -79,7 +79,7 @@ class Server extends EventEmitter {
79
79
  });
80
80
 
81
81
  // Create shared Mojaloop agents for switch communication (used by both servers)
82
- this.mojaloopSharedAgents = this._createMojaloopSharedAgents();
82
+ this.mojaloopSharedAgents = this._createMojaloopSharedAgents(this.conf);
83
83
 
84
84
  this.wso2 = createAuthClient(conf, logger);
85
85
  this.wso2.auth.on('error', (msg) => {
@@ -294,6 +294,8 @@ class Server extends EventEmitter {
294
294
  // eslint-disable-next-line no-console
295
295
  console.time(stopStartLabel);
296
296
  await this.inboundServer.stop();
297
+
298
+ this.mojaloopSharedAgents = this._createMojaloopSharedAgents(newConf);
297
299
  this.inboundServer = new InboundServer(
298
300
  newConf,
299
301
  this.logger,
@@ -319,6 +321,8 @@ class Server extends EventEmitter {
319
321
  // eslint-disable-next-line no-console
320
322
  console.time(stopStartLabel);
321
323
  await this.outboundServer.stop();
324
+
325
+ this.mojaloopSharedAgents = this._createMojaloopSharedAgents(newConf);
322
326
  this.outboundServer = new OutboundServer(
323
327
  newConf,
324
328
  this.logger,
@@ -457,21 +461,21 @@ class Server extends EventEmitter {
457
461
  ]);
458
462
  }
459
463
 
460
- _createMojaloopSharedAgents() {
464
+ _createMojaloopSharedAgents(conf) {
461
465
  const httpAgent = new http.Agent({
462
466
  keepAlive: true,
463
- maxSockets: this.conf.outbound?.maxSockets || 256,
467
+ maxSockets: conf.outbound?.maxSockets || 256,
464
468
  });
465
469
 
466
470
  // Create HTTPS agent based on TLS configuration for Mojaloop switch communication
467
471
  const httpsAgentOptions = {
468
472
  keepAlive: true,
469
- maxSockets: this.conf.outbound?.maxSockets || 256,
473
+ maxSockets: conf.outbound?.maxSockets || 256,
470
474
  };
471
475
 
472
476
  // Apply TLS configuration if mTLS is enabled for switch communication
473
- if (this.conf.outbound?.tls?.mutualTLS?.enabled && this.conf.outbound?.tls?.creds) {
474
- Object.assign(httpsAgentOptions, this.conf.outbound.tls.creds);
477
+ if (conf.outbound?.tls?.mutualTLS?.enabled && conf.outbound?.tls?.creds) {
478
+ Object.assign(httpsAgentOptions, conf.outbound.tls.creds);
475
479
  }
476
480
 
477
481
  const httpsAgent = new https.Agent(httpsAgentOptions);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mojaloop/sdk-scheme-adapter",
3
- "version": "24.12.0-snapshot.6",
3
+ "version": "24.12.0",
4
4
  "description": "mojaloop sdk-scheme-adapter",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/mojaloop/sdk-scheme-adapter",