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

rate-limiter-flexible

Package Overview
Dependencies
Maintainers
1
Versions
164
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rate-limiter-flexible - npm Package Compare versions

Comparing version 4.0.1 to 5.0.0

lib/RateLimiterPrisma.js

4

index.js

@@ -14,2 +14,3 @@ const RateLimiterRedis = require('./lib/RateLimiterRedis');

const RateLimiterDynamo = require('./lib/RateLimiterDynamo');
const RateLimiterPrisma = require('./lib/RateLimiterPrisma');

@@ -31,3 +32,4 @@ module.exports = {

RateLimiterRes,
RateLimiterDynamo
RateLimiterDynamo,
RateLimiterPrisma,
};

@@ -9,3 +9,4 @@ const LIMITER_TYPES = {

POSTGRES: 'postgres',
DYNAMO: 'dynamo'
DYNAMO: 'dynamo',
PRISMA: 'prisma',
};

@@ -12,0 +13,0 @@

@@ -352,2 +352,6 @@ export interface IRateLimiterRes {

export class RateLimiterPrisma extends RateLimiterStoreAbstract {
constructor(opts: IRateLimiterStoreNoAutoExpiryOptions, cb?: ICallbackReady);
}
export class RateLimiterMemcache extends RateLimiterStoreAbstract { }

@@ -354,0 +358,0 @@

{
"name": "rate-limiter-flexible",
"version": "4.0.1",
"version": "5.0.0",
"description": "Node.js rate limiter by key and protection from DDoS and Brute-Force attacks in process Memory, Redis, MongoDb, Memcached, MySQL, PostgreSQL, Cluster or PM",

@@ -9,3 +9,4 @@ "main": "index.js",

"dc:down": "docker-compose -f docker-compose.yml down",
"test": "nyc --reporter=html --reporter=text mocha",
"prisma:postgres": "prisma generate --schema=./test/RateLimiterPrisma/Postgres/schema.prisma && prisma db push --schema=./test/RateLimiterPrisma/Postgres/schema.prisma",
"test": "npm run prisma:postgres && nyc --reporter=html --reporter=text mocha",
"debug-test": "mocha --inspect-brk lib/**/**.test.js",

@@ -21,2 +22,3 @@ "coveralls": "cat ./coverage/lcov.info | coveralls",

"keywords": [
"ratelimter",
"authorization",

@@ -26,13 +28,13 @@ "security",

"limit",
"ratelimter",
"brute",
"force",
"bruteforce",
"throttle",
"redis",
"mongodb",
"dynamodb",
"mysql",
"postgres",
"prisma",
"koa",
"express",
"hapi",
"auth",
"ddos",
"queue"
"hapi"
],

@@ -48,2 +50,3 @@ "author": "animir <animirr@gmail.com>",

"@aws-sdk/client-dynamodb": "^3.431.0",
"@prisma/client": "^5.8.0",
"chai": "^4.1.2",

@@ -61,2 +64,3 @@ "coveralls": "^3.0.1",

"nyc": "^15.1.0",
"prisma": "^5.8.0",
"redis": "^4.6.8",

@@ -63,0 +67,0 @@ "redis-mock": "^0.48.0",

@@ -1,2 +0,1 @@

[![Coverage Status](https://coveralls.io/repos/animir/node-rate-limiter-flexible/badge.svg?branch=master)](https://coveralls.io/r/animir/node-rate-limiter-flexible?branch=master)
[![npm version](https://badge.fury.io/js/rate-limiter-flexible.svg)](https://www.npmjs.com/package/rate-limiter-flexible)

@@ -7,3 +6,3 @@ ![npm](https://img.shields.io/npm/dm/rate-limiter-flexible.svg)

[node-image]: https://img.shields.io/badge/node.js-%3E=_14.0-green.svg?style=flat-square
[node-image]: https://img.shields.io/badge/node.js-%3E=_16.0-green.svg?style=flat-square
[node-url]: http://nodejs.org/download/

@@ -56,2 +55,4 @@

import { RateLimiterMemory } from "rate-limiter-flexible";
// or
import RateLimiterMemory from "rate-limiter-flexible/lib/RateLimiterMemory.js";
```

@@ -107,3 +108,2 @@

* TypeScript declaration bundled
* allow traffic burst with [BurstyRateLimiter](https://github.com/animir/node-rate-limiter-flexible/wiki/BurstyRateLimiter)
* Block Strategy against really powerful DDoS attacks (like 100k requests per sec) [Read about it and benchmarking here](https://github.com/animir/node-rate-limiter-flexible/wiki/In-memory-Block-Strategy)

@@ -114,2 +114,4 @@ * Insurance Strategy as emergency solution if database / store is down [Read about Insurance Strategy here](https://github.com/animir/node-rate-limiter-flexible/wiki/Insurance-Strategy)

Full documentation is on [Wiki](https://github.com/animir/node-rate-limiter-flexible/wiki)
### Middlewares, plugins and other packages

@@ -142,11 +144,12 @@ * [Express middleware](https://github.com/animir/node-rate-limiter-flexible/wiki/Express-Middleware)

* [API methods](https://github.com/animir/node-rate-limiter-flexible/wiki/API-methods)
* [Redis](https://github.com/animir/node-rate-limiter-flexible/wiki/Redis)
* [Memory](https://github.com/animir/node-rate-limiter-flexible/wiki/Memory)
* [DynamoDb](https://github.com/animir/node-rate-limiter-flexible/wiki/DynamoDB)
* [Prisma](https://github.com/animir/node-rate-limiter-flexible/wiki/Prisma)
* [BurstyRateLimiter](https://github.com/animir/node-rate-limiter-flexible/wiki/BurstyRateLimiter) Traffic burst support
* [RateLimiterRedis](https://github.com/animir/node-rate-limiter-flexible/wiki/Redis)
* [RateLimiterDynamo](https://github.com/animir/node-rate-limiter-flexible/wiki/DynamoDB)
* [RateLimiterMemcache](https://github.com/animir/node-rate-limiter-flexible/wiki/Memcache)
* [RateLimiterMongo](https://github.com/animir/node-rate-limiter-flexible/wiki/Mongo) (with [sharding support](https://github.com/animir/node-rate-limiter-flexible/wiki/Mongo#mongodb-sharding-options))
* [RateLimiterMySQL](https://github.com/animir/node-rate-limiter-flexible/wiki/MySQL) (support Sequelize and Knex)
* [RateLimiterPostgres](https://github.com/animir/node-rate-limiter-flexible/wiki/PostgreSQL) (support Sequelize, TypeORM and Knex)
* [Mongo](https://github.com/animir/node-rate-limiter-flexible/wiki/Mongo) (with [sharding support](https://github.com/animir/node-rate-limiter-flexible/wiki/Mongo#mongodb-sharding-options))
* [MySQL](https://github.com/animir/node-rate-limiter-flexible/wiki/MySQL) (support Sequelize and Knex)
* [Postgres](https://github.com/animir/node-rate-limiter-flexible/wiki/PostgreSQL) (support Sequelize, TypeORM and Knex)
* [RateLimiterCluster](https://github.com/animir/node-rate-limiter-flexible/wiki/Cluster) ([PM2 cluster docs read here](https://github.com/animir/node-rate-limiter-flexible/wiki/PM2-cluster))
* [RateLimiterMemory](https://github.com/animir/node-rate-limiter-flexible/wiki/Memory)
* [Memcache](https://github.com/animir/node-rate-limiter-flexible/wiki/Memcache)
* [RateLimiterUnion](https://github.com/animir/node-rate-limiter-flexible/wiki/RateLimiterUnion) Combine 2 or more limiters to act as single

@@ -153,0 +156,0 @@ * [RLWrapperBlackAndWhite](https://github.com/animir/node-rate-limiter-flexible/wiki/Black-and-White-lists) Black and White lists

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