rate-limiter-flexible 7.4.0 → 8.0.0

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/index.js CHANGED
@@ -19,6 +19,8 @@ const RateLimiterValkeyGlide = require('./lib/RateLimiterValkeyGlide');
19
19
  const RateLimiterSQLite = require('./lib/RateLimiterSQLite');
20
20
  const RateLimiterEtcd = require('./lib/RateLimiterEtcd');
21
21
  const RateLimiterEtcdNonAtomic = require('./lib/RateLimiterEtcdNonAtomic');
22
+ const RateLimiterQueueError = require('./lib/component/RateLimiterQueueError');
23
+ const RateLimiterEtcdTransactionFailedError = require('./lib/component/RateLimiterEtcdTransactionFailedError');
22
24
 
23
25
  module.exports = {
24
26
  RateLimiterRedis,
@@ -44,4 +46,6 @@ module.exports = {
44
46
  RateLimiterDrizzle,
45
47
  RateLimiterDrizzleNonAtomic,
46
48
  RateLimiterEtcdNonAtomic,
49
+ RateLimiterQueueError,
50
+ RateLimiterEtcdTransactionFailedError,
47
51
  };
package/lib/index.d.ts CHANGED
@@ -546,3 +546,18 @@ export class RateLimiterEtcd extends RateLimiterEtcdNonAtomic {
546
546
  export class RateLimiterEtcdNonAtomic extends RateLimiterStoreAbstract {
547
547
  constructor(opts: IRateLimiterStoreOptions);
548
548
  }
549
+
550
+ export class RateLimiterQueueError extends Error {
551
+ constructor(message?: string, extra?: string);
552
+
553
+ readonly name: string;
554
+ readonly message: string;
555
+ readonly extra: string;
556
+ }
557
+
558
+ export class RateLimiterEtcdTransactionFailedError extends Error {
559
+ constructor(message?: string);
560
+
561
+ readonly name: string;
562
+ readonly message: string;
563
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rate-limiter-flexible",
3
- "version": "7.4.0",
3
+ "version": "8.0.0",
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": {
@@ -1,9 +0,0 @@
1
- export class RateLimiterQueueError extends Error {
2
-
3
- constructor(message?: string, extra?: string);
4
-
5
- readonly name: string;
6
- readonly message: string;
7
- readonly extra: string;
8
-
9
- }