@mojaloop/sdk-scheme-adapter 24.12.0-snapshot.5 → 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.
- package/.yarn/cache/{@mojaloop-central-services-logger-npm-11.10.0-b889b58367-f062b89e9e.zip → @mojaloop-central-services-logger-npm-11.10.1-f4536e81a2-41a65f2d5c.zip} +0 -0
- package/.yarn/install-state.gz +0 -0
- package/CHANGELOG.md +12 -0
- package/modules/api-svc/package.json +2 -2
- package/modules/api-svc/src/OutboundServer/handlers.js +3 -3
- package/modules/api-svc/src/index.js +10 -6
- package/modules/api-svc/src/lib/model/AccountsModel.js +4 -4
- package/modules/api-svc/src/lib/model/OutboundTransfersModel.js +5 -5
- package/modules/outbound-command-event-handler/package.json +1 -1
- package/modules/outbound-domain-event-handler/package.json +1 -1
- package/modules/private-shared-lib/package.json +1 -1
- package/package.json +1 -1
|
Binary file
|
package/.yarn/install-state.gz
CHANGED
|
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
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mojaloop/sdk-scheme-adapter-api-svc",
|
|
3
|
-
"version": "21.0.0-snapshot.
|
|
3
|
+
"version": "21.0.0-snapshot.70",
|
|
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",
|
|
@@ -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.
|
|
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",
|
|
@@ -130,7 +130,7 @@ const createOutboundTransfersModel = (ctx) => new OutboundTransfersModel({
|
|
|
130
130
|
logger: ctx.state.logger,
|
|
131
131
|
wso2: ctx.state.wso2,
|
|
132
132
|
metricsClient: ctx.state.metricsClient,
|
|
133
|
-
|
|
133
|
+
mojaloopSharedAgents: ctx.state.sharedAgents,
|
|
134
134
|
});
|
|
135
135
|
|
|
136
136
|
const createOutboundBulkTransfersModel = (ctx) => new OutboundBulkTransfersModel({
|
|
@@ -467,7 +467,7 @@ const postAccounts = async (ctx) => {
|
|
|
467
467
|
cache: ctx.state.cache,
|
|
468
468
|
logger: ctx.state.logger,
|
|
469
469
|
wso2: ctx.state.wso2,
|
|
470
|
-
|
|
470
|
+
mojaloopSharedAgents: ctx.state.sharedAgents,
|
|
471
471
|
});
|
|
472
472
|
|
|
473
473
|
const state = {
|
|
@@ -498,7 +498,7 @@ const deleteAccountByTypeAndId = async (ctx) => {
|
|
|
498
498
|
cache: ctx.state.cache,
|
|
499
499
|
logger: ctx.state.logger,
|
|
500
500
|
wso2: ctx.state.wso2,
|
|
501
|
-
|
|
501
|
+
mojaloopSharedAgents: ctx.state.sharedAgents,
|
|
502
502
|
});
|
|
503
503
|
|
|
504
504
|
const args = {
|
|
@@ -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:
|
|
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:
|
|
473
|
+
maxSockets: conf.outbound?.maxSockets || 256,
|
|
470
474
|
};
|
|
471
475
|
|
|
472
476
|
// Apply TLS configuration if mTLS is enabled for switch communication
|
|
473
|
-
if (
|
|
474
|
-
Object.assign(httpsAgentOptions,
|
|
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);
|
|
@@ -48,7 +48,7 @@ class AccountsModel {
|
|
|
48
48
|
this._logger = config.logger;
|
|
49
49
|
this._requestProcessingTimeoutSeconds = config.requestProcessingTimeoutSeconds;
|
|
50
50
|
this._dfspId = config.dfspId;
|
|
51
|
-
this.
|
|
51
|
+
this._mojaloopSharedAgents = config.mojaloopSharedAgents;
|
|
52
52
|
|
|
53
53
|
const mojaloopRequestsConfig = {
|
|
54
54
|
logger: this._logger,
|
|
@@ -66,9 +66,9 @@ class AccountsModel {
|
|
|
66
66
|
};
|
|
67
67
|
|
|
68
68
|
// Add shared agents to prevent HTTPS agent recreation per request
|
|
69
|
-
if (this.
|
|
70
|
-
mojaloopRequestsConfig.httpAgent = this.
|
|
71
|
-
mojaloopRequestsConfig.httpsAgent = this.
|
|
69
|
+
if (this._mojaloopSharedAgents) {
|
|
70
|
+
mojaloopRequestsConfig.httpAgent = this._mojaloopSharedAgents.httpAgent;
|
|
71
|
+
mojaloopRequestsConfig.httpsAgent = this._mojaloopSharedAgents.httpsAgent;
|
|
72
72
|
this._logger.isDebugEnabled && this._logger.debug('Using shared HTTP/HTTPS agents for AccountsModel MojaloopRequests');
|
|
73
73
|
}
|
|
74
74
|
|
|
@@ -71,7 +71,7 @@ class OutboundTransfersModel {
|
|
|
71
71
|
this._useQuoteSourceFSPAsTransferPayeeFSP = config.useQuoteSourceFSPAsTransferPayeeFSP;
|
|
72
72
|
this._checkIlp = config.checkIlp;
|
|
73
73
|
this._multiplePartiesResponse = config.multiplePartiesResponse;
|
|
74
|
-
this.
|
|
74
|
+
this._mojaloopSharedAgents = config.mojaloopSharedAgents;
|
|
75
75
|
this._multiplePartiesResponseSeconds = config.multiplePartiesResponseSeconds;
|
|
76
76
|
this._sendFinalNotificationIfRequested = config.sendFinalNotificationIfRequested;
|
|
77
77
|
this._apiType = config.apiType;
|
|
@@ -106,10 +106,10 @@ class OutboundTransfersModel {
|
|
|
106
106
|
};
|
|
107
107
|
|
|
108
108
|
// Add shared agents to prevent HTTPS agent recreation per request
|
|
109
|
-
if (this.
|
|
110
|
-
mojaloopRequestsConfig.httpAgent = this.
|
|
111
|
-
mojaloopRequestsConfig.httpsAgent = this.
|
|
112
|
-
this._logger.isDebugEnabled && this._logger.debug('Using shared HTTP/HTTPS agents for MojaloopRequests');
|
|
109
|
+
if (this._mojaloopSharedAgents) {
|
|
110
|
+
mojaloopRequestsConfig.httpAgent = this._mojaloopSharedAgents.httpAgent;
|
|
111
|
+
mojaloopRequestsConfig.httpsAgent = this._mojaloopSharedAgents.httpsAgent;
|
|
112
|
+
this._logger.isDebugEnabled && this._logger.debug('Using shared HTTP/HTTPS agents for OutboundTransfersModel MojaloopRequests');
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
this._requests = new MojaloopRequests(mojaloopRequestsConfig);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mojaloop/sdk-scheme-adapter-outbound-command-event-handler",
|
|
3
|
-
"version": "0.3.0-snapshot.
|
|
3
|
+
"version": "0.3.0-snapshot.65",
|
|
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/",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mojaloop/sdk-scheme-adapter-outbound-domain-event-handler",
|
|
3
|
-
"version": "0.3.0-snapshot.
|
|
3
|
+
"version": "0.3.0-snapshot.65",
|
|
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/",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mojaloop/sdk-scheme-adapter-private-shared-lib",
|
|
3
|
-
"version": "0.4.0-snapshot.
|
|
3
|
+
"version": "0.4.0-snapshot.65",
|
|
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",
|
package/package.json
CHANGED