jsonapi-server
Advanced tools
Comparing version 4.1.2 to 4.2.0
@@ -0,1 +1,5 @@ | ||
- 2018-01-31 - v4.2.0 | ||
- 2018-01-31 - Support setting limit of query string parameters through a configuration property. | ||
- 2018-01-31 - Support setting `bodyParser.json` option through a configuration property. | ||
- 2018-01-31 - Fix CRUD operation detection when using chain handlers. | ||
- 2017-12-11 - v4.1.2 | ||
@@ -66,3 +70,4 @@ - 2017-12-11 - Fix broken response test resource to enable integration with data store handlers. | ||
- 2016-09-20 - Dynamic metadata in body of responses | ||
- 2016-09-20 - Comma separated filter values | ||
- 2016-09-20 - Comma separated filter v 1 successful check | ||
alues | ||
- 2016-09-20 - Option to override base urls in links | ||
@@ -69,0 +74,0 @@ - 2016-09-08 - v1.16.1 |
@@ -29,3 +29,13 @@ | ||
return { timestamp: new Date() }; | ||
} | ||
}, | ||
// (optional) bodyParserJsonOpts allows setting the options passed to the json body parser, | ||
// such as the maximum allowed body size (default is 100kb). All the options are | ||
// documented at https://github.com/expressjs/body-parser#bodyparserjsonoptions | ||
bodyParserJsonOpts: { | ||
limit: '256kb' | ||
}, | ||
// (optional) queryStringParsingParameterLimit allows to | ||
// override the default limit of 1000 parameters in query string parsing, | ||
// documented at : https://github.com/ljharb/qs | ||
queryStringParsingParameterLimit: 2000 | ||
}); | ||
@@ -32,0 +42,0 @@ ``` |
@@ -18,3 +18,5 @@ 'use strict' | ||
const route = rerouter._pickFirstMatchingRoute(validRoutes, path) | ||
const qsOpts = jsonApi._apiConfig.queryStringParsingParameterLimit | ||
? { parameterLimit: jsonApi._apiConfig.queryStringParsingParameterLimit } | ||
: { } | ||
const req = { | ||
@@ -25,3 +27,3 @@ url: newRequest.uri, | ||
cookies: newRequest.originalRequest.cookies, | ||
params: rerouter._mergeParams(url.parse(newRequest.uri.split('?')[1] || { }), newRequest.params) | ||
params: rerouter._mergeParams(url.parse(newRequest.uri.split('?')[1] || { }, qsOpts), newRequest.params) | ||
} | ||
@@ -28,0 +30,0 @@ rerouter._extendUrlParamsOntoReq(route, path, req) |
@@ -69,3 +69,3 @@ 'use strict' | ||
app.use(bodyParser.json()) | ||
app.use(bodyParser.json(jsonApi._apiConfig.bodyParserJsonOpts)) | ||
app.use(bodyParser.urlencoded({ extended: true })) | ||
@@ -72,0 +72,0 @@ app.use(cookieParser()) |
@@ -74,3 +74,9 @@ 'use strict' | ||
if (!resourceConfig.handlers[handlerRequest]) { | ||
// for crud operation support, we need skip over any ChainHandlers to check what the actual store supports | ||
let finalHandler = resourceConfig.handlers | ||
while (finalHandler.otherHandler) { | ||
finalHandler = finalHandler.otherHandler | ||
} | ||
if (!finalHandler[handlerRequest]) { | ||
return helper.handleError(request, res, { | ||
@@ -77,0 +83,0 @@ status: '403', |
{ | ||
"name": "jsonapi-server", | ||
"version": "4.1.2", | ||
"version": "4.2.0", | ||
"description": "A config driven NodeJS framework implementing json:api", | ||
@@ -47,7 +47,7 @@ "keywords": [ | ||
"use-strict": "1.0.1", | ||
"uuid": "3.1.0" | ||
"uuid": "3.2.1" | ||
}, | ||
"devDependencies": { | ||
"coveralls": "3.0.0", | ||
"eslint": "4.13.1", | ||
"eslint": "4.16.0", | ||
"eslint-config-standard": "10.2.1", | ||
@@ -61,5 +61,5 @@ "eslint-plugin-import": "2.8.0", | ||
"lokka-transport-http": "1.6.1", | ||
"mocha": "4.0.1", | ||
"mocha": "5.0.0", | ||
"mocha-performance": "0.1.1", | ||
"nyc": "11.3.0", | ||
"nyc": "11.4.1", | ||
"swagger-tools": "0.10.3", | ||
@@ -66,0 +66,0 @@ "v8-profiler": "5.7.0" |
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
299226
7048
+ Addeduuid@3.2.1(transitive)
- Removeduuid@3.1.0(transitive)
Updateduuid@3.2.1