You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

featureservice

Package Overview
Dependencies
Maintainers
2
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

featureservice - npm Package Compare versions

Comparing version

to
1.4.6

6

CHANGELOG.md

@@ -5,2 +5,7 @@ # Change Log

## [1.4.6] - 2016-01-20
### Fixed
* Guard against missing ObjectID field when trying to page
* Remove unused dep
## [1.4.5] - 2016-01-13

@@ -170,2 +175,3 @@ ### Changed

[1.4.6]: https://github.com/koopjs/featureservice/compare/v1.4.5...v1.4.6
[1.4.5]: https://github.com/koopjs/featureservice/compare/v1.4.4...v1.4.5

@@ -172,0 +178,0 @@ [1.4.4]: https://github.com/koopjs/featureservice/compare/v1.4.3...v1.4.4

5

index.js

@@ -242,2 +242,3 @@ var queue = require('async').queue

var oid
if (!info.fields) return false
info.fields.forEach(function (field) {

@@ -345,4 +346,2 @@ if (field.type === 'esriFieldTypeOID') {

this.options.objectIdField = meta.oid
// if the service supports paging, we can use offset to build pages

@@ -352,2 +351,4 @@ var canPage = layer.advancedQueryCapabilities && layer.advancedQueryCapabilities.supportsPagination

if (!meta.oid) return callback(new Error('ObjectID type field not found, unable to page'))
this.options.objectIdField = meta.oid
// if the service supports statistics, we can request the maximum and minimum id to build pages

@@ -354,0 +355,0 @@ if (layer.supportsStatistics) {

6

package.json
{
"name": "featureservice",
"description": "Get all features from an Esri Feature Service",
"version": "1.4.5",
"version": "1.4.6",
"author": "Chris Helm",

@@ -11,4 +11,3 @@ "bugs": {

"dependencies": {
"async": "^1.4.0",
"request": "^2.60.0"
"async": "^1.4.0"
},

@@ -19,2 +18,3 @@ "devDependencies": {

"https-browserify": "0.0.0",
"lodash": "^4.0.0",
"minifyify": "^7.0.3",

@@ -21,0 +21,0 @@ "nock": "^2.10.0",

@@ -7,2 +7,3 @@ var sinon = require('sinon')

var zlib = require('zlib')
var _ = require('lodash')

@@ -39,2 +40,11 @@ var service = new FeatureService('http://koop.dc.esri.com/socrata/seattle/2tje-83f6/FeatureServer/1', {objectIdField: 'OBJECTID'})

test('try to get the objectId when there are no fields', function (t) {
var layer = _.cloneDeep(layerInfo)
delete layer.fields
var oid = service.getObjectIdField(layer)
t.equal(oid, false)
t.end()
})
test('build offset pages', function (t) {

@@ -41,0 +51,0 @@ var pages

Sorry, the diff of this file is not supported yet