rate-limiter-flexible 2.3.2 → 2.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/component/index.d.ts +9 -0
- package/lib/index.d.ts +6 -0
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -141,6 +141,7 @@ export class RateLimiterAbstract {
|
|
|
141
141
|
/**
|
|
142
142
|
* Get RateLimiterRes in current duration. It always returns RateLimiterRes.isFirstInDuration=false.
|
|
143
143
|
* @param key is usually IP address or some unique client id
|
|
144
|
+
* @param options
|
|
144
145
|
* @returns Promise, which:
|
|
145
146
|
* - `resolved` with RateLimiterRes if key is set
|
|
146
147
|
* - `resolved` with null if key is NOT set or expired
|
|
@@ -205,6 +206,11 @@ export class RateLimiterAbstract {
|
|
|
205
206
|
|
|
206
207
|
export class RateLimiterStoreAbstract extends RateLimiterAbstract {
|
|
207
208
|
constructor(opts: IRateLimiterStoreOptions);
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Cleanup keys blocked in current process memory
|
|
212
|
+
*/
|
|
213
|
+
deleteInMemoryBlockedAll(): void;
|
|
208
214
|
}
|
|
209
215
|
|
|
210
216
|
interface IRateLimiterOptions {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rate-limiter-flexible",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.3",
|
|
4
4
|
"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",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|