Socket
Socket
Sign inDemoInstall

@cloudant/couchbackup

Package Overview
Dependencies
Maintainers
6
Versions
479
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cloudant/couchbackup - npm Package Compare versions

Comparing version 2.10.1-SNAPSHOT-209 to 2.10.1-SNAPSHOT-210

4

app.js

@@ -246,7 +246,7 @@ // Copyright © 2017, 2024 IBM Corp. All rights reserved.

const response = await dbClient.service.getDatabaseInformation({ db: dbClient.dbName });
const { doc_count: docCount, doc_del_count: deletedDocCount } = response.result;
const { docCount, docDelCount } = response.result;
// The system databases can have a validation ddoc(s) injected in them on creation.
// This sets the doc count off, so we just complitely exclude the system databases from this check.
// The assumption here is that users restoring system databases know what they are doing.
if (!dbClient.dbName.startsWith('_') && (docCount !== 0 || deletedDocCount !== 0)) {
if (!dbClient.dbName.startsWith('_') && (docCount !== 0 || docDelCount !== 0)) {
throw new BackupError('DatabaseNotEmpty', `Target database ${dbClient.url}${dbClient.dbName} is not empty. A target database must be a new and empty database.`);

@@ -253,0 +253,0 @@ }

@@ -114,6 +114,6 @@ // Copyright © 2017, 2023 IBM Corp. All rights reserved.

mappingDebug(`Restoring batch ${batch} with ${restoreBatch.docs.length} docs.`);
// if we are restoring known revisions, we need to supply new_edits=false
// if we are restoring known revisions, we need to supply newEdits=false
if (restoreBatch.docs[0] && restoreBatch.docs[0]._rev) {
restoreBatch.new_edits = false;
mappingDebug('Using new_edits false mode.');
restoreBatch.newEdits = false;
mappingDebug('Using newEdits false mode.');
}

@@ -125,5 +125,5 @@ try {

});
if (!response.result || (restoreBatch.new_edits === false && response.result.length > 0)) {
if (!response.result || (restoreBatch.newEdits === false && response.result.length > 0)) {
mappingDebug(`Some errors restoring batch ${batch}.`);
throw new Error(`Error writing batch ${batch} with new_edits:${restoreBatch.new_edits !== false}` +
throw new Error(`Error writing batch ${batch} with newEdits:${restoreBatch.newEdits !== false}` +
` and ${response.result ? response.result.length : 'unavailable'} items`);

@@ -130,0 +130,0 @@ }

{
"name": "@cloudant/couchbackup",
"version": "2.10.1-SNAPSHOT-209",
"version": "2.10.1-SNAPSHOT-210",
"description": "CouchBackup - command-line backup utility for Cloudant/CouchDB",

@@ -26,3 +26,3 @@ "homepage": "https://github.com/IBM/couchbackup",

"dependencies": {
"@ibm-cloud/cloudant": "0.8.3",
"@ibm-cloud/cloudant": "0.9.0",
"commander": "12.0.0",

@@ -29,0 +29,0 @@ "debug": "4.3.4"

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc