@upstash/ratelimit 2.0.2 → 2.0.3
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/index.d.mts +6 -8
- package/dist/index.d.ts +6 -8
- package/dist/index.js +262 -226
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +262 -226
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -20,12 +20,6 @@ interface EphemeralCache {
|
|
|
20
20
|
type RegionContext = {
|
|
21
21
|
redis: Redis;
|
|
22
22
|
cache?: EphemeralCache;
|
|
23
|
-
scriptHashes: {
|
|
24
|
-
limitHash?: string;
|
|
25
|
-
getRemainingHash?: string;
|
|
26
|
-
resetHash?: string;
|
|
27
|
-
};
|
|
28
|
-
cacheScripts: boolean;
|
|
29
23
|
};
|
|
30
24
|
type MultiRegionContext = {
|
|
31
25
|
regionContexts: Omit<RegionContext[], "cache">;
|
|
@@ -570,8 +564,12 @@ type RegionRatelimitConfig = {
|
|
|
570
564
|
*/
|
|
571
565
|
analytics?: boolean;
|
|
572
566
|
/**
|
|
573
|
-
*
|
|
574
|
-
*
|
|
567
|
+
* @deprecated Has no affect since v2.0.3. Instead, hash values of scripts are
|
|
568
|
+
* hardcoded in the sdk and it attempts to run the script using EVALSHA (with the hash).
|
|
569
|
+
* If it fails, runs script load.
|
|
570
|
+
*
|
|
571
|
+
* Previously, if enabled, lua scripts were sent to Redis with SCRIPT LOAD durint the first request.
|
|
572
|
+
* In the subsequent requests, hash of the script would be used to invoke the scripts
|
|
575
573
|
*
|
|
576
574
|
* @default true
|
|
577
575
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -20,12 +20,6 @@ interface EphemeralCache {
|
|
|
20
20
|
type RegionContext = {
|
|
21
21
|
redis: Redis;
|
|
22
22
|
cache?: EphemeralCache;
|
|
23
|
-
scriptHashes: {
|
|
24
|
-
limitHash?: string;
|
|
25
|
-
getRemainingHash?: string;
|
|
26
|
-
resetHash?: string;
|
|
27
|
-
};
|
|
28
|
-
cacheScripts: boolean;
|
|
29
23
|
};
|
|
30
24
|
type MultiRegionContext = {
|
|
31
25
|
regionContexts: Omit<RegionContext[], "cache">;
|
|
@@ -570,8 +564,12 @@ type RegionRatelimitConfig = {
|
|
|
570
564
|
*/
|
|
571
565
|
analytics?: boolean;
|
|
572
566
|
/**
|
|
573
|
-
*
|
|
574
|
-
*
|
|
567
|
+
* @deprecated Has no affect since v2.0.3. Instead, hash values of scripts are
|
|
568
|
+
* hardcoded in the sdk and it attempts to run the script using EVALSHA (with the hash).
|
|
569
|
+
* If it fails, runs script load.
|
|
570
|
+
*
|
|
571
|
+
* Previously, if enabled, lua scripts were sent to Redis with SCRIPT LOAD durint the first request.
|
|
572
|
+
* In the subsequent requests, hash of the script would be used to invoke the scripts
|
|
575
573
|
*
|
|
576
574
|
* @default true
|
|
577
575
|
*/
|