@cloudant/couchbackup 2.9.6-SNAPSHOT.58 → 2.9.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/CHANGES.md CHANGED
@@ -1,5 +1,9 @@
1
- # Unreleased
1
+ # 2.9.6 (2023-01-06)
2
+ - [FIXED] HTTP client dependency issue that masked backup errors when server connection was dropped.
2
3
  - [FIXED] Discard temporary file descriptor for backup.
4
+ - [UPGRADED] `@ibm-cloud/cloudant` dependency to version `0.4.0`.
5
+ - [UPGRADED] `ibm-cloud-sdk-core` peerDependency to minimum version `4.0.2` to match version provided from `@ibm-cloud/cloudant`.
6
+ - [UPGRADED] `axios` peerDependency to minimum version `1.2.1` to match version provided from `ibm-cloud-sdk-core`.
3
7
 
4
8
  # 2.9.5 (2022-11-01)
5
9
  - [UPGRADED] `@ibm-cloud/cloudant` dependency to version `0.3.0`.
@@ -14,8 +14,6 @@
14
14
  'use strict';
15
15
 
16
16
  const pkg = require('../package.json');
17
- const http = require('http');
18
- const https = require('https');
19
17
  const stream = require('stream');
20
18
  const { CloudantV1, CouchdbSessionAuthenticator } = require('@ibm-cloud/cloudant');
21
19
  const { IamAuthenticator, NoAuthAuthenticator } = require('ibm-cloud-sdk-core');
@@ -102,16 +100,10 @@ const errorHelper = async function(err) {
102
100
  module.exports = {
103
101
  client: function(rawUrl, opts) {
104
102
  const url = new URL(rawUrl);
105
- const protocol = (url.protocol.match(/^https/)) ? https : http;
106
- const keepAliveAgent = new protocol.Agent({
107
- keepAlive: true,
108
- keepAliveMsecs: 30000,
109
- maxSockets: opts.parallelism
110
- });
111
103
  // Split the URL to separate service from database
112
104
  // Use origin as the "base" to remove auth elements
113
- const actUrl = new URL(url.pathname.substr(0, url.pathname.lastIndexOf('/')), url.origin);
114
- const dbName = url.pathname.substr(url.pathname.lastIndexOf('/') + 1);
105
+ const actUrl = new URL(url.pathname.substring(0, url.pathname.lastIndexOf('/')), url.origin);
106
+ const dbName = url.pathname.substring(url.pathname.lastIndexOf('/') + 1);
115
107
  let authenticator;
116
108
  // Default to cookieauth unless an IAM key is provided
117
109
  if (opts.iamApiKey) {
@@ -134,11 +126,7 @@ module.exports = {
134
126
  // Axios performance options
135
127
  maxContentLength: -1
136
128
  };
137
- if (url.protocol === 'https') {
138
- serviceOpts.httpsAgent = keepAliveAgent;
139
- } else {
140
- serviceOpts.httpAgent = keepAliveAgent;
141
- }
129
+
142
130
  const service = new CloudantV1(serviceOpts);
143
131
  // Configure retries
144
132
  const maxRetries = 2; // for 3 total attempts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudant/couchbackup",
3
- "version": "2.9.6-SNAPSHOT.58",
3
+ "version": "2.9.6",
4
4
  "description": "CouchBackup - command-line backup utility for Cloudant/CouchDB",
5
5
  "homepage": "https://github.com/cloudant/couchbackup",
6
6
  "repository": "https://github.com/cloudant/couchbackup.git",
@@ -20,16 +20,16 @@
20
20
  "node": ">=14"
21
21
  },
22
22
  "dependencies": {
23
- "@ibm-cloud/cloudant": "0.3.1",
23
+ "@ibm-cloud/cloudant": "0.4.0",
24
24
  "async": "^3.1.0",
25
25
  "commander": "^9.0.0",
26
26
  "debug": "~4.3.2",
27
27
  "tmp": "0.2.1"
28
28
  },
29
29
  "peerDependencies": {
30
- "ibm-cloud-sdk-core": "^3.1.0",
30
+ "ibm-cloud-sdk-core": "^4.0.2",
31
31
  "retry-axios": "^2.6.0",
32
- "axios": "^0.26.1"
32
+ "axios": "^1.2.1"
33
33
  },
34
34
  "main": "app.js",
35
35
  "bin": {