mielk-api 1.5.4 → 1.5.5
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/dist/middlewares/index.d.ts +0 -12
- package/dist/middlewares/index.js +0 -12
- package/dist/middlewares/rateLimit/index.d.ts +1 -2
- package/dist/middlewares/rateLimit/index.js +1 -2
- package/dist/middlewares/redis/index.d.ts +14 -0
- package/dist/middlewares/redis/index.js +16 -0
- package/package.json +6 -1
|
@@ -3,18 +3,6 @@ import { privateCors } from './cors/privateCors.js';
|
|
|
3
3
|
import { publicCors } from './cors/publicCors.js';
|
|
4
4
|
import { apiKeyAuthorization } from './requestAuth/auth.middleware.js';
|
|
5
5
|
import { validateQueryParams, validateBodyJson } from './zod/validate.js';
|
|
6
|
-
import { RedisLockerConfigFactory } from './redis/redisLockerConfigFactory.js';
|
|
7
|
-
import { RedisLockerConfig, RedisLockerConfigParams } from './redis/types.js';
|
|
8
|
-
import { setRedisLock, removeRedisLock } from './redis/redisLocker.js';
|
|
9
|
-
import { RedisLockCheckerConfigFactory } from './redis/redisLockCheckerConfigFactory.js';
|
|
10
|
-
import { RedisLockChecker, RedisLockCheckerConfig, RedisLockCheckerConfigParams } from './redis/types.js';
|
|
11
|
-
import { createRedisLockChecker, checkIfLockedInRedis } from './redis/redisLockChecker.js';
|
|
12
6
|
export { CorsConfig, initCors, privateCors, publicCors };
|
|
13
7
|
export { apiKeyAuthorization };
|
|
14
8
|
export { validateQueryParams, validateBodyJson };
|
|
15
|
-
export { RedisLockerConfigFactory };
|
|
16
|
-
export { RedisLockerConfig, RedisLockerConfigParams };
|
|
17
|
-
export { setRedisLock, removeRedisLock };
|
|
18
|
-
export { createRedisLockChecker, checkIfLockedInRedis };
|
|
19
|
-
export { RedisLockCheckerConfigFactory };
|
|
20
|
-
export { RedisLockChecker, RedisLockCheckerConfig, RedisLockCheckerConfigParams };
|
|
@@ -3,18 +3,6 @@ import { privateCors } from './cors/privateCors.js';
|
|
|
3
3
|
import { publicCors } from './cors/publicCors.js';
|
|
4
4
|
import { apiKeyAuthorization } from './requestAuth/auth.middleware.js';
|
|
5
5
|
import { validateQueryParams, validateBodyJson } from './zod/validate.js';
|
|
6
|
-
// Redis locker
|
|
7
|
-
import { RedisLockerConfigFactory } from './redis/redisLockerConfigFactory.js';
|
|
8
|
-
import { setRedisLock, removeRedisLock } from './redis/redisLocker.js';
|
|
9
|
-
// Redis lock checker
|
|
10
|
-
import { RedisLockCheckerConfigFactory } from './redis/redisLockCheckerConfigFactory.js';
|
|
11
|
-
import { createRedisLockChecker, checkIfLockedInRedis } from './redis/redisLockChecker.js';
|
|
12
6
|
export { initCors, privateCors, publicCors };
|
|
13
7
|
export { apiKeyAuthorization };
|
|
14
8
|
export { validateQueryParams, validateBodyJson };
|
|
15
|
-
// Redis locker
|
|
16
|
-
export { RedisLockerConfigFactory };
|
|
17
|
-
export { setRedisLock, removeRedisLock };
|
|
18
|
-
// Redis lock checker
|
|
19
|
-
export { createRedisLockChecker, checkIfLockedInRedis };
|
|
20
|
-
export { RedisLockCheckerConfigFactory };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { checkRateLimit } from './checkRateLimit.js';
|
|
2
2
|
import { createRateLimiter } from './createRateLimiter.js';
|
|
3
3
|
import { RateLimitConfigFactory } from './rateLimitConfigFactory.js';
|
|
4
|
-
import { RedisKeyFactory } from '../redis/redisKeysFactory.js';
|
|
5
4
|
import { type RateLimiter, RateLimitConfig, RateLimit, RateLimitCheck } from './types.js';
|
|
6
|
-
export { checkRateLimit, createRateLimiter, RateLimitConfigFactory
|
|
5
|
+
export { checkRateLimit, createRateLimiter, RateLimitConfigFactory };
|
|
7
6
|
export { RateLimitConfig, RateLimit, RateLimitCheck };
|
|
8
7
|
export type { RateLimiter };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { checkRateLimit } from './checkRateLimit.js';
|
|
2
2
|
import { createRateLimiter } from './createRateLimiter.js';
|
|
3
3
|
import { RateLimitConfigFactory } from './rateLimitConfigFactory.js';
|
|
4
|
-
|
|
5
|
-
export { checkRateLimit, createRateLimiter, RateLimitConfigFactory, RedisKeyFactory };
|
|
4
|
+
export { checkRateLimit, createRateLimiter, RateLimitConfigFactory };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { RedisLockerConfigFactory } from './redisLockerConfigFactory.js';
|
|
2
|
+
import { RedisLockerConfig, RedisLockerConfigParams } from './types.js';
|
|
3
|
+
import { setRedisLock, removeRedisLock } from './redisLocker.js';
|
|
4
|
+
import { RedisLockCheckerConfigFactory } from './redisLockCheckerConfigFactory.js';
|
|
5
|
+
import { RedisLockChecker, RedisLockCheckerConfig, RedisLockCheckerConfigParams } from './types.js';
|
|
6
|
+
import { createRedisLockChecker, checkIfLockedInRedis } from './redisLockChecker.js';
|
|
7
|
+
import { generateRedisKey, RedisKeyFactory } from './redisKeysFactory.js';
|
|
8
|
+
export { RedisLockerConfigFactory };
|
|
9
|
+
export { RedisLockerConfig, RedisLockerConfigParams };
|
|
10
|
+
export { setRedisLock, removeRedisLock };
|
|
11
|
+
export { createRedisLockChecker, checkIfLockedInRedis };
|
|
12
|
+
export { RedisLockCheckerConfigFactory };
|
|
13
|
+
export { RedisLockChecker, RedisLockCheckerConfig, RedisLockCheckerConfigParams };
|
|
14
|
+
export { generateRedisKey, RedisKeyFactory };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Redis locker
|
|
2
|
+
import { RedisLockerConfigFactory } from './redisLockerConfigFactory.js';
|
|
3
|
+
import { setRedisLock, removeRedisLock } from './redisLocker.js';
|
|
4
|
+
// Redis lock checker
|
|
5
|
+
import { RedisLockCheckerConfigFactory } from './redisLockCheckerConfigFactory.js';
|
|
6
|
+
import { createRedisLockChecker, checkIfLockedInRedis } from './redisLockChecker.js';
|
|
7
|
+
// Redis keys
|
|
8
|
+
import { generateRedisKey, RedisKeyFactory } from './redisKeysFactory.js';
|
|
9
|
+
// Redis locker
|
|
10
|
+
export { RedisLockerConfigFactory };
|
|
11
|
+
export { setRedisLock, removeRedisLock };
|
|
12
|
+
// Redis lock checker
|
|
13
|
+
export { createRedisLockChecker, checkIfLockedInRedis };
|
|
14
|
+
export { RedisLockCheckerConfigFactory };
|
|
15
|
+
// Redis keys
|
|
16
|
+
export { generateRedisKey, RedisKeyFactory };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mielk-api",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.5",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": "mielk",
|
|
6
6
|
"description": "Wrapper for API operations",
|
|
@@ -37,6 +37,11 @@
|
|
|
37
37
|
"types": "./dist/middlewares/rateLimit/index.d.ts",
|
|
38
38
|
"import": "./dist/middlewares/rateLimit/index.js",
|
|
39
39
|
"default": "./dist/middlewares/rateLimit/index.js"
|
|
40
|
+
},
|
|
41
|
+
"./redis": {
|
|
42
|
+
"types": "./dist/middlewares/redis/index.d.ts",
|
|
43
|
+
"import": "./dist/middlewares/redis/index.js",
|
|
44
|
+
"default": "./dist/middlewares/redis/index.js"
|
|
40
45
|
}
|
|
41
46
|
},
|
|
42
47
|
"scripts": {
|