@merkl/api 0.10.205 → 0.10.207

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/package.json CHANGED
@@ -89,5 +89,5 @@
89
89
  "access": "public",
90
90
  "registry": "https://registry.npmjs.org/"
91
91
  },
92
- "version": "v0.10.205"
92
+ "version": "v0.10.207"
93
93
  }
@@ -1,63 +0,0 @@
1
- declare const _default: {
2
- permissive: (app: import("elysia").default) => import("elysia").default<"", false, {
3
- decorator: {};
4
- store: {};
5
- derive: {};
6
- resolve: {};
7
- }, {
8
- type: {};
9
- error: {};
10
- }, {
11
- schema: {};
12
- macro: {};
13
- }, {}, {
14
- derive: {};
15
- resolve: {};
16
- schema: {};
17
- }, {
18
- derive: {};
19
- resolve: {};
20
- schema: {};
21
- }>;
22
- moderate: (app: import("elysia").default) => import("elysia").default<"", false, {
23
- decorator: {};
24
- store: {};
25
- derive: {};
26
- resolve: {};
27
- }, {
28
- type: {};
29
- error: {};
30
- }, {
31
- schema: {};
32
- macro: {};
33
- }, {}, {
34
- derive: {};
35
- resolve: {};
36
- schema: {};
37
- }, {
38
- derive: {};
39
- resolve: {};
40
- schema: {};
41
- }>;
42
- strict: (app: import("elysia").default) => import("elysia").default<"", false, {
43
- decorator: {};
44
- store: {};
45
- derive: {};
46
- resolve: {};
47
- }, {
48
- type: {};
49
- error: {};
50
- }, {
51
- schema: {};
52
- macro: {};
53
- }, {}, {
54
- derive: {};
55
- resolve: {};
56
- schema: {};
57
- }, {
58
- derive: {};
59
- resolve: {};
60
- schema: {};
61
- }>;
62
- };
63
- export default _default;
@@ -1,13 +0,0 @@
1
- import { rateLimit } from "elysia-rate-limit";
2
- import { app } from "..";
3
- //returns ip from headers if server is null to make elysia-rate-limit logs stfu
4
- const generator = req => {
5
- return (app?.server?.requestIP?.(req)?.address ?? req.headers.get("X-Forwarded-For")?.split(",")?.[0]);
6
- };
7
- //use very permissive rates in local
8
- const rate = (duration, max) => rateLimit(Bun.env.NODE_ENV !== "production" ? { duration: 1, max: 100 } : { duration, max });
9
- export default {
10
- permissive: rate(1000, 18),
11
- moderate: rate(1000, 9),
12
- strict: rate(1000, 3),
13
- };