New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@maeum/plugins

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@maeum/plugins

Maeum server flag plugins

Source
npmnpm
Version
0.7.4
Version published
Weekly downloads
3
-62.5%
Maintainers
1
Weekly downloads
 
Created
Source

Maeum plugins

ts Download Status Github Star Github Issues NPM version License ci code style: prettier

Plugins of the a Maeum boilerplate. ResponseTime, Flag variable plugins includes.

Response-Time Plugin

Response time add on header field.

import fastify from 'fastify';
import { responseTimePlugin } from '@maeum/plugins';

const server = fastify();

server
  .register(responseTimePlugin, {
    headerKey: 'X-Response-Time',
    isExecute: () => config.server.runMode !== 'production',
  });
NameDesc.
headerKeyheader key for add response time.
isExecutefunction execution result decide what response time value add or not

Request flag Plugin

Varity flags add on request.

import fastify from 'fastify';
import { requestFlagsPlugin } from '@maeum/plugins';

const server = fastify();

server
  .register(requestFlagsPlugin);
functionDesc.
setRequestLoggingthat indicate what request is logged or not
getRequestLoggingget request is logged
setRequestErrorthat store what error of request
getRequestErrorget error in request
setRequestPayloadthat store what payload in reply
getRequestPayloadget payload in reply

This function need manual works. For example, getRequestError return error before you have to set error variable using setRequestError.

FAQs

Package last updated on 15 Apr 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts