@extend-therapy/elysia-db-ratelimiter 0.0.5 → 0.0.7
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/CHANGELOG.md +13 -0
- package/dist/src/dbRateLimitHandler.js +4 -0
- package/package.json +4 -2
- /package/dist/{index.d.ts → types/index.d.ts} +0 -0
- /package/dist/{src → types/src}/dbRateLimitHandler.d.ts +0 -0
- /package/dist/{src → types/src}/dbRateLimiter.d.ts +0 -0
- /package/dist/{src → types/src}/dbRateLimiter.test.d.ts +0 -0
- /package/dist/{src → types/src}/defaults.d.ts +0 -0
- /package/dist/{src → types/src}/helpers/redisStore.d.ts +0 -0
- /package/dist/{src → types/src}/helpers/sqliteStore.d.ts +0 -0
- /package/dist/{src → types/src}/storeRegistry.d.ts +0 -0
- /package/dist/{src → types/src}/types.d.ts +0 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Changelog for @extend-therapy/elysia-db-ratelimiter
|
|
2
|
+
|
|
3
|
+
## 0.0.7
|
|
4
|
+
|
|
5
|
+
- add declarationDir to tsconfig.json and types to package.json
|
|
6
|
+
|
|
7
|
+
## 0.0.6
|
|
8
|
+
|
|
9
|
+
- return false if failOpen is false and we can't get an IP
|
|
10
|
+
|
|
11
|
+
## 0.0.5
|
|
12
|
+
|
|
13
|
+
- don't return true on failure to get IP
|
|
@@ -46,6 +46,10 @@ export const dbRateLimitHandler = (options) => {
|
|
|
46
46
|
else {
|
|
47
47
|
const errorMsg = "Could not get IP address for rate limiting";
|
|
48
48
|
log.error(errorMsg);
|
|
49
|
+
if (options.failOpen === false) {
|
|
50
|
+
throw new InternalServerError(errorMsg);
|
|
51
|
+
}
|
|
52
|
+
return;
|
|
49
53
|
}
|
|
50
54
|
}
|
|
51
55
|
else {
|
package/package.json
CHANGED
|
@@ -6,10 +6,11 @@
|
|
|
6
6
|
},
|
|
7
7
|
"private": false,
|
|
8
8
|
"type": "module",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.7",
|
|
10
10
|
"author": "Eli Selkin <eli@extendtherapy.com>",
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"main": "dist/index.js",
|
|
13
|
+
"types": "dist/types/index.d.ts",
|
|
13
14
|
"devDependencies": {
|
|
14
15
|
"@types/bun": "latest"
|
|
15
16
|
},
|
|
@@ -28,7 +29,8 @@
|
|
|
28
29
|
"AGENTS.md",
|
|
29
30
|
"README.md",
|
|
30
31
|
"package.json",
|
|
31
|
-
"LICENSE"
|
|
32
|
+
"LICENSE",
|
|
33
|
+
"CHANGELOG.md"
|
|
32
34
|
],
|
|
33
35
|
"engines": {
|
|
34
36
|
"bun": ">=1.3.0"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|