@ibm-cloud/cloudant 0.0.10 → 0.0.14
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/LICENSE +25 -0
- package/README.md +395 -275
- package/auth/couchdbSessionAuthenticator.d.ts +2 -2
- package/auth/couchdbSessionAuthenticator.js +2 -2
- package/auth/couchdbSessionAuthenticator.js.map +1 -1
- package/auth/index.d.ts +1 -1
- package/auth/index.js +2 -1
- package/auth/index.js.map +1 -1
- package/auth/sessionTokenManager.d.ts +2 -2
- package/auth/sessionTokenManager.js +14 -8
- package/auth/sessionTokenManager.js.map +1 -1
- package/cloudant/v1.d.ts +594 -517
- package/cloudant/v1.js +3111 -3290
- package/cloudant/v1.js.map +1 -1
- package/index.d.ts +3 -3
- package/index.js +3 -1
- package/index.js.map +1 -1
- package/lib/cloudantBaseService.d.ts +10 -2
- package/lib/cloudantBaseService.js +16 -2
- package/lib/cloudantBaseService.js.map +1 -1
- package/lib/common.d.ts +1 -1
- package/lib/common.js +1 -1
- package/lib/common.js.map +1 -1
- package/lib/getAuthenticatorFromEnvCloudantExtension.d.ts +2 -2
- package/lib/getAuthenticatorFromEnvCloudantExtension.js +1 -1
- package/lib/getAuthenticatorFromEnvCloudantExtension.js.map +1 -1
- package/package.json +7 -9
|
@@ -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 { BaseService, UserOptions } from
|
|
16
|
+
import { BaseService, UserOptions } from 'ibm-cloud-sdk-core';
|
|
17
17
|
/**
|
|
18
18
|
* Cloudant specific service that extends the base service functions.
|
|
19
19
|
*
|
|
@@ -46,6 +46,14 @@ export declare abstract class CloudantBaseService extends BaseService {
|
|
|
46
46
|
* configuration.
|
|
47
47
|
*/
|
|
48
48
|
protected configureService(serviceName: string): void;
|
|
49
|
+
/**
|
|
50
|
+
* Turn request body compression on or off.
|
|
51
|
+
* Cloudant specific extensions:
|
|
52
|
+
* - Apply the gzip compression option on CouchdbSessionAuthenticator.
|
|
53
|
+
*
|
|
54
|
+
* @param {boolean} setting Will turn it on if 'true', off if 'false'.
|
|
55
|
+
*/
|
|
56
|
+
setEnableGzipCompression(setting: boolean): void;
|
|
49
57
|
/**
|
|
50
58
|
* In case of CouchdbSessionAuthenticator
|
|
51
59
|
* the service options should be applied on it.
|
|
@@ -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,7 +18,7 @@ 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 (
|
|
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) {
|
|
@@ -30,6 +30,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
30
30
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
31
|
exports.CloudantBaseService = void 0;
|
|
32
32
|
var ibm_cloud_sdk_core_1 = require("ibm-cloud-sdk-core");
|
|
33
|
+
// eslint-disable-next-line node/no-unpublished-import
|
|
33
34
|
var tough_cookie_1 = require("tough-cookie");
|
|
34
35
|
var auth_1 = require("../auth");
|
|
35
36
|
var common_1 = require("./common");
|
|
@@ -81,6 +82,19 @@ var CloudantBaseService = /** @class */ (function (_super) {
|
|
|
81
82
|
_super.prototype.configureService.call(this, serviceName);
|
|
82
83
|
this.configureSessionAuthenticator();
|
|
83
84
|
};
|
|
85
|
+
/**
|
|
86
|
+
* Turn request body compression on or off.
|
|
87
|
+
* Cloudant specific extensions:
|
|
88
|
+
* - Apply the gzip compression option on CouchdbSessionAuthenticator.
|
|
89
|
+
*
|
|
90
|
+
* @param {boolean} setting Will turn it on if 'true', off if 'false'.
|
|
91
|
+
*/
|
|
92
|
+
CloudantBaseService.prototype.setEnableGzipCompression = function (setting) {
|
|
93
|
+
// Read external configuration and set as request defaults.
|
|
94
|
+
_super.prototype.setEnableGzipCompression.call(this, setting);
|
|
95
|
+
this.baseOptions.enableGzipCompression = setting;
|
|
96
|
+
this.configureSessionAuthenticator();
|
|
97
|
+
};
|
|
84
98
|
/**
|
|
85
99
|
* In case of CouchdbSessionAuthenticator
|
|
86
100
|
* 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,
|
|
1
|
+
{"version":3,"file":"cloudantBaseService.js","sourceRoot":"","sources":["../../lib/cloudantBaseService.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;AAEH,yDAA6E;AAC7E,sDAAsD;AACtD,6CAAyC;AACzC,gCAAsD;AACtD,mCAAyC;AAEzC;;;;;GAKG;AACH;IAAkD,uCAAW;IAC3D;;;;;;OAMG;IACH,6BAAY,WAAwB;QAApC,iBAMC;QALC,IAAI,WAAW,CAAC,aAAa,YAAY,kCA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AAU,CAAC,CAAC;aACrD;YACA,IAAoC,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;SACnE;IACH,CAAC;IACH,0BAAC;AAAD,CAAC,AA7ED,CAAkD,gCAAW,GA6E5D;AA7EqB,kDAAmB"}
|
package/lib/common.d.ts
CHANGED
package/lib/common.js
CHANGED
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,
|
|
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
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getAuthenticatorFromEnvCloudantExtension.js","sourceRoot":"","sources":["../../lib/getAuthenticatorFromEnvCloudantExtension.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,
|
|
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.
|
|
3
|
+
"version": "0.0.14",
|
|
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
|
-
"
|
|
19
|
-
"
|
|
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",
|
|
@@ -37,9 +35,9 @@
|
|
|
37
35
|
"node": ">=10.0.0"
|
|
38
36
|
},
|
|
39
37
|
"dependencies": {
|
|
40
|
-
"@types/node": "^
|
|
38
|
+
"@types/node": "^14.14.7",
|
|
41
39
|
"extend": "^3.0.2",
|
|
42
|
-
"ibm-cloud-sdk-core": "
|
|
40
|
+
"ibm-cloud-sdk-core": "~2.8.0"
|
|
43
41
|
},
|
|
44
42
|
"jest": {
|
|
45
43
|
"collectCoverage": true,
|