@bejibun/core 0.1.58 → 0.1.60
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 +14 -0
- package/middlewares/RateLimiterMiddleware.js +2 -1
- package/package.json +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,20 @@ All notable changes to this project will be documented in this file.
|
|
|
3
3
|
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
+
## [v0.1.60](https://github.com/crenata/bejibun-core/compare/v0.1.58...v0.1.60) - 2025-12-10
|
|
7
|
+
|
|
8
|
+
### 🩹 Fixes
|
|
9
|
+
- [@bejibun/cache](https://github.com/crenata/bejibun-cache) local with Rate Limiter - [#10](https://github.com/crenata/bejibun-core/issues/10)
|
|
10
|
+
|
|
11
|
+
### 📖 Changes
|
|
12
|
+
|
|
13
|
+
### ❤️Contributors
|
|
14
|
+
- Ghulje ([@ghulje](https://github.com/ghulje))
|
|
15
|
+
|
|
16
|
+
**Full Changelog**: https://github.com/crenata/bejibun-core/blob/master/CHANGELOG.md
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
6
20
|
## [v0.1.58](https://github.com/crenata/bejibun-core/compare/v0.1.57...v0.1.58) - 2025-12-09
|
|
7
21
|
|
|
8
22
|
### 🩹 Fixes
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import App from "@bejibun/app";
|
|
2
2
|
import { defineValue } from "@bejibun/utils";
|
|
3
|
+
import Str from "@bejibun/utils/facades/Str";
|
|
3
4
|
import LimiterConfig from "../config/limiter";
|
|
4
5
|
import RateLimiter from "../facades/RateLimiter";
|
|
5
6
|
export default class RateLimiterMiddleware {
|
|
@@ -12,7 +13,7 @@ export default class RateLimiterMiddleware {
|
|
|
12
13
|
else
|
|
13
14
|
config = LimiterConfig;
|
|
14
15
|
return await RateLimiter
|
|
15
|
-
.attempt(`rate-limiter/${defineValue(server.requestIP(request)?.address, "")}`, defineValue(config?.limit, 60), () => {
|
|
16
|
+
.attempt(`rate-limiter/${Str.ipToFileName(defineValue(server.requestIP(request)?.address, ""))}`, defineValue(config?.limit, 60), () => {
|
|
16
17
|
return handler(request, server);
|
|
17
18
|
});
|
|
18
19
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bejibun/core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.60",
|
|
4
4
|
"author": "Havea Crenata <havea.crenata@gmail.com>",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"@bejibun/cors": "^0.1.16",
|
|
15
15
|
"@bejibun/database": "^0.1.19",
|
|
16
16
|
"@bejibun/logger": "^0.1.22",
|
|
17
|
-
"@bejibun/utils": "^0.1.
|
|
17
|
+
"@bejibun/utils": "^0.1.27",
|
|
18
18
|
"@vinejs/vine": "^3.0.1",
|
|
19
19
|
"commander": "^14.0.2",
|
|
20
20
|
"luxon": "^3.7.2",
|
|
@@ -41,12 +41,13 @@
|
|
|
41
41
|
"license": "MIT",
|
|
42
42
|
"scripts": {
|
|
43
43
|
"alias": "bunx tsc-alias -p tsconfig.json",
|
|
44
|
+
"clean-dist": "rm -rf dist",
|
|
44
45
|
"clean-stubs": "rm -rf stubs",
|
|
45
46
|
"stubs": "cp -rf src/stubs dist",
|
|
46
47
|
"types": "cp -rf src/types dist",
|
|
47
48
|
"rsync": "rsync -a dist/ ./",
|
|
48
49
|
"clean": "rm -rf dist",
|
|
49
|
-
"build": "bun run clean-stubs && bunx tsc -p tsconfig.json && bun run types && bun run alias && bun run stubs && bun run rsync && bun run clean",
|
|
50
|
+
"build": "bun run clean-dist && bun run clean-stubs && bunx tsc -p tsconfig.json && bun run types && bun run alias && bun run stubs && bun run rsync && bun run clean",
|
|
50
51
|
"deploy": "bun run build && bun publish --access public"
|
|
51
52
|
},
|
|
52
53
|
"type": "module",
|