Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

under-pressure

Package Overview
Dependencies
Maintainers
17
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

under-pressure - npm Package Compare versions

Comparing version 5.8.0 to 5.8.1

2

index.js
'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

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