featureservice
Advanced tools
Comparing version 1.5.11 to 1.5.12
@@ -5,2 +5,6 @@ # Change Log | ||
## [1.5.12] - 2017-12-29 | ||
### Changed | ||
* Z value is requested when paging | ||
## [1.5.11] - 2016-10-23 | ||
@@ -233,2 +237,3 @@ ### Fixed | ||
[1.5.12]: https://github.com/koopjs/featureservice/compare/v1.5.11...v1.5.12 | ||
[1.5.11]: https://github.com/koopjs/featureservice/compare/v1.5.10...v1.5.11 | ||
@@ -235,0 +240,0 @@ [1.5.10]: https://github.com/koopjs/featureservice/compare/v1.5.9...v1.5.10 |
39
index.js
@@ -30,11 +30,3 @@ var queue = require('async').queue | ||
this._request = require('request').defaults({ | ||
gzip: true, | ||
// had to remove forever agent due to https://github.com/nodejs/node/issues/3595 | ||
// this is fixed in node 4 | ||
timeout: this.options.timeOut, | ||
headers: { | ||
'user-agent': 'Featureservices-Node' | ||
} | ||
}) | ||
this._request = require('xhr-request') | ||
@@ -89,16 +81,19 @@ // an async for requesting pages of data | ||
var options = { | ||
method: 'GET', | ||
url: encoded | ||
timeout: this.options.timeOut, | ||
headers: { | ||
'user-agent': 'Featureservices-Node' | ||
} | ||
} | ||
this._request(options, function (err, res) { | ||
this._request(encoded, options, function (err, data, res) { | ||
if (err) { | ||
if (err.message === 'ESOCKETTIMEDOUT') err.code = 504 | ||
if (err.code === 'ESOCKETTIMEDOUT') err.code = 504 | ||
return callback(err) | ||
} | ||
try { | ||
json = JSON.parse(res.body) | ||
json = JSON.parse(data) | ||
} catch (err) { | ||
// sometimes we get html or plain strings back | ||
var pattern = new RegExp(/[^{\[]/) | ||
if (res.body.slice(0, 1).match(pattern)) { | ||
var pattern = new RegExp(/[^{\[]/) // eslint-disable-line | ||
if (data.slice(0, 1).match(pattern)) { | ||
return callback(new Error('Received HTML or plain text when expecting JSON')) | ||
@@ -367,3 +362,3 @@ } | ||
function singlePage (server, layer) { | ||
return [{req: [server, '/', layer, '/query?where=1=1&returnGeometry=true&outFields=*&outSR=4326&f=json'].join('')}] | ||
return [{req: [server, '/', layer, '/query?where=1=1&returnGeometry=true&returnZ=true&outFields=*&outSR=4326&f=json'].join('')}] | ||
} | ||
@@ -418,6 +413,6 @@ | ||
var pageUrl = url + '/' + this.layer + '/query?outSR=4326&f=json&outFields=*&where=1=1' | ||
if (pages === 1) return [{req: pageUrl + '&geometry=&returnGeometry=true&geometryPrecision='}] | ||
if (pages === 1) return [{req: pageUrl + '&geometry=&returnGeometry=true&returnZ=true&geometryPrecision='}] | ||
pageUrl += '&resultOffset=' + resultOffset | ||
pageUrl += '&resultRecordCount=' + size | ||
pageUrl += '&geometry=&returnGeometry=true&geometryPrecision=' | ||
pageUrl += '&geometry=&returnGeometry=true&returnZ=true&geometryPrecision=' | ||
reqs.push({req: pageUrl}) | ||
@@ -448,3 +443,3 @@ } | ||
var pageUrl = this.server + '/' + (this.layer) + '/query?outSR=4326&where=' + where + '&f=json&outFields=*' | ||
pageUrl += '&geometry=&returnGeometry=true&geometryPrecision=10' | ||
pageUrl += '&geometry=&returnGeometry=true&returnZ=true&geometryPrecision=10' | ||
reqs.push({req: pageUrl}) | ||
@@ -487,3 +482,3 @@ } | ||
pageUrl = url + '/' + (this.layer || 0) + '/query?outSR=4326&where=' + where + '&f=json&outFields=*' | ||
pageUrl += '&geometry=&returnGeometry=true&geometryPrecision=' | ||
pageUrl += '&geometry=&returnGeometry=true&returnZ=true&geometryPrecision=' | ||
reqs.push({req: pageUrl}) | ||
@@ -549,3 +544,5 @@ } | ||
else this.concurrency += 0.1 | ||
if (this.concurrency > this.maxConcurrency) this.concurrency = this.maxConcurrency | ||
this.pageQueue.concurrency = this.concurrency >= 1 ? Math.floor(this.concurrency) : 1 | ||
@@ -552,0 +549,0 @@ } |
{ | ||
"name": "featureservice", | ||
"description": "Get all features from an Esri Feature Service", | ||
"version": "1.5.11", | ||
"version": "1.5.12", | ||
"author": "Chris Helm", | ||
@@ -9,16 +9,16 @@ "bugs": { | ||
}, | ||
"contributors": "Daniel Fenton", | ||
"contributors": ["Daniel Fenton"], | ||
"dependencies": { | ||
"async": "^1.4.0", | ||
"request": "^2.75.0" | ||
"async": "^2.1.5", | ||
"xhr-request": "^1.0.1" | ||
}, | ||
"devDependencies": { | ||
"browserify": "^11.0.0", | ||
"browserify": "^14.1.0", | ||
"http-browserify": "^1.7.0", | ||
"https-browserify": "0.0.0", | ||
"https-browserify": "1.0.0", | ||
"lodash": "^4.0.0", | ||
"minifyify": "^7.0.3", | ||
"nock": "^2.10.0", | ||
"sinon": "^1.15.4", | ||
"standard": "^5.0.0", | ||
"nock": "^9.0.9", | ||
"sinon": "^2.0.0", | ||
"standard": "^10.0.0", | ||
"tap-spec": "^4.0.2", | ||
@@ -25,0 +25,0 @@ "tape": "^4.0.1", |
# featureservice | ||
> Get all features from an Esri Feature Service | ||
*Get all features from an Esri Feature Service* | ||
[![npm][npm-image]][npm-url] | ||
[![travis][travis-image]][travis-url] | ||
[![Greenkeeper badge][greenkeeper-image]][greenkeeper-url] | ||
@@ -12,2 +13,4 @@ [npm-image]: https://img.shields.io/npm/v/featureservice.svg?style=flat-square | ||
[travis-url]: https://travis-ci.org/koopjs/featureservice | ||
[greenkeeper-image]: https://badges.greenkeeper.io/koopjs/featureservice.svg | ||
[greenkeeper-url]: https://greenkeeper.io/ | ||
@@ -14,0 +17,0 @@ A little module that extracts every feature from an Esri Feature Service. The real power in this module is that it's designed to page over a service and extract every single feature no matter what ArcGIS Server version the data is hosted on. |
@@ -75,4 +75,4 @@ var sinon = require('sinon') | ||
pages = service._rangePages(stats, stats.max / 2) | ||
t.equal(pages[0].req, 'http://koop.dc.esri.com/socrata/seattle/2tje-83f6/FeatureServer/1/query?outSR=4326&where=OBJECTID>=0+AND+OBJECTID<=999&f=json&outFields=*&geometry=&returnGeometry=true&geometryPrecision=') | ||
t.equal(pages[1].req, 'http://koop.dc.esri.com/socrata/seattle/2tje-83f6/FeatureServer/1/query?outSR=4326&where=OBJECTID>=1000+AND+OBJECTID<=2000&f=json&outFields=*&geometry=&returnGeometry=true&geometryPrecision=') | ||
t.equal(pages[0].req, 'http://koop.dc.esri.com/socrata/seattle/2tje-83f6/FeatureServer/1/query?outSR=4326&where=OBJECTID>=0+AND+OBJECTID<=999&f=json&outFields=*&geometry=&returnGeometry=true&returnZ=true&geometryPrecision=') | ||
t.equal(pages[1].req, 'http://koop.dc.esri.com/socrata/seattle/2tje-83f6/FeatureServer/1/query?outSR=4326&where=OBJECTID>=1000+AND+OBJECTID<=2000&f=json&outFields=*&geometry=&returnGeometry=true&returnZ=true&geometryPrecision=') | ||
t.equal(pages.length, 2) | ||
@@ -89,5 +89,5 @@ pages = service._rangePages(stats, stats.max / 4) | ||
t.equal(pages.length, 3) | ||
t.equal(pages[0].req, 'http://koop.dc.esri.com/socrata/seattle/2tje-83f6/FeatureServer/1/query?outSR=4326&where=OBJECTID >= 0 AND OBJECTID<=1&f=json&outFields=*&geometry=&returnGeometry=true&geometryPrecision=10') | ||
t.equal(pages[1].req, 'http://koop.dc.esri.com/socrata/seattle/2tje-83f6/FeatureServer/1/query?outSR=4326&where=OBJECTID >= 2 AND OBJECTID<=3&f=json&outFields=*&geometry=&returnGeometry=true&geometryPrecision=10') | ||
t.equal(pages[2].req, 'http://koop.dc.esri.com/socrata/seattle/2tje-83f6/FeatureServer/1/query?outSR=4326&where=OBJECTID >= 4 AND OBJECTID<=5&f=json&outFields=*&geometry=&returnGeometry=true&geometryPrecision=10') | ||
t.equal(pages[0].req, 'http://koop.dc.esri.com/socrata/seattle/2tje-83f6/FeatureServer/1/query?outSR=4326&where=OBJECTID >= 0 AND OBJECTID<=1&f=json&outFields=*&geometry=&returnGeometry=true&returnZ=true&geometryPrecision=10') | ||
t.equal(pages[1].req, 'http://koop.dc.esri.com/socrata/seattle/2tje-83f6/FeatureServer/1/query?outSR=4326&where=OBJECTID >= 2 AND OBJECTID<=3&f=json&outFields=*&geometry=&returnGeometry=true&returnZ=true&geometryPrecision=10') | ||
t.equal(pages[2].req, 'http://koop.dc.esri.com/socrata/seattle/2tje-83f6/FeatureServer/1/query?outSR=4326&where=OBJECTID >= 4 AND OBJECTID<=5&f=json&outFields=*&geometry=&returnGeometry=true&returnZ=true&geometryPrecision=10') | ||
t.end() | ||
@@ -99,4 +99,4 @@ }) | ||
var pages = service._offsetPages(4, maxCount) | ||
t.equal(pages[0].req, 'http://koop.dc.esri.com/socrata/seattle/2tje-83f6/FeatureServer/1/query?outSR=4326&f=json&outFields=*&where=1=1&resultOffset=0&resultRecordCount=100&geometry=&returnGeometry=true&geometryPrecision=') | ||
t.equal(pages[1].req, 'http://koop.dc.esri.com/socrata/seattle/2tje-83f6/FeatureServer/1/query?outSR=4326&f=json&outFields=*&where=1=1&resultOffset=100&resultRecordCount=100&geometry=&returnGeometry=true&geometryPrecision=') | ||
t.equal(pages[0].req, 'http://koop.dc.esri.com/socrata/seattle/2tje-83f6/FeatureServer/1/query?outSR=4326&f=json&outFields=*&where=1=1&resultOffset=0&resultRecordCount=100&geometry=&returnGeometry=true&returnZ=true&geometryPrecision=') | ||
t.equal(pages[1].req, 'http://koop.dc.esri.com/socrata/seattle/2tje-83f6/FeatureServer/1/query?outSR=4326&f=json&outFields=*&where=1=1&resultOffset=100&resultRecordCount=100&geometry=&returnGeometry=true&returnZ=true&geometryPrecision=') | ||
t.equal(pages.length, 4) | ||
@@ -114,3 +114,3 @@ | ||
test('get the metadata for a layer on the service', function (t) { | ||
sinon.stub(service, 'request', function (url, callback) { | ||
sinon.stub(service, 'request').callsFake(function (url, callback) { | ||
callback(null, layerFixture) | ||
@@ -127,3 +127,3 @@ }) | ||
test('get the metadata for a service', function (t) { | ||
sinon.stub(service, 'request', function (url, callback) { | ||
sinon.stub(service, 'request').callsFake(function (url, callback) { | ||
callback(null, serviceFixture) | ||
@@ -173,3 +173,3 @@ }) | ||
test('get all the object ids for a layer on the service', function (t) { | ||
sinon.stub(service, 'request', function (url, callback) { | ||
sinon.stub(service, 'request').callsFake(function (url, callback) { | ||
callback(null, idFixture) | ||
@@ -187,3 +187,3 @@ }) | ||
test('get the range of object ids for a service', function (t) { | ||
sinon.stub(service, 'request', function (url, callback) { | ||
sinon.stub(service, 'request').callsFake(function (url, callback) { | ||
callback(null, statsFixture) | ||
@@ -203,3 +203,3 @@ }) | ||
test('get the range of object ids for a service when the attribute names are unexpectedly capitalized', function (t) { | ||
sinon.stub(service, 'request', function (url, callback) { | ||
sinon.stub(service, 'request').callsFake(function (url, callback) { | ||
callback(null, statsFixtureCaps) | ||
@@ -219,3 +219,3 @@ }) | ||
test('get the feature count for a layer on the service', function (t) { | ||
sinon.stub(service, 'request', function (url, callback) { | ||
sinon.stub(service, 'request').callsFake(function (url, callback) { | ||
callback(null, countFixture) | ||
@@ -233,3 +233,3 @@ }) | ||
test('get a json error when trying to get a feature count', function (t) { | ||
sinon.stub(service, 'request', function (url, callback) { | ||
sinon.stub(service, 'request').callsFake(function (url, callback) { | ||
callback(null, securedFixture) | ||
@@ -247,3 +247,3 @@ }) | ||
test('get an error with no response body when trying to get a feature count', function (t) { | ||
sinon.stub(service, 'request', function (url, callback) { | ||
sinon.stub(service, 'request').callsFake(function (url, callback) { | ||
callback(new Error(), null) | ||
@@ -259,3 +259,3 @@ }) | ||
test('get a json error when trying to get layer ids', function (t) { | ||
sinon.stub(service, 'request', function (url, callback) { | ||
sinon.stub(service, 'request').callsFake(function (url, callback) { | ||
callback(null, securedFixture) | ||
@@ -273,3 +273,3 @@ }) | ||
test('get an error with no response body when trying to get layer ids', function (t) { | ||
sinon.stub(service, 'request', function (url, callback) { | ||
sinon.stub(service, 'request').callsFake(function (url, callback) { | ||
callback(new Error(), null) | ||
@@ -285,3 +285,3 @@ }) | ||
test('get a json error when trying to get layer info', function (t) { | ||
sinon.stub(service, 'request', function (url, callback) { | ||
sinon.stub(service, 'request').callsFake(function (url, callback) { | ||
callback(null, securedFixture) | ||
@@ -299,3 +299,3 @@ }) | ||
test('get an error with no response body when trying to get layer info', function (t) { | ||
sinon.stub(service, 'request', function (url, callback) { | ||
sinon.stub(service, 'request').callsFake(function (url, callback) { | ||
callback(new Error(), null) | ||
@@ -311,3 +311,3 @@ }) | ||
test('get a json error when trying to get statistics', function (t) { | ||
sinon.stub(service, 'request', function (url, callback) { | ||
sinon.stub(service, 'request').callsFake(function (url, callback) { | ||
callback(null, securedFixture) | ||
@@ -325,3 +325,3 @@ }) | ||
test('get an error with no response body when trying to get statistics', function (t) { | ||
sinon.stub(service, 'request', function (url, callback) { | ||
sinon.stub(service, 'request').callsFake(function (url, callback) { | ||
callback(new Error(), null) | ||
@@ -363,3 +363,3 @@ }) | ||
sinon.stub(service, '_catchErrors', function (task, err, url, callback) { | ||
sinon.stub(service, '_catchErrors').callsFake(function (task, err, url, callback) { | ||
callback(err) | ||
@@ -384,7 +384,7 @@ }) | ||
fixture.get('/97KLIFOSt5CxbiRI/arcgis/rest/services/QA_data_simple_point_5000/FeatureServer/0/query?outSR=4326&f=json&outFields=*&where=1=1&resultOffset=1000&resultRecordCount=1000&geometry=&returnGeometry=true&geometryPrecision=') | ||
fixture.get('/97KLIFOSt5CxbiRI/arcgis/rest/services/QA_data_simple_point_5000/FeatureServer/0/query?outSR=4326&f=json&outFields=*&where=1=1&resultOffset=1000&resultRecordCount=1000&geometry=&returnGeometry=true&returnZ=true&geometryPrecision=') | ||
.reply(200, function () { return page }) | ||
var service = new FeatureService('http://servicesqa.arcgis.com/97KLIFOSt5CxbiRI/arcgis/rest/services/QA_data_simple_point_5000/FeatureServer/0') | ||
var task = {req: 'http://servicesqa.arcgis.com/97KLIFOSt5CxbiRI/arcgis/rest/services/QA_data_simple_point_5000/FeatureServer/0/query?outSR=4326&f=json&outFields=*&where=1=1&resultOffset=1000&resultRecordCount=1000&geometry=&returnGeometry=true&geometryPrecision='} | ||
var task = {req: 'http://servicesqa.arcgis.com/97KLIFOSt5CxbiRI/arcgis/rest/services/QA_data_simple_point_5000/FeatureServer/0/query?outSR=4326&f=json&outFields=*&where=1=1&resultOffset=1000&resultRecordCount=1000&geometry=&returnGeometry=true&returnZ=true&geometryPrecision='} | ||
@@ -402,7 +402,7 @@ service._requestFeatures(task, function (err, json) { | ||
fixture.get('/97KLIFOSt5CxbiRI/arcgis/rest/services/QA_data_simple_point_5000/FeatureServer/0/query?outSR=4326&f=json&outFields=*&where=1=1&resultOffset=1000&resultRecordCount=1000&geometry=&returnGeometry=true&geometryPrecision=') | ||
fixture.get('/97KLIFOSt5CxbiRI/arcgis/rest/services/QA_data_simple_point_5000/FeatureServer/0/query?outSR=4326&f=json&outFields=*&where=1=1&resultOffset=1000&resultRecordCount=1000&geometry=&returnGeometry=true&returnZ=true&geometryPrecision=') | ||
.reply(200, function () { return page }, {'content-encoding': 'gzip'}) | ||
var service = new FeatureService('http://servicesqa.arcgis.com/97KLIFOSt5CxbiRI/arcgis/rest/services/QA_data_simple_point_5000/FeatureServer/0') | ||
var task = {req: 'http://servicesqa.arcgis.com/97KLIFOSt5CxbiRI/arcgis/rest/services/QA_data_simple_point_5000/FeatureServer/0/query?outSR=4326&f=json&outFields=*&where=1=1&resultOffset=1000&resultRecordCount=1000&geometry=&returnGeometry=true&geometryPrecision='} | ||
var task = {req: 'http://servicesqa.arcgis.com/97KLIFOSt5CxbiRI/arcgis/rest/services/QA_data_simple_point_5000/FeatureServer/0/query?outSR=4326&f=json&outFields=*&where=1=1&resultOffset=1000&resultRecordCount=1000&geometry=&returnGeometry=true&returnZ=true&geometryPrecision='} | ||
@@ -420,7 +420,7 @@ service._requestFeatures(task, function (err, json) { | ||
fixture.get('/97KLIFOSt5CxbiRI/arcgis/rest/services/QA_data_simple_point_5000/FeatureServer/0/query?outSR=4326&f=json&outFields=*&where=1=1&resultOffset=1000&resultRecordCount=1000&geometry=&returnGeometry=true&geometryPrecision=') | ||
fixture.get('/97KLIFOSt5CxbiRI/arcgis/rest/services/QA_data_simple_point_5000/FeatureServer/0/query?outSR=4326&f=json&outFields=*&where=1=1&resultOffset=1000&resultRecordCount=1000&geometry=&returnGeometry=true&returnZ=true&geometryPrecision=') | ||
.reply(200, function () { return page }, {'content-encoding': 'deflate'}) | ||
var service = new FeatureService('http://servicesqa.arcgis.com/97KLIFOSt5CxbiRI/arcgis/rest/services/QA_data_simple_point_5000/FeatureServer/0') | ||
var task = {req: 'http://servicesqa.arcgis.com/97KLIFOSt5CxbiRI/arcgis/rest/services/QA_data_simple_point_5000/FeatureServer/0/query?outSR=4326&f=json&outFields=*&where=1=1&resultOffset=1000&resultRecordCount=1000&geometry=&returnGeometry=true&geometryPrecision='} | ||
var task = {req: 'http://servicesqa.arcgis.com/97KLIFOSt5CxbiRI/arcgis/rest/services/QA_data_simple_point_5000/FeatureServer/0/query?outSR=4326&f=json&outFields=*&where=1=1&resultOffset=1000&resultRecordCount=1000&geometry=&returnGeometry=true&returnZ=true&geometryPrecision='} | ||
@@ -438,3 +438,3 @@ service._requestFeatures(task, function (err, json) { | ||
fixture.get('/97KLIFOSt5CxbiRI/arcgis/rest/services/QA_data_simple_point_5000/FeatureServer/0/query?outSR=4326&f=json&outFields=*&where=1=1&resultOffset=1000&resultRecordCount=1000&geometry=&returnGeometry=true&geometryPrecision=') | ||
fixture.get('/97KLIFOSt5CxbiRI/arcgis/rest/services/QA_data_simple_point_5000/FeatureServer/0/query?outSR=4326&f=json&outFields=*&where=1=1&resultOffset=1000&resultRecordCount=1000&geometry=&returnGeometry=true&returnZ=true&geometryPrecision=') | ||
.times(4) | ||
@@ -444,3 +444,3 @@ .reply(200, function () { return page }) | ||
var service = new FeatureService('http://servicesqa.arcgis.com/97KLIFOSt5CxbiRI/arcgis/rest/services/QA_data_simple_point_5000/FeatureServer/0', {backoff: 1}) | ||
var task = {req: 'http://servicesqa.arcgis.com/97KLIFOSt5CxbiRI/arcgis/rest/services/QA_data_simple_point_5000/FeatureServer/0/query?outSR=4326&f=json&outFields=*&where=1=1&resultOffset=1000&resultRecordCount=1000&geometry=&returnGeometry=true&geometryPrecision='} | ||
var task = {req: 'http://servicesqa.arcgis.com/97KLIFOSt5CxbiRI/arcgis/rest/services/QA_data_simple_point_5000/FeatureServer/0/query?outSR=4326&f=json&outFields=*&where=1=1&resultOffset=1000&resultRecordCount=1000&geometry=&returnGeometry=true&returnZ=true&geometryPrecision='} | ||
@@ -457,3 +457,3 @@ service._requestFeatures(task, function (err, json) { | ||
fixture.get('/97KLIFOSt5CxbiRI/arcgis/rest/services/QA_data_simple_point_5000/FeatureServer/0/query?outSR=4326&f=json&outFields=*&where=1=1&resultOffset=1000&resultRecordCount=1000&geometry=&returnGeometry=true&geometryPrecision=') | ||
fixture.get('/97KLIFOSt5CxbiRI/arcgis/rest/services/QA_data_simple_point_5000/FeatureServer/0/query?outSR=4326&f=json&outFields=*&where=1=1&resultOffset=1000&resultRecordCount=1000&geometry=&returnGeometry=true&returnZ=true&geometryPrecision=') | ||
.times(4) | ||
@@ -463,3 +463,3 @@ .reply(200, function () { return undefined }) | ||
var service = new FeatureService('http://servicesqa.arcgis.com/97KLIFOSt5CxbiRI/arcgis/rest/services/QA_data_simple_point_5000/FeatureServer/0', {backoff: 1}) | ||
var task = {req: 'http://servicesqa.arcgis.com/97KLIFOSt5CxbiRI/arcgis/rest/services/QA_data_simple_point_5000/FeatureServer/0/query?outSR=4326&f=json&outFields=*&where=1=1&resultOffset=1000&resultRecordCount=1000&geometry=&returnGeometry=true&geometryPrecision='} | ||
var task = {req: 'http://servicesqa.arcgis.com/97KLIFOSt5CxbiRI/arcgis/rest/services/QA_data_simple_point_5000/FeatureServer/0/query?outSR=4326&f=json&outFields=*&where=1=1&resultOffset=1000&resultRecordCount=1000&geometry=&returnGeometry=true&returnZ=true&geometryPrecision='} | ||
@@ -565,3 +565,3 @@ service._requestFeatures(task, function (err, json) { | ||
nock('http://www.foobar.com').get('/FeatureServer/0/query?where=1=1').socketDelay(100).reply({}.toString()) | ||
sinon.stub(service, '_abortPaging', function (err, callback) { | ||
sinon.stub(service, '_abortPaging').callsFake(function (err, callback) { | ||
callback(err) | ||
@@ -593,3 +593,3 @@ }) | ||
sinon.stub(service, '_abortPaging', function (error, cb) { | ||
sinon.stub(service, '_abortPaging').callsFake(function (error, cb) { | ||
cb(error) | ||
@@ -620,3 +620,3 @@ }) | ||
t.plan(2) | ||
sinon.stub(service, '_console', function (level, message) { | ||
sinon.stub(service, '_console').callsFake(function (level, message) { | ||
t.equal(level, 'test') | ||
@@ -623,0 +623,0 @@ t.equal(message, 'test') |
Network access
Supply chain riskThis module accesses the network.
Found 2 instances in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
0
93
1
0
476889
32
1084
+ Addedxhr-request@^1.0.1
+ Addedasync@2.6.4(transitive)
+ Addedbuffer-to-arraybuffer@0.0.5(transitive)
+ Addeddecode-uri-component@0.2.2(transitive)
+ Addeddecompress-response@3.3.0(transitive)
+ Addeddom-walk@0.1.2(transitive)
+ Addedglobal@4.4.0(transitive)
+ Addedis-function@1.0.2(transitive)
+ Addedlodash@4.17.21(transitive)
+ Addedmimic-response@1.0.1(transitive)
+ Addedmin-document@2.19.0(transitive)
+ Addedobject-assign@4.1.1(transitive)
+ Addedonce@1.4.0(transitive)
+ Addedparse-headers@2.0.5(transitive)
+ Addedprocess@0.11.10(transitive)
+ Addedquery-string@5.1.1(transitive)
+ Addedsimple-concat@1.0.1(transitive)
+ Addedsimple-get@2.8.2(transitive)
+ Addedstrict-uri-encode@1.1.0(transitive)
+ Addedtimed-out@4.0.1(transitive)
+ Addedurl-set-query@1.0.0(transitive)
+ Addedwrappy@1.0.2(transitive)
+ Addedxhr@2.6.0(transitive)
+ Addedxhr-request@1.1.0(transitive)
+ Addedxtend@4.0.2(transitive)
- Removedrequest@^2.75.0
- Removedajv@6.12.6(transitive)
- Removedasn1@0.2.6(transitive)
- Removedassert-plus@1.0.0(transitive)
- Removedasync@1.5.2(transitive)
- Removedasynckit@0.4.0(transitive)
- Removedaws-sign2@0.7.0(transitive)
- Removedaws4@1.13.2(transitive)
- Removedbcrypt-pbkdf@1.0.2(transitive)
- Removedcaseless@0.12.0(transitive)
- Removedcombined-stream@1.0.8(transitive)
- Removedcore-util-is@1.0.2(transitive)
- Removeddashdash@1.14.1(transitive)
- Removeddelayed-stream@1.0.0(transitive)
- Removedecc-jsbn@0.1.2(transitive)
- Removedextend@3.0.2(transitive)
- Removedextsprintf@1.3.0(transitive)
- Removedfast-deep-equal@3.1.3(transitive)
- Removedfast-json-stable-stringify@2.1.0(transitive)
- Removedforever-agent@0.6.1(transitive)
- Removedform-data@2.3.3(transitive)
- Removedgetpass@0.1.7(transitive)
- Removedhar-schema@2.0.0(transitive)
- Removedhar-validator@5.1.5(transitive)
- Removedhttp-signature@1.2.0(transitive)
- Removedis-typedarray@1.0.0(transitive)
- Removedisstream@0.1.2(transitive)
- Removedjsbn@0.1.1(transitive)
- Removedjson-schema@0.4.0(transitive)
- Removedjson-schema-traverse@0.4.1(transitive)
- Removedjson-stringify-safe@5.0.1(transitive)
- Removedjsprim@1.4.2(transitive)
- Removedmime-db@1.52.0(transitive)
- Removedmime-types@2.1.35(transitive)
- Removedoauth-sign@0.9.0(transitive)
- Removedperformance-now@2.1.0(transitive)
- Removedpsl@1.15.0(transitive)
- Removedpunycode@2.3.1(transitive)
- Removedqs@6.5.3(transitive)
- Removedrequest@2.88.2(transitive)
- Removedsafe-buffer@5.2.1(transitive)
- Removedsafer-buffer@2.1.2(transitive)
- Removedsshpk@1.18.0(transitive)
- Removedtough-cookie@2.5.0(transitive)
- Removedtunnel-agent@0.6.0(transitive)
- Removedtweetnacl@0.14.5(transitive)
- Removeduri-js@4.4.1(transitive)
- Removeduuid@3.4.0(transitive)
- Removedverror@1.10.0(transitive)
Updatedasync@^2.1.5