@koopjs/output-geoservices
Advanced tools
Comparing version 7.0.0 to 7.1.0
{ | ||
"name": "@koopjs/output-geoservices", | ||
"version": "7.0.0", | ||
"version": "7.1.0", | ||
"description": "Wraps FeatureServer as a Koop output plugin", | ||
@@ -34,3 +34,3 @@ "main": "src/index.js", | ||
"dependencies": { | ||
"@koopjs/featureserver": "8.0.0", | ||
"@koopjs/featureserver": "8.1.0", | ||
"@koopjs/logger": "5.0.0" | ||
@@ -37,0 +37,0 @@ }, |
@@ -105,2 +105,5 @@ const { promisify } = require('util'); | ||
FeatureServer.setLogger({ logger: this.logger }); | ||
// Set overrides | ||
FeatureServer.setDefaults(options.defaults); | ||
} | ||
@@ -193,6 +196,8 @@ | ||
const tokenResponse = await this.model.authenticate(req); | ||
res.status(200).json({ ...tokenResponse, ssl: tokenResponse.ssl || false}); | ||
res | ||
.status(200) | ||
.json({ ...tokenResponse, ssl: tokenResponse.ssl || false }); | ||
} catch (error) { | ||
const { code, message, details = [] } = normalizeError(error); | ||
res.status(200); | ||
@@ -215,20 +220,19 @@ | ||
function isMissingTokenError (code, token) { | ||
return (code === 'COM_0019' || code === 499 || (code === 401 && !token)); | ||
function isMissingTokenError(code, token) { | ||
return code === 'COM_0019' || code === 499 || (code === 401 && !token); | ||
} | ||
function isInvalidTokenError (code, token) { | ||
return (code === 498 || (code === 401 && token)); | ||
function isInvalidTokenError(code, token) { | ||
return code === 498 || (code === 401 && token); | ||
} | ||
function isUnauthorizedError (code, message) { | ||
return (code === 403 || message === ARCGIS_UNAUTHORIZED_MESSAGE); | ||
function isUnauthorizedError(code, message) { | ||
return code === 403 || message === ARCGIS_UNAUTHORIZED_MESSAGE; | ||
} | ||
function isGenerateTokenError (code, message) { | ||
return (code === 401 || message === ARCGIS_UNABLE_TO_GENERATE_TOKEN_MESSAGE); | ||
function isGenerateTokenError(code, message) { | ||
return code === 401 || message === ARCGIS_UNABLE_TO_GENERATE_TOKEN_MESSAGE; | ||
} | ||
function normalizeError(error) { | ||
if (error.error) { | ||
@@ -235,0 +239,0 @@ return error.error; |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
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
9392
205
0
+ Added@koopjs/featureserver@8.1.0(transitive)
- Removed@koopjs/featureserver@8.0.0(transitive)
Updated@koopjs/featureserver@8.1.0