Comparing version 5.0.0-beta-7.0 to 5.0.0-beta-8.0
# restify Changelog | ||
## 5.0.0 | ||
- #1309 Add `getRoute()` to Request to get the route object. Rajat Kumar | ||
- #1288 add `pre` and `routed` events. Yunong Xiao | ||
@@ -94,5 +95,25 @@ - #1281 Add `server.getDebugInfo()` method, Yunong Xiao, Alex Liu | ||
- #855 Clients now live in its own repo and npm module, Alex Liu | ||
- Various documentation improvements from leitsubomi | ||
Various documentation improvements from leitsubomi, | ||
## 4.3.0 | ||
- #1024 Add `handleUncaughtExceptions` server option to supporting disabling | ||
the uncaughtException handler. | ||
## 4.2.0 | ||
- #925 Support passing (most) [qs](https://github.com/ljharb/qs#readme) options | ||
to the `restify.queryParser` plugin. Update the "qs" dependency to latest (v6) | ||
while maintaining backward compatibility (see notes in the API doc and | ||
"test/query.test.js" on `allowDots` and `plainObjects`). | ||
## 4.1.1 | ||
- update negotiator (NSP advisory #106) and lru-cache (bug fix). | ||
## 4.1.0 | ||
- Bump SPDY to latest. | ||
- #959: fix issue where cached routes were not setting maxVersion on the req | ||
## 4.0.4 | ||
@@ -99,0 +120,0 @@ |
@@ -9,2 +9,5 @@ // Copyright 2012 Mark Cavage, Inc. All rights reserved. | ||
* JSONP formatter. like JSON, but with a callback invocation. | ||
* | ||
* Unicode escapes line and paragraph separators. | ||
* | ||
* @public | ||
@@ -37,2 +40,5 @@ * @function formatJSONP | ||
data = data.replace(/\u2028/g, '\\u2028') | ||
.replace(/\u2029/g, '\\u2029'); | ||
res.setHeader('Content-Length', Buffer.byteLength(data)); | ||
@@ -39,0 +45,0 @@ return data; |
@@ -606,1 +606,20 @@ // Copyright 2012 Mark Cavage, Inc. All rights reserved. | ||
}; | ||
/** | ||
* returns the route object to which the current request was matched to. | ||
* Route info object structure: | ||
* { | ||
* path: '/ping/:name', | ||
* method: 'GET', | ||
* versions: [], | ||
* name: 'getpingname' | ||
} | ||
* @public | ||
* @function getRoute | ||
* @returns {Object} | ||
*/ | ||
Request.prototype.getRoute = function getRoute() { | ||
var self = this; | ||
return (self.route); | ||
}; |
@@ -408,3 +408,3 @@ // Copyright 2012 Mark Cavage, Inc. All rights reserved. | ||
} else { | ||
cb(new InternalError()); | ||
cb(new InternalError('Route not found: ' + name)); | ||
} | ||
@@ -411,0 +411,0 @@ }; |
@@ -53,3 +53,3 @@ { | ||
], | ||
"version": "5.0.0-beta-7.0", | ||
"version": "5.0.0-beta-8.0", | ||
"repository": { | ||
@@ -100,3 +100,3 @@ "type": "git", | ||
"restify-plugins": "^1.0.3", | ||
"validator": "^6.2.0", | ||
"validator": "^7.0.0", | ||
"watershed": "^0.3.0" | ||
@@ -103,0 +103,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
163558
3457