@cloudant/couchbackup 2.11.1 → 2.11.2-283
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/app.js +0 -1
- package/bin/couchbackup.bin.js +1 -2
- package/bin/couchrestore.bin.js +1 -2
- package/includes/allDocsGenerator.js +0 -1
- package/includes/attachmentMappings.js +0 -1
- package/includes/backup.js +1 -2
- package/includes/backupMappings.js +1 -2
- package/includes/cliutils.js +0 -1
- package/includes/config.js +0 -1
- package/includes/error.js +0 -1
- package/includes/liner.js +0 -1
- package/includes/logfilegetbatches.js +0 -1
- package/includes/logfilesummary.js +0 -1
- package/includes/parser.js +2 -1
- package/includes/request.js +0 -1
- package/includes/restore.js +0 -1
- package/includes/restoreMappings.js +1 -2
- package/includes/spoolchanges.js +0 -1
- package/includes/transforms.js +0 -1
- package/package.json +9 -13
package/app.js
CHANGED
package/bin/couchbackup.bin.js
CHANGED
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
13
|
// See the License for the specific language governing permissions and
|
|
14
14
|
// limitations under the License.
|
|
15
|
-
'use strict';
|
|
16
15
|
|
|
17
16
|
const error = require('../includes/error.js');
|
|
18
17
|
const fs = require('fs');
|
|
@@ -63,7 +62,7 @@ try {
|
|
|
63
62
|
|
|
64
63
|
backupDebug('Fetching all database changes...');
|
|
65
64
|
|
|
66
|
-
|
|
65
|
+
couchbackup.backup(
|
|
67
66
|
databaseUrl,
|
|
68
67
|
ws,
|
|
69
68
|
opts,
|
package/bin/couchrestore.bin.js
CHANGED
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
13
|
// See the License for the specific language governing permissions and
|
|
14
14
|
// limitations under the License.
|
|
15
|
-
'use strict';
|
|
16
15
|
|
|
17
16
|
const error = require('../includes/error.js');
|
|
18
17
|
const cliutils = require('../includes/cliutils.js');
|
|
@@ -44,7 +43,7 @@ try {
|
|
|
44
43
|
|
|
45
44
|
restoreBatchDebug.enabled = !program.quiet;
|
|
46
45
|
|
|
47
|
-
|
|
46
|
+
couchbackup.restore(
|
|
48
47
|
process.stdin, // restore from stdin
|
|
49
48
|
databaseUrl,
|
|
50
49
|
opts,
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
12
|
// See the License for the specific language governing permissions and
|
|
13
13
|
// limitations under the License.
|
|
14
|
-
'use strict';
|
|
15
14
|
|
|
16
15
|
const debug = require('debug')('couchbackup:alldocsgenerator');
|
|
17
16
|
const { BackupError } = require('./error.js');
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
12
|
// See the License for the specific language governing permissions and
|
|
13
13
|
// limitations under the License.
|
|
14
|
-
'use strict';
|
|
15
14
|
|
|
16
15
|
const debug = require('debug');
|
|
17
16
|
const mappingDebug = debug('couchbackup:mappings');
|
package/includes/backup.js
CHANGED
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
12
|
// See the License for the specific language governing permissions and
|
|
13
13
|
// limitations under the License.
|
|
14
|
-
'use strict';
|
|
15
14
|
|
|
16
15
|
const { createWriteStream } = require('node:fs');
|
|
17
16
|
const { pipeline } = require('node:stream/promises');
|
|
@@ -58,7 +57,7 @@ module.exports = function(dbClient, options, targetStream, ee) {
|
|
|
58
57
|
// Full backups use _bulk_get, validate it is available, shallow skips that check
|
|
59
58
|
return (options.mode === 'full' ? validateBulkGetSupport(dbClient) : Promise.resolve())
|
|
60
59
|
// Check if the backup is new or resuming and configure the source
|
|
61
|
-
.then(async() => {
|
|
60
|
+
.then(async () => {
|
|
62
61
|
if (options.mode === 'shallow') {
|
|
63
62
|
// shallow backup, start from async _all_docs generator
|
|
64
63
|
return [
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
12
|
// See the License for the specific language governing permissions and
|
|
13
13
|
// limitations under the License.
|
|
14
|
-
'use strict';
|
|
15
14
|
|
|
16
15
|
const debug = require('debug');
|
|
17
16
|
|
|
@@ -205,7 +204,7 @@ class Backup {
|
|
|
205
204
|
* @param {object} backupBatch {command: t, batch: #, docs: [{id: id}, ...]}
|
|
206
205
|
* @returns {object} a backup batch object {command: d, batch: #, docs: [{_id: id, ...}, ...]}
|
|
207
206
|
*/
|
|
208
|
-
pendingToFetched = async(backupBatch) => {
|
|
207
|
+
pendingToFetched = async (backupBatch) => {
|
|
209
208
|
mappingDebug(`Fetching batch ${backupBatch.batch}.`);
|
|
210
209
|
try {
|
|
211
210
|
const bulkGetOpts = {
|
package/includes/cliutils.js
CHANGED
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
12
|
// See the License for the specific language governing permissions and
|
|
13
13
|
// limitations under the License.
|
|
14
|
-
'use strict';
|
|
15
14
|
|
|
16
15
|
/**
|
|
17
16
|
* Utility methods for the command line interface.
|
package/includes/config.js
CHANGED
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
12
|
// See the License for the specific language governing permissions and
|
|
13
13
|
// limitations under the License.
|
|
14
|
-
'use strict';
|
|
15
14
|
|
|
16
15
|
const { mkdtempSync } = require('node:fs');
|
|
17
16
|
const { tmpdir } = require('node:os');
|
package/includes/error.js
CHANGED
package/includes/liner.js
CHANGED
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
12
|
// See the License for the specific language governing permissions and
|
|
13
13
|
// limitations under the License.
|
|
14
|
-
'use strict';
|
|
15
14
|
|
|
16
15
|
const { createInterface } = require('node:readline');
|
|
17
16
|
const { PassThrough, Duplex } = require('node:stream');
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
12
|
// See the License for the specific language governing permissions and
|
|
13
13
|
// limitations under the License.
|
|
14
|
-
'use strict';
|
|
15
14
|
|
|
16
15
|
const fs = require('node:fs');
|
|
17
16
|
const { LogMapper } = require('./backupMappings.js');
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
12
|
// See the License for the specific language governing permissions and
|
|
13
13
|
// limitations under the License.
|
|
14
|
-
'use strict';
|
|
15
14
|
|
|
16
15
|
const { createReadStream } = require('node:fs');
|
|
17
16
|
const { Writable } = require('node:stream');
|
package/includes/parser.js
CHANGED
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
12
|
// See the License for the specific language governing permissions and
|
|
13
13
|
// limitations under the License.
|
|
14
|
-
'use strict';
|
|
15
14
|
|
|
16
15
|
const cliutils = require('./cliutils.js');
|
|
17
16
|
const config = require('./config.js');
|
|
@@ -63,6 +62,7 @@ function parseBackupArgs() {
|
|
|
63
62
|
Number)
|
|
64
63
|
.option('-u, --url <url>',
|
|
65
64
|
cliutils.getUsage('URL of the CouchDB/Cloudant server', defaults.url))
|
|
65
|
+
.allowExcessArguments()
|
|
66
66
|
.parse(process.argv);
|
|
67
67
|
|
|
68
68
|
// Remove defaults that don't apply when using shallow mode
|
|
@@ -118,6 +118,7 @@ function parseRestoreArgs() {
|
|
|
118
118
|
Number)
|
|
119
119
|
.option('-u, --url <url>',
|
|
120
120
|
cliutils.getUsage('URL of the CouchDB/Cloudant server', defaults.url))
|
|
121
|
+
.allowExcessArguments()
|
|
121
122
|
.parse(process.argv);
|
|
122
123
|
|
|
123
124
|
// Apply the options in order so that the CLI overrides env vars and env variables
|
package/includes/request.js
CHANGED
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
12
|
// See the License for the specific language governing permissions and
|
|
13
13
|
// limitations under the License.
|
|
14
|
-
'use strict';
|
|
15
14
|
|
|
16
15
|
const pkg = require('../package.json');
|
|
17
16
|
const { CloudantV1, CouchdbSessionAuthenticator } = require('@ibm-cloud/cloudant');
|
package/includes/restore.js
CHANGED
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
12
|
// See the License for the specific language governing permissions and
|
|
13
13
|
// limitations under the License.
|
|
14
|
-
'use strict';
|
|
15
14
|
|
|
16
15
|
const debug = require('debug')('couchbackup:restore');
|
|
17
16
|
const { Attachments } = require('./attachmentMappings.js');
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
12
|
// See the License for the specific language governing permissions and
|
|
13
13
|
// limitations under the License.
|
|
14
|
-
'use strict';
|
|
15
14
|
|
|
16
15
|
const { BackupError } = require('./error.js');
|
|
17
16
|
const debug = require('debug');
|
|
@@ -111,7 +110,7 @@ class Restore {
|
|
|
111
110
|
* @param {object} restoreBatch a pending restore batch {batch: #, docs: [{_id: id, ...}, ...]}
|
|
112
111
|
* @returns {object} a restored batch object { batch: #, documents: #}
|
|
113
112
|
*/
|
|
114
|
-
pendingToRestored = async(restoreBatch) => {
|
|
113
|
+
pendingToRestored = async (restoreBatch) => {
|
|
115
114
|
// Save the batch number
|
|
116
115
|
const batch = restoreBatch.batch;
|
|
117
116
|
mappingDebug(`Preparing to restore ${batch}`);
|
package/includes/spoolchanges.js
CHANGED
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
12
|
// See the License for the specific language governing permissions and
|
|
13
13
|
// limitations under the License.
|
|
14
|
-
'use strict';
|
|
15
14
|
|
|
16
15
|
const { createWriteStream } = require('node:fs');
|
|
17
16
|
const { pipeline } = require('node:stream/promises');
|
package/includes/transforms.js
CHANGED
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
12
|
// See the License for the specific language governing permissions and
|
|
13
13
|
// limitations under the License.
|
|
14
|
-
'use strict';
|
|
15
14
|
|
|
16
15
|
const { Duplex, PassThrough, Writable, getDefaultHighWaterMark, setDefaultHighWaterMark } = require('node:stream');
|
|
17
16
|
const debug = require('debug');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudant/couchbackup",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.2-283",
|
|
4
4
|
"description": "CouchBackup - command-line backup utility for Cloudant/CouchDB",
|
|
5
5
|
"homepage": "https://github.com/IBM/couchbackup",
|
|
6
6
|
"repository": {
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
"node": "^18 || ^20 || ^22"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@ibm-cloud/cloudant": "0.
|
|
27
|
-
"commander": "
|
|
28
|
-
"debug": "4.
|
|
26
|
+
"@ibm-cloud/cloudant": "0.12.0",
|
|
27
|
+
"commander": "13.0.0",
|
|
28
|
+
"debug": "4.4.0"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
31
|
"ibm-cloud-sdk-core": "^5.0.2",
|
|
@@ -37,22 +37,18 @@
|
|
|
37
37
|
"couchrestore": "bin/couchrestore.bin.js"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"eslint": "
|
|
41
|
-
"eslint-config-semistandard": "17.0.0",
|
|
42
|
-
"eslint-config-standard": "17.1.0",
|
|
40
|
+
"eslint": "9.18.0",
|
|
43
41
|
"eslint-plugin-header": "3.1.1",
|
|
44
42
|
"eslint-plugin-import": "2.31.0",
|
|
45
|
-
"eslint-plugin-n": "15.7.0",
|
|
46
|
-
"eslint-plugin-node": "11.1.0",
|
|
47
|
-
"eslint-plugin-promise": "6.6.0",
|
|
48
43
|
"http-proxy": "1.18.1",
|
|
49
|
-
"mocha": "
|
|
44
|
+
"mocha": "11.0.1",
|
|
45
|
+
"neostandard": "0.12.0",
|
|
50
46
|
"nock": "13.5.6",
|
|
51
47
|
"tail": "2.2.6",
|
|
52
|
-
"uuid": "11.0.
|
|
48
|
+
"uuid": "11.0.5"
|
|
53
49
|
},
|
|
54
50
|
"scripts": {
|
|
55
|
-
"lint": "eslint
|
|
51
|
+
"lint": "eslint .",
|
|
56
52
|
"unit": "mocha --grep \"#unit\"",
|
|
57
53
|
"test": "npm run lint && npm run unit"
|
|
58
54
|
},
|