@cloudant/couchbackup 2.8.4-SNAPSHOT.115 → 2.9.1-7.198

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,8 +2,6 @@
2
2
 
3
3
  [![npm (scoped)](https://img.shields.io/npm/v/@cloudant/couchbackup.svg?colorB=0000ff)](https://www.npmjs.com/package/@cloudant/couchbackup)
4
4
  [![npm (scoped with tag)](https://img.shields.io/npm/v/@cloudant/couchbackup/snapshot.svg?colorB=666699)](https://www.npmjs.com/package/@cloudant/couchbackup)
5
- [![Build Status](https://travis-ci.org/cloudant/couchbackup.svg?branch=master)](https://travis-ci.org/cloudant/couchbackup)
6
- [![Greenkeeper badge](https://badges.greenkeeper.io/cloudant/couchbackup.svg)](https://greenkeeper.io/)
7
5
 
8
6
  ```
9
7
  _____ _ ______ _
@@ -35,12 +33,12 @@ npm install -g @cloudant/couchbackup
35
33
  ```
36
34
 
37
35
  ### Requirements
38
- * The minimum required Node.js version is 14.
36
+ * Node.js LTS version 18 or 20.
39
37
  * The minimum required CouchDB version is 2.0.0.
40
38
 
41
39
  ### Snapshots
42
40
 
43
- The latest builds of master are published to npm with the `snapshot` tag. Use the `snapshot` tag if you want to experiment with an unreleased fix or new function, but please note that snapshot versions are **unsupported**.
41
+ The latest builds of main are published to npm with the `snapshot` tag. Use the `snapshot` tag if you want to experiment with an unreleased fix or new function, but please note that snapshot versions are **unsupported**.
44
42
 
45
43
  ## Usage
46
44
 
package/app.js CHANGED
@@ -101,10 +101,6 @@ function validateArgs(url, opts, cb) {
101
101
  cb(new error.BackupError('InvalidOption', 'Invalid URL protocol.'));
102
102
  return;
103
103
  }
104
- if (!urlObject.host) {
105
- cb(new error.BackupError('InvalidOption', 'Invalid URL host.'));
106
- return;
107
- }
108
104
  if (!urlObject.pathname || urlObject.pathname === '/') {
109
105
  cb(new error.BackupError('InvalidOption', 'Invalid URL, missing path element (no database).'));
110
106
  return;
@@ -114,7 +110,7 @@ function validateArgs(url, opts, cb) {
114
110
  return;
115
111
  }
116
112
  } catch (err) {
117
- cb(err);
113
+ cb(error.wrapPossibleInvalidUrlError(err));
118
114
  return;
119
115
  }
120
116
 
@@ -25,53 +25,57 @@ const backupBatchDebug = debug('couchbackup:backup:batch');
25
25
 
26
26
  backupDebug.enabled = true;
27
27
 
28
- const program = parser.parseBackupArgs();
28
+ try {
29
+ const program = parser.parseBackupArgs();
30
+ const databaseUrl = cliutils.databaseUrl(program.url, program.db);
29
31
 
30
- const databaseUrl = cliutils.databaseUrl(program.url, program.db);
31
- const opts = {
32
- bufferSize: program.bufferSize,
33
- log: program.log,
34
- mode: program.mode,
35
- parallelism: program.parallelism,
36
- requestTimeout: program.requestTimeout,
37
- resume: program.resume,
38
- iamApiKey: program.iamApiKey,
39
- iamTokenUrl: program.iamTokenUrl
40
- };
32
+ const opts = {
33
+ bufferSize: program.bufferSize,
34
+ log: program.log,
35
+ mode: program.mode,
36
+ parallelism: program.parallelism,
37
+ requestTimeout: program.requestTimeout,
38
+ resume: program.resume,
39
+ iamApiKey: program.iamApiKey,
40
+ iamTokenUrl: program.iamTokenUrl
41
+ };
41
42
 
42
- // log configuration to console
43
- console.error('='.repeat(80));
44
- console.error('Performing backup on ' + databaseUrl.replace(/\/\/.+@/g, '//****:****@') + ' using configuration:');
45
- console.error(JSON.stringify(opts, null, 2).replace(/"iamApiKey": "[^"]+"/, '"iamApiKey": "****"'));
46
- console.error('='.repeat(80));
43
+ // log configuration to console
44
+ console.error('='.repeat(80));
45
+ console.error('Performing backup on ' + databaseUrl.replace(/\/\/.+@/g, '//****:****@') + ' using configuration:');
46
+ console.error(JSON.stringify(opts, null, 2).replace(/"iamApiKey": "[^"]+"/, '"iamApiKey": "****"'));
47
+ console.error('='.repeat(80));
47
48
 
48
- backupBatchDebug.enabled = !program.quiet;
49
+ backupBatchDebug.enabled = !program.quiet;
49
50
 
50
- let ws = process.stdout;
51
+ let ws = process.stdout;
51
52
 
52
- // open output file
53
- if (program.output) {
54
- let flags = 'w';
55
- if (program.log && program.resume) {
56
- flags = 'a';
53
+ // open output file
54
+ if (program.output) {
55
+ let flags = 'w';
56
+ if (program.log && program.resume) {
57
+ flags = 'a';
58
+ }
59
+ const fd = fs.openSync(program.output, flags);
60
+ ws = fs.createWriteStream(null, { fd });
57
61
  }
58
- const fd = fs.openSync(program.output, flags);
59
- ws = fs.createWriteStream(null, { fd: fd });
60
- }
61
62
 
62
- backupDebug('Fetching all database changes...');
63
+ backupDebug('Fetching all database changes...');
63
64
 
64
- return couchbackup.backup(
65
- databaseUrl,
66
- ws,
67
- opts,
68
- error.terminationCallback
69
- ).on('changes', function(batch) {
70
- backupBatchDebug('Total batches received:', batch + 1);
71
- }).on('written', function(obj) {
72
- backupBatchDebug('Written batch ID:', obj.batch, 'Total document revisions written:', obj.total, 'Time:', obj.time);
73
- }).on('error', function(e) {
74
- backupDebug('ERROR', e);
75
- }).on('finished', function(obj) {
76
- backupDebug('Finished - Total document revisions written:', obj.total);
77
- });
65
+ return couchbackup.backup(
66
+ databaseUrl,
67
+ ws,
68
+ opts,
69
+ error.terminationCallback
70
+ ).on('changes', function(batch) {
71
+ backupBatchDebug('Total batches received:', batch + 1);
72
+ }).on('written', function(obj) {
73
+ backupBatchDebug('Written batch ID:', obj.batch, 'Total document revisions written:', obj.total, 'Time:', obj.time);
74
+ }).on('error', function(e) {
75
+ backupDebug('ERROR', e);
76
+ }).on('finished', function(obj) {
77
+ backupDebug('Finished - Total document revisions written:', obj.total);
78
+ });
79
+ } catch (err) {
80
+ error.terminationCallback(err);
81
+ }
@@ -24,33 +24,37 @@ const restoreBatchDebug = debug('couchbackup:restore:batch');
24
24
 
25
25
  restoreDebug.enabled = true;
26
26
 
27
- const program = parser.parseRestoreArgs();
28
- const databaseUrl = cliutils.databaseUrl(program.url, program.db);
29
- const opts = {
30
- bufferSize: program.bufferSize,
31
- parallelism: program.parallelism,
32
- requestTimeout: program.requestTimeout,
33
- iamApiKey: program.iamApiKey,
34
- iamTokenUrl: program.iamTokenUrl
35
- };
27
+ try {
28
+ const program = parser.parseRestoreArgs();
29
+ const databaseUrl = cliutils.databaseUrl(program.url, program.db);
30
+ const opts = {
31
+ bufferSize: program.bufferSize,
32
+ parallelism: program.parallelism,
33
+ requestTimeout: program.requestTimeout,
34
+ iamApiKey: program.iamApiKey,
35
+ iamTokenUrl: program.iamTokenUrl
36
+ };
36
37
 
37
- // log configuration to console
38
- console.error('='.repeat(80));
39
- console.error('Performing restore on ' + databaseUrl.replace(/\/\/.+@/g, '//****:****@') + ' using configuration:');
40
- console.error(JSON.stringify(opts, null, 2).replace(/"iamApiKey": "[^"]+"/, '"iamApiKey": "****"'));
41
- console.error('='.repeat(80));
38
+ // log configuration to console
39
+ console.error('='.repeat(80));
40
+ console.error('Performing restore on ' + databaseUrl.replace(/\/\/.+@/g, '//****:****@') + ' using configuration:');
41
+ console.error(JSON.stringify(opts, null, 2).replace(/"iamApiKey": "[^"]+"/, '"iamApiKey": "****"'));
42
+ console.error('='.repeat(80));
42
43
 
43
- restoreBatchDebug.enabled = !program.quiet;
44
+ restoreBatchDebug.enabled = !program.quiet;
44
45
 
45
- return couchbackup.restore(
46
- process.stdin, // restore from stdin
47
- databaseUrl,
48
- opts,
49
- error.terminationCallback
50
- ).on('restored', function(obj) {
51
- restoreBatchDebug('restored', obj.total);
52
- }).on('error', function(e) {
53
- restoreDebug('ERROR', e);
54
- }).on('finished', function(obj) {
55
- restoreDebug('finished', obj);
56
- });
46
+ return couchbackup.restore(
47
+ process.stdin, // restore from stdin
48
+ databaseUrl,
49
+ opts,
50
+ error.terminationCallback
51
+ ).on('restored', function(obj) {
52
+ restoreBatchDebug('restored', obj.total);
53
+ }).on('error', function(e) {
54
+ restoreDebug('ERROR', e);
55
+ }).on('finished', function(obj) {
56
+ restoreDebug('finished', obj);
57
+ });
58
+ } catch (err) {
59
+ error.terminationCallback(err);
60
+ }
@@ -20,6 +20,7 @@
20
20
  */
21
21
 
22
22
  const url = require('url');
23
+ const error = require('./error.js');
23
24
 
24
25
  module.exports = {
25
26
 
@@ -37,7 +38,11 @@ module.exports = {
37
38
  if (!root.endsWith('/')) {
38
39
  root = root + '/';
39
40
  }
40
- return new url.URL(encodeURIComponent(databaseName), root).toString();
41
+ try {
42
+ return new url.URL(encodeURIComponent(databaseName), root).toString();
43
+ } catch (err) {
44
+ throw error.wrapPossibleInvalidUrlError(err);
45
+ }
41
46
  },
42
47
 
43
48
  /**
@@ -24,7 +24,7 @@ function apiDefaults() {
24
24
  parallelism: 5,
25
25
  bufferSize: 500,
26
26
  requestTimeout: 120000,
27
- log: tmp.fileSync().name,
27
+ log: tmp.tmpNameSync(),
28
28
  resume: false,
29
29
  mode: 'full'
30
30
  };
package/includes/error.js CHANGED
@@ -90,10 +90,19 @@ function augmentMessage(err) {
90
90
  return err;
91
91
  }
92
92
 
93
+ function wrapPossibleInvalidUrlError(err) {
94
+ if (err.code === 'ERR_INVALID_URL') {
95
+ // Wrap ERR_INVALID_URL in our own InvalidOption
96
+ return new BackupError('InvalidOption', err.message);
97
+ }
98
+ return err;
99
+ }
100
+
93
101
  module.exports = {
94
- BackupError: BackupError,
95
- HTTPError: HTTPError,
96
- convertResponseError: convertResponseError,
102
+ BackupError,
103
+ HTTPError,
104
+ wrapPossibleInvalidUrlError,
105
+ convertResponseError,
97
106
  terminationCallback: function terminationCallback(err, data) {
98
107
  if (err) {
99
108
  console.error(`ERROR: ${err.message}`);
@@ -20,7 +20,7 @@ const path = require('path');
20
20
  const pkg = require('../package.json');
21
21
 
22
22
  function parseBackupArgs() {
23
- const program = require('commander');
23
+ const { program } = require('commander');
24
24
 
25
25
  // Option CLI defaults
26
26
  const defaults = config.cliDefaults();
@@ -84,7 +84,7 @@ function parseBackupArgs() {
84
84
  }
85
85
 
86
86
  function parseRestoreArgs() {
87
- const program = require('commander');
87
+ const { program } = require('commander');
88
88
 
89
89
  // Option CLI defaults
90
90
  const defaults = config.cliDefaults();
@@ -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,9 +1,12 @@
1
1
  {
2
2
  "name": "@cloudant/couchbackup",
3
- "version": "2.8.4-SNAPSHOT.115",
3
+ "version": "2.9.1-7.198",
4
4
  "description": "CouchBackup - command-line backup utility for Cloudant/CouchDB",
5
- "homepage": "https://github.com/cloudant/couchbackup",
6
- "repository": "https://github.com/cloudant/couchbackup.git",
5
+ "homepage": "https://github.com/IBM/couchbackup",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/IBM/couchbackup.git"
9
+ },
7
10
  "keywords": [
8
11
  "CouchDB",
9
12
  "Cloudant",
@@ -12,23 +15,24 @@
12
15
  "command-line"
13
16
  ],
14
17
  "bugs": {
15
- "url": "https://github.com/cloudant/couchbackup/issues",
18
+ "url": "https://github.com/IBM/couchbackup/issues",
16
19
  "email": "cldtsdks@us.ibm.com"
17
20
  },
18
21
  "license": "Apache-2.0",
19
22
  "engines": {
20
- "node": ">=14"
23
+ "node": "^18 || ^20"
21
24
  },
22
25
  "dependencies": {
23
- "@ibm-cloud/cloudant": "0.1.2",
24
- "async": "^3.1.0",
25
- "commander": "^9.0.0",
26
- "debug": "~4.3.2",
26
+ "@ibm-cloud/cloudant": "0.8.3",
27
+ "async": "3.2.5",
28
+ "commander": "12.0.0",
29
+ "debug": "4.3.4",
27
30
  "tmp": "0.2.1"
28
31
  },
29
32
  "peerDependencies": {
30
- "ibm-cloud-sdk-core": "^2.17.10",
31
- "retry-axios": "^2.6.0"
33
+ "ibm-cloud-sdk-core": "^4.1.4",
34
+ "retry-axios": "^2.6.0",
35
+ "axios": "^1.6.0"
32
36
  },
33
37
  "main": "app.js",
34
38
  "bin": {
@@ -36,23 +40,29 @@
36
40
  "couchrestore": "bin/couchrestore.bin.js"
37
41
  },
38
42
  "devDependencies": {
39
- "eslint": "^8.2.0",
40
- "eslint-config-semistandard": "^16.0.0",
41
- "eslint-config-standard": "^17.0.0",
42
- "eslint-plugin-header": "^3.0.0",
43
- "eslint-plugin-import": "^2.8.0",
44
- "eslint-plugin-node": "^11.0.0",
45
- "eslint-plugin-promise": "^6.0.0",
46
- "http-proxy": "^1.16.2",
47
- "mocha": "^9.2.0",
48
- "nock": "^13.2.1",
49
- "tail": "^2.0.0",
50
- "toxy": "^0.3.16",
51
- "uuid": "^8.3.2"
43
+ "eslint": "8.56.0",
44
+ "eslint-config-semistandard": "17.0.0",
45
+ "eslint-config-standard": "17.1.0",
46
+ "eslint-plugin-header": "3.1.1",
47
+ "eslint-plugin-import": "2.29.1",
48
+ "eslint-plugin-n": "15.7.0",
49
+ "eslint-plugin-node": "11.1.0",
50
+ "eslint-plugin-promise": "6.1.1",
51
+ "http-proxy": "1.18.1",
52
+ "mocha": "10.3.0",
53
+ "nock": "13.5.1",
54
+ "tail": "2.2.6",
55
+ "uuid": "9.0.1",
56
+ "lodash": "4.17.21"
52
57
  },
53
58
  "scripts": {
54
59
  "lint": "eslint --ignore-path .gitignore .",
55
60
  "unit": "mocha --grep \"#unit\"",
56
61
  "test": "npm run lint && npm run unit"
57
- }
62
+ },
63
+ "files": [
64
+ "/app.js",
65
+ "/bin",
66
+ "/includes"
67
+ ]
58
68
  }
package/.secrets.baseline DELETED
@@ -1,240 +0,0 @@
1
- {
2
- "exclude": {
3
- "files": "package-lock.json|test/fixtures|^.secrets.baseline$",
4
- "lines": null
5
- },
6
- "generated_at": "2022-04-22T01:56:11Z",
7
- "plugins_used": [
8
- {
9
- "name": "AWSKeyDetector"
10
- },
11
- {
12
- "name": "ArtifactoryDetector"
13
- },
14
- {
15
- "name": "AzureStorageKeyDetector"
16
- },
17
- {
18
- "base64_limit": 4.5,
19
- "name": "Base64HighEntropyString"
20
- },
21
- {
22
- "name": "BasicAuthDetector"
23
- },
24
- {
25
- "name": "BoxDetector"
26
- },
27
- {
28
- "name": "CloudantDetector"
29
- },
30
- {
31
- "ghe_instance": "github.ibm.com",
32
- "name": "GheDetector"
33
- },
34
- {
35
- "name": "GitHubTokenDetector"
36
- },
37
- {
38
- "hex_limit": 3,
39
- "name": "HexHighEntropyString"
40
- },
41
- {
42
- "name": "IbmCloudIamDetector"
43
- },
44
- {
45
- "name": "IbmCosHmacDetector"
46
- },
47
- {
48
- "name": "JwtTokenDetector"
49
- },
50
- {
51
- "keyword_exclude": null,
52
- "name": "KeywordDetector"
53
- },
54
- {
55
- "name": "MailchimpDetector"
56
- },
57
- {
58
- "name": "NpmDetector"
59
- },
60
- {
61
- "name": "PrivateKeyDetector"
62
- },
63
- {
64
- "name": "SlackDetector"
65
- },
66
- {
67
- "name": "SoftlayerDetector"
68
- },
69
- {
70
- "name": "SquareOAuthDetector"
71
- },
72
- {
73
- "name": "StripeDetector"
74
- },
75
- {
76
- "name": "TwilioKeyDetector"
77
- }
78
- ],
79
- "results": {
80
- "Jenkinsfile": [
81
- {
82
- "hashed_secret": "570e6c6e82c51d48f263e940a2b5281375733d54",
83
- "is_secret": false,
84
- "is_verified": false,
85
- "line_number": 66,
86
- "type": "Secret Keyword",
87
- "verified_result": null
88
- },
89
- {
90
- "hashed_secret": "8e494667a94be484abba2c4d4cf9bea0c3eb39ea",
91
- "is_secret": false,
92
- "is_verified": false,
93
- "line_number": 152,
94
- "type": "NPM tokens",
95
- "verified_result": null
96
- }
97
- ],
98
- "README.md": [
99
- {
100
- "hashed_secret": "91dfd9ddb4198affc5c194cd8ce6d338fde470e2",
101
- "is_secret": false,
102
- "is_verified": false,
103
- "line_number": 59,
104
- "type": "Basic Auth Credentials",
105
- "verified_result": null
106
- },
107
- {
108
- "hashed_secret": "644384d5a639cb5cacbf39f25dd4c7f77fc1b24d",
109
- "is_secret": false,
110
- "is_verified": false,
111
- "line_number": 71,
112
- "type": "Basic Auth Credentials",
113
- "verified_result": null
114
- }
115
- ],
116
- "examples/s3-backup-file.js": [
117
- {
118
- "hashed_secret": "9d4e1e23bd5b727046a9e3b4b7db57bd8d6ee684",
119
- "is_secret": false,
120
- "is_verified": false,
121
- "line_number": 39,
122
- "type": "Basic Auth Credentials",
123
- "verified_result": null
124
- }
125
- ],
126
- "examples/s3-backup-stream.js": [
127
- {
128
- "hashed_secret": "9d4e1e23bd5b727046a9e3b4b7db57bd8d6ee684",
129
- "is_secret": false,
130
- "is_verified": false,
131
- "line_number": 37,
132
- "type": "Basic Auth Credentials",
133
- "verified_result": null
134
- }
135
- ],
136
- "test/app.js": [
137
- {
138
- "hashed_secret": "6367c48dd193d56ea7b0baad25b19455e529f5ee",
139
- "is_secret": false,
140
- "is_verified": false,
141
- "line_number": 178,
142
- "type": "Secret Keyword",
143
- "verified_result": null
144
- },
145
- {
146
- "hashed_secret": "e9d71f5ee7c92d6dc9e92ffdad17b8bd49418f98",
147
- "is_secret": false,
148
- "is_verified": false,
149
- "line_number": 178,
150
- "type": "Basic Auth Credentials",
151
- "verified_result": null
152
- }
153
- ],
154
- "test/config.js": [
155
- {
156
- "hashed_secret": "9d4e1e23bd5b727046a9e3b4b7db57bd8d6ee684",
157
- "is_secret": false,
158
- "is_verified": false,
159
- "line_number": 34,
160
- "type": "Basic Auth Credentials",
161
- "verified_result": null
162
- }
163
- ],
164
- "test/fatalerrors.js": [
165
- {
166
- "hashed_secret": "3614298f2f841910a7ef47c6ea2af096bf838c08",
167
- "is_secret": false,
168
- "is_verified": false,
169
- "line_number": 33,
170
- "type": "Hex High Entropy String",
171
- "verified_result": null
172
- },
173
- {
174
- "hashed_secret": "aeca874db253d47d14de64ffbbf8f27bf3a65edb",
175
- "is_secret": false,
176
- "is_verified": false,
177
- "line_number": 33,
178
- "type": "Hex High Entropy String",
179
- "verified_result": null
180
- },
181
- {
182
- "hashed_secret": "e58f351f409b818d64f94d90b3db70224b0a624a",
183
- "is_secret": false,
184
- "is_verified": false,
185
- "line_number": 33,
186
- "type": "Hex High Entropy String",
187
- "verified_result": null
188
- },
189
- {
190
- "hashed_secret": "ec4e1dbc7f64a0e052e855036f9470e7881f06fd",
191
- "is_secret": false,
192
- "is_verified": false,
193
- "line_number": 192,
194
- "type": "Base64 High Entropy String",
195
- "verified_result": null
196
- }
197
- ],
198
- "test/parser.js": [
199
- {
200
- "hashed_secret": "b4bfddf3c247a5d30734dcf84b3c8d3c6aa1f36e",
201
- "is_secret": false,
202
- "is_verified": false,
203
- "line_number": 40,
204
- "type": "Secret Keyword",
205
- "verified_result": null
206
- },
207
- {
208
- "hashed_secret": "9d4e1e23bd5b727046a9e3b4b7db57bd8d6ee684",
209
- "is_secret": false,
210
- "is_verified": false,
211
- "line_number": 143,
212
- "type": "Basic Auth Credentials",
213
- "verified_result": null
214
- },
215
- {
216
- "hashed_secret": "e9d71f5ee7c92d6dc9e92ffdad17b8bd49418f98",
217
- "is_secret": false,
218
- "is_verified": false,
219
- "line_number": 305,
220
- "type": "Basic Auth Credentials",
221
- "verified_result": null
222
- }
223
- ],
224
- "test/request.js": [
225
- {
226
- "hashed_secret": "41a269ae4f24dab3ddf96b401f1ada5dfdfc5f08",
227
- "is_secret": false,
228
- "is_verified": false,
229
- "line_number": 226,
230
- "type": "Secret Keyword",
231
- "verified_result": null
232
- }
233
- ]
234
- },
235
- "version": "0.13.1+ibm.47.dss",
236
- "word_list": {
237
- "file": null,
238
- "hash": null
239
- }
240
- }
package/CHANGES.md DELETED
@@ -1,156 +0,0 @@
1
- # Unreleased
2
- - [NOTE] Updated minimum supported engine to Node.js 14 `fermium` LTS.
3
-
4
- # 2.8.3 (2022-04-05)
5
- - [UPGRADED] `@ibm-cloud/cloudant` dependency to version `0.1.1`.
6
- - [NOTE] Move `retry-axios` and `ibm-cloud-sdk-core` to peerDependencies.
7
-
8
- # 2.8.2 (2022-02-10)
9
- - [UPGRADED] `@ibm-cloud/cloudant` dependency to version `0.0.24`.
10
-
11
- # 2.8.1 (2021-12-02)
12
- - [FIXED] Regression from version 2.7 resulting in incorrect handling of percent-encoded credentials in the URL user-info.
13
-
14
- # 2.8.0 (2021-11-25)
15
- - [FIXED] Corrected `user-agent` header on requests.
16
- - [FIXED] Restore of shallow backups created with versions <=2.4.2.
17
- - [IMPROVED] Added quiet option to backup and restore to suppress batch messages.
18
- - [IMPROVED] Added a preflight check for restore function to make sure that a target database is new and empty.
19
- - [IMPROVED] Added handling for errors reading log file.
20
- - [IMPROVED] Split changes spooling to improve reliability on databases with
21
- millions of documents.
22
- - [UPGRADED] `@ibm-cloud/cloudant`, `commander` and `debug` dependencies.
23
-
24
- # 2.7.0 (2021-09-14)
25
- - [UPGRADED] Cloudant client dependency from `@cloudant/cloudant` to `@ibm-cloud/cloudant`.
26
-
27
- # 2.6.2 (2021-08-27)
28
- - [FIXED] `Invalid document ID: _bulk_get` error when using `@cloudant/cloudant`
29
- version `4.5.0`.
30
- - [UPGRADED] Upgraded `@cloudant/cloudant` dependency to version `4.5.0`.
31
- - [NOTE] Updated minimum supported engine to Node.js 12 `erbium` LTS.
32
-
33
- # 2.6.1 (2021-06-23)
34
- - [FIXED] Async queue pause/resume behaviour to avoid exhausting listener handles.
35
- - [UPGRADED] Upgraded `@cloudant/cloudant` dependency to version `4.4.0`.
36
-
37
- # 2.6.0 (2020-09-22)
38
- - [FIXED] Invalid parameters error when using shallow mode.
39
- - [UPGRADED] Upgraded `@cloudant/cloudant` dependency to version `4.3.0`.
40
- - [NOTE] Updated minimum supported engine to Node.js 10 `dubnium` LTS.
41
-
42
- # 2.5.2 (2020-03-02)
43
- - [FIXED] Issue with compatibility with Nano 8.2.0.
44
-
45
- # 2.5.1 (2019-12-06)
46
- - [FIXED] Issue with incorrect handling of percent-encoded user info characters
47
- via @cloudant/cloudant dependency.
48
- - [UPGRADED] Upgraded @cloudant/cloudant dependency to minimum version 4.2.3
49
- - [IMPROVED] Added documentation around encoding of characters in the user info
50
- subcomponent of the URL.
51
-
52
- # 2.5.0 (2019-10-24)
53
- - [UPGRADED] Upgraded @cloudant/cloudant dependency to version 4.2.2.
54
- - [NOTE] Updated minimum supported engine to Node.js 8 “Carbon” LTS.
55
-
56
- # 2.4.2 (2019-08-20)
57
-
58
- - [FIXED] Preserve document revisions in shallow backup.
59
- - [UPGRADED] Upgraded commander dependency to version 3.0.0.
60
-
61
- # 2.4.1 (2019-06-18)
62
-
63
- - [FIXED] Removed inadvertent npm-cli-login dependency.
64
- - [UPGRADED] Upgraded @cloudant/cloudant dependency to version 4.1.1.
65
- - [UPGRADED] Upgraded async dependency to version 3.0.1.
66
-
67
- # 2.4.0 (2019-03-15)
68
-
69
- - [NEW] Added request timeout option. Set via env var `COUCH_REQUEST_TIMEOUT`,
70
- as CLI option `--request-timeout`, or programmatically via
71
- `options.requestTimeout`.
72
- - [IMPROVED] Replaced usages of Node.js legacy URL API. Note this changes some
73
- URL validation error messages.
74
- - [IMPROVED] Documentation, help text and log warnings for invalid options in
75
- "shallow" mode.
76
- - [UPGRADED] Moved nodejs-cloudant dependency to 4.x.x.
77
-
78
- # 2.3.1 (2018-06-15)
79
-
80
- - [FIXED] Concurrent database backups use the same default log file.
81
- - [FIXED] IAM token URL override option.
82
-
83
- # 2.3.0 (2018-05-22)
84
-
85
- - [NEW] Check for database existence before starting backup. This provides for
86
- better error messages for existence, authentication, and `_bulk_get` problems.
87
- - [FIXED] Intermittent issues with multiple callbacks, particularly noticeable
88
- when using Node.js 10.
89
- - [FIXED] Issue where a success message could confusingly be output after a
90
- fatal error.
91
- - [UPGRADED] Increased nodejs-cloudant dependency minimum to 2.2.x.
92
-
93
- # 2.2.0 (2018-03-06)
94
-
95
- - [FIXED] An issue where the `_changes` response stream doesn't get correctly
96
- decompressed.
97
- - [FIXED] Prevent duplicate execution of backup error callbacks.
98
- - [NOTE] Update engines in preparation for Node.js 4 “Argon” end-of-life.
99
-
100
- # 2.1.0 (2018-02-20)
101
-
102
- - [NEW] Added API for upcoming IBM Cloud Identity and Access Management support
103
- for Cloudant on IBM Cloud. Note: IAM API key support is not yet enabled in the
104
- service.
105
- - [IMPROVED] Enhanced resilience of backup and restore processes by enabling the
106
- nodejs-cloudant retry plugin.
107
- - [IMPROVED] Added URL validation for presence of host and database elements.
108
- - [UPGRADED] Increased nodejs-cloudant dependency to 2.x.
109
-
110
- # 2.0.1 (2018-01-11)
111
-
112
- - [NEW] Changed to use nodejs-cloudant for database requests.
113
- - [IMPROVED] Added compression to restore process requests.
114
- - [FIXED] An unhandled `readstream.destroy is not a function` error when trying
115
- to terminate a restore process that encountered an error.
116
- - [UPGRADED] Increased debug dependency to 3.0.x.
117
-
118
- # 2.0.0 (2017-07-04)
119
-
120
- - [NEW] Moved to https://github.com/cloudant/couchbackup repository.
121
- - [NEW] Validate backup/restore options.
122
- - [NEW] Add User-Agent header to all requests.
123
- - [NEW] Added unique CLI exit codes for known error conditions.
124
- - [NEW] API for using as library that is more Node.js-like.
125
- - [NEW] Added `changes` event for each batch spooled from the changes feed.
126
- - [BREAKING CHANGE] The --buffer option is now --buffer-size.
127
- - [BREAKING CHANGE] The `writeerror` event is now just `error`.
128
- - [BREAKING CHANGE] The `writecomplete` event is now `finished`.
129
- - [BREAKING CHANGE] For restoring, the `written` event is now `restored`.
130
- - [REMOVED] Removed legacy 1.x API.
131
- - [IMPROVED] Verify database supports `/_bulk_get` endpoint prior to running backup.
132
- - [IMPROVED] Existence of the restore destination database is checked before
133
- starting the restore process.
134
- - [IMPROVED] Added compression for backup HTTP responses, where supported by the
135
- server.
136
- - [IMPROVED] Added HTTP persistent connection pools corresponding to the backup
137
- parallelism.
138
- - [IMPROVED] Better error handling in couchrestore when remote database
139
- cannot be written to.
140
- - [IMPROVED] Validate HTTP responses when restoring a database.
141
- - [IMPROVED] Aborts backup and restore processes for known irrecoverable errors.
142
- - [IMPROVED] Retry restore batches on transient errors.
143
- - [FIXED] An issue where the process could exit before the backup content was
144
- completely flushed to the destination stream.
145
- - [FIXED] An issue where back pressure on the output stream was ignored
146
- potentially resulting in the backup process running out of memory.
147
- - [FIXED] An issue where the log entry could be written for a batch before the
148
- batch was written to the backup file.
149
- - [FIXED] An issue where a restore of a resumed backup might not complete due to
150
- incomplete JSON entries in the backup file.
151
- - [FIXED] An issue where an empty batch could be written to the backup file.
152
- - [FIXED] An issue where the restore-time buffer size was ignored.
153
- - [FIXED] Ensure body 'rows' key exists before performing shallow backup.
154
- - [FIXED] An issue where write errors were not correctly reported.
155
- - [FIXED] An issue where couchbackup would attempt to write to an
156
- invalid output file.