@mojaloop/sdk-scheme-adapter 24.10.0 → 24.10.2
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/.ncurc.yaml +3 -1
- package/.yarn/cache/@eslint-compat-npm-1.3.0-c396ca9ba3-cf4ae18816.zip +0 -0
- package/.yarn/cache/{@grpc-grpc-js-npm-1.13.3-9dcb5a84de-2576e65c9a.zip → @grpc-grpc-js-npm-1.13.4-4aa5cd2dfd-fe5db84bbb.zip} +0 -0
- package/.yarn/cache/@jest-diff-sequences-npm-30.0.0-a54cd58e53-e73302913a.zip +0 -0
- package/.yarn/cache/@jest-expect-utils-npm-30.0.0-bddc827ac5-852792f196.zip +0 -0
- package/.yarn/cache/@jest-get-type-npm-30.0.0-db16e5ad7d-6dc432caac.zip +0 -0
- package/.yarn/cache/@jest-pattern-npm-30.0.0-8f812d915e-65ef698689.zip +0 -0
- package/.yarn/cache/@jest-schemas-npm-30.0.0-7943bf35b9-fe07a0d388.zip +0 -0
- package/.yarn/cache/@jest-transform-npm-30.0.0-001baf8c75-54c65b818a.zip +0 -0
- package/.yarn/cache/@jest-types-npm-30.0.0-ee47462915-fde997f884.zip +0 -0
- package/.yarn/cache/{@mojaloop-central-services-shared-npm-18.27.0-66f0d90603-bf265a09bd.zip → @mojaloop-central-services-shared-npm-18.28.2-67cde6c542-425242d6f3.zip} +0 -0
- package/.yarn/cache/{@mojaloop-event-sdk-npm-14.5.1-3c060d2a60-faf8eead3d.zip → @mojaloop-event-sdk-npm-14.6.1-a36281071d-4520a3d177.zip} +0 -0
- package/.yarn/cache/@redis-bloom-npm-5.5.6-4d657f1bec-72cef8eef4.zip +0 -0
- package/.yarn/cache/@redis-client-npm-5.5.6-94287e1111-dbf486100a.zip +0 -0
- package/.yarn/cache/@redis-json-npm-5.5.6-6730f82510-804cec9bb4.zip +0 -0
- package/.yarn/cache/@redis-search-npm-5.5.6-f14acc1d78-efe82ab0a6.zip +0 -0
- package/.yarn/cache/@redis-time-series-npm-5.5.6-bba24eca4c-0db2337daf.zip +0 -0
- package/.yarn/cache/@sinclair-typebox-npm-0.34.35-4698edbad1-65e2944495.zip +0 -0
- package/.yarn/cache/@types-express-npm-5.0.3-78da63908b-bb6f10c14c.zip +0 -0
- package/.yarn/cache/@types-jest-npm-30.0.0-7c3c407336-d80c0c30b2.zip +0 -0
- package/.yarn/cache/@types-node-npm-24.0.3-e96f3e375e-84ab3ee3b7.zip +0 -0
- package/.yarn/cache/{@typescript-eslint-eslint-plugin-npm-8.33.1-ac6a7a1440-8732c42790.zip → @typescript-eslint-eslint-plugin-npm-8.34.1-a6ae5aed2f-ea7cd0e45e.zip} +0 -0
- package/.yarn/cache/{@typescript-eslint-parser-npm-8.33.1-9a3fc183f0-2b527529a1.zip → @typescript-eslint-parser-npm-8.34.1-c5cdfb4415-4d2a5c7615.zip} +0 -0
- package/.yarn/cache/{@typescript-eslint-project-service-npm-8.33.1-fd3317e16e-237618a025.zip → @typescript-eslint-project-service-npm-8.34.1-96e02739ba-41c128ab88.zip} +0 -0
- package/.yarn/cache/{@typescript-eslint-scope-manager-npm-8.33.1-2e7c814c1c-fbc3ec340f.zip → @typescript-eslint-scope-manager-npm-8.34.1-083136ef41-6853a5639e.zip} +0 -0
- package/.yarn/cache/{@typescript-eslint-tsconfig-utils-npm-8.33.1-82226a8649-9e0e348af4.zip → @typescript-eslint-tsconfig-utils-npm-8.34.1-6a326cb07f-81a874a433.zip} +0 -0
- package/.yarn/cache/{@typescript-eslint-type-utils-npm-8.33.1-0cc601298c-54099177a5.zip → @typescript-eslint-type-utils-npm-8.34.1-30e4169fb0-c1c53ff76f.zip} +0 -0
- package/.yarn/cache/{@typescript-eslint-types-npm-8.33.1-e7c6a5abd5-80ad8b8573.zip → @typescript-eslint-types-npm-8.34.1-a7afc98a06-e05a8e56f8.zip} +0 -0
- package/.yarn/cache/{@typescript-eslint-typescript-estree-npm-8.33.1-83df5ea6f8-aacb925257.zip → @typescript-eslint-typescript-estree-npm-8.34.1-622f7240fd-1800ce71b8.zip} +0 -0
- package/.yarn/cache/{@typescript-eslint-utils-npm-8.33.1-27dd8aa528-aef41fe93d.zip → @typescript-eslint-utils-npm-8.34.1-e8923747e2-6e465f0454.zip} +0 -0
- package/.yarn/cache/{@typescript-eslint-visitor-keys-npm-8.33.1-f3a9c59a3a-d8bbb35ff2.zip → @typescript-eslint-visitor-keys-npm-8.34.1-418d3d8006-2a0e5b9db8.zip} +0 -0
- package/.yarn/cache/@ungap-structured-clone-npm-1.3.0-aea1bdf957-64ed518f49.zip +0 -0
- package/.yarn/cache/babel-jest-npm-30.0.0-0949ae6173-8912bb4a33.zip +0 -0
- package/.yarn/cache/babel-plugin-istanbul-npm-7.0.0-924905ff8c-fd3048d793.zip +0 -0
- package/.yarn/cache/babel-plugin-jest-hoist-npm-30.0.0-4a6d09d0fa-aa56f11fb7.zip +0 -0
- package/.yarn/cache/babel-preset-jest-npm-30.0.0-e566b89f5b-6f1c477c8a.zip +0 -0
- package/.yarn/cache/ci-info-npm-4.2.0-5451b2fa90-0e37267215.zip +0 -0
- package/.yarn/cache/{eslint-plugin-jest-npm-28.12.0-a05d8a1874-8d0bcb2133.zip → eslint-plugin-jest-npm-28.14.0-5ea5eb873a-7daeb0ebc3.zip} +0 -0
- package/.yarn/cache/eslint-visitor-keys-npm-4.2.1-435d5be22a-3a77e3f99a.zip +0 -0
- package/.yarn/cache/expect-npm-30.0.0-c4f29cc906-91dd0d10b9.zip +0 -0
- package/.yarn/cache/immutable-npm-5.1.3-27d8e1c55d-63a1df5f68.zip +0 -0
- package/.yarn/cache/jest-diff-npm-30.0.0-3d7984567d-c583cef9e1.zip +0 -0
- package/.yarn/cache/jest-haste-map-npm-30.0.0-3606160998-ce4a73ddd7.zip +0 -0
- package/.yarn/cache/jest-matcher-utils-npm-30.0.0-df3cb56c58-20bc82f18d.zip +0 -0
- package/.yarn/cache/jest-message-util-npm-30.0.0-3d72ccf669-e0f423baf5.zip +0 -0
- package/.yarn/cache/jest-mock-npm-30.0.0-1cab834040-46fb408dd4.zip +0 -0
- package/.yarn/cache/jest-regex-util-npm-30.0.0-b67c1fc2bc-aa4449a029.zip +0 -0
- package/.yarn/cache/jest-util-npm-30.0.0-de14658072-53f41bfdbe.zip +0 -0
- package/.yarn/cache/jest-worker-npm-30.0.0-0e18cd85f6-1151a0ea39.zip +0 -0
- package/.yarn/cache/picomatch-npm-4.0.2-e93516ddf2-a7a5188c95.zip +0 -0
- package/.yarn/cache/pirates-npm-4.0.7-5e4ee2f078-3dcbaff13c.zip +0 -0
- package/.yarn/cache/pretty-format-npm-30.0.0-d8f817d24c-f8044ca65e.zip +0 -0
- package/.yarn/cache/protobufjs-npm-7.5.3-a54566937a-8a8842338c.zip +0 -0
- package/.yarn/cache/redis-npm-5.5.6-882f3de1bd-1d383caedf.zip +0 -0
- package/.yarn/cache/{ts-jest-npm-29.3.4-ab85c5ac0f-2634134223.zip → ts-jest-npm-29.4.0-9f040f13a5-4083840a71.zip} +0 -0
- package/.yarn/cache/undici-types-npm-7.8.0-86f3e2d23e-59521a5b9b.zip +0 -0
- package/.yarn/cache/write-file-atomic-npm-5.0.1-52283db6ee-8dbb0e2512.zip +0 -0
- package/.yarn/install-state.gz +0 -0
- package/CHANGELOG.md +14 -0
- package/modules/api-svc/package.json +9 -8
- package/modules/api-svc/src/InboundServer/index.js +0 -11
- package/modules/api-svc/src/index.js +66 -6
- package/modules/api-svc/test/unit/InboundServer.test.js +0 -54
- package/modules/outbound-command-event-handler/package.json +10 -10
- package/modules/outbound-domain-event-handler/package.json +8 -8
- package/modules/private-shared-lib/package.json +8 -8
- package/package.json +6 -6
- package/.yarn/cache/@eslint-compat-npm-1.2.9-e5c479f5a9-5c1b792cba.zip +0 -0
- package/.yarn/cache/@redis-bloom-npm-5.5.5-08ba788570-bde4c98288.zip +0 -0
- package/.yarn/cache/@redis-client-npm-5.5.5-de45fa1462-638e7e85fb.zip +0 -0
- package/.yarn/cache/@redis-json-npm-5.5.5-6caae5d1e6-26c0deb195.zip +0 -0
- package/.yarn/cache/@redis-search-npm-5.5.5-be3d1b0301-6b269f544a.zip +0 -0
- package/.yarn/cache/@redis-time-series-npm-5.5.5-3a80ea3c7f-5d5d7cc857.zip +0 -0
- package/.yarn/cache/@types-express-npm-5.0.2-da02de3116-c6f73c75c2.zip +0 -0
- package/.yarn/cache/@types-jest-npm-29.5.14-506446c38e-18dba4623f.zip +0 -0
- package/.yarn/cache/@types-node-npm-22.15.29-b40796f35f-201aabe361.zip +0 -0
- package/.yarn/cache/immutable-npm-5.1.2-ce2e5e7696-85db3b2fdd.zip +0 -0
- package/.yarn/cache/protobufjs-npm-7.5.2-528e926c0e-fe5663a1f3.zip +0 -0
- package/.yarn/cache/redis-npm-5.5.5-e30d8c3be4-fa4864e201.zip +0 -0
- package/.yarn/cache/undici-types-npm-6.21.0-eb2b0ed56a-46331c7d60.zip +0 -0
package/.ncurc.yaml
CHANGED
|
@@ -12,5 +12,7 @@ reject: [
|
|
|
12
12
|
## esLint 9.15.0 caused the error: TypeError: Error while loading rule '@typescript-eslint/no-unused-expressions': Cannot read properties of undefined (reading 'allowShortCircuit')
|
|
13
13
|
"eslint",
|
|
14
14
|
## express >5 introduces breaking changes that are not compatible with the current codebase.
|
|
15
|
-
"express"
|
|
15
|
+
"express",
|
|
16
|
+
## jest 30 is released but libraries that work with jest have not been updated to support it yet.
|
|
17
|
+
"jest"
|
|
16
18
|
]
|
|
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
|
|
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,18 @@
|
|
|
1
1
|
# Changelog: [mojaloop/sdk-scheme-adapter](https://github.com/mojaloop/sdk-scheme-adapter)
|
|
2
|
+
### [24.10.2](https://github.com/mojaloop/sdk-scheme-adapter/compare/v24.10.1...v24.10.2) (2025-06-17)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Chore
|
|
6
|
+
|
|
7
|
+
* bump deps for rdkafka ([#590](https://github.com/mojaloop/sdk-scheme-adapter/issues/590)) ([41efe48](https://github.com/mojaloop/sdk-scheme-adapter/commit/41efe48781421f3e05d35b533ba9bdcbca7c2ae0))
|
|
8
|
+
|
|
9
|
+
### [24.10.1](https://github.com/mojaloop/sdk-scheme-adapter/compare/v24.10.0...v24.10.1) (2025-06-09)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Chore
|
|
13
|
+
|
|
14
|
+
* **csi-1494:** more restarting logic ([#587](https://github.com/mojaloop/sdk-scheme-adapter/issues/587)) ([fcaa375](https://github.com/mojaloop/sdk-scheme-adapter/commit/fcaa3753ccb974669f1814d2cd7ca031305b8e8f))
|
|
15
|
+
|
|
2
16
|
## [24.10.0](https://github.com/mojaloop/sdk-scheme-adapter/compare/v24.9.7...v24.10.0) (2025-06-05)
|
|
3
17
|
|
|
4
18
|
|
|
@@ -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.49",
|
|
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,14 +68,14 @@
|
|
|
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.
|
|
72
|
-
"@mojaloop/event-sdk": "14.
|
|
71
|
+
"@mojaloop/central-services-shared": "18.28.2",
|
|
72
|
+
"@mojaloop/event-sdk": "14.6.1",
|
|
73
73
|
"@mojaloop/logging-bc-client-lib": "0.5.8",
|
|
74
74
|
"@mojaloop/ml-schema-transformer-lib": "2.7.1",
|
|
75
75
|
"@mojaloop/sdk-scheme-adapter-private-shared-lib": "workspace:^",
|
|
76
76
|
"@mojaloop/sdk-standard-components": "19.15.2",
|
|
77
77
|
"ajv": "8.17.1",
|
|
78
|
-
"axios": "1.
|
|
78
|
+
"axios": "1.10.0",
|
|
79
79
|
"body-parser": "2.2.0",
|
|
80
80
|
"co-body": "6.2.0",
|
|
81
81
|
"dotenv": "16.5.0",
|
|
@@ -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.5.
|
|
99
|
+
"redis": "5.5.6",
|
|
99
100
|
"uuidv4": "6.2.13",
|
|
100
101
|
"ws": "8.18.2"
|
|
101
102
|
},
|
|
@@ -103,13 +104,13 @@
|
|
|
103
104
|
"@babel/core": "7.27.4",
|
|
104
105
|
"@babel/preset-env": "7.27.2",
|
|
105
106
|
"@redocly/openapi-cli": "1.0.0-beta.95",
|
|
106
|
-
"@types/jest": "
|
|
107
|
+
"@types/jest": "30.0.0",
|
|
107
108
|
"axios-mock-adapter": "2.1.0",
|
|
108
|
-
"babel-jest": "
|
|
109
|
+
"babel-jest": "30.0.0",
|
|
109
110
|
"eslint": "9.15.0",
|
|
110
111
|
"eslint-config-airbnb-base": "15.0.0",
|
|
111
112
|
"eslint-plugin-import": "2.31.0",
|
|
112
|
-
"eslint-plugin-jest": "28.
|
|
113
|
+
"eslint-plugin-jest": "28.14.0",
|
|
113
114
|
"jest": "29.7.0",
|
|
114
115
|
"jest-junit": "16.0.0",
|
|
115
116
|
"npm-check-updates": "16.7.10",
|
|
@@ -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,60 @@ class Server extends EventEmitter {
|
|
|
140
140
|
}
|
|
141
141
|
|
|
142
142
|
_shouldUpdateInboundServer(newConf) {
|
|
143
|
-
|
|
144
|
-
|
|
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
|
+
const isJwsSigningKeyDifferent = !_.isEqual(this.conf.jwsSigningKey, newConf.jwsSigningKey);
|
|
147
|
+
|
|
148
|
+
if (isInboundDifferent) {
|
|
149
|
+
this.logger.debug('Inbound config is different', {
|
|
150
|
+
oldInbound: this.conf.inbound,
|
|
151
|
+
newInbound: newConf.inbound
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
if (isOutboundDifferent) {
|
|
155
|
+
this.logger.debug('Outbound config is different (checked in inbound update)', {
|
|
156
|
+
oldOutbound: this.conf.outbound,
|
|
157
|
+
newOutbound: newConf.outbound
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
|
|
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;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
_shouldUpdateOutboundServer(newConf) {
|
|
179
|
+
const isOutboundDifferent = !_.isEqual(this.conf.outbound, newConf.outbound);
|
|
180
|
+
const isJwsSigningKeyDifferent = !_.isEqual(this.conf.jwsSigningKey, newConf.jwsSigningKey);
|
|
181
|
+
|
|
182
|
+
if (isOutboundDifferent) {
|
|
183
|
+
this.logger.debug('Outbound config is different', {
|
|
184
|
+
oldOutbound: this.conf.outbound,
|
|
185
|
+
newOutbound: newConf.outbound
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
if (isJwsSigningKeyDifferent) {
|
|
190
|
+
this.logger.debug('JWS Signing Key config is different', {
|
|
191
|
+
oldJwsSigningKey: this.conf.jwsSigningKey,
|
|
192
|
+
newJwsSigningKey: newConf.jwsSigningKey
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
return isOutboundDifferent || isJwsSigningKeyDifferent;
|
|
145
197
|
}
|
|
146
198
|
|
|
147
199
|
async start() {
|
|
@@ -229,8 +281,11 @@ class Server extends EventEmitter {
|
|
|
229
281
|
}
|
|
230
282
|
|
|
231
283
|
this.logger.isDebugEnabled && this.logger.push({ oldConf: this.conf.inbound, newConf: newConf.inbound }).debug('Inbound server configuration');
|
|
232
|
-
const updateInboundServer = this._shouldUpdateInboundServer(
|
|
284
|
+
const updateInboundServer = this._shouldUpdateInboundServer(newConf);
|
|
233
285
|
if (updateInboundServer) {
|
|
286
|
+
const stopStartLabel = 'InboundServer stop/start duration';
|
|
287
|
+
// eslint-disable-next-line no-console
|
|
288
|
+
console.time(stopStartLabel);
|
|
234
289
|
await this.inboundServer.stop();
|
|
235
290
|
this.inboundServer = new InboundServer(
|
|
236
291
|
newConf,
|
|
@@ -244,14 +299,17 @@ class Server extends EventEmitter {
|
|
|
244
299
|
this.emit('error', errMessage);
|
|
245
300
|
});
|
|
246
301
|
await this.inboundServer.start();
|
|
302
|
+
// eslint-disable-next-line no-console
|
|
303
|
+
console.timeEnd(stopStartLabel);
|
|
247
304
|
restartActionsTaken.updateInboundServer = true;
|
|
248
305
|
}
|
|
249
306
|
|
|
250
|
-
this.inboundServer._api._updatePeerJwsKeys(newConf.peerJWSKeys);
|
|
251
|
-
|
|
252
307
|
this.logger.isDebugEnabled && this.logger.push({ oldConf: this.conf.outbound, newConf: newConf.outbound }).debug('Outbound server configuration');
|
|
253
|
-
const updateOutboundServer =
|
|
308
|
+
const updateOutboundServer = this._shouldUpdateOutboundServer(newConf);
|
|
254
309
|
if (updateOutboundServer) {
|
|
310
|
+
const stopStartLabel = 'OutboundServer stop/start duration';
|
|
311
|
+
// eslint-disable-next-line no-console
|
|
312
|
+
console.time(stopStartLabel);
|
|
255
313
|
await this.outboundServer.stop();
|
|
256
314
|
this.outboundServer = new OutboundServer(
|
|
257
315
|
newConf,
|
|
@@ -266,6 +324,8 @@ class Server extends EventEmitter {
|
|
|
266
324
|
this.emit('error', errMessage);
|
|
267
325
|
});
|
|
268
326
|
await this.outboundServer.start();
|
|
327
|
+
// eslint-disable-next-line no-console
|
|
328
|
+
console.timeEnd(stopStartLabel);
|
|
269
329
|
restartActionsTaken.updateOutboundServer = true;
|
|
270
330
|
}
|
|
271
331
|
|
|
@@ -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.
|
|
3
|
+
"version": "0.3.0-snapshot.46",
|
|
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.
|
|
45
|
+
"@mojaloop/central-services-shared": "18.28.2",
|
|
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,22 +51,22 @@
|
|
|
51
51
|
"convict": "6.2.4",
|
|
52
52
|
"express": "4.21.2",
|
|
53
53
|
"openapi-backend": "5.12.0",
|
|
54
|
-
"redis": "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
|
-
"@eslint/compat": "1.
|
|
59
|
+
"@eslint/compat": "1.3.0",
|
|
60
60
|
"@types/convict": "6.1.6",
|
|
61
|
-
"@types/express": "5.0.
|
|
62
|
-
"@types/jest": "
|
|
63
|
-
"@types/node": "
|
|
61
|
+
"@types/express": "5.0.3",
|
|
62
|
+
"@types/jest": "30.0.0",
|
|
63
|
+
"@types/node": "24.0.3",
|
|
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.34.1",
|
|
69
|
+
"@typescript-eslint/parser": "8.34.1",
|
|
70
70
|
"copyfiles": "2.4.1",
|
|
71
71
|
"eslint": "9.15.0",
|
|
72
72
|
"jest": "29.7.0",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"npm-check-updates": "16.7.10",
|
|
75
75
|
"replace": "1.2.2",
|
|
76
76
|
"standard-version": "9.5.0",
|
|
77
|
-
"ts-jest": "29.
|
|
77
|
+
"ts-jest": "29.4.0",
|
|
78
78
|
"ts-node": "10.9.2",
|
|
79
79
|
"typescript": "5.8.3"
|
|
80
80
|
},
|
|
@@ -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.46",
|
|
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,21 +49,21 @@
|
|
|
49
49
|
"convict": "6.2.4",
|
|
50
50
|
"express": "4.21.2",
|
|
51
51
|
"openapi-backend": "5.12.0",
|
|
52
|
-
"redis": "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.
|
|
59
|
-
"@types/jest": "
|
|
60
|
-
"@types/node": "
|
|
58
|
+
"@types/express": "5.0.3",
|
|
59
|
+
"@types/jest": "30.0.0",
|
|
60
|
+
"@types/node": "24.0.3",
|
|
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.34.1",
|
|
66
|
+
"@typescript-eslint/parser": "8.34.1",
|
|
67
67
|
"copyfiles": "2.4.1",
|
|
68
68
|
"eslint": "9.15.0",
|
|
69
69
|
"jest": "29.7.0",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"npm-check-updates": "16.7.10",
|
|
72
72
|
"replace": "1.2.2",
|
|
73
73
|
"standard-version": "9.5.0",
|
|
74
|
-
"ts-jest": "29.
|
|
74
|
+
"ts-jest": "29.4.0",
|
|
75
75
|
"ts-node": "10.9.2",
|
|
76
76
|
"typescript": "5.8.3"
|
|
77
77
|
},
|
|
@@ -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.46",
|
|
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,26 +30,26 @@
|
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@mojaloop/api-snippets": "17.10.3",
|
|
33
|
-
"@mojaloop/central-services-shared": "18.
|
|
33
|
+
"@mojaloop/central-services-shared": "18.28.2",
|
|
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.5.
|
|
38
|
+
"redis": "5.5.6",
|
|
39
39
|
"uuid": "11.1.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@eslint/compat": "1.
|
|
43
|
-
"@types/node": "
|
|
42
|
+
"@eslint/compat": "1.3.0",
|
|
43
|
+
"@types/node": "24.0.3",
|
|
44
44
|
"@types/uuid": "10.0.0",
|
|
45
|
-
"@typescript-eslint/eslint-plugin": "8.
|
|
46
|
-
"@typescript-eslint/parser": "8.
|
|
45
|
+
"@typescript-eslint/eslint-plugin": "8.34.1",
|
|
46
|
+
"@typescript-eslint/parser": "8.34.1",
|
|
47
47
|
"eslint": "9.15.0",
|
|
48
48
|
"jest": "29.7.0",
|
|
49
49
|
"npm-check-updates": "16.7.10",
|
|
50
50
|
"replace": "1.2.2",
|
|
51
51
|
"standard-version": "9.5.0",
|
|
52
|
-
"ts-jest": "29.
|
|
52
|
+
"ts-jest": "29.4.0",
|
|
53
53
|
"tslib": "2.8.1",
|
|
54
54
|
"typescript": "5.8.3"
|
|
55
55
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mojaloop/sdk-scheme-adapter",
|
|
3
|
-
"version": "24.10.
|
|
3
|
+
"version": "24.10.2",
|
|
4
4
|
"description": "mojaloop sdk-scheme-adapter",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://github.com/mojaloop/sdk-scheme-adapter",
|
|
@@ -81,11 +81,11 @@
|
|
|
81
81
|
"tslib": "2.8.1"
|
|
82
82
|
},
|
|
83
83
|
"devDependencies": {
|
|
84
|
-
"@types/jest": "
|
|
85
|
-
"@types/node": "
|
|
84
|
+
"@types/jest": "30.0.0",
|
|
85
|
+
"@types/node": "24.0.3",
|
|
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.34.1",
|
|
88
|
+
"@typescript-eslint/parser": "8.34.1",
|
|
89
89
|
"audit-ci": "7.1.0",
|
|
90
90
|
"eslint": "9.15.0",
|
|
91
91
|
"eslint-config-airbnb-typescript": "18.0.0",
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"npm-check-updates": "16.7.10",
|
|
98
98
|
"replace": "1.2.2",
|
|
99
99
|
"standard-version": "9.5.0",
|
|
100
|
-
"ts-jest": "29.
|
|
100
|
+
"ts-jest": "29.4.0",
|
|
101
101
|
"ts-node": "10.9.2",
|
|
102
102
|
"typescript": "5.8.3",
|
|
103
103
|
"yarn-audit-fix": "10.1.1"
|
|
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
|