@ibm-cloud/cloudant 0.12.0 → 0.12.2

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/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
  [![Release](https://img.shields.io/github/v/release/IBM/cloudant-node-sdk?include_prereleases&sort=semver)](https://github.com/IBM/cloudant-node-sdk/releases/latest)
3
3
  [![Docs](https://img.shields.io/static/v1?label=TypeDoc&message=latest&color=blue)](https://ibm.github.io/cloudant-node-sdk/)
4
4
 
5
- # IBM Cloudant Node.js SDK Version 0.12.0
5
+ # IBM Cloudant Node.js SDK Version 0.12.2
6
6
 
7
7
  IBM Cloudant Node.js SDK is a client library that interacts with the
8
8
  [IBM Cloudant APIs](https://cloud.ibm.com/apidocs/cloudant?code=node).
@@ -903,7 +903,7 @@ You have deleted the document.
903
903
 
904
904
  #### Further code examples
905
905
 
906
- For a complete list of code examples, see the [examples directory](https://github.com/IBM/cloudant-node-sdk/tree/v0.12.0/examples#examples-for-node).
906
+ For a complete list of code examples, see the [examples directory](https://github.com/IBM/cloudant-node-sdk/tree/v0.12.2/examples#examples-for-node).
907
907
 
908
908
  ### Error handling
909
909
 
@@ -1062,7 +1062,7 @@ The changes follower requires the client to have HTTP timeouts of at least 1 min
1062
1062
  instantiation if it is insufficient. The default client configuration has sufficiently long timeouts.
1063
1063
 
1064
1064
  For use-cases where these configuration limitations are deemed too restrictive then it is recommended to
1065
- write code to use the SDK's [POST `_changes` API](https://github.com/IBM/cloudant-node-sdk/tree/v0.12.0/examples#postchanges) instead of the follower.
1065
+ write code to use the SDK's [POST `_changes` API](https://github.com/IBM/cloudant-node-sdk/tree/v0.12.2/examples#postchanges) instead of the follower.
1066
1066
 
1067
1067
  #### Error suppression
1068
1068
 
@@ -1097,7 +1097,7 @@ The follower is not optimized for some use cases and it is not recommended to us
1097
1097
  * The volume of changes is very high (if the rate of changes in the database exceeds the follower's rate of pulling them it will never catch-up).
1098
1098
 
1099
1099
  In these cases use-case specific control over the number of change requests made and the content size of the responses
1100
- may be achieved by using the SDK's [POST `_changes` API](https://github.com/IBM/cloudant-node-sdk/tree/v0.12.0/examples#postchanges).
1100
+ may be achieved by using the SDK's [POST `_changes` API](https://github.com/IBM/cloudant-node-sdk/tree/v0.12.2/examples#postchanges).
1101
1101
 
1102
1102
  #### Checkpointing
1103
1103
 
@@ -1590,7 +1590,7 @@ If you encounter an issue with the project, you are welcome to submit a
1590
1590
 
1591
1591
  Before you submit a bug report, search for
1592
1592
  [similar issues](https://github.com/IBM/cloudant-node-sdk/issues?q=is%3Aissue) and review the
1593
- [KNOWN_ISSUES file](https://github.com/IBM/cloudant-node-sdk/tree/v0.12.0/KNOWN_ISSUES.md) to verify that your issue hasn't been reported yet.
1593
+ [KNOWN_ISSUES file](https://github.com/IBM/cloudant-node-sdk/tree/v0.12.2/KNOWN_ISSUES.md) to verify that your issue hasn't been reported yet.
1594
1594
 
1595
1595
  Please consult the [security policy](https://github.com/IBM/cloudant-node-sdk/security/policy) before opening security related issues.
1596
1596
 
@@ -1620,8 +1620,8 @@ Find more open source projects on the [IBM GitHub](http://ibm.github.io/) page.
1620
1620
 
1621
1621
  ## Contributing
1622
1622
 
1623
- For more information, see [CONTRIBUTING](https://github.com/IBM/cloudant-node-sdk/tree/v0.12.0/CONTRIBUTING.md).
1623
+ For more information, see [CONTRIBUTING](https://github.com/IBM/cloudant-node-sdk/tree/v0.12.2/CONTRIBUTING.md).
1624
1624
 
1625
1625
  ## License
1626
1626
 
1627
- This SDK is released under the Apache 2.0 license. To read the full text of the license, see [LICENSE](https://github.com/IBM/cloudant-node-sdk/tree/v0.12.0/LICENSE).
1627
+ This SDK is released under the Apache 2.0 license. To read the full text of the license, see [LICENSE](https://github.com/IBM/cloudant-node-sdk/tree/v0.12.2/LICENSE).
@@ -17,6 +17,7 @@
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.SessionTokenManager = void 0;
19
19
  const ibm_cloud_sdk_core_1 = require("ibm-cloud-sdk-core");
20
+ const common_1 = require("../lib/common");
20
21
  /**
21
22
  * Token Manager of CouchDB session token.
22
23
  *
@@ -71,8 +72,12 @@ class SessionTokenManager extends ibm_cloud_sdk_core_1.TokenManager {
71
72
  * @returns {Promise}
72
73
  */
73
74
  requestToken() {
75
+ const newHeaders = (0, common_1.getSdkHeaders)('cloudant', 'v1', 'authenticatorPostSession');
74
76
  if (!this.options.headers) {
75
- this.options.headers = {};
77
+ Object.assign(this.options, { 'headers': newHeaders });
78
+ }
79
+ else {
80
+ Object.assign(this.options.headers, newHeaders);
76
81
  }
77
82
  // these cannot be overwritten
78
83
  const parameters = {
@@ -1 +1 @@
1
- {"version":3,"file":"sessionTokenManager.js","sourceRoot":"","sources":["../../auth/sessionTokenManager.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAGH,2DAK4B;AAU5B;;;;;GAKG;AACH,MAAa,mBAAoB,SAAQ,iCAAY;IACzC,eAAe,GAAa;QACpC,UAAU;QACV,UAAU;QACV,YAAY;QACZ,KAAK;KACN,CAAC;IAEM,SAAS,CAAS;IAElB,OAAO,CAA6B;IAE5C;;;;;;;;;;;;;;;OAeG;IACH,YAAY,OAAmC;QAC7C,KAAK,CAAC,OAAO,CAAC,CAAC;QAEf,IAAA,kCAAa,EAAC,OAAO,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;QAE7C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,SAAS,GAAG,aAAa,CAAC;IACjC,CAAC;IAED;;;;;OAKG;IACH,kDAAkD;IAC3C,UAAU,CAAC,OAA4B;QAC5C,MAAM,MAAM,GACV,iFAAiF,CAAC;QACpF,MAAM,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC;IAC1B,CAAC;IAED;;;;OAIG;IACO,YAAY;QACpB,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;YAC1B,IAAI,CAAC,OAAO,CAAC,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