@itentialopensource/adapter-utils 4.44.8 → 4.45.1

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,54 @@
1
1
 
2
+ ## 4.45.1 [12-08-2021]
3
+
4
+ * Modified response handling on error to use the translator
5
+
6
+ Closes ADAPT-1876
7
+
8
+ See merge request itentialopensource/adapter-utils!225
9
+
10
+ ---
11
+
12
+ ## 4.45.0 [12-08-2021]
13
+
14
+ * changes for uriOptions and not encoding query params
15
+
16
+ Closes ADAPT-1866
17
+
18
+ See merge request itentialopensource/adapter-utils!227
19
+
20
+ ---
21
+
22
+ ## 4.44.11 [10-25-2021]
23
+
24
+ * change to the npm registry url
25
+
26
+ Closes ADAPT-1793
27
+
28
+ See merge request itentialopensource/adapter-utils!224
29
+
30
+ ---
31
+
32
+ ## 4.44.10 [10-25-2021]
33
+
34
+ * fixes for dbUtils, proxy, misspelling
35
+
36
+ Closes ADAPT-1019
37
+
38
+ See merge request itentialopensource/adapter-utils!223
39
+
40
+ ---
41
+
42
+ ## 4.44.9 [09-14-2021]
43
+
44
+ * Refactor storage handling
45
+
46
+ Closes ADAPT-870
47
+
48
+ See merge request itentialopensource/adapter-utils!222
49
+
50
+ ---
51
+
2
52
  ## 4.44.8 [08-29-2021]
3
53
 
4
54
  * fix this call where there is no this
@@ -640,7 +640,7 @@ function makeRequest(request, entitySchema, callProperties, startTrip, attempt,
640
640
  } else if (proxyEnabled) {
641
641
  let proxy = `${proxyProtocol}://${proxyHost}:${proxyPort}`;
642
642
  if (proxyUser && proxyPassword) {
643
- proxy = `${callProperties.proxy.protocol}://${proxyUser}:${proxyPassword}@${callProperties.proxy.host}:${callProperties.proxy.port}`;
643
+ proxy = `${proxyProtocol}://${proxyUser}:${proxyPassword}@${proxyHost}:${proxyPort}`;
644
644
  }
645
645
  request.header.agent = new HttpsProxyAgent(proxy);
646
646
 
@@ -1760,6 +1760,20 @@ function buildTokenRequest(reqPath, reqBody, callProperties, callback) {
1760
1760
  }
1761
1761
  }
1762
1762
 
1763
+ // only add global options if there are global options to add
1764
+ if (globalRequest && globalRequest.uriOptions
1765
+ && Object.keys(globalRequest.uriOptions).length > 0) {
1766
+ const optionString = querystring.stringify(globalRequest.uriOptions);
1767
+
1768
+ // if no query paramters yet - start with ?
1769
+ if (options.path.indexOf('?') < 0) {
1770
+ options.path += `?${optionString}`;
1771
+ } else {
1772
+ // if already have query parameters, add on to end
1773
+ options.path += `&${optionString}`;
1774
+ }
1775
+ }
1776
+
1763
1777
  // remove the path vars from the reqBody
1764
1778
  const actReqBody = Object.assign({}, reqBody);
1765
1779
  if (actReqBody && actReqBody.uriPathVars) {