Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pouchdb-adapter-http

Package Overview
Dependencies
Maintainers
5
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pouchdb-adapter-http - npm Package Compare versions

Comparing version 6.1.2 to 6.2.0

24

lib/index.es.js

@@ -7,3 +7,2 @@ import Promise from 'pouchdb-promise';

import { BAD_ARG, createError } from 'pouchdb-errors';
import debug from 'debug';

@@ -67,4 +66,2 @@ // dead simple promise pool, inspired by https://github.com/timdp/es6-promise-pool

var log = debug('pouchdb:http');
function readAttachmentsAsBlobOrBuffer(row) {

@@ -209,3 +206,6 @@ var atts = row.doc && row.doc._attachments;

options.headers || {});
log(reqOpts.method + ' ' + reqOpts.url);
/* istanbul ignore if */
if (api.constructor.listeners('debug').length) {
api.constructor.emit('debug', ['http', reqOpts.method, reqOpts.url]);
}
return api._ajax(reqOpts, callback);

@@ -282,2 +282,4 @@ }

api._remote = true;
/* istanbul ignore next */
api.type = function () {

@@ -314,2 +316,5 @@ return 'http';

api.info(function (err, res) {
// CouchDB may send a "compact_running:true" if it's
// already compacting. PouchDB Server doesn't.
/* istanbul ignore else */
if (res && !res.compact_running) {

@@ -349,2 +354,3 @@ callback(null, {ok: true});

/* istanbul ignore next */
function doBulkGetShim() {

@@ -380,6 +386,6 @@ // avoid "url too long error" by splitting up into multiple requests

/* istanbul ignore next */
if (typeof supportsBulkGet !== 'boolean') {
// check if this database supports _bulk_get
doBulkGet(function (err, res) {
/* istanbul ignore else */
if (err) {

@@ -399,3 +405,2 @@ supportsBulkGetMap[dbUrl] = false;

} else if (supportsBulkGet) {
/* istanbul ignore next */
doBulkGet(callback);

@@ -882,2 +887,9 @@ } else {

}
/* istanbul ignore next */
else if (opts.selector) {
// set this automagically for the user, similar to above
params.filter = '_selector';
method = 'POST';
body = {selector: opts.selector };
}

@@ -884,0 +896,0 @@ var xhr;

@@ -11,3 +11,2 @@ 'use strict';

var pouchdbErrors = require('pouchdb-errors');
var debug = _interopDefault(require('debug'));

@@ -71,4 +70,2 @@ // dead simple promise pool, inspired by https://github.com/timdp/es6-promise-pool

var log = debug('pouchdb:http');
function readAttachmentsAsBlobOrBuffer(row) {

@@ -213,3 +210,6 @@ var atts = row.doc && row.doc._attachments;

options.headers || {});
log(reqOpts.method + ' ' + reqOpts.url);
/* istanbul ignore if */
if (api.constructor.listeners('debug').length) {
api.constructor.emit('debug', ['http', reqOpts.method, reqOpts.url]);
}
return api._ajax(reqOpts, callback);

@@ -286,2 +286,4 @@ }

api._remote = true;
/* istanbul ignore next */
api.type = function () {

@@ -318,2 +320,5 @@ return 'http';

api.info(function (err, res) {
// CouchDB may send a "compact_running:true" if it's
// already compacting. PouchDB Server doesn't.
/* istanbul ignore else */
if (res && !res.compact_running) {

@@ -353,2 +358,3 @@ callback(null, {ok: true});

/* istanbul ignore next */
function doBulkGetShim() {

@@ -384,6 +390,6 @@ // avoid "url too long error" by splitting up into multiple requests

/* istanbul ignore next */
if (typeof supportsBulkGet !== 'boolean') {
// check if this database supports _bulk_get
doBulkGet(function (err, res) {
/* istanbul ignore else */
if (err) {

@@ -403,3 +409,2 @@ supportsBulkGetMap[dbUrl] = false;

} else if (supportsBulkGet) {
/* istanbul ignore next */
doBulkGet(callback);

@@ -886,2 +891,9 @@ } else {

}
/* istanbul ignore next */
else if (opts.selector) {
// set this automagically for the user, similar to above
params.filter = '_selector';
method = 'POST';
body = {selector: opts.selector };
}

@@ -888,0 +900,0 @@ var xhr;

{
"name": "pouchdb-adapter-http",
"version": "6.1.2",
"version": "6.2.0",
"description": "PouchDB adapter using HTTP (e.g. a remote CouchDB) as its data store.",

@@ -13,8 +13,7 @@ "main": "./lib/index.js",

"argsarray": "0.0.1",
"debug": "2.6.0",
"pouchdb-ajax": "6.1.2",
"pouchdb-binary-utils": "6.1.2",
"pouchdb-errors": "6.1.2",
"pouchdb-promise": "6.1.2",
"pouchdb-utils": "6.1.2"
"pouchdb-ajax": "6.2.0",
"pouchdb-binary-utils": "6.2.0",
"pouchdb-errors": "6.2.0",
"pouchdb-promise": "6.2.0",
"pouchdb-utils": "6.2.0"
},

@@ -21,0 +20,0 @@ "files": [

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