@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 +8 -0
- package/lib/connectorRest.js +10 -6
- package/package.json +1 -1
- package/refs?service=git-upload-pack +0 -0
package/CHANGELOG.md
CHANGED
package/lib/connectorRest.js
CHANGED
|
@@ -408,7 +408,7 @@ function returnStub(request, entitySchema, callProperties) {
|
|
|
408
408
|
return callResp;
|
|
409
409
|
}
|
|
410
410
|
|
|
411
|
-
const mockresponses = entitySchema
|
|
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 =
|
|
818
|
-
const newRequest =
|
|
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 =
|
|
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
|
-
|
|
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
|
Binary file
|