@ibm-cloud/cloudant 0.0.12 → 0.0.16

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.
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /**
3
- * © Copyright IBM Corporation 2020.
3
+ * © Copyright IBM Corporation 2020. All Rights Reserved.
4
4
  *
5
5
  * Licensed under the Apache License, Version 2.0 (the "License");
6
6
  * you may not use this file except in compliance with the License.
@@ -18,10 +18,12 @@ var __extends = (this && this.__extends) || (function () {
18
18
  var extendStatics = function (d, b) {
19
19
  extendStatics = Object.setPrototypeOf ||
20
20
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
21
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
21
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
22
22
  return extendStatics(d, b);
23
23
  };
24
24
  return function (d, b) {
25
+ if (typeof b !== "function" && b !== null)
26
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
25
27
  extendStatics(d, b);
26
28
  function __() { this.constructor = d; }
27
29
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
@@ -30,6 +32,7 @@ var __extends = (this && this.__extends) || (function () {
30
32
  Object.defineProperty(exports, "__esModule", { value: true });
31
33
  exports.CloudantBaseService = void 0;
32
34
  var ibm_cloud_sdk_core_1 = require("ibm-cloud-sdk-core");
35
+ // eslint-disable-next-line node/no-unpublished-import
33
36
  var tough_cookie_1 = require("tough-cookie");
34
37
  var auth_1 = require("../auth");
35
38
  var common_1 = require("./common");
@@ -81,6 +84,18 @@ var CloudantBaseService = /** @class */ (function (_super) {
81
84
  _super.prototype.configureService.call(this, serviceName);
82
85
  this.configureSessionAuthenticator();
83
86
  };
87
+ /**
88
+ * Turn request body compression on or off.
89
+ * Cloudant specific extensions:
90
+ * - Apply the gzip compression option on CouchdbSessionAuthenticator.
91
+ *
92
+ * @param {boolean} setting Will turn it on if 'true', off if 'false'.
93
+ */
94
+ CloudantBaseService.prototype.setEnableGzipCompression = function (setting) {
95
+ // Read external configuration and set as request defaults.
96
+ _super.prototype.setEnableGzipCompression.call(this, setting);
97
+ this.configureSessionAuthenticator();
98
+ };
84
99
  /**
85
100
  * In case of CouchdbSessionAuthenticator
86
101
  * the service options should be applied on it.
@@ -1 +1 @@
1
- {"version":3,"file":"cloudantBaseService.js","sourceRoot":"","sources":["../../lib/cloudantBaseService.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;AAEH,yDAA6E;AAC7E,6CAAwC;AACxC,gCAAsD;AACtD,mCAAuC;AAEvC;;;;;GAKG;AACH;IAAkD,uCAAW;IAC3D;;;;;;OAMG;IACH,6BAAY,WAAwB;QAApC,iBAMC;QALC,IAAI,WAAW,CAAC,aAAa,YAAY,kCAA2B,EAAE;YACpE,WAAW,CAAC,GAAG,GAAG,WAAW,CAAC,GAAG,IAAI,IAAI,wBAAS,EAAE,CAAC;SACtD;QACD,QAAA,kBAAM,WAAW,CAAC,SAAC;QACnB,KAAI,CAAC,6BAA6B,EAAE,CAAC;;IACvC,CAAC;IAED;;;;;;OAMG;IACI,2CAAa,GAApB,UAAqB,GAAW;QAC9B,iBAAM,aAAa,YAAC,GAAG,CAAC,CAAC;QACzB,IAAI,CAAC,6BAA6B,EAAE,CAAC;IACvC,CAAC;IAED;;;;;;;OAOG;IACO,8CAAgB,GAA1B,UAA2B,WAAmB;QAC5C,2DAA2D;QAC3D,iBAAM,gBAAgB,YAAC,WAAW,CAAC,CAAC;QACpC,IAAI,CAAC,6BAA6B,EAAE,CAAC;IACvC,CAAC;IAED;;;OAGG;IACK,2DAA6B,GAArC;QACE,IAAM,IAAI,GAAkB,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACpD,IAAI,IAAI,YAAY,kCAA2B,EAAE;YAC/C,IAAM,YAAY,GAAG,IAAI,CAAC,WAAi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C5C,2DAA2D;QAC3D,iBAAM,gBAAgB,YAAC,WAAW,CAAC,CAAC;QACpC,IAAI,CAAC,6BAA6B,EAAE,CAAC;IACvC,CAAC;IAED;;;;;;OAMG;IACI,sDAAwB,GAA/B,UAAgC,OAAgB;QAC9C,2DAA2D;QAC3D,iBAAM,wBAAwB,YAAC,OAAO,CAAC,CAAC;QACxC,IAAI,CAAC,6BAA6B,EAAE,CAAC;IACvC,CAAC;IAED;;;OAGG;IACK,2DAA6B,GAArC;QACE,IAAM,IAAI,GAAkB,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACpD,IAAI,IAAI,YAAY,kCAA2B,EAAE;YAC/C,IAAM,YAAY,GAAG,IAAI,CAAC,WAAiC,CAAC;YAC5D,IAAM,UAAU,GAAG,sBAAa,CAC9B,YAAY,CAAC,oBAAoB,EACjC,IAAI,EACJ,0BAA0B,CAC3B,CAAC;YACF,IAAI,IAAI,CAAC,WAAW,CAAC,OAAO,KAAK,SAAS,EAAE;gBAC1C,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC,CAAC;aAC5D;iBAAM;gBACL,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;aACrD;YACA,IAAoC,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;SACnE;IACH,CAAC;IACH,0BAAC;AAAD,CAAC,AA5ED,CAAkD,gCAAW,GA4E5D;AA5EqB,kDAAmB"}
package/lib/common.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * © Copyright IBM Corporation 2020.
2
+ * © Copyright IBM Corporation 2020. All Rights Reserved.
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
package/lib/common.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /**
3
- * © Copyright IBM Corporation 2020.
3
+ * © Copyright IBM Corporation 2020. All Rights Reserved.
4
4
  *
5
5
  * Licensed under the Apache License, Version 2.0 (the "License");
6
6
  * you may not use this file except in compliance with the License.
package/lib/common.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"common.js","sourceRoot":"","sources":["../../lib/common.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,uBAAyB;AACzB,2CAA2C;AAC3C,IAAM,GAAG,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAOvC;;GAEG;AACH,SAAgB,aAAa,CAAC,WAAmB,EAAE,cAAsB,EAAE,WAAmB;IAC5F,IAAM,OAAO,GAAG,mBAAmB,CAAC;IACpC,IAAM,UAAU,GAAG,GAAG,CAAC,OAAO,CAAC;IAC/B,IAAM,MAAM,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC;IAC7B,IAAM,SAAS,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC;IAC/B,IAAM,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC;IAEpC,IAAM,OAAO,GAAG;QACd,YAAY,EAAK,OAAO,SAAI,UAAU,SAAI,MAAM,SAAI,SAAS,SAAI,WAAa;QAC9E,0BAA0B,EAAE,kBAAgB,WAAW,yBAAoB,cAAc,sBAAiB,WAAa;KACxH,CAAC;IAEF,OAAO,OAAO,CAAC;AACjB,CAAC;AAbD,sCAaC"}
1
+ {"version":3,"file":"common.js","sourceRoot":"","sources":["../../lib/common.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,uBAAyB;AACzB,2CAA2C;AAC3C,IAAM,GAAG,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAOvC;;GAEG;AACH,SAAgB,aAAa,CAC3B,WAAmB,EACnB,cAAsB,EACtB,WAAmB;IAEnB,IAAM,OAAO,GAAG,mBAAmB,CAAC;IACpC,IAAM,UAAU,GAAG,GAAG,CAAC,OAAO,CAAC;IAC/B,IAAM,MAAM,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC;IAC7B,IAAM,SAAS,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC;IAC/B,IAAM,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC;IAEpC,IAAM,OAAO,GAAG;QACd,YAAY,EAAK,OAAO,SAAI,UAAU,SAAI,MAAM,SAAI,SAAS,SAAI,WAAa;QAC9E,0BAA0B,EAAE,kBAAgB,WAAW,yBAAoB,cAAc,sBAAiB,WAAa;KACxH,CAAC;IAEF,OAAO,OAAO,CAAC;AACjB,CAAC;AAjBD,sCAiBC"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * © Copyright IBM Corporation 2020.
2
+ * © Copyright IBM Corporation 2020. All Rights Reserved.
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
@@ -13,7 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { Authenticator } from "ibm-cloud-sdk-core";
16
+ import { Authenticator } from 'ibm-cloud-sdk-core';
17
17
  /**
18
18
  * Extend the creating Authenticator from external configuration function with
19
19
  * CouchDB specific Session Authenticator possibility.
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /**
3
- * © Copyright IBM Corporation 2020.
3
+ * © Copyright IBM Corporation 2020. All Rights Reserved.
4
4
  *
5
5
  * Licensed under the Apache License, Version 2.0 (the "License");
6
6
  * you may not use this file except in compliance with the License.
@@ -1 +1 @@
1
- {"version":3,"file":"getAuthenticatorFromEnvCloudantExtension.js","sourceRoot":"","sources":["../../lib/getAuthenticatorFromEnvCloudantExtension.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,yDAAyG;AACzG,gCAAsD;AAEtD,IAAM,yBAAyB,GAAG,iBAAiB,CAAA;AAEnD;;;;;;GAMG;AACH,SAAgB,wCAAwC,CAAC,WAAmB;IAC1E,IAAI,IAAI,CAAC;IACT,IAAM,WAAW,GAAG,wCAAmB,CAAC,WAAW,CAAC,CAAC;IACrD,IAAI,CAAC,WAAW,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,KAAK,yBAAyB,EAAG;QAC7E,IAAI,GAAG,IAAI,kCAA2B,CAAC,WAAW,CAAC,CAAC;KACrD;SAAM;QACL,IAAI,GAAG,oDAA+B,CAAC,WAAW,CAAC,CAAC;KACrD;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AATD,4FASC"}
1
+ {"version":3,"file":"getAuthenticatorFromEnvCloudantExtension.js","sourceRoot":"","sources":["../../lib/getAuthenticatorFromEnvCloudantExtension.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,yDAI4B;AAC5B,gCAAsD;AAEtD,IAAM,yBAAyB,GAAG,iBAAiB,CAAC;AAEpD;;;;;;GAMG;AACH,SAAgB,wCAAwC,CACtD,WAAmB;IAEnB,IAAI,IAAI,CAAC;IACT,IAAM,WAAW,GAAG,wCAAmB,CAAC,WAAW,CAAC,CAAC;IACrD,IACE,CAAC,WAAW,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,KAAK,yBAAyB,EACxE;QACA,IAAI,GAAG,IAAI,kCAA2B,CAAC,WAAW,CAAC,CAAC;KACrD;SAAM;QACL,IAAI,GAAG,oDAA+B,CAAC,WAAW,CAAC,CAAC;KACrD;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAbD,4FAaC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ibm-cloud/cloudant",
3
- "version": "0.0.12",
3
+ "version": "0.0.16",
4
4
  "description": "IBM Cloudant Node.js SDK",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -13,12 +13,10 @@
13
13
  ],
14
14
  "author": "IBM Corp.",
15
15
  "scripts": {
16
- "eslint:fix": "eslint . --fix",
17
- "eslint:check": "eslint . --cache",
18
- "tslint:fix": "tslint --fix -p . -c tslint.json",
19
- "tslint:check": "tslint -p . -c ./tslint.json",
20
- "lint": "npm run eslint:check && npm run tslint:check",
21
- "lint-fix": "npm run eslint:fix && npm run tslint:fix",
16
+ "eslint:fix": "eslint . --ext .ts,.js --fix",
17
+ "eslint:check": "eslint . --ext .ts,.js --cache",
18
+ "lint": "npm run eslint:check",
19
+ "lint-fix": "npm run eslint:fix",
22
20
  "build": "tsc && cp package.json dist/",
23
21
  "version": "bump2version --allow-dirty --new-version $npm_package_version patch && git add README.md .bumpversion.cfg",
24
22
  "postversion": "tsc-publish --no-checks --dry-run",
@@ -28,18 +26,16 @@
28
26
  "test-integration": "npm run build && jest test/integration",
29
27
  "test-travis": "jest --runInBand --testNamePattern='^((?!@slow).)*$' test/",
30
28
  "test-unit-travis": "jest --runInBand test/unit/",
31
- "test-integration-travis": "jest --runInBand --no-colors --testNamePattern='^((?!@slow).)*$' --json test/integration > test-output.log",
32
- "report-coverage": "codecov",
33
- "check-packages": "installed-check -e -d -v"
29
+ "test-integration-travis": "jest --runInBand --no-colors --testNamePattern='^((?!@slow).)*$' --json test/integration > test-output.log"
34
30
  },
35
31
  "license": "Apache-2.0",
36
32
  "engines": {
37
- "node": ">=10.0.0"
33
+ "node": "^12 || ^14 || ^16"
38
34
  },
39
35
  "dependencies": {
40
- "@types/node": "^14.14.7",
36
+ "@types/node": "^15.0.1",
41
37
  "extend": "^3.0.2",
42
- "ibm-cloud-sdk-core": "~2.7.0"
38
+ "ibm-cloud-sdk-core": "~2.11.0"
43
39
  },
44
40
  "jest": {
45
41
  "collectCoverage": true,