New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ags-walk

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ags-walk - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

test-live.js

6

index.js

@@ -33,3 +33,6 @@ const request = require('xhr-request')

json: true
}, function (err, data) {
}, function (err, data, res) {
if (res.statusCode === 404) {
err = res.rawRequest.statusMessage
}
if (err) return cb(err)

@@ -39,2 +42,3 @@ if (!_isAgs(data)) {

}
services.push(data.services)

@@ -41,0 +45,0 @@ const harvester = _harvestFolders(url, data.folders)

2

package.json
{
"name": "ags-walk",
"version": "1.0.2",
"version": "1.0.3",
"description": "Walks an ArcGIS Server Rest API and returns all services",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -48,3 +48,3 @@ const test = require('tape')

} else if (req.url === '/arcgis/rest/services/Basemaps?f=json') {
res.status = 200
res.statusCode = 200
res.end(JSON.stringify(basemaps))

@@ -71,3 +71,3 @@ } else {

t.equal(req.url, '/arcgis/rest/services?f=json', 'should return correct url')
res.status = 200
res.statusCode = 200
res.end(JSON.stringify(rootNoServices))

@@ -89,3 +89,3 @@ })

t.equal(req.url, '/arcgis/bad/services?f=json', 'should return url with query string')
res.status = 200
res.statusCode = 200
res.end(JSON.stringify({

@@ -104,1 +104,19 @@ 'pretty': 'bad'

})
test('404', function (t) {
t.plan(3)
const server = http.createServer(function (req, res) {
t.equal(req.url, '/arcgis/404/services?f=json')
res.statusCode = 404
res.statusMessage = 'Not found'
res.end('<body><h1>404</h1</body>')
})
server.listen(0, function () {
const port = server.address().port
agsWalk('http://localhost:' + port + '/arcgis/404/services', function (err, res) {
t.ok(err)
t.equal(err, 'Not found')
server.close()
})
})
})
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