@mojaloop/sdk-scheme-adapter 24.9.8-snapshot.4 → 24.9.8-snapshot.6
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.
|
@@ -142,6 +142,8 @@ 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);
|
|
145
147
|
|
|
146
148
|
if (isInboundDifferent) {
|
|
147
149
|
this.logger.debug('Inbound config is different', {
|
|
@@ -156,11 +158,26 @@ class Server extends EventEmitter {
|
|
|
156
158
|
});
|
|
157
159
|
}
|
|
158
160
|
|
|
159
|
-
|
|
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;
|
|
160
176
|
}
|
|
161
177
|
|
|
162
178
|
_shouldUpdateOutboundServer(newConf) {
|
|
163
179
|
const isOutboundDifferent = !_.isEqual(this.conf.outbound, newConf.outbound);
|
|
180
|
+
const isJwsSigningKeyDifferent = !_.isEqual(this.conf.jwsSigningKey, newConf.jwsSigningKey);
|
|
164
181
|
|
|
165
182
|
if (isOutboundDifferent) {
|
|
166
183
|
this.logger.debug('Outbound config is different', {
|
|
@@ -169,7 +186,14 @@ class Server extends EventEmitter {
|
|
|
169
186
|
});
|
|
170
187
|
}
|
|
171
188
|
|
|
172
|
-
|
|
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;
|
|
173
197
|
}
|
|
174
198
|
|
|
175
199
|
async start() {
|
|
@@ -257,7 +281,7 @@ class Server extends EventEmitter {
|
|
|
257
281
|
}
|
|
258
282
|
|
|
259
283
|
this.logger.isDebugEnabled && this.logger.push({ oldConf: this.conf.inbound, newConf: newConf.inbound }).debug('Inbound server configuration');
|
|
260
|
-
const updateInboundServer = this._shouldUpdateInboundServer(
|
|
284
|
+
const updateInboundServer = this._shouldUpdateInboundServer(newConf);
|
|
261
285
|
if (updateInboundServer) {
|
|
262
286
|
await this.inboundServer.stop();
|
|
263
287
|
this.inboundServer = new InboundServer(
|
|
@@ -276,7 +300,7 @@ class Server extends EventEmitter {
|
|
|
276
300
|
}
|
|
277
301
|
|
|
278
302
|
this.logger.isDebugEnabled && this.logger.push({ oldConf: this.conf.outbound, newConf: newConf.outbound }).debug('Outbound server configuration');
|
|
279
|
-
const updateOutboundServer = this._shouldUpdateOutboundServer(
|
|
303
|
+
const updateOutboundServer = this._shouldUpdateOutboundServer(newConf);
|
|
280
304
|
if (updateOutboundServer) {
|
|
281
305
|
await this.outboundServer.stop();
|
|
282
306
|
this.outboundServer = new OutboundServer(
|
|
@@ -295,20 +319,6 @@ class Server extends EventEmitter {
|
|
|
295
319
|
restartActionsTaken.updateOutboundServer = true;
|
|
296
320
|
}
|
|
297
321
|
|
|
298
|
-
if(!_.isEqual(this.conf.jwsSigningKey, newConf.jwsSigningKey) ||
|
|
299
|
-
!_.isEqual(this.conf.peerJWSKeys, newConf.peerJWSKeys)) {
|
|
300
|
-
this.logger.isDebugEnabled && this.logger.push({
|
|
301
|
-
oldJwsSigningKey: this.conf.jwsSigningKey,
|
|
302
|
-
newJwsSigningKey: newConf.jwsSigningKey,
|
|
303
|
-
oldPeerJWSKeys: this.conf.peerJWSKeys,
|
|
304
|
-
newPeerJWSKeys: newConf.peerJWSKeys
|
|
305
|
-
}).debug('JWS signing key or peer JWS keys configuration changed');
|
|
306
|
-
this.outboundServer._conf.jwsSigningKey = newConf.jwsSigningKey;
|
|
307
|
-
this.outboundServer._conf.peerJWSKeys = newConf.peerJWSKeys;
|
|
308
|
-
this.inboundServer._conf.jwsSigningKey = newConf.jwsSigningKey;
|
|
309
|
-
this.inboundServer._conf.peerJWSKeys = newConf.peerJWSKeys;
|
|
310
|
-
}
|
|
311
|
-
|
|
312
322
|
const updateFspiopEventHandler = !_.isEqual(this.conf.outbound, newConf.outbound)
|
|
313
323
|
&& this.conf.fspiopEventHandler.enabled;
|
|
314
324
|
if (updateFspiopEventHandler) {
|
|
@@ -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.41",
|
|
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.41",
|
|
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.41",
|
|
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