under-pressure
Advanced tools
Comparing version 5.8.0 to 5.8.1
'use strict' | ||
const fe = require('fastify-error') | ||
const fe = require('@fastify/error') | ||
const fp = require('fastify-plugin') | ||
@@ -5,0 +5,0 @@ const assert = require('assert') |
{ | ||
"name": "under-pressure", | ||
"version": "5.8.0", | ||
"version": "5.8.1", | ||
"description": "Measure process load with automatic handling of 'Service Unavailable' plugin for Fastify.", | ||
@@ -29,7 +29,7 @@ "main": "index.js", | ||
"dependencies": { | ||
"fastify-error": "^0.3.0", | ||
"@fastify/error": "^2.0.0", | ||
"fastify-plugin": "^3.0.0" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^16.3.1", | ||
"@types/node": "^17.0.7", | ||
"fastify": "^3.0.0", | ||
@@ -40,5 +40,5 @@ "pre-commit": "^1.2.2", | ||
"snazzy": "^9.0.0", | ||
"standard": "^16.0.0", | ||
"standard": "^17.0.0", | ||
"tap": "^15.0.10", | ||
"tsd": "^0.14.0", | ||
"tsd": "^0.20.0", | ||
"typescript": "^4.0.3" | ||
@@ -45,0 +45,0 @@ }, |
@@ -126,3 +126,9 @@ # under-pressure | ||
If you need to pass options to the status route, such as logLevel or custom configuration you can pass an object, | ||
To configure the endpoint more specifically you can pass an object. This consists of | ||
- *routeOpts* - Any Fastify [route options](https://www.fastify.io/docs/latest/Reference/Routes/#routes-options) except `schema` | ||
- *routeSchemaOpts* - As per the Fastify route options, an object containing the schema for request | ||
- *routeResponseSchemaOpts* - An object containing the schema for additional response items to be merged with the default response schema, see below | ||
- *url* - The URL to expose the status route on | ||
```js | ||
@@ -145,3 +151,3 @@ fastify.register(require('under-pressure'), { | ||
``` | ||
The above example will set the `logLevel` value for the `/status` route be `debug`. | ||
The above example will set the `logLevel` value for the `/alive` route to be `debug`. | ||
@@ -148,0 +154,0 @@ If you need to return other information in the response, you can return an object from the `healthCheck` function (see next paragraph) and use the `routeResponseSchemaOpts` property to describe your custom response schema (**note**: `status` will always be present in the response) |
Sorry, the diff of this file is not supported yet
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
49553
231
1
+ Added@fastify/error@^2.0.0
+ Added@fastify/error@2.0.0(transitive)
- Removedfastify-error@^0.3.0
- Removedfastify-error@0.3.1(transitive)