@itentialopensource/adapter-utils 5.1.5 → 5.1.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.
package/CHANGELOG.md CHANGED
@@ -1,4 +1,12 @@
1
1
 
2
+ ## 5.1.6 [09-06-2023]
3
+
4
+ * add fixes to connector that are missing
5
+
6
+ See merge request itentialopensource/adapter-utils!275
7
+
8
+ ---
9
+
2
10
  ## 5.1.5 [08-29-2023]
3
11
 
4
12
  * fix awsroleauth and add authdata to generic
@@ -408,7 +408,7 @@ function returnStub(request, entitySchema, callProperties) {
408
408
  return callResp;
409
409
  }
410
410
 
411
- const mockresponses = entitySchema.mockresponses;
411
+ const { mockresponses } = entitySchema;
412
412
  let specificResp = null;
413
413
 
414
414
  // if there is a request body, see if there is something that matches a specific input
@@ -814,8 +814,8 @@ function makeRequest(request, entitySchema, callProperties, startTrip, attempt,
814
814
 
815
815
  if (attempt < useRedirect && res.statusCode >= 300 && res.statusCode <= 308 && res.headers.location) {
816
816
  // retries = 0 go here, retries = 1 it doesn't
817
- const newProp = Object.assign({}, callProperties);
818
- const newRequest = Object.assign({}, request);
817
+ const newProp = { ...callProperties };
818
+ const newRequest = { ...request };
819
819
  const nextAtt = attempt + 1;
820
820
 
821
821
  // if there is a protocol on the new location use it
@@ -1931,7 +1931,7 @@ async function buildTokenRequest(reqPath, reqBody, callProperties, callback) {
1931
1931
  }
1932
1932
 
1933
1933
  // remove the path vars from the reqBody
1934
- const actReqBody = Object.assign({}, reqBody);
1934
+ const actReqBody = { ...reqBody };
1935
1935
  if (actReqBody && actReqBody.uriPathVars) {
1936
1936
  delete actReqBody.uriPathVars;
1937
1937
  }
@@ -4304,7 +4304,9 @@ class ConnectorRest {
4304
4304
 
4305
4305
  // if there is a healthcheck schema, over ride the properties
4306
4306
  if (healthSchema) {
4307
- options.path = healthSchema.entitypath;
4307
+ if (!healthcheckpath) {
4308
+ options.path = healthSchema.entitypath;
4309
+ }
4308
4310
  options.method = healthSchema.method;
4309
4311
 
4310
4312
  // save it in memory
@@ -4463,8 +4465,10 @@ class ConnectorRest {
4463
4465
  };
4464
4466
 
4465
4467
  // if there is a healthcheck schema, over ride the properties
4466
- if (healthSchema !== null) {
4468
+ if (healthSchema !== null && !healthcheckpath) {
4467
4469
  request.origPath = healthSchema.entitypath;
4470
+ } else if (healthcheckpath) {
4471
+ request.origPath = healthcheckpath;
4468
4472
  }
4469
4473
 
4470
4474
  // call to make the request
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itentialopensource/adapter-utils",
3
- "version": "5.1.5",
3
+ "version": "5.1.6",
4
4
  "description": "Itential Adapter Utility Libraries",
5
5
  "scripts": {
6
6
  "postinstall": "node utils/setup.js",
Binary file