@mojaloop/sdk-scheme-adapter 24.2.0-csi-1210.1 → 24.2.0-csi-1210.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.
Binary file
@@ -73,7 +73,7 @@
73
73
  "@mojaloop/logging-bc-client-lib": "0.5.8",
74
74
  "@mojaloop/ml-schema-transformer-lib": "2.5.6",
75
75
  "@mojaloop/sdk-scheme-adapter-private-shared-lib": "workspace:^",
76
- "@mojaloop/sdk-standard-components": "19.8.0-snapshot.5",
76
+ "@mojaloop/sdk-standard-components": "v19.9.0-snapshot.1",
77
77
  "ajv": "8.17.1",
78
78
  "axios": "1.8.1",
79
79
  "body-parser": "1.20.3",
@@ -26,8 +26,8 @@
26
26
  ******/
27
27
  'use strict';
28
28
 
29
- const http = require('http');
30
- const { request } = require('@mojaloop/sdk-standard-components');
29
+ const http = require('node:http');
30
+ const { createHttpRequester } = require('@mojaloop/sdk-standard-components').httpRequester;
31
31
  const { buildUrl, HTTPResponseError } = require('./common');
32
32
 
33
33
 
@@ -38,6 +38,7 @@ class BackendRequests {
38
38
  constructor(config) {
39
39
  this.config = config;
40
40
  this.logger = config.logger.push({ component: BackendRequests.name });
41
+ this.requester = createHttpRequester({ logger: this.logger });
41
42
 
42
43
  // FSPID of THIS DFSP
43
44
  this.dfspId = config.dfspId;
@@ -268,7 +269,7 @@ class BackendRequests {
268
269
  async sendRequest(reqOptions) {
269
270
  try {
270
271
  this.logger.isVerboseEnabled && this.logger.push({ reqOptions }).verbose(`Executing HTTP ${reqOptions?.method}...`);
271
- const res = await request({ ...reqOptions, agent: this.agent });
272
+ const res = await this.requester.sendRequest({ ...reqOptions, agent: this.agent });
272
273
 
273
274
  const data = (res.headers['content-length'] === '0' || res.statusCode === 204)
274
275
  ? null
@@ -32,6 +32,7 @@ const util = require('util');
32
32
  const {
33
33
  axios,
34
34
  MojaloopRequests, Errors, WSO2Auth, Jws, Logger, common,
35
+ httpRequester,
35
36
  Ilp: { ILP_VERSIONS }
36
37
  } = jest.requireActual('@mojaloop/sdk-standard-components');
37
38
 
@@ -190,7 +191,7 @@ class MockJwsSigner {
190
191
  constructor(config) {
191
192
  assert(config.logger, 'Must supply a logger to JWS signer constructor');
192
193
  this.config = config;
193
- config.logger.log(`MockJwsSigner constructed with config: ${util.inspect(config)}`);
194
+ config.logger.info(`MockJwsSigner constructed with config: ${util.inspect(config)}`);
194
195
  }
195
196
  }
196
197
 
@@ -198,6 +199,7 @@ class MockJwsSigner {
198
199
  module.exports = {
199
200
  axios,
200
201
  Ilp,
202
+ httpRequester,
201
203
  MojaloopRequests: MockMojaloopRequests,
202
204
  Jws: {
203
205
  validator: MockJwsValidator,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mojaloop/sdk-scheme-adapter",
3
- "version": "24.2.0-csi-1210.1",
3
+ "version": "24.2.0-csi-1210.3",
4
4
  "description": "mojaloop sdk-scheme-adapter",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/mojaloop/sdk-scheme-adapter",