lunibee 0.3.2 → 0.3.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/core/index.js +22 -10
- package/dist/core/index.js.map +8 -8
- package/dist/index.js +403 -38
- package/dist/index.js.map +17 -15
- package/dist/managers/base.d.ts +7 -0
- package/dist/managers/index.js +22 -10
- package/dist/managers/index.js.map +8 -8
- package/dist/rest/index.js +7 -2
- package/dist/rest/index.js.map +3 -3
- package/dist/sharding/cluster.d.ts +28 -0
- package/dist/sharding/host.d.ts +7 -2
- package/dist/sharding/index.d.ts +2 -0
- package/dist/sharding/index.js +376 -28
- package/dist/sharding/index.js.map +11 -9
- package/dist/sharding/leader.d.ts +34 -0
- package/dist/sharding/remote.d.ts +18 -0
- package/dist/sharding/thread.d.ts +30 -0
- package/dist/structures/index.js +3 -3
- package/dist/structures/index.js.map +3 -3
- package/package.json +16 -15
package/dist/rest/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// packages/rest/package.json
|
|
3
3
|
var package_default = {
|
|
4
4
|
name: "@lunibee/rest",
|
|
5
|
-
version: "0.3.
|
|
5
|
+
version: "0.3.3",
|
|
6
6
|
type: "module",
|
|
7
7
|
module: "./src/index.ts",
|
|
8
8
|
types: "./src/index.ts",
|
|
@@ -1336,6 +1336,7 @@ class RedisRateLimitStore {
|
|
|
1336
1336
|
#atomic;
|
|
1337
1337
|
#local = new MemoryRateLimitStore;
|
|
1338
1338
|
#lastError;
|
|
1339
|
+
#warnedSlots = false;
|
|
1339
1340
|
#lastFailureAt;
|
|
1340
1341
|
#failures = 0;
|
|
1341
1342
|
#mode;
|
|
@@ -1434,6 +1435,10 @@ class RedisRateLimitStore {
|
|
|
1434
1435
|
this.#lastError = error;
|
|
1435
1436
|
this.#lastFailureAt = Date.now();
|
|
1436
1437
|
this.#failures++;
|
|
1438
|
+
if (!this.#warnedSlots && /CROSSSLOT/.test(String(error))) {
|
|
1439
|
+
this.#warnedSlots = true;
|
|
1440
|
+
console.warn('[lunibee/rest] Redis Cluster refused a script whose keys hash to different slots (CROSSSLOT): use a hash-tagged prefix such as "{mybot}:rest:".');
|
|
1441
|
+
}
|
|
1437
1442
|
try {
|
|
1438
1443
|
this.#onErrorCallback?.(operation, error);
|
|
1439
1444
|
} catch {}
|
|
@@ -2180,4 +2185,4 @@ export {
|
|
|
2180
2185
|
tokenFingerprint
|
|
2181
2186
|
};
|
|
2182
2187
|
|
|
2183
|
-
//# debugId=
|
|
2188
|
+
//# debugId=94C16174A190B15864756E2164756E21
|