pouchdb-adapter-http
Advanced tools
Comparing version 6.1.2 to 6.2.0
@@ -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": [ |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
72232
6
1814
+ Addedajv@4.11.8(transitive)
+ Addedcall-bind@1.0.8(transitive)
+ Addedcaseless@0.12.0(transitive)
+ Addedco@4.6.0(transitive)
+ Addeddefine-data-property@1.1.4(transitive)
+ Addedhar-schema@1.0.5(transitive)
+ Addedhar-validator@4.2.1(transitive)
+ Addedhas-property-descriptors@1.0.2(transitive)
+ Addedisarray@2.0.5(transitive)
+ Addedjson-stable-stringify@1.2.1(transitive)
+ Addedjsonify@0.0.1(transitive)
+ Addedlie@3.1.1(transitive)
+ Addedobject-keys@1.1.1(transitive)
+ Addedperformance-now@0.2.0(transitive)
+ Addedpouchdb-ajax@6.2.0(transitive)
+ Addedpouchdb-binary-utils@6.2.0(transitive)
+ Addedpouchdb-collections@6.2.0(transitive)
+ Addedpouchdb-errors@6.2.0(transitive)
+ Addedpouchdb-promise@6.2.0(transitive)
+ Addedpouchdb-utils@6.2.0(transitive)
+ Addedrequest@2.80.0(transitive)
+ Addedset-function-length@1.2.2(transitive)
- Removeddebug@2.6.0
- Removedansi-regex@2.1.1(transitive)
- Removedansi-styles@2.2.1(transitive)
- Removedcaseless@0.11.0(transitive)
- Removedchalk@1.1.3(transitive)
- Removedcommander@2.20.3(transitive)
- Removeddebug@2.6.0(transitive)
- Removedescape-string-regexp@1.0.5(transitive)
- Removedgenerate-function@2.3.1(transitive)
- Removedgenerate-object-property@1.2.0(transitive)
- Removedhar-validator@2.0.6(transitive)
- Removedhas-ansi@2.0.0(transitive)
- Removedis-my-ip-valid@1.0.1(transitive)
- Removedis-my-json-valid@2.20.6(transitive)
- Removedis-property@1.0.2(transitive)
- Removedjsonpointer@5.0.1(transitive)
- Removedlie@3.1.0(transitive)
- Removedms@0.7.2(transitive)
- Removedpinkie@2.0.4(transitive)
- Removedpinkie-promise@2.0.1(transitive)
- Removedpouchdb-ajax@6.1.2(transitive)
- Removedpouchdb-binary-utils@6.1.2(transitive)
- Removedpouchdb-collections@6.1.2(transitive)
- Removedpouchdb-errors@6.1.2(transitive)
- Removedpouchdb-promise@6.1.2(transitive)
- Removedpouchdb-utils@6.1.2(transitive)
- Removedrequest@2.79.0(transitive)
- Removedstrip-ansi@3.0.1(transitive)
- Removedsupports-color@2.0.0(transitive)
- Removedxtend@4.0.2(transitive)
Updatedpouchdb-ajax@6.2.0
Updatedpouchdb-binary-utils@6.2.0
Updatedpouchdb-errors@6.2.0
Updatedpouchdb-promise@6.2.0
Updatedpouchdb-utils@6.2.0