@cloudant/couchbackup 2.9.0 → 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 +2 -4
- package/app.js +1 -5
- package/bin/couchbackup.bin.js +46 -42
- package/bin/couchrestore.bin.js +31 -27
- package/includes/cliutils.js +6 -1
- package/includes/config.js +1 -1
- package/includes/error.js +12 -3
- package/includes/parser.js +2 -2
- package/includes/request.js +3 -15
- package/package.json +35 -25
- package/.secrets.baseline +0 -240
- package/CHANGES.md +0 -157
package/README.md
CHANGED
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@cloudant/couchbackup)
|
|
4
4
|
[](https://www.npmjs.com/package/@cloudant/couchbackup)
|
|
5
|
-
[](https://travis-ci.org/cloudant/couchbackup)
|
|
6
|
-
[](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
|
-
*
|
|
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
|
|
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
|
|
package/bin/couchbackup.bin.js
CHANGED
|
@@ -25,53 +25,57 @@ const backupBatchDebug = debug('couchbackup:backup:batch');
|
|
|
25
25
|
|
|
26
26
|
backupDebug.enabled = true;
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
try {
|
|
29
|
+
const program = parser.parseBackupArgs();
|
|
30
|
+
const databaseUrl = cliutils.databaseUrl(program.url, program.db);
|
|
29
31
|
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
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
|
-
|
|
55
|
-
|
|
56
|
-
|
|
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
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
).on('changes', function(batch) {
|
|
70
|
-
|
|
71
|
-
}).on('written', function(obj) {
|
|
72
|
-
|
|
73
|
-
}).on('error', function(e) {
|
|
74
|
-
|
|
75
|
-
}).on('finished', function(obj) {
|
|
76
|
-
|
|
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
|
+
}
|
package/bin/couchrestore.bin.js
CHANGED
|
@@ -24,33 +24,37 @@ const restoreBatchDebug = debug('couchbackup:restore:batch');
|
|
|
24
24
|
|
|
25
25
|
restoreDebug.enabled = true;
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
const
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
).on('restored', function(obj) {
|
|
51
|
-
|
|
52
|
-
}).on('error', function(e) {
|
|
53
|
-
|
|
54
|
-
}).on('finished', function(obj) {
|
|
55
|
-
|
|
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
|
+
}
|
package/includes/cliutils.js
CHANGED
|
@@ -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
|
-
|
|
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
|
/**
|
package/includes/config.js
CHANGED
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
|
|
95
|
-
HTTPError
|
|
96
|
-
|
|
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}`);
|
package/includes/parser.js
CHANGED
|
@@ -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();
|
package/includes/request.js
CHANGED
|
@@ -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.
|
|
114
|
-
const dbName = url.pathname.
|
|
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
|
-
|
|
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.9.
|
|
3
|
+
"version": "2.9.1-7.198",
|
|
4
4
|
"description": "CouchBackup - command-line backup utility for Cloudant/CouchDB",
|
|
5
|
-
"homepage": "https://github.com/
|
|
6
|
-
"repository":
|
|
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/
|
|
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": "
|
|
23
|
+
"node": "^18 || ^20"
|
|
21
24
|
},
|
|
22
25
|
"dependencies": {
|
|
23
|
-
"@ibm-cloud/cloudant": "0.
|
|
24
|
-
"async": "
|
|
25
|
-
"commander": "
|
|
26
|
-
"debug": "
|
|
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": "^
|
|
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": "
|
|
40
|
-
"eslint-config-semistandard": "
|
|
41
|
-
"eslint-config-standard": "
|
|
42
|
-
"eslint-plugin-header": "
|
|
43
|
-
"eslint-plugin-import": "
|
|
44
|
-
"eslint-plugin-
|
|
45
|
-
"eslint-plugin-
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"uuid": "
|
|
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,157 +0,0 @@
|
|
|
1
|
-
# 2.9.0 (2022-05-09)
|
|
2
|
-
- [UPGRADED] `@ibm-cloud/cloudant` dependency to version `0.1.2`.
|
|
3
|
-
- [NOTE] Updated minimum supported engine to Node.js 14 `fermium` LTS.
|
|
4
|
-
|
|
5
|
-
# 2.8.3 (2022-04-05)
|
|
6
|
-
- [UPGRADED] `@ibm-cloud/cloudant` dependency to version `0.1.1`.
|
|
7
|
-
- [NOTE] Move `retry-axios` and `ibm-cloud-sdk-core` to peerDependencies.
|
|
8
|
-
|
|
9
|
-
# 2.8.2 (2022-02-10)
|
|
10
|
-
- [UPGRADED] `@ibm-cloud/cloudant` dependency to version `0.0.24`.
|
|
11
|
-
|
|
12
|
-
# 2.8.1 (2021-12-02)
|
|
13
|
-
- [FIXED] Regression from version 2.7 resulting in incorrect handling of percent-encoded credentials in the URL user-info.
|
|
14
|
-
|
|
15
|
-
# 2.8.0 (2021-11-25)
|
|
16
|
-
- [FIXED] Corrected `user-agent` header on requests.
|
|
17
|
-
- [FIXED] Restore of shallow backups created with versions <=2.4.2.
|
|
18
|
-
- [IMPROVED] Added quiet option to backup and restore to suppress batch messages.
|
|
19
|
-
- [IMPROVED] Added a preflight check for restore function to make sure that a target database is new and empty.
|
|
20
|
-
- [IMPROVED] Added handling for errors reading log file.
|
|
21
|
-
- [IMPROVED] Split changes spooling to improve reliability on databases with
|
|
22
|
-
millions of documents.
|
|
23
|
-
- [UPGRADED] `@ibm-cloud/cloudant`, `commander` and `debug` dependencies.
|
|
24
|
-
|
|
25
|
-
# 2.7.0 (2021-09-14)
|
|
26
|
-
- [UPGRADED] Cloudant client dependency from `@cloudant/cloudant` to `@ibm-cloud/cloudant`.
|
|
27
|
-
|
|
28
|
-
# 2.6.2 (2021-08-27)
|
|
29
|
-
- [FIXED] `Invalid document ID: _bulk_get` error when using `@cloudant/cloudant`
|
|
30
|
-
version `4.5.0`.
|
|
31
|
-
- [UPGRADED] Upgraded `@cloudant/cloudant` dependency to version `4.5.0`.
|
|
32
|
-
- [NOTE] Updated minimum supported engine to Node.js 12 `erbium` LTS.
|
|
33
|
-
|
|
34
|
-
# 2.6.1 (2021-06-23)
|
|
35
|
-
- [FIXED] Async queue pause/resume behaviour to avoid exhausting listener handles.
|
|
36
|
-
- [UPGRADED] Upgraded `@cloudant/cloudant` dependency to version `4.4.0`.
|
|
37
|
-
|
|
38
|
-
# 2.6.0 (2020-09-22)
|
|
39
|
-
- [FIXED] Invalid parameters error when using shallow mode.
|
|
40
|
-
- [UPGRADED] Upgraded `@cloudant/cloudant` dependency to version `4.3.0`.
|
|
41
|
-
- [NOTE] Updated minimum supported engine to Node.js 10 `dubnium` LTS.
|
|
42
|
-
|
|
43
|
-
# 2.5.2 (2020-03-02)
|
|
44
|
-
- [FIXED] Issue with compatibility with Nano 8.2.0.
|
|
45
|
-
|
|
46
|
-
# 2.5.1 (2019-12-06)
|
|
47
|
-
- [FIXED] Issue with incorrect handling of percent-encoded user info characters
|
|
48
|
-
via @cloudant/cloudant dependency.
|
|
49
|
-
- [UPGRADED] Upgraded @cloudant/cloudant dependency to minimum version 4.2.3
|
|
50
|
-
- [IMPROVED] Added documentation around encoding of characters in the user info
|
|
51
|
-
subcomponent of the URL.
|
|
52
|
-
|
|
53
|
-
# 2.5.0 (2019-10-24)
|
|
54
|
-
- [UPGRADED] Upgraded @cloudant/cloudant dependency to version 4.2.2.
|
|
55
|
-
- [NOTE] Updated minimum supported engine to Node.js 8 “Carbon” LTS.
|
|
56
|
-
|
|
57
|
-
# 2.4.2 (2019-08-20)
|
|
58
|
-
|
|
59
|
-
- [FIXED] Preserve document revisions in shallow backup.
|
|
60
|
-
- [UPGRADED] Upgraded commander dependency to version 3.0.0.
|
|
61
|
-
|
|
62
|
-
# 2.4.1 (2019-06-18)
|
|
63
|
-
|
|
64
|
-
- [FIXED] Removed inadvertent npm-cli-login dependency.
|
|
65
|
-
- [UPGRADED] Upgraded @cloudant/cloudant dependency to version 4.1.1.
|
|
66
|
-
- [UPGRADED] Upgraded async dependency to version 3.0.1.
|
|
67
|
-
|
|
68
|
-
# 2.4.0 (2019-03-15)
|
|
69
|
-
|
|
70
|
-
- [NEW] Added request timeout option. Set via env var `COUCH_REQUEST_TIMEOUT`,
|
|
71
|
-
as CLI option `--request-timeout`, or programmatically via
|
|
72
|
-
`options.requestTimeout`.
|
|
73
|
-
- [IMPROVED] Replaced usages of Node.js legacy URL API. Note this changes some
|
|
74
|
-
URL validation error messages.
|
|
75
|
-
- [IMPROVED] Documentation, help text and log warnings for invalid options in
|
|
76
|
-
"shallow" mode.
|
|
77
|
-
- [UPGRADED] Moved nodejs-cloudant dependency to 4.x.x.
|
|
78
|
-
|
|
79
|
-
# 2.3.1 (2018-06-15)
|
|
80
|
-
|
|
81
|
-
- [FIXED] Concurrent database backups use the same default log file.
|
|
82
|
-
- [FIXED] IAM token URL override option.
|
|
83
|
-
|
|
84
|
-
# 2.3.0 (2018-05-22)
|
|
85
|
-
|
|
86
|
-
- [NEW] Check for database existence before starting backup. This provides for
|
|
87
|
-
better error messages for existence, authentication, and `_bulk_get` problems.
|
|
88
|
-
- [FIXED] Intermittent issues with multiple callbacks, particularly noticeable
|
|
89
|
-
when using Node.js 10.
|
|
90
|
-
- [FIXED] Issue where a success message could confusingly be output after a
|
|
91
|
-
fatal error.
|
|
92
|
-
- [UPGRADED] Increased nodejs-cloudant dependency minimum to 2.2.x.
|
|
93
|
-
|
|
94
|
-
# 2.2.0 (2018-03-06)
|
|
95
|
-
|
|
96
|
-
- [FIXED] An issue where the `_changes` response stream doesn't get correctly
|
|
97
|
-
decompressed.
|
|
98
|
-
- [FIXED] Prevent duplicate execution of backup error callbacks.
|
|
99
|
-
- [NOTE] Update engines in preparation for Node.js 4 “Argon” end-of-life.
|
|
100
|
-
|
|
101
|
-
# 2.1.0 (2018-02-20)
|
|
102
|
-
|
|
103
|
-
- [NEW] Added API for upcoming IBM Cloud Identity and Access Management support
|
|
104
|
-
for Cloudant on IBM Cloud. Note: IAM API key support is not yet enabled in the
|
|
105
|
-
service.
|
|
106
|
-
- [IMPROVED] Enhanced resilience of backup and restore processes by enabling the
|
|
107
|
-
nodejs-cloudant retry plugin.
|
|
108
|
-
- [IMPROVED] Added URL validation for presence of host and database elements.
|
|
109
|
-
- [UPGRADED] Increased nodejs-cloudant dependency to 2.x.
|
|
110
|
-
|
|
111
|
-
# 2.0.1 (2018-01-11)
|
|
112
|
-
|
|
113
|
-
- [NEW] Changed to use nodejs-cloudant for database requests.
|
|
114
|
-
- [IMPROVED] Added compression to restore process requests.
|
|
115
|
-
- [FIXED] An unhandled `readstream.destroy is not a function` error when trying
|
|
116
|
-
to terminate a restore process that encountered an error.
|
|
117
|
-
- [UPGRADED] Increased debug dependency to 3.0.x.
|
|
118
|
-
|
|
119
|
-
# 2.0.0 (2017-07-04)
|
|
120
|
-
|
|
121
|
-
- [NEW] Moved to https://github.com/cloudant/couchbackup repository.
|
|
122
|
-
- [NEW] Validate backup/restore options.
|
|
123
|
-
- [NEW] Add User-Agent header to all requests.
|
|
124
|
-
- [NEW] Added unique CLI exit codes for known error conditions.
|
|
125
|
-
- [NEW] API for using as library that is more Node.js-like.
|
|
126
|
-
- [NEW] Added `changes` event for each batch spooled from the changes feed.
|
|
127
|
-
- [BREAKING CHANGE] The --buffer option is now --buffer-size.
|
|
128
|
-
- [BREAKING CHANGE] The `writeerror` event is now just `error`.
|
|
129
|
-
- [BREAKING CHANGE] The `writecomplete` event is now `finished`.
|
|
130
|
-
- [BREAKING CHANGE] For restoring, the `written` event is now `restored`.
|
|
131
|
-
- [REMOVED] Removed legacy 1.x API.
|
|
132
|
-
- [IMPROVED] Verify database supports `/_bulk_get` endpoint prior to running backup.
|
|
133
|
-
- [IMPROVED] Existence of the restore destination database is checked before
|
|
134
|
-
starting the restore process.
|
|
135
|
-
- [IMPROVED] Added compression for backup HTTP responses, where supported by the
|
|
136
|
-
server.
|
|
137
|
-
- [IMPROVED] Added HTTP persistent connection pools corresponding to the backup
|
|
138
|
-
parallelism.
|
|
139
|
-
- [IMPROVED] Better error handling in couchrestore when remote database
|
|
140
|
-
cannot be written to.
|
|
141
|
-
- [IMPROVED] Validate HTTP responses when restoring a database.
|
|
142
|
-
- [IMPROVED] Aborts backup and restore processes for known irrecoverable errors.
|
|
143
|
-
- [IMPROVED] Retry restore batches on transient errors.
|
|
144
|
-
- [FIXED] An issue where the process could exit before the backup content was
|
|
145
|
-
completely flushed to the destination stream.
|
|
146
|
-
- [FIXED] An issue where back pressure on the output stream was ignored
|
|
147
|
-
potentially resulting in the backup process running out of memory.
|
|
148
|
-
- [FIXED] An issue where the log entry could be written for a batch before the
|
|
149
|
-
batch was written to the backup file.
|
|
150
|
-
- [FIXED] An issue where a restore of a resumed backup might not complete due to
|
|
151
|
-
incomplete JSON entries in the backup file.
|
|
152
|
-
- [FIXED] An issue where an empty batch could be written to the backup file.
|
|
153
|
-
- [FIXED] An issue where the restore-time buffer size was ignored.
|
|
154
|
-
- [FIXED] Ensure body 'rows' key exists before performing shallow backup.
|
|
155
|
-
- [FIXED] An issue where write errors were not correctly reported.
|
|
156
|
-
- [FIXED] An issue where couchbackup would attempt to write to an
|
|
157
|
-
invalid output file.
|