rjweb-server
Advanced tools
Comparing version 8.6.4 to 8.6.5
@@ -0,1 +1,5 @@ | ||
## 8.6.5 | ||
- Added Ratelimit Cleanups every 30 seconds | ||
## 8.6.4 | ||
@@ -2,0 +6,0 @@ |
@@ -103,2 +103,8 @@ "use strict"; | ||
rateLimits: new import_valueCollection.default(), | ||
rateLimitInterval: setInterval(() => { | ||
for (const [key, { end }] of this.globalContext.rateLimits) { | ||
if (end < Date.now()) | ||
this.globalContext.rateLimits.delete(key); | ||
} | ||
}, (0, import_rjutils_collection.time)(30).s()), | ||
logger: new import_logger.default(fullOptions.logging), | ||
@@ -105,0 +111,0 @@ options: fullOptions, |
{ | ||
"name": "rjweb-server", | ||
"version": "8.6.4", | ||
"version": "8.6.5", | ||
"description": "Easy and Robust Way to create a Web Server with Many Easy-to-use Features in NodeJS", | ||
@@ -5,0 +5,0 @@ "main": "./lib/cjs/index.js", |
@@ -10,3 +10,3 @@ import ValueCollection from "./valueCollection"; | ||
import RouteFile from "./router/file"; | ||
import { getFilesRecursively } from "rjutils-collection"; | ||
import { getFilesRecursively, time } from "rjutils-collection"; | ||
import { HttpRequest, WsClose, WsConnect, WsMessage } from "../types/external"; | ||
@@ -71,2 +71,8 @@ import mergeClasses from "../functions/mergeClasses"; | ||
rateLimits: new ValueCollection(), | ||
rateLimitInterval: setInterval(() => { | ||
for (const [key, { end }] of this.globalContext.rateLimits) { | ||
if (end < Date.now()) | ||
this.globalContext.rateLimits.delete(key); | ||
} | ||
}, time(30).s()), | ||
logger: new Logger(fullOptions.logging), | ||
@@ -73,0 +79,0 @@ options: fullOptions, |
{ | ||
"name": "rjweb-server", | ||
"version": "8.6.4", | ||
"version": "8.6.5", | ||
"description": "Easy and Robust Way to create a Web Server with Many Easy-to-use Features in NodeJS", | ||
@@ -5,0 +5,0 @@ "main": "./lib/cjs/index.js", |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import ValueCollection from "../classes/valueCollection"; | ||
@@ -92,2 +93,3 @@ import Server from "../classes/server"; | ||
}>; | ||
/** The Rate Limit Cleanup Interval */ rateLimitInterval: NodeJS.Timer; | ||
/** The WebSocket Stats */ webSockets: { | ||
@@ -94,0 +96,0 @@ /** The Amount of Sockets Opened */ opened: DataStat; |
{ | ||
"name": "rjweb-server", | ||
"version": "8.6.4", | ||
"version": "8.6.5", | ||
"description": "Easy and Robust Way to create a Web Server with Many Easy-to-use Features in NodeJS", | ||
@@ -5,0 +5,0 @@ "main": "./lib/cjs/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Unpopular package
QualityThis package is not very popular.
Found 1 instance in 1 package
2020513
2398
19247
0
1