diff --git a/client/css/game.css b/client/css/game.css index 6d4b2c3..39010cf 100644 --- a/client/css/game.css +++ b/client/css/game.css @@ -1,3 +1,41 @@ +#menu { + position: absolute; + top: 50%; + left: 50%; + translate: -50% -50%; +} +#menu h1 { + text-align: center; + font-size: 50px; + margin: 10px; + color: rgb(97, 47, 0); +} +#menu .box { + background: rgb(180, 124, 52); + box-shadow: 0 0 70px rgba(0, 0, 0, 0.7); + padding: 10px 25px; + border-radius: 8px; + display: box; +} +#menu .box input { + display: block; + margin: 15px; + padding: 10px 0px; + font-size: 22px; + width: 250px !important; + margin-left: auto; + margin-right: auto; +} +#menu .box button { + display: block; + margin: 15px; + padding: 10px 20px; + font-size: 22px; + width: 250px; + margin-left: auto; + margin-right: auto; +} + #pieces-area { width: 100%; height: 100%; @@ -66,4 +104,22 @@ } #game #playfield .row:nth-child(odd) .tile:nth-child(odd) { background: black; +} + +@keyframes invalid-move-animation { + 0% { + transform: translateX(0); + } + 25% { + transform: translateX(5px); + } + 50% { + transform: translateX(-5px); + } + 75% { + transform: translateX(5px); + } + 100% { + transform: translateX(0); + } }/*# sourceMappingURL=game.css.map */ \ No newline at end of file diff --git a/client/css/game.css.map b/client/css/game.css.map index ecff297..8f4d60e 100644 --- a/client/css/game.css.map +++ b/client/css/game.css.map @@ -1 +1 @@ -{"version":3,"sources":["game.scss","game.css"],"names":[],"mappings":"AAAA;EAGI,WAAA;EACA,YAAA;EACA,kBAAA;ACDJ;ADGI;EACI,WAAA;EACA,kBAAA;EACA,eAAA;EACA,2BAAA;EACA,qBAAA;EACA,4BAAA;EACA,yBAAA;EACA,8BAAA;EACA,kEAAA;EACA,UAAA;EACA,kBAAA;EAEA,eAAA;ACFR;ADGQ;EACI,qCAAA;EACA,0CAAA;ACDZ;ADIY;EACI,4DAAA;ACFhB;ADIY;EACI,4DAAA;ACFhB;ADOY;EACI,4DAAA;ACLhB;ADOY;EACI,4DAAA;ACLhB;;ADWI;EACI,6BAAA;EACA,aAAA;EACA,wCAAA;EACA,YAAA;EACA,kBAAA;EACA,uBAAA;EAAA,kBAAA;EACA,kBAAA;ACRR;ADSQ;EACI,qBAAA;ACPZ;ADQY;EACI,kBAAA;EACA,WAAA;EACA,kBAAA;EACA,eAAA;EACA,WAAA;EACA,eAAA;EACA,iBAAA;ACNhB;ADQgB;EACI,iBAAA;EACA,qDAAA;ACNpB;ADUgB;EACI,iBAAA;EACA,qDAAA;ACRpB;ADUgB;EACI,iBAAA;ACRpB","file":"game.css"} \ No newline at end of file +{"version":3,"sources":["game.scss","game.css"],"names":[],"mappings":"AAAA;EACI,kBAAA;EACA,QAAA;EACA,SAAA;EACA,oBAAA;ACCJ;ADAI;EACI,kBAAA;EACA,eAAA;EACA,YAAA;EACA,qBAAA;ACER;ADAI;EACI,6BAAA;EACA,uCAAA;EACA,kBAAA;EACA,kBAAA;EACA,YAAA;ACER;ADDQ;EACI,cAAA;EACA,YAAA;EACA,iBAAA;EACA,eAAA;EACA,uBAAA;EACA,iBAAA;EACA,kBAAA;ACGZ;ADDQ;EACI,cAAA;EACA,YAAA;EACA,kBAAA;EACA,eAAA;EACA,YAAA;EACA,iBAAA;EACA,kBAAA;ACGZ;;ADGA;EAGI,WAAA;EACA,YAAA;EACA,kBAAA;ACFJ;ADII;EACI,WAAA;EACA,kBAAA;EACA,eAAA;EACA,2BAAA;EACA,qBAAA;EACA,4BAAA;EACA,yBAAA;EACA,8BAAA;EACA,kEAAA;EACA,UAAA;EACA,kBAAA;EAEA,eAAA;ACHR;ADIQ;EACI,qCAAA;EACA,0CAAA;ACFZ;ADKY;EACI,4DAAA;ACHhB;ADKY;EACI,4DAAA;ACHhB;ADQY;EACI,4DAAA;ACNhB;ADQY;EACI,4DAAA;ACNhB;;ADaI;EACI,6BAAA;EACA,aAAA;EACA,wCAAA;EACA,YAAA;EACA,kBAAA;EACA,uBAAA;EAAA,kBAAA;EACA,kBAAA;ACVR;ADWQ;EACI,qBAAA;ACTZ;ADUY;EACI,kBAAA;EACA,WAAA;EACA,kBAAA;EACA,eAAA;EACA,WAAA;EACA,eAAA;EACA,iBAAA;ACRhB;ADUgB;EACI,iBAAA;EACA,qDAAA;ACRpB;ADYgB;EACI,iBAAA;EACA,qDAAA;ACVpB;ADYgB;EACI,iBAAA;ACVpB;;ADmBA;EACI;IAAK,wBAAA;ECfP;EDgBE;IAAM,0BAAA;ECbR;EDcE;IAAM,2BAAA;ECXR;EDYE;IAAM,0BAAA;ECTR;EDUE;IAAO,wBAAA;ECPT;AACF","file":"game.css"} \ No newline at end of file diff --git a/client/css/game.scss b/client/css/game.scss index 9c86065..6087ecf 100644 --- a/client/css/game.scss +++ b/client/css/game.scss @@ -1,3 +1,42 @@ +#menu{ + position: absolute; + top: 50%; + left: 50%; + translate: -50% -50%; + h1{ + text-align: center; + font-size: 50px; + margin: 10px; + color: rgb(97, 47, 0); + } + .box{ + background: rgb(180, 124, 52); + box-shadow: 0 0 70px rgba(0,0,0,0.7); + padding: 10px 25px; + border-radius: 8px; + display: box; + input{ + display:block; + margin: 15px; + padding: 10px 0px; + font-size: 22px; + width: 250px !important; + margin-left: auto; + margin-right: auto; + } + button{ + display:block; + margin: 15px; + padding: 10px 20px; + font-size: 22px; + width: 250px; + margin-left: auto; + margin-right: auto; + } + + } +} + #pieces-area{ diff --git a/client/css/main.css b/client/css/main.css index c2ded7a..2723bd0 100644 --- a/client/css/main.css +++ b/client/css/main.css @@ -1,8 +1,54 @@ +@font-face { + font-family: pacifico; + src: url("./../resources/fonts/Pacifico-Regular.ttf"); +} +@font-face { + font-family: PoetsenOne; + src: url("./../resources/fonts/PoetsenOne-Regular.ttf"); +} body { + font-family: PoetsenOne; background-color: rgb(223, 201, 172); margin: 0; padding: 0; } +body h1 { + font-family: Pacifico; +} +body input { + font-family: PoetsenOne; + cursor: pointer; + padding: 5px 20px; + font-size: 18px; + border-radius: 5px; + text-align: center; + width: -moz-fit-content; + width: fit-content; + box-shadow: 3px 5px 10px rgba(0, 0, 0, 0.5) inset; + background: rgba(255, 255, 255, 0.3); + border: none; +} +body input:focus { + background: rgba(255, 255, 255, 0.5); + outline: none; +} +body button { + font-family: PoetsenOne; + cursor: pointer; + padding: 5px 20px; + font-size: 18px; + border: none; + border-radius: 5px; + background: linear-gradient(45deg, rgb(204, 150, 34), rgb(236, 199, 119)); + box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.4); + transition: 0.2s; +} +body button:hover { + box-shadow: 5px 10px 10px rgba(0, 0, 0, 0.4); +} +body button:active { + scale: 0.9; +} body #game { position: absolute; top: 50%; diff --git a/client/css/main.css.map b/client/css/main.css.map index 816487a..e80b9ed 100644 --- a/client/css/main.css.map +++ b/client/css/main.css.map @@ -1 +1 @@ -{"version":3,"sources":["main.scss","main.css"],"names":[],"mappings":"AAAA;EACI,oCAAA;EACA,SAAA;EACA,UAAA;ACCJ;ADAI;EACI,kBAAA;EACA,QAAA;EACA,SAAA;EACA,oBAAA;ACER","file":"main.css"} \ No newline at end of file +{"version":3,"sources":["main.scss","main.css"],"names":[],"mappings":"AAAA;EACI,qBAAA;EACA,qDAAA;ACCJ;ADCA;EACI,uBAAA;EACA,uDAAA;ACCJ;ADEA;EACI,uBAAA;EACA,oCAAA;EACA,SAAA;EACA,UAAA;ACAJ;ADCI;EACI,qBAAA;ACCR;ADCI;EACI,uBAAA;EACA,eAAA;EACA,iBAAA;EACA,eAAA;EACA,kBAAA;EACA,kBAAA;EACA,uBAAA;EAAA,kBAAA;EACA,iDAAA;EACA,oCAAA;EACA,YAAA;ACCR;ADAQ;EACI,oCAAA;EACA,aAAA;ACEZ;ADCI;EACI,uBAAA;EACA,eAAA;EACA,iBAAA;EACA,eAAA;EACA,YAAA;EACA,kBAAA;EACA,yEAAA;EACA,2CAAA;EACA,gBAAA;ACCR;ADAQ;EACI,4CAAA;ACEZ;ADAQ;EACI,UAAA;ACEZ;ADCI;EACI,kBAAA;EACA,QAAA;EACA,SAAA;EACA,oBAAA;ACCR","file":"main.css"} \ No newline at end of file diff --git a/client/css/main.scss b/client/css/main.scss index 2ffec6f..90685a6 100644 --- a/client/css/main.scss +++ b/client/css/main.scss @@ -1,7 +1,53 @@ +@font-face { + font-family: pacifico; + src: url('./../resources/fonts/Pacifico-Regular.ttf'); +} +@font-face { + font-family: PoetsenOne; + src: url('./../resources/fonts/PoetsenOne-Regular.ttf'); +} + body{ + font-family: PoetsenOne; background-color: rgb(223, 201, 172); margin: 0; padding: 0; + h1{ + font-family: Pacifico; + } + input{ + font-family: PoetsenOne; + cursor: pointer; + padding: 5px 20px; + font-size: 18px; + border-radius: 5px; + text-align: center; + width: fit-content; + box-shadow: 3px 5px 10px rgba(0,0,0,0.5) inset; + background: rgba(255, 255, 255, 0.3); + border: none; + &:focus{ + background: rgba(255, 255, 255, 0.5); + outline: none; + } + } + button{ + font-family: PoetsenOne; + cursor: pointer; + padding: 5px 20px; + font-size: 18px; + border: none; + border-radius: 5px; + background: linear-gradient(45deg,rgb(204, 150, 34), rgb(236, 199, 119)); + box-shadow: 3px 3px 10px rgba(0,0,0,0.4); + transition: 0.2s; + &:hover{ + box-shadow: 5px 10px 10px rgba(0,0,0,0.4); + } + &:active{ + scale: 0.9; + } + } #game{ position: absolute; top: 50%; diff --git a/client/game.html b/client/game.html new file mode 100644 index 0000000..964f1b2 --- /dev/null +++ b/client/game.html @@ -0,0 +1,31 @@ + + + + + + Dáma Online + + + + + +
+
+
+
+ + + + + + + \ No newline at end of file diff --git a/client/javascript/communication.js b/client/javascript/communication.js new file mode 100644 index 0000000..0604728 --- /dev/null +++ b/client/javascript/communication.js @@ -0,0 +1,3 @@ +//const socket = io("ws://localhost:3000"); +document.getElementById("game").style.display = "none"; +document.getElementById("form").style.display = "block"; diff --git a/client/new.html b/client/new.html index e443256..ce924b6 100644 --- a/client/new.html +++ b/client/new.html @@ -24,6 +24,16 @@ \ No newline at end of file diff --git a/client/resources/fonts/Pacifico-Regular.ttf b/client/resources/fonts/Pacifico-Regular.ttf new file mode 100644 index 0000000..e7def95 Binary files /dev/null and b/client/resources/fonts/Pacifico-Regular.ttf differ diff --git a/client/resources/fonts/PoetsenOne-Regular.ttf b/client/resources/fonts/PoetsenOne-Regular.ttf new file mode 100644 index 0000000..1a89422 Binary files /dev/null and b/client/resources/fonts/PoetsenOne-Regular.ttf differ diff --git a/server/communication.js b/server/communication.js index db17a95..8ebe775 100644 --- a/server/communication.js +++ b/server/communication.js @@ -14,6 +14,9 @@ io.on('connection', (socket) => { socket.on('disconnect', () => { console.log('user disconnected'); }); + socket.on('chat message', (msg) => { + console.log('message: ' + msg); + }); }); server.listen(3000, () => { diff --git a/server/node_modules/.package-lock.json b/server/node_modules/.package-lock.json index bfb0585..3cbfd25 100644 --- a/server/node_modules/.package-lock.json +++ b/server/node_modules/.package-lock.json @@ -1,9 +1,68 @@ { - "name": "socket-chat-example", + "name": "dama-online-backend", "version": "0.0.1", "lockfileVersion": 3, "requires": true, "packages": { + "node_modules/@redis/bloom": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@redis/bloom/-/bloom-1.2.0.tgz", + "integrity": "sha512-HG2DFjYKbpNmVXsa0keLHp/3leGJz1mjh09f2RLGGLQZzSHpkmZWuwJbAvo3QcRY8p80m5+ZdXZdYOSBLlp7Cg==", + "license": "MIT", + "peerDependencies": { + "@redis/client": "^1.0.0" + } + }, + "node_modules/@redis/client": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@redis/client/-/client-1.6.0.tgz", + "integrity": "sha512-aR0uffYI700OEEH4gYnitAnv3vzVGXCFvYfdpu/CJKvk4pHfLPEy/JSZyrpQ+15WhXe1yJRXLtfQ84s4mEXnPg==", + "license": "MIT", + "dependencies": { + "cluster-key-slot": "1.1.2", + "generic-pool": "3.9.0", + "yallist": "4.0.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/@redis/graph": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@redis/graph/-/graph-1.1.1.tgz", + "integrity": "sha512-FEMTcTHZozZciLRl6GiiIB4zGm5z5F3F6a6FZCyrfxdKOhFlGkiAqlexWMBzCi4DcRoyiOsuLfW+cjlGWyExOw==", + "license": "MIT", + "peerDependencies": { + "@redis/client": "^1.0.0" + } + }, + "node_modules/@redis/json": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@redis/json/-/json-1.0.7.tgz", + "integrity": "sha512-6UyXfjVaTBTJtKNG4/9Z8PSpKE6XgSyEb8iwaqDcy+uKrd/DGYHTWkUdnQDyzm727V7p21WUMhsqz5oy65kPcQ==", + "license": "MIT", + "peerDependencies": { + "@redis/client": "^1.0.0" + } + }, + "node_modules/@redis/search": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@redis/search/-/search-1.2.0.tgz", + "integrity": "sha512-tYoDBbtqOVigEDMAcTGsRlMycIIjwMCgD8eR2t0NANeQmgK/lvxNAvYyb6bZDD4frHRhIHkJu2TBRvB0ERkOmw==", + "license": "MIT", + "peerDependencies": { + "@redis/client": "^1.0.0" + } + }, + "node_modules/@redis/time-series": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@redis/time-series/-/time-series-1.1.0.tgz", + "integrity": "sha512-c1Q99M5ljsIuc4YdaCwfUEXsofakb9c8+Zse2qxTadu8TalLXuAESzLvFAvNVbkmSlvlzIQOLpBCmWI9wTOt+g==", + "license": "MIT", + "peerDependencies": { + "@redis/client": "^1.0.0" + } + }, "node_modules/@socket.io/component-emitter": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.2.tgz", @@ -118,6 +177,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/cluster-key-slot": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/cluster-key-slot/-/cluster-key-slot-1.1.2.tgz", + "integrity": "sha512-RMr0FhtfXemyinomL4hrWcYJxmX6deFdCxpJzhDttxgO1+bcCnkk+9drydLVDmAMG7NE6aN/fl4F7ucU/90gAA==", + "license": "Apache-2.0", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/content-disposition": { "version": "0.5.4", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", @@ -421,6 +489,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/generic-pool": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/generic-pool/-/generic-pool-3.9.0.tgz", + "integrity": "sha512-hymDOu5B53XvN4QT9dBmZxPX4CWhBPPLguTZ9MMFeFa/Kg0xWVfylOVNlJji/E7yTZWFd/q9GO5TxDLq156D7g==", + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, "node_modules/get-intrinsic": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", @@ -721,6 +798,23 @@ "node": ">= 0.8" } }, + "node_modules/redis": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/redis/-/redis-4.7.0.tgz", + "integrity": "sha512-zvmkHEAdGMn+hMRXuMBtu4Vo5P6rHQjLoHftu+lBqq8ZTA3RCVC/WzD790bkKKiNFp7d5/9PcSD19fJyyRvOdQ==", + "license": "MIT", + "workspaces": [ + "./packages/*" + ], + "dependencies": { + "@redis/bloom": "1.2.0", + "@redis/client": "1.6.0", + "@redis/graph": "1.1.1", + "@redis/json": "1.0.7", + "@redis/search": "1.2.0", + "@redis/time-series": "1.1.0" + } + }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -1073,6 +1167,12 @@ "optional": true } } + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "license": "ISC" } } } diff --git a/server/node_modules/@redis/bloom/README.md b/server/node_modules/@redis/bloom/README.md new file mode 100644 index 0000000..8eb1445 --- /dev/null +++ b/server/node_modules/@redis/bloom/README.md @@ -0,0 +1,14 @@ +# @redis/bloom + +This package provides support for the [RedisBloom](https://redisbloom.io) module, which adds additional probabilistic data structures to Redis. It extends the [Node Redis client](https://github.com/redis/node-redis) to include functions for each of the RediBloom commands. + +To use these extra commands, your Redis server must have the RedisBloom module installed. + +RedisBloom provides the following probabilistic data structures: + +* Bloom Filter: for checking set membership with a high degree of certainty. +* Cuckoo Filter: for checking set membership with a high degree of certainty. +* Count-Min Sketch: Determine the frequency of events in a stream. +* Top-K: Maintain a list of k most frequently seen items. + +For complete examples, see `bloom-filter.js`, `cuckoo-filter.js`, `count-min-sketch.js` and `topk.js` in the Node Redis examples folder. diff --git a/server/node_modules/@redis/bloom/dist/commands/bloom/ADD.d.ts b/server/node_modules/@redis/bloom/dist/commands/bloom/ADD.d.ts new file mode 100644 index 0000000..98f092d --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/bloom/ADD.d.ts @@ -0,0 +1,3 @@ +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: string, item: string): Array; +export { transformBooleanReply as transformReply } from '@redis/client/dist/lib/commands/generic-transformers'; diff --git a/server/node_modules/@redis/bloom/dist/commands/bloom/ADD.js b/server/node_modules/@redis/bloom/dist/commands/bloom/ADD.js new file mode 100644 index 0000000..10aff86 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/bloom/ADD.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, item) { + return ['BF.ADD', key, item]; +} +exports.transformArguments = transformArguments; +var generic_transformers_1 = require("@redis/client/dist/lib/commands/generic-transformers"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return generic_transformers_1.transformBooleanReply; } }); diff --git a/server/node_modules/@redis/bloom/dist/commands/bloom/CARD.d.ts b/server/node_modules/@redis/bloom/dist/commands/bloom/CARD.d.ts new file mode 100644 index 0000000..7b54a1f --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/bloom/CARD.d.ts @@ -0,0 +1,4 @@ +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: string): Array; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/bloom/dist/commands/bloom/CARD.js b/server/node_modules/@redis/bloom/dist/commands/bloom/CARD.js new file mode 100644 index 0000000..c3a20bf --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/bloom/CARD.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key) { + return ['BF.CARD', key]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/bloom/dist/commands/bloom/EXISTS.d.ts b/server/node_modules/@redis/bloom/dist/commands/bloom/EXISTS.d.ts new file mode 100644 index 0000000..44b0f53 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/bloom/EXISTS.d.ts @@ -0,0 +1,4 @@ +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: string, item: string): Array; +export { transformBooleanReply as transformReply } from '@redis/client/dist/lib/commands/generic-transformers'; diff --git a/server/node_modules/@redis/bloom/dist/commands/bloom/EXISTS.js b/server/node_modules/@redis/bloom/dist/commands/bloom/EXISTS.js new file mode 100644 index 0000000..3fe00d5 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/bloom/EXISTS.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, item) { + return ['BF.EXISTS', key, item]; +} +exports.transformArguments = transformArguments; +var generic_transformers_1 = require("@redis/client/dist/lib/commands/generic-transformers"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return generic_transformers_1.transformBooleanReply; } }); diff --git a/server/node_modules/@redis/bloom/dist/commands/bloom/INFO.d.ts b/server/node_modules/@redis/bloom/dist/commands/bloom/INFO.d.ts new file mode 100644 index 0000000..07ee69a --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/bloom/INFO.d.ts @@ -0,0 +1,23 @@ +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: string): Array; +export type InfoRawReply = [ + _: string, + capacity: number, + _: string, + size: number, + _: string, + numberOfFilters: number, + _: string, + numberOfInsertedItems: number, + _: string, + expansionRate: number +]; +export interface InfoReply { + capacity: number; + size: number; + numberOfFilters: number; + numberOfInsertedItems: number; + expansionRate: number; +} +export declare function transformReply(reply: InfoRawReply): InfoReply; diff --git a/server/node_modules/@redis/bloom/dist/commands/bloom/INFO.js b/server/node_modules/@redis/bloom/dist/commands/bloom/INFO.js new file mode 100644 index 0000000..379e585 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/bloom/INFO.js @@ -0,0 +1,19 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key) { + return ['BF.INFO', key]; +} +exports.transformArguments = transformArguments; +function transformReply(reply) { + return { + capacity: reply[1], + size: reply[3], + numberOfFilters: reply[5], + numberOfInsertedItems: reply[7], + expansionRate: reply[9] + }; +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/bloom/dist/commands/bloom/INSERT.d.ts b/server/node_modules/@redis/bloom/dist/commands/bloom/INSERT.d.ts new file mode 100644 index 0000000..c1f8fec --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/bloom/INSERT.d.ts @@ -0,0 +1,11 @@ +import { RedisCommandArgument, RedisCommandArguments } from '@redis/client/dist/lib/commands'; +export declare const FIRST_KEY_INDEX = 1; +interface InsertOptions { + CAPACITY?: number; + ERROR?: number; + EXPANSION?: number; + NOCREATE?: true; + NONSCALING?: true; +} +export declare function transformArguments(key: string, items: RedisCommandArgument | Array, options?: InsertOptions): RedisCommandArguments; +export { transformBooleanArrayReply as transformReply } from '@redis/client/dist/lib/commands/generic-transformers'; diff --git a/server/node_modules/@redis/bloom/dist/commands/bloom/INSERT.js b/server/node_modules/@redis/bloom/dist/commands/bloom/INSERT.js new file mode 100644 index 0000000..7f27273 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/bloom/INSERT.js @@ -0,0 +1,28 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("@redis/client/dist/lib/commands/generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, items, options) { + const args = ['BF.INSERT', key]; + if (options?.CAPACITY) { + args.push('CAPACITY', options.CAPACITY.toString()); + } + if (options?.ERROR) { + args.push('ERROR', options.ERROR.toString()); + } + if (options?.EXPANSION) { + args.push('EXPANSION', options.EXPANSION.toString()); + } + if (options?.NOCREATE) { + args.push('NOCREATE'); + } + if (options?.NONSCALING) { + args.push('NONSCALING'); + } + args.push('ITEMS'); + return (0, generic_transformers_1.pushVerdictArguments)(args, items); +} +exports.transformArguments = transformArguments; +var generic_transformers_2 = require("@redis/client/dist/lib/commands/generic-transformers"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return generic_transformers_2.transformBooleanArrayReply; } }); diff --git a/server/node_modules/@redis/bloom/dist/commands/bloom/LOADCHUNK.d.ts b/server/node_modules/@redis/bloom/dist/commands/bloom/LOADCHUNK.d.ts new file mode 100644 index 0000000..786418e --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/bloom/LOADCHUNK.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '@redis/client/dist/lib/commands'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: string, iteretor: number, chunk: RedisCommandArgument): RedisCommandArguments; +export declare function transformReply(): 'OK'; diff --git a/server/node_modules/@redis/bloom/dist/commands/bloom/LOADCHUNK.js b/server/node_modules/@redis/bloom/dist/commands/bloom/LOADCHUNK.js new file mode 100644 index 0000000..0d7bc27 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/bloom/LOADCHUNK.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, iteretor, chunk) { + return ['BF.LOADCHUNK', key, iteretor.toString(), chunk]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/bloom/dist/commands/bloom/MADD.d.ts b/server/node_modules/@redis/bloom/dist/commands/bloom/MADD.d.ts new file mode 100644 index 0000000..4ec8f35 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/bloom/MADD.d.ts @@ -0,0 +1,3 @@ +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: string, items: Array): Array; +export { transformBooleanArrayReply as transformReply } from '@redis/client/dist/lib/commands/generic-transformers'; diff --git a/server/node_modules/@redis/bloom/dist/commands/bloom/MADD.js b/server/node_modules/@redis/bloom/dist/commands/bloom/MADD.js new file mode 100644 index 0000000..1c283f7 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/bloom/MADD.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, items) { + return ['BF.MADD', key, ...items]; +} +exports.transformArguments = transformArguments; +var generic_transformers_1 = require("@redis/client/dist/lib/commands/generic-transformers"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return generic_transformers_1.transformBooleanArrayReply; } }); diff --git a/server/node_modules/@redis/bloom/dist/commands/bloom/MEXISTS.d.ts b/server/node_modules/@redis/bloom/dist/commands/bloom/MEXISTS.d.ts new file mode 100644 index 0000000..81bbd27 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/bloom/MEXISTS.d.ts @@ -0,0 +1,4 @@ +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: string, items: Array): Array; +export { transformBooleanArrayReply as transformReply } from '@redis/client/dist/lib/commands/generic-transformers'; diff --git a/server/node_modules/@redis/bloom/dist/commands/bloom/MEXISTS.js b/server/node_modules/@redis/bloom/dist/commands/bloom/MEXISTS.js new file mode 100644 index 0000000..4da70a7 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/bloom/MEXISTS.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, items) { + return ['BF.MEXISTS', key, ...items]; +} +exports.transformArguments = transformArguments; +var generic_transformers_1 = require("@redis/client/dist/lib/commands/generic-transformers"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return generic_transformers_1.transformBooleanArrayReply; } }); diff --git a/server/node_modules/@redis/bloom/dist/commands/bloom/RESERVE.d.ts b/server/node_modules/@redis/bloom/dist/commands/bloom/RESERVE.d.ts new file mode 100644 index 0000000..3394681 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/bloom/RESERVE.d.ts @@ -0,0 +1,8 @@ +export declare const FIRST_KEY_INDEX = 1; +interface ReserveOptions { + EXPANSION?: number; + NONSCALING?: true; +} +export declare function transformArguments(key: string, errorRate: number, capacity: number, options?: ReserveOptions): Array; +export declare function transformReply(): 'OK'; +export {}; diff --git a/server/node_modules/@redis/bloom/dist/commands/bloom/RESERVE.js b/server/node_modules/@redis/bloom/dist/commands/bloom/RESERVE.js new file mode 100644 index 0000000..0a5c6c3 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/bloom/RESERVE.js @@ -0,0 +1,15 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, errorRate, capacity, options) { + const args = ['BF.RESERVE', key, errorRate.toString(), capacity.toString()]; + if (options?.EXPANSION) { + args.push('EXPANSION', options.EXPANSION.toString()); + } + if (options?.NONSCALING) { + args.push('NONSCALING'); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/bloom/dist/commands/bloom/SCANDUMP.d.ts b/server/node_modules/@redis/bloom/dist/commands/bloom/SCANDUMP.d.ts new file mode 100644 index 0000000..1c4c4a9 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/bloom/SCANDUMP.d.ts @@ -0,0 +1,13 @@ +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: string, iterator: number): Array; +type ScanDumpRawReply = [ + iterator: number, + chunk: string +]; +interface ScanDumpReply { + iterator: number; + chunk: string; +} +export declare function transformReply([iterator, chunk]: ScanDumpRawReply): ScanDumpReply; +export {}; diff --git a/server/node_modules/@redis/bloom/dist/commands/bloom/SCANDUMP.js b/server/node_modules/@redis/bloom/dist/commands/bloom/SCANDUMP.js new file mode 100644 index 0000000..0214538 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/bloom/SCANDUMP.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, iterator) { + return ['BF.SCANDUMP', key, iterator.toString()]; +} +exports.transformArguments = transformArguments; +function transformReply([iterator, chunk]) { + return { + iterator, + chunk + }; +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/bloom/dist/commands/bloom/index.d.ts b/server/node_modules/@redis/bloom/dist/commands/bloom/index.d.ts new file mode 100644 index 0000000..3d10a74 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/bloom/index.d.ts @@ -0,0 +1,33 @@ +import * as ADD from './ADD'; +import * as CARD from './CARD'; +import * as EXISTS from './EXISTS'; +import * as INFO from './INFO'; +import * as INSERT from './INSERT'; +import * as LOADCHUNK from './LOADCHUNK'; +import * as MADD from './MADD'; +import * as MEXISTS from './MEXISTS'; +import * as RESERVE from './RESERVE'; +import * as SCANDUMP from './SCANDUMP'; +declare const _default: { + ADD: typeof ADD; + add: typeof ADD; + CARD: typeof CARD; + card: typeof CARD; + EXISTS: typeof EXISTS; + exists: typeof EXISTS; + INFO: typeof INFO; + info: typeof INFO; + INSERT: typeof INSERT; + insert: typeof INSERT; + LOADCHUNK: typeof LOADCHUNK; + loadChunk: typeof LOADCHUNK; + MADD: typeof MADD; + mAdd: typeof MADD; + MEXISTS: typeof MEXISTS; + mExists: typeof MEXISTS; + RESERVE: typeof RESERVE; + reserve: typeof RESERVE; + SCANDUMP: typeof SCANDUMP; + scanDump: typeof SCANDUMP; +}; +export default _default; diff --git a/server/node_modules/@redis/bloom/dist/commands/bloom/index.js b/server/node_modules/@redis/bloom/dist/commands/bloom/index.js new file mode 100644 index 0000000..4232b4e --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/bloom/index.js @@ -0,0 +1,34 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const ADD = require("./ADD"); +const CARD = require("./CARD"); +const EXISTS = require("./EXISTS"); +const INFO = require("./INFO"); +const INSERT = require("./INSERT"); +const LOADCHUNK = require("./LOADCHUNK"); +const MADD = require("./MADD"); +const MEXISTS = require("./MEXISTS"); +const RESERVE = require("./RESERVE"); +const SCANDUMP = require("./SCANDUMP"); +exports.default = { + ADD, + add: ADD, + CARD, + card: CARD, + EXISTS, + exists: EXISTS, + INFO, + info: INFO, + INSERT, + insert: INSERT, + LOADCHUNK, + loadChunk: LOADCHUNK, + MADD, + mAdd: MADD, + MEXISTS, + mExists: MEXISTS, + RESERVE, + reserve: RESERVE, + SCANDUMP, + scanDump: SCANDUMP +}; diff --git a/server/node_modules/@redis/bloom/dist/commands/count-min-sketch/INCRBY.d.ts b/server/node_modules/@redis/bloom/dist/commands/count-min-sketch/INCRBY.d.ts new file mode 100644 index 0000000..60ea8f3 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/count-min-sketch/INCRBY.d.ts @@ -0,0 +1,8 @@ +export declare const FIRST_KEY_INDEX = 1; +interface IncrByItem { + item: string; + incrementBy: number; +} +export declare function transformArguments(key: string, items: IncrByItem | Array): Array; +export declare function transformReply(): Array; +export {}; diff --git a/server/node_modules/@redis/bloom/dist/commands/count-min-sketch/INCRBY.js b/server/node_modules/@redis/bloom/dist/commands/count-min-sketch/INCRBY.js new file mode 100644 index 0000000..3e9be04 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/count-min-sketch/INCRBY.js @@ -0,0 +1,20 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, items) { + const args = ['CMS.INCRBY', key]; + if (Array.isArray(items)) { + for (const item of items) { + pushIncrByItem(args, item); + } + } + else { + pushIncrByItem(args, items); + } + return args; +} +exports.transformArguments = transformArguments; +function pushIncrByItem(args, { item, incrementBy }) { + args.push(item, incrementBy.toString()); +} diff --git a/server/node_modules/@redis/bloom/dist/commands/count-min-sketch/INFO.d.ts b/server/node_modules/@redis/bloom/dist/commands/count-min-sketch/INFO.d.ts new file mode 100644 index 0000000..c04cdf2 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/count-min-sketch/INFO.d.ts @@ -0,0 +1,17 @@ +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: string): Array; +export type InfoRawReply = [ + _: string, + width: number, + _: string, + depth: number, + _: string, + count: number +]; +export interface InfoReply { + width: number; + depth: number; + count: number; +} +export declare function transformReply(reply: InfoRawReply): InfoReply; diff --git a/server/node_modules/@redis/bloom/dist/commands/count-min-sketch/INFO.js b/server/node_modules/@redis/bloom/dist/commands/count-min-sketch/INFO.js new file mode 100644 index 0000000..df3ae99 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/count-min-sketch/INFO.js @@ -0,0 +1,17 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key) { + return ['CMS.INFO', key]; +} +exports.transformArguments = transformArguments; +function transformReply(reply) { + return { + width: reply[1], + depth: reply[3], + count: reply[5] + }; +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/bloom/dist/commands/count-min-sketch/INITBYDIM.d.ts b/server/node_modules/@redis/bloom/dist/commands/count-min-sketch/INITBYDIM.d.ts new file mode 100644 index 0000000..9a702d2 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/count-min-sketch/INITBYDIM.d.ts @@ -0,0 +1,3 @@ +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: string, width: number, depth: number): Array; +export declare function transformReply(): 'OK'; diff --git a/server/node_modules/@redis/bloom/dist/commands/count-min-sketch/INITBYDIM.js b/server/node_modules/@redis/bloom/dist/commands/count-min-sketch/INITBYDIM.js new file mode 100644 index 0000000..68b9e46 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/count-min-sketch/INITBYDIM.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, width, depth) { + return ['CMS.INITBYDIM', key, width.toString(), depth.toString()]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/bloom/dist/commands/count-min-sketch/INITBYPROB.d.ts b/server/node_modules/@redis/bloom/dist/commands/count-min-sketch/INITBYPROB.d.ts new file mode 100644 index 0000000..dff4c8f --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/count-min-sketch/INITBYPROB.d.ts @@ -0,0 +1,3 @@ +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: string, error: number, probability: number): Array; +export declare function transformReply(): 'OK'; diff --git a/server/node_modules/@redis/bloom/dist/commands/count-min-sketch/INITBYPROB.js b/server/node_modules/@redis/bloom/dist/commands/count-min-sketch/INITBYPROB.js new file mode 100644 index 0000000..70dc3d4 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/count-min-sketch/INITBYPROB.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, error, probability) { + return ['CMS.INITBYPROB', key, error.toString(), probability.toString()]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/bloom/dist/commands/count-min-sketch/MERGE.d.ts b/server/node_modules/@redis/bloom/dist/commands/count-min-sketch/MERGE.d.ts new file mode 100644 index 0000000..36f9f27 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/count-min-sketch/MERGE.d.ts @@ -0,0 +1,9 @@ +export declare const FIRST_KEY_INDEX = 1; +interface Sketch { + name: string; + weight: number; +} +type Sketches = Array | Array; +export declare function transformArguments(dest: string, src: Sketches): Array; +export declare function transformReply(): 'OK'; +export {}; diff --git a/server/node_modules/@redis/bloom/dist/commands/count-min-sketch/MERGE.js b/server/node_modules/@redis/bloom/dist/commands/count-min-sketch/MERGE.js new file mode 100644 index 0000000..13710b7 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/count-min-sketch/MERGE.js @@ -0,0 +1,28 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(dest, src) { + const args = [ + 'CMS.MERGE', + dest, + src.length.toString() + ]; + if (isStringSketches(src)) { + args.push(...src); + } + else { + for (const sketch of src) { + args.push(sketch.name); + } + args.push('WEIGHTS'); + for (const sketch of src) { + args.push(sketch.weight.toString()); + } + } + return args; +} +exports.transformArguments = transformArguments; +function isStringSketches(src) { + return typeof src[0] === 'string'; +} diff --git a/server/node_modules/@redis/bloom/dist/commands/count-min-sketch/QUERY.d.ts b/server/node_modules/@redis/bloom/dist/commands/count-min-sketch/QUERY.d.ts new file mode 100644 index 0000000..e419fe6 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/count-min-sketch/QUERY.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArguments } from '@redis/client/dist/lib/commands'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: string, items: string | Array): RedisCommandArguments; +export declare function transformReply(): Array; diff --git a/server/node_modules/@redis/bloom/dist/commands/count-min-sketch/QUERY.js b/server/node_modules/@redis/bloom/dist/commands/count-min-sketch/QUERY.js new file mode 100644 index 0000000..395a425 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/count-min-sketch/QUERY.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("@redis/client/dist/lib/commands/generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, items) { + return (0, generic_transformers_1.pushVerdictArguments)(['CMS.QUERY', key], items); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/bloom/dist/commands/count-min-sketch/index.d.ts b/server/node_modules/@redis/bloom/dist/commands/count-min-sketch/index.d.ts new file mode 100644 index 0000000..80d0666 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/count-min-sketch/index.d.ts @@ -0,0 +1,21 @@ +import * as INCRBY from './INCRBY'; +import * as INFO from './INFO'; +import * as INITBYDIM from './INITBYDIM'; +import * as INITBYPROB from './INITBYPROB'; +import * as MERGE from './MERGE'; +import * as QUERY from './QUERY'; +declare const _default: { + INCRBY: typeof INCRBY; + incrBy: typeof INCRBY; + INFO: typeof INFO; + info: typeof INFO; + INITBYDIM: typeof INITBYDIM; + initByDim: typeof INITBYDIM; + INITBYPROB: typeof INITBYPROB; + initByProb: typeof INITBYPROB; + MERGE: typeof MERGE; + merge: typeof MERGE; + QUERY: typeof QUERY; + query: typeof QUERY; +}; +export default _default; diff --git a/server/node_modules/@redis/bloom/dist/commands/count-min-sketch/index.js b/server/node_modules/@redis/bloom/dist/commands/count-min-sketch/index.js new file mode 100644 index 0000000..7aef3e4 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/count-min-sketch/index.js @@ -0,0 +1,22 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const INCRBY = require("./INCRBY"); +const INFO = require("./INFO"); +const INITBYDIM = require("./INITBYDIM"); +const INITBYPROB = require("./INITBYPROB"); +const MERGE = require("./MERGE"); +const QUERY = require("./QUERY"); +exports.default = { + INCRBY, + incrBy: INCRBY, + INFO, + info: INFO, + INITBYDIM, + initByDim: INITBYDIM, + INITBYPROB, + initByProb: INITBYPROB, + MERGE, + merge: MERGE, + QUERY, + query: QUERY +}; diff --git a/server/node_modules/@redis/bloom/dist/commands/cuckoo/ADD.d.ts b/server/node_modules/@redis/bloom/dist/commands/cuckoo/ADD.d.ts new file mode 100644 index 0000000..98f092d --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/cuckoo/ADD.d.ts @@ -0,0 +1,3 @@ +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: string, item: string): Array; +export { transformBooleanReply as transformReply } from '@redis/client/dist/lib/commands/generic-transformers'; diff --git a/server/node_modules/@redis/bloom/dist/commands/cuckoo/ADD.js b/server/node_modules/@redis/bloom/dist/commands/cuckoo/ADD.js new file mode 100644 index 0000000..b61ea67 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/cuckoo/ADD.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, item) { + return ['CF.ADD', key, item]; +} +exports.transformArguments = transformArguments; +var generic_transformers_1 = require("@redis/client/dist/lib/commands/generic-transformers"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return generic_transformers_1.transformBooleanReply; } }); diff --git a/server/node_modules/@redis/bloom/dist/commands/cuckoo/ADDNX.d.ts b/server/node_modules/@redis/bloom/dist/commands/cuckoo/ADDNX.d.ts new file mode 100644 index 0000000..98f092d --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/cuckoo/ADDNX.d.ts @@ -0,0 +1,3 @@ +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: string, item: string): Array; +export { transformBooleanReply as transformReply } from '@redis/client/dist/lib/commands/generic-transformers'; diff --git a/server/node_modules/@redis/bloom/dist/commands/cuckoo/ADDNX.js b/server/node_modules/@redis/bloom/dist/commands/cuckoo/ADDNX.js new file mode 100644 index 0000000..bc1b99a --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/cuckoo/ADDNX.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, item) { + return ['CF.ADDNX', key, item]; +} +exports.transformArguments = transformArguments; +var generic_transformers_1 = require("@redis/client/dist/lib/commands/generic-transformers"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return generic_transformers_1.transformBooleanReply; } }); diff --git a/server/node_modules/@redis/bloom/dist/commands/cuckoo/COUNT.d.ts b/server/node_modules/@redis/bloom/dist/commands/cuckoo/COUNT.d.ts new file mode 100644 index 0000000..e781bba --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/cuckoo/COUNT.d.ts @@ -0,0 +1,3 @@ +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: string, item: string): Array; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/bloom/dist/commands/cuckoo/COUNT.js b/server/node_modules/@redis/bloom/dist/commands/cuckoo/COUNT.js new file mode 100644 index 0000000..772618e --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/cuckoo/COUNT.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, item) { + return ['CF.COUNT', key, item]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/bloom/dist/commands/cuckoo/DEL.d.ts b/server/node_modules/@redis/bloom/dist/commands/cuckoo/DEL.d.ts new file mode 100644 index 0000000..98f092d --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/cuckoo/DEL.d.ts @@ -0,0 +1,3 @@ +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: string, item: string): Array; +export { transformBooleanReply as transformReply } from '@redis/client/dist/lib/commands/generic-transformers'; diff --git a/server/node_modules/@redis/bloom/dist/commands/cuckoo/DEL.js b/server/node_modules/@redis/bloom/dist/commands/cuckoo/DEL.js new file mode 100644 index 0000000..edb7e58 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/cuckoo/DEL.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, item) { + return ['CF.DEL', key, item]; +} +exports.transformArguments = transformArguments; +var generic_transformers_1 = require("@redis/client/dist/lib/commands/generic-transformers"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return generic_transformers_1.transformBooleanReply; } }); diff --git a/server/node_modules/@redis/bloom/dist/commands/cuckoo/EXISTS.d.ts b/server/node_modules/@redis/bloom/dist/commands/cuckoo/EXISTS.d.ts new file mode 100644 index 0000000..44b0f53 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/cuckoo/EXISTS.d.ts @@ -0,0 +1,4 @@ +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: string, item: string): Array; +export { transformBooleanReply as transformReply } from '@redis/client/dist/lib/commands/generic-transformers'; diff --git a/server/node_modules/@redis/bloom/dist/commands/cuckoo/EXISTS.js b/server/node_modules/@redis/bloom/dist/commands/cuckoo/EXISTS.js new file mode 100644 index 0000000..eb8d966 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/cuckoo/EXISTS.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, item) { + return ['CF.EXISTS', key, item]; +} +exports.transformArguments = transformArguments; +var generic_transformers_1 = require("@redis/client/dist/lib/commands/generic-transformers"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return generic_transformers_1.transformBooleanReply; } }); diff --git a/server/node_modules/@redis/bloom/dist/commands/cuckoo/INFO.d.ts b/server/node_modules/@redis/bloom/dist/commands/cuckoo/INFO.d.ts new file mode 100644 index 0000000..3a5850d --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/cuckoo/INFO.d.ts @@ -0,0 +1,32 @@ +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: string): Array; +export type InfoRawReply = [ + _: string, + size: number, + _: string, + numberOfBuckets: number, + _: string, + numberOfFilters: number, + _: string, + numberOfInsertedItems: number, + _: string, + numberOfDeletedItems: number, + _: string, + bucketSize: number, + _: string, + expansionRate: number, + _: string, + maxIteration: number +]; +export interface InfoReply { + size: number; + numberOfBuckets: number; + numberOfFilters: number; + numberOfInsertedItems: number; + numberOfDeletedItems: number; + bucketSize: number; + expansionRate: number; + maxIteration: number; +} +export declare function transformReply(reply: InfoRawReply): InfoReply; diff --git a/server/node_modules/@redis/bloom/dist/commands/cuckoo/INFO.js b/server/node_modules/@redis/bloom/dist/commands/cuckoo/INFO.js new file mode 100644 index 0000000..5c9c4be --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/cuckoo/INFO.js @@ -0,0 +1,22 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key) { + return ['CF.INFO', key]; +} +exports.transformArguments = transformArguments; +function transformReply(reply) { + return { + size: reply[1], + numberOfBuckets: reply[3], + numberOfFilters: reply[5], + numberOfInsertedItems: reply[7], + numberOfDeletedItems: reply[9], + bucketSize: reply[11], + expansionRate: reply[13], + maxIteration: reply[15] + }; +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/bloom/dist/commands/cuckoo/INSERT.d.ts b/server/node_modules/@redis/bloom/dist/commands/cuckoo/INSERT.d.ts new file mode 100644 index 0000000..f43ac23 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/cuckoo/INSERT.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArguments } from '@redis/client/dist/lib/commands'; +import { InsertOptions } from "."; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: string, items: string | Array, options?: InsertOptions): RedisCommandArguments; +export { transformBooleanArrayReply as transformReply } from '@redis/client/dist/lib/commands/generic-transformers'; diff --git a/server/node_modules/@redis/bloom/dist/commands/cuckoo/INSERT.js b/server/node_modules/@redis/bloom/dist/commands/cuckoo/INSERT.js new file mode 100644 index 0000000..ef4fb78 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/cuckoo/INSERT.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const _1 = require("."); +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, items, options) { + return (0, _1.pushInsertOptions)(['CF.INSERT', key], items, options); +} +exports.transformArguments = transformArguments; +var generic_transformers_1 = require("@redis/client/dist/lib/commands/generic-transformers"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return generic_transformers_1.transformBooleanArrayReply; } }); diff --git a/server/node_modules/@redis/bloom/dist/commands/cuckoo/INSERTNX.d.ts b/server/node_modules/@redis/bloom/dist/commands/cuckoo/INSERTNX.d.ts new file mode 100644 index 0000000..f43ac23 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/cuckoo/INSERTNX.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArguments } from '@redis/client/dist/lib/commands'; +import { InsertOptions } from "."; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: string, items: string | Array, options?: InsertOptions): RedisCommandArguments; +export { transformBooleanArrayReply as transformReply } from '@redis/client/dist/lib/commands/generic-transformers'; diff --git a/server/node_modules/@redis/bloom/dist/commands/cuckoo/INSERTNX.js b/server/node_modules/@redis/bloom/dist/commands/cuckoo/INSERTNX.js new file mode 100644 index 0000000..f80b317 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/cuckoo/INSERTNX.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const _1 = require("."); +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, items, options) { + return (0, _1.pushInsertOptions)(['CF.INSERTNX', key], items, options); +} +exports.transformArguments = transformArguments; +var generic_transformers_1 = require("@redis/client/dist/lib/commands/generic-transformers"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return generic_transformers_1.transformBooleanArrayReply; } }); diff --git a/server/node_modules/@redis/bloom/dist/commands/cuckoo/LOADCHUNK.d.ts b/server/node_modules/@redis/bloom/dist/commands/cuckoo/LOADCHUNK.d.ts new file mode 100644 index 0000000..d6302db --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/cuckoo/LOADCHUNK.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '@redis/client/dist/lib/commands'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: string, iterator: number, chunk: RedisCommandArgument): RedisCommandArguments; +export declare function transformReply(): 'OK'; diff --git a/server/node_modules/@redis/bloom/dist/commands/cuckoo/LOADCHUNK.js b/server/node_modules/@redis/bloom/dist/commands/cuckoo/LOADCHUNK.js new file mode 100644 index 0000000..ddd0ebd --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/cuckoo/LOADCHUNK.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, iterator, chunk) { + return ['CF.LOADCHUNK', key, iterator.toString(), chunk]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/bloom/dist/commands/cuckoo/RESERVE.d.ts b/server/node_modules/@redis/bloom/dist/commands/cuckoo/RESERVE.d.ts new file mode 100644 index 0000000..35d77cd --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/cuckoo/RESERVE.d.ts @@ -0,0 +1,9 @@ +export declare const FIRST_KEY_INDEX = 1; +interface ReserveOptions { + BUCKETSIZE?: number; + MAXITERATIONS?: number; + EXPANSION?: number; +} +export declare function transformArguments(key: string, capacity: number, options?: ReserveOptions): Array; +export declare function transformReply(): 'OK'; +export {}; diff --git a/server/node_modules/@redis/bloom/dist/commands/cuckoo/RESERVE.js b/server/node_modules/@redis/bloom/dist/commands/cuckoo/RESERVE.js new file mode 100644 index 0000000..6b51866 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/cuckoo/RESERVE.js @@ -0,0 +1,18 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, capacity, options) { + const args = ['CF.RESERVE', key, capacity.toString()]; + if (options?.BUCKETSIZE) { + args.push('BUCKETSIZE', options.BUCKETSIZE.toString()); + } + if (options?.MAXITERATIONS) { + args.push('MAXITERATIONS', options.MAXITERATIONS.toString()); + } + if (options?.EXPANSION) { + args.push('EXPANSION', options.EXPANSION.toString()); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/bloom/dist/commands/cuckoo/SCANDUMP.d.ts b/server/node_modules/@redis/bloom/dist/commands/cuckoo/SCANDUMP.d.ts new file mode 100644 index 0000000..fee6405 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/cuckoo/SCANDUMP.d.ts @@ -0,0 +1,12 @@ +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: string, iterator: number): Array; +type ScanDumpRawReply = [ + iterator: number, + chunk: string | null +]; +interface ScanDumpReply { + iterator: number; + chunk: string | null; +} +export declare function transformReply([iterator, chunk]: ScanDumpRawReply): ScanDumpReply; +export {}; diff --git a/server/node_modules/@redis/bloom/dist/commands/cuckoo/SCANDUMP.js b/server/node_modules/@redis/bloom/dist/commands/cuckoo/SCANDUMP.js new file mode 100644 index 0000000..9401c05 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/cuckoo/SCANDUMP.js @@ -0,0 +1,15 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, iterator) { + return ['CF.SCANDUMP', key, iterator.toString()]; +} +exports.transformArguments = transformArguments; +function transformReply([iterator, chunk]) { + return { + iterator, + chunk + }; +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/bloom/dist/commands/cuckoo/index.d.ts b/server/node_modules/@redis/bloom/dist/commands/cuckoo/index.d.ts new file mode 100644 index 0000000..7c78372 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/cuckoo/index.d.ts @@ -0,0 +1,42 @@ +import * as ADD from './ADD'; +import * as ADDNX from './ADDNX'; +import * as COUNT from './COUNT'; +import * as DEL from './DEL'; +import * as EXISTS from './EXISTS'; +import * as INFO from './INFO'; +import * as INSERT from './INSERT'; +import * as INSERTNX from './INSERTNX'; +import * as LOADCHUNK from './LOADCHUNK'; +import * as RESERVE from './RESERVE'; +import * as SCANDUMP from './SCANDUMP'; +import { RedisCommandArguments } from '@redis/client/dist/lib/commands'; +declare const _default: { + ADD: typeof ADD; + add: typeof ADD; + ADDNX: typeof ADDNX; + addNX: typeof ADDNX; + COUNT: typeof COUNT; + count: typeof COUNT; + DEL: typeof DEL; + del: typeof DEL; + EXISTS: typeof EXISTS; + exists: typeof EXISTS; + INFO: typeof INFO; + info: typeof INFO; + INSERT: typeof INSERT; + insert: typeof INSERT; + INSERTNX: typeof INSERTNX; + insertNX: typeof INSERTNX; + LOADCHUNK: typeof LOADCHUNK; + loadChunk: typeof LOADCHUNK; + RESERVE: typeof RESERVE; + reserve: typeof RESERVE; + SCANDUMP: typeof SCANDUMP; + scanDump: typeof SCANDUMP; +}; +export default _default; +export interface InsertOptions { + CAPACITY?: number; + NOCREATE?: true; +} +export declare function pushInsertOptions(args: RedisCommandArguments, items: string | Array, options?: InsertOptions): RedisCommandArguments; diff --git a/server/node_modules/@redis/bloom/dist/commands/cuckoo/index.js b/server/node_modules/@redis/bloom/dist/commands/cuckoo/index.js new file mode 100644 index 0000000..3d428ee --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/cuckoo/index.js @@ -0,0 +1,51 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.pushInsertOptions = void 0; +const ADD = require("./ADD"); +const ADDNX = require("./ADDNX"); +const COUNT = require("./COUNT"); +const DEL = require("./DEL"); +const EXISTS = require("./EXISTS"); +const INFO = require("./INFO"); +const INSERT = require("./INSERT"); +const INSERTNX = require("./INSERTNX"); +const LOADCHUNK = require("./LOADCHUNK"); +const RESERVE = require("./RESERVE"); +const SCANDUMP = require("./SCANDUMP"); +const generic_transformers_1 = require("@redis/client/dist/lib/commands/generic-transformers"); +exports.default = { + ADD, + add: ADD, + ADDNX, + addNX: ADDNX, + COUNT, + count: COUNT, + DEL, + del: DEL, + EXISTS, + exists: EXISTS, + INFO, + info: INFO, + INSERT, + insert: INSERT, + INSERTNX, + insertNX: INSERTNX, + LOADCHUNK, + loadChunk: LOADCHUNK, + RESERVE, + reserve: RESERVE, + SCANDUMP, + scanDump: SCANDUMP +}; +function pushInsertOptions(args, items, options) { + if (options?.CAPACITY) { + args.push('CAPACITY'); + args.push(options.CAPACITY.toString()); + } + if (options?.NOCREATE) { + args.push('NOCREATE'); + } + args.push('ITEMS'); + return (0, generic_transformers_1.pushVerdictArguments)(args, items); +} +exports.pushInsertOptions = pushInsertOptions; diff --git a/server/node_modules/@redis/bloom/dist/commands/index.d.ts b/server/node_modules/@redis/bloom/dist/commands/index.d.ts new file mode 100644 index 0000000..c9de957 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/index.d.ts @@ -0,0 +1,111 @@ +declare const _default: { + bf: { + ADD: typeof import("./bloom/ADD"); + add: typeof import("./bloom/ADD"); + CARD: typeof import("./bloom/CARD"); + card: typeof import("./bloom/CARD"); + EXISTS: typeof import("./bloom/EXISTS"); + exists: typeof import("./bloom/EXISTS"); + INFO: typeof import("./bloom/INFO"); + info: typeof import("./bloom/INFO"); + INSERT: typeof import("./bloom/INSERT"); + insert: typeof import("./bloom/INSERT"); + LOADCHUNK: typeof import("./bloom/LOADCHUNK"); + loadChunk: typeof import("./bloom/LOADCHUNK"); + MADD: typeof import("./bloom/MADD"); + mAdd: typeof import("./bloom/MADD"); + MEXISTS: typeof import("./bloom/MEXISTS"); + mExists: typeof import("./bloom/MEXISTS"); + RESERVE: typeof import("./bloom/RESERVE"); + reserve: typeof import("./bloom/RESERVE"); + SCANDUMP: typeof import("./bloom/SCANDUMP"); + scanDump: typeof import("./bloom/SCANDUMP"); + }; + cms: { + INCRBY: typeof import("./count-min-sketch/INCRBY"); + incrBy: typeof import("./count-min-sketch/INCRBY"); + INFO: typeof import("./count-min-sketch/INFO"); + info: typeof import("./count-min-sketch/INFO"); + INITBYDIM: typeof import("./count-min-sketch/INITBYDIM"); + initByDim: typeof import("./count-min-sketch/INITBYDIM"); + INITBYPROB: typeof import("./count-min-sketch/INITBYPROB"); + initByProb: typeof import("./count-min-sketch/INITBYPROB"); + MERGE: typeof import("./count-min-sketch/MERGE"); + merge: typeof import("./count-min-sketch/MERGE"); + QUERY: typeof import("./count-min-sketch/QUERY"); + query: typeof import("./count-min-sketch/QUERY"); + }; + cf: { + ADD: typeof import("./cuckoo/ADD"); + add: typeof import("./cuckoo/ADD"); + ADDNX: typeof import("./cuckoo/ADDNX"); + addNX: typeof import("./cuckoo/ADDNX"); + COUNT: typeof import("./cuckoo/COUNT"); + count: typeof import("./cuckoo/COUNT"); + DEL: typeof import("./cuckoo/DEL"); + del: typeof import("./cuckoo/DEL"); + EXISTS: typeof import("./cuckoo/EXISTS"); + exists: typeof import("./cuckoo/EXISTS"); + INFO: typeof import("./cuckoo/INFO"); + info: typeof import("./cuckoo/INFO"); + INSERT: typeof import("./cuckoo/INSERT"); + insert: typeof import("./cuckoo/INSERT"); + INSERTNX: typeof import("./cuckoo/INSERTNX"); + insertNX: typeof import("./cuckoo/INSERTNX"); + LOADCHUNK: typeof import("./cuckoo/LOADCHUNK"); + loadChunk: typeof import("./cuckoo/LOADCHUNK"); + RESERVE: typeof import("./cuckoo/RESERVE"); + reserve: typeof import("./cuckoo/RESERVE"); + SCANDUMP: typeof import("./cuckoo/SCANDUMP"); + scanDump: typeof import("./cuckoo/SCANDUMP"); + }; + tDigest: { + ADD: typeof import("./t-digest/ADD"); + add: typeof import("./t-digest/ADD"); + BYRANK: typeof import("./t-digest/BYRANK"); + byRank: typeof import("./t-digest/BYRANK"); + BYREVRANK: typeof import("./t-digest/BYREVRANK"); + byRevRank: typeof import("./t-digest/BYREVRANK"); + CDF: typeof import("./t-digest/CDF"); + cdf: typeof import("./t-digest/CDF"); + CREATE: typeof import("./t-digest/CREATE"); + create: typeof import("./t-digest/CREATE"); + INFO: typeof import("./t-digest/INFO"); + info: typeof import("./t-digest/INFO"); + MAX: typeof import("./t-digest/MAX"); + max: typeof import("./t-digest/MAX"); + MERGE: typeof import("./t-digest/MERGE"); + merge: typeof import("./t-digest/MERGE"); + MIN: typeof import("./t-digest/MIN"); + min: typeof import("./t-digest/MIN"); + QUANTILE: typeof import("./t-digest/QUANTILE"); + quantile: typeof import("./t-digest/QUANTILE"); + RANK: typeof import("./t-digest/RANK"); + rank: typeof import("./t-digest/RANK"); + RESET: typeof import("./t-digest/RESET"); + reset: typeof import("./t-digest/RESET"); + REVRANK: typeof import("./t-digest/REVRANK"); + revRank: typeof import("./t-digest/REVRANK"); + TRIMMED_MEAN: typeof import("./t-digest/TRIMMED_MEAN"); + trimmedMean: typeof import("./t-digest/TRIMMED_MEAN"); + }; + topK: { + ADD: typeof import("./top-k/ADD"); + add: typeof import("./top-k/ADD"); + COUNT: typeof import("./top-k/COUNT"); + count: typeof import("./top-k/COUNT"); + INCRBY: typeof import("./top-k/INCRBY"); + incrBy: typeof import("./top-k/INCRBY"); + INFO: typeof import("./top-k/INFO"); + info: typeof import("./top-k/INFO"); + LIST_WITHCOUNT: typeof import("./top-k/LIST_WITHCOUNT"); + listWithCount: typeof import("./top-k/LIST_WITHCOUNT"); + LIST: typeof import("./top-k/LIST"); + list: typeof import("./top-k/LIST"); + QUERY: typeof import("./top-k/QUERY"); + query: typeof import("./top-k/QUERY"); + RESERVE: typeof import("./top-k/RESERVE"); + reserve: typeof import("./top-k/RESERVE"); + }; +}; +export default _default; diff --git a/server/node_modules/@redis/bloom/dist/commands/index.js b/server/node_modules/@redis/bloom/dist/commands/index.js new file mode 100644 index 0000000..c838edf --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/index.js @@ -0,0 +1,14 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const bloom_1 = require("./bloom"); +const count_min_sketch_1 = require("./count-min-sketch"); +const cuckoo_1 = require("./cuckoo"); +const t_digest_1 = require("./t-digest"); +const top_k_1 = require("./top-k"); +exports.default = { + bf: bloom_1.default, + cms: count_min_sketch_1.default, + cf: cuckoo_1.default, + tDigest: t_digest_1.default, + topK: top_k_1.default +}; diff --git a/server/node_modules/@redis/bloom/dist/commands/t-digest/ADD.d.ts b/server/node_modules/@redis/bloom/dist/commands/t-digest/ADD.d.ts new file mode 100644 index 0000000..19d0946 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/t-digest/ADD.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '@redis/client/dist/lib/commands'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument, values: Array): RedisCommandArguments; +export declare function transformReply(): 'OK'; diff --git a/server/node_modules/@redis/bloom/dist/commands/t-digest/ADD.js b/server/node_modules/@redis/bloom/dist/commands/t-digest/ADD.js new file mode 100644 index 0000000..d31bc9b --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/t-digest/ADD.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, values) { + const args = ['TDIGEST.ADD', key]; + for (const item of values) { + args.push(item.toString()); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/bloom/dist/commands/t-digest/BYRANK.d.ts b/server/node_modules/@redis/bloom/dist/commands/t-digest/BYRANK.d.ts new file mode 100644 index 0000000..c27a10f --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/t-digest/BYRANK.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument, RedisCommandArguments } from '@redis/client/dist/lib/commands'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: RedisCommandArgument, ranks: Array): RedisCommandArguments; +export { transformDoublesReply as transformReply } from '.'; diff --git a/server/node_modules/@redis/bloom/dist/commands/t-digest/BYRANK.js b/server/node_modules/@redis/bloom/dist/commands/t-digest/BYRANK.js new file mode 100644 index 0000000..84a5069 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/t-digest/BYRANK.js @@ -0,0 +1,15 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, ranks) { + const args = ['TDIGEST.BYRANK', key]; + for (const rank of ranks) { + args.push(rank.toString()); + } + return args; +} +exports.transformArguments = transformArguments; +var _1 = require("."); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return _1.transformDoublesReply; } }); diff --git a/server/node_modules/@redis/bloom/dist/commands/t-digest/BYREVRANK.d.ts b/server/node_modules/@redis/bloom/dist/commands/t-digest/BYREVRANK.d.ts new file mode 100644 index 0000000..c27a10f --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/t-digest/BYREVRANK.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument, RedisCommandArguments } from '@redis/client/dist/lib/commands'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: RedisCommandArgument, ranks: Array): RedisCommandArguments; +export { transformDoublesReply as transformReply } from '.'; diff --git a/server/node_modules/@redis/bloom/dist/commands/t-digest/BYREVRANK.js b/server/node_modules/@redis/bloom/dist/commands/t-digest/BYREVRANK.js new file mode 100644 index 0000000..b886843 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/t-digest/BYREVRANK.js @@ -0,0 +1,15 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, ranks) { + const args = ['TDIGEST.BYREVRANK', key]; + for (const rank of ranks) { + args.push(rank.toString()); + } + return args; +} +exports.transformArguments = transformArguments; +var _1 = require("."); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return _1.transformDoublesReply; } }); diff --git a/server/node_modules/@redis/bloom/dist/commands/t-digest/CDF.d.ts b/server/node_modules/@redis/bloom/dist/commands/t-digest/CDF.d.ts new file mode 100644 index 0000000..8652fde --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/t-digest/CDF.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument, RedisCommandArguments } from '@redis/client/dist/lib/commands'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: RedisCommandArgument, values: Array): RedisCommandArguments; +export { transformDoublesReply as transformReply } from '.'; diff --git a/server/node_modules/@redis/bloom/dist/commands/t-digest/CDF.js b/server/node_modules/@redis/bloom/dist/commands/t-digest/CDF.js new file mode 100644 index 0000000..6a64eeb --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/t-digest/CDF.js @@ -0,0 +1,15 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, values) { + const args = ['TDIGEST.CDF', key]; + for (const item of values) { + args.push(item.toString()); + } + return args; +} +exports.transformArguments = transformArguments; +var _1 = require("."); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return _1.transformDoublesReply; } }); diff --git a/server/node_modules/@redis/bloom/dist/commands/t-digest/CREATE.d.ts b/server/node_modules/@redis/bloom/dist/commands/t-digest/CREATE.d.ts new file mode 100644 index 0000000..9a62bfc --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/t-digest/CREATE.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument, RedisCommandArguments } from '@redis/client/dist/lib/commands'; +import { CompressionOption } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument, options?: CompressionOption): RedisCommandArguments; +export declare function transformReply(): 'OK'; diff --git a/server/node_modules/@redis/bloom/dist/commands/t-digest/CREATE.js b/server/node_modules/@redis/bloom/dist/commands/t-digest/CREATE.js new file mode 100644 index 0000000..2fd980b --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/t-digest/CREATE.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const _1 = require("."); +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, options) { + return (0, _1.pushCompressionArgument)(['TDIGEST.CREATE', key], options); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/bloom/dist/commands/t-digest/INFO.d.ts b/server/node_modules/@redis/bloom/dist/commands/t-digest/INFO.d.ts new file mode 100644 index 0000000..d2d9c5c --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/t-digest/INFO.d.ts @@ -0,0 +1,31 @@ +import { RedisCommandArgument, RedisCommandArguments } from '@redis/client/dist/lib/commands'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: RedisCommandArgument): RedisCommandArguments; +type InfoRawReply = [ + 'Compression', + number, + 'Capacity', + number, + 'Merged nodes', + number, + 'Unmerged nodes', + number, + 'Merged weight', + string, + 'Unmerged weight', + string, + 'Total compressions', + number +]; +interface InfoReply { + comperssion: number; + capacity: number; + mergedNodes: number; + unmergedNodes: number; + mergedWeight: number; + unmergedWeight: number; + totalCompression: number; +} +export declare function transformReply(reply: InfoRawReply): InfoReply; +export {}; diff --git a/server/node_modules/@redis/bloom/dist/commands/t-digest/INFO.js b/server/node_modules/@redis/bloom/dist/commands/t-digest/INFO.js new file mode 100644 index 0000000..97ea9fc --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/t-digest/INFO.js @@ -0,0 +1,24 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key) { + return [ + 'TDIGEST.INFO', + key + ]; +} +exports.transformArguments = transformArguments; +function transformReply(reply) { + return { + comperssion: reply[1], + capacity: reply[3], + mergedNodes: reply[5], + unmergedNodes: reply[7], + mergedWeight: Number(reply[9]), + unmergedWeight: Number(reply[11]), + totalCompression: reply[13] + }; +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/bloom/dist/commands/t-digest/MAX.d.ts b/server/node_modules/@redis/bloom/dist/commands/t-digest/MAX.d.ts new file mode 100644 index 0000000..24c6f01 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/t-digest/MAX.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument, RedisCommandArguments } from '@redis/client/dist/lib/commands'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: RedisCommandArgument): RedisCommandArguments; +export { transformDoubleReply as transformReply } from '.'; diff --git a/server/node_modules/@redis/bloom/dist/commands/t-digest/MAX.js b/server/node_modules/@redis/bloom/dist/commands/t-digest/MAX.js new file mode 100644 index 0000000..80d2af4 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/t-digest/MAX.js @@ -0,0 +1,14 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key) { + return [ + 'TDIGEST.MAX', + key + ]; +} +exports.transformArguments = transformArguments; +var _1 = require("."); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return _1.transformDoubleReply; } }); diff --git a/server/node_modules/@redis/bloom/dist/commands/t-digest/MERGE.d.ts b/server/node_modules/@redis/bloom/dist/commands/t-digest/MERGE.d.ts new file mode 100644 index 0000000..a5007ce --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/t-digest/MERGE.d.ts @@ -0,0 +1,9 @@ +import { RedisCommandArgument, RedisCommandArguments } from '@redis/client/dist/lib/commands'; +import { CompressionOption } from '.'; +export declare const FIRST_KEY_INDEX = 1; +interface MergeOptions extends CompressionOption { + OVERRIDE?: boolean; +} +export declare function transformArguments(destKey: RedisCommandArgument, srcKeys: RedisCommandArgument | Array, options?: MergeOptions): RedisCommandArguments; +export declare function transformReply(): 'OK'; +export {}; diff --git a/server/node_modules/@redis/bloom/dist/commands/t-digest/MERGE.js b/server/node_modules/@redis/bloom/dist/commands/t-digest/MERGE.js new file mode 100644 index 0000000..8e65759 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/t-digest/MERGE.js @@ -0,0 +1,15 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("@redis/client/dist/lib/commands/generic-transformers"); +const _1 = require("."); +exports.FIRST_KEY_INDEX = 1; +function transformArguments(destKey, srcKeys, options) { + const args = (0, generic_transformers_1.pushVerdictArgument)(['TDIGEST.MERGE', destKey], srcKeys); + (0, _1.pushCompressionArgument)(args, options); + if (options?.OVERRIDE) { + args.push('OVERRIDE'); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/bloom/dist/commands/t-digest/MIN.d.ts b/server/node_modules/@redis/bloom/dist/commands/t-digest/MIN.d.ts new file mode 100644 index 0000000..24c6f01 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/t-digest/MIN.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument, RedisCommandArguments } from '@redis/client/dist/lib/commands'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: RedisCommandArgument): RedisCommandArguments; +export { transformDoubleReply as transformReply } from '.'; diff --git a/server/node_modules/@redis/bloom/dist/commands/t-digest/MIN.js b/server/node_modules/@redis/bloom/dist/commands/t-digest/MIN.js new file mode 100644 index 0000000..3d8e234 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/t-digest/MIN.js @@ -0,0 +1,14 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key) { + return [ + 'TDIGEST.MIN', + key + ]; +} +exports.transformArguments = transformArguments; +var _1 = require("."); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return _1.transformDoubleReply; } }); diff --git a/server/node_modules/@redis/bloom/dist/commands/t-digest/QUANTILE.d.ts b/server/node_modules/@redis/bloom/dist/commands/t-digest/QUANTILE.d.ts new file mode 100644 index 0000000..b684559 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/t-digest/QUANTILE.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument, RedisCommandArguments } from '@redis/client/dist/lib/commands'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: RedisCommandArgument, quantiles: Array): RedisCommandArguments; +export { transformDoublesReply as transformReply } from '.'; diff --git a/server/node_modules/@redis/bloom/dist/commands/t-digest/QUANTILE.js b/server/node_modules/@redis/bloom/dist/commands/t-digest/QUANTILE.js new file mode 100644 index 0000000..cd106ab --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/t-digest/QUANTILE.js @@ -0,0 +1,18 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, quantiles) { + const args = [ + 'TDIGEST.QUANTILE', + key + ]; + for (const quantile of quantiles) { + args.push(quantile.toString()); + } + return args; +} +exports.transformArguments = transformArguments; +var _1 = require("."); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return _1.transformDoublesReply; } }); diff --git a/server/node_modules/@redis/bloom/dist/commands/t-digest/RANK.d.ts b/server/node_modules/@redis/bloom/dist/commands/t-digest/RANK.d.ts new file mode 100644 index 0000000..09eef2d --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/t-digest/RANK.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument, RedisCommandArguments } from '@redis/client/dist/lib/commands'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: RedisCommandArgument, values: Array): RedisCommandArguments; +export declare function transformReply(): Array; diff --git a/server/node_modules/@redis/bloom/dist/commands/t-digest/RANK.js b/server/node_modules/@redis/bloom/dist/commands/t-digest/RANK.js new file mode 100644 index 0000000..0edb7bf --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/t-digest/RANK.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, values) { + const args = ['TDIGEST.RANK', key]; + for (const item of values) { + args.push(item.toString()); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/bloom/dist/commands/t-digest/RESET.d.ts b/server/node_modules/@redis/bloom/dist/commands/t-digest/RESET.d.ts new file mode 100644 index 0000000..710975b --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/t-digest/RESET.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '@redis/client/dist/lib/commands'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument): RedisCommandArguments; +export declare function transformReply(): 'OK'; diff --git a/server/node_modules/@redis/bloom/dist/commands/t-digest/RESET.js b/server/node_modules/@redis/bloom/dist/commands/t-digest/RESET.js new file mode 100644 index 0000000..b2b2940 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/t-digest/RESET.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key) { + return ['TDIGEST.RESET', key]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/bloom/dist/commands/t-digest/REVRANK.d.ts b/server/node_modules/@redis/bloom/dist/commands/t-digest/REVRANK.d.ts new file mode 100644 index 0000000..09eef2d --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/t-digest/REVRANK.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument, RedisCommandArguments } from '@redis/client/dist/lib/commands'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: RedisCommandArgument, values: Array): RedisCommandArguments; +export declare function transformReply(): Array; diff --git a/server/node_modules/@redis/bloom/dist/commands/t-digest/REVRANK.js b/server/node_modules/@redis/bloom/dist/commands/t-digest/REVRANK.js new file mode 100644 index 0000000..a97d27a --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/t-digest/REVRANK.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, values) { + const args = ['TDIGEST.REVRANK', key]; + for (const item of values) { + args.push(item.toString()); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/bloom/dist/commands/t-digest/TRIMMED_MEAN.d.ts b/server/node_modules/@redis/bloom/dist/commands/t-digest/TRIMMED_MEAN.d.ts new file mode 100644 index 0000000..db7707b --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/t-digest/TRIMMED_MEAN.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument, RedisCommandArguments } from '@redis/client/dist/lib/commands'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: RedisCommandArgument, lowCutPercentile: number, highCutPercentile: number): RedisCommandArguments; +export { transformDoubleReply as transformReply } from '.'; diff --git a/server/node_modules/@redis/bloom/dist/commands/t-digest/TRIMMED_MEAN.js b/server/node_modules/@redis/bloom/dist/commands/t-digest/TRIMMED_MEAN.js new file mode 100644 index 0000000..ee46eda --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/t-digest/TRIMMED_MEAN.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, lowCutPercentile, highCutPercentile) { + return [ + 'TDIGEST.TRIMMED_MEAN', + key, + lowCutPercentile.toString(), + highCutPercentile.toString() + ]; +} +exports.transformArguments = transformArguments; +var _1 = require("."); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return _1.transformDoubleReply; } }); diff --git a/server/node_modules/@redis/bloom/dist/commands/t-digest/index.d.ts b/server/node_modules/@redis/bloom/dist/commands/t-digest/index.d.ts new file mode 100644 index 0000000..67a8ea7 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/t-digest/index.d.ts @@ -0,0 +1,52 @@ +import { RedisCommandArguments } from '@redis/client/dist/lib/commands'; +import * as ADD from './ADD'; +import * as BYRANK from './BYRANK'; +import * as BYREVRANK from './BYREVRANK'; +import * as CDF from './CDF'; +import * as CREATE from './CREATE'; +import * as INFO from './INFO'; +import * as MAX from './MAX'; +import * as MERGE from './MERGE'; +import * as MIN from './MIN'; +import * as QUANTILE from './QUANTILE'; +import * as RANK from './RANK'; +import * as RESET from './RESET'; +import * as REVRANK from './REVRANK'; +import * as TRIMMED_MEAN from './TRIMMED_MEAN'; +declare const _default: { + ADD: typeof ADD; + add: typeof ADD; + BYRANK: typeof BYRANK; + byRank: typeof BYRANK; + BYREVRANK: typeof BYREVRANK; + byRevRank: typeof BYREVRANK; + CDF: typeof CDF; + cdf: typeof CDF; + CREATE: typeof CREATE; + create: typeof CREATE; + INFO: typeof INFO; + info: typeof INFO; + MAX: typeof MAX; + max: typeof MAX; + MERGE: typeof MERGE; + merge: typeof MERGE; + MIN: typeof MIN; + min: typeof MIN; + QUANTILE: typeof QUANTILE; + quantile: typeof QUANTILE; + RANK: typeof RANK; + rank: typeof RANK; + RESET: typeof RESET; + reset: typeof RESET; + REVRANK: typeof REVRANK; + revRank: typeof REVRANK; + TRIMMED_MEAN: typeof TRIMMED_MEAN; + trimmedMean: typeof TRIMMED_MEAN; +}; +export default _default; +export interface CompressionOption { + COMPRESSION?: number; +} +export declare function pushCompressionArgument(args: RedisCommandArguments, options?: CompressionOption): RedisCommandArguments; +export declare function transformDoubleReply(reply: string): number; +export declare function transformDoublesReply(reply: Array): Array; diff --git a/server/node_modules/@redis/bloom/dist/commands/t-digest/index.js b/server/node_modules/@redis/bloom/dist/commands/t-digest/index.js new file mode 100644 index 0000000..862b27b --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/t-digest/index.js @@ -0,0 +1,71 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformDoublesReply = exports.transformDoubleReply = exports.pushCompressionArgument = void 0; +const ADD = require("./ADD"); +const BYRANK = require("./BYRANK"); +const BYREVRANK = require("./BYREVRANK"); +const CDF = require("./CDF"); +const CREATE = require("./CREATE"); +const INFO = require("./INFO"); +const MAX = require("./MAX"); +const MERGE = require("./MERGE"); +const MIN = require("./MIN"); +const QUANTILE = require("./QUANTILE"); +const RANK = require("./RANK"); +const RESET = require("./RESET"); +const REVRANK = require("./REVRANK"); +const TRIMMED_MEAN = require("./TRIMMED_MEAN"); +exports.default = { + ADD, + add: ADD, + BYRANK, + byRank: BYRANK, + BYREVRANK, + byRevRank: BYREVRANK, + CDF, + cdf: CDF, + CREATE, + create: CREATE, + INFO, + info: INFO, + MAX, + max: MAX, + MERGE, + merge: MERGE, + MIN, + min: MIN, + QUANTILE, + quantile: QUANTILE, + RANK, + rank: RANK, + RESET, + reset: RESET, + REVRANK, + revRank: REVRANK, + TRIMMED_MEAN, + trimmedMean: TRIMMED_MEAN +}; +function pushCompressionArgument(args, options) { + if (options?.COMPRESSION) { + args.push('COMPRESSION', options.COMPRESSION.toString()); + } + return args; +} +exports.pushCompressionArgument = pushCompressionArgument; +function transformDoubleReply(reply) { + switch (reply) { + case 'inf': + return Infinity; + case '-inf': + return -Infinity; + case 'nan': + return NaN; + default: + return parseFloat(reply); + } +} +exports.transformDoubleReply = transformDoubleReply; +function transformDoublesReply(reply) { + return reply.map(transformDoubleReply); +} +exports.transformDoublesReply = transformDoublesReply; diff --git a/server/node_modules/@redis/bloom/dist/commands/top-k/ADD.d.ts b/server/node_modules/@redis/bloom/dist/commands/top-k/ADD.d.ts new file mode 100644 index 0000000..f147189 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/top-k/ADD.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArguments } from '@redis/client/dist/lib/commands'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: string, items: string | Array): RedisCommandArguments; +export declare function transformReply(): Array; diff --git a/server/node_modules/@redis/bloom/dist/commands/top-k/ADD.js b/server/node_modules/@redis/bloom/dist/commands/top-k/ADD.js new file mode 100644 index 0000000..794877e --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/top-k/ADD.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("@redis/client/dist/lib/commands/generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, items) { + return (0, generic_transformers_1.pushVerdictArguments)(['TOPK.ADD', key], items); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/bloom/dist/commands/top-k/COUNT.d.ts b/server/node_modules/@redis/bloom/dist/commands/top-k/COUNT.d.ts new file mode 100644 index 0000000..e419fe6 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/top-k/COUNT.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArguments } from '@redis/client/dist/lib/commands'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: string, items: string | Array): RedisCommandArguments; +export declare function transformReply(): Array; diff --git a/server/node_modules/@redis/bloom/dist/commands/top-k/COUNT.js b/server/node_modules/@redis/bloom/dist/commands/top-k/COUNT.js new file mode 100644 index 0000000..38668d4 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/top-k/COUNT.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("@redis/client/dist/lib/commands/generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, items) { + return (0, generic_transformers_1.pushVerdictArguments)(['TOPK.COUNT', key], items); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/bloom/dist/commands/top-k/INCRBY.d.ts b/server/node_modules/@redis/bloom/dist/commands/top-k/INCRBY.d.ts new file mode 100644 index 0000000..dd04e05 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/top-k/INCRBY.d.ts @@ -0,0 +1,8 @@ +export declare const FIRST_KEY_INDEX = 1; +interface IncrByItem { + item: string; + incrementBy: number; +} +export declare function transformArguments(key: string, items: IncrByItem | Array): Array; +export declare function transformReply(): Array; +export {}; diff --git a/server/node_modules/@redis/bloom/dist/commands/top-k/INCRBY.js b/server/node_modules/@redis/bloom/dist/commands/top-k/INCRBY.js new file mode 100644 index 0000000..ecee27b --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/top-k/INCRBY.js @@ -0,0 +1,20 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, items) { + const args = ['TOPK.INCRBY', key]; + if (Array.isArray(items)) { + for (const item of items) { + pushIncrByItem(args, item); + } + } + else { + pushIncrByItem(args, items); + } + return args; +} +exports.transformArguments = transformArguments; +function pushIncrByItem(args, { item, incrementBy }) { + args.push(item, incrementBy.toString()); +} diff --git a/server/node_modules/@redis/bloom/dist/commands/top-k/INFO.d.ts b/server/node_modules/@redis/bloom/dist/commands/top-k/INFO.d.ts new file mode 100644 index 0000000..5758a0e --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/top-k/INFO.d.ts @@ -0,0 +1,20 @@ +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: string): Array; +export type InfoRawReply = [ + _: string, + k: number, + _: string, + width: number, + _: string, + depth: number, + _: string, + decay: string +]; +export interface InfoReply { + k: number; + width: number; + depth: number; + decay: number; +} +export declare function transformReply(reply: InfoRawReply): InfoReply; diff --git a/server/node_modules/@redis/bloom/dist/commands/top-k/INFO.js b/server/node_modules/@redis/bloom/dist/commands/top-k/INFO.js new file mode 100644 index 0000000..244eb77 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/top-k/INFO.js @@ -0,0 +1,18 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key) { + return ['TOPK.INFO', key]; +} +exports.transformArguments = transformArguments; +function transformReply(reply) { + return { + k: reply[1], + width: reply[3], + depth: reply[5], + decay: Number(reply[7]) + }; +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/bloom/dist/commands/top-k/LIST.d.ts b/server/node_modules/@redis/bloom/dist/commands/top-k/LIST.d.ts new file mode 100644 index 0000000..473a30b --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/top-k/LIST.d.ts @@ -0,0 +1,4 @@ +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: string): Array; +export declare function transformReply(): Array; diff --git a/server/node_modules/@redis/bloom/dist/commands/top-k/LIST.js b/server/node_modules/@redis/bloom/dist/commands/top-k/LIST.js new file mode 100644 index 0000000..0a7728d --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/top-k/LIST.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key) { + return ['TOPK.LIST', key]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/bloom/dist/commands/top-k/LIST_WITHCOUNT.d.ts b/server/node_modules/@redis/bloom/dist/commands/top-k/LIST_WITHCOUNT.d.ts new file mode 100644 index 0000000..1307f15 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/top-k/LIST_WITHCOUNT.d.ts @@ -0,0 +1,10 @@ +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: string): Array; +type ListWithCountRawReply = Array; +type ListWithCountReply = Array<{ + item: string; + count: number; +}>; +export declare function transformReply(rawReply: ListWithCountRawReply): ListWithCountReply; +export {}; diff --git a/server/node_modules/@redis/bloom/dist/commands/top-k/LIST_WITHCOUNT.js b/server/node_modules/@redis/bloom/dist/commands/top-k/LIST_WITHCOUNT.js new file mode 100644 index 0000000..95736d0 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/top-k/LIST_WITHCOUNT.js @@ -0,0 +1,20 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key) { + return ['TOPK.LIST', key, 'WITHCOUNT']; +} +exports.transformArguments = transformArguments; +function transformReply(rawReply) { + const reply = []; + for (let i = 0; i < rawReply.length; i++) { + reply.push({ + item: rawReply[i], + count: rawReply[++i] + }); + } + return reply; +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/bloom/dist/commands/top-k/QUERY.d.ts b/server/node_modules/@redis/bloom/dist/commands/top-k/QUERY.d.ts new file mode 100644 index 0000000..e419fe6 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/top-k/QUERY.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArguments } from '@redis/client/dist/lib/commands'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: string, items: string | Array): RedisCommandArguments; +export declare function transformReply(): Array; diff --git a/server/node_modules/@redis/bloom/dist/commands/top-k/QUERY.js b/server/node_modules/@redis/bloom/dist/commands/top-k/QUERY.js new file mode 100644 index 0000000..f24c075 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/top-k/QUERY.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("@redis/client/dist/lib/commands/generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, items) { + return (0, generic_transformers_1.pushVerdictArguments)(['TOPK.QUERY', key], items); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/bloom/dist/commands/top-k/RESERVE.d.ts b/server/node_modules/@redis/bloom/dist/commands/top-k/RESERVE.d.ts new file mode 100644 index 0000000..2662d21 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/top-k/RESERVE.d.ts @@ -0,0 +1,10 @@ +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +interface ReserveOptions { + width: number; + depth: number; + decay: number; +} +export declare function transformArguments(key: string, topK: number, options?: ReserveOptions): Array; +export declare function transformReply(): 'OK'; +export {}; diff --git a/server/node_modules/@redis/bloom/dist/commands/top-k/RESERVE.js b/server/node_modules/@redis/bloom/dist/commands/top-k/RESERVE.js new file mode 100644 index 0000000..ca3f9c9 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/top-k/RESERVE.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, topK, options) { + const args = ['TOPK.RESERVE', key, topK.toString()]; + if (options) { + args.push(options.width.toString(), options.depth.toString(), options.decay.toString()); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/bloom/dist/commands/top-k/index.d.ts b/server/node_modules/@redis/bloom/dist/commands/top-k/index.d.ts new file mode 100644 index 0000000..31d20b1 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/top-k/index.d.ts @@ -0,0 +1,27 @@ +import * as ADD from './ADD'; +import * as COUNT from './COUNT'; +import * as INCRBY from './INCRBY'; +import * as INFO from './INFO'; +import * as LIST_WITHCOUNT from './LIST_WITHCOUNT'; +import * as LIST from './LIST'; +import * as QUERY from './QUERY'; +import * as RESERVE from './RESERVE'; +declare const _default: { + ADD: typeof ADD; + add: typeof ADD; + COUNT: typeof COUNT; + count: typeof COUNT; + INCRBY: typeof INCRBY; + incrBy: typeof INCRBY; + INFO: typeof INFO; + info: typeof INFO; + LIST_WITHCOUNT: typeof LIST_WITHCOUNT; + listWithCount: typeof LIST_WITHCOUNT; + LIST: typeof LIST; + list: typeof LIST; + QUERY: typeof QUERY; + query: typeof QUERY; + RESERVE: typeof RESERVE; + reserve: typeof RESERVE; +}; +export default _default; diff --git a/server/node_modules/@redis/bloom/dist/commands/top-k/index.js b/server/node_modules/@redis/bloom/dist/commands/top-k/index.js new file mode 100644 index 0000000..648cea5 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/commands/top-k/index.js @@ -0,0 +1,28 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const ADD = require("./ADD"); +const COUNT = require("./COUNT"); +const INCRBY = require("./INCRBY"); +const INFO = require("./INFO"); +const LIST_WITHCOUNT = require("./LIST_WITHCOUNT"); +const LIST = require("./LIST"); +const QUERY = require("./QUERY"); +const RESERVE = require("./RESERVE"); +exports.default = { + ADD, + add: ADD, + COUNT, + count: COUNT, + INCRBY, + incrBy: INCRBY, + INFO, + info: INFO, + LIST_WITHCOUNT, + listWithCount: LIST_WITHCOUNT, + LIST, + list: LIST, + QUERY, + query: QUERY, + RESERVE, + reserve: RESERVE +}; diff --git a/server/node_modules/@redis/bloom/dist/index.d.ts b/server/node_modules/@redis/bloom/dist/index.d.ts new file mode 100644 index 0000000..bc0e103 --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/index.d.ts @@ -0,0 +1 @@ +export { default } from './commands'; diff --git a/server/node_modules/@redis/bloom/dist/index.js b/server/node_modules/@redis/bloom/dist/index.js new file mode 100644 index 0000000..992c58d --- /dev/null +++ b/server/node_modules/@redis/bloom/dist/index.js @@ -0,0 +1,5 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = void 0; +var commands_1 = require("./commands"); +Object.defineProperty(exports, "default", { enumerable: true, get: function () { return commands_1.default; } }); diff --git a/server/node_modules/@redis/bloom/package.json b/server/node_modules/@redis/bloom/package.json new file mode 100644 index 0000000..d6d5e47 --- /dev/null +++ b/server/node_modules/@redis/bloom/package.json @@ -0,0 +1,29 @@ +{ + "name": "@redis/bloom", + "version": "1.2.0", + "license": "MIT", + "main": "./dist/index.js", + "types": "./dist/index.d.ts", + "files": [ + "dist/" + ], + "scripts": { + "test": "nyc -r text-summary -r lcov mocha -r source-map-support/register -r ts-node/register './lib/**/*.spec.ts'", + "build": "tsc", + "documentation": "typedoc" + }, + "peerDependencies": { + "@redis/client": "^1.0.0" + }, + "devDependencies": { + "@istanbuljs/nyc-config-typescript": "^1.0.2", + "@redis/test-utils": "*", + "@types/node": "^18.11.18", + "nyc": "^15.1.0", + "release-it": "^15.6.0", + "source-map-support": "^0.5.21", + "ts-node": "^10.9.1", + "typedoc": "^0.23.24", + "typescript": "^4.9.4" + } +} diff --git a/server/node_modules/@redis/client/README.md b/server/node_modules/@redis/client/README.md new file mode 100644 index 0000000..4b5d150 --- /dev/null +++ b/server/node_modules/@redis/client/README.md @@ -0,0 +1,3 @@ +# @redis/client + +The source code and documentation for this package are in the main [node-redis](https://github.com/redis/node-redis) repo. diff --git a/server/node_modules/@redis/client/dist/index.d.ts b/server/node_modules/@redis/client/dist/index.d.ts new file mode 100644 index 0000000..de56486 --- /dev/null +++ b/server/node_modules/@redis/client/dist/index.d.ts @@ -0,0 +1,13 @@ +import RedisClient from './lib/client'; +import RedisCluster from './lib/cluster'; +export { RedisClientType, RedisClientOptions } from './lib/client'; +export { RedisModules, RedisFunctions, RedisScripts } from './lib/commands'; +export declare const createClient: typeof RedisClient.create; +export declare const commandOptions: typeof RedisClient.commandOptions; +export { RedisClusterType, RedisClusterOptions } from './lib/cluster'; +export declare const createCluster: typeof RedisCluster.create; +export { defineScript } from './lib/lua-script'; +export * from './lib/errors'; +export { GeoReplyWith } from './lib/commands/generic-transformers'; +export { SetOptions } from './lib/commands/SET'; +export { RedisFlushModes } from './lib/commands/FLUSHALL'; diff --git a/server/node_modules/@redis/client/dist/index.js b/server/node_modules/@redis/client/dist/index.js new file mode 100644 index 0000000..fe818c3 --- /dev/null +++ b/server/node_modules/@redis/client/dist/index.js @@ -0,0 +1,29 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.RedisFlushModes = exports.GeoReplyWith = exports.defineScript = exports.createCluster = exports.commandOptions = exports.createClient = void 0; +const client_1 = require("./lib/client"); +const cluster_1 = require("./lib/cluster"); +exports.createClient = client_1.default.create; +exports.commandOptions = client_1.default.commandOptions; +exports.createCluster = cluster_1.default.create; +var lua_script_1 = require("./lib/lua-script"); +Object.defineProperty(exports, "defineScript", { enumerable: true, get: function () { return lua_script_1.defineScript; } }); +__exportStar(require("./lib/errors"), exports); +var generic_transformers_1 = require("./lib/commands/generic-transformers"); +Object.defineProperty(exports, "GeoReplyWith", { enumerable: true, get: function () { return generic_transformers_1.GeoReplyWith; } }); +var FLUSHALL_1 = require("./lib/commands/FLUSHALL"); +Object.defineProperty(exports, "RedisFlushModes", { enumerable: true, get: function () { return FLUSHALL_1.RedisFlushModes; } }); diff --git a/server/node_modules/@redis/client/dist/lib/client/RESP2/composers/buffer.d.ts b/server/node_modules/@redis/client/dist/lib/client/RESP2/composers/buffer.d.ts new file mode 100644 index 0000000..e3978ae --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/client/RESP2/composers/buffer.d.ts @@ -0,0 +1,8 @@ +/// +import { Composer } from './interface'; +export default class BufferComposer implements Composer { + private chunks; + write(buffer: Buffer): void; + end(buffer: Buffer): Buffer; + reset(): void; +} diff --git a/server/node_modules/@redis/client/dist/lib/client/RESP2/composers/buffer.js b/server/node_modules/@redis/client/dist/lib/client/RESP2/composers/buffer.js new file mode 100644 index 0000000..3b3347b --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/client/RESP2/composers/buffer.js @@ -0,0 +1,23 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +class BufferComposer { + constructor() { + Object.defineProperty(this, "chunks", { + enumerable: true, + configurable: true, + writable: true, + value: [] + }); + } + write(buffer) { + this.chunks.push(buffer); + } + end(buffer) { + this.write(buffer); + return Buffer.concat(this.chunks.splice(0)); + } + reset() { + this.chunks = []; + } +} +exports.default = BufferComposer; diff --git a/server/node_modules/@redis/client/dist/lib/client/RESP2/composers/interface.d.ts b/server/node_modules/@redis/client/dist/lib/client/RESP2/composers/interface.d.ts new file mode 100644 index 0000000..165cee3 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/client/RESP2/composers/interface.d.ts @@ -0,0 +1,6 @@ +/// +export interface Composer { + write(buffer: Buffer): void; + end(buffer: Buffer): T; + reset(): void; +} diff --git a/server/node_modules/@redis/client/dist/lib/client/RESP2/composers/interface.js b/server/node_modules/@redis/client/dist/lib/client/RESP2/composers/interface.js new file mode 100644 index 0000000..c8ad2e5 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/client/RESP2/composers/interface.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/server/node_modules/@redis/client/dist/lib/client/RESP2/composers/string.d.ts b/server/node_modules/@redis/client/dist/lib/client/RESP2/composers/string.d.ts new file mode 100644 index 0000000..9d7e87a --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/client/RESP2/composers/string.d.ts @@ -0,0 +1,9 @@ +/// +import { Composer } from './interface'; +export default class StringComposer implements Composer { + private decoder; + private string; + write(buffer: Buffer): void; + end(buffer: Buffer): string; + reset(): void; +} diff --git a/server/node_modules/@redis/client/dist/lib/client/RESP2/composers/string.js b/server/node_modules/@redis/client/dist/lib/client/RESP2/composers/string.js new file mode 100644 index 0000000..4be78e1 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/client/RESP2/composers/string.js @@ -0,0 +1,31 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const string_decoder_1 = require("string_decoder"); +class StringComposer { + constructor() { + Object.defineProperty(this, "decoder", { + enumerable: true, + configurable: true, + writable: true, + value: new string_decoder_1.StringDecoder() + }); + Object.defineProperty(this, "string", { + enumerable: true, + configurable: true, + writable: true, + value: '' + }); + } + write(buffer) { + this.string += this.decoder.write(buffer); + } + end(buffer) { + const string = this.string + this.decoder.end(buffer); + this.string = ''; + return string; + } + reset() { + this.string = ''; + } +} +exports.default = StringComposer; diff --git a/server/node_modules/@redis/client/dist/lib/client/RESP2/decoder.d.ts b/server/node_modules/@redis/client/dist/lib/client/RESP2/decoder.d.ts new file mode 100644 index 0000000..0fc94cf --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/client/RESP2/decoder.d.ts @@ -0,0 +1,35 @@ +/// +import { ErrorReply } from '../../errors'; +export type Reply = string | Buffer | ErrorReply | number | null | Array; +export type ReturnStringsAsBuffers = () => boolean; +interface RESP2Options { + returnStringsAsBuffers: ReturnStringsAsBuffers; + onReply(reply: Reply): unknown; +} +export default class RESP2Decoder { + private options; + constructor(options: RESP2Options); + private cursor; + private type?; + private bufferComposer; + private stringComposer; + private currentStringComposer; + reset(): void; + write(chunk: Buffer): void; + private parseType; + private compose; + private parseSimpleString; + private parseError; + private integer; + private isNegativeInteger?; + private parseInteger; + private bulkStringRemainingLength?; + private parseBulkString; + private arraysInProcess; + private initializeArray; + private arrayItemType?; + private parseArray; + private returnArrayReply; + private pushArrayItem; +} +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/client/RESP2/decoder.js b/server/node_modules/@redis/client/dist/lib/client/RESP2/decoder.js new file mode 100644 index 0000000..0f62fc8 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/client/RESP2/decoder.js @@ -0,0 +1,250 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const errors_1 = require("../../errors"); +const buffer_1 = require("./composers/buffer"); +const string_1 = require("./composers/string"); +// RESP2 specification +// https://redis.io/topics/protocol +var Types; +(function (Types) { + Types[Types["SIMPLE_STRING"] = 43] = "SIMPLE_STRING"; + Types[Types["ERROR"] = 45] = "ERROR"; + Types[Types["INTEGER"] = 58] = "INTEGER"; + Types[Types["BULK_STRING"] = 36] = "BULK_STRING"; + Types[Types["ARRAY"] = 42] = "ARRAY"; // * +})(Types || (Types = {})); +var ASCII; +(function (ASCII) { + ASCII[ASCII["CR"] = 13] = "CR"; + ASCII[ASCII["ZERO"] = 48] = "ZERO"; + ASCII[ASCII["MINUS"] = 45] = "MINUS"; +})(ASCII || (ASCII = {})); +// Using TypeScript `private` and not the build-in `#` to avoid __classPrivateFieldGet and __classPrivateFieldSet +class RESP2Decoder { + constructor(options) { + Object.defineProperty(this, "options", { + enumerable: true, + configurable: true, + writable: true, + value: options + }); + Object.defineProperty(this, "cursor", { + enumerable: true, + configurable: true, + writable: true, + value: 0 + }); + Object.defineProperty(this, "type", { + enumerable: true, + configurable: true, + writable: true, + value: void 0 + }); + Object.defineProperty(this, "bufferComposer", { + enumerable: true, + configurable: true, + writable: true, + value: new buffer_1.default() + }); + Object.defineProperty(this, "stringComposer", { + enumerable: true, + configurable: true, + writable: true, + value: new string_1.default() + }); + Object.defineProperty(this, "currentStringComposer", { + enumerable: true, + configurable: true, + writable: true, + value: this.stringComposer + }); + Object.defineProperty(this, "integer", { + enumerable: true, + configurable: true, + writable: true, + value: 0 + }); + Object.defineProperty(this, "isNegativeInteger", { + enumerable: true, + configurable: true, + writable: true, + value: void 0 + }); + Object.defineProperty(this, "bulkStringRemainingLength", { + enumerable: true, + configurable: true, + writable: true, + value: void 0 + }); + Object.defineProperty(this, "arraysInProcess", { + enumerable: true, + configurable: true, + writable: true, + value: [] + }); + Object.defineProperty(this, "initializeArray", { + enumerable: true, + configurable: true, + writable: true, + value: false + }); + Object.defineProperty(this, "arrayItemType", { + enumerable: true, + configurable: true, + writable: true, + value: void 0 + }); + } + reset() { + this.cursor = 0; + this.type = undefined; + this.bufferComposer.reset(); + this.stringComposer.reset(); + this.currentStringComposer = this.stringComposer; + } + write(chunk) { + while (this.cursor < chunk.length) { + if (!this.type) { + this.currentStringComposer = this.options.returnStringsAsBuffers() ? + this.bufferComposer : + this.stringComposer; + this.type = chunk[this.cursor]; + if (++this.cursor >= chunk.length) + break; + } + const reply = this.parseType(chunk, this.type); + if (reply === undefined) + break; + this.type = undefined; + this.options.onReply(reply); + } + this.cursor -= chunk.length; + } + parseType(chunk, type, arraysToKeep) { + switch (type) { + case Types.SIMPLE_STRING: + return this.parseSimpleString(chunk); + case Types.ERROR: + return this.parseError(chunk); + case Types.INTEGER: + return this.parseInteger(chunk); + case Types.BULK_STRING: + return this.parseBulkString(chunk); + case Types.ARRAY: + return this.parseArray(chunk, arraysToKeep); + } + } + compose(chunk, composer) { + for (let i = this.cursor; i < chunk.length; i++) { + if (chunk[i] === ASCII.CR) { + const reply = composer.end(chunk.subarray(this.cursor, i)); + this.cursor = i + 2; + return reply; + } + } + const toWrite = chunk.subarray(this.cursor); + composer.write(toWrite); + this.cursor = chunk.length; + } + parseSimpleString(chunk) { + return this.compose(chunk, this.currentStringComposer); + } + parseError(chunk) { + const message = this.compose(chunk, this.stringComposer); + if (message !== undefined) { + return new errors_1.ErrorReply(message); + } + } + parseInteger(chunk) { + if (this.isNegativeInteger === undefined) { + this.isNegativeInteger = chunk[this.cursor] === ASCII.MINUS; + if (this.isNegativeInteger && ++this.cursor === chunk.length) + return; + } + do { + const byte = chunk[this.cursor]; + if (byte === ASCII.CR) { + const integer = this.isNegativeInteger ? -this.integer : this.integer; + this.integer = 0; + this.isNegativeInteger = undefined; + this.cursor += 2; + return integer; + } + this.integer = this.integer * 10 + byte - ASCII.ZERO; + } while (++this.cursor < chunk.length); + } + parseBulkString(chunk) { + if (this.bulkStringRemainingLength === undefined) { + const length = this.parseInteger(chunk); + if (length === undefined) + return; + if (length === -1) + return null; + this.bulkStringRemainingLength = length; + if (this.cursor >= chunk.length) + return; + } + const end = this.cursor + this.bulkStringRemainingLength; + if (chunk.length >= end) { + const reply = this.currentStringComposer.end(chunk.subarray(this.cursor, end)); + this.bulkStringRemainingLength = undefined; + this.cursor = end + 2; + return reply; + } + const toWrite = chunk.subarray(this.cursor); + this.currentStringComposer.write(toWrite); + this.bulkStringRemainingLength -= toWrite.length; + this.cursor = chunk.length; + } + parseArray(chunk, arraysToKeep = 0) { + if (this.initializeArray || this.arraysInProcess.length === arraysToKeep) { + const length = this.parseInteger(chunk); + if (length === undefined) { + this.initializeArray = true; + return undefined; + } + this.initializeArray = false; + this.arrayItemType = undefined; + if (length === -1) { + return this.returnArrayReply(null, arraysToKeep, chunk); + } + else if (length === 0) { + return this.returnArrayReply([], arraysToKeep, chunk); + } + this.arraysInProcess.push({ + array: new Array(length), + pushCounter: 0 + }); + } + while (this.cursor < chunk.length) { + if (!this.arrayItemType) { + this.arrayItemType = chunk[this.cursor]; + if (++this.cursor >= chunk.length) + break; + } + const item = this.parseType(chunk, this.arrayItemType, arraysToKeep + 1); + if (item === undefined) + break; + this.arrayItemType = undefined; + const reply = this.pushArrayItem(item, arraysToKeep); + if (reply !== undefined) + return reply; + } + } + returnArrayReply(reply, arraysToKeep, chunk) { + if (this.arraysInProcess.length <= arraysToKeep) + return reply; + return this.pushArrayItem(reply, arraysToKeep, chunk); + } + pushArrayItem(item, arraysToKeep, chunk) { + const to = this.arraysInProcess[this.arraysInProcess.length - 1]; + to.array[to.pushCounter] = item; + if (++to.pushCounter === to.array.length) { + return this.returnArrayReply(this.arraysInProcess.pop().array, arraysToKeep, chunk); + } + else if (chunk && chunk.length > this.cursor) { + return this.parseArray(chunk, arraysToKeep); + } + } +} +exports.default = RESP2Decoder; diff --git a/server/node_modules/@redis/client/dist/lib/client/RESP2/encoder.d.ts b/server/node_modules/@redis/client/dist/lib/client/RESP2/encoder.d.ts new file mode 100644 index 0000000..ea0a62b --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/client/RESP2/encoder.d.ts @@ -0,0 +1,2 @@ +import { RedisCommandArgument, RedisCommandArguments } from '../../commands'; +export default function encodeCommand(args: RedisCommandArguments): Array; diff --git a/server/node_modules/@redis/client/dist/lib/client/RESP2/encoder.js b/server/node_modules/@redis/client/dist/lib/client/RESP2/encoder.js new file mode 100644 index 0000000..ac713de --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/client/RESP2/encoder.js @@ -0,0 +1,23 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const CRLF = '\r\n'; +function encodeCommand(args) { + const toWrite = []; + let strings = '*' + args.length + CRLF; + for (let i = 0; i < args.length; i++) { + const arg = args[i]; + if (typeof arg === 'string') { + strings += '$' + Buffer.byteLength(arg) + CRLF + arg + CRLF; + } + else if (arg instanceof Buffer) { + toWrite.push(strings + '$' + arg.length.toString() + CRLF, arg); + strings = CRLF; + } + else { + throw new TypeError('Invalid argument type'); + } + } + toWrite.push(strings); + return toWrite; +} +exports.default = encodeCommand; diff --git a/server/node_modules/@redis/client/dist/lib/client/commands-queue.d.ts b/server/node_modules/@redis/client/dist/lib/client/commands-queue.d.ts new file mode 100644 index 0000000..25fa7e0 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/client/commands-queue.d.ts @@ -0,0 +1,42 @@ +/// +/// +import { RedisCommandArguments, RedisCommandRawReply } from '../commands'; +import { ChannelListeners, PubSubListener, PubSubType, PubSubTypeListeners } from './pub-sub'; +export interface QueueCommandOptions { + asap?: boolean; + chainId?: symbol; + signal?: AbortSignal; + returnBuffers?: boolean; +} +export interface CommandWaitingToBeSent extends CommandWaitingForReply { + args: RedisCommandArguments; + chainId?: symbol; + abort?: { + signal: AbortSignal; + listener(): void; + }; +} +interface CommandWaitingForReply { + resolve(reply?: unknown): void; + reject(err: unknown): void; + channelsCounter?: number; + returnBuffers?: boolean; +} +export type OnShardedChannelMoved = (channel: string, listeners: ChannelListeners) => void; +export default class RedisCommandsQueue { + #private; + get isPubSubActive(): boolean; + constructor(maxLength: number | null | undefined, onShardedChannelMoved: OnShardedChannelMoved); + addCommand(args: RedisCommandArguments, options?: QueueCommandOptions): Promise; + subscribe(type: PubSubType, channels: string | Array, listener: PubSubListener, returnBuffers?: T): Promise | undefined; + unsubscribe(type: PubSubType, channels?: string | Array, listener?: PubSubListener, returnBuffers?: T): Promise | undefined; + resubscribe(): Promise | undefined; + extendPubSubChannelListeners(type: PubSubType, channel: string, listeners: ChannelListeners): Promise | undefined; + extendPubSubListeners(type: PubSubType, listeners: PubSubTypeListeners): Promise | undefined; + getPubSubListeners(type: PubSubType): PubSubTypeListeners; + getCommandToSend(): RedisCommandArguments | undefined; + onReplyChunk(chunk: Buffer): void; + flushWaitingForReply(err: Error): void; + flushAll(err: Error): void; +} +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/client/commands-queue.js b/server/node_modules/@redis/client/dist/lib/client/commands-queue.js new file mode 100644 index 0000000..dbc8590 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/client/commands-queue.js @@ -0,0 +1,197 @@ +"use strict"; +var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; +}; +var _RedisCommandsQueue_instances, _a, _RedisCommandsQueue_flushQueue, _RedisCommandsQueue_maxLength, _RedisCommandsQueue_waitingToBeSent, _RedisCommandsQueue_waitingForReply, _RedisCommandsQueue_onShardedChannelMoved, _RedisCommandsQueue_pubSub, _RedisCommandsQueue_chainInExecution, _RedisCommandsQueue_decoder, _RedisCommandsQueue_pushPubSubCommand; +Object.defineProperty(exports, "__esModule", { value: true }); +const LinkedList = require("yallist"); +const errors_1 = require("../errors"); +const decoder_1 = require("./RESP2/decoder"); +const encoder_1 = require("./RESP2/encoder"); +const pub_sub_1 = require("./pub-sub"); +const PONG = Buffer.from('pong'); +class RedisCommandsQueue { + get isPubSubActive() { + return __classPrivateFieldGet(this, _RedisCommandsQueue_pubSub, "f").isActive; + } + constructor(maxLength, onShardedChannelMoved) { + _RedisCommandsQueue_instances.add(this); + _RedisCommandsQueue_maxLength.set(this, void 0); + _RedisCommandsQueue_waitingToBeSent.set(this, new LinkedList()); + _RedisCommandsQueue_waitingForReply.set(this, new LinkedList()); + _RedisCommandsQueue_onShardedChannelMoved.set(this, void 0); + _RedisCommandsQueue_pubSub.set(this, new pub_sub_1.PubSub()); + _RedisCommandsQueue_chainInExecution.set(this, void 0); + _RedisCommandsQueue_decoder.set(this, new decoder_1.default({ + returnStringsAsBuffers: () => { + return !!__classPrivateFieldGet(this, _RedisCommandsQueue_waitingForReply, "f").head?.value.returnBuffers || + __classPrivateFieldGet(this, _RedisCommandsQueue_pubSub, "f").isActive; + }, + onReply: reply => { + if (__classPrivateFieldGet(this, _RedisCommandsQueue_pubSub, "f").isActive && Array.isArray(reply)) { + if (__classPrivateFieldGet(this, _RedisCommandsQueue_pubSub, "f").handleMessageReply(reply)) + return; + const isShardedUnsubscribe = pub_sub_1.PubSub.isShardedUnsubscribe(reply); + if (isShardedUnsubscribe && !__classPrivateFieldGet(this, _RedisCommandsQueue_waitingForReply, "f").length) { + const channel = reply[1].toString(); + __classPrivateFieldGet(this, _RedisCommandsQueue_onShardedChannelMoved, "f").call(this, channel, __classPrivateFieldGet(this, _RedisCommandsQueue_pubSub, "f").removeShardedListeners(channel)); + return; + } + else if (isShardedUnsubscribe || pub_sub_1.PubSub.isStatusReply(reply)) { + const head = __classPrivateFieldGet(this, _RedisCommandsQueue_waitingForReply, "f").head.value; + if ((Number.isNaN(head.channelsCounter) && reply[2] === 0) || + --head.channelsCounter === 0) { + __classPrivateFieldGet(this, _RedisCommandsQueue_waitingForReply, "f").shift().resolve(); + } + return; + } + if (PONG.equals(reply[0])) { + const { resolve, returnBuffers } = __classPrivateFieldGet(this, _RedisCommandsQueue_waitingForReply, "f").shift(), buffer = (reply[1].length === 0 ? reply[0] : reply[1]); + resolve(returnBuffers ? buffer : buffer.toString()); + return; + } + } + const { resolve, reject } = __classPrivateFieldGet(this, _RedisCommandsQueue_waitingForReply, "f").shift(); + if (reply instanceof errors_1.ErrorReply) { + reject(reply); + } + else { + resolve(reply); + } + } + })); + __classPrivateFieldSet(this, _RedisCommandsQueue_maxLength, maxLength, "f"); + __classPrivateFieldSet(this, _RedisCommandsQueue_onShardedChannelMoved, onShardedChannelMoved, "f"); + } + addCommand(args, options) { + if (__classPrivateFieldGet(this, _RedisCommandsQueue_maxLength, "f") && __classPrivateFieldGet(this, _RedisCommandsQueue_waitingToBeSent, "f").length + __classPrivateFieldGet(this, _RedisCommandsQueue_waitingForReply, "f").length >= __classPrivateFieldGet(this, _RedisCommandsQueue_maxLength, "f")) { + return Promise.reject(new Error('The queue is full')); + } + else if (options?.signal?.aborted) { + return Promise.reject(new errors_1.AbortError()); + } + return new Promise((resolve, reject) => { + const node = new LinkedList.Node({ + args, + chainId: options?.chainId, + returnBuffers: options?.returnBuffers, + resolve, + reject + }); + if (options?.signal) { + const listener = () => { + __classPrivateFieldGet(this, _RedisCommandsQueue_waitingToBeSent, "f").removeNode(node); + node.value.reject(new errors_1.AbortError()); + }; + node.value.abort = { + signal: options.signal, + listener + }; + // AbortSignal type is incorrent + options.signal.addEventListener('abort', listener, { + once: true + }); + } + if (options?.asap) { + __classPrivateFieldGet(this, _RedisCommandsQueue_waitingToBeSent, "f").unshiftNode(node); + } + else { + __classPrivateFieldGet(this, _RedisCommandsQueue_waitingToBeSent, "f").pushNode(node); + } + }); + } + subscribe(type, channels, listener, returnBuffers) { + return __classPrivateFieldGet(this, _RedisCommandsQueue_instances, "m", _RedisCommandsQueue_pushPubSubCommand).call(this, __classPrivateFieldGet(this, _RedisCommandsQueue_pubSub, "f").subscribe(type, channels, listener, returnBuffers)); + } + unsubscribe(type, channels, listener, returnBuffers) { + return __classPrivateFieldGet(this, _RedisCommandsQueue_instances, "m", _RedisCommandsQueue_pushPubSubCommand).call(this, __classPrivateFieldGet(this, _RedisCommandsQueue_pubSub, "f").unsubscribe(type, channels, listener, returnBuffers)); + } + resubscribe() { + const commands = __classPrivateFieldGet(this, _RedisCommandsQueue_pubSub, "f").resubscribe(); + if (!commands.length) + return; + return Promise.all(commands.map(command => __classPrivateFieldGet(this, _RedisCommandsQueue_instances, "m", _RedisCommandsQueue_pushPubSubCommand).call(this, command))); + } + extendPubSubChannelListeners(type, channel, listeners) { + return __classPrivateFieldGet(this, _RedisCommandsQueue_instances, "m", _RedisCommandsQueue_pushPubSubCommand).call(this, __classPrivateFieldGet(this, _RedisCommandsQueue_pubSub, "f").extendChannelListeners(type, channel, listeners)); + } + extendPubSubListeners(type, listeners) { + return __classPrivateFieldGet(this, _RedisCommandsQueue_instances, "m", _RedisCommandsQueue_pushPubSubCommand).call(this, __classPrivateFieldGet(this, _RedisCommandsQueue_pubSub, "f").extendTypeListeners(type, listeners)); + } + getPubSubListeners(type) { + return __classPrivateFieldGet(this, _RedisCommandsQueue_pubSub, "f").getTypeListeners(type); + } + getCommandToSend() { + const toSend = __classPrivateFieldGet(this, _RedisCommandsQueue_waitingToBeSent, "f").shift(); + if (!toSend) + return; + let encoded; + try { + encoded = (0, encoder_1.default)(toSend.args); + } + catch (err) { + toSend.reject(err); + return; + } + __classPrivateFieldGet(this, _RedisCommandsQueue_waitingForReply, "f").push({ + resolve: toSend.resolve, + reject: toSend.reject, + channelsCounter: toSend.channelsCounter, + returnBuffers: toSend.returnBuffers + }); + __classPrivateFieldSet(this, _RedisCommandsQueue_chainInExecution, toSend.chainId, "f"); + return encoded; + } + onReplyChunk(chunk) { + __classPrivateFieldGet(this, _RedisCommandsQueue_decoder, "f").write(chunk); + } + flushWaitingForReply(err) { + __classPrivateFieldGet(this, _RedisCommandsQueue_decoder, "f").reset(); + __classPrivateFieldGet(this, _RedisCommandsQueue_pubSub, "f").reset(); + __classPrivateFieldGet(_a, _a, "m", _RedisCommandsQueue_flushQueue).call(_a, __classPrivateFieldGet(this, _RedisCommandsQueue_waitingForReply, "f"), err); + if (!__classPrivateFieldGet(this, _RedisCommandsQueue_chainInExecution, "f")) + return; + while (__classPrivateFieldGet(this, _RedisCommandsQueue_waitingToBeSent, "f").head?.value.chainId === __classPrivateFieldGet(this, _RedisCommandsQueue_chainInExecution, "f")) { + __classPrivateFieldGet(this, _RedisCommandsQueue_waitingToBeSent, "f").shift(); + } + __classPrivateFieldSet(this, _RedisCommandsQueue_chainInExecution, undefined, "f"); + } + flushAll(err) { + __classPrivateFieldGet(this, _RedisCommandsQueue_decoder, "f").reset(); + __classPrivateFieldGet(this, _RedisCommandsQueue_pubSub, "f").reset(); + __classPrivateFieldGet(_a, _a, "m", _RedisCommandsQueue_flushQueue).call(_a, __classPrivateFieldGet(this, _RedisCommandsQueue_waitingForReply, "f"), err); + __classPrivateFieldGet(_a, _a, "m", _RedisCommandsQueue_flushQueue).call(_a, __classPrivateFieldGet(this, _RedisCommandsQueue_waitingToBeSent, "f"), err); + } +} +_a = RedisCommandsQueue, _RedisCommandsQueue_maxLength = new WeakMap(), _RedisCommandsQueue_waitingToBeSent = new WeakMap(), _RedisCommandsQueue_waitingForReply = new WeakMap(), _RedisCommandsQueue_onShardedChannelMoved = new WeakMap(), _RedisCommandsQueue_pubSub = new WeakMap(), _RedisCommandsQueue_chainInExecution = new WeakMap(), _RedisCommandsQueue_decoder = new WeakMap(), _RedisCommandsQueue_instances = new WeakSet(), _RedisCommandsQueue_flushQueue = function _RedisCommandsQueue_flushQueue(queue, err) { + while (queue.length) { + queue.shift().reject(err); + } +}, _RedisCommandsQueue_pushPubSubCommand = function _RedisCommandsQueue_pushPubSubCommand(command) { + if (command === undefined) + return; + return new Promise((resolve, reject) => { + __classPrivateFieldGet(this, _RedisCommandsQueue_waitingToBeSent, "f").push({ + args: command.args, + channelsCounter: command.channelsCounter, + returnBuffers: true, + resolve: () => { + command.resolve(); + resolve(); + }, + reject: err => { + command.reject?.(); + reject(err); + } + }); + }); +}; +exports.default = RedisCommandsQueue; diff --git a/server/node_modules/@redis/client/dist/lib/client/commands.d.ts b/server/node_modules/@redis/client/dist/lib/client/commands.d.ts new file mode 100644 index 0000000..ce9c15e --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/client/commands.d.ts @@ -0,0 +1,816 @@ +import * as ACL_CAT from '../commands/ACL_CAT'; +import * as ACL_DELUSER from '../commands/ACL_DELUSER'; +import * as ACL_DRYRUN from '../commands/ACL_DRYRUN'; +import * as ACL_GENPASS from '../commands/ACL_GENPASS'; +import * as ACL_GETUSER from '../commands/ACL_GETUSER'; +import * as ACL_LIST from '../commands/ACL_LIST'; +import * as ACL_LOAD from '../commands/ACL_LOAD'; +import * as ACL_LOG_RESET from '../commands/ACL_LOG_RESET'; +import * as ACL_LOG from '../commands/ACL_LOG'; +import * as ACL_SAVE from '../commands/ACL_SAVE'; +import * as ACL_SETUSER from '../commands/ACL_SETUSER'; +import * as ACL_USERS from '../commands/ACL_USERS'; +import * as ACL_WHOAMI from '../commands/ACL_WHOAMI'; +import * as ASKING from '../commands/ASKING'; +import * as AUTH from '../commands/AUTH'; +import * as BGREWRITEAOF from '../commands/BGREWRITEAOF'; +import * as BGSAVE from '../commands/BGSAVE'; +import * as CLIENT_CACHING from '../commands/CLIENT_CACHING'; +import * as CLIENT_GETNAME from '../commands/CLIENT_GETNAME'; +import * as CLIENT_GETREDIR from '../commands/CLIENT_GETREDIR'; +import * as CLIENT_ID from '../commands/CLIENT_ID'; +import * as CLIENT_KILL from '../commands/CLIENT_KILL'; +import * as CLIENT_LIST from '../commands/CLIENT_LIST'; +import * as CLIENT_NO_EVICT from '../commands/CLIENT_NO-EVICT'; +import * as CLIENT_NO_TOUCH from '../commands/CLIENT_NO-TOUCH'; +import * as CLIENT_PAUSE from '../commands/CLIENT_PAUSE'; +import * as CLIENT_SETNAME from '../commands/CLIENT_SETNAME'; +import * as CLIENT_TRACKING from '../commands/CLIENT_TRACKING'; +import * as CLIENT_TRACKINGINFO from '../commands/CLIENT_TRACKINGINFO'; +import * as CLIENT_UNPAUSE from '../commands/CLIENT_UNPAUSE'; +import * as CLIENT_INFO from '../commands/CLIENT_INFO'; +import * as CLUSTER_ADDSLOTS from '../commands/CLUSTER_ADDSLOTS'; +import * as CLUSTER_ADDSLOTSRANGE from '../commands/CLUSTER_ADDSLOTSRANGE'; +import * as CLUSTER_BUMPEPOCH from '../commands/CLUSTER_BUMPEPOCH'; +import * as CLUSTER_COUNT_FAILURE_REPORTS from '../commands/CLUSTER_COUNT-FAILURE-REPORTS'; +import * as CLUSTER_COUNTKEYSINSLOT from '../commands/CLUSTER_COUNTKEYSINSLOT'; +import * as CLUSTER_DELSLOTS from '../commands/CLUSTER_DELSLOTS'; +import * as CLUSTER_DELSLOTSRANGE from '../commands/CLUSTER_DELSLOTSRANGE'; +import * as CLUSTER_FAILOVER from '../commands/CLUSTER_FAILOVER'; +import * as CLUSTER_FLUSHSLOTS from '../commands/CLUSTER_FLUSHSLOTS'; +import * as CLUSTER_FORGET from '../commands/CLUSTER_FORGET'; +import * as CLUSTER_GETKEYSINSLOT from '../commands/CLUSTER_GETKEYSINSLOT'; +import * as CLUSTER_INFO from '../commands/CLUSTER_INFO'; +import * as CLUSTER_KEYSLOT from '../commands/CLUSTER_KEYSLOT'; +import * as CLUSTER_LINKS from '../commands/CLUSTER_LINKS'; +import * as CLUSTER_MEET from '../commands/CLUSTER_MEET'; +import * as CLUSTER_MYID from '../commands/CLUSTER_MYID'; +import * as CLUSTER_MYSHARDID from '../commands/CLUSTER_MYSHARDID'; +import * as CLUSTER_NODES from '../commands/CLUSTER_NODES'; +import * as CLUSTER_REPLICAS from '../commands/CLUSTER_REPLICAS'; +import * as CLUSTER_REPLICATE from '../commands/CLUSTER_REPLICATE'; +import * as CLUSTER_RESET from '../commands/CLUSTER_RESET'; +import * as CLUSTER_SAVECONFIG from '../commands/CLUSTER_SAVECONFIG'; +import * as CLUSTER_SET_CONFIG_EPOCH from '../commands/CLUSTER_SET-CONFIG-EPOCH'; +import * as CLUSTER_SETSLOT from '../commands/CLUSTER_SETSLOT'; +import * as CLUSTER_SLOTS from '../commands/CLUSTER_SLOTS'; +import * as COMMAND_COUNT from '../commands/COMMAND_COUNT'; +import * as COMMAND_GETKEYS from '../commands/COMMAND_GETKEYS'; +import * as COMMAND_GETKEYSANDFLAGS from '../commands/COMMAND_GETKEYSANDFLAGS'; +import * as COMMAND_INFO from '../commands/COMMAND_INFO'; +import * as COMMAND_LIST from '../commands/COMMAND_LIST'; +import * as COMMAND from '../commands/COMMAND'; +import * as CONFIG_GET from '../commands/CONFIG_GET'; +import * as CONFIG_RESETASTAT from '../commands/CONFIG_RESETSTAT'; +import * as CONFIG_REWRITE from '../commands/CONFIG_REWRITE'; +import * as CONFIG_SET from '../commands/CONFIG_SET'; +import * as DBSIZE from '../commands/DBSIZE'; +import * as DISCARD from '../commands/DISCARD'; +import * as ECHO from '../commands/ECHO'; +import * as FAILOVER from '../commands/FAILOVER'; +import * as FLUSHALL from '../commands/FLUSHALL'; +import * as FLUSHDB from '../commands/FLUSHDB'; +import * as FUNCTION_DELETE from '../commands/FUNCTION_DELETE'; +import * as FUNCTION_DUMP from '../commands/FUNCTION_DUMP'; +import * as FUNCTION_FLUSH from '../commands/FUNCTION_FLUSH'; +import * as FUNCTION_KILL from '../commands/FUNCTION_KILL'; +import * as FUNCTION_LIST_WITHCODE from '../commands/FUNCTION_LIST_WITHCODE'; +import * as FUNCTION_LIST from '../commands/FUNCTION_LIST'; +import * as FUNCTION_LOAD from '../commands/FUNCTION_LOAD'; +import * as FUNCTION_RESTORE from '../commands/FUNCTION_RESTORE'; +import * as FUNCTION_STATS from '../commands/FUNCTION_STATS'; +import * as HELLO from '../commands/HELLO'; +import * as INFO from '../commands/INFO'; +import * as KEYS from '../commands/KEYS'; +import * as LASTSAVE from '../commands/LASTSAVE'; +import * as LATENCY_DOCTOR from '../commands/LATENCY_DOCTOR'; +import * as LATENCY_GRAPH from '../commands/LATENCY_GRAPH'; +import * as LATENCY_HISTORY from '../commands/LATENCY_HISTORY'; +import * as LATENCY_LATEST from '../commands/LATENCY_LATEST'; +import * as LOLWUT from '../commands/LOLWUT'; +import * as MEMORY_DOCTOR from '../commands/MEMORY_DOCTOR'; +import * as MEMORY_MALLOC_STATS from '../commands/MEMORY_MALLOC-STATS'; +import * as MEMORY_PURGE from '../commands/MEMORY_PURGE'; +import * as MEMORY_STATS from '../commands/MEMORY_STATS'; +import * as MEMORY_USAGE from '../commands/MEMORY_USAGE'; +import * as MODULE_LIST from '../commands/MODULE_LIST'; +import * as MODULE_LOAD from '../commands/MODULE_LOAD'; +import * as MODULE_UNLOAD from '../commands/MODULE_UNLOAD'; +import * as MOVE from '../commands/MOVE'; +import * as PING from '../commands/PING'; +import * as PUBSUB_CHANNELS from '../commands/PUBSUB_CHANNELS'; +import * as PUBSUB_NUMPAT from '../commands/PUBSUB_NUMPAT'; +import * as PUBSUB_NUMSUB from '../commands/PUBSUB_NUMSUB'; +import * as PUBSUB_SHARDCHANNELS from '../commands/PUBSUB_SHARDCHANNELS'; +import * as PUBSUB_SHARDNUMSUB from '../commands/PUBSUB_SHARDNUMSUB'; +import * as RANDOMKEY from '../commands/RANDOMKEY'; +import * as READONLY from '../commands/READONLY'; +import * as READWRITE from '../commands/READWRITE'; +import * as REPLICAOF from '../commands/REPLICAOF'; +import * as RESTORE_ASKING from '../commands/RESTORE-ASKING'; +import * as ROLE from '../commands/ROLE'; +import * as SAVE from '../commands/SAVE'; +import * as SCAN from '../commands/SCAN'; +import * as SCRIPT_DEBUG from '../commands/SCRIPT_DEBUG'; +import * as SCRIPT_EXISTS from '../commands/SCRIPT_EXISTS'; +import * as SCRIPT_FLUSH from '../commands/SCRIPT_FLUSH'; +import * as SCRIPT_KILL from '../commands/SCRIPT_KILL'; +import * as SCRIPT_LOAD from '../commands/SCRIPT_LOAD'; +import * as SHUTDOWN from '../commands/SHUTDOWN'; +import * as SWAPDB from '../commands/SWAPDB'; +import * as TIME from '../commands/TIME'; +import * as UNWATCH from '../commands/UNWATCH'; +import * as WAIT from '../commands/WAIT'; +declare const _default: { + ACL_CAT: typeof ACL_CAT; + aclCat: typeof ACL_CAT; + ACL_DELUSER: typeof ACL_DELUSER; + aclDelUser: typeof ACL_DELUSER; + ACL_DRYRUN: typeof ACL_DRYRUN; + aclDryRun: typeof ACL_DRYRUN; + ACL_GENPASS: typeof ACL_GENPASS; + aclGenPass: typeof ACL_GENPASS; + ACL_GETUSER: typeof ACL_GETUSER; + aclGetUser: typeof ACL_GETUSER; + ACL_LIST: typeof ACL_LIST; + aclList: typeof ACL_LIST; + ACL_LOAD: typeof ACL_LOAD; + aclLoad: typeof ACL_LOAD; + ACL_LOG_RESET: typeof ACL_LOG_RESET; + aclLogReset: typeof ACL_LOG_RESET; + ACL_LOG: typeof ACL_LOG; + aclLog: typeof ACL_LOG; + ACL_SAVE: typeof ACL_SAVE; + aclSave: typeof ACL_SAVE; + ACL_SETUSER: typeof ACL_SETUSER; + aclSetUser: typeof ACL_SETUSER; + ACL_USERS: typeof ACL_USERS; + aclUsers: typeof ACL_USERS; + ACL_WHOAMI: typeof ACL_WHOAMI; + aclWhoAmI: typeof ACL_WHOAMI; + ASKING: typeof ASKING; + asking: typeof ASKING; + AUTH: typeof AUTH; + auth: typeof AUTH; + BGREWRITEAOF: typeof BGREWRITEAOF; + bgRewriteAof: typeof BGREWRITEAOF; + BGSAVE: typeof BGSAVE; + bgSave: typeof BGSAVE; + CLIENT_CACHING: typeof CLIENT_CACHING; + clientCaching: typeof CLIENT_CACHING; + CLIENT_GETNAME: typeof CLIENT_GETNAME; + clientGetName: typeof CLIENT_GETNAME; + CLIENT_GETREDIR: typeof CLIENT_GETREDIR; + clientGetRedir: typeof CLIENT_GETREDIR; + CLIENT_ID: typeof CLIENT_ID; + clientId: typeof CLIENT_ID; + CLIENT_KILL: typeof CLIENT_KILL; + clientKill: typeof CLIENT_KILL; + 'CLIENT_NO-EVICT': typeof CLIENT_NO_EVICT; + clientNoEvict: typeof CLIENT_NO_EVICT; + 'CLIENT_NO-TOUCH': typeof CLIENT_NO_TOUCH; + clientNoTouch: typeof CLIENT_NO_TOUCH; + CLIENT_LIST: typeof CLIENT_LIST; + clientList: typeof CLIENT_LIST; + CLIENT_PAUSE: typeof CLIENT_PAUSE; + clientPause: typeof CLIENT_PAUSE; + CLIENT_SETNAME: typeof CLIENT_SETNAME; + clientSetName: typeof CLIENT_SETNAME; + CLIENT_TRACKING: typeof CLIENT_TRACKING; + clientTracking: typeof CLIENT_TRACKING; + CLIENT_TRACKINGINFO: typeof CLIENT_TRACKINGINFO; + clientTrackingInfo: typeof CLIENT_TRACKINGINFO; + CLIENT_UNPAUSE: typeof CLIENT_UNPAUSE; + clientUnpause: typeof CLIENT_UNPAUSE; + CLIENT_INFO: typeof CLIENT_INFO; + clientInfo: typeof CLIENT_INFO; + CLUSTER_ADDSLOTS: typeof CLUSTER_ADDSLOTS; + clusterAddSlots: typeof CLUSTER_ADDSLOTS; + CLUSTER_ADDSLOTSRANGE: typeof CLUSTER_ADDSLOTSRANGE; + clusterAddSlotsRange: typeof CLUSTER_ADDSLOTSRANGE; + CLUSTER_BUMPEPOCH: typeof CLUSTER_BUMPEPOCH; + clusterBumpEpoch: typeof CLUSTER_BUMPEPOCH; + CLUSTER_COUNT_FAILURE_REPORTS: typeof CLUSTER_COUNT_FAILURE_REPORTS; + clusterCountFailureReports: typeof CLUSTER_COUNT_FAILURE_REPORTS; + CLUSTER_COUNTKEYSINSLOT: typeof CLUSTER_COUNTKEYSINSLOT; + clusterCountKeysInSlot: typeof CLUSTER_COUNTKEYSINSLOT; + CLUSTER_DELSLOTS: typeof CLUSTER_DELSLOTS; + clusterDelSlots: typeof CLUSTER_DELSLOTS; + CLUSTER_DELSLOTSRANGE: typeof CLUSTER_DELSLOTSRANGE; + clusterDelSlotsRange: typeof CLUSTER_DELSLOTSRANGE; + CLUSTER_FAILOVER: typeof CLUSTER_FAILOVER; + clusterFailover: typeof CLUSTER_FAILOVER; + CLUSTER_FLUSHSLOTS: typeof CLUSTER_FLUSHSLOTS; + clusterFlushSlots: typeof CLUSTER_FLUSHSLOTS; + CLUSTER_FORGET: typeof CLUSTER_FORGET; + clusterForget: typeof CLUSTER_FORGET; + CLUSTER_GETKEYSINSLOT: typeof CLUSTER_GETKEYSINSLOT; + clusterGetKeysInSlot: typeof CLUSTER_GETKEYSINSLOT; + CLUSTER_INFO: typeof CLUSTER_INFO; + clusterInfo: typeof CLUSTER_INFO; + CLUSTER_KEYSLOT: typeof CLUSTER_KEYSLOT; + clusterKeySlot: typeof CLUSTER_KEYSLOT; + CLUSTER_LINKS: typeof CLUSTER_LINKS; + clusterLinks: typeof CLUSTER_LINKS; + CLUSTER_MEET: typeof CLUSTER_MEET; + clusterMeet: typeof CLUSTER_MEET; + CLUSTER_MYID: typeof CLUSTER_MYID; + clusterMyId: typeof CLUSTER_MYID; + CLUSTER_MYSHARDID: typeof CLUSTER_MYSHARDID; + clusterMyShardId: typeof CLUSTER_MYSHARDID; + CLUSTER_NODES: typeof CLUSTER_NODES; + clusterNodes: typeof CLUSTER_NODES; + CLUSTER_REPLICAS: typeof CLUSTER_REPLICAS; + clusterReplicas: typeof CLUSTER_REPLICAS; + CLUSTER_REPLICATE: typeof CLUSTER_REPLICATE; + clusterReplicate: typeof CLUSTER_REPLICATE; + CLUSTER_RESET: typeof CLUSTER_RESET; + clusterReset: typeof CLUSTER_RESET; + CLUSTER_SAVECONFIG: typeof CLUSTER_SAVECONFIG; + clusterSaveConfig: typeof CLUSTER_SAVECONFIG; + CLUSTER_SET_CONFIG_EPOCH: typeof CLUSTER_SET_CONFIG_EPOCH; + clusterSetConfigEpoch: typeof CLUSTER_SET_CONFIG_EPOCH; + CLUSTER_SETSLOT: typeof CLUSTER_SETSLOT; + clusterSetSlot: typeof CLUSTER_SETSLOT; + CLUSTER_SLOTS: typeof CLUSTER_SLOTS; + clusterSlots: typeof CLUSTER_SLOTS; + COMMAND_COUNT: typeof COMMAND_COUNT; + commandCount: typeof COMMAND_COUNT; + COMMAND_GETKEYS: typeof COMMAND_GETKEYS; + commandGetKeys: typeof COMMAND_GETKEYS; + COMMAND_GETKEYSANDFLAGS: typeof COMMAND_GETKEYSANDFLAGS; + commandGetKeysAndFlags: typeof COMMAND_GETKEYSANDFLAGS; + COMMAND_INFO: typeof COMMAND_INFO; + commandInfo: typeof COMMAND_INFO; + COMMAND_LIST: typeof COMMAND_LIST; + commandList: typeof COMMAND_LIST; + COMMAND: typeof COMMAND; + command: typeof COMMAND; + CONFIG_GET: typeof CONFIG_GET; + configGet: typeof CONFIG_GET; + CONFIG_RESETASTAT: typeof CONFIG_RESETASTAT; + configResetStat: typeof CONFIG_RESETASTAT; + CONFIG_REWRITE: typeof CONFIG_REWRITE; + configRewrite: typeof CONFIG_REWRITE; + CONFIG_SET: typeof CONFIG_SET; + configSet: typeof CONFIG_SET; + DBSIZE: typeof DBSIZE; + dbSize: typeof DBSIZE; + DISCARD: typeof DISCARD; + discard: typeof DISCARD; + ECHO: typeof ECHO; + echo: typeof ECHO; + FAILOVER: typeof FAILOVER; + failover: typeof FAILOVER; + FLUSHALL: typeof FLUSHALL; + flushAll: typeof FLUSHALL; + FLUSHDB: typeof FLUSHDB; + flushDb: typeof FLUSHDB; + FUNCTION_DELETE: typeof FUNCTION_DELETE; + functionDelete: typeof FUNCTION_DELETE; + FUNCTION_DUMP: typeof FUNCTION_DUMP; + functionDump: typeof FUNCTION_DUMP; + FUNCTION_FLUSH: typeof FUNCTION_FLUSH; + functionFlush: typeof FUNCTION_FLUSH; + FUNCTION_KILL: typeof FUNCTION_KILL; + functionKill: typeof FUNCTION_KILL; + FUNCTION_LIST_WITHCODE: typeof FUNCTION_LIST_WITHCODE; + functionListWithCode: typeof FUNCTION_LIST_WITHCODE; + FUNCTION_LIST: typeof FUNCTION_LIST; + functionList: typeof FUNCTION_LIST; + FUNCTION_LOAD: typeof FUNCTION_LOAD; + functionLoad: typeof FUNCTION_LOAD; + FUNCTION_RESTORE: typeof FUNCTION_RESTORE; + functionRestore: typeof FUNCTION_RESTORE; + FUNCTION_STATS: typeof FUNCTION_STATS; + functionStats: typeof FUNCTION_STATS; + HELLO: typeof HELLO; + hello: typeof HELLO; + INFO: typeof INFO; + info: typeof INFO; + KEYS: typeof KEYS; + keys: typeof KEYS; + LASTSAVE: typeof LASTSAVE; + lastSave: typeof LASTSAVE; + LATENCY_DOCTOR: typeof LATENCY_DOCTOR; + latencyDoctor: typeof LATENCY_DOCTOR; + LATENCY_GRAPH: typeof LATENCY_GRAPH; + latencyGraph: typeof LATENCY_GRAPH; + LATENCY_HISTORY: typeof LATENCY_HISTORY; + latencyHistory: typeof LATENCY_HISTORY; + LATENCY_LATEST: typeof LATENCY_LATEST; + latencyLatest: typeof LATENCY_LATEST; + LOLWUT: typeof LOLWUT; + lolwut: typeof LOLWUT; + MEMORY_DOCTOR: typeof MEMORY_DOCTOR; + memoryDoctor: typeof MEMORY_DOCTOR; + 'MEMORY_MALLOC-STATS': typeof MEMORY_MALLOC_STATS; + memoryMallocStats: typeof MEMORY_MALLOC_STATS; + MEMORY_PURGE: typeof MEMORY_PURGE; + memoryPurge: typeof MEMORY_PURGE; + MEMORY_STATS: typeof MEMORY_STATS; + memoryStats: typeof MEMORY_STATS; + MEMORY_USAGE: typeof MEMORY_USAGE; + memoryUsage: typeof MEMORY_USAGE; + MODULE_LIST: typeof MODULE_LIST; + moduleList: typeof MODULE_LIST; + MODULE_LOAD: typeof MODULE_LOAD; + moduleLoad: typeof MODULE_LOAD; + MODULE_UNLOAD: typeof MODULE_UNLOAD; + moduleUnload: typeof MODULE_UNLOAD; + MOVE: typeof MOVE; + move: typeof MOVE; + PING: typeof PING; + ping: typeof PING; + PUBSUB_CHANNELS: typeof PUBSUB_CHANNELS; + pubSubChannels: typeof PUBSUB_CHANNELS; + PUBSUB_NUMPAT: typeof PUBSUB_NUMPAT; + pubSubNumPat: typeof PUBSUB_NUMPAT; + PUBSUB_NUMSUB: typeof PUBSUB_NUMSUB; + pubSubNumSub: typeof PUBSUB_NUMSUB; + PUBSUB_SHARDCHANNELS: typeof PUBSUB_SHARDCHANNELS; + pubSubShardChannels: typeof PUBSUB_SHARDCHANNELS; + PUBSUB_SHARDNUMSUB: typeof PUBSUB_SHARDNUMSUB; + pubSubShardNumSub: typeof PUBSUB_SHARDNUMSUB; + RANDOMKEY: typeof RANDOMKEY; + randomKey: typeof RANDOMKEY; + READONLY: typeof READONLY; + readonly: typeof READONLY; + READWRITE: typeof READWRITE; + readwrite: typeof READWRITE; + REPLICAOF: typeof REPLICAOF; + replicaOf: typeof REPLICAOF; + 'RESTORE-ASKING': typeof RESTORE_ASKING; + restoreAsking: typeof RESTORE_ASKING; + ROLE: typeof ROLE; + role: typeof ROLE; + SAVE: typeof SAVE; + save: typeof SAVE; + SCAN: typeof SCAN; + scan: typeof SCAN; + SCRIPT_DEBUG: typeof SCRIPT_DEBUG; + scriptDebug: typeof SCRIPT_DEBUG; + SCRIPT_EXISTS: typeof SCRIPT_EXISTS; + scriptExists: typeof SCRIPT_EXISTS; + SCRIPT_FLUSH: typeof SCRIPT_FLUSH; + scriptFlush: typeof SCRIPT_FLUSH; + SCRIPT_KILL: typeof SCRIPT_KILL; + scriptKill: typeof SCRIPT_KILL; + SCRIPT_LOAD: typeof SCRIPT_LOAD; + scriptLoad: typeof SCRIPT_LOAD; + SHUTDOWN: typeof SHUTDOWN; + shutdown: typeof SHUTDOWN; + SWAPDB: typeof SWAPDB; + swapDb: typeof SWAPDB; + TIME: typeof TIME; + time: typeof TIME; + UNWATCH: typeof UNWATCH; + unwatch: typeof UNWATCH; + WAIT: typeof WAIT; + wait: typeof WAIT; + APPEND: typeof import("../commands/APPEND"); + append: typeof import("../commands/APPEND"); + BITCOUNT: typeof import("../commands/BITCOUNT"); + bitCount: typeof import("../commands/BITCOUNT"); + BITFIELD_RO: typeof import("../commands/BITFIELD_RO"); + bitFieldRo: typeof import("../commands/BITFIELD_RO"); + BITFIELD: typeof import("../commands/BITFIELD"); + bitField: typeof import("../commands/BITFIELD"); + BITOP: typeof import("../commands/BITOP"); + bitOp: typeof import("../commands/BITOP"); + BITPOS: typeof import("../commands/BITPOS"); + bitPos: typeof import("../commands/BITPOS"); + BLMOVE: typeof import("../commands/BLMOVE"); + blMove: typeof import("../commands/BLMOVE"); + BLMPOP: typeof import("../commands/BLMPOP"); + blmPop: typeof import("../commands/BLMPOP"); + BLPOP: typeof import("../commands/BLPOP"); + blPop: typeof import("../commands/BLPOP"); + BRPOP: typeof import("../commands/BRPOP"); + brPop: typeof import("../commands/BRPOP"); + BRPOPLPUSH: typeof import("../commands/BRPOPLPUSH"); + brPopLPush: typeof import("../commands/BRPOPLPUSH"); + BZMPOP: typeof import("../commands/BZMPOP"); + bzmPop: typeof import("../commands/BZMPOP"); + BZPOPMAX: typeof import("../commands/BZPOPMAX"); + bzPopMax: typeof import("../commands/BZPOPMAX"); + BZPOPMIN: typeof import("../commands/BZPOPMIN"); + bzPopMin: typeof import("../commands/BZPOPMIN"); + COPY: typeof import("../commands/COPY"); + copy: typeof import("../commands/COPY"); + DECR: typeof import("../commands/DECR"); + decr: typeof import("../commands/DECR"); + DECRBY: typeof import("../commands/DECRBY"); + decrBy: typeof import("../commands/DECRBY"); + DEL: typeof import("../commands/DEL"); + del: typeof import("../commands/DEL"); + DUMP: typeof import("../commands/DUMP"); + dump: typeof import("../commands/DUMP"); + EVAL_RO: typeof import("../commands/EVAL_RO"); + evalRo: typeof import("../commands/EVAL_RO"); + EVAL: typeof import("../commands/EVAL"); + eval: typeof import("../commands/EVAL"); + EVALSHA: typeof import("../commands/EVALSHA"); + evalSha: typeof import("../commands/EVALSHA"); + EVALSHA_RO: typeof import("../commands/EVALSHA_RO"); + evalShaRo: typeof import("../commands/EVALSHA_RO"); + EXISTS: typeof import("../commands/EXISTS"); + exists: typeof import("../commands/EXISTS"); + EXPIRE: typeof import("../commands/EXPIRE"); + expire: typeof import("../commands/EXPIRE"); + EXPIREAT: typeof import("../commands/EXPIREAT"); + expireAt: typeof import("../commands/EXPIREAT"); + EXPIRETIME: typeof import("../commands/EXPIRETIME"); + expireTime: typeof import("../commands/EXPIRETIME"); + FCALL_RO: typeof import("../commands/FCALL_RO"); + fCallRo: typeof import("../commands/FCALL_RO"); + FCALL: typeof import("../commands/FCALL"); + fCall: typeof import("../commands/FCALL"); + GEOADD: typeof import("../commands/GEOADD"); + geoAdd: typeof import("../commands/GEOADD"); + GEODIST: typeof import("../commands/GEODIST"); + geoDist: typeof import("../commands/GEODIST"); + GEOHASH: typeof import("../commands/GEOHASH"); + geoHash: typeof import("../commands/GEOHASH"); + GEOPOS: typeof import("../commands/GEOPOS"); + geoPos: typeof import("../commands/GEOPOS"); + GEORADIUS_RO_WITH: typeof import("../commands/GEORADIUS_RO_WITH"); + geoRadiusRoWith: typeof import("../commands/GEORADIUS_RO_WITH"); + GEORADIUS_RO: typeof import("../commands/GEORADIUS_RO"); + geoRadiusRo: typeof import("../commands/GEORADIUS_RO"); + GEORADIUS_WITH: typeof import("../commands/GEORADIUS_WITH"); + geoRadiusWith: typeof import("../commands/GEORADIUS_WITH"); + GEORADIUS: typeof import("../commands/GEORADIUS"); + geoRadius: typeof import("../commands/GEORADIUS"); + GEORADIUSBYMEMBER_RO_WITH: typeof import("../commands/GEORADIUSBYMEMBER_RO_WITH"); + geoRadiusByMemberRoWith: typeof import("../commands/GEORADIUSBYMEMBER_RO_WITH"); + GEORADIUSBYMEMBER_RO: typeof import("../commands/GEORADIUSBYMEMBER_RO"); + geoRadiusByMemberRo: typeof import("../commands/GEORADIUSBYMEMBER_RO"); + GEORADIUSBYMEMBER_WITH: typeof import("../commands/GEORADIUSBYMEMBER_WITH"); + geoRadiusByMemberWith: typeof import("../commands/GEORADIUSBYMEMBER_WITH"); + GEORADIUSBYMEMBER: typeof import("../commands/GEORADIUSBYMEMBER"); + geoRadiusByMember: typeof import("../commands/GEORADIUSBYMEMBER"); + GEORADIUSBYMEMBERSTORE: typeof import("../commands/GEORADIUSBYMEMBERSTORE"); + geoRadiusByMemberStore: typeof import("../commands/GEORADIUSBYMEMBERSTORE"); + GEORADIUSSTORE: typeof import("../commands/GEORADIUSSTORE"); + geoRadiusStore: typeof import("../commands/GEORADIUSSTORE"); + GEOSEARCH_WITH: typeof import("../commands/GEOSEARCH_WITH"); + geoSearchWith: typeof import("../commands/GEOSEARCH_WITH"); + GEOSEARCH: typeof import("../commands/GEOSEARCH"); + geoSearch: typeof import("../commands/GEOSEARCH"); + GEOSEARCHSTORE: typeof import("../commands/GEOSEARCHSTORE"); + geoSearchStore: typeof import("../commands/GEOSEARCHSTORE"); + GET: typeof import("../commands/GET"); + get: typeof import("../commands/GET"); + GETBIT: typeof import("../commands/GETBIT"); + getBit: typeof import("../commands/GETBIT"); + GETDEL: typeof import("../commands/GETDEL"); + getDel: typeof import("../commands/GETDEL"); + GETEX: typeof import("../commands/GETEX"); + getEx: typeof import("../commands/GETEX"); + GETRANGE: typeof import("../commands/GETRANGE"); + getRange: typeof import("../commands/GETRANGE"); + GETSET: typeof import("../commands/GETSET"); + getSet: typeof import("../commands/GETSET"); + HDEL: typeof import("../commands/HDEL"); + hDel: typeof import("../commands/HDEL"); + HEXISTS: typeof import("../commands/HEXISTS"); + hExists: typeof import("../commands/HEXISTS"); + HEXPIRE: typeof import("../commands/HEXPIRE"); + hExpire: typeof import("../commands/HEXPIRE"); + HEXPIREAT: typeof import("../commands/HEXPIREAT"); + hExpireAt: typeof import("../commands/HEXPIREAT"); + HEXPIRETIME: typeof import("../commands/HEXPIRETIME"); + hExpireTime: typeof import("../commands/HEXPIRETIME"); + HGET: typeof import("../commands/HGET"); + hGet: typeof import("../commands/HGET"); + HGETALL: typeof import("../commands/HGETALL"); + hGetAll: typeof import("../commands/HGETALL"); + HINCRBY: typeof import("../commands/HINCRBY"); + hIncrBy: typeof import("../commands/HINCRBY"); + HINCRBYFLOAT: typeof import("../commands/HINCRBYFLOAT"); + hIncrByFloat: typeof import("../commands/HINCRBYFLOAT"); + HKEYS: typeof import("../commands/HKEYS"); + hKeys: typeof import("../commands/HKEYS"); + HLEN: typeof import("../commands/HLEN"); + hLen: typeof import("../commands/HLEN"); + HMGET: typeof import("../commands/HMGET"); + hmGet: typeof import("../commands/HMGET"); + HPERSIST: typeof import("../commands/HPERSIST"); + hPersist: typeof import("../commands/HPERSIST"); + HPEXPIRE: typeof import("../commands/HPEXPIRE"); + hpExpire: typeof import("../commands/HPEXPIRE"); + HPEXPIREAT: typeof import("../commands/HPEXPIREAT"); + hpExpireAt: typeof import("../commands/HPEXPIREAT"); + HPEXPIRETIME: typeof import("../commands/HPEXPIRETIME"); + hpExpireTime: typeof import("../commands/HPEXPIRETIME"); + HPTTL: typeof import("../commands/HPTTL"); + hpTTL: typeof import("../commands/HPTTL"); + HRANDFIELD_COUNT_WITHVALUES: typeof import("../commands/HRANDFIELD_COUNT_WITHVALUES"); + hRandFieldCountWithValues: typeof import("../commands/HRANDFIELD_COUNT_WITHVALUES"); + HRANDFIELD_COUNT: typeof import("../commands/HRANDFIELD_COUNT"); + hRandFieldCount: typeof import("../commands/HRANDFIELD_COUNT"); + HRANDFIELD: typeof import("../commands/HRANDFIELD"); + hRandField: typeof import("../commands/HRANDFIELD"); + HSCAN: typeof import("../commands/HSCAN"); + hScan: typeof import("../commands/HSCAN"); + HSCAN_NOVALUES: typeof import("../commands/HSCAN_NOVALUES"); + hScanNoValues: typeof import("../commands/HSCAN_NOVALUES"); + HSET: typeof import("../commands/HSET"); + hSet: typeof import("../commands/HSET"); + HSETNX: typeof import("../commands/HSETNX"); + hSetNX: typeof import("../commands/HSETNX"); + HSTRLEN: typeof import("../commands/HSTRLEN"); + hStrLen: typeof import("../commands/HSTRLEN"); + HTTL: typeof import("../commands/HTTL"); + hTTL: typeof import("../commands/HTTL"); + HVALS: typeof import("../commands/HVALS"); + hVals: typeof import("../commands/HVALS"); + INCR: typeof import("../commands/INCR"); + incr: typeof import("../commands/INCR"); + INCRBY: typeof import("../commands/INCRBY"); + incrBy: typeof import("../commands/INCRBY"); + INCRBYFLOAT: typeof import("../commands/INCRBYFLOAT"); + incrByFloat: typeof import("../commands/INCRBYFLOAT"); + LCS_IDX_WITHMATCHLEN: typeof import("../commands/LCS_IDX_WITHMATCHLEN"); + lcsIdxWithMatchLen: typeof import("../commands/LCS_IDX_WITHMATCHLEN"); + LCS_IDX: typeof import("../commands/LCS_IDX"); + lcsIdx: typeof import("../commands/LCS_IDX"); + LCS_LEN: typeof import("../commands/LCS_LEN"); + lcsLen: typeof import("../commands/LCS_LEN"); + LCS: typeof import("../commands/LCS"); + lcs: typeof import("../commands/LCS"); + LINDEX: typeof import("../commands/LINDEX"); + lIndex: typeof import("../commands/LINDEX"); + LINSERT: typeof import("../commands/LINSERT"); + lInsert: typeof import("../commands/LINSERT"); + LLEN: typeof import("../commands/LLEN"); + lLen: typeof import("../commands/LLEN"); + LMOVE: typeof import("../commands/LMOVE"); + lMove: typeof import("../commands/LMOVE"); + LMPOP: typeof import("../commands/LMPOP"); + lmPop: typeof import("../commands/LMPOP"); + LPOP_COUNT: typeof import("../commands/LPOP_COUNT"); + lPopCount: typeof import("../commands/LPOP_COUNT"); + LPOP: typeof import("../commands/LPOP"); + lPop: typeof import("../commands/LPOP"); + LPOS_COUNT: typeof import("../commands/LPOS_COUNT"); + lPosCount: typeof import("../commands/LPOS_COUNT"); + LPOS: typeof import("../commands/LPOS"); + lPos: typeof import("../commands/LPOS"); + LPUSH: typeof import("../commands/LPUSH"); + lPush: typeof import("../commands/LPUSH"); + LPUSHX: typeof import("../commands/LPUSHX"); + lPushX: typeof import("../commands/LPUSHX"); + LRANGE: typeof import("../commands/LRANGE"); + lRange: typeof import("../commands/LRANGE"); + LREM: typeof import("../commands/LREM"); + lRem: typeof import("../commands/LREM"); + LSET: typeof import("../commands/LSET"); + lSet: typeof import("../commands/LSET"); + LTRIM: typeof import("../commands/LTRIM"); + lTrim: typeof import("../commands/LTRIM"); + MGET: typeof import("../commands/MGET"); + mGet: typeof import("../commands/MGET"); + MIGRATE: typeof import("../commands/MIGRATE"); + migrate: typeof import("../commands/MIGRATE"); + MSET: typeof import("../commands/MSET"); + mSet: typeof import("../commands/MSET"); + MSETNX: typeof import("../commands/MSETNX"); + mSetNX: typeof import("../commands/MSETNX"); + OBJECT_ENCODING: typeof import("../commands/OBJECT_ENCODING"); + objectEncoding: typeof import("../commands/OBJECT_ENCODING"); + OBJECT_FREQ: typeof import("../commands/OBJECT_FREQ"); + objectFreq: typeof import("../commands/OBJECT_FREQ"); + OBJECT_IDLETIME: typeof import("../commands/OBJECT_IDLETIME"); + objectIdleTime: typeof import("../commands/OBJECT_IDLETIME"); + OBJECT_REFCOUNT: typeof import("../commands/OBJECT_REFCOUNT"); + objectRefCount: typeof import("../commands/OBJECT_REFCOUNT"); + PERSIST: typeof import("../commands/PERSIST"); + persist: typeof import("../commands/PERSIST"); + PEXPIRE: typeof import("../commands/PEXPIRE"); + pExpire: typeof import("../commands/PEXPIRE"); + PEXPIREAT: typeof import("../commands/PEXPIREAT"); + pExpireAt: typeof import("../commands/PEXPIREAT"); + PEXPIRETIME: typeof import("../commands/PEXPIRETIME"); + pExpireTime: typeof import("../commands/PEXPIRETIME"); + PFADD: typeof import("../commands/PFADD"); + pfAdd: typeof import("../commands/PFADD"); + PFCOUNT: typeof import("../commands/PFCOUNT"); + pfCount: typeof import("../commands/PFCOUNT"); + PFMERGE: typeof import("../commands/PFMERGE"); + pfMerge: typeof import("../commands/PFMERGE"); + PSETEX: typeof import("../commands/PSETEX"); + pSetEx: typeof import("../commands/PSETEX"); + PTTL: typeof import("../commands/PTTL"); + pTTL: typeof import("../commands/PTTL"); + PUBLISH: typeof import("../commands/PUBLISH"); + publish: typeof import("../commands/PUBLISH"); + RENAME: typeof import("../commands/RENAME"); + rename: typeof import("../commands/RENAME"); + RENAMENX: typeof import("../commands/RENAMENX"); + renameNX: typeof import("../commands/RENAMENX"); + RESTORE: typeof import("../commands/RESTORE"); + restore: typeof import("../commands/RESTORE"); + RPOP_COUNT: typeof import("../commands/RPOP_COUNT"); + rPopCount: typeof import("../commands/RPOP_COUNT"); + RPOP: typeof import("../commands/RPOP"); + rPop: typeof import("../commands/RPOP"); + RPOPLPUSH: typeof import("../commands/RPOPLPUSH"); + rPopLPush: typeof import("../commands/RPOPLPUSH"); + RPUSH: typeof import("../commands/RPUSH"); + rPush: typeof import("../commands/RPUSH"); + RPUSHX: typeof import("../commands/RPUSHX"); + rPushX: typeof import("../commands/RPUSHX"); + SADD: typeof import("../commands/SADD"); + sAdd: typeof import("../commands/SADD"); + SCARD: typeof import("../commands/SCARD"); + sCard: typeof import("../commands/SCARD"); + SDIFF: typeof import("../commands/SDIFF"); + sDiff: typeof import("../commands/SDIFF"); + SDIFFSTORE: typeof import("../commands/SDIFFSTORE"); + sDiffStore: typeof import("../commands/SDIFFSTORE"); + SINTER: typeof import("../commands/SINTER"); + sInter: typeof import("../commands/SINTER"); + SINTERCARD: typeof import("../commands/SINTERCARD"); + sInterCard: typeof import("../commands/SINTERCARD"); + SINTERSTORE: typeof import("../commands/SINTERSTORE"); + sInterStore: typeof import("../commands/SINTERSTORE"); + SET: typeof import("../commands/SET"); + set: typeof import("../commands/SET"); + SETBIT: typeof import("../commands/SETBIT"); + setBit: typeof import("../commands/SETBIT"); + SETEX: typeof import("../commands/SETEX"); + setEx: typeof import("../commands/SETEX"); + SETNX: typeof import("../commands/SETNX"); + setNX: typeof import("../commands/SETNX"); + SETRANGE: typeof import("../commands/SETRANGE"); + setRange: typeof import("../commands/SETRANGE"); + SISMEMBER: typeof import("../commands/SISMEMBER"); + sIsMember: typeof import("../commands/SISMEMBER"); + SMEMBERS: typeof import("../commands/SMEMBERS"); + sMembers: typeof import("../commands/SMEMBERS"); + SMISMEMBER: typeof import("../commands/SMISMEMBER"); + smIsMember: typeof import("../commands/SMISMEMBER"); + SMOVE: typeof import("../commands/SMOVE"); + sMove: typeof import("../commands/SMOVE"); + SORT_RO: typeof import("../commands/SORT_RO"); + sortRo: typeof import("../commands/SORT_RO"); + SORT_STORE: typeof import("../commands/SORT_STORE"); + sortStore: typeof import("../commands/SORT_STORE"); + SORT: typeof import("../commands/SORT"); + sort: typeof import("../commands/SORT"); + SPOP: typeof import("../commands/SPOP"); + sPop: typeof import("../commands/SPOP"); + SPUBLISH: typeof import("../commands/SPUBLISH"); + sPublish: typeof import("../commands/SPUBLISH"); + SRANDMEMBER_COUNT: typeof import("../commands/SRANDMEMBER_COUNT"); + sRandMemberCount: typeof import("../commands/SRANDMEMBER_COUNT"); + SRANDMEMBER: typeof import("../commands/SRANDMEMBER"); + sRandMember: typeof import("../commands/SRANDMEMBER"); + SREM: typeof import("../commands/SREM"); + sRem: typeof import("../commands/SREM"); + SSCAN: typeof import("../commands/SSCAN"); + sScan: typeof import("../commands/SSCAN"); + STRLEN: typeof import("../commands/STRLEN"); + strLen: typeof import("../commands/STRLEN"); + SUNION: typeof import("../commands/SUNION"); + sUnion: typeof import("../commands/SUNION"); + SUNIONSTORE: typeof import("../commands/SUNIONSTORE"); + sUnionStore: typeof import("../commands/SUNIONSTORE"); + TOUCH: typeof import("../commands/TOUCH"); + touch: typeof import("../commands/TOUCH"); + TTL: typeof import("../commands/TTL"); + ttl: typeof import("../commands/TTL"); + TYPE: typeof import("../commands/TYPE"); + type: typeof import("../commands/TYPE"); + UNLINK: typeof import("../commands/UNLINK"); + unlink: typeof import("../commands/UNLINK"); + WATCH: typeof import("../commands/WATCH"); + watch: typeof import("../commands/WATCH"); + XACK: typeof import("../commands/XACK"); + xAck: typeof import("../commands/XACK"); + XADD: typeof import("../commands/XADD"); + xAdd: typeof import("../commands/XADD"); + XAUTOCLAIM_JUSTID: typeof import("../commands/XAUTOCLAIM_JUSTID"); + xAutoClaimJustId: typeof import("../commands/XAUTOCLAIM_JUSTID"); + XAUTOCLAIM: typeof import("../commands/XAUTOCLAIM"); + xAutoClaim: typeof import("../commands/XAUTOCLAIM"); + XCLAIM: typeof import("../commands/XCLAIM"); + xClaim: typeof import("../commands/XCLAIM"); + XCLAIM_JUSTID: typeof import("../commands/XCLAIM_JUSTID"); + xClaimJustId: typeof import("../commands/XCLAIM_JUSTID"); + XDEL: typeof import("../commands/XDEL"); + xDel: typeof import("../commands/XDEL"); + XGROUP_CREATE: typeof import("../commands/XGROUP_CREATE"); + xGroupCreate: typeof import("../commands/XGROUP_CREATE"); + XGROUP_CREATECONSUMER: typeof import("../commands/XGROUP_CREATECONSUMER"); + xGroupCreateConsumer: typeof import("../commands/XGROUP_CREATECONSUMER"); + XGROUP_DELCONSUMER: typeof import("../commands/XGROUP_DELCONSUMER"); + xGroupDelConsumer: typeof import("../commands/XGROUP_DELCONSUMER"); + XGROUP_DESTROY: typeof import("../commands/XGROUP_DESTROY"); + xGroupDestroy: typeof import("../commands/XGROUP_DESTROY"); + XGROUP_SETID: typeof import("../commands/XGROUP_SETID"); + xGroupSetId: typeof import("../commands/XGROUP_SETID"); + XINFO_CONSUMERS: typeof import("../commands/XINFO_CONSUMERS"); + xInfoConsumers: typeof import("../commands/XINFO_CONSUMERS"); + XINFO_GROUPS: typeof import("../commands/XINFO_GROUPS"); + xInfoGroups: typeof import("../commands/XINFO_GROUPS"); + XINFO_STREAM: typeof import("../commands/XINFO_STREAM"); + xInfoStream: typeof import("../commands/XINFO_STREAM"); + XLEN: typeof import("../commands/XLEN"); + xLen: typeof import("../commands/XLEN"); + XPENDING_RANGE: typeof import("../commands/XPENDING_RANGE"); + xPendingRange: typeof import("../commands/XPENDING_RANGE"); + XPENDING: typeof import("../commands/XPENDING"); + xPending: typeof import("../commands/XPENDING"); + XRANGE: typeof import("../commands/XRANGE"); + xRange: typeof import("../commands/XRANGE"); + XREAD: typeof import("../commands/XREAD"); + xRead: typeof import("../commands/XREAD"); + XREADGROUP: typeof import("../commands/XREADGROUP"); + xReadGroup: typeof import("../commands/XREADGROUP"); + XREVRANGE: typeof import("../commands/XREVRANGE"); + xRevRange: typeof import("../commands/XREVRANGE"); + XSETID: typeof import("../commands/XSETID"); + xSetId: typeof import("../commands/XSETID"); + XTRIM: typeof import("../commands/XTRIM"); + xTrim: typeof import("../commands/XTRIM"); + ZADD: typeof import("../commands/ZADD"); + zAdd: typeof import("../commands/ZADD"); + ZCARD: typeof import("../commands/ZCARD"); + zCard: typeof import("../commands/ZCARD"); + ZCOUNT: typeof import("../commands/ZCOUNT"); + zCount: typeof import("../commands/ZCOUNT"); + ZDIFF_WITHSCORES: typeof import("../commands/ZDIFF_WITHSCORES"); + zDiffWithScores: typeof import("../commands/ZDIFF_WITHSCORES"); + ZDIFF: typeof import("../commands/ZDIFF"); + zDiff: typeof import("../commands/ZDIFF"); + ZDIFFSTORE: typeof import("../commands/ZDIFFSTORE"); + zDiffStore: typeof import("../commands/ZDIFFSTORE"); + ZINCRBY: typeof import("../commands/ZINCRBY"); + zIncrBy: typeof import("../commands/ZINCRBY"); + ZINTER_WITHSCORES: typeof import("../commands/ZINTER_WITHSCORES"); + zInterWithScores: typeof import("../commands/ZINTER_WITHSCORES"); + ZINTER: typeof import("../commands/ZINTER"); + zInter: typeof import("../commands/ZINTER"); + ZINTERCARD: typeof import("../commands/ZINTERCARD"); + zInterCard: typeof import("../commands/ZINTERCARD"); + ZINTERSTORE: typeof import("../commands/ZINTERSTORE"); + zInterStore: typeof import("../commands/ZINTERSTORE"); + ZLEXCOUNT: typeof import("../commands/ZLEXCOUNT"); + zLexCount: typeof import("../commands/ZLEXCOUNT"); + ZMPOP: typeof import("../commands/ZMPOP"); + zmPop: typeof import("../commands/ZMPOP"); + ZMSCORE: typeof import("../commands/ZMSCORE"); + zmScore: typeof import("../commands/ZMSCORE"); + ZPOPMAX_COUNT: typeof import("../commands/ZPOPMAX_COUNT"); + zPopMaxCount: typeof import("../commands/ZPOPMAX_COUNT"); + ZPOPMAX: typeof import("../commands/ZPOPMAX"); + zPopMax: typeof import("../commands/ZPOPMAX"); + ZPOPMIN_COUNT: typeof import("../commands/ZPOPMIN_COUNT"); + zPopMinCount: typeof import("../commands/ZPOPMIN_COUNT"); + ZPOPMIN: typeof import("../commands/ZPOPMIN"); + zPopMin: typeof import("../commands/ZPOPMIN"); + ZRANDMEMBER_COUNT_WITHSCORES: typeof import("../commands/ZRANDMEMBER_COUNT_WITHSCORES"); + zRandMemberCountWithScores: typeof import("../commands/ZRANDMEMBER_COUNT_WITHSCORES"); + ZRANDMEMBER_COUNT: typeof import("../commands/ZRANDMEMBER_COUNT"); + zRandMemberCount: typeof import("../commands/ZRANDMEMBER_COUNT"); + ZRANDMEMBER: typeof import("../commands/ZRANDMEMBER"); + zRandMember: typeof import("../commands/ZRANDMEMBER"); + ZRANGE_WITHSCORES: typeof import("../commands/ZRANGE_WITHSCORES"); + zRangeWithScores: typeof import("../commands/ZRANGE_WITHSCORES"); + ZRANGE: typeof import("../commands/ZRANGE"); + zRange: typeof import("../commands/ZRANGE"); + ZRANGEBYLEX: typeof import("../commands/ZRANGEBYLEX"); + zRangeByLex: typeof import("../commands/ZRANGEBYLEX"); + ZRANGEBYSCORE_WITHSCORES: typeof import("../commands/ZRANGEBYSCORE_WITHSCORES"); + zRangeByScoreWithScores: typeof import("../commands/ZRANGEBYSCORE_WITHSCORES"); + ZRANGEBYSCORE: typeof import("../commands/ZRANGEBYSCORE"); + zRangeByScore: typeof import("../commands/ZRANGEBYSCORE"); + ZRANGESTORE: typeof import("../commands/ZRANGESTORE"); + zRangeStore: typeof import("../commands/ZRANGESTORE"); + ZRANK: typeof import("../commands/ZRANK"); + zRank: typeof import("../commands/ZRANK"); + ZREM: typeof import("../commands/ZREM"); + zRem: typeof import("../commands/ZREM"); + ZREMRANGEBYLEX: typeof import("../commands/ZREMRANGEBYLEX"); + zRemRangeByLex: typeof import("../commands/ZREMRANGEBYLEX"); + ZREMRANGEBYRANK: typeof import("../commands/ZREMRANGEBYRANK"); + zRemRangeByRank: typeof import("../commands/ZREMRANGEBYRANK"); + ZREMRANGEBYSCORE: typeof import("../commands/ZREMRANGEBYSCORE"); + zRemRangeByScore: typeof import("../commands/ZREMRANGEBYSCORE"); + ZREVRANK: typeof import("../commands/ZREVRANK"); + zRevRank: typeof import("../commands/ZREVRANK"); + ZSCAN: typeof import("../commands/ZSCAN"); + zScan: typeof import("../commands/ZSCAN"); + ZSCORE: typeof import("../commands/ZSCORE"); + zScore: typeof import("../commands/ZSCORE"); + ZUNION_WITHSCORES: typeof import("../commands/ZUNION_WITHSCORES"); + zUnionWithScores: typeof import("../commands/ZUNION_WITHSCORES"); + ZUNION: typeof import("../commands/ZUNION"); + zUnion: typeof import("../commands/ZUNION"); + ZUNIONSTORE: typeof import("../commands/ZUNIONSTORE"); + zUnionStore: typeof import("../commands/ZUNIONSTORE"); +}; +export default _default; diff --git a/server/node_modules/@redis/client/dist/lib/client/commands.js b/server/node_modules/@redis/client/dist/lib/client/commands.js new file mode 100644 index 0000000..4b4dfb6 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/client/commands.js @@ -0,0 +1,375 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const commands_1 = require("../cluster/commands"); +const ACL_CAT = require("../commands/ACL_CAT"); +const ACL_DELUSER = require("../commands/ACL_DELUSER"); +const ACL_DRYRUN = require("../commands/ACL_DRYRUN"); +const ACL_GENPASS = require("../commands/ACL_GENPASS"); +const ACL_GETUSER = require("../commands/ACL_GETUSER"); +const ACL_LIST = require("../commands/ACL_LIST"); +const ACL_LOAD = require("../commands/ACL_LOAD"); +const ACL_LOG_RESET = require("../commands/ACL_LOG_RESET"); +const ACL_LOG = require("../commands/ACL_LOG"); +const ACL_SAVE = require("../commands/ACL_SAVE"); +const ACL_SETUSER = require("../commands/ACL_SETUSER"); +const ACL_USERS = require("../commands/ACL_USERS"); +const ACL_WHOAMI = require("../commands/ACL_WHOAMI"); +const ASKING = require("../commands/ASKING"); +const AUTH = require("../commands/AUTH"); +const BGREWRITEAOF = require("../commands/BGREWRITEAOF"); +const BGSAVE = require("../commands/BGSAVE"); +const CLIENT_CACHING = require("../commands/CLIENT_CACHING"); +const CLIENT_GETNAME = require("../commands/CLIENT_GETNAME"); +const CLIENT_GETREDIR = require("../commands/CLIENT_GETREDIR"); +const CLIENT_ID = require("../commands/CLIENT_ID"); +const CLIENT_KILL = require("../commands/CLIENT_KILL"); +const CLIENT_LIST = require("../commands/CLIENT_LIST"); +const CLIENT_NO_EVICT = require("../commands/CLIENT_NO-EVICT"); +const CLIENT_NO_TOUCH = require("../commands/CLIENT_NO-TOUCH"); +const CLIENT_PAUSE = require("../commands/CLIENT_PAUSE"); +const CLIENT_SETNAME = require("../commands/CLIENT_SETNAME"); +const CLIENT_TRACKING = require("../commands/CLIENT_TRACKING"); +const CLIENT_TRACKINGINFO = require("../commands/CLIENT_TRACKINGINFO"); +const CLIENT_UNPAUSE = require("../commands/CLIENT_UNPAUSE"); +const CLIENT_INFO = require("../commands/CLIENT_INFO"); +const CLUSTER_ADDSLOTS = require("../commands/CLUSTER_ADDSLOTS"); +const CLUSTER_ADDSLOTSRANGE = require("../commands/CLUSTER_ADDSLOTSRANGE"); +const CLUSTER_BUMPEPOCH = require("../commands/CLUSTER_BUMPEPOCH"); +const CLUSTER_COUNT_FAILURE_REPORTS = require("../commands/CLUSTER_COUNT-FAILURE-REPORTS"); +const CLUSTER_COUNTKEYSINSLOT = require("../commands/CLUSTER_COUNTKEYSINSLOT"); +const CLUSTER_DELSLOTS = require("../commands/CLUSTER_DELSLOTS"); +const CLUSTER_DELSLOTSRANGE = require("../commands/CLUSTER_DELSLOTSRANGE"); +const CLUSTER_FAILOVER = require("../commands/CLUSTER_FAILOVER"); +const CLUSTER_FLUSHSLOTS = require("../commands/CLUSTER_FLUSHSLOTS"); +const CLUSTER_FORGET = require("../commands/CLUSTER_FORGET"); +const CLUSTER_GETKEYSINSLOT = require("../commands/CLUSTER_GETKEYSINSLOT"); +const CLUSTER_INFO = require("../commands/CLUSTER_INFO"); +const CLUSTER_KEYSLOT = require("../commands/CLUSTER_KEYSLOT"); +const CLUSTER_LINKS = require("../commands/CLUSTER_LINKS"); +const CLUSTER_MEET = require("../commands/CLUSTER_MEET"); +const CLUSTER_MYID = require("../commands/CLUSTER_MYID"); +const CLUSTER_MYSHARDID = require("../commands/CLUSTER_MYSHARDID"); +const CLUSTER_NODES = require("../commands/CLUSTER_NODES"); +const CLUSTER_REPLICAS = require("../commands/CLUSTER_REPLICAS"); +const CLUSTER_REPLICATE = require("../commands/CLUSTER_REPLICATE"); +const CLUSTER_RESET = require("../commands/CLUSTER_RESET"); +const CLUSTER_SAVECONFIG = require("../commands/CLUSTER_SAVECONFIG"); +const CLUSTER_SET_CONFIG_EPOCH = require("../commands/CLUSTER_SET-CONFIG-EPOCH"); +const CLUSTER_SETSLOT = require("../commands/CLUSTER_SETSLOT"); +const CLUSTER_SLOTS = require("../commands/CLUSTER_SLOTS"); +const COMMAND_COUNT = require("../commands/COMMAND_COUNT"); +const COMMAND_GETKEYS = require("../commands/COMMAND_GETKEYS"); +const COMMAND_GETKEYSANDFLAGS = require("../commands/COMMAND_GETKEYSANDFLAGS"); +const COMMAND_INFO = require("../commands/COMMAND_INFO"); +const COMMAND_LIST = require("../commands/COMMAND_LIST"); +const COMMAND = require("../commands/COMMAND"); +const CONFIG_GET = require("../commands/CONFIG_GET"); +const CONFIG_RESETASTAT = require("../commands/CONFIG_RESETSTAT"); +const CONFIG_REWRITE = require("../commands/CONFIG_REWRITE"); +const CONFIG_SET = require("../commands/CONFIG_SET"); +const DBSIZE = require("../commands/DBSIZE"); +const DISCARD = require("../commands/DISCARD"); +const ECHO = require("../commands/ECHO"); +const FAILOVER = require("../commands/FAILOVER"); +const FLUSHALL = require("../commands/FLUSHALL"); +const FLUSHDB = require("../commands/FLUSHDB"); +const FUNCTION_DELETE = require("../commands/FUNCTION_DELETE"); +const FUNCTION_DUMP = require("../commands/FUNCTION_DUMP"); +const FUNCTION_FLUSH = require("../commands/FUNCTION_FLUSH"); +const FUNCTION_KILL = require("../commands/FUNCTION_KILL"); +const FUNCTION_LIST_WITHCODE = require("../commands/FUNCTION_LIST_WITHCODE"); +const FUNCTION_LIST = require("../commands/FUNCTION_LIST"); +const FUNCTION_LOAD = require("../commands/FUNCTION_LOAD"); +const FUNCTION_RESTORE = require("../commands/FUNCTION_RESTORE"); +const FUNCTION_STATS = require("../commands/FUNCTION_STATS"); +const HELLO = require("../commands/HELLO"); +const INFO = require("../commands/INFO"); +const KEYS = require("../commands/KEYS"); +const LASTSAVE = require("../commands/LASTSAVE"); +const LATENCY_DOCTOR = require("../commands/LATENCY_DOCTOR"); +const LATENCY_GRAPH = require("../commands/LATENCY_GRAPH"); +const LATENCY_HISTORY = require("../commands/LATENCY_HISTORY"); +const LATENCY_LATEST = require("../commands/LATENCY_LATEST"); +const LOLWUT = require("../commands/LOLWUT"); +const MEMORY_DOCTOR = require("../commands/MEMORY_DOCTOR"); +const MEMORY_MALLOC_STATS = require("../commands/MEMORY_MALLOC-STATS"); +const MEMORY_PURGE = require("../commands/MEMORY_PURGE"); +const MEMORY_STATS = require("../commands/MEMORY_STATS"); +const MEMORY_USAGE = require("../commands/MEMORY_USAGE"); +const MODULE_LIST = require("../commands/MODULE_LIST"); +const MODULE_LOAD = require("../commands/MODULE_LOAD"); +const MODULE_UNLOAD = require("../commands/MODULE_UNLOAD"); +const MOVE = require("../commands/MOVE"); +const PING = require("../commands/PING"); +const PUBSUB_CHANNELS = require("../commands/PUBSUB_CHANNELS"); +const PUBSUB_NUMPAT = require("../commands/PUBSUB_NUMPAT"); +const PUBSUB_NUMSUB = require("../commands/PUBSUB_NUMSUB"); +const PUBSUB_SHARDCHANNELS = require("../commands/PUBSUB_SHARDCHANNELS"); +const PUBSUB_SHARDNUMSUB = require("../commands/PUBSUB_SHARDNUMSUB"); +const RANDOMKEY = require("../commands/RANDOMKEY"); +const READONLY = require("../commands/READONLY"); +const READWRITE = require("../commands/READWRITE"); +const REPLICAOF = require("../commands/REPLICAOF"); +const RESTORE_ASKING = require("../commands/RESTORE-ASKING"); +const ROLE = require("../commands/ROLE"); +const SAVE = require("../commands/SAVE"); +const SCAN = require("../commands/SCAN"); +const SCRIPT_DEBUG = require("../commands/SCRIPT_DEBUG"); +const SCRIPT_EXISTS = require("../commands/SCRIPT_EXISTS"); +const SCRIPT_FLUSH = require("../commands/SCRIPT_FLUSH"); +const SCRIPT_KILL = require("../commands/SCRIPT_KILL"); +const SCRIPT_LOAD = require("../commands/SCRIPT_LOAD"); +const SHUTDOWN = require("../commands/SHUTDOWN"); +const SWAPDB = require("../commands/SWAPDB"); +const TIME = require("../commands/TIME"); +const UNWATCH = require("../commands/UNWATCH"); +const WAIT = require("../commands/WAIT"); +exports.default = { + ...commands_1.default, + ACL_CAT, + aclCat: ACL_CAT, + ACL_DELUSER, + aclDelUser: ACL_DELUSER, + ACL_DRYRUN, + aclDryRun: ACL_DRYRUN, + ACL_GENPASS, + aclGenPass: ACL_GENPASS, + ACL_GETUSER, + aclGetUser: ACL_GETUSER, + ACL_LIST, + aclList: ACL_LIST, + ACL_LOAD, + aclLoad: ACL_LOAD, + ACL_LOG_RESET, + aclLogReset: ACL_LOG_RESET, + ACL_LOG, + aclLog: ACL_LOG, + ACL_SAVE, + aclSave: ACL_SAVE, + ACL_SETUSER, + aclSetUser: ACL_SETUSER, + ACL_USERS, + aclUsers: ACL_USERS, + ACL_WHOAMI, + aclWhoAmI: ACL_WHOAMI, + ASKING, + asking: ASKING, + AUTH, + auth: AUTH, + BGREWRITEAOF, + bgRewriteAof: BGREWRITEAOF, + BGSAVE, + bgSave: BGSAVE, + CLIENT_CACHING, + clientCaching: CLIENT_CACHING, + CLIENT_GETNAME, + clientGetName: CLIENT_GETNAME, + CLIENT_GETREDIR, + clientGetRedir: CLIENT_GETREDIR, + CLIENT_ID, + clientId: CLIENT_ID, + CLIENT_KILL, + clientKill: CLIENT_KILL, + 'CLIENT_NO-EVICT': CLIENT_NO_EVICT, + clientNoEvict: CLIENT_NO_EVICT, + 'CLIENT_NO-TOUCH': CLIENT_NO_TOUCH, + clientNoTouch: CLIENT_NO_TOUCH, + CLIENT_LIST, + clientList: CLIENT_LIST, + CLIENT_PAUSE, + clientPause: CLIENT_PAUSE, + CLIENT_SETNAME, + clientSetName: CLIENT_SETNAME, + CLIENT_TRACKING, + clientTracking: CLIENT_TRACKING, + CLIENT_TRACKINGINFO, + clientTrackingInfo: CLIENT_TRACKINGINFO, + CLIENT_UNPAUSE, + clientUnpause: CLIENT_UNPAUSE, + CLIENT_INFO, + clientInfo: CLIENT_INFO, + CLUSTER_ADDSLOTS, + clusterAddSlots: CLUSTER_ADDSLOTS, + CLUSTER_ADDSLOTSRANGE, + clusterAddSlotsRange: CLUSTER_ADDSLOTSRANGE, + CLUSTER_BUMPEPOCH, + clusterBumpEpoch: CLUSTER_BUMPEPOCH, + CLUSTER_COUNT_FAILURE_REPORTS, + clusterCountFailureReports: CLUSTER_COUNT_FAILURE_REPORTS, + CLUSTER_COUNTKEYSINSLOT, + clusterCountKeysInSlot: CLUSTER_COUNTKEYSINSLOT, + CLUSTER_DELSLOTS, + clusterDelSlots: CLUSTER_DELSLOTS, + CLUSTER_DELSLOTSRANGE, + clusterDelSlotsRange: CLUSTER_DELSLOTSRANGE, + CLUSTER_FAILOVER, + clusterFailover: CLUSTER_FAILOVER, + CLUSTER_FLUSHSLOTS, + clusterFlushSlots: CLUSTER_FLUSHSLOTS, + CLUSTER_FORGET, + clusterForget: CLUSTER_FORGET, + CLUSTER_GETKEYSINSLOT, + clusterGetKeysInSlot: CLUSTER_GETKEYSINSLOT, + CLUSTER_INFO, + clusterInfo: CLUSTER_INFO, + CLUSTER_KEYSLOT, + clusterKeySlot: CLUSTER_KEYSLOT, + CLUSTER_LINKS, + clusterLinks: CLUSTER_LINKS, + CLUSTER_MEET, + clusterMeet: CLUSTER_MEET, + CLUSTER_MYID, + clusterMyId: CLUSTER_MYID, + CLUSTER_MYSHARDID, + clusterMyShardId: CLUSTER_MYSHARDID, + CLUSTER_NODES, + clusterNodes: CLUSTER_NODES, + CLUSTER_REPLICAS, + clusterReplicas: CLUSTER_REPLICAS, + CLUSTER_REPLICATE, + clusterReplicate: CLUSTER_REPLICATE, + CLUSTER_RESET, + clusterReset: CLUSTER_RESET, + CLUSTER_SAVECONFIG, + clusterSaveConfig: CLUSTER_SAVECONFIG, + CLUSTER_SET_CONFIG_EPOCH, + clusterSetConfigEpoch: CLUSTER_SET_CONFIG_EPOCH, + CLUSTER_SETSLOT, + clusterSetSlot: CLUSTER_SETSLOT, + CLUSTER_SLOTS, + clusterSlots: CLUSTER_SLOTS, + COMMAND_COUNT, + commandCount: COMMAND_COUNT, + COMMAND_GETKEYS, + commandGetKeys: COMMAND_GETKEYS, + COMMAND_GETKEYSANDFLAGS, + commandGetKeysAndFlags: COMMAND_GETKEYSANDFLAGS, + COMMAND_INFO, + commandInfo: COMMAND_INFO, + COMMAND_LIST, + commandList: COMMAND_LIST, + COMMAND, + command: COMMAND, + CONFIG_GET, + configGet: CONFIG_GET, + CONFIG_RESETASTAT, + configResetStat: CONFIG_RESETASTAT, + CONFIG_REWRITE, + configRewrite: CONFIG_REWRITE, + CONFIG_SET, + configSet: CONFIG_SET, + DBSIZE, + dbSize: DBSIZE, + DISCARD, + discard: DISCARD, + ECHO, + echo: ECHO, + FAILOVER, + failover: FAILOVER, + FLUSHALL, + flushAll: FLUSHALL, + FLUSHDB, + flushDb: FLUSHDB, + FUNCTION_DELETE, + functionDelete: FUNCTION_DELETE, + FUNCTION_DUMP, + functionDump: FUNCTION_DUMP, + FUNCTION_FLUSH, + functionFlush: FUNCTION_FLUSH, + FUNCTION_KILL, + functionKill: FUNCTION_KILL, + FUNCTION_LIST_WITHCODE, + functionListWithCode: FUNCTION_LIST_WITHCODE, + FUNCTION_LIST, + functionList: FUNCTION_LIST, + FUNCTION_LOAD, + functionLoad: FUNCTION_LOAD, + FUNCTION_RESTORE, + functionRestore: FUNCTION_RESTORE, + FUNCTION_STATS, + functionStats: FUNCTION_STATS, + HELLO, + hello: HELLO, + INFO, + info: INFO, + KEYS, + keys: KEYS, + LASTSAVE, + lastSave: LASTSAVE, + LATENCY_DOCTOR, + latencyDoctor: LATENCY_DOCTOR, + LATENCY_GRAPH, + latencyGraph: LATENCY_GRAPH, + LATENCY_HISTORY, + latencyHistory: LATENCY_HISTORY, + LATENCY_LATEST, + latencyLatest: LATENCY_LATEST, + LOLWUT, + lolwut: LOLWUT, + MEMORY_DOCTOR, + memoryDoctor: MEMORY_DOCTOR, + 'MEMORY_MALLOC-STATS': MEMORY_MALLOC_STATS, + memoryMallocStats: MEMORY_MALLOC_STATS, + MEMORY_PURGE, + memoryPurge: MEMORY_PURGE, + MEMORY_STATS, + memoryStats: MEMORY_STATS, + MEMORY_USAGE, + memoryUsage: MEMORY_USAGE, + MODULE_LIST, + moduleList: MODULE_LIST, + MODULE_LOAD, + moduleLoad: MODULE_LOAD, + MODULE_UNLOAD, + moduleUnload: MODULE_UNLOAD, + MOVE, + move: MOVE, + PING, + ping: PING, + PUBSUB_CHANNELS, + pubSubChannels: PUBSUB_CHANNELS, + PUBSUB_NUMPAT, + pubSubNumPat: PUBSUB_NUMPAT, + PUBSUB_NUMSUB, + pubSubNumSub: PUBSUB_NUMSUB, + PUBSUB_SHARDCHANNELS, + pubSubShardChannels: PUBSUB_SHARDCHANNELS, + PUBSUB_SHARDNUMSUB, + pubSubShardNumSub: PUBSUB_SHARDNUMSUB, + RANDOMKEY, + randomKey: RANDOMKEY, + READONLY, + readonly: READONLY, + READWRITE, + readwrite: READWRITE, + REPLICAOF, + replicaOf: REPLICAOF, + 'RESTORE-ASKING': RESTORE_ASKING, + restoreAsking: RESTORE_ASKING, + ROLE, + role: ROLE, + SAVE, + save: SAVE, + SCAN, + scan: SCAN, + SCRIPT_DEBUG, + scriptDebug: SCRIPT_DEBUG, + SCRIPT_EXISTS, + scriptExists: SCRIPT_EXISTS, + SCRIPT_FLUSH, + scriptFlush: SCRIPT_FLUSH, + SCRIPT_KILL, + scriptKill: SCRIPT_KILL, + SCRIPT_LOAD, + scriptLoad: SCRIPT_LOAD, + SHUTDOWN, + shutdown: SHUTDOWN, + SWAPDB, + swapDb: SWAPDB, + TIME, + time: TIME, + UNWATCH, + unwatch: UNWATCH, + WAIT, + wait: WAIT +}; diff --git a/server/node_modules/@redis/client/dist/lib/client/index.d.ts b/server/node_modules/@redis/client/dist/lib/client/index.d.ts new file mode 100644 index 0000000..e4f2202 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/client/index.d.ts @@ -0,0 +1,148 @@ +/// +import COMMANDS from './commands'; +import { RedisCommand, RedisCommandArgument, RedisCommandArguments, RedisCommandRawReply, RedisCommandReply, RedisFunctions, RedisModules, RedisExtensions, RedisScript, RedisScripts, RedisCommandSignature, ConvertArgumentType, RedisFunction, ExcludeMappedString } from '../commands'; +import { RedisSocketOptions } from './socket'; +import { QueueCommandOptions } from './commands-queue'; +import { RedisClientMultiCommandType } from './multi-command'; +import { RedisMultiQueuedCommand } from '../multi-command'; +import { EventEmitter } from 'events'; +import { CommandOptions } from '../command-options'; +import { ScanOptions, ZMember } from '../commands/generic-transformers'; +import { ScanCommandOptions } from '../commands/SCAN'; +import { HScanTuple } from '../commands/HSCAN'; +import { Options as PoolOptions } from 'generic-pool'; +import { PubSubType, PubSubListener, PubSubTypeListeners, ChannelListeners } from './pub-sub'; +export interface RedisClientOptions extends RedisExtensions { + /** + * `redis[s]://[[username][:password]@][host][:port][/db-number]` + * See [`redis`](https://www.iana.org/assignments/uri-schemes/prov/redis) and [`rediss`](https://www.iana.org/assignments/uri-schemes/prov/rediss) IANA registration for more details + */ + url?: string; + /** + * Socket connection properties + */ + socket?: RedisSocketOptions; + /** + * ACL username ([see ACL guide](https://redis.io/topics/acl)) + */ + username?: string; + /** + * ACL password or the old "--requirepass" password + */ + password?: string; + /** + * Client name ([see `CLIENT SETNAME`](https://redis.io/commands/client-setname)) + */ + name?: string; + /** + * Redis database number (see [`SELECT`](https://redis.io/commands/select) command) + */ + database?: number; + /** + * Maximum length of the client's internal command queue + */ + commandsQueueMaxLength?: number; + /** + * When `true`, commands are rejected when the client is reconnecting. + * When `false`, commands are queued for execution after reconnection. + */ + disableOfflineQueue?: boolean; + /** + * Connect in [`READONLY`](https://redis.io/commands/readonly) mode + */ + readonly?: boolean; + legacyMode?: boolean; + isolationPoolOptions?: PoolOptions; + /** + * Send `PING` command at interval (in ms). + * Useful with Redis deployments that do not use TCP Keep-Alive. + */ + pingInterval?: number; + /** + * If set to true, disables sending client identifier (user-agent like message) to the redis server + */ + disableClientInfo?: boolean; + /** + * Tag to append to library name that is sent to the Redis server + */ + clientInfoTag?: string; +} +type WithCommands = { + [P in keyof typeof COMMANDS]: RedisCommandSignature<(typeof COMMANDS)[P]>; +}; +export type WithModules = { + [P in keyof M as ExcludeMappedString

]: { + [C in keyof M[P] as ExcludeMappedString]: RedisCommandSignature; + }; +}; +export type WithFunctions = { + [P in keyof F as ExcludeMappedString

]: { + [FF in keyof F[P] as ExcludeMappedString]: RedisCommandSignature; + }; +}; +export type WithScripts = { + [P in keyof S as ExcludeMappedString

]: RedisCommandSignature; +}; +export type RedisClientType, F extends RedisFunctions = Record, S extends RedisScripts = Record> = RedisClient & WithCommands & WithModules & WithFunctions & WithScripts; +export type InstantiableRedisClient = new (options?: RedisClientOptions) => RedisClientType; +export interface ClientCommandOptions extends QueueCommandOptions { + isolated?: boolean; +} +export default class RedisClient extends EventEmitter { + #private; + static commandOptions(options: T): CommandOptions; + commandOptions: typeof RedisClient.commandOptions; + static extend(extensions?: RedisExtensions): InstantiableRedisClient; + static create(options?: RedisClientOptions): RedisClientType; + static parseURL(url: string): RedisClientOptions; + get options(): RedisClientOptions | undefined; + get isOpen(): boolean; + get isReady(): boolean; + get isPubSubActive(): boolean; + get v4(): Record; + constructor(options?: RedisClientOptions); + duplicate(overrides?: Partial>): RedisClientType; + connect(): Promise>; + commandsExecutor(command: C, args: Array): Promise>; + sendCommand(args: RedisCommandArguments, options?: ClientCommandOptions): Promise; + functionsExecuter(fn: F, args: Array, name: string): Promise>; + executeFunction(name: string, fn: RedisFunction, args: RedisCommandArguments, options?: ClientCommandOptions): Promise; + scriptsExecuter(script: S, args: Array): Promise>; + executeScript(script: RedisScript, args: RedisCommandArguments, options?: ClientCommandOptions): Promise; + SELECT(db: number): Promise; + SELECT(options: CommandOptions, db: number): Promise; + select: { + (db: number): Promise; + (options: CommandOptions, db: number): Promise; + }; + SUBSCRIBE(channels: string | Array, listener: PubSubListener, bufferMode?: T): Promise; + subscribe: (channels: string | Array, listener: PubSubListener, bufferMode?: T | undefined) => Promise; + UNSUBSCRIBE(channels?: string | Array, listener?: PubSubListener, bufferMode?: T): Promise; + unsubscribe: (channels?: string | Array, listener?: PubSubListener | undefined, bufferMode?: T | undefined) => Promise; + PSUBSCRIBE(patterns: string | Array, listener: PubSubListener, bufferMode?: T): Promise; + pSubscribe: (patterns: string | Array, listener: PubSubListener, bufferMode?: T | undefined) => Promise; + PUNSUBSCRIBE(patterns?: string | Array, listener?: PubSubListener, bufferMode?: T): Promise; + pUnsubscribe: (patterns?: string | Array, listener?: PubSubListener | undefined, bufferMode?: T | undefined) => Promise; + SSUBSCRIBE(channels: string | Array, listener: PubSubListener, bufferMode?: T): Promise; + sSubscribe: (channels: string | Array, listener: PubSubListener, bufferMode?: T | undefined) => Promise; + SUNSUBSCRIBE(channels?: string | Array, listener?: PubSubListener, bufferMode?: T): Promise; + sUnsubscribe: (channels?: string | Array, listener?: PubSubListener | undefined, bufferMode?: T | undefined) => Promise; + getPubSubListeners(type: PubSubType): PubSubTypeListeners; + extendPubSubChannelListeners(type: PubSubType, channel: string, listeners: ChannelListeners): Promise; + extendPubSubListeners(type: PubSubType, listeners: PubSubTypeListeners): Promise; + QUIT(): Promise; + quit: () => Promise; + executeIsolated(fn: (client: RedisClientType) => T | Promise): Promise; + MULTI(): RedisClientMultiCommandType; + multi: () => RedisClientMultiCommandType; + multiExecutor(commands: Array, selectedDB?: number, chainId?: symbol): Promise>; + scanIterator(options?: ScanCommandOptions): AsyncIterable; + hScanIterator(key: string, options?: ScanOptions): AsyncIterable>; + hScanNoValuesIterator(key: string, options?: ScanOptions): AsyncIterable>; + sScanIterator(key: string, options?: ScanOptions): AsyncIterable; + zScanIterator(key: string, options?: ScanOptions): AsyncIterable>; + disconnect(): Promise; + ref(): void; + unref(): void; +} +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/client/index.js b/server/node_modules/@redis/client/dist/lib/client/index.js new file mode 100644 index 0000000..5b7d58e --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/client/index.js @@ -0,0 +1,563 @@ +"use strict"; +var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; +}; +var _RedisClient_instances, _a, _RedisClient_options, _RedisClient_socket, _RedisClient_queue, _RedisClient_isolationPool, _RedisClient_v4, _RedisClient_selectedDB, _RedisClient_initiateOptions, _RedisClient_initiateQueue, _RedisClient_initiateSocket, _RedisClient_initiateIsolationPool, _RedisClient_legacyMode, _RedisClient_legacySendCommand, _RedisClient_defineLegacyCommand, _RedisClient_pingTimer, _RedisClient_setPingTimer, _RedisClient_sendCommand, _RedisClient_pubSubCommand, _RedisClient_tick, _RedisClient_addMultiCommands, _RedisClient_destroyIsolationPool; +Object.defineProperty(exports, "__esModule", { value: true }); +const commands_1 = require("./commands"); +const socket_1 = require("./socket"); +const commands_queue_1 = require("./commands-queue"); +const multi_command_1 = require("./multi-command"); +const events_1 = require("events"); +const command_options_1 = require("../command-options"); +const commander_1 = require("../commander"); +const generic_pool_1 = require("generic-pool"); +const errors_1 = require("../errors"); +const url_1 = require("url"); +const pub_sub_1 = require("./pub-sub"); +const package_json_1 = require("../../package.json"); +class RedisClient extends events_1.EventEmitter { + static commandOptions(options) { + return (0, command_options_1.commandOptions)(options); + } + static extend(extensions) { + const Client = (0, commander_1.attachExtensions)({ + BaseClass: _a, + modulesExecutor: _a.prototype.commandsExecutor, + modules: extensions?.modules, + functionsExecutor: _a.prototype.functionsExecuter, + functions: extensions?.functions, + scriptsExecutor: _a.prototype.scriptsExecuter, + scripts: extensions?.scripts + }); + if (Client !== _a) { + Client.prototype.Multi = multi_command_1.default.extend(extensions); + } + return Client; + } + static create(options) { + return new (_a.extend(options))(options); + } + static parseURL(url) { + // https://www.iana.org/assignments/uri-schemes/prov/redis + const { hostname, port, protocol, username, password, pathname } = new url_1.URL(url), parsed = { + socket: { + host: hostname + } + }; + if (protocol === 'rediss:') { + parsed.socket.tls = true; + } + else if (protocol !== 'redis:') { + throw new TypeError('Invalid protocol'); + } + if (port) { + parsed.socket.port = Number(port); + } + if (username) { + parsed.username = decodeURIComponent(username); + } + if (password) { + parsed.password = decodeURIComponent(password); + } + if (pathname.length > 1) { + const database = Number(pathname.substring(1)); + if (isNaN(database)) { + throw new TypeError('Invalid pathname'); + } + parsed.database = database; + } + return parsed; + } + get options() { + return __classPrivateFieldGet(this, _RedisClient_options, "f"); + } + get isOpen() { + return __classPrivateFieldGet(this, _RedisClient_socket, "f").isOpen; + } + get isReady() { + return __classPrivateFieldGet(this, _RedisClient_socket, "f").isReady; + } + get isPubSubActive() { + return __classPrivateFieldGet(this, _RedisClient_queue, "f").isPubSubActive; + } + get v4() { + if (!__classPrivateFieldGet(this, _RedisClient_options, "f")?.legacyMode) { + throw new Error('the client is not in "legacy mode"'); + } + return __classPrivateFieldGet(this, _RedisClient_v4, "f"); + } + constructor(options) { + super(); + _RedisClient_instances.add(this); + Object.defineProperty(this, "commandOptions", { + enumerable: true, + configurable: true, + writable: true, + value: _a.commandOptions + }); + _RedisClient_options.set(this, void 0); + _RedisClient_socket.set(this, void 0); + _RedisClient_queue.set(this, void 0); + _RedisClient_isolationPool.set(this, void 0); + _RedisClient_v4.set(this, {}); + _RedisClient_selectedDB.set(this, 0); + _RedisClient_pingTimer.set(this, void 0); + Object.defineProperty(this, "select", { + enumerable: true, + configurable: true, + writable: true, + value: this.SELECT + }); + Object.defineProperty(this, "subscribe", { + enumerable: true, + configurable: true, + writable: true, + value: this.SUBSCRIBE + }); + Object.defineProperty(this, "unsubscribe", { + enumerable: true, + configurable: true, + writable: true, + value: this.UNSUBSCRIBE + }); + Object.defineProperty(this, "pSubscribe", { + enumerable: true, + configurable: true, + writable: true, + value: this.PSUBSCRIBE + }); + Object.defineProperty(this, "pUnsubscribe", { + enumerable: true, + configurable: true, + writable: true, + value: this.PUNSUBSCRIBE + }); + Object.defineProperty(this, "sSubscribe", { + enumerable: true, + configurable: true, + writable: true, + value: this.SSUBSCRIBE + }); + Object.defineProperty(this, "sUnsubscribe", { + enumerable: true, + configurable: true, + writable: true, + value: this.SUNSUBSCRIBE + }); + Object.defineProperty(this, "quit", { + enumerable: true, + configurable: true, + writable: true, + value: this.QUIT + }); + Object.defineProperty(this, "multi", { + enumerable: true, + configurable: true, + writable: true, + value: this.MULTI + }); + __classPrivateFieldSet(this, _RedisClient_options, __classPrivateFieldGet(this, _RedisClient_instances, "m", _RedisClient_initiateOptions).call(this, options), "f"); + __classPrivateFieldSet(this, _RedisClient_queue, __classPrivateFieldGet(this, _RedisClient_instances, "m", _RedisClient_initiateQueue).call(this), "f"); + __classPrivateFieldSet(this, _RedisClient_socket, __classPrivateFieldGet(this, _RedisClient_instances, "m", _RedisClient_initiateSocket).call(this), "f"); + // should be initiated in connect, not here + // TODO: consider breaking in v5 + __classPrivateFieldSet(this, _RedisClient_isolationPool, __classPrivateFieldGet(this, _RedisClient_instances, "m", _RedisClient_initiateIsolationPool).call(this), "f"); + __classPrivateFieldGet(this, _RedisClient_instances, "m", _RedisClient_legacyMode).call(this); + } + duplicate(overrides) { + return new (Object.getPrototypeOf(this).constructor)({ + ...__classPrivateFieldGet(this, _RedisClient_options, "f"), + ...overrides + }); + } + async connect() { + // see comment in constructor + __classPrivateFieldSet(this, _RedisClient_isolationPool, __classPrivateFieldGet(this, _RedisClient_isolationPool, "f") ?? __classPrivateFieldGet(this, _RedisClient_instances, "m", _RedisClient_initiateIsolationPool).call(this), "f"); + await __classPrivateFieldGet(this, _RedisClient_socket, "f").connect(); + return this; + } + async commandsExecutor(command, args) { + const { args: redisArgs, options } = (0, commander_1.transformCommandArguments)(command, args); + return (0, commander_1.transformCommandReply)(command, await __classPrivateFieldGet(this, _RedisClient_instances, "m", _RedisClient_sendCommand).call(this, redisArgs, options), redisArgs.preserve); + } + sendCommand(args, options) { + return __classPrivateFieldGet(this, _RedisClient_instances, "m", _RedisClient_sendCommand).call(this, args, options); + } + async functionsExecuter(fn, args, name) { + const { args: redisArgs, options } = (0, commander_1.transformCommandArguments)(fn, args); + return (0, commander_1.transformCommandReply)(fn, await this.executeFunction(name, fn, redisArgs, options), redisArgs.preserve); + } + executeFunction(name, fn, args, options) { + return __classPrivateFieldGet(this, _RedisClient_instances, "m", _RedisClient_sendCommand).call(this, (0, commander_1.fCallArguments)(name, fn, args), options); + } + async scriptsExecuter(script, args) { + const { args: redisArgs, options } = (0, commander_1.transformCommandArguments)(script, args); + return (0, commander_1.transformCommandReply)(script, await this.executeScript(script, redisArgs, options), redisArgs.preserve); + } + async executeScript(script, args, options) { + const redisArgs = ['EVALSHA', script.SHA1]; + if (script.NUMBER_OF_KEYS !== undefined) { + redisArgs.push(script.NUMBER_OF_KEYS.toString()); + } + redisArgs.push(...args); + try { + return await __classPrivateFieldGet(this, _RedisClient_instances, "m", _RedisClient_sendCommand).call(this, redisArgs, options); + } + catch (err) { + if (!err?.message?.startsWith?.('NOSCRIPT')) { + throw err; + } + redisArgs[0] = 'EVAL'; + redisArgs[1] = script.SCRIPT; + return __classPrivateFieldGet(this, _RedisClient_instances, "m", _RedisClient_sendCommand).call(this, redisArgs, options); + } + } + async SELECT(options, db) { + if (!(0, command_options_1.isCommandOptions)(options)) { + db = options; + options = null; + } + await __classPrivateFieldGet(this, _RedisClient_instances, "m", _RedisClient_sendCommand).call(this, ['SELECT', db.toString()], options); + __classPrivateFieldSet(this, _RedisClient_selectedDB, db, "f"); + } + SUBSCRIBE(channels, listener, bufferMode) { + return __classPrivateFieldGet(this, _RedisClient_instances, "m", _RedisClient_pubSubCommand).call(this, __classPrivateFieldGet(this, _RedisClient_queue, "f").subscribe(pub_sub_1.PubSubType.CHANNELS, channels, listener, bufferMode)); + } + UNSUBSCRIBE(channels, listener, bufferMode) { + return __classPrivateFieldGet(this, _RedisClient_instances, "m", _RedisClient_pubSubCommand).call(this, __classPrivateFieldGet(this, _RedisClient_queue, "f").unsubscribe(pub_sub_1.PubSubType.CHANNELS, channels, listener, bufferMode)); + } + PSUBSCRIBE(patterns, listener, bufferMode) { + return __classPrivateFieldGet(this, _RedisClient_instances, "m", _RedisClient_pubSubCommand).call(this, __classPrivateFieldGet(this, _RedisClient_queue, "f").subscribe(pub_sub_1.PubSubType.PATTERNS, patterns, listener, bufferMode)); + } + PUNSUBSCRIBE(patterns, listener, bufferMode) { + return __classPrivateFieldGet(this, _RedisClient_instances, "m", _RedisClient_pubSubCommand).call(this, __classPrivateFieldGet(this, _RedisClient_queue, "f").unsubscribe(pub_sub_1.PubSubType.PATTERNS, patterns, listener, bufferMode)); + } + SSUBSCRIBE(channels, listener, bufferMode) { + return __classPrivateFieldGet(this, _RedisClient_instances, "m", _RedisClient_pubSubCommand).call(this, __classPrivateFieldGet(this, _RedisClient_queue, "f").subscribe(pub_sub_1.PubSubType.SHARDED, channels, listener, bufferMode)); + } + SUNSUBSCRIBE(channels, listener, bufferMode) { + return __classPrivateFieldGet(this, _RedisClient_instances, "m", _RedisClient_pubSubCommand).call(this, __classPrivateFieldGet(this, _RedisClient_queue, "f").unsubscribe(pub_sub_1.PubSubType.SHARDED, channels, listener, bufferMode)); + } + getPubSubListeners(type) { + return __classPrivateFieldGet(this, _RedisClient_queue, "f").getPubSubListeners(type); + } + extendPubSubChannelListeners(type, channel, listeners) { + return __classPrivateFieldGet(this, _RedisClient_instances, "m", _RedisClient_pubSubCommand).call(this, __classPrivateFieldGet(this, _RedisClient_queue, "f").extendPubSubChannelListeners(type, channel, listeners)); + } + extendPubSubListeners(type, listeners) { + return __classPrivateFieldGet(this, _RedisClient_instances, "m", _RedisClient_pubSubCommand).call(this, __classPrivateFieldGet(this, _RedisClient_queue, "f").extendPubSubListeners(type, listeners)); + } + QUIT() { + return __classPrivateFieldGet(this, _RedisClient_socket, "f").quit(async () => { + if (__classPrivateFieldGet(this, _RedisClient_pingTimer, "f")) + clearTimeout(__classPrivateFieldGet(this, _RedisClient_pingTimer, "f")); + const quitPromise = __classPrivateFieldGet(this, _RedisClient_queue, "f").addCommand(['QUIT']); + __classPrivateFieldGet(this, _RedisClient_instances, "m", _RedisClient_tick).call(this); + const [reply] = await Promise.all([ + quitPromise, + __classPrivateFieldGet(this, _RedisClient_instances, "m", _RedisClient_destroyIsolationPool).call(this) + ]); + return reply; + }); + } + executeIsolated(fn) { + if (!__classPrivateFieldGet(this, _RedisClient_isolationPool, "f")) + return Promise.reject(new errors_1.ClientClosedError()); + return __classPrivateFieldGet(this, _RedisClient_isolationPool, "f").use(fn); + } + MULTI() { + return new this.Multi(this.multiExecutor.bind(this), __classPrivateFieldGet(this, _RedisClient_options, "f")?.legacyMode); + } + async multiExecutor(commands, selectedDB, chainId) { + if (!__classPrivateFieldGet(this, _RedisClient_socket, "f").isOpen) { + return Promise.reject(new errors_1.ClientClosedError()); + } + const promise = chainId ? + // if `chainId` has a value, it's a `MULTI` (and not "pipeline") - need to add the `MULTI` and `EXEC` commands + Promise.all([ + __classPrivateFieldGet(this, _RedisClient_queue, "f").addCommand(['MULTI'], { chainId }), + __classPrivateFieldGet(this, _RedisClient_instances, "m", _RedisClient_addMultiCommands).call(this, commands, chainId), + __classPrivateFieldGet(this, _RedisClient_queue, "f").addCommand(['EXEC'], { chainId }) + ]) : + __classPrivateFieldGet(this, _RedisClient_instances, "m", _RedisClient_addMultiCommands).call(this, commands); + __classPrivateFieldGet(this, _RedisClient_instances, "m", _RedisClient_tick).call(this); + const results = await promise; + if (selectedDB !== undefined) { + __classPrivateFieldSet(this, _RedisClient_selectedDB, selectedDB, "f"); + } + return results; + } + async *scanIterator(options) { + let cursor = 0; + do { + const reply = await this.scan(cursor, options); + cursor = reply.cursor; + for (const key of reply.keys) { + yield key; + } + } while (cursor !== 0); + } + async *hScanIterator(key, options) { + let cursor = 0; + do { + const reply = await this.hScan(key, cursor, options); + cursor = reply.cursor; + for (const tuple of reply.tuples) { + yield tuple; + } + } while (cursor !== 0); + } + async *hScanNoValuesIterator(key, options) { + let cursor = 0; + do { + const reply = await this.hScanNoValues(key, cursor, options); + cursor = reply.cursor; + for (const k of reply.keys) { + yield k; + } + } while (cursor !== 0); + } + async *sScanIterator(key, options) { + let cursor = 0; + do { + const reply = await this.sScan(key, cursor, options); + cursor = reply.cursor; + for (const member of reply.members) { + yield member; + } + } while (cursor !== 0); + } + async *zScanIterator(key, options) { + let cursor = 0; + do { + const reply = await this.zScan(key, cursor, options); + cursor = reply.cursor; + for (const member of reply.members) { + yield member; + } + } while (cursor !== 0); + } + async disconnect() { + if (__classPrivateFieldGet(this, _RedisClient_pingTimer, "f")) + clearTimeout(__classPrivateFieldGet(this, _RedisClient_pingTimer, "f")); + __classPrivateFieldGet(this, _RedisClient_queue, "f").flushAll(new errors_1.DisconnectsClientError()); + __classPrivateFieldGet(this, _RedisClient_socket, "f").disconnect(); + await __classPrivateFieldGet(this, _RedisClient_instances, "m", _RedisClient_destroyIsolationPool).call(this); + } + ref() { + __classPrivateFieldGet(this, _RedisClient_socket, "f").ref(); + } + unref() { + __classPrivateFieldGet(this, _RedisClient_socket, "f").unref(); + } +} +_a = RedisClient, _RedisClient_options = new WeakMap(), _RedisClient_socket = new WeakMap(), _RedisClient_queue = new WeakMap(), _RedisClient_isolationPool = new WeakMap(), _RedisClient_v4 = new WeakMap(), _RedisClient_selectedDB = new WeakMap(), _RedisClient_pingTimer = new WeakMap(), _RedisClient_instances = new WeakSet(), _RedisClient_initiateOptions = function _RedisClient_initiateOptions(options) { + if (options?.url) { + const parsed = _a.parseURL(options.url); + if (options.socket) { + parsed.socket = Object.assign(options.socket, parsed.socket); + } + Object.assign(options, parsed); + } + if (options?.database) { + __classPrivateFieldSet(this, _RedisClient_selectedDB, options.database, "f"); + } + return options; +}, _RedisClient_initiateQueue = function _RedisClient_initiateQueue() { + return new commands_queue_1.default(__classPrivateFieldGet(this, _RedisClient_options, "f")?.commandsQueueMaxLength, (channel, listeners) => this.emit('sharded-channel-moved', channel, listeners)); +}, _RedisClient_initiateSocket = function _RedisClient_initiateSocket() { + const socketInitiator = async () => { + const promises = []; + if (__classPrivateFieldGet(this, _RedisClient_selectedDB, "f") !== 0) { + promises.push(__classPrivateFieldGet(this, _RedisClient_queue, "f").addCommand(['SELECT', __classPrivateFieldGet(this, _RedisClient_selectedDB, "f").toString()], { asap: true })); + } + if (__classPrivateFieldGet(this, _RedisClient_options, "f")?.readonly) { + promises.push(__classPrivateFieldGet(this, _RedisClient_queue, "f").addCommand(commands_1.default.READONLY.transformArguments(), { asap: true })); + } + if (!__classPrivateFieldGet(this, _RedisClient_options, "f")?.disableClientInfo) { + promises.push(__classPrivateFieldGet(this, _RedisClient_queue, "f").addCommand(['CLIENT', 'SETINFO', 'LIB-VER', package_json_1.version], { asap: true }).catch(err => { + if (!(err instanceof errors_1.ErrorReply)) { + throw err; + } + })); + promises.push(__classPrivateFieldGet(this, _RedisClient_queue, "f").addCommand([ + 'CLIENT', 'SETINFO', 'LIB-NAME', + __classPrivateFieldGet(this, _RedisClient_options, "f")?.clientInfoTag ? `node-redis(${__classPrivateFieldGet(this, _RedisClient_options, "f").clientInfoTag})` : 'node-redis' + ], { asap: true }).catch(err => { + if (!(err instanceof errors_1.ErrorReply)) { + throw err; + } + })); + } + if (__classPrivateFieldGet(this, _RedisClient_options, "f")?.name) { + promises.push(__classPrivateFieldGet(this, _RedisClient_queue, "f").addCommand(commands_1.default.CLIENT_SETNAME.transformArguments(__classPrivateFieldGet(this, _RedisClient_options, "f").name), { asap: true })); + } + if (__classPrivateFieldGet(this, _RedisClient_options, "f")?.username || __classPrivateFieldGet(this, _RedisClient_options, "f")?.password) { + promises.push(__classPrivateFieldGet(this, _RedisClient_queue, "f").addCommand(commands_1.default.AUTH.transformArguments({ + username: __classPrivateFieldGet(this, _RedisClient_options, "f").username, + password: __classPrivateFieldGet(this, _RedisClient_options, "f").password ?? '' + }), { asap: true })); + } + const resubscribePromise = __classPrivateFieldGet(this, _RedisClient_queue, "f").resubscribe(); + if (resubscribePromise) { + promises.push(resubscribePromise); + } + if (promises.length) { + __classPrivateFieldGet(this, _RedisClient_instances, "m", _RedisClient_tick).call(this, true); + await Promise.all(promises); + } + }; + return new socket_1.default(socketInitiator, __classPrivateFieldGet(this, _RedisClient_options, "f")?.socket) + .on('data', chunk => __classPrivateFieldGet(this, _RedisClient_queue, "f").onReplyChunk(chunk)) + .on('error', err => { + this.emit('error', err); + if (__classPrivateFieldGet(this, _RedisClient_socket, "f").isOpen && !__classPrivateFieldGet(this, _RedisClient_options, "f")?.disableOfflineQueue) { + __classPrivateFieldGet(this, _RedisClient_queue, "f").flushWaitingForReply(err); + } + else { + __classPrivateFieldGet(this, _RedisClient_queue, "f").flushAll(err); + } + }) + .on('connect', () => { + this.emit('connect'); + }) + .on('ready', () => { + this.emit('ready'); + __classPrivateFieldGet(this, _RedisClient_instances, "m", _RedisClient_setPingTimer).call(this); + __classPrivateFieldGet(this, _RedisClient_instances, "m", _RedisClient_tick).call(this); + }) + .on('reconnecting', () => this.emit('reconnecting')) + .on('drain', () => __classPrivateFieldGet(this, _RedisClient_instances, "m", _RedisClient_tick).call(this)) + .on('end', () => this.emit('end')); +}, _RedisClient_initiateIsolationPool = function _RedisClient_initiateIsolationPool() { + return (0, generic_pool_1.createPool)({ + create: async () => { + const duplicate = this.duplicate({ + isolationPoolOptions: undefined + }).on('error', err => this.emit('error', err)); + await duplicate.connect(); + return duplicate; + }, + destroy: client => client.disconnect() + }, __classPrivateFieldGet(this, _RedisClient_options, "f")?.isolationPoolOptions); +}, _RedisClient_legacyMode = function _RedisClient_legacyMode() { + var _b, _c; + if (!__classPrivateFieldGet(this, _RedisClient_options, "f")?.legacyMode) + return; + __classPrivateFieldGet(this, _RedisClient_v4, "f").sendCommand = __classPrivateFieldGet(this, _RedisClient_instances, "m", _RedisClient_sendCommand).bind(this); + this.sendCommand = (...args) => { + const result = __classPrivateFieldGet(this, _RedisClient_instances, "m", _RedisClient_legacySendCommand).call(this, ...args); + if (result) { + result.promise + .then(reply => result.callback(null, reply)) + .catch(err => result.callback(err)); + } + }; + for (const [name, command] of Object.entries(commands_1.default)) { + __classPrivateFieldGet(this, _RedisClient_instances, "m", _RedisClient_defineLegacyCommand).call(this, name, command); + (_b = this)[_c = name.toLowerCase()] ?? (_b[_c] = this[name]); + } + // hard coded commands + __classPrivateFieldGet(this, _RedisClient_instances, "m", _RedisClient_defineLegacyCommand).call(this, 'SELECT'); + __classPrivateFieldGet(this, _RedisClient_instances, "m", _RedisClient_defineLegacyCommand).call(this, 'select'); + __classPrivateFieldGet(this, _RedisClient_instances, "m", _RedisClient_defineLegacyCommand).call(this, 'SUBSCRIBE'); + __classPrivateFieldGet(this, _RedisClient_instances, "m", _RedisClient_defineLegacyCommand).call(this, 'subscribe'); + __classPrivateFieldGet(this, _RedisClient_instances, "m", _RedisClient_defineLegacyCommand).call(this, 'PSUBSCRIBE'); + __classPrivateFieldGet(this, _RedisClient_instances, "m", _RedisClient_defineLegacyCommand).call(this, 'pSubscribe'); + __classPrivateFieldGet(this, _RedisClient_instances, "m", _RedisClient_defineLegacyCommand).call(this, 'UNSUBSCRIBE'); + __classPrivateFieldGet(this, _RedisClient_instances, "m", _RedisClient_defineLegacyCommand).call(this, 'unsubscribe'); + __classPrivateFieldGet(this, _RedisClient_instances, "m", _RedisClient_defineLegacyCommand).call(this, 'PUNSUBSCRIBE'); + __classPrivateFieldGet(this, _RedisClient_instances, "m", _RedisClient_defineLegacyCommand).call(this, 'pUnsubscribe'); + __classPrivateFieldGet(this, _RedisClient_instances, "m", _RedisClient_defineLegacyCommand).call(this, 'QUIT'); + __classPrivateFieldGet(this, _RedisClient_instances, "m", _RedisClient_defineLegacyCommand).call(this, 'quit'); +}, _RedisClient_legacySendCommand = function _RedisClient_legacySendCommand(...args) { + const callback = typeof args[args.length - 1] === 'function' ? + args.pop() : + undefined; + const promise = __classPrivateFieldGet(this, _RedisClient_instances, "m", _RedisClient_sendCommand).call(this, (0, commander_1.transformLegacyCommandArguments)(args)); + if (callback) + return { + promise, + callback + }; + promise.catch(err => this.emit('error', err)); +}, _RedisClient_defineLegacyCommand = function _RedisClient_defineLegacyCommand(name, command) { + __classPrivateFieldGet(this, _RedisClient_v4, "f")[name] = this[name].bind(this); + this[name] = command && command.TRANSFORM_LEGACY_REPLY && command.transformReply ? + (...args) => { + const result = __classPrivateFieldGet(this, _RedisClient_instances, "m", _RedisClient_legacySendCommand).call(this, name, ...args); + if (result) { + result.promise + .then(reply => result.callback(null, command.transformReply(reply))) + .catch(err => result.callback(err)); + } + } : + (...args) => this.sendCommand(name, ...args); +}, _RedisClient_setPingTimer = function _RedisClient_setPingTimer() { + if (!__classPrivateFieldGet(this, _RedisClient_options, "f")?.pingInterval || !__classPrivateFieldGet(this, _RedisClient_socket, "f").isReady) + return; + clearTimeout(__classPrivateFieldGet(this, _RedisClient_pingTimer, "f")); + __classPrivateFieldSet(this, _RedisClient_pingTimer, setTimeout(() => { + if (!__classPrivateFieldGet(this, _RedisClient_socket, "f").isReady) + return; + // using #sendCommand to support legacy mode + __classPrivateFieldGet(this, _RedisClient_instances, "m", _RedisClient_sendCommand).call(this, ['PING']) + .then(reply => this.emit('ping-interval', reply)) + .catch(err => this.emit('error', err)) + .finally(() => __classPrivateFieldGet(this, _RedisClient_instances, "m", _RedisClient_setPingTimer).call(this)); + }, __classPrivateFieldGet(this, _RedisClient_options, "f").pingInterval), "f"); +}, _RedisClient_sendCommand = function _RedisClient_sendCommand(args, options) { + if (!__classPrivateFieldGet(this, _RedisClient_socket, "f").isOpen) { + return Promise.reject(new errors_1.ClientClosedError()); + } + else if (options?.isolated) { + return this.executeIsolated(isolatedClient => isolatedClient.sendCommand(args, { + ...options, + isolated: false + })); + } + else if (!__classPrivateFieldGet(this, _RedisClient_socket, "f").isReady && __classPrivateFieldGet(this, _RedisClient_options, "f")?.disableOfflineQueue) { + return Promise.reject(new errors_1.ClientOfflineError()); + } + const promise = __classPrivateFieldGet(this, _RedisClient_queue, "f").addCommand(args, options); + __classPrivateFieldGet(this, _RedisClient_instances, "m", _RedisClient_tick).call(this); + return promise; +}, _RedisClient_pubSubCommand = function _RedisClient_pubSubCommand(promise) { + if (promise === undefined) + return Promise.resolve(); + __classPrivateFieldGet(this, _RedisClient_instances, "m", _RedisClient_tick).call(this); + return promise; +}, _RedisClient_tick = function _RedisClient_tick(force = false) { + if (__classPrivateFieldGet(this, _RedisClient_socket, "f").writableNeedDrain || (!force && !__classPrivateFieldGet(this, _RedisClient_socket, "f").isReady)) { + return; + } + __classPrivateFieldGet(this, _RedisClient_socket, "f").cork(); + while (!__classPrivateFieldGet(this, _RedisClient_socket, "f").writableNeedDrain) { + const args = __classPrivateFieldGet(this, _RedisClient_queue, "f").getCommandToSend(); + if (args === undefined) + break; + __classPrivateFieldGet(this, _RedisClient_socket, "f").writeCommand(args); + } +}, _RedisClient_addMultiCommands = function _RedisClient_addMultiCommands(commands, chainId) { + return Promise.all(commands.map(({ args }) => __classPrivateFieldGet(this, _RedisClient_queue, "f").addCommand(args, { chainId }))); +}, _RedisClient_destroyIsolationPool = async function _RedisClient_destroyIsolationPool() { + await __classPrivateFieldGet(this, _RedisClient_isolationPool, "f").drain(); + await __classPrivateFieldGet(this, _RedisClient_isolationPool, "f").clear(); + __classPrivateFieldSet(this, _RedisClient_isolationPool, undefined, "f"); +}; +exports.default = RedisClient; +(0, commander_1.attachCommands)({ + BaseClass: RedisClient, + commands: commands_1.default, + executor: RedisClient.prototype.commandsExecutor +}); +RedisClient.prototype.Multi = multi_command_1.default; diff --git a/server/node_modules/@redis/client/dist/lib/client/multi-command.d.ts b/server/node_modules/@redis/client/dist/lib/client/multi-command.d.ts new file mode 100644 index 0000000..0893589 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/client/multi-command.d.ts @@ -0,0 +1,39 @@ +import COMMANDS from './commands'; +import { RedisCommand, RedisCommandArguments, RedisCommandRawReply, RedisFunctions, RedisModules, RedisExtensions, RedisScript, RedisScripts, ExcludeMappedString, RedisFunction } from '../commands'; +import { RedisMultiQueuedCommand } from '../multi-command'; +type CommandSignature = (...args: Parameters) => RedisClientMultiCommandType; +type WithCommands = { + [P in keyof typeof COMMANDS]: CommandSignature<(typeof COMMANDS)[P], M, F, S>; +}; +type WithModules = { + [P in keyof M as ExcludeMappedString

]: { + [C in keyof M[P] as ExcludeMappedString]: CommandSignature; + }; +}; +type WithFunctions = { + [P in keyof F as ExcludeMappedString

]: { + [FF in keyof F[P] as ExcludeMappedString]: CommandSignature; + }; +}; +type WithScripts = { + [P in keyof S as ExcludeMappedString

]: CommandSignature; +}; +export type RedisClientMultiCommandType = RedisClientMultiCommand & WithCommands & WithModules & WithFunctions & WithScripts; +type InstantiableRedisMultiCommand = new (...args: ConstructorParameters) => RedisClientMultiCommandType; +export type RedisClientMultiExecutor = (queue: Array, selectedDB?: number, chainId?: symbol) => Promise>; +export default class RedisClientMultiCommand { + #private; + static extend(extensions?: RedisExtensions): InstantiableRedisMultiCommand; + readonly v4: Record; + constructor(executor: RedisClientMultiExecutor, legacyMode?: boolean); + commandsExecutor(command: RedisCommand, args: Array): this; + SELECT(db: number, transformReply?: RedisCommand['transformReply']): this; + select: (db: number, transformReply?: RedisCommand['transformReply']) => this; + addCommand(args: RedisCommandArguments, transformReply?: RedisCommand['transformReply']): this; + functionsExecutor(fn: RedisFunction, args: Array, name: string): this; + scriptsExecutor(script: RedisScript, args: Array): this; + exec(execAsPipeline?: boolean): Promise>; + EXEC: (execAsPipeline?: boolean) => Promise>; + execAsPipeline(): Promise>; +} +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/client/multi-command.js b/server/node_modules/@redis/client/dist/lib/client/multi-command.js new file mode 100644 index 0000000..4d43c8f --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/client/multi-command.js @@ -0,0 +1,130 @@ +"use strict"; +var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; +}; +var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var _RedisClientMultiCommand_instances, _RedisClientMultiCommand_multi, _RedisClientMultiCommand_executor, _RedisClientMultiCommand_selectedDB, _RedisClientMultiCommand_legacyMode, _RedisClientMultiCommand_defineLegacyCommand; +Object.defineProperty(exports, "__esModule", { value: true }); +const commands_1 = require("./commands"); +const multi_command_1 = require("../multi-command"); +const commander_1 = require("../commander"); +class RedisClientMultiCommand { + static extend(extensions) { + return (0, commander_1.attachExtensions)({ + BaseClass: RedisClientMultiCommand, + modulesExecutor: RedisClientMultiCommand.prototype.commandsExecutor, + modules: extensions?.modules, + functionsExecutor: RedisClientMultiCommand.prototype.functionsExecutor, + functions: extensions?.functions, + scriptsExecutor: RedisClientMultiCommand.prototype.scriptsExecutor, + scripts: extensions?.scripts + }); + } + constructor(executor, legacyMode = false) { + _RedisClientMultiCommand_instances.add(this); + _RedisClientMultiCommand_multi.set(this, new multi_command_1.default()); + _RedisClientMultiCommand_executor.set(this, void 0); + Object.defineProperty(this, "v4", { + enumerable: true, + configurable: true, + writable: true, + value: {} + }); + _RedisClientMultiCommand_selectedDB.set(this, void 0); + Object.defineProperty(this, "select", { + enumerable: true, + configurable: true, + writable: true, + value: this.SELECT + }); + Object.defineProperty(this, "EXEC", { + enumerable: true, + configurable: true, + writable: true, + value: this.exec + }); + __classPrivateFieldSet(this, _RedisClientMultiCommand_executor, executor, "f"); + if (legacyMode) { + __classPrivateFieldGet(this, _RedisClientMultiCommand_instances, "m", _RedisClientMultiCommand_legacyMode).call(this); + } + } + commandsExecutor(command, args) { + return this.addCommand(command.transformArguments(...args), command.transformReply); + } + SELECT(db, transformReply) { + __classPrivateFieldSet(this, _RedisClientMultiCommand_selectedDB, db, "f"); + return this.addCommand(['SELECT', db.toString()], transformReply); + } + addCommand(args, transformReply) { + __classPrivateFieldGet(this, _RedisClientMultiCommand_multi, "f").addCommand(args, transformReply); + return this; + } + functionsExecutor(fn, args, name) { + __classPrivateFieldGet(this, _RedisClientMultiCommand_multi, "f").addFunction(name, fn, args); + return this; + } + scriptsExecutor(script, args) { + __classPrivateFieldGet(this, _RedisClientMultiCommand_multi, "f").addScript(script, args); + return this; + } + async exec(execAsPipeline = false) { + if (execAsPipeline) { + return this.execAsPipeline(); + } + return __classPrivateFieldGet(this, _RedisClientMultiCommand_multi, "f").handleExecReplies(await __classPrivateFieldGet(this, _RedisClientMultiCommand_executor, "f").call(this, __classPrivateFieldGet(this, _RedisClientMultiCommand_multi, "f").queue, __classPrivateFieldGet(this, _RedisClientMultiCommand_selectedDB, "f"), multi_command_1.default.generateChainId())); + } + async execAsPipeline() { + if (__classPrivateFieldGet(this, _RedisClientMultiCommand_multi, "f").queue.length === 0) + return []; + return __classPrivateFieldGet(this, _RedisClientMultiCommand_multi, "f").transformReplies(await __classPrivateFieldGet(this, _RedisClientMultiCommand_executor, "f").call(this, __classPrivateFieldGet(this, _RedisClientMultiCommand_multi, "f").queue, __classPrivateFieldGet(this, _RedisClientMultiCommand_selectedDB, "f"))); + } +} +_RedisClientMultiCommand_multi = new WeakMap(), _RedisClientMultiCommand_executor = new WeakMap(), _RedisClientMultiCommand_selectedDB = new WeakMap(), _RedisClientMultiCommand_instances = new WeakSet(), _RedisClientMultiCommand_legacyMode = function _RedisClientMultiCommand_legacyMode() { + var _a, _b; + this.v4.addCommand = this.addCommand.bind(this); + this.addCommand = (...args) => { + __classPrivateFieldGet(this, _RedisClientMultiCommand_multi, "f").addCommand((0, commander_1.transformLegacyCommandArguments)(args)); + return this; + }; + this.v4.exec = this.exec.bind(this); + this.exec = (callback) => { + this.v4.exec() + .then((reply) => { + if (!callback) + return; + callback(null, reply); + }) + .catch((err) => { + if (!callback) { + // this.emit('error', err); + return; + } + callback(err); + }); + }; + for (const [name, command] of Object.entries(commands_1.default)) { + __classPrivateFieldGet(this, _RedisClientMultiCommand_instances, "m", _RedisClientMultiCommand_defineLegacyCommand).call(this, name, command); + (_a = this)[_b = name.toLowerCase()] ?? (_a[_b] = this[name]); + } +}, _RedisClientMultiCommand_defineLegacyCommand = function _RedisClientMultiCommand_defineLegacyCommand(name, command) { + this.v4[name] = this[name].bind(this.v4); + this[name] = command && command.TRANSFORM_LEGACY_REPLY && command.transformReply ? + (...args) => { + __classPrivateFieldGet(this, _RedisClientMultiCommand_multi, "f").addCommand([name, ...(0, commander_1.transformLegacyCommandArguments)(args)], command.transformReply); + return this; + } : + (...args) => this.addCommand(name, ...args); +}; +exports.default = RedisClientMultiCommand; +(0, commander_1.attachCommands)({ + BaseClass: RedisClientMultiCommand, + commands: commands_1.default, + executor: RedisClientMultiCommand.prototype.commandsExecutor +}); diff --git a/server/node_modules/@redis/client/dist/lib/client/pub-sub.d.ts b/server/node_modules/@redis/client/dist/lib/client/pub-sub.d.ts new file mode 100644 index 0000000..ffd2783 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/client/pub-sub.d.ts @@ -0,0 +1,50 @@ +/// +import { RedisCommandArgument } from "../commands"; +export declare enum PubSubType { + CHANNELS = "CHANNELS", + PATTERNS = "PATTERNS", + SHARDED = "SHARDED" +} +export type PubSubListener = (message: T, channel: T) => unknown; +export interface ChannelListeners { + unsubscribing: boolean; + buffers: Set>; + strings: Set>; +} +export type PubSubTypeListeners = Map; +export type PubSubCommand = ReturnType; +export declare class PubSub { + #private; + static isStatusReply(reply: Array): boolean; + static isShardedUnsubscribe(reply: Array): boolean; + get isActive(): boolean; + subscribe(type: PubSubType, channels: string | Array, listener: PubSubListener, returnBuffers?: T): { + args: RedisCommandArgument[]; + channelsCounter: number; + resolve: () => void; + reject: () => void; + } | undefined; + extendChannelListeners(type: PubSubType, channel: string, listeners: ChannelListeners): { + args: (string | Buffer)[]; + channelsCounter: number; + resolve: () => number; + reject: () => void; + } | undefined; + extendTypeListeners(type: PubSubType, listeners: PubSubTypeListeners): { + args: RedisCommandArgument[]; + channelsCounter: number; + resolve: () => number; + reject: () => void; + } | undefined; + unsubscribe(type: PubSubType, channels?: string | Array, listener?: PubSubListener, returnBuffers?: T): { + args: RedisCommandArgument[]; + channelsCounter: number; + resolve: () => void; + reject: undefined; + } | undefined; + reset(): void; + resubscribe(): Array; + handleMessageReply(reply: Array): boolean; + removeShardedListeners(channel: string): ChannelListeners; + getTypeListeners(type: PubSubType): PubSubTypeListeners; +} diff --git a/server/node_modules/@redis/client/dist/lib/client/pub-sub.js b/server/node_modules/@redis/client/dist/lib/client/pub-sub.js new file mode 100644 index 0000000..fabaa99 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/client/pub-sub.js @@ -0,0 +1,306 @@ +"use strict"; +var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; +}; +var _PubSub_instances, _a, _PubSub_channelsArray, _PubSub_listenersSet, _PubSub_subscribing, _PubSub_isActive, _PubSub_listeners, _PubSub_extendChannelListeners, _PubSub_unsubscribeCommand, _PubSub_updateIsActive, _PubSub_emitPubSubMessage; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.PubSub = exports.PubSubType = void 0; +var PubSubType; +(function (PubSubType) { + PubSubType["CHANNELS"] = "CHANNELS"; + PubSubType["PATTERNS"] = "PATTERNS"; + PubSubType["SHARDED"] = "SHARDED"; +})(PubSubType || (exports.PubSubType = PubSubType = {})); +const COMMANDS = { + [PubSubType.CHANNELS]: { + subscribe: Buffer.from('subscribe'), + unsubscribe: Buffer.from('unsubscribe'), + message: Buffer.from('message') + }, + [PubSubType.PATTERNS]: { + subscribe: Buffer.from('psubscribe'), + unsubscribe: Buffer.from('punsubscribe'), + message: Buffer.from('pmessage') + }, + [PubSubType.SHARDED]: { + subscribe: Buffer.from('ssubscribe'), + unsubscribe: Buffer.from('sunsubscribe'), + message: Buffer.from('smessage') + } +}; +class PubSub { + constructor() { + _PubSub_instances.add(this); + _PubSub_subscribing.set(this, 0); + _PubSub_isActive.set(this, false); + _PubSub_listeners.set(this, { + [PubSubType.CHANNELS]: new Map(), + [PubSubType.PATTERNS]: new Map(), + [PubSubType.SHARDED]: new Map() + }); + } + static isStatusReply(reply) { + return (COMMANDS[PubSubType.CHANNELS].subscribe.equals(reply[0]) || + COMMANDS[PubSubType.CHANNELS].unsubscribe.equals(reply[0]) || + COMMANDS[PubSubType.PATTERNS].subscribe.equals(reply[0]) || + COMMANDS[PubSubType.PATTERNS].unsubscribe.equals(reply[0]) || + COMMANDS[PubSubType.SHARDED].subscribe.equals(reply[0])); + } + static isShardedUnsubscribe(reply) { + return COMMANDS[PubSubType.SHARDED].unsubscribe.equals(reply[0]); + } + get isActive() { + return __classPrivateFieldGet(this, _PubSub_isActive, "f"); + } + subscribe(type, channels, listener, returnBuffers) { + var _b; + const args = [COMMANDS[type].subscribe], channelsArray = __classPrivateFieldGet(_a, _a, "m", _PubSub_channelsArray).call(_a, channels); + for (const channel of channelsArray) { + let channelListeners = __classPrivateFieldGet(this, _PubSub_listeners, "f")[type].get(channel); + if (!channelListeners || channelListeners.unsubscribing) { + args.push(channel); + } + } + if (args.length === 1) { + // all channels are already subscribed, add listeners without issuing a command + for (const channel of channelsArray) { + __classPrivateFieldGet(_a, _a, "m", _PubSub_listenersSet).call(_a, __classPrivateFieldGet(this, _PubSub_listeners, "f")[type].get(channel), returnBuffers).add(listener); + } + return; + } + __classPrivateFieldSet(this, _PubSub_isActive, true, "f"); + __classPrivateFieldSet(this, _PubSub_subscribing, (_b = __classPrivateFieldGet(this, _PubSub_subscribing, "f"), _b++, _b), "f"); + return { + args, + channelsCounter: args.length - 1, + resolve: () => { + var _b; + __classPrivateFieldSet(this, _PubSub_subscribing, (_b = __classPrivateFieldGet(this, _PubSub_subscribing, "f"), _b--, _b), "f"); + for (const channel of channelsArray) { + let listeners = __classPrivateFieldGet(this, _PubSub_listeners, "f")[type].get(channel); + if (!listeners) { + listeners = { + unsubscribing: false, + buffers: new Set(), + strings: new Set() + }; + __classPrivateFieldGet(this, _PubSub_listeners, "f")[type].set(channel, listeners); + } + __classPrivateFieldGet(_a, _a, "m", _PubSub_listenersSet).call(_a, listeners, returnBuffers).add(listener); + } + }, + reject: () => { + var _b; + __classPrivateFieldSet(this, _PubSub_subscribing, (_b = __classPrivateFieldGet(this, _PubSub_subscribing, "f"), _b--, _b), "f"); + __classPrivateFieldGet(this, _PubSub_instances, "m", _PubSub_updateIsActive).call(this); + } + }; + } + extendChannelListeners(type, channel, listeners) { + var _b; + if (!__classPrivateFieldGet(this, _PubSub_instances, "m", _PubSub_extendChannelListeners).call(this, type, channel, listeners)) + return; + __classPrivateFieldSet(this, _PubSub_isActive, true, "f"); + __classPrivateFieldSet(this, _PubSub_subscribing, (_b = __classPrivateFieldGet(this, _PubSub_subscribing, "f"), _b++, _b), "f"); + return { + args: [ + COMMANDS[type].subscribe, + channel + ], + channelsCounter: 1, + resolve: () => { var _b, _c; return __classPrivateFieldSet(this, _PubSub_subscribing, (_c = __classPrivateFieldGet(this, _PubSub_subscribing, "f"), _b = _c--, _c), "f"), _b; }, + reject: () => { + var _b; + __classPrivateFieldSet(this, _PubSub_subscribing, (_b = __classPrivateFieldGet(this, _PubSub_subscribing, "f"), _b--, _b), "f"); + __classPrivateFieldGet(this, _PubSub_instances, "m", _PubSub_updateIsActive).call(this); + } + }; + } + extendTypeListeners(type, listeners) { + var _b; + const args = [COMMANDS[type].subscribe]; + for (const [channel, channelListeners] of listeners) { + if (__classPrivateFieldGet(this, _PubSub_instances, "m", _PubSub_extendChannelListeners).call(this, type, channel, channelListeners)) { + args.push(channel); + } + } + if (args.length === 1) + return; + __classPrivateFieldSet(this, _PubSub_isActive, true, "f"); + __classPrivateFieldSet(this, _PubSub_subscribing, (_b = __classPrivateFieldGet(this, _PubSub_subscribing, "f"), _b++, _b), "f"); + return { + args, + channelsCounter: args.length - 1, + resolve: () => { var _b, _c; return __classPrivateFieldSet(this, _PubSub_subscribing, (_c = __classPrivateFieldGet(this, _PubSub_subscribing, "f"), _b = _c--, _c), "f"), _b; }, + reject: () => { + var _b; + __classPrivateFieldSet(this, _PubSub_subscribing, (_b = __classPrivateFieldGet(this, _PubSub_subscribing, "f"), _b--, _b), "f"); + __classPrivateFieldGet(this, _PubSub_instances, "m", _PubSub_updateIsActive).call(this); + } + }; + } + unsubscribe(type, channels, listener, returnBuffers) { + const listeners = __classPrivateFieldGet(this, _PubSub_listeners, "f")[type]; + if (!channels) { + return __classPrivateFieldGet(this, _PubSub_instances, "m", _PubSub_unsubscribeCommand).call(this, [COMMANDS[type].unsubscribe], + // cannot use `this.#subscribed` because there might be some `SUBSCRIBE` commands in the queue + // cannot use `this.#subscribed + this.#subscribing` because some `SUBSCRIBE` commands might fail + NaN, () => listeners.clear()); + } + const channelsArray = __classPrivateFieldGet(_a, _a, "m", _PubSub_channelsArray).call(_a, channels); + if (!listener) { + return __classPrivateFieldGet(this, _PubSub_instances, "m", _PubSub_unsubscribeCommand).call(this, [COMMANDS[type].unsubscribe, ...channelsArray], channelsArray.length, () => { + for (const channel of channelsArray) { + listeners.delete(channel); + } + }); + } + const args = [COMMANDS[type].unsubscribe]; + for (const channel of channelsArray) { + const sets = listeners.get(channel); + if (sets) { + let current, other; + if (returnBuffers) { + current = sets.buffers; + other = sets.strings; + } + else { + current = sets.strings; + other = sets.buffers; + } + const currentSize = current.has(listener) ? current.size - 1 : current.size; + if (currentSize !== 0 || other.size !== 0) + continue; + sets.unsubscribing = true; + } + args.push(channel); + } + if (args.length === 1) { + // all channels has other listeners, + // delete the listeners without issuing a command + for (const channel of channelsArray) { + __classPrivateFieldGet(_a, _a, "m", _PubSub_listenersSet).call(_a, listeners.get(channel), returnBuffers).delete(listener); + } + return; + } + return __classPrivateFieldGet(this, _PubSub_instances, "m", _PubSub_unsubscribeCommand).call(this, args, args.length - 1, () => { + for (const channel of channelsArray) { + const sets = listeners.get(channel); + if (!sets) + continue; + (returnBuffers ? sets.buffers : sets.strings).delete(listener); + if (sets.buffers.size === 0 && sets.strings.size === 0) { + listeners.delete(channel); + } + } + }); + } + reset() { + __classPrivateFieldSet(this, _PubSub_isActive, false, "f"); + __classPrivateFieldSet(this, _PubSub_subscribing, 0, "f"); + } + resubscribe() { + var _b; + const commands = []; + for (const [type, listeners] of Object.entries(__classPrivateFieldGet(this, _PubSub_listeners, "f"))) { + if (!listeners.size) + continue; + __classPrivateFieldSet(this, _PubSub_isActive, true, "f"); + __classPrivateFieldSet(this, _PubSub_subscribing, (_b = __classPrivateFieldGet(this, _PubSub_subscribing, "f"), _b++, _b), "f"); + const callback = () => { var _b, _c; return __classPrivateFieldSet(this, _PubSub_subscribing, (_c = __classPrivateFieldGet(this, _PubSub_subscribing, "f"), _b = _c--, _c), "f"), _b; }; + commands.push({ + args: [ + COMMANDS[type].subscribe, + ...listeners.keys() + ], + channelsCounter: listeners.size, + resolve: callback, + reject: callback + }); + } + return commands; + } + handleMessageReply(reply) { + if (COMMANDS[PubSubType.CHANNELS].message.equals(reply[0])) { + __classPrivateFieldGet(this, _PubSub_instances, "m", _PubSub_emitPubSubMessage).call(this, PubSubType.CHANNELS, reply[2], reply[1]); + return true; + } + else if (COMMANDS[PubSubType.PATTERNS].message.equals(reply[0])) { + __classPrivateFieldGet(this, _PubSub_instances, "m", _PubSub_emitPubSubMessage).call(this, PubSubType.PATTERNS, reply[3], reply[2], reply[1]); + return true; + } + else if (COMMANDS[PubSubType.SHARDED].message.equals(reply[0])) { + __classPrivateFieldGet(this, _PubSub_instances, "m", _PubSub_emitPubSubMessage).call(this, PubSubType.SHARDED, reply[2], reply[1]); + return true; + } + return false; + } + removeShardedListeners(channel) { + const listeners = __classPrivateFieldGet(this, _PubSub_listeners, "f")[PubSubType.SHARDED].get(channel); + __classPrivateFieldGet(this, _PubSub_listeners, "f")[PubSubType.SHARDED].delete(channel); + __classPrivateFieldGet(this, _PubSub_instances, "m", _PubSub_updateIsActive).call(this); + return listeners; + } + getTypeListeners(type) { + return __classPrivateFieldGet(this, _PubSub_listeners, "f")[type]; + } +} +exports.PubSub = PubSub; +_a = PubSub, _PubSub_subscribing = new WeakMap(), _PubSub_isActive = new WeakMap(), _PubSub_listeners = new WeakMap(), _PubSub_instances = new WeakSet(), _PubSub_channelsArray = function _PubSub_channelsArray(channels) { + return (Array.isArray(channels) ? channels : [channels]); +}, _PubSub_listenersSet = function _PubSub_listenersSet(listeners, returnBuffers) { + return (returnBuffers ? listeners.buffers : listeners.strings); +}, _PubSub_extendChannelListeners = function _PubSub_extendChannelListeners(type, channel, listeners) { + const existingListeners = __classPrivateFieldGet(this, _PubSub_listeners, "f")[type].get(channel); + if (!existingListeners) { + __classPrivateFieldGet(this, _PubSub_listeners, "f")[type].set(channel, listeners); + return true; + } + for (const listener of listeners.buffers) { + existingListeners.buffers.add(listener); + } + for (const listener of listeners.strings) { + existingListeners.strings.add(listener); + } + return false; +}, _PubSub_unsubscribeCommand = function _PubSub_unsubscribeCommand(args, channelsCounter, removeListeners) { + return { + args, + channelsCounter, + resolve: () => { + removeListeners(); + __classPrivateFieldGet(this, _PubSub_instances, "m", _PubSub_updateIsActive).call(this); + }, + reject: undefined // use the same structure as `subscribe` + }; +}, _PubSub_updateIsActive = function _PubSub_updateIsActive() { + __classPrivateFieldSet(this, _PubSub_isActive, (__classPrivateFieldGet(this, _PubSub_listeners, "f")[PubSubType.CHANNELS].size !== 0 || + __classPrivateFieldGet(this, _PubSub_listeners, "f")[PubSubType.PATTERNS].size !== 0 || + __classPrivateFieldGet(this, _PubSub_listeners, "f")[PubSubType.SHARDED].size !== 0 || + __classPrivateFieldGet(this, _PubSub_subscribing, "f") !== 0), "f"); +}, _PubSub_emitPubSubMessage = function _PubSub_emitPubSubMessage(type, message, channel, pattern) { + const keyString = (pattern ?? channel).toString(), listeners = __classPrivateFieldGet(this, _PubSub_listeners, "f")[type].get(keyString); + if (!listeners) + return; + for (const listener of listeners.buffers) { + listener(message, channel); + } + if (!listeners.strings.size) + return; + const channelString = pattern ? channel.toString() : keyString, messageString = channelString === '__redis__:invalidate' ? + // https://github.com/redis/redis/pull/7469 + // https://github.com/redis/redis/issues/7463 + (message === null ? null : message.map(x => x.toString())) : + message.toString(); + for (const listener of listeners.strings) { + listener(messageString, channelString); + } +}; diff --git a/server/node_modules/@redis/client/dist/lib/client/socket.d.ts b/server/node_modules/@redis/client/dist/lib/client/socket.d.ts new file mode 100644 index 0000000..e793807 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/client/socket.d.ts @@ -0,0 +1,52 @@ +/// +/// +/// +import { EventEmitter } from 'events'; +import * as net from 'net'; +import * as tls from 'tls'; +import { RedisCommandArguments } from '../commands'; +export interface RedisSocketCommonOptions { + /** + * Connection Timeout (in milliseconds) + */ + connectTimeout?: number; + /** + * Toggle [`Nagle's algorithm`](https://nodejs.org/api/net.html#net_socket_setnodelay_nodelay) + */ + noDelay?: boolean; + /** + * Toggle [`keep-alive`](https://nodejs.org/api/net.html#net_socket_setkeepalive_enable_initialdelay) + */ + keepAlive?: number | false; + /** + * When the socket closes unexpectedly (without calling `.quit()`/`.disconnect()`), the client uses `reconnectStrategy` to decide what to do. The following values are supported: + * 1. `false` -> do not reconnect, close the client and flush the command queue. + * 2. `number` -> wait for `X` milliseconds before reconnecting. + * 3. `(retries: number, cause: Error) => false | number | Error` -> `number` is the same as configuring a `number` directly, `Error` is the same as `false`, but with a custom error. + * Defaults to `retries => Math.min(retries * 50, 500)` + */ + reconnectStrategy?: false | number | ((retries: number, cause: Error) => false | Error | number); +} +type RedisNetSocketOptions = Partial & { + tls?: false; +}; +export interface RedisTlsSocketOptions extends tls.ConnectionOptions { + tls: true; +} +export type RedisSocketOptions = RedisSocketCommonOptions & (RedisNetSocketOptions | RedisTlsSocketOptions); +export type RedisSocketInitiator = () => Promise; +export default class RedisSocket extends EventEmitter { + #private; + get isOpen(): boolean; + get isReady(): boolean; + get writableNeedDrain(): boolean; + constructor(initiator: RedisSocketInitiator, options?: RedisSocketOptions); + connect(): Promise; + writeCommand(args: RedisCommandArguments): void; + disconnect(): void; + quit(fn: () => Promise): Promise; + cork(): void; + ref(): void; + unref(): void; +} +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/client/socket.js b/server/node_modules/@redis/client/dist/lib/client/socket.js new file mode 100644 index 0000000..3baa08b --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/client/socket.js @@ -0,0 +1,233 @@ +"use strict"; +var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; +}; +var _RedisSocket_instances, _a, _RedisSocket_initiateOptions, _RedisSocket_isTlsSocket, _RedisSocket_initiator, _RedisSocket_options, _RedisSocket_socket, _RedisSocket_isOpen, _RedisSocket_isReady, _RedisSocket_writableNeedDrain, _RedisSocket_isSocketUnrefed, _RedisSocket_reconnectStrategy, _RedisSocket_shouldReconnect, _RedisSocket_connect, _RedisSocket_createSocket, _RedisSocket_createNetSocket, _RedisSocket_createTlsSocket, _RedisSocket_onSocketError, _RedisSocket_disconnect, _RedisSocket_isCorked; +Object.defineProperty(exports, "__esModule", { value: true }); +const events_1 = require("events"); +const net = require("net"); +const tls = require("tls"); +const errors_1 = require("../errors"); +const utils_1 = require("../utils"); +class RedisSocket extends events_1.EventEmitter { + get isOpen() { + return __classPrivateFieldGet(this, _RedisSocket_isOpen, "f"); + } + get isReady() { + return __classPrivateFieldGet(this, _RedisSocket_isReady, "f"); + } + get writableNeedDrain() { + return __classPrivateFieldGet(this, _RedisSocket_writableNeedDrain, "f"); + } + constructor(initiator, options) { + super(); + _RedisSocket_instances.add(this); + _RedisSocket_initiator.set(this, void 0); + _RedisSocket_options.set(this, void 0); + _RedisSocket_socket.set(this, void 0); + _RedisSocket_isOpen.set(this, false); + _RedisSocket_isReady.set(this, false); + // `writable.writableNeedDrain` was added in v15.2.0 and therefore can't be used + // https://nodejs.org/api/stream.html#stream_writable_writableneeddrain + _RedisSocket_writableNeedDrain.set(this, false); + _RedisSocket_isSocketUnrefed.set(this, false); + _RedisSocket_isCorked.set(this, false); + __classPrivateFieldSet(this, _RedisSocket_initiator, initiator, "f"); + __classPrivateFieldSet(this, _RedisSocket_options, __classPrivateFieldGet(_a, _a, "m", _RedisSocket_initiateOptions).call(_a, options), "f"); + } + async connect() { + if (__classPrivateFieldGet(this, _RedisSocket_isOpen, "f")) { + throw new Error('Socket already opened'); + } + __classPrivateFieldSet(this, _RedisSocket_isOpen, true, "f"); + return __classPrivateFieldGet(this, _RedisSocket_instances, "m", _RedisSocket_connect).call(this); + } + writeCommand(args) { + if (!__classPrivateFieldGet(this, _RedisSocket_socket, "f")) { + throw new errors_1.ClientClosedError(); + } + for (const toWrite of args) { + __classPrivateFieldSet(this, _RedisSocket_writableNeedDrain, !__classPrivateFieldGet(this, _RedisSocket_socket, "f").write(toWrite), "f"); + } + } + disconnect() { + if (!__classPrivateFieldGet(this, _RedisSocket_isOpen, "f")) { + throw new errors_1.ClientClosedError(); + } + __classPrivateFieldSet(this, _RedisSocket_isOpen, false, "f"); + __classPrivateFieldGet(this, _RedisSocket_instances, "m", _RedisSocket_disconnect).call(this); + } + async quit(fn) { + if (!__classPrivateFieldGet(this, _RedisSocket_isOpen, "f")) { + throw new errors_1.ClientClosedError(); + } + __classPrivateFieldSet(this, _RedisSocket_isOpen, false, "f"); + const reply = await fn(); + __classPrivateFieldGet(this, _RedisSocket_instances, "m", _RedisSocket_disconnect).call(this); + return reply; + } + cork() { + if (!__classPrivateFieldGet(this, _RedisSocket_socket, "f") || __classPrivateFieldGet(this, _RedisSocket_isCorked, "f")) { + return; + } + __classPrivateFieldGet(this, _RedisSocket_socket, "f").cork(); + __classPrivateFieldSet(this, _RedisSocket_isCorked, true, "f"); + setImmediate(() => { + __classPrivateFieldGet(this, _RedisSocket_socket, "f")?.uncork(); + __classPrivateFieldSet(this, _RedisSocket_isCorked, false, "f"); + }); + } + ref() { + __classPrivateFieldSet(this, _RedisSocket_isSocketUnrefed, false, "f"); + __classPrivateFieldGet(this, _RedisSocket_socket, "f")?.ref(); + } + unref() { + __classPrivateFieldSet(this, _RedisSocket_isSocketUnrefed, true, "f"); + __classPrivateFieldGet(this, _RedisSocket_socket, "f")?.unref(); + } +} +_a = RedisSocket, _RedisSocket_initiator = new WeakMap(), _RedisSocket_options = new WeakMap(), _RedisSocket_socket = new WeakMap(), _RedisSocket_isOpen = new WeakMap(), _RedisSocket_isReady = new WeakMap(), _RedisSocket_writableNeedDrain = new WeakMap(), _RedisSocket_isSocketUnrefed = new WeakMap(), _RedisSocket_isCorked = new WeakMap(), _RedisSocket_instances = new WeakSet(), _RedisSocket_initiateOptions = function _RedisSocket_initiateOptions(options) { + var _b, _c; + options ?? (options = {}); + if (!options.path) { + (_b = options).port ?? (_b.port = 6379); + (_c = options).host ?? (_c.host = 'localhost'); + } + options.connectTimeout ?? (options.connectTimeout = 5000); + options.keepAlive ?? (options.keepAlive = 5000); + options.noDelay ?? (options.noDelay = true); + return options; +}, _RedisSocket_isTlsSocket = function _RedisSocket_isTlsSocket(options) { + return options.tls === true; +}, _RedisSocket_reconnectStrategy = function _RedisSocket_reconnectStrategy(retries, cause) { + if (__classPrivateFieldGet(this, _RedisSocket_options, "f").reconnectStrategy === false) { + return false; + } + else if (typeof __classPrivateFieldGet(this, _RedisSocket_options, "f").reconnectStrategy === 'number') { + return __classPrivateFieldGet(this, _RedisSocket_options, "f").reconnectStrategy; + } + else if (__classPrivateFieldGet(this, _RedisSocket_options, "f").reconnectStrategy) { + try { + const retryIn = __classPrivateFieldGet(this, _RedisSocket_options, "f").reconnectStrategy(retries, cause); + if (retryIn !== false && !(retryIn instanceof Error) && typeof retryIn !== 'number') { + throw new TypeError(`Reconnect strategy should return \`false | Error | number\`, got ${retryIn} instead`); + } + return retryIn; + } + catch (err) { + this.emit('error', err); + } + } + return Math.min(retries * 50, 500); +}, _RedisSocket_shouldReconnect = function _RedisSocket_shouldReconnect(retries, cause) { + const retryIn = __classPrivateFieldGet(this, _RedisSocket_instances, "m", _RedisSocket_reconnectStrategy).call(this, retries, cause); + if (retryIn === false) { + __classPrivateFieldSet(this, _RedisSocket_isOpen, false, "f"); + this.emit('error', cause); + return cause; + } + else if (retryIn instanceof Error) { + __classPrivateFieldSet(this, _RedisSocket_isOpen, false, "f"); + this.emit('error', cause); + return new errors_1.ReconnectStrategyError(retryIn, cause); + } + return retryIn; +}, _RedisSocket_connect = async function _RedisSocket_connect() { + let retries = 0; + do { + try { + __classPrivateFieldSet(this, _RedisSocket_socket, await __classPrivateFieldGet(this, _RedisSocket_instances, "m", _RedisSocket_createSocket).call(this), "f"); + __classPrivateFieldSet(this, _RedisSocket_writableNeedDrain, false, "f"); + this.emit('connect'); + try { + await __classPrivateFieldGet(this, _RedisSocket_initiator, "f").call(this); + } + catch (err) { + __classPrivateFieldGet(this, _RedisSocket_socket, "f").destroy(); + __classPrivateFieldSet(this, _RedisSocket_socket, undefined, "f"); + throw err; + } + __classPrivateFieldSet(this, _RedisSocket_isReady, true, "f"); + this.emit('ready'); + } + catch (err) { + const retryIn = __classPrivateFieldGet(this, _RedisSocket_instances, "m", _RedisSocket_shouldReconnect).call(this, retries++, err); + if (typeof retryIn !== 'number') { + throw retryIn; + } + this.emit('error', err); + await (0, utils_1.promiseTimeout)(retryIn); + this.emit('reconnecting'); + } + } while (__classPrivateFieldGet(this, _RedisSocket_isOpen, "f") && !__classPrivateFieldGet(this, _RedisSocket_isReady, "f")); +}, _RedisSocket_createSocket = function _RedisSocket_createSocket() { + return new Promise((resolve, reject) => { + const { connectEvent, socket } = __classPrivateFieldGet(_a, _a, "m", _RedisSocket_isTlsSocket).call(_a, __classPrivateFieldGet(this, _RedisSocket_options, "f")) ? + __classPrivateFieldGet(this, _RedisSocket_instances, "m", _RedisSocket_createTlsSocket).call(this) : + __classPrivateFieldGet(this, _RedisSocket_instances, "m", _RedisSocket_createNetSocket).call(this); + if (__classPrivateFieldGet(this, _RedisSocket_options, "f").connectTimeout) { + socket.setTimeout(__classPrivateFieldGet(this, _RedisSocket_options, "f").connectTimeout, () => socket.destroy(new errors_1.ConnectionTimeoutError())); + } + if (__classPrivateFieldGet(this, _RedisSocket_isSocketUnrefed, "f")) { + socket.unref(); + } + socket + .setNoDelay(__classPrivateFieldGet(this, _RedisSocket_options, "f").noDelay) + .once('error', reject) + .once(connectEvent, () => { + socket + .setTimeout(0) + // https://github.com/nodejs/node/issues/31663 + .setKeepAlive(__classPrivateFieldGet(this, _RedisSocket_options, "f").keepAlive !== false, __classPrivateFieldGet(this, _RedisSocket_options, "f").keepAlive || 0) + .off('error', reject) + .once('error', (err) => __classPrivateFieldGet(this, _RedisSocket_instances, "m", _RedisSocket_onSocketError).call(this, err)) + .once('close', hadError => { + if (!hadError && __classPrivateFieldGet(this, _RedisSocket_isOpen, "f") && __classPrivateFieldGet(this, _RedisSocket_socket, "f") === socket) { + __classPrivateFieldGet(this, _RedisSocket_instances, "m", _RedisSocket_onSocketError).call(this, new errors_1.SocketClosedUnexpectedlyError()); + } + }) + .on('drain', () => { + __classPrivateFieldSet(this, _RedisSocket_writableNeedDrain, false, "f"); + this.emit('drain'); + }) + .on('data', data => this.emit('data', data)); + resolve(socket); + }); + }); +}, _RedisSocket_createNetSocket = function _RedisSocket_createNetSocket() { + return { + connectEvent: 'connect', + socket: net.connect(__classPrivateFieldGet(this, _RedisSocket_options, "f")) // TODO + }; +}, _RedisSocket_createTlsSocket = function _RedisSocket_createTlsSocket() { + return { + connectEvent: 'secureConnect', + socket: tls.connect(__classPrivateFieldGet(this, _RedisSocket_options, "f")) // TODO + }; +}, _RedisSocket_onSocketError = function _RedisSocket_onSocketError(err) { + const wasReady = __classPrivateFieldGet(this, _RedisSocket_isReady, "f"); + __classPrivateFieldSet(this, _RedisSocket_isReady, false, "f"); + this.emit('error', err); + if (!wasReady || !__classPrivateFieldGet(this, _RedisSocket_isOpen, "f") || typeof __classPrivateFieldGet(this, _RedisSocket_instances, "m", _RedisSocket_shouldReconnect).call(this, 0, err) !== 'number') + return; + this.emit('reconnecting'); + __classPrivateFieldGet(this, _RedisSocket_instances, "m", _RedisSocket_connect).call(this).catch(() => { + // the error was already emitted, silently ignore it + }); +}, _RedisSocket_disconnect = function _RedisSocket_disconnect() { + __classPrivateFieldSet(this, _RedisSocket_isReady, false, "f"); + if (__classPrivateFieldGet(this, _RedisSocket_socket, "f")) { + __classPrivateFieldGet(this, _RedisSocket_socket, "f").destroy(); + __classPrivateFieldSet(this, _RedisSocket_socket, undefined, "f"); + } + this.emit('end'); +}; +exports.default = RedisSocket; diff --git a/server/node_modules/@redis/client/dist/lib/cluster/cluster-slots.d.ts b/server/node_modules/@redis/client/dist/lib/cluster/cluster-slots.d.ts new file mode 100644 index 0000000..1a2d153 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/cluster/cluster-slots.d.ts @@ -0,0 +1,60 @@ +/// +import { RedisClientType } from '../client'; +import { RedisClusterOptions } from '.'; +import { RedisCommandArgument, RedisFunctions, RedisModules, RedisScripts } from '../commands'; +import { ChannelListeners } from '../client/pub-sub'; +import { EventEmitter } from 'stream'; +interface NodeAddress { + host: string; + port: number; +} +export type NodeAddressMap = { + [address: string]: NodeAddress; +} | ((address: string) => NodeAddress | undefined); +type ValueOrPromise = T | Promise; +type ClientOrPromise = ValueOrPromise>; +export interface Node { + address: string; + client?: ClientOrPromise; +} +export interface ShardNode extends Node { + id: string; + host: string; + port: number; + readonly: boolean; +} +export interface MasterNode extends ShardNode { + pubSubClient?: ClientOrPromise; +} +export interface Shard { + master: MasterNode; + replicas?: Array>; + nodesIterator?: IterableIterator>; +} +export type PubSubNode = Required>; +export type OnShardedChannelMovedError = (err: unknown, channel: string, listeners?: ChannelListeners) => void; +export default class RedisClusterSlots { + #private; + slots: Shard[]; + shards: Shard[]; + masters: ShardNode[]; + replicas: ShardNode[]; + readonly nodeByAddress: Map | MasterNode>; + pubSubNode?: PubSubNode; + get isOpen(): boolean; + constructor(options: RedisClusterOptions, emit: EventEmitter['emit']); + connect(): Promise; + nodeClient(node: ShardNode): ClientOrPromise; + rediscover(startWith: RedisClientType): Promise; + quit(): Promise; + disconnect(): Promise; + getClient(firstKey: RedisCommandArgument | undefined, isReadonly: boolean | undefined): ClientOrPromise; + getRandomNode(): ShardNode; + getSlotRandomNode(slotNumber: number): ShardNode; + getMasterByAddress(address: string): ClientOrPromise | undefined; + getPubSubClient(): ClientOrPromise; + executeUnsubscribeCommand(unsubscribe: (client: RedisClientType) => Promise): Promise; + getShardedPubSubClient(channel: string): ClientOrPromise; + executeShardedUnsubscribeCommand(channel: string, unsubscribe: (client: RedisClientType) => Promise): Promise; +} +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/cluster/cluster-slots.js b/server/node_modules/@redis/client/dist/lib/cluster/cluster-slots.js new file mode 100644 index 0000000..2a3e133 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/cluster/cluster-slots.js @@ -0,0 +1,434 @@ +"use strict"; +var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; +}; +var _RedisClusterSlots_instances, _a, _RedisClusterSlots_SLOTS, _RedisClusterSlots_options, _RedisClusterSlots_Client, _RedisClusterSlots_emit, _RedisClusterSlots_isOpen, _RedisClusterSlots_discoverWithRootNodes, _RedisClusterSlots_resetSlots, _RedisClusterSlots_discover, _RedisClusterSlots_getShards, _RedisClusterSlots_getNodeAddress, _RedisClusterSlots_clientOptionsDefaults, _RedisClusterSlots_initiateSlotNode, _RedisClusterSlots_createClient, _RedisClusterSlots_createNodeClient, _RedisClusterSlots_runningRediscoverPromise, _RedisClusterSlots_rediscover, _RedisClusterSlots_destroy, _RedisClusterSlots_execOnNodeClient, _RedisClusterSlots_iterateAllNodes, _RedisClusterSlots_randomNodeIterator, _RedisClusterSlots_slotNodesIterator, _RedisClusterSlots_initiatePubSubClient, _RedisClusterSlots_initiateShardedPubSubClient; +Object.defineProperty(exports, "__esModule", { value: true }); +const client_1 = require("../client"); +const errors_1 = require("../errors"); +const util_1 = require("util"); +const pub_sub_1 = require("../client/pub-sub"); +// We need to use 'require', because it's not possible with Typescript to import +// function that are exported as 'module.exports = function`, without esModuleInterop +// set to true. +const calculateSlot = require('cluster-key-slot'); +class RedisClusterSlots { + get isOpen() { + return __classPrivateFieldGet(this, _RedisClusterSlots_isOpen, "f"); + } + constructor(options, emit) { + _RedisClusterSlots_instances.add(this); + _RedisClusterSlots_options.set(this, void 0); + _RedisClusterSlots_Client.set(this, void 0); + _RedisClusterSlots_emit.set(this, void 0); + Object.defineProperty(this, "slots", { + enumerable: true, + configurable: true, + writable: true, + value: new Array(__classPrivateFieldGet(_a, _a, "f", _RedisClusterSlots_SLOTS)) + }); + Object.defineProperty(this, "shards", { + enumerable: true, + configurable: true, + writable: true, + value: new Array() + }); + Object.defineProperty(this, "masters", { + enumerable: true, + configurable: true, + writable: true, + value: new Array() + }); + Object.defineProperty(this, "replicas", { + enumerable: true, + configurable: true, + writable: true, + value: new Array() + }); + Object.defineProperty(this, "nodeByAddress", { + enumerable: true, + configurable: true, + writable: true, + value: new Map() + }); + Object.defineProperty(this, "pubSubNode", { + enumerable: true, + configurable: true, + writable: true, + value: void 0 + }); + _RedisClusterSlots_isOpen.set(this, false); + _RedisClusterSlots_runningRediscoverPromise.set(this, void 0); + _RedisClusterSlots_randomNodeIterator.set(this, void 0); + __classPrivateFieldSet(this, _RedisClusterSlots_options, options, "f"); + __classPrivateFieldSet(this, _RedisClusterSlots_Client, client_1.default.extend(options), "f"); + __classPrivateFieldSet(this, _RedisClusterSlots_emit, emit, "f"); + } + async connect() { + if (__classPrivateFieldGet(this, _RedisClusterSlots_isOpen, "f")) { + throw new Error('Cluster already open'); + } + __classPrivateFieldSet(this, _RedisClusterSlots_isOpen, true, "f"); + try { + await __classPrivateFieldGet(this, _RedisClusterSlots_instances, "m", _RedisClusterSlots_discoverWithRootNodes).call(this); + } + catch (err) { + __classPrivateFieldSet(this, _RedisClusterSlots_isOpen, false, "f"); + throw err; + } + } + nodeClient(node) { + return node.client ?? __classPrivateFieldGet(this, _RedisClusterSlots_instances, "m", _RedisClusterSlots_createNodeClient).call(this, node); + } + async rediscover(startWith) { + __classPrivateFieldSet(this, _RedisClusterSlots_runningRediscoverPromise, __classPrivateFieldGet(this, _RedisClusterSlots_runningRediscoverPromise, "f") ?? __classPrivateFieldGet(this, _RedisClusterSlots_instances, "m", _RedisClusterSlots_rediscover).call(this, startWith) + .finally(() => __classPrivateFieldSet(this, _RedisClusterSlots_runningRediscoverPromise, undefined, "f")), "f"); + return __classPrivateFieldGet(this, _RedisClusterSlots_runningRediscoverPromise, "f"); + } + quit() { + return __classPrivateFieldGet(this, _RedisClusterSlots_instances, "m", _RedisClusterSlots_destroy).call(this, client => client.quit()); + } + disconnect() { + return __classPrivateFieldGet(this, _RedisClusterSlots_instances, "m", _RedisClusterSlots_destroy).call(this, client => client.disconnect()); + } + getClient(firstKey, isReadonly) { + if (!firstKey) { + return this.nodeClient(this.getRandomNode()); + } + const slotNumber = calculateSlot(firstKey); + if (!isReadonly) { + return this.nodeClient(this.slots[slotNumber].master); + } + return this.nodeClient(this.getSlotRandomNode(slotNumber)); + } + getRandomNode() { + __classPrivateFieldSet(this, _RedisClusterSlots_randomNodeIterator, __classPrivateFieldGet(this, _RedisClusterSlots_randomNodeIterator, "f") ?? __classPrivateFieldGet(this, _RedisClusterSlots_instances, "m", _RedisClusterSlots_iterateAllNodes).call(this), "f"); + return __classPrivateFieldGet(this, _RedisClusterSlots_randomNodeIterator, "f").next().value; + } + getSlotRandomNode(slotNumber) { + const slot = this.slots[slotNumber]; + if (!slot.replicas?.length) { + return slot.master; + } + slot.nodesIterator ?? (slot.nodesIterator = __classPrivateFieldGet(this, _RedisClusterSlots_instances, "m", _RedisClusterSlots_slotNodesIterator).call(this, slot)); + return slot.nodesIterator.next().value; + } + getMasterByAddress(address) { + const master = this.nodeByAddress.get(address); + if (!master) + return; + return this.nodeClient(master); + } + getPubSubClient() { + return this.pubSubNode ? + this.pubSubNode.client : + __classPrivateFieldGet(this, _RedisClusterSlots_instances, "m", _RedisClusterSlots_initiatePubSubClient).call(this); + } + async executeUnsubscribeCommand(unsubscribe) { + const client = await this.getPubSubClient(); + await unsubscribe(client); + if (!client.isPubSubActive && client.isOpen) { + await client.disconnect(); + this.pubSubNode = undefined; + } + } + getShardedPubSubClient(channel) { + const { master } = this.slots[calculateSlot(channel)]; + return master.pubSubClient ?? __classPrivateFieldGet(this, _RedisClusterSlots_instances, "m", _RedisClusterSlots_initiateShardedPubSubClient).call(this, master); + } + async executeShardedUnsubscribeCommand(channel, unsubscribe) { + const { master } = this.slots[calculateSlot(channel)]; + if (!master.pubSubClient) + return Promise.resolve(); + const client = await master.pubSubClient; + await unsubscribe(client); + if (!client.isPubSubActive && client.isOpen) { + await client.disconnect(); + master.pubSubClient = undefined; + } + } +} +_a = RedisClusterSlots, _RedisClusterSlots_options = new WeakMap(), _RedisClusterSlots_Client = new WeakMap(), _RedisClusterSlots_emit = new WeakMap(), _RedisClusterSlots_isOpen = new WeakMap(), _RedisClusterSlots_runningRediscoverPromise = new WeakMap(), _RedisClusterSlots_randomNodeIterator = new WeakMap(), _RedisClusterSlots_instances = new WeakSet(), _RedisClusterSlots_discoverWithRootNodes = async function _RedisClusterSlots_discoverWithRootNodes() { + let start = Math.floor(Math.random() * __classPrivateFieldGet(this, _RedisClusterSlots_options, "f").rootNodes.length); + for (let i = start; i < __classPrivateFieldGet(this, _RedisClusterSlots_options, "f").rootNodes.length; i++) { + if (await __classPrivateFieldGet(this, _RedisClusterSlots_instances, "m", _RedisClusterSlots_discover).call(this, __classPrivateFieldGet(this, _RedisClusterSlots_options, "f").rootNodes[i])) + return; + } + for (let i = 0; i < start; i++) { + if (await __classPrivateFieldGet(this, _RedisClusterSlots_instances, "m", _RedisClusterSlots_discover).call(this, __classPrivateFieldGet(this, _RedisClusterSlots_options, "f").rootNodes[i])) + return; + } + throw new errors_1.RootNodesUnavailableError(); +}, _RedisClusterSlots_resetSlots = function _RedisClusterSlots_resetSlots() { + this.slots = new Array(__classPrivateFieldGet(_a, _a, "f", _RedisClusterSlots_SLOTS)); + this.shards = []; + this.masters = []; + this.replicas = []; + __classPrivateFieldSet(this, _RedisClusterSlots_randomNodeIterator, undefined, "f"); +}, _RedisClusterSlots_discover = async function _RedisClusterSlots_discover(rootNode) { + const addressesInUse = new Set(); + try { + const shards = await __classPrivateFieldGet(this, _RedisClusterSlots_instances, "m", _RedisClusterSlots_getShards).call(this, rootNode), promises = [], eagerConnect = __classPrivateFieldGet(this, _RedisClusterSlots_options, "f").minimizeConnections !== true; + __classPrivateFieldGet(this, _RedisClusterSlots_instances, "m", _RedisClusterSlots_resetSlots).call(this); + for (const { from, to, master, replicas } of shards) { + const shard = { + master: __classPrivateFieldGet(this, _RedisClusterSlots_instances, "m", _RedisClusterSlots_initiateSlotNode).call(this, master, false, eagerConnect, addressesInUse, promises) + }; + if (__classPrivateFieldGet(this, _RedisClusterSlots_options, "f").useReplicas) { + shard.replicas = replicas.map(replica => __classPrivateFieldGet(this, _RedisClusterSlots_instances, "m", _RedisClusterSlots_initiateSlotNode).call(this, replica, true, eagerConnect, addressesInUse, promises)); + } + this.shards.push(shard); + for (let i = from; i <= to; i++) { + this.slots[i] = shard; + } + } + if (this.pubSubNode && !addressesInUse.has(this.pubSubNode.address)) { + if (util_1.types.isPromise(this.pubSubNode.client)) { + promises.push(this.pubSubNode.client.then(client => client.disconnect())); + this.pubSubNode = undefined; + } + else { + promises.push(this.pubSubNode.client.disconnect()); + const channelsListeners = this.pubSubNode.client.getPubSubListeners(pub_sub_1.PubSubType.CHANNELS), patternsListeners = this.pubSubNode.client.getPubSubListeners(pub_sub_1.PubSubType.PATTERNS); + if (channelsListeners.size || patternsListeners.size) { + promises.push(__classPrivateFieldGet(this, _RedisClusterSlots_instances, "m", _RedisClusterSlots_initiatePubSubClient).call(this, { + [pub_sub_1.PubSubType.CHANNELS]: channelsListeners, + [pub_sub_1.PubSubType.PATTERNS]: patternsListeners + })); + } + } + } + for (const [address, node] of this.nodeByAddress.entries()) { + if (addressesInUse.has(address)) + continue; + if (node.client) { + promises.push(__classPrivateFieldGet(this, _RedisClusterSlots_instances, "m", _RedisClusterSlots_execOnNodeClient).call(this, node.client, client => client.disconnect())); + } + const { pubSubClient } = node; + if (pubSubClient) { + promises.push(__classPrivateFieldGet(this, _RedisClusterSlots_instances, "m", _RedisClusterSlots_execOnNodeClient).call(this, pubSubClient, client => client.disconnect())); + } + this.nodeByAddress.delete(address); + } + await Promise.all(promises); + return true; + } + catch (err) { + __classPrivateFieldGet(this, _RedisClusterSlots_emit, "f").call(this, 'error', err); + return false; + } +}, _RedisClusterSlots_getShards = async function _RedisClusterSlots_getShards(rootNode) { + const client = new (__classPrivateFieldGet(this, _RedisClusterSlots_Client, "f"))(__classPrivateFieldGet(this, _RedisClusterSlots_instances, "m", _RedisClusterSlots_clientOptionsDefaults).call(this, rootNode, true)); + client.on('error', err => __classPrivateFieldGet(this, _RedisClusterSlots_emit, "f").call(this, 'error', err)); + await client.connect(); + try { + // using `CLUSTER SLOTS` and not `CLUSTER SHARDS` to support older versions + return await client.clusterSlots(); + } + finally { + await client.disconnect(); + } +}, _RedisClusterSlots_getNodeAddress = function _RedisClusterSlots_getNodeAddress(address) { + switch (typeof __classPrivateFieldGet(this, _RedisClusterSlots_options, "f").nodeAddressMap) { + case 'object': + return __classPrivateFieldGet(this, _RedisClusterSlots_options, "f").nodeAddressMap[address]; + case 'function': + return __classPrivateFieldGet(this, _RedisClusterSlots_options, "f").nodeAddressMap(address); + } +}, _RedisClusterSlots_clientOptionsDefaults = function _RedisClusterSlots_clientOptionsDefaults(options, disableReconnect) { + let result; + if (__classPrivateFieldGet(this, _RedisClusterSlots_options, "f").defaults) { + let socket; + if (__classPrivateFieldGet(this, _RedisClusterSlots_options, "f").defaults.socket) { + socket = { + ...__classPrivateFieldGet(this, _RedisClusterSlots_options, "f").defaults.socket, + ...options?.socket + }; + } + else { + socket = options?.socket; + } + result = { + ...__classPrivateFieldGet(this, _RedisClusterSlots_options, "f").defaults, + ...options, + socket + }; + } + else { + result = options; + } + if (disableReconnect) { + result ?? (result = {}); + result.socket ?? (result.socket = {}); + result.socket.reconnectStrategy = false; + } + return result; +}, _RedisClusterSlots_initiateSlotNode = function _RedisClusterSlots_initiateSlotNode({ id, ip, port }, readonly, eagerConnent, addressesInUse, promises) { + const address = `${ip}:${port}`; + addressesInUse.add(address); + let node = this.nodeByAddress.get(address); + if (!node) { + node = { + id, + host: ip, + port, + address, + readonly, + client: undefined + }; + if (eagerConnent) { + promises.push(__classPrivateFieldGet(this, _RedisClusterSlots_instances, "m", _RedisClusterSlots_createNodeClient).call(this, node)); + } + this.nodeByAddress.set(address, node); + } + (readonly ? this.replicas : this.masters).push(node); + return node; +}, _RedisClusterSlots_createClient = async function _RedisClusterSlots_createClient(node, readonly = node.readonly) { + const client = new (__classPrivateFieldGet(this, _RedisClusterSlots_Client, "f"))(__classPrivateFieldGet(this, _RedisClusterSlots_instances, "m", _RedisClusterSlots_clientOptionsDefaults).call(this, { + socket: __classPrivateFieldGet(this, _RedisClusterSlots_instances, "m", _RedisClusterSlots_getNodeAddress).call(this, node.address) ?? { + host: node.host, + port: node.port + }, + readonly + })); + client.on('error', err => __classPrivateFieldGet(this, _RedisClusterSlots_emit, "f").call(this, 'error', err)); + await client.connect(); + return client; +}, _RedisClusterSlots_createNodeClient = function _RedisClusterSlots_createNodeClient(node) { + const promise = __classPrivateFieldGet(this, _RedisClusterSlots_instances, "m", _RedisClusterSlots_createClient).call(this, node) + .then(client => { + node.client = client; + return client; + }) + .catch(err => { + node.client = undefined; + throw err; + }); + node.client = promise; + return promise; +}, _RedisClusterSlots_rediscover = async function _RedisClusterSlots_rediscover(startWith) { + if (await __classPrivateFieldGet(this, _RedisClusterSlots_instances, "m", _RedisClusterSlots_discover).call(this, startWith.options)) + return; + return __classPrivateFieldGet(this, _RedisClusterSlots_instances, "m", _RedisClusterSlots_discoverWithRootNodes).call(this); +}, _RedisClusterSlots_destroy = async function _RedisClusterSlots_destroy(fn) { + __classPrivateFieldSet(this, _RedisClusterSlots_isOpen, false, "f"); + const promises = []; + for (const { master, replicas } of this.shards) { + if (master.client) { + promises.push(__classPrivateFieldGet(this, _RedisClusterSlots_instances, "m", _RedisClusterSlots_execOnNodeClient).call(this, master.client, fn)); + } + if (master.pubSubClient) { + promises.push(__classPrivateFieldGet(this, _RedisClusterSlots_instances, "m", _RedisClusterSlots_execOnNodeClient).call(this, master.pubSubClient, fn)); + } + if (replicas) { + for (const { client } of replicas) { + if (client) { + promises.push(__classPrivateFieldGet(this, _RedisClusterSlots_instances, "m", _RedisClusterSlots_execOnNodeClient).call(this, client, fn)); + } + } + } + } + if (this.pubSubNode) { + promises.push(__classPrivateFieldGet(this, _RedisClusterSlots_instances, "m", _RedisClusterSlots_execOnNodeClient).call(this, this.pubSubNode.client, fn)); + this.pubSubNode = undefined; + } + __classPrivateFieldGet(this, _RedisClusterSlots_instances, "m", _RedisClusterSlots_resetSlots).call(this); + this.nodeByAddress.clear(); + await Promise.allSettled(promises); +}, _RedisClusterSlots_execOnNodeClient = function _RedisClusterSlots_execOnNodeClient(client, fn) { + return util_1.types.isPromise(client) ? + client.then(fn) : + fn(client); +}, _RedisClusterSlots_iterateAllNodes = function* _RedisClusterSlots_iterateAllNodes() { + let i = Math.floor(Math.random() * (this.masters.length + this.replicas.length)); + if (i < this.masters.length) { + do { + yield this.masters[i]; + } while (++i < this.masters.length); + for (const replica of this.replicas) { + yield replica; + } + } + else { + i -= this.masters.length; + do { + yield this.replicas[i]; + } while (++i < this.replicas.length); + } + while (true) { + for (const master of this.masters) { + yield master; + } + for (const replica of this.replicas) { + yield replica; + } + } +}, _RedisClusterSlots_slotNodesIterator = function* _RedisClusterSlots_slotNodesIterator(slot) { + let i = Math.floor(Math.random() * (1 + slot.replicas.length)); + if (i < slot.replicas.length) { + do { + yield slot.replicas[i]; + } while (++i < slot.replicas.length); + } + while (true) { + yield slot.master; + for (const replica of slot.replicas) { + yield replica; + } + } +}, _RedisClusterSlots_initiatePubSubClient = async function _RedisClusterSlots_initiatePubSubClient(toResubscribe) { + const index = Math.floor(Math.random() * (this.masters.length + this.replicas.length)), node = index < this.masters.length ? + this.masters[index] : + this.replicas[index - this.masters.length]; + this.pubSubNode = { + address: node.address, + client: __classPrivateFieldGet(this, _RedisClusterSlots_instances, "m", _RedisClusterSlots_createClient).call(this, node, true) + .then(async (client) => { + if (toResubscribe) { + await Promise.all([ + client.extendPubSubListeners(pub_sub_1.PubSubType.CHANNELS, toResubscribe[pub_sub_1.PubSubType.CHANNELS]), + client.extendPubSubListeners(pub_sub_1.PubSubType.PATTERNS, toResubscribe[pub_sub_1.PubSubType.PATTERNS]) + ]); + } + this.pubSubNode.client = client; + return client; + }) + .catch(err => { + this.pubSubNode = undefined; + throw err; + }) + }; + return this.pubSubNode.client; +}, _RedisClusterSlots_initiateShardedPubSubClient = function _RedisClusterSlots_initiateShardedPubSubClient(master) { + const promise = __classPrivateFieldGet(this, _RedisClusterSlots_instances, "m", _RedisClusterSlots_createClient).call(this, master, true) + .then(client => { + client.on('server-sunsubscribe', async (channel, listeners) => { + try { + await this.rediscover(client); + const redirectTo = await this.getShardedPubSubClient(channel); + redirectTo.extendPubSubChannelListeners(pub_sub_1.PubSubType.SHARDED, channel, listeners); + } + catch (err) { + __classPrivateFieldGet(this, _RedisClusterSlots_emit, "f").call(this, 'sharded-shannel-moved-error', err, channel, listeners); + } + }); + master.pubSubClient = client; + return client; + }) + .catch(err => { + master.pubSubClient = undefined; + throw err; + }); + master.pubSubClient = promise; + return promise; +}; +_RedisClusterSlots_SLOTS = { value: 16384 }; +exports.default = RedisClusterSlots; diff --git a/server/node_modules/@redis/client/dist/lib/cluster/commands.d.ts b/server/node_modules/@redis/client/dist/lib/cluster/commands.d.ts new file mode 100644 index 0000000..a07f0d4 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/cluster/commands.d.ts @@ -0,0 +1,669 @@ +import * as APPEND from '../commands/APPEND'; +import * as BITCOUNT from '../commands/BITCOUNT'; +import * as BITFIELD_RO from '../commands/BITFIELD_RO'; +import * as BITFIELD from '../commands/BITFIELD'; +import * as BITOP from '../commands/BITOP'; +import * as BITPOS from '../commands/BITPOS'; +import * as BLMOVE from '../commands/BLMOVE'; +import * as BLMPOP from '../commands/BLMPOP'; +import * as BLPOP from '../commands/BLPOP'; +import * as BRPOP from '../commands/BRPOP'; +import * as BRPOPLPUSH from '../commands/BRPOPLPUSH'; +import * as BZMPOP from '../commands/BZMPOP'; +import * as BZPOPMAX from '../commands/BZPOPMAX'; +import * as BZPOPMIN from '../commands/BZPOPMIN'; +import * as COPY from '../commands/COPY'; +import * as DECR from '../commands/DECR'; +import * as DECRBY from '../commands/DECRBY'; +import * as DEL from '../commands/DEL'; +import * as DUMP from '../commands/DUMP'; +import * as EVAL_RO from '../commands/EVAL_RO'; +import * as EVAL from '../commands/EVAL'; +import * as EVALSHA_RO from '../commands/EVALSHA_RO'; +import * as EVALSHA from '../commands/EVALSHA'; +import * as EXISTS from '../commands/EXISTS'; +import * as EXPIRE from '../commands/EXPIRE'; +import * as EXPIREAT from '../commands/EXPIREAT'; +import * as EXPIRETIME from '../commands/EXPIRETIME'; +import * as FCALL_RO from '../commands/FCALL_RO'; +import * as FCALL from '../commands/FCALL'; +import * as GEOADD from '../commands/GEOADD'; +import * as GEODIST from '../commands/GEODIST'; +import * as GEOHASH from '../commands/GEOHASH'; +import * as GEOPOS from '../commands/GEOPOS'; +import * as GEORADIUS_RO_WITH from '../commands/GEORADIUS_RO_WITH'; +import * as GEORADIUS_RO from '../commands/GEORADIUS_RO'; +import * as GEORADIUS_WITH from '../commands/GEORADIUS_WITH'; +import * as GEORADIUS from '../commands/GEORADIUS'; +import * as GEORADIUSBYMEMBER_RO_WITH from '../commands/GEORADIUSBYMEMBER_RO_WITH'; +import * as GEORADIUSBYMEMBER_RO from '../commands/GEORADIUSBYMEMBER_RO'; +import * as GEORADIUSBYMEMBER_WITH from '../commands/GEORADIUSBYMEMBER_WITH'; +import * as GEORADIUSBYMEMBER from '../commands/GEORADIUSBYMEMBER'; +import * as GEORADIUSBYMEMBERSTORE from '../commands/GEORADIUSBYMEMBERSTORE'; +import * as GEORADIUSSTORE from '../commands/GEORADIUSSTORE'; +import * as GEOSEARCH_WITH from '../commands/GEOSEARCH_WITH'; +import * as GEOSEARCH from '../commands/GEOSEARCH'; +import * as GEOSEARCHSTORE from '../commands/GEOSEARCHSTORE'; +import * as GET from '../commands/GET'; +import * as GETBIT from '../commands/GETBIT'; +import * as GETDEL from '../commands/GETDEL'; +import * as GETEX from '../commands/GETEX'; +import * as GETRANGE from '../commands/GETRANGE'; +import * as GETSET from '../commands/GETSET'; +import * as HDEL from '../commands/HDEL'; +import * as HEXISTS from '../commands/HEXISTS'; +import * as HEXPIRE from '../commands/HEXPIRE'; +import * as HEXPIREAT from '../commands/HEXPIREAT'; +import * as HEXPIRETIME from '../commands/HEXPIRETIME'; +import * as HGET from '../commands/HGET'; +import * as HGETALL from '../commands/HGETALL'; +import * as HINCRBY from '../commands/HINCRBY'; +import * as HINCRBYFLOAT from '../commands/HINCRBYFLOAT'; +import * as HKEYS from '../commands/HKEYS'; +import * as HLEN from '../commands/HLEN'; +import * as HMGET from '../commands/HMGET'; +import * as HPERSIST from '../commands/HPERSIST'; +import * as HPEXPIRE from '../commands/HPEXPIRE'; +import * as HPEXPIREAT from '../commands/HPEXPIREAT'; +import * as HPEXPIRETIME from '../commands/HPEXPIRETIME'; +import * as HPTTL from '../commands/HPTTL'; +import * as HRANDFIELD_COUNT_WITHVALUES from '../commands/HRANDFIELD_COUNT_WITHVALUES'; +import * as HRANDFIELD_COUNT from '../commands/HRANDFIELD_COUNT'; +import * as HRANDFIELD from '../commands/HRANDFIELD'; +import * as HSCAN from '../commands/HSCAN'; +import * as HSCAN_NOVALUES from '../commands/HSCAN_NOVALUES'; +import * as HSET from '../commands/HSET'; +import * as HSETNX from '../commands/HSETNX'; +import * as HSTRLEN from '../commands/HSTRLEN'; +import * as HTTL from '../commands/HTTL'; +import * as HVALS from '../commands/HVALS'; +import * as INCR from '../commands/INCR'; +import * as INCRBY from '../commands/INCRBY'; +import * as INCRBYFLOAT from '../commands/INCRBYFLOAT'; +import * as LCS_IDX_WITHMATCHLEN from '../commands/LCS_IDX_WITHMATCHLEN'; +import * as LCS_IDX from '../commands/LCS_IDX'; +import * as LCS_LEN from '../commands/LCS_LEN'; +import * as LCS from '../commands/LCS'; +import * as LINDEX from '../commands/LINDEX'; +import * as LINSERT from '../commands/LINSERT'; +import * as LLEN from '../commands/LLEN'; +import * as LMOVE from '../commands/LMOVE'; +import * as LMPOP from '../commands/LMPOP'; +import * as LPOP_COUNT from '../commands/LPOP_COUNT'; +import * as LPOP from '../commands/LPOP'; +import * as LPOS_COUNT from '../commands/LPOS_COUNT'; +import * as LPOS from '../commands/LPOS'; +import * as LPUSH from '../commands/LPUSH'; +import * as LPUSHX from '../commands/LPUSHX'; +import * as LRANGE from '../commands/LRANGE'; +import * as LREM from '../commands/LREM'; +import * as LSET from '../commands/LSET'; +import * as LTRIM from '../commands/LTRIM'; +import * as MGET from '../commands/MGET'; +import * as MIGRATE from '../commands/MIGRATE'; +import * as MSET from '../commands/MSET'; +import * as MSETNX from '../commands/MSETNX'; +import * as OBJECT_ENCODING from '../commands/OBJECT_ENCODING'; +import * as OBJECT_FREQ from '../commands/OBJECT_FREQ'; +import * as OBJECT_IDLETIME from '../commands/OBJECT_IDLETIME'; +import * as OBJECT_REFCOUNT from '../commands/OBJECT_REFCOUNT'; +import * as PERSIST from '../commands/PERSIST'; +import * as PEXPIRE from '../commands/PEXPIRE'; +import * as PEXPIREAT from '../commands/PEXPIREAT'; +import * as PEXPIRETIME from '../commands/PEXPIRETIME'; +import * as PFADD from '../commands/PFADD'; +import * as PFCOUNT from '../commands/PFCOUNT'; +import * as PFMERGE from '../commands/PFMERGE'; +import * as PSETEX from '../commands/PSETEX'; +import * as PTTL from '../commands/PTTL'; +import * as PUBLISH from '../commands/PUBLISH'; +import * as RENAME from '../commands/RENAME'; +import * as RENAMENX from '../commands/RENAMENX'; +import * as RESTORE from '../commands/RESTORE'; +import * as RPOP_COUNT from '../commands/RPOP_COUNT'; +import * as RPOP from '../commands/RPOP'; +import * as RPOPLPUSH from '../commands/RPOPLPUSH'; +import * as RPUSH from '../commands/RPUSH'; +import * as RPUSHX from '../commands/RPUSHX'; +import * as SADD from '../commands/SADD'; +import * as SCARD from '../commands/SCARD'; +import * as SDIFF from '../commands/SDIFF'; +import * as SDIFFSTORE from '../commands/SDIFFSTORE'; +import * as SET from '../commands/SET'; +import * as SETBIT from '../commands/SETBIT'; +import * as SETEX from '../commands/SETEX'; +import * as SETNX from '../commands/SETNX'; +import * as SETRANGE from '../commands/SETRANGE'; +import * as SINTER from '../commands/SINTER'; +import * as SINTERCARD from '../commands/SINTERCARD'; +import * as SINTERSTORE from '../commands/SINTERSTORE'; +import * as SISMEMBER from '../commands/SISMEMBER'; +import * as SMEMBERS from '../commands/SMEMBERS'; +import * as SMISMEMBER from '../commands/SMISMEMBER'; +import * as SMOVE from '../commands/SMOVE'; +import * as SORT_RO from '../commands/SORT_RO'; +import * as SORT_STORE from '../commands/SORT_STORE'; +import * as SORT from '../commands/SORT'; +import * as SPOP from '../commands/SPOP'; +import * as SPUBLISH from '../commands/SPUBLISH'; +import * as SRANDMEMBER_COUNT from '../commands/SRANDMEMBER_COUNT'; +import * as SRANDMEMBER from '../commands/SRANDMEMBER'; +import * as SREM from '../commands/SREM'; +import * as SSCAN from '../commands/SSCAN'; +import * as STRLEN from '../commands/STRLEN'; +import * as SUNION from '../commands/SUNION'; +import * as SUNIONSTORE from '../commands/SUNIONSTORE'; +import * as TOUCH from '../commands/TOUCH'; +import * as TTL from '../commands/TTL'; +import * as TYPE from '../commands/TYPE'; +import * as UNLINK from '../commands/UNLINK'; +import * as WATCH from '../commands/WATCH'; +import * as XACK from '../commands/XACK'; +import * as XADD from '../commands/XADD'; +import * as XAUTOCLAIM_JUSTID from '../commands/XAUTOCLAIM_JUSTID'; +import * as XAUTOCLAIM from '../commands/XAUTOCLAIM'; +import * as XCLAIM_JUSTID from '../commands/XCLAIM_JUSTID'; +import * as XCLAIM from '../commands/XCLAIM'; +import * as XDEL from '../commands/XDEL'; +import * as XGROUP_CREATE from '../commands/XGROUP_CREATE'; +import * as XGROUP_CREATECONSUMER from '../commands/XGROUP_CREATECONSUMER'; +import * as XGROUP_DELCONSUMER from '../commands/XGROUP_DELCONSUMER'; +import * as XGROUP_DESTROY from '../commands/XGROUP_DESTROY'; +import * as XGROUP_SETID from '../commands/XGROUP_SETID'; +import * as XINFO_CONSUMERS from '../commands/XINFO_CONSUMERS'; +import * as XINFO_GROUPS from '../commands/XINFO_GROUPS'; +import * as XINFO_STREAM from '../commands/XINFO_STREAM'; +import * as XLEN from '../commands/XLEN'; +import * as XPENDING_RANGE from '../commands/XPENDING_RANGE'; +import * as XPENDING from '../commands/XPENDING'; +import * as XRANGE from '../commands/XRANGE'; +import * as XREAD from '../commands/XREAD'; +import * as XREADGROUP from '../commands/XREADGROUP'; +import * as XREVRANGE from '../commands/XREVRANGE'; +import * as XSETID from '../commands/XSETID'; +import * as XTRIM from '../commands/XTRIM'; +import * as ZADD from '../commands/ZADD'; +import * as ZCARD from '../commands/ZCARD'; +import * as ZCOUNT from '../commands/ZCOUNT'; +import * as ZDIFF_WITHSCORES from '../commands/ZDIFF_WITHSCORES'; +import * as ZDIFF from '../commands/ZDIFF'; +import * as ZDIFFSTORE from '../commands/ZDIFFSTORE'; +import * as ZINCRBY from '../commands/ZINCRBY'; +import * as ZINTER_WITHSCORES from '../commands/ZINTER_WITHSCORES'; +import * as ZINTER from '../commands/ZINTER'; +import * as ZINTERCARD from '../commands/ZINTERCARD'; +import * as ZINTERSTORE from '../commands/ZINTERSTORE'; +import * as ZLEXCOUNT from '../commands/ZLEXCOUNT'; +import * as ZMPOP from '../commands/ZMPOP'; +import * as ZMSCORE from '../commands/ZMSCORE'; +import * as ZPOPMAX_COUNT from '../commands/ZPOPMAX_COUNT'; +import * as ZPOPMAX from '../commands/ZPOPMAX'; +import * as ZPOPMIN_COUNT from '../commands/ZPOPMIN_COUNT'; +import * as ZPOPMIN from '../commands/ZPOPMIN'; +import * as ZRANDMEMBER_COUNT_WITHSCORES from '../commands/ZRANDMEMBER_COUNT_WITHSCORES'; +import * as ZRANDMEMBER_COUNT from '../commands/ZRANDMEMBER_COUNT'; +import * as ZRANDMEMBER from '../commands/ZRANDMEMBER'; +import * as ZRANGE_WITHSCORES from '../commands/ZRANGE_WITHSCORES'; +import * as ZRANGE from '../commands/ZRANGE'; +import * as ZRANGEBYLEX from '../commands/ZRANGEBYLEX'; +import * as ZRANGEBYSCORE_WITHSCORES from '../commands/ZRANGEBYSCORE_WITHSCORES'; +import * as ZRANGEBYSCORE from '../commands/ZRANGEBYSCORE'; +import * as ZRANGESTORE from '../commands/ZRANGESTORE'; +import * as ZRANK from '../commands/ZRANK'; +import * as ZREM from '../commands/ZREM'; +import * as ZREMRANGEBYLEX from '../commands/ZREMRANGEBYLEX'; +import * as ZREMRANGEBYRANK from '../commands/ZREMRANGEBYRANK'; +import * as ZREMRANGEBYSCORE from '../commands/ZREMRANGEBYSCORE'; +import * as ZREVRANK from '../commands/ZREVRANK'; +import * as ZSCAN from '../commands/ZSCAN'; +import * as ZSCORE from '../commands/ZSCORE'; +import * as ZUNION_WITHSCORES from '../commands/ZUNION_WITHSCORES'; +import * as ZUNION from '../commands/ZUNION'; +import * as ZUNIONSTORE from '../commands/ZUNIONSTORE'; +declare const _default: { + APPEND: typeof APPEND; + append: typeof APPEND; + BITCOUNT: typeof BITCOUNT; + bitCount: typeof BITCOUNT; + BITFIELD_RO: typeof BITFIELD_RO; + bitFieldRo: typeof BITFIELD_RO; + BITFIELD: typeof BITFIELD; + bitField: typeof BITFIELD; + BITOP: typeof BITOP; + bitOp: typeof BITOP; + BITPOS: typeof BITPOS; + bitPos: typeof BITPOS; + BLMOVE: typeof BLMOVE; + blMove: typeof BLMOVE; + BLMPOP: typeof BLMPOP; + blmPop: typeof BLMPOP; + BLPOP: typeof BLPOP; + blPop: typeof BLPOP; + BRPOP: typeof BRPOP; + brPop: typeof BRPOP; + BRPOPLPUSH: typeof BRPOPLPUSH; + brPopLPush: typeof BRPOPLPUSH; + BZMPOP: typeof BZMPOP; + bzmPop: typeof BZMPOP; + BZPOPMAX: typeof BZPOPMAX; + bzPopMax: typeof BZPOPMAX; + BZPOPMIN: typeof BZPOPMIN; + bzPopMin: typeof BZPOPMIN; + COPY: typeof COPY; + copy: typeof COPY; + DECR: typeof DECR; + decr: typeof DECR; + DECRBY: typeof DECRBY; + decrBy: typeof DECRBY; + DEL: typeof DEL; + del: typeof DEL; + DUMP: typeof DUMP; + dump: typeof DUMP; + EVAL_RO: typeof EVAL_RO; + evalRo: typeof EVAL_RO; + EVAL: typeof EVAL; + eval: typeof EVAL; + EVALSHA: typeof EVALSHA; + evalSha: typeof EVALSHA; + EVALSHA_RO: typeof EVALSHA_RO; + evalShaRo: typeof EVALSHA_RO; + EXISTS: typeof EXISTS; + exists: typeof EXISTS; + EXPIRE: typeof EXPIRE; + expire: typeof EXPIRE; + EXPIREAT: typeof EXPIREAT; + expireAt: typeof EXPIREAT; + EXPIRETIME: typeof EXPIRETIME; + expireTime: typeof EXPIRETIME; + FCALL_RO: typeof FCALL_RO; + fCallRo: typeof FCALL_RO; + FCALL: typeof FCALL; + fCall: typeof FCALL; + GEOADD: typeof GEOADD; + geoAdd: typeof GEOADD; + GEODIST: typeof GEODIST; + geoDist: typeof GEODIST; + GEOHASH: typeof GEOHASH; + geoHash: typeof GEOHASH; + GEOPOS: typeof GEOPOS; + geoPos: typeof GEOPOS; + GEORADIUS_RO_WITH: typeof GEORADIUS_RO_WITH; + geoRadiusRoWith: typeof GEORADIUS_RO_WITH; + GEORADIUS_RO: typeof GEORADIUS_RO; + geoRadiusRo: typeof GEORADIUS_RO; + GEORADIUS_WITH: typeof GEORADIUS_WITH; + geoRadiusWith: typeof GEORADIUS_WITH; + GEORADIUS: typeof GEORADIUS; + geoRadius: typeof GEORADIUS; + GEORADIUSBYMEMBER_RO_WITH: typeof GEORADIUSBYMEMBER_RO_WITH; + geoRadiusByMemberRoWith: typeof GEORADIUSBYMEMBER_RO_WITH; + GEORADIUSBYMEMBER_RO: typeof GEORADIUSBYMEMBER_RO; + geoRadiusByMemberRo: typeof GEORADIUSBYMEMBER_RO; + GEORADIUSBYMEMBER_WITH: typeof GEORADIUSBYMEMBER_WITH; + geoRadiusByMemberWith: typeof GEORADIUSBYMEMBER_WITH; + GEORADIUSBYMEMBER: typeof GEORADIUSBYMEMBER; + geoRadiusByMember: typeof GEORADIUSBYMEMBER; + GEORADIUSBYMEMBERSTORE: typeof GEORADIUSBYMEMBERSTORE; + geoRadiusByMemberStore: typeof GEORADIUSBYMEMBERSTORE; + GEORADIUSSTORE: typeof GEORADIUSSTORE; + geoRadiusStore: typeof GEORADIUSSTORE; + GEOSEARCH_WITH: typeof GEOSEARCH_WITH; + geoSearchWith: typeof GEOSEARCH_WITH; + GEOSEARCH: typeof GEOSEARCH; + geoSearch: typeof GEOSEARCH; + GEOSEARCHSTORE: typeof GEOSEARCHSTORE; + geoSearchStore: typeof GEOSEARCHSTORE; + GET: typeof GET; + get: typeof GET; + GETBIT: typeof GETBIT; + getBit: typeof GETBIT; + GETDEL: typeof GETDEL; + getDel: typeof GETDEL; + GETEX: typeof GETEX; + getEx: typeof GETEX; + GETRANGE: typeof GETRANGE; + getRange: typeof GETRANGE; + GETSET: typeof GETSET; + getSet: typeof GETSET; + HDEL: typeof HDEL; + hDel: typeof HDEL; + HEXISTS: typeof HEXISTS; + hExists: typeof HEXISTS; + HEXPIRE: typeof HEXPIRE; + hExpire: typeof HEXPIRE; + HEXPIREAT: typeof HEXPIREAT; + hExpireAt: typeof HEXPIREAT; + HEXPIRETIME: typeof HEXPIRETIME; + hExpireTime: typeof HEXPIRETIME; + HGET: typeof HGET; + hGet: typeof HGET; + HGETALL: typeof HGETALL; + hGetAll: typeof HGETALL; + HINCRBY: typeof HINCRBY; + hIncrBy: typeof HINCRBY; + HINCRBYFLOAT: typeof HINCRBYFLOAT; + hIncrByFloat: typeof HINCRBYFLOAT; + HKEYS: typeof HKEYS; + hKeys: typeof HKEYS; + HLEN: typeof HLEN; + hLen: typeof HLEN; + HMGET: typeof HMGET; + hmGet: typeof HMGET; + HPERSIST: typeof HPERSIST; + hPersist: typeof HPERSIST; + HPEXPIRE: typeof HPEXPIRE; + hpExpire: typeof HPEXPIRE; + HPEXPIREAT: typeof HPEXPIREAT; + hpExpireAt: typeof HPEXPIREAT; + HPEXPIRETIME: typeof HPEXPIRETIME; + hpExpireTime: typeof HPEXPIRETIME; + HPTTL: typeof HPTTL; + hpTTL: typeof HPTTL; + HRANDFIELD_COUNT_WITHVALUES: typeof HRANDFIELD_COUNT_WITHVALUES; + hRandFieldCountWithValues: typeof HRANDFIELD_COUNT_WITHVALUES; + HRANDFIELD_COUNT: typeof HRANDFIELD_COUNT; + hRandFieldCount: typeof HRANDFIELD_COUNT; + HRANDFIELD: typeof HRANDFIELD; + hRandField: typeof HRANDFIELD; + HSCAN: typeof HSCAN; + hScan: typeof HSCAN; + HSCAN_NOVALUES: typeof HSCAN_NOVALUES; + hScanNoValues: typeof HSCAN_NOVALUES; + HSET: typeof HSET; + hSet: typeof HSET; + HSETNX: typeof HSETNX; + hSetNX: typeof HSETNX; + HSTRLEN: typeof HSTRLEN; + hStrLen: typeof HSTRLEN; + HTTL: typeof HTTL; + hTTL: typeof HTTL; + HVALS: typeof HVALS; + hVals: typeof HVALS; + INCR: typeof INCR; + incr: typeof INCR; + INCRBY: typeof INCRBY; + incrBy: typeof INCRBY; + INCRBYFLOAT: typeof INCRBYFLOAT; + incrByFloat: typeof INCRBYFLOAT; + LCS_IDX_WITHMATCHLEN: typeof LCS_IDX_WITHMATCHLEN; + lcsIdxWithMatchLen: typeof LCS_IDX_WITHMATCHLEN; + LCS_IDX: typeof LCS_IDX; + lcsIdx: typeof LCS_IDX; + LCS_LEN: typeof LCS_LEN; + lcsLen: typeof LCS_LEN; + LCS: typeof LCS; + lcs: typeof LCS; + LINDEX: typeof LINDEX; + lIndex: typeof LINDEX; + LINSERT: typeof LINSERT; + lInsert: typeof LINSERT; + LLEN: typeof LLEN; + lLen: typeof LLEN; + LMOVE: typeof LMOVE; + lMove: typeof LMOVE; + LMPOP: typeof LMPOP; + lmPop: typeof LMPOP; + LPOP_COUNT: typeof LPOP_COUNT; + lPopCount: typeof LPOP_COUNT; + LPOP: typeof LPOP; + lPop: typeof LPOP; + LPOS_COUNT: typeof LPOS_COUNT; + lPosCount: typeof LPOS_COUNT; + LPOS: typeof LPOS; + lPos: typeof LPOS; + LPUSH: typeof LPUSH; + lPush: typeof LPUSH; + LPUSHX: typeof LPUSHX; + lPushX: typeof LPUSHX; + LRANGE: typeof LRANGE; + lRange: typeof LRANGE; + LREM: typeof LREM; + lRem: typeof LREM; + LSET: typeof LSET; + lSet: typeof LSET; + LTRIM: typeof LTRIM; + lTrim: typeof LTRIM; + MGET: typeof MGET; + mGet: typeof MGET; + MIGRATE: typeof MIGRATE; + migrate: typeof MIGRATE; + MSET: typeof MSET; + mSet: typeof MSET; + MSETNX: typeof MSETNX; + mSetNX: typeof MSETNX; + OBJECT_ENCODING: typeof OBJECT_ENCODING; + objectEncoding: typeof OBJECT_ENCODING; + OBJECT_FREQ: typeof OBJECT_FREQ; + objectFreq: typeof OBJECT_FREQ; + OBJECT_IDLETIME: typeof OBJECT_IDLETIME; + objectIdleTime: typeof OBJECT_IDLETIME; + OBJECT_REFCOUNT: typeof OBJECT_REFCOUNT; + objectRefCount: typeof OBJECT_REFCOUNT; + PERSIST: typeof PERSIST; + persist: typeof PERSIST; + PEXPIRE: typeof PEXPIRE; + pExpire: typeof PEXPIRE; + PEXPIREAT: typeof PEXPIREAT; + pExpireAt: typeof PEXPIREAT; + PEXPIRETIME: typeof PEXPIRETIME; + pExpireTime: typeof PEXPIRETIME; + PFADD: typeof PFADD; + pfAdd: typeof PFADD; + PFCOUNT: typeof PFCOUNT; + pfCount: typeof PFCOUNT; + PFMERGE: typeof PFMERGE; + pfMerge: typeof PFMERGE; + PSETEX: typeof PSETEX; + pSetEx: typeof PSETEX; + PTTL: typeof PTTL; + pTTL: typeof PTTL; + PUBLISH: typeof PUBLISH; + publish: typeof PUBLISH; + RENAME: typeof RENAME; + rename: typeof RENAME; + RENAMENX: typeof RENAMENX; + renameNX: typeof RENAMENX; + RESTORE: typeof RESTORE; + restore: typeof RESTORE; + RPOP_COUNT: typeof RPOP_COUNT; + rPopCount: typeof RPOP_COUNT; + RPOP: typeof RPOP; + rPop: typeof RPOP; + RPOPLPUSH: typeof RPOPLPUSH; + rPopLPush: typeof RPOPLPUSH; + RPUSH: typeof RPUSH; + rPush: typeof RPUSH; + RPUSHX: typeof RPUSHX; + rPushX: typeof RPUSHX; + SADD: typeof SADD; + sAdd: typeof SADD; + SCARD: typeof SCARD; + sCard: typeof SCARD; + SDIFF: typeof SDIFF; + sDiff: typeof SDIFF; + SDIFFSTORE: typeof SDIFFSTORE; + sDiffStore: typeof SDIFFSTORE; + SINTER: typeof SINTER; + sInter: typeof SINTER; + SINTERCARD: typeof SINTERCARD; + sInterCard: typeof SINTERCARD; + SINTERSTORE: typeof SINTERSTORE; + sInterStore: typeof SINTERSTORE; + SET: typeof SET; + set: typeof SET; + SETBIT: typeof SETBIT; + setBit: typeof SETBIT; + SETEX: typeof SETEX; + setEx: typeof SETEX; + SETNX: typeof SETNX; + setNX: typeof SETNX; + SETRANGE: typeof SETRANGE; + setRange: typeof SETRANGE; + SISMEMBER: typeof SISMEMBER; + sIsMember: typeof SISMEMBER; + SMEMBERS: typeof SMEMBERS; + sMembers: typeof SMEMBERS; + SMISMEMBER: typeof SMISMEMBER; + smIsMember: typeof SMISMEMBER; + SMOVE: typeof SMOVE; + sMove: typeof SMOVE; + SORT_RO: typeof SORT_RO; + sortRo: typeof SORT_RO; + SORT_STORE: typeof SORT_STORE; + sortStore: typeof SORT_STORE; + SORT: typeof SORT; + sort: typeof SORT; + SPOP: typeof SPOP; + sPop: typeof SPOP; + SPUBLISH: typeof SPUBLISH; + sPublish: typeof SPUBLISH; + SRANDMEMBER_COUNT: typeof SRANDMEMBER_COUNT; + sRandMemberCount: typeof SRANDMEMBER_COUNT; + SRANDMEMBER: typeof SRANDMEMBER; + sRandMember: typeof SRANDMEMBER; + SREM: typeof SREM; + sRem: typeof SREM; + SSCAN: typeof SSCAN; + sScan: typeof SSCAN; + STRLEN: typeof STRLEN; + strLen: typeof STRLEN; + SUNION: typeof SUNION; + sUnion: typeof SUNION; + SUNIONSTORE: typeof SUNIONSTORE; + sUnionStore: typeof SUNIONSTORE; + TOUCH: typeof TOUCH; + touch: typeof TOUCH; + TTL: typeof TTL; + ttl: typeof TTL; + TYPE: typeof TYPE; + type: typeof TYPE; + UNLINK: typeof UNLINK; + unlink: typeof UNLINK; + WATCH: typeof WATCH; + watch: typeof WATCH; + XACK: typeof XACK; + xAck: typeof XACK; + XADD: typeof XADD; + xAdd: typeof XADD; + XAUTOCLAIM_JUSTID: typeof XAUTOCLAIM_JUSTID; + xAutoClaimJustId: typeof XAUTOCLAIM_JUSTID; + XAUTOCLAIM: typeof XAUTOCLAIM; + xAutoClaim: typeof XAUTOCLAIM; + XCLAIM: typeof XCLAIM; + xClaim: typeof XCLAIM; + XCLAIM_JUSTID: typeof XCLAIM_JUSTID; + xClaimJustId: typeof XCLAIM_JUSTID; + XDEL: typeof XDEL; + xDel: typeof XDEL; + XGROUP_CREATE: typeof XGROUP_CREATE; + xGroupCreate: typeof XGROUP_CREATE; + XGROUP_CREATECONSUMER: typeof XGROUP_CREATECONSUMER; + xGroupCreateConsumer: typeof XGROUP_CREATECONSUMER; + XGROUP_DELCONSUMER: typeof XGROUP_DELCONSUMER; + xGroupDelConsumer: typeof XGROUP_DELCONSUMER; + XGROUP_DESTROY: typeof XGROUP_DESTROY; + xGroupDestroy: typeof XGROUP_DESTROY; + XGROUP_SETID: typeof XGROUP_SETID; + xGroupSetId: typeof XGROUP_SETID; + XINFO_CONSUMERS: typeof XINFO_CONSUMERS; + xInfoConsumers: typeof XINFO_CONSUMERS; + XINFO_GROUPS: typeof XINFO_GROUPS; + xInfoGroups: typeof XINFO_GROUPS; + XINFO_STREAM: typeof XINFO_STREAM; + xInfoStream: typeof XINFO_STREAM; + XLEN: typeof XLEN; + xLen: typeof XLEN; + XPENDING_RANGE: typeof XPENDING_RANGE; + xPendingRange: typeof XPENDING_RANGE; + XPENDING: typeof XPENDING; + xPending: typeof XPENDING; + XRANGE: typeof XRANGE; + xRange: typeof XRANGE; + XREAD: typeof XREAD; + xRead: typeof XREAD; + XREADGROUP: typeof XREADGROUP; + xReadGroup: typeof XREADGROUP; + XREVRANGE: typeof XREVRANGE; + xRevRange: typeof XREVRANGE; + XSETID: typeof XSETID; + xSetId: typeof XSETID; + XTRIM: typeof XTRIM; + xTrim: typeof XTRIM; + ZADD: typeof ZADD; + zAdd: typeof ZADD; + ZCARD: typeof ZCARD; + zCard: typeof ZCARD; + ZCOUNT: typeof ZCOUNT; + zCount: typeof ZCOUNT; + ZDIFF_WITHSCORES: typeof ZDIFF_WITHSCORES; + zDiffWithScores: typeof ZDIFF_WITHSCORES; + ZDIFF: typeof ZDIFF; + zDiff: typeof ZDIFF; + ZDIFFSTORE: typeof ZDIFFSTORE; + zDiffStore: typeof ZDIFFSTORE; + ZINCRBY: typeof ZINCRBY; + zIncrBy: typeof ZINCRBY; + ZINTER_WITHSCORES: typeof ZINTER_WITHSCORES; + zInterWithScores: typeof ZINTER_WITHSCORES; + ZINTER: typeof ZINTER; + zInter: typeof ZINTER; + ZINTERCARD: typeof ZINTERCARD; + zInterCard: typeof ZINTERCARD; + ZINTERSTORE: typeof ZINTERSTORE; + zInterStore: typeof ZINTERSTORE; + ZLEXCOUNT: typeof ZLEXCOUNT; + zLexCount: typeof ZLEXCOUNT; + ZMPOP: typeof ZMPOP; + zmPop: typeof ZMPOP; + ZMSCORE: typeof ZMSCORE; + zmScore: typeof ZMSCORE; + ZPOPMAX_COUNT: typeof ZPOPMAX_COUNT; + zPopMaxCount: typeof ZPOPMAX_COUNT; + ZPOPMAX: typeof ZPOPMAX; + zPopMax: typeof ZPOPMAX; + ZPOPMIN_COUNT: typeof ZPOPMIN_COUNT; + zPopMinCount: typeof ZPOPMIN_COUNT; + ZPOPMIN: typeof ZPOPMIN; + zPopMin: typeof ZPOPMIN; + ZRANDMEMBER_COUNT_WITHSCORES: typeof ZRANDMEMBER_COUNT_WITHSCORES; + zRandMemberCountWithScores: typeof ZRANDMEMBER_COUNT_WITHSCORES; + ZRANDMEMBER_COUNT: typeof ZRANDMEMBER_COUNT; + zRandMemberCount: typeof ZRANDMEMBER_COUNT; + ZRANDMEMBER: typeof ZRANDMEMBER; + zRandMember: typeof ZRANDMEMBER; + ZRANGE_WITHSCORES: typeof ZRANGE_WITHSCORES; + zRangeWithScores: typeof ZRANGE_WITHSCORES; + ZRANGE: typeof ZRANGE; + zRange: typeof ZRANGE; + ZRANGEBYLEX: typeof ZRANGEBYLEX; + zRangeByLex: typeof ZRANGEBYLEX; + ZRANGEBYSCORE_WITHSCORES: typeof ZRANGEBYSCORE_WITHSCORES; + zRangeByScoreWithScores: typeof ZRANGEBYSCORE_WITHSCORES; + ZRANGEBYSCORE: typeof ZRANGEBYSCORE; + zRangeByScore: typeof ZRANGEBYSCORE; + ZRANGESTORE: typeof ZRANGESTORE; + zRangeStore: typeof ZRANGESTORE; + ZRANK: typeof ZRANK; + zRank: typeof ZRANK; + ZREM: typeof ZREM; + zRem: typeof ZREM; + ZREMRANGEBYLEX: typeof ZREMRANGEBYLEX; + zRemRangeByLex: typeof ZREMRANGEBYLEX; + ZREMRANGEBYRANK: typeof ZREMRANGEBYRANK; + zRemRangeByRank: typeof ZREMRANGEBYRANK; + ZREMRANGEBYSCORE: typeof ZREMRANGEBYSCORE; + zRemRangeByScore: typeof ZREMRANGEBYSCORE; + ZREVRANK: typeof ZREVRANK; + zRevRank: typeof ZREVRANK; + ZSCAN: typeof ZSCAN; + zScan: typeof ZSCAN; + ZSCORE: typeof ZSCORE; + zScore: typeof ZSCORE; + ZUNION_WITHSCORES: typeof ZUNION_WITHSCORES; + zUnionWithScores: typeof ZUNION_WITHSCORES; + ZUNION: typeof ZUNION; + zUnion: typeof ZUNION; + ZUNIONSTORE: typeof ZUNIONSTORE; + zUnionStore: typeof ZUNIONSTORE; +}; +export default _default; diff --git a/server/node_modules/@redis/client/dist/lib/cluster/commands.js b/server/node_modules/@redis/client/dist/lib/cluster/commands.js new file mode 100644 index 0000000..76719ed --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/cluster/commands.js @@ -0,0 +1,670 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const APPEND = require("../commands/APPEND"); +const BITCOUNT = require("../commands/BITCOUNT"); +const BITFIELD_RO = require("../commands/BITFIELD_RO"); +const BITFIELD = require("../commands/BITFIELD"); +const BITOP = require("../commands/BITOP"); +const BITPOS = require("../commands/BITPOS"); +const BLMOVE = require("../commands/BLMOVE"); +const BLMPOP = require("../commands/BLMPOP"); +const BLPOP = require("../commands/BLPOP"); +const BRPOP = require("../commands/BRPOP"); +const BRPOPLPUSH = require("../commands/BRPOPLPUSH"); +const BZMPOP = require("../commands/BZMPOP"); +const BZPOPMAX = require("../commands/BZPOPMAX"); +const BZPOPMIN = require("../commands/BZPOPMIN"); +const COPY = require("../commands/COPY"); +const DECR = require("../commands/DECR"); +const DECRBY = require("../commands/DECRBY"); +const DEL = require("../commands/DEL"); +const DUMP = require("../commands/DUMP"); +const EVAL_RO = require("../commands/EVAL_RO"); +const EVAL = require("../commands/EVAL"); +const EVALSHA_RO = require("../commands/EVALSHA_RO"); +const EVALSHA = require("../commands/EVALSHA"); +const EXISTS = require("../commands/EXISTS"); +const EXPIRE = require("../commands/EXPIRE"); +const EXPIREAT = require("../commands/EXPIREAT"); +const EXPIRETIME = require("../commands/EXPIRETIME"); +const FCALL_RO = require("../commands/FCALL_RO"); +const FCALL = require("../commands/FCALL"); +const GEOADD = require("../commands/GEOADD"); +const GEODIST = require("../commands/GEODIST"); +const GEOHASH = require("../commands/GEOHASH"); +const GEOPOS = require("../commands/GEOPOS"); +const GEORADIUS_RO_WITH = require("../commands/GEORADIUS_RO_WITH"); +const GEORADIUS_RO = require("../commands/GEORADIUS_RO"); +const GEORADIUS_WITH = require("../commands/GEORADIUS_WITH"); +const GEORADIUS = require("../commands/GEORADIUS"); +const GEORADIUSBYMEMBER_RO_WITH = require("../commands/GEORADIUSBYMEMBER_RO_WITH"); +const GEORADIUSBYMEMBER_RO = require("../commands/GEORADIUSBYMEMBER_RO"); +const GEORADIUSBYMEMBER_WITH = require("../commands/GEORADIUSBYMEMBER_WITH"); +const GEORADIUSBYMEMBER = require("../commands/GEORADIUSBYMEMBER"); +const GEORADIUSBYMEMBERSTORE = require("../commands/GEORADIUSBYMEMBERSTORE"); +const GEORADIUSSTORE = require("../commands/GEORADIUSSTORE"); +const GEOSEARCH_WITH = require("../commands/GEOSEARCH_WITH"); +const GEOSEARCH = require("../commands/GEOSEARCH"); +const GEOSEARCHSTORE = require("../commands/GEOSEARCHSTORE"); +const GET = require("../commands/GET"); +const GETBIT = require("../commands/GETBIT"); +const GETDEL = require("../commands/GETDEL"); +const GETEX = require("../commands/GETEX"); +const GETRANGE = require("../commands/GETRANGE"); +const GETSET = require("../commands/GETSET"); +const HDEL = require("../commands/HDEL"); +const HEXISTS = require("../commands/HEXISTS"); +const HEXPIRE = require("../commands/HEXPIRE"); +const HEXPIREAT = require("../commands/HEXPIREAT"); +const HEXPIRETIME = require("../commands/HEXPIRETIME"); +const HGET = require("../commands/HGET"); +const HGETALL = require("../commands/HGETALL"); +const HINCRBY = require("../commands/HINCRBY"); +const HINCRBYFLOAT = require("../commands/HINCRBYFLOAT"); +const HKEYS = require("../commands/HKEYS"); +const HLEN = require("../commands/HLEN"); +const HMGET = require("../commands/HMGET"); +const HPERSIST = require("../commands/HPERSIST"); +const HPEXPIRE = require("../commands/HPEXPIRE"); +const HPEXPIREAT = require("../commands/HPEXPIREAT"); +const HPEXPIRETIME = require("../commands/HPEXPIRETIME"); +const HPTTL = require("../commands/HPTTL"); +const HRANDFIELD_COUNT_WITHVALUES = require("../commands/HRANDFIELD_COUNT_WITHVALUES"); +const HRANDFIELD_COUNT = require("../commands/HRANDFIELD_COUNT"); +const HRANDFIELD = require("../commands/HRANDFIELD"); +const HSCAN = require("../commands/HSCAN"); +const HSCAN_NOVALUES = require("../commands/HSCAN_NOVALUES"); +const HSET = require("../commands/HSET"); +const HSETNX = require("../commands/HSETNX"); +const HSTRLEN = require("../commands/HSTRLEN"); +const HTTL = require("../commands/HTTL"); +const HVALS = require("../commands/HVALS"); +const INCR = require("../commands/INCR"); +const INCRBY = require("../commands/INCRBY"); +const INCRBYFLOAT = require("../commands/INCRBYFLOAT"); +const LCS_IDX_WITHMATCHLEN = require("../commands/LCS_IDX_WITHMATCHLEN"); +const LCS_IDX = require("../commands/LCS_IDX"); +const LCS_LEN = require("../commands/LCS_LEN"); +const LCS = require("../commands/LCS"); +const LINDEX = require("../commands/LINDEX"); +const LINSERT = require("../commands/LINSERT"); +const LLEN = require("../commands/LLEN"); +const LMOVE = require("../commands/LMOVE"); +const LMPOP = require("../commands/LMPOP"); +const LPOP_COUNT = require("../commands/LPOP_COUNT"); +const LPOP = require("../commands/LPOP"); +const LPOS_COUNT = require("../commands/LPOS_COUNT"); +const LPOS = require("../commands/LPOS"); +const LPUSH = require("../commands/LPUSH"); +const LPUSHX = require("../commands/LPUSHX"); +const LRANGE = require("../commands/LRANGE"); +const LREM = require("../commands/LREM"); +const LSET = require("../commands/LSET"); +const LTRIM = require("../commands/LTRIM"); +const MGET = require("../commands/MGET"); +const MIGRATE = require("../commands/MIGRATE"); +const MSET = require("../commands/MSET"); +const MSETNX = require("../commands/MSETNX"); +const OBJECT_ENCODING = require("../commands/OBJECT_ENCODING"); +const OBJECT_FREQ = require("../commands/OBJECT_FREQ"); +const OBJECT_IDLETIME = require("../commands/OBJECT_IDLETIME"); +const OBJECT_REFCOUNT = require("../commands/OBJECT_REFCOUNT"); +const PERSIST = require("../commands/PERSIST"); +const PEXPIRE = require("../commands/PEXPIRE"); +const PEXPIREAT = require("../commands/PEXPIREAT"); +const PEXPIRETIME = require("../commands/PEXPIRETIME"); +const PFADD = require("../commands/PFADD"); +const PFCOUNT = require("../commands/PFCOUNT"); +const PFMERGE = require("../commands/PFMERGE"); +const PSETEX = require("../commands/PSETEX"); +const PTTL = require("../commands/PTTL"); +const PUBLISH = require("../commands/PUBLISH"); +const RENAME = require("../commands/RENAME"); +const RENAMENX = require("../commands/RENAMENX"); +const RESTORE = require("../commands/RESTORE"); +const RPOP_COUNT = require("../commands/RPOP_COUNT"); +const RPOP = require("../commands/RPOP"); +const RPOPLPUSH = require("../commands/RPOPLPUSH"); +const RPUSH = require("../commands/RPUSH"); +const RPUSHX = require("../commands/RPUSHX"); +const SADD = require("../commands/SADD"); +const SCARD = require("../commands/SCARD"); +const SDIFF = require("../commands/SDIFF"); +const SDIFFSTORE = require("../commands/SDIFFSTORE"); +const SET = require("../commands/SET"); +const SETBIT = require("../commands/SETBIT"); +const SETEX = require("../commands/SETEX"); +const SETNX = require("../commands/SETNX"); +const SETRANGE = require("../commands/SETRANGE"); +const SINTER = require("../commands/SINTER"); +const SINTERCARD = require("../commands/SINTERCARD"); +const SINTERSTORE = require("../commands/SINTERSTORE"); +const SISMEMBER = require("../commands/SISMEMBER"); +const SMEMBERS = require("../commands/SMEMBERS"); +const SMISMEMBER = require("../commands/SMISMEMBER"); +const SMOVE = require("../commands/SMOVE"); +const SORT_RO = require("../commands/SORT_RO"); +const SORT_STORE = require("../commands/SORT_STORE"); +const SORT = require("../commands/SORT"); +const SPOP = require("../commands/SPOP"); +const SPUBLISH = require("../commands/SPUBLISH"); +const SRANDMEMBER_COUNT = require("../commands/SRANDMEMBER_COUNT"); +const SRANDMEMBER = require("../commands/SRANDMEMBER"); +const SREM = require("../commands/SREM"); +const SSCAN = require("../commands/SSCAN"); +const STRLEN = require("../commands/STRLEN"); +const SUNION = require("../commands/SUNION"); +const SUNIONSTORE = require("../commands/SUNIONSTORE"); +const TOUCH = require("../commands/TOUCH"); +const TTL = require("../commands/TTL"); +const TYPE = require("../commands/TYPE"); +const UNLINK = require("../commands/UNLINK"); +const WATCH = require("../commands/WATCH"); +const XACK = require("../commands/XACK"); +const XADD = require("../commands/XADD"); +const XAUTOCLAIM_JUSTID = require("../commands/XAUTOCLAIM_JUSTID"); +const XAUTOCLAIM = require("../commands/XAUTOCLAIM"); +const XCLAIM_JUSTID = require("../commands/XCLAIM_JUSTID"); +const XCLAIM = require("../commands/XCLAIM"); +const XDEL = require("../commands/XDEL"); +const XGROUP_CREATE = require("../commands/XGROUP_CREATE"); +const XGROUP_CREATECONSUMER = require("../commands/XGROUP_CREATECONSUMER"); +const XGROUP_DELCONSUMER = require("../commands/XGROUP_DELCONSUMER"); +const XGROUP_DESTROY = require("../commands/XGROUP_DESTROY"); +const XGROUP_SETID = require("../commands/XGROUP_SETID"); +const XINFO_CONSUMERS = require("../commands/XINFO_CONSUMERS"); +const XINFO_GROUPS = require("../commands/XINFO_GROUPS"); +const XINFO_STREAM = require("../commands/XINFO_STREAM"); +const XLEN = require("../commands/XLEN"); +const XPENDING_RANGE = require("../commands/XPENDING_RANGE"); +const XPENDING = require("../commands/XPENDING"); +const XRANGE = require("../commands/XRANGE"); +const XREAD = require("../commands/XREAD"); +const XREADGROUP = require("../commands/XREADGROUP"); +const XREVRANGE = require("../commands/XREVRANGE"); +const XSETID = require("../commands/XSETID"); +const XTRIM = require("../commands/XTRIM"); +const ZADD = require("../commands/ZADD"); +const ZCARD = require("../commands/ZCARD"); +const ZCOUNT = require("../commands/ZCOUNT"); +const ZDIFF_WITHSCORES = require("../commands/ZDIFF_WITHSCORES"); +const ZDIFF = require("../commands/ZDIFF"); +const ZDIFFSTORE = require("../commands/ZDIFFSTORE"); +const ZINCRBY = require("../commands/ZINCRBY"); +const ZINTER_WITHSCORES = require("../commands/ZINTER_WITHSCORES"); +const ZINTER = require("../commands/ZINTER"); +const ZINTERCARD = require("../commands/ZINTERCARD"); +const ZINTERSTORE = require("../commands/ZINTERSTORE"); +const ZLEXCOUNT = require("../commands/ZLEXCOUNT"); +const ZMPOP = require("../commands/ZMPOP"); +const ZMSCORE = require("../commands/ZMSCORE"); +const ZPOPMAX_COUNT = require("../commands/ZPOPMAX_COUNT"); +const ZPOPMAX = require("../commands/ZPOPMAX"); +const ZPOPMIN_COUNT = require("../commands/ZPOPMIN_COUNT"); +const ZPOPMIN = require("../commands/ZPOPMIN"); +const ZRANDMEMBER_COUNT_WITHSCORES = require("../commands/ZRANDMEMBER_COUNT_WITHSCORES"); +const ZRANDMEMBER_COUNT = require("../commands/ZRANDMEMBER_COUNT"); +const ZRANDMEMBER = require("../commands/ZRANDMEMBER"); +const ZRANGE_WITHSCORES = require("../commands/ZRANGE_WITHSCORES"); +const ZRANGE = require("../commands/ZRANGE"); +const ZRANGEBYLEX = require("../commands/ZRANGEBYLEX"); +const ZRANGEBYSCORE_WITHSCORES = require("../commands/ZRANGEBYSCORE_WITHSCORES"); +const ZRANGEBYSCORE = require("../commands/ZRANGEBYSCORE"); +const ZRANGESTORE = require("../commands/ZRANGESTORE"); +const ZRANK = require("../commands/ZRANK"); +const ZREM = require("../commands/ZREM"); +const ZREMRANGEBYLEX = require("../commands/ZREMRANGEBYLEX"); +const ZREMRANGEBYRANK = require("../commands/ZREMRANGEBYRANK"); +const ZREMRANGEBYSCORE = require("../commands/ZREMRANGEBYSCORE"); +const ZREVRANK = require("../commands/ZREVRANK"); +const ZSCAN = require("../commands/ZSCAN"); +const ZSCORE = require("../commands/ZSCORE"); +const ZUNION_WITHSCORES = require("../commands/ZUNION_WITHSCORES"); +const ZUNION = require("../commands/ZUNION"); +const ZUNIONSTORE = require("../commands/ZUNIONSTORE"); +exports.default = { + APPEND, + append: APPEND, + BITCOUNT, + bitCount: BITCOUNT, + BITFIELD_RO, + bitFieldRo: BITFIELD_RO, + BITFIELD, + bitField: BITFIELD, + BITOP, + bitOp: BITOP, + BITPOS, + bitPos: BITPOS, + BLMOVE, + blMove: BLMOVE, + BLMPOP, + blmPop: BLMPOP, + BLPOP, + blPop: BLPOP, + BRPOP, + brPop: BRPOP, + BRPOPLPUSH, + brPopLPush: BRPOPLPUSH, + BZMPOP, + bzmPop: BZMPOP, + BZPOPMAX, + bzPopMax: BZPOPMAX, + BZPOPMIN, + bzPopMin: BZPOPMIN, + COPY, + copy: COPY, + DECR, + decr: DECR, + DECRBY, + decrBy: DECRBY, + DEL, + del: DEL, + DUMP, + dump: DUMP, + EVAL_RO, + evalRo: EVAL_RO, + EVAL, + eval: EVAL, + EVALSHA, + evalSha: EVALSHA, + EVALSHA_RO, + evalShaRo: EVALSHA_RO, + EXISTS, + exists: EXISTS, + EXPIRE, + expire: EXPIRE, + EXPIREAT, + expireAt: EXPIREAT, + EXPIRETIME, + expireTime: EXPIRETIME, + FCALL_RO, + fCallRo: FCALL_RO, + FCALL, + fCall: FCALL, + GEOADD, + geoAdd: GEOADD, + GEODIST, + geoDist: GEODIST, + GEOHASH, + geoHash: GEOHASH, + GEOPOS, + geoPos: GEOPOS, + GEORADIUS_RO_WITH, + geoRadiusRoWith: GEORADIUS_RO_WITH, + GEORADIUS_RO, + geoRadiusRo: GEORADIUS_RO, + GEORADIUS_WITH, + geoRadiusWith: GEORADIUS_WITH, + GEORADIUS, + geoRadius: GEORADIUS, + GEORADIUSBYMEMBER_RO_WITH, + geoRadiusByMemberRoWith: GEORADIUSBYMEMBER_RO_WITH, + GEORADIUSBYMEMBER_RO, + geoRadiusByMemberRo: GEORADIUSBYMEMBER_RO, + GEORADIUSBYMEMBER_WITH, + geoRadiusByMemberWith: GEORADIUSBYMEMBER_WITH, + GEORADIUSBYMEMBER, + geoRadiusByMember: GEORADIUSBYMEMBER, + GEORADIUSBYMEMBERSTORE, + geoRadiusByMemberStore: GEORADIUSBYMEMBERSTORE, + GEORADIUSSTORE, + geoRadiusStore: GEORADIUSSTORE, + GEOSEARCH_WITH, + geoSearchWith: GEOSEARCH_WITH, + GEOSEARCH, + geoSearch: GEOSEARCH, + GEOSEARCHSTORE, + geoSearchStore: GEOSEARCHSTORE, + GET, + get: GET, + GETBIT, + getBit: GETBIT, + GETDEL, + getDel: GETDEL, + GETEX, + getEx: GETEX, + GETRANGE, + getRange: GETRANGE, + GETSET, + getSet: GETSET, + HDEL, + hDel: HDEL, + HEXISTS, + hExists: HEXISTS, + HEXPIRE, + hExpire: HEXPIRE, + HEXPIREAT, + hExpireAt: HEXPIREAT, + HEXPIRETIME, + hExpireTime: HEXPIRETIME, + HGET, + hGet: HGET, + HGETALL, + hGetAll: HGETALL, + HINCRBY, + hIncrBy: HINCRBY, + HINCRBYFLOAT, + hIncrByFloat: HINCRBYFLOAT, + HKEYS, + hKeys: HKEYS, + HLEN, + hLen: HLEN, + HMGET, + hmGet: HMGET, + HPERSIST, + hPersist: HPERSIST, + HPEXPIRE, + hpExpire: HPEXPIRE, + HPEXPIREAT, + hpExpireAt: HPEXPIREAT, + HPEXPIRETIME, + hpExpireTime: HPEXPIRETIME, + HPTTL, + hpTTL: HPTTL, + HRANDFIELD_COUNT_WITHVALUES, + hRandFieldCountWithValues: HRANDFIELD_COUNT_WITHVALUES, + HRANDFIELD_COUNT, + hRandFieldCount: HRANDFIELD_COUNT, + HRANDFIELD, + hRandField: HRANDFIELD, + HSCAN, + hScan: HSCAN, + HSCAN_NOVALUES, + hScanNoValues: HSCAN_NOVALUES, + HSET, + hSet: HSET, + HSETNX, + hSetNX: HSETNX, + HSTRLEN, + hStrLen: HSTRLEN, + HTTL, + hTTL: HTTL, + HVALS, + hVals: HVALS, + INCR, + incr: INCR, + INCRBY, + incrBy: INCRBY, + INCRBYFLOAT, + incrByFloat: INCRBYFLOAT, + LCS_IDX_WITHMATCHLEN, + lcsIdxWithMatchLen: LCS_IDX_WITHMATCHLEN, + LCS_IDX, + lcsIdx: LCS_IDX, + LCS_LEN, + lcsLen: LCS_LEN, + LCS, + lcs: LCS, + LINDEX, + lIndex: LINDEX, + LINSERT, + lInsert: LINSERT, + LLEN, + lLen: LLEN, + LMOVE, + lMove: LMOVE, + LMPOP, + lmPop: LMPOP, + LPOP_COUNT, + lPopCount: LPOP_COUNT, + LPOP, + lPop: LPOP, + LPOS_COUNT, + lPosCount: LPOS_COUNT, + LPOS, + lPos: LPOS, + LPUSH, + lPush: LPUSH, + LPUSHX, + lPushX: LPUSHX, + LRANGE, + lRange: LRANGE, + LREM, + lRem: LREM, + LSET, + lSet: LSET, + LTRIM, + lTrim: LTRIM, + MGET, + mGet: MGET, + MIGRATE, + migrate: MIGRATE, + MSET, + mSet: MSET, + MSETNX, + mSetNX: MSETNX, + OBJECT_ENCODING, + objectEncoding: OBJECT_ENCODING, + OBJECT_FREQ, + objectFreq: OBJECT_FREQ, + OBJECT_IDLETIME, + objectIdleTime: OBJECT_IDLETIME, + OBJECT_REFCOUNT, + objectRefCount: OBJECT_REFCOUNT, + PERSIST, + persist: PERSIST, + PEXPIRE, + pExpire: PEXPIRE, + PEXPIREAT, + pExpireAt: PEXPIREAT, + PEXPIRETIME, + pExpireTime: PEXPIRETIME, + PFADD, + pfAdd: PFADD, + PFCOUNT, + pfCount: PFCOUNT, + PFMERGE, + pfMerge: PFMERGE, + PSETEX, + pSetEx: PSETEX, + PTTL, + pTTL: PTTL, + PUBLISH, + publish: PUBLISH, + RENAME, + rename: RENAME, + RENAMENX, + renameNX: RENAMENX, + RESTORE, + restore: RESTORE, + RPOP_COUNT, + rPopCount: RPOP_COUNT, + RPOP, + rPop: RPOP, + RPOPLPUSH, + rPopLPush: RPOPLPUSH, + RPUSH, + rPush: RPUSH, + RPUSHX, + rPushX: RPUSHX, + SADD, + sAdd: SADD, + SCARD, + sCard: SCARD, + SDIFF, + sDiff: SDIFF, + SDIFFSTORE, + sDiffStore: SDIFFSTORE, + SINTER, + sInter: SINTER, + SINTERCARD, + sInterCard: SINTERCARD, + SINTERSTORE, + sInterStore: SINTERSTORE, + SET, + set: SET, + SETBIT, + setBit: SETBIT, + SETEX, + setEx: SETEX, + SETNX, + setNX: SETNX, + SETRANGE, + setRange: SETRANGE, + SISMEMBER, + sIsMember: SISMEMBER, + SMEMBERS, + sMembers: SMEMBERS, + SMISMEMBER, + smIsMember: SMISMEMBER, + SMOVE, + sMove: SMOVE, + SORT_RO, + sortRo: SORT_RO, + SORT_STORE, + sortStore: SORT_STORE, + SORT, + sort: SORT, + SPOP, + sPop: SPOP, + SPUBLISH, + sPublish: SPUBLISH, + SRANDMEMBER_COUNT, + sRandMemberCount: SRANDMEMBER_COUNT, + SRANDMEMBER, + sRandMember: SRANDMEMBER, + SREM, + sRem: SREM, + SSCAN, + sScan: SSCAN, + STRLEN, + strLen: STRLEN, + SUNION, + sUnion: SUNION, + SUNIONSTORE, + sUnionStore: SUNIONSTORE, + TOUCH, + touch: TOUCH, + TTL, + ttl: TTL, + TYPE, + type: TYPE, + UNLINK, + unlink: UNLINK, + WATCH, + watch: WATCH, + XACK, + xAck: XACK, + XADD, + xAdd: XADD, + XAUTOCLAIM_JUSTID, + xAutoClaimJustId: XAUTOCLAIM_JUSTID, + XAUTOCLAIM, + xAutoClaim: XAUTOCLAIM, + XCLAIM, + xClaim: XCLAIM, + XCLAIM_JUSTID, + xClaimJustId: XCLAIM_JUSTID, + XDEL, + xDel: XDEL, + XGROUP_CREATE, + xGroupCreate: XGROUP_CREATE, + XGROUP_CREATECONSUMER, + xGroupCreateConsumer: XGROUP_CREATECONSUMER, + XGROUP_DELCONSUMER, + xGroupDelConsumer: XGROUP_DELCONSUMER, + XGROUP_DESTROY, + xGroupDestroy: XGROUP_DESTROY, + XGROUP_SETID, + xGroupSetId: XGROUP_SETID, + XINFO_CONSUMERS, + xInfoConsumers: XINFO_CONSUMERS, + XINFO_GROUPS, + xInfoGroups: XINFO_GROUPS, + XINFO_STREAM, + xInfoStream: XINFO_STREAM, + XLEN, + xLen: XLEN, + XPENDING_RANGE, + xPendingRange: XPENDING_RANGE, + XPENDING, + xPending: XPENDING, + XRANGE, + xRange: XRANGE, + XREAD, + xRead: XREAD, + XREADGROUP, + xReadGroup: XREADGROUP, + XREVRANGE, + xRevRange: XREVRANGE, + XSETID, + xSetId: XSETID, + XTRIM, + xTrim: XTRIM, + ZADD, + zAdd: ZADD, + ZCARD, + zCard: ZCARD, + ZCOUNT, + zCount: ZCOUNT, + ZDIFF_WITHSCORES, + zDiffWithScores: ZDIFF_WITHSCORES, + ZDIFF, + zDiff: ZDIFF, + ZDIFFSTORE, + zDiffStore: ZDIFFSTORE, + ZINCRBY, + zIncrBy: ZINCRBY, + ZINTER_WITHSCORES, + zInterWithScores: ZINTER_WITHSCORES, + ZINTER, + zInter: ZINTER, + ZINTERCARD, + zInterCard: ZINTERCARD, + ZINTERSTORE, + zInterStore: ZINTERSTORE, + ZLEXCOUNT, + zLexCount: ZLEXCOUNT, + ZMPOP, + zmPop: ZMPOP, + ZMSCORE, + zmScore: ZMSCORE, + ZPOPMAX_COUNT, + zPopMaxCount: ZPOPMAX_COUNT, + ZPOPMAX, + zPopMax: ZPOPMAX, + ZPOPMIN_COUNT, + zPopMinCount: ZPOPMIN_COUNT, + ZPOPMIN, + zPopMin: ZPOPMIN, + ZRANDMEMBER_COUNT_WITHSCORES, + zRandMemberCountWithScores: ZRANDMEMBER_COUNT_WITHSCORES, + ZRANDMEMBER_COUNT, + zRandMemberCount: ZRANDMEMBER_COUNT, + ZRANDMEMBER, + zRandMember: ZRANDMEMBER, + ZRANGE_WITHSCORES, + zRangeWithScores: ZRANGE_WITHSCORES, + ZRANGE, + zRange: ZRANGE, + ZRANGEBYLEX, + zRangeByLex: ZRANGEBYLEX, + ZRANGEBYSCORE_WITHSCORES, + zRangeByScoreWithScores: ZRANGEBYSCORE_WITHSCORES, + ZRANGEBYSCORE, + zRangeByScore: ZRANGEBYSCORE, + ZRANGESTORE, + zRangeStore: ZRANGESTORE, + ZRANK, + zRank: ZRANK, + ZREM, + zRem: ZREM, + ZREMRANGEBYLEX, + zRemRangeByLex: ZREMRANGEBYLEX, + ZREMRANGEBYRANK, + zRemRangeByRank: ZREMRANGEBYRANK, + ZREMRANGEBYSCORE, + zRemRangeByScore: ZREMRANGEBYSCORE, + ZREVRANK, + zRevRank: ZREVRANK, + ZSCAN, + zScan: ZSCAN, + ZSCORE, + zScore: ZSCORE, + ZUNION_WITHSCORES, + zUnionWithScores: ZUNION_WITHSCORES, + ZUNION, + zUnion: ZUNION, + ZUNIONSTORE, + zUnionStore: ZUNIONSTORE +}; diff --git a/server/node_modules/@redis/client/dist/lib/cluster/index.d.ts b/server/node_modules/@redis/client/dist/lib/cluster/index.d.ts new file mode 100644 index 0000000..195a30c --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/cluster/index.d.ts @@ -0,0 +1,93 @@ +/// +import COMMANDS from './commands'; +import { RedisCommand, RedisCommandArgument, RedisCommandArguments, RedisCommandRawReply, RedisCommandReply, RedisFunctions, RedisModules, RedisExtensions, RedisScript, RedisScripts, RedisCommandSignature, RedisFunction } from '../commands'; +import { ClientCommandOptions, RedisClientOptions, RedisClientType, WithFunctions, WithModules, WithScripts } from '../client'; +import { NodeAddressMap, ShardNode } from './cluster-slots'; +import { EventEmitter } from 'events'; +import { RedisClusterMultiCommandType } from './multi-command'; +import { PubSubListener } from '../client/pub-sub'; +export type RedisClusterClientOptions = Omit; +export interface RedisClusterOptions, F extends RedisFunctions = Record, S extends RedisScripts = Record> extends RedisExtensions { + /** + * Should contain details for some of the cluster nodes that the client will use to discover + * the "cluster topology". We recommend including details for at least 3 nodes here. + */ + rootNodes: Array; + /** + * Default values used for every client in the cluster. Use this to specify global values, + * for example: ACL credentials, timeouts, TLS configuration etc. + */ + defaults?: Partial; + /** + * When `true`, `.connect()` will only discover the cluster topology, without actually connecting to all the nodes. + * Useful for short-term or PubSub-only connections. + */ + minimizeConnections?: boolean; + /** + * When `true`, distribute load by executing readonly commands (such as `GET`, `GEOSEARCH`, etc.) across all cluster nodes. When `false`, only use master nodes. + */ + useReplicas?: boolean; + /** + * The maximum number of times a command will be redirected due to `MOVED` or `ASK` errors. + */ + maxCommandRedirections?: number; + /** + * Mapping between the addresses in the cluster (see `CLUSTER SHARDS`) and the addresses the client should connect to + * Useful when the cluster is running on another network + * + */ + nodeAddressMap?: NodeAddressMap; +} +type WithCommands = { + [P in keyof typeof COMMANDS]: RedisCommandSignature<(typeof COMMANDS)[P]>; +}; +export type RedisClusterType, F extends RedisFunctions = Record, S extends RedisScripts = Record> = RedisCluster & WithCommands & WithModules & WithFunctions & WithScripts; +export default class RedisCluster extends EventEmitter { + #private; + static extractFirstKey(command: RedisCommand, originalArgs: Array, redisArgs: RedisCommandArguments): RedisCommandArgument | undefined; + static create(options?: RedisClusterOptions): RedisClusterType; + get slots(): import("./cluster-slots").Shard[]; + get shards(): import("./cluster-slots").Shard[]; + get masters(): ShardNode[]; + get replicas(): ShardNode[]; + get nodeByAddress(): Map | import("./cluster-slots").MasterNode>; + get pubSubNode(): Required> | undefined; + get isOpen(): boolean; + constructor(options: RedisClusterOptions); + duplicate(overrides?: Partial>): RedisClusterType; + connect(): Promise; + commandsExecutor(command: C, args: Array): Promise>; + sendCommand(firstKey: RedisCommandArgument | undefined, isReadonly: boolean | undefined, args: RedisCommandArguments, options?: ClientCommandOptions): Promise; + functionsExecutor(fn: F, args: Array, name: string): Promise>; + executeFunction(name: string, fn: RedisFunction, originalArgs: Array, redisArgs: RedisCommandArguments, options?: ClientCommandOptions): Promise; + scriptsExecutor(script: S, args: Array): Promise>; + executeScript(script: RedisScript, originalArgs: Array, redisArgs: RedisCommandArguments, options?: ClientCommandOptions): Promise; + MULTI(routing?: RedisCommandArgument): RedisClusterMultiCommandType; + multi: (routing?: RedisCommandArgument) => RedisClusterMultiCommandType; + SUBSCRIBE(channels: string | Array, listener: PubSubListener, bufferMode?: T): Promise; + subscribe: (channels: string | Array, listener: PubSubListener, bufferMode?: T | undefined) => Promise; + UNSUBSCRIBE(channels?: string | Array, listener?: PubSubListener, bufferMode?: T): Promise; + unsubscribe: (channels?: string | Array, listener?: PubSubListener, bufferMode?: T | undefined) => Promise; + PSUBSCRIBE(patterns: string | Array, listener: PubSubListener, bufferMode?: T): Promise; + pSubscribe: (patterns: string | Array, listener: PubSubListener, bufferMode?: T | undefined) => Promise; + PUNSUBSCRIBE(patterns?: string | Array, listener?: PubSubListener, bufferMode?: T): Promise; + pUnsubscribe: (patterns?: string | Array, listener?: PubSubListener | undefined, bufferMode?: T | undefined) => Promise; + SSUBSCRIBE(channels: string | Array, listener: PubSubListener, bufferMode?: T): Promise; + sSubscribe: (channels: string | Array, listener: PubSubListener, bufferMode?: T | undefined) => Promise; + SUNSUBSCRIBE(channels: string | Array, listener?: PubSubListener, bufferMode?: T): Promise; + sUnsubscribe: (channels: string | Array, listener?: PubSubListener | undefined, bufferMode?: T | undefined) => Promise; + quit(): Promise; + disconnect(): Promise; + nodeClient(node: ShardNode): RedisClientType | Promise>; + getRandomNode(): ShardNode; + getSlotRandomNode(slot: number): ShardNode; + /** + * @deprecated use `.masters` instead + */ + getMasters(): ShardNode[]; + /** + * @deprecated use `.slots[]` instead + */ + getSlotMaster(slot: number): import("./cluster-slots").MasterNode; +} +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/cluster/index.js b/server/node_modules/@redis/client/dist/lib/cluster/index.js new file mode 100644 index 0000000..826aa75 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/cluster/index.js @@ -0,0 +1,254 @@ +"use strict"; +var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; +}; +var _RedisCluster_instances, _RedisCluster_options, _RedisCluster_slots, _RedisCluster_Multi, _RedisCluster_execute; +Object.defineProperty(exports, "__esModule", { value: true }); +const commands_1 = require("./commands"); +const cluster_slots_1 = require("./cluster-slots"); +const commander_1 = require("../commander"); +const events_1 = require("events"); +const multi_command_1 = require("./multi-command"); +const errors_1 = require("../errors"); +class RedisCluster extends events_1.EventEmitter { + static extractFirstKey(command, originalArgs, redisArgs) { + if (command.FIRST_KEY_INDEX === undefined) { + return undefined; + } + else if (typeof command.FIRST_KEY_INDEX === 'number') { + return redisArgs[command.FIRST_KEY_INDEX]; + } + return command.FIRST_KEY_INDEX(...originalArgs); + } + static create(options) { + return new ((0, commander_1.attachExtensions)({ + BaseClass: RedisCluster, + modulesExecutor: RedisCluster.prototype.commandsExecutor, + modules: options?.modules, + functionsExecutor: RedisCluster.prototype.functionsExecutor, + functions: options?.functions, + scriptsExecutor: RedisCluster.prototype.scriptsExecutor, + scripts: options?.scripts + }))(options); + } + get slots() { + return __classPrivateFieldGet(this, _RedisCluster_slots, "f").slots; + } + get shards() { + return __classPrivateFieldGet(this, _RedisCluster_slots, "f").shards; + } + get masters() { + return __classPrivateFieldGet(this, _RedisCluster_slots, "f").masters; + } + get replicas() { + return __classPrivateFieldGet(this, _RedisCluster_slots, "f").replicas; + } + get nodeByAddress() { + return __classPrivateFieldGet(this, _RedisCluster_slots, "f").nodeByAddress; + } + get pubSubNode() { + return __classPrivateFieldGet(this, _RedisCluster_slots, "f").pubSubNode; + } + get isOpen() { + return __classPrivateFieldGet(this, _RedisCluster_slots, "f").isOpen; + } + constructor(options) { + super(); + _RedisCluster_instances.add(this); + _RedisCluster_options.set(this, void 0); + _RedisCluster_slots.set(this, void 0); + _RedisCluster_Multi.set(this, void 0); + Object.defineProperty(this, "multi", { + enumerable: true, + configurable: true, + writable: true, + value: this.MULTI + }); + Object.defineProperty(this, "subscribe", { + enumerable: true, + configurable: true, + writable: true, + value: this.SUBSCRIBE + }); + Object.defineProperty(this, "unsubscribe", { + enumerable: true, + configurable: true, + writable: true, + value: this.UNSUBSCRIBE + }); + Object.defineProperty(this, "pSubscribe", { + enumerable: true, + configurable: true, + writable: true, + value: this.PSUBSCRIBE + }); + Object.defineProperty(this, "pUnsubscribe", { + enumerable: true, + configurable: true, + writable: true, + value: this.PUNSUBSCRIBE + }); + Object.defineProperty(this, "sSubscribe", { + enumerable: true, + configurable: true, + writable: true, + value: this.SSUBSCRIBE + }); + Object.defineProperty(this, "sUnsubscribe", { + enumerable: true, + configurable: true, + writable: true, + value: this.SUNSUBSCRIBE + }); + __classPrivateFieldSet(this, _RedisCluster_options, options, "f"); + __classPrivateFieldSet(this, _RedisCluster_slots, new cluster_slots_1.default(options, this.emit.bind(this)), "f"); + __classPrivateFieldSet(this, _RedisCluster_Multi, multi_command_1.default.extend(options), "f"); + } + duplicate(overrides) { + return new (Object.getPrototypeOf(this).constructor)({ + ...__classPrivateFieldGet(this, _RedisCluster_options, "f"), + ...overrides + }); + } + connect() { + return __classPrivateFieldGet(this, _RedisCluster_slots, "f").connect(); + } + async commandsExecutor(command, args) { + const { jsArgs, args: redisArgs, options } = (0, commander_1.transformCommandArguments)(command, args); + return (0, commander_1.transformCommandReply)(command, await this.sendCommand(RedisCluster.extractFirstKey(command, jsArgs, redisArgs), command.IS_READ_ONLY, redisArgs, options), redisArgs.preserve); + } + async sendCommand(firstKey, isReadonly, args, options) { + return __classPrivateFieldGet(this, _RedisCluster_instances, "m", _RedisCluster_execute).call(this, firstKey, isReadonly, client => client.sendCommand(args, options)); + } + async functionsExecutor(fn, args, name) { + const { args: redisArgs, options } = (0, commander_1.transformCommandArguments)(fn, args); + return (0, commander_1.transformCommandReply)(fn, await this.executeFunction(name, fn, args, redisArgs, options), redisArgs.preserve); + } + async executeFunction(name, fn, originalArgs, redisArgs, options) { + return __classPrivateFieldGet(this, _RedisCluster_instances, "m", _RedisCluster_execute).call(this, RedisCluster.extractFirstKey(fn, originalArgs, redisArgs), fn.IS_READ_ONLY, client => client.executeFunction(name, fn, redisArgs, options)); + } + async scriptsExecutor(script, args) { + const { args: redisArgs, options } = (0, commander_1.transformCommandArguments)(script, args); + return (0, commander_1.transformCommandReply)(script, await this.executeScript(script, args, redisArgs, options), redisArgs.preserve); + } + async executeScript(script, originalArgs, redisArgs, options) { + return __classPrivateFieldGet(this, _RedisCluster_instances, "m", _RedisCluster_execute).call(this, RedisCluster.extractFirstKey(script, originalArgs, redisArgs), script.IS_READ_ONLY, client => client.executeScript(script, redisArgs, options)); + } + MULTI(routing) { + return new (__classPrivateFieldGet(this, _RedisCluster_Multi, "f"))((commands, firstKey, chainId) => { + return __classPrivateFieldGet(this, _RedisCluster_instances, "m", _RedisCluster_execute).call(this, firstKey, false, client => client.multiExecutor(commands, undefined, chainId)); + }, routing); + } + async SUBSCRIBE(channels, listener, bufferMode) { + return (await __classPrivateFieldGet(this, _RedisCluster_slots, "f").getPubSubClient()) + .SUBSCRIBE(channels, listener, bufferMode); + } + async UNSUBSCRIBE(channels, listener, bufferMode) { + return __classPrivateFieldGet(this, _RedisCluster_slots, "f").executeUnsubscribeCommand(client => client.UNSUBSCRIBE(channels, listener, bufferMode)); + } + async PSUBSCRIBE(patterns, listener, bufferMode) { + return (await __classPrivateFieldGet(this, _RedisCluster_slots, "f").getPubSubClient()) + .PSUBSCRIBE(patterns, listener, bufferMode); + } + async PUNSUBSCRIBE(patterns, listener, bufferMode) { + return __classPrivateFieldGet(this, _RedisCluster_slots, "f").executeUnsubscribeCommand(client => client.PUNSUBSCRIBE(patterns, listener, bufferMode)); + } + async SSUBSCRIBE(channels, listener, bufferMode) { + const maxCommandRedirections = __classPrivateFieldGet(this, _RedisCluster_options, "f").maxCommandRedirections ?? 16, firstChannel = Array.isArray(channels) ? channels[0] : channels; + let client = await __classPrivateFieldGet(this, _RedisCluster_slots, "f").getShardedPubSubClient(firstChannel); + for (let i = 0;; i++) { + try { + return await client.SSUBSCRIBE(channels, listener, bufferMode); + } + catch (err) { + if (++i > maxCommandRedirections || !(err instanceof errors_1.ErrorReply)) { + throw err; + } + if (err.message.startsWith('MOVED')) { + await __classPrivateFieldGet(this, _RedisCluster_slots, "f").rediscover(client); + client = await __classPrivateFieldGet(this, _RedisCluster_slots, "f").getShardedPubSubClient(firstChannel); + continue; + } + throw err; + } + } + } + SUNSUBSCRIBE(channels, listener, bufferMode) { + return __classPrivateFieldGet(this, _RedisCluster_slots, "f").executeShardedUnsubscribeCommand(Array.isArray(channels) ? channels[0] : channels, client => client.SUNSUBSCRIBE(channels, listener, bufferMode)); + } + quit() { + return __classPrivateFieldGet(this, _RedisCluster_slots, "f").quit(); + } + disconnect() { + return __classPrivateFieldGet(this, _RedisCluster_slots, "f").disconnect(); + } + nodeClient(node) { + return __classPrivateFieldGet(this, _RedisCluster_slots, "f").nodeClient(node); + } + getRandomNode() { + return __classPrivateFieldGet(this, _RedisCluster_slots, "f").getRandomNode(); + } + getSlotRandomNode(slot) { + return __classPrivateFieldGet(this, _RedisCluster_slots, "f").getSlotRandomNode(slot); + } + /** + * @deprecated use `.masters` instead + */ + getMasters() { + return this.masters; + } + /** + * @deprecated use `.slots[]` instead + */ + getSlotMaster(slot) { + return this.slots[slot].master; + } +} +_RedisCluster_options = new WeakMap(), _RedisCluster_slots = new WeakMap(), _RedisCluster_Multi = new WeakMap(), _RedisCluster_instances = new WeakSet(), _RedisCluster_execute = async function _RedisCluster_execute(firstKey, isReadonly, executor) { + const maxCommandRedirections = __classPrivateFieldGet(this, _RedisCluster_options, "f").maxCommandRedirections ?? 16; + let client = await __classPrivateFieldGet(this, _RedisCluster_slots, "f").getClient(firstKey, isReadonly); + for (let i = 0;; i++) { + try { + return await executor(client); + } + catch (err) { + if (++i > maxCommandRedirections || !(err instanceof errors_1.ErrorReply)) { + throw err; + } + if (err.message.startsWith('ASK')) { + const address = err.message.substring(err.message.lastIndexOf(' ') + 1); + let redirectTo = await __classPrivateFieldGet(this, _RedisCluster_slots, "f").getMasterByAddress(address); + if (!redirectTo) { + await __classPrivateFieldGet(this, _RedisCluster_slots, "f").rediscover(client); + redirectTo = await __classPrivateFieldGet(this, _RedisCluster_slots, "f").getMasterByAddress(address); + } + if (!redirectTo) { + throw new Error(`Cannot find node ${address}`); + } + await redirectTo.asking(); + client = redirectTo; + continue; + } + else if (err.message.startsWith('MOVED')) { + await __classPrivateFieldGet(this, _RedisCluster_slots, "f").rediscover(client); + client = await __classPrivateFieldGet(this, _RedisCluster_slots, "f").getClient(firstKey, isReadonly); + continue; + } + throw err; + } + } +}; +exports.default = RedisCluster; +(0, commander_1.attachCommands)({ + BaseClass: RedisCluster, + commands: commands_1.default, + executor: RedisCluster.prototype.commandsExecutor +}); diff --git a/server/node_modules/@redis/client/dist/lib/cluster/multi-command.d.ts b/server/node_modules/@redis/client/dist/lib/cluster/multi-command.d.ts new file mode 100644 index 0000000..84a02c9 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/cluster/multi-command.d.ts @@ -0,0 +1,36 @@ +import COMMANDS from './commands'; +import { RedisCommand, RedisCommandArgument, RedisCommandArguments, RedisCommandRawReply, RedisFunctions, RedisModules, RedisExtensions, RedisScript, RedisScripts, ExcludeMappedString, RedisFunction } from '../commands'; +import { RedisMultiQueuedCommand } from '../multi-command'; +type RedisClusterMultiCommandSignature = (...args: Parameters) => RedisClusterMultiCommandType; +type WithCommands = { + [P in keyof typeof COMMANDS]: RedisClusterMultiCommandSignature<(typeof COMMANDS)[P], M, F, S>; +}; +type WithModules = { + [P in keyof M as ExcludeMappedString

]: { + [C in keyof M[P] as ExcludeMappedString]: RedisClusterMultiCommandSignature; + }; +}; +type WithFunctions = { + [P in keyof F as ExcludeMappedString

]: { + [FF in keyof F[P] as ExcludeMappedString]: RedisClusterMultiCommandSignature; + }; +}; +type WithScripts = { + [P in keyof S as ExcludeMappedString

]: RedisClusterMultiCommandSignature; +}; +export type RedisClusterMultiCommandType = RedisClusterMultiCommand & WithCommands & WithModules & WithFunctions & WithScripts; +export type InstantiableRedisClusterMultiCommandType = new (...args: ConstructorParameters) => RedisClusterMultiCommandType; +export type RedisClusterMultiExecutor = (queue: Array, firstKey?: RedisCommandArgument, chainId?: symbol) => Promise>; +export default class RedisClusterMultiCommand { + #private; + static extend(extensions?: RedisExtensions): InstantiableRedisClusterMultiCommandType; + constructor(executor: RedisClusterMultiExecutor, firstKey?: RedisCommandArgument); + commandsExecutor(command: RedisCommand, args: Array): this; + addCommand(firstKey: RedisCommandArgument | undefined, args: RedisCommandArguments, transformReply?: RedisCommand['transformReply']): this; + functionsExecutor(fn: RedisFunction, args: Array, name: string): this; + scriptsExecutor(script: RedisScript, args: Array): this; + exec(execAsPipeline?: boolean): Promise>; + EXEC: (execAsPipeline?: boolean) => Promise>; + execAsPipeline(): Promise>; +} +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/cluster/multi-command.js b/server/node_modules/@redis/client/dist/lib/cluster/multi-command.js new file mode 100644 index 0000000..1e8e797 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/cluster/multi-command.js @@ -0,0 +1,80 @@ +"use strict"; +var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; +}; +var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var _RedisClusterMultiCommand_multi, _RedisClusterMultiCommand_executor, _RedisClusterMultiCommand_firstKey; +Object.defineProperty(exports, "__esModule", { value: true }); +const commands_1 = require("./commands"); +const multi_command_1 = require("../multi-command"); +const commander_1 = require("../commander"); +const _1 = require("."); +class RedisClusterMultiCommand { + static extend(extensions) { + return (0, commander_1.attachExtensions)({ + BaseClass: RedisClusterMultiCommand, + modulesExecutor: RedisClusterMultiCommand.prototype.commandsExecutor, + modules: extensions?.modules, + functionsExecutor: RedisClusterMultiCommand.prototype.functionsExecutor, + functions: extensions?.functions, + scriptsExecutor: RedisClusterMultiCommand.prototype.scriptsExecutor, + scripts: extensions?.scripts + }); + } + constructor(executor, firstKey) { + _RedisClusterMultiCommand_multi.set(this, new multi_command_1.default()); + _RedisClusterMultiCommand_executor.set(this, void 0); + _RedisClusterMultiCommand_firstKey.set(this, void 0); + Object.defineProperty(this, "EXEC", { + enumerable: true, + configurable: true, + writable: true, + value: this.exec + }); + __classPrivateFieldSet(this, _RedisClusterMultiCommand_executor, executor, "f"); + __classPrivateFieldSet(this, _RedisClusterMultiCommand_firstKey, firstKey, "f"); + } + commandsExecutor(command, args) { + const transformedArguments = command.transformArguments(...args); + __classPrivateFieldSet(this, _RedisClusterMultiCommand_firstKey, __classPrivateFieldGet(this, _RedisClusterMultiCommand_firstKey, "f") ?? _1.default.extractFirstKey(command, args, transformedArguments), "f"); + return this.addCommand(undefined, transformedArguments, command.transformReply); + } + addCommand(firstKey, args, transformReply) { + __classPrivateFieldSet(this, _RedisClusterMultiCommand_firstKey, __classPrivateFieldGet(this, _RedisClusterMultiCommand_firstKey, "f") ?? firstKey, "f"); + __classPrivateFieldGet(this, _RedisClusterMultiCommand_multi, "f").addCommand(args, transformReply); + return this; + } + functionsExecutor(fn, args, name) { + const transformedArguments = __classPrivateFieldGet(this, _RedisClusterMultiCommand_multi, "f").addFunction(name, fn, args); + __classPrivateFieldSet(this, _RedisClusterMultiCommand_firstKey, __classPrivateFieldGet(this, _RedisClusterMultiCommand_firstKey, "f") ?? _1.default.extractFirstKey(fn, args, transformedArguments), "f"); + return this; + } + scriptsExecutor(script, args) { + const transformedArguments = __classPrivateFieldGet(this, _RedisClusterMultiCommand_multi, "f").addScript(script, args); + __classPrivateFieldSet(this, _RedisClusterMultiCommand_firstKey, __classPrivateFieldGet(this, _RedisClusterMultiCommand_firstKey, "f") ?? _1.default.extractFirstKey(script, args, transformedArguments), "f"); + return this; + } + async exec(execAsPipeline = false) { + if (execAsPipeline) { + return this.execAsPipeline(); + } + return __classPrivateFieldGet(this, _RedisClusterMultiCommand_multi, "f").handleExecReplies(await __classPrivateFieldGet(this, _RedisClusterMultiCommand_executor, "f").call(this, __classPrivateFieldGet(this, _RedisClusterMultiCommand_multi, "f").queue, __classPrivateFieldGet(this, _RedisClusterMultiCommand_firstKey, "f"), multi_command_1.default.generateChainId())); + } + async execAsPipeline() { + return __classPrivateFieldGet(this, _RedisClusterMultiCommand_multi, "f").transformReplies(await __classPrivateFieldGet(this, _RedisClusterMultiCommand_executor, "f").call(this, __classPrivateFieldGet(this, _RedisClusterMultiCommand_multi, "f").queue, __classPrivateFieldGet(this, _RedisClusterMultiCommand_firstKey, "f"))); + } +} +_RedisClusterMultiCommand_multi = new WeakMap(), _RedisClusterMultiCommand_executor = new WeakMap(), _RedisClusterMultiCommand_firstKey = new WeakMap(); +exports.default = RedisClusterMultiCommand; +(0, commander_1.attachCommands)({ + BaseClass: RedisClusterMultiCommand, + commands: commands_1.default, + executor: RedisClusterMultiCommand.prototype.commandsExecutor +}); diff --git a/server/node_modules/@redis/client/dist/lib/command-options.d.ts b/server/node_modules/@redis/client/dist/lib/command-options.d.ts new file mode 100644 index 0000000..58cbd46 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/command-options.d.ts @@ -0,0 +1,7 @@ +declare const symbol: unique symbol; +export type CommandOptions = T & { + readonly [symbol]: true; +}; +export declare function commandOptions(options: T): CommandOptions; +export declare function isCommandOptions(options: any): options is CommandOptions; +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/command-options.js b/server/node_modules/@redis/client/dist/lib/command-options.js new file mode 100644 index 0000000..d337994 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/command-options.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isCommandOptions = exports.commandOptions = void 0; +const symbol = Symbol('Command Options'); +function commandOptions(options) { + options[symbol] = true; + return options; +} +exports.commandOptions = commandOptions; +function isCommandOptions(options) { + return options?.[symbol] === true; +} +exports.isCommandOptions = isCommandOptions; diff --git a/server/node_modules/@redis/client/dist/lib/commander.d.ts b/server/node_modules/@redis/client/dist/lib/commander.d.ts new file mode 100644 index 0000000..207fd12 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commander.d.ts @@ -0,0 +1,30 @@ +import { ClientCommandOptions } from './client'; +import { CommandOptions } from './command-options'; +import { RedisCommand, RedisCommandArgument, RedisCommandArguments, RedisCommandReply, RedisFunction, RedisFunctions, RedisModules, RedisScript, RedisScripts } from './commands'; +type Instantiable = new (...args: Array) => T; +type CommandsExecutor = (command: C, args: Array, name: string) => unknown; +interface AttachCommandsConfig { + BaseClass: Instantiable; + commands: Record; + executor: CommandsExecutor; +} +export declare function attachCommands({ BaseClass, commands, executor }: AttachCommandsConfig): void; +interface AttachExtensionsConfig { + BaseClass: T; + modulesExecutor: CommandsExecutor; + modules?: RedisModules; + functionsExecutor: CommandsExecutor; + functions?: RedisFunctions; + scriptsExecutor: CommandsExecutor; + scripts?: RedisScripts; +} +export declare function attachExtensions(config: AttachExtensionsConfig): any; +export declare function transformCommandArguments(command: RedisCommand, args: Array): { + jsArgs: Array; + args: RedisCommandArguments; + options: CommandOptions | undefined; +}; +export declare function transformLegacyCommandArguments(args: Array): Array; +export declare function transformCommandReply(command: C, rawReply: unknown, preserved: unknown): RedisCommandReply; +export declare function fCallArguments(name: RedisCommandArgument, fn: RedisFunction, args: RedisCommandArguments): RedisCommandArguments; +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/commander.js b/server/node_modules/@redis/client/dist/lib/commander.js new file mode 100644 index 0000000..28c15dd --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commander.js @@ -0,0 +1,103 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.fCallArguments = exports.transformCommandReply = exports.transformLegacyCommandArguments = exports.transformCommandArguments = exports.attachExtensions = exports.attachCommands = void 0; +const command_options_1 = require("./command-options"); +function attachCommands({ BaseClass, commands, executor }) { + for (const [name, command] of Object.entries(commands)) { + BaseClass.prototype[name] = function (...args) { + return executor.call(this, command, args, name); + }; + } +} +exports.attachCommands = attachCommands; +function attachExtensions(config) { + let Commander; + if (config.modules) { + Commander = attachWithNamespaces({ + BaseClass: config.BaseClass, + namespaces: config.modules, + executor: config.modulesExecutor + }); + } + if (config.functions) { + Commander = attachWithNamespaces({ + BaseClass: Commander ?? config.BaseClass, + namespaces: config.functions, + executor: config.functionsExecutor + }); + } + if (config.scripts) { + Commander ?? (Commander = class extends config.BaseClass { + }); + attachCommands({ + BaseClass: Commander, + commands: config.scripts, + executor: config.scriptsExecutor + }); + } + return Commander ?? config.BaseClass; +} +exports.attachExtensions = attachExtensions; +function attachWithNamespaces({ BaseClass, namespaces, executor }) { + const Commander = class extends BaseClass { + constructor(...args) { + super(...args); + for (const namespace of Object.keys(namespaces)) { + this[namespace] = Object.create(this[namespace], { + self: { + value: this + } + }); + } + } + }; + for (const [namespace, commands] of Object.entries(namespaces)) { + Commander.prototype[namespace] = {}; + for (const [name, command] of Object.entries(commands)) { + Commander.prototype[namespace][name] = function (...args) { + return executor.call(this.self, command, args, name); + }; + } + } + return Commander; +} +function transformCommandArguments(command, args) { + let options; + if ((0, command_options_1.isCommandOptions)(args[0])) { + options = args[0]; + args = args.slice(1); + } + return { + jsArgs: args, + args: command.transformArguments(...args), + options + }; +} +exports.transformCommandArguments = transformCommandArguments; +function transformLegacyCommandArguments(args) { + return args.flat().map(arg => { + return typeof arg === 'number' || arg instanceof Date ? + arg.toString() : + arg; + }); +} +exports.transformLegacyCommandArguments = transformLegacyCommandArguments; +function transformCommandReply(command, rawReply, preserved) { + if (!command.transformReply) { + return rawReply; + } + return command.transformReply(rawReply, preserved); +} +exports.transformCommandReply = transformCommandReply; +function fCallArguments(name, fn, args) { + const actualArgs = [ + fn.IS_READ_ONLY ? 'FCALL_RO' : 'FCALL', + name + ]; + if (fn.NUMBER_OF_KEYS !== undefined) { + actualArgs.push(fn.NUMBER_OF_KEYS.toString()); + } + actualArgs.push(...args); + return actualArgs; +} +exports.fCallArguments = fCallArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ACL_CAT.d.ts b/server/node_modules/@redis/client/dist/lib/commands/ACL_CAT.d.ts new file mode 100644 index 0000000..8df4390 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ACL_CAT.d.ts @@ -0,0 +1,3 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare function transformArguments(categoryName?: RedisCommandArgument): RedisCommandArguments; +export declare function transformReply(): Array; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ACL_CAT.js b/server/node_modules/@redis/client/dist/lib/commands/ACL_CAT.js new file mode 100644 index 0000000..b6fce00 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ACL_CAT.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments(categoryName) { + const args = ['ACL', 'CAT']; + if (categoryName) { + args.push(categoryName); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ACL_DELUSER.d.ts b/server/node_modules/@redis/client/dist/lib/commands/ACL_DELUSER.d.ts new file mode 100644 index 0000000..d4abe17 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ACL_DELUSER.d.ts @@ -0,0 +1,3 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare function transformArguments(username: RedisCommandArgument | Array): RedisCommandArguments; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ACL_DELUSER.js b/server/node_modules/@redis/client/dist/lib/commands/ACL_DELUSER.js new file mode 100644 index 0000000..9a43ae3 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ACL_DELUSER.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +const generic_transformers_1 = require("./generic-transformers"); +function transformArguments(username) { + return (0, generic_transformers_1.pushVerdictArguments)(['ACL', 'DELUSER'], username); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ACL_DRYRUN.d.ts b/server/node_modules/@redis/client/dist/lib/commands/ACL_DRYRUN.d.ts new file mode 100644 index 0000000..11f1d9a --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ACL_DRYRUN.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(username: RedisCommandArgument, command: Array): RedisCommandArguments; +export declare function transformReply(): RedisCommandArgument; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ACL_DRYRUN.js b/server/node_modules/@redis/client/dist/lib/commands/ACL_DRYRUN.js new file mode 100644 index 0000000..0e4f0f6 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ACL_DRYRUN.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = void 0; +exports.IS_READ_ONLY = true; +function transformArguments(username, command) { + return [ + 'ACL', + 'DRYRUN', + username, + ...command + ]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ACL_GENPASS.d.ts b/server/node_modules/@redis/client/dist/lib/commands/ACL_GENPASS.d.ts new file mode 100644 index 0000000..5f85023 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ACL_GENPASS.d.ts @@ -0,0 +1,3 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare function transformArguments(bits?: number): RedisCommandArguments; +export declare function transformReply(): RedisCommandArgument; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ACL_GENPASS.js b/server/node_modules/@redis/client/dist/lib/commands/ACL_GENPASS.js new file mode 100644 index 0000000..cd2a3a7 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ACL_GENPASS.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments(bits) { + const args = ['ACL', 'GENPASS']; + if (bits) { + args.push(bits.toString()); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ACL_GETUSER.d.ts b/server/node_modules/@redis/client/dist/lib/commands/ACL_GETUSER.d.ts new file mode 100644 index 0000000..2574a35 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ACL_GETUSER.d.ts @@ -0,0 +1,26 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare function transformArguments(username: RedisCommandArgument): RedisCommandArguments; +type AclGetUserRawReply = [ + 'flags', + Array, + 'passwords', + Array, + 'commands', + RedisCommandArgument, + 'keys', + Array | RedisCommandArgument, + 'channels', + Array | RedisCommandArgument, + 'selectors' | undefined, + Array> | undefined +]; +interface AclUser { + flags: Array; + passwords: Array; + commands: RedisCommandArgument; + keys: Array | RedisCommandArgument; + channels: Array | RedisCommandArgument; + selectors?: Array>; +} +export declare function transformReply(reply: AclGetUserRawReply): AclUser; +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ACL_GETUSER.js b/server/node_modules/@redis/client/dist/lib/commands/ACL_GETUSER.js new file mode 100644 index 0000000..6e58582 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ACL_GETUSER.js @@ -0,0 +1,18 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = void 0; +function transformArguments(username) { + return ['ACL', 'GETUSER', username]; +} +exports.transformArguments = transformArguments; +function transformReply(reply) { + return { + flags: reply[1], + passwords: reply[3], + commands: reply[5], + keys: reply[7], + channels: reply[9], + selectors: reply[11] + }; +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ACL_LIST.d.ts b/server/node_modules/@redis/client/dist/lib/commands/ACL_LIST.d.ts new file mode 100644 index 0000000..5e7c41d --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ACL_LIST.d.ts @@ -0,0 +1,3 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare function transformArguments(): RedisCommandArguments; +export declare function transformReply(): Array; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ACL_LIST.js b/server/node_modules/@redis/client/dist/lib/commands/ACL_LIST.js new file mode 100644 index 0000000..fa806d8 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ACL_LIST.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments() { + return ['ACL', 'LIST']; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ACL_LOAD.d.ts b/server/node_modules/@redis/client/dist/lib/commands/ACL_LOAD.d.ts new file mode 100644 index 0000000..2cb83d8 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ACL_LOAD.d.ts @@ -0,0 +1,3 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare function transformArguments(): RedisCommandArguments; +export declare function transformReply(): RedisCommandArgument; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ACL_LOAD.js b/server/node_modules/@redis/client/dist/lib/commands/ACL_LOAD.js new file mode 100644 index 0000000..d433e3b --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ACL_LOAD.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments() { + return ['ACL', 'LOAD']; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ACL_LOG.d.ts b/server/node_modules/@redis/client/dist/lib/commands/ACL_LOG.d.ts new file mode 100644 index 0000000..1534451 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ACL_LOG.d.ts @@ -0,0 +1,29 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare function transformArguments(count?: number): RedisCommandArguments; +type AclLogRawReply = [ + _: RedisCommandArgument, + count: number, + _: RedisCommandArgument, + reason: RedisCommandArgument, + _: RedisCommandArgument, + context: RedisCommandArgument, + _: RedisCommandArgument, + object: RedisCommandArgument, + _: RedisCommandArgument, + username: RedisCommandArgument, + _: RedisCommandArgument, + ageSeconds: RedisCommandArgument, + _: RedisCommandArgument, + clientInfo: RedisCommandArgument +]; +interface AclLog { + count: number; + reason: RedisCommandArgument; + context: RedisCommandArgument; + object: RedisCommandArgument; + username: RedisCommandArgument; + ageSeconds: number; + clientInfo: RedisCommandArgument; +} +export declare function transformReply(reply: Array): Array; +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ACL_LOG.js b/server/node_modules/@redis/client/dist/lib/commands/ACL_LOG.js new file mode 100644 index 0000000..e943bee --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ACL_LOG.js @@ -0,0 +1,23 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = void 0; +function transformArguments(count) { + const args = ['ACL', 'LOG']; + if (count) { + args.push(count.toString()); + } + return args; +} +exports.transformArguments = transformArguments; +function transformReply(reply) { + return reply.map(log => ({ + count: log[1], + reason: log[3], + context: log[5], + object: log[7], + username: log[9], + ageSeconds: Number(log[11]), + clientInfo: log[13] + })); +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ACL_LOG_RESET.d.ts b/server/node_modules/@redis/client/dist/lib/commands/ACL_LOG_RESET.d.ts new file mode 100644 index 0000000..2cb83d8 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ACL_LOG_RESET.d.ts @@ -0,0 +1,3 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare function transformArguments(): RedisCommandArguments; +export declare function transformReply(): RedisCommandArgument; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ACL_LOG_RESET.js b/server/node_modules/@redis/client/dist/lib/commands/ACL_LOG_RESET.js new file mode 100644 index 0000000..1a57c0b --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ACL_LOG_RESET.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments() { + return ['ACL', 'LOG', 'RESET']; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ACL_SAVE.d.ts b/server/node_modules/@redis/client/dist/lib/commands/ACL_SAVE.d.ts new file mode 100644 index 0000000..2cb83d8 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ACL_SAVE.d.ts @@ -0,0 +1,3 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare function transformArguments(): RedisCommandArguments; +export declare function transformReply(): RedisCommandArgument; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ACL_SAVE.js b/server/node_modules/@redis/client/dist/lib/commands/ACL_SAVE.js new file mode 100644 index 0000000..e793f9d --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ACL_SAVE.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments() { + return ['ACL', 'SAVE']; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ACL_SETUSER.d.ts b/server/node_modules/@redis/client/dist/lib/commands/ACL_SETUSER.d.ts new file mode 100644 index 0000000..2a9b744 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ACL_SETUSER.d.ts @@ -0,0 +1,3 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare function transformArguments(username: RedisCommandArgument, rule: RedisCommandArgument | Array): RedisCommandArguments; +export declare function transformReply(): RedisCommandArgument; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ACL_SETUSER.js b/server/node_modules/@redis/client/dist/lib/commands/ACL_SETUSER.js new file mode 100644 index 0000000..2421845 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ACL_SETUSER.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +const generic_transformers_1 = require("./generic-transformers"); +function transformArguments(username, rule) { + return (0, generic_transformers_1.pushVerdictArguments)(['ACL', 'SETUSER', username], rule); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ACL_USERS.d.ts b/server/node_modules/@redis/client/dist/lib/commands/ACL_USERS.d.ts new file mode 100644 index 0000000..5e7c41d --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ACL_USERS.d.ts @@ -0,0 +1,3 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare function transformArguments(): RedisCommandArguments; +export declare function transformReply(): Array; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ACL_USERS.js b/server/node_modules/@redis/client/dist/lib/commands/ACL_USERS.js new file mode 100644 index 0000000..3895e5c --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ACL_USERS.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments() { + return ['ACL', 'USERS']; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ACL_WHOAMI.d.ts b/server/node_modules/@redis/client/dist/lib/commands/ACL_WHOAMI.d.ts new file mode 100644 index 0000000..2cb83d8 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ACL_WHOAMI.d.ts @@ -0,0 +1,3 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare function transformArguments(): RedisCommandArguments; +export declare function transformReply(): RedisCommandArgument; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ACL_WHOAMI.js b/server/node_modules/@redis/client/dist/lib/commands/ACL_WHOAMI.js new file mode 100644 index 0000000..38996a7 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ACL_WHOAMI.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments() { + return ['ACL', 'WHOAMI']; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/APPEND.d.ts b/server/node_modules/@redis/client/dist/lib/commands/APPEND.d.ts new file mode 100644 index 0000000..0db828a --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/APPEND.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument, value: RedisCommandArgument): RedisCommandArguments; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/client/dist/lib/commands/APPEND.js b/server/node_modules/@redis/client/dist/lib/commands/APPEND.js new file mode 100644 index 0000000..93dc4bb --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/APPEND.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, value) { + return ['APPEND', key, value]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ASKING.d.ts b/server/node_modules/@redis/client/dist/lib/commands/ASKING.d.ts new file mode 100644 index 0000000..fdf0501 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ASKING.d.ts @@ -0,0 +1,3 @@ +import { RedisCommandArguments, RedisCommandArgument } from '.'; +export declare function transformArguments(): RedisCommandArguments; +export declare function transformReply(): RedisCommandArgument; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ASKING.js b/server/node_modules/@redis/client/dist/lib/commands/ASKING.js new file mode 100644 index 0000000..3485abd --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ASKING.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments() { + return ['ASKING']; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/AUTH.d.ts b/server/node_modules/@redis/client/dist/lib/commands/AUTH.d.ts new file mode 100644 index 0000000..befe182 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/AUTH.d.ts @@ -0,0 +1,7 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export interface AuthOptions { + username?: RedisCommandArgument; + password: RedisCommandArgument; +} +export declare function transformArguments({ username, password }: AuthOptions): RedisCommandArguments; +export declare function transformReply(): RedisCommandArgument; diff --git a/server/node_modules/@redis/client/dist/lib/commands/AUTH.js b/server/node_modules/@redis/client/dist/lib/commands/AUTH.js new file mode 100644 index 0000000..35ec3b0 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/AUTH.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments({ username, password }) { + if (!username) { + return ['AUTH', password]; + } + return ['AUTH', username, password]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/BGREWRITEAOF.d.ts b/server/node_modules/@redis/client/dist/lib/commands/BGREWRITEAOF.d.ts new file mode 100644 index 0000000..2cb83d8 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/BGREWRITEAOF.d.ts @@ -0,0 +1,3 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare function transformArguments(): RedisCommandArguments; +export declare function transformReply(): RedisCommandArgument; diff --git a/server/node_modules/@redis/client/dist/lib/commands/BGREWRITEAOF.js b/server/node_modules/@redis/client/dist/lib/commands/BGREWRITEAOF.js new file mode 100644 index 0000000..dc7fd6d --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/BGREWRITEAOF.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments() { + return ['BGREWRITEAOF']; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/BGSAVE.d.ts b/server/node_modules/@redis/client/dist/lib/commands/BGSAVE.d.ts new file mode 100644 index 0000000..4631dcc --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/BGSAVE.d.ts @@ -0,0 +1,7 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +interface BgSaveOptions { + SCHEDULE?: true; +} +export declare function transformArguments(options?: BgSaveOptions): RedisCommandArguments; +export declare function transformReply(): RedisCommandArgument; +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/commands/BGSAVE.js b/server/node_modules/@redis/client/dist/lib/commands/BGSAVE.js new file mode 100644 index 0000000..899e2b9 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/BGSAVE.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments(options) { + const args = ['BGSAVE']; + if (options?.SCHEDULE) { + args.push('SCHEDULE'); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/BITCOUNT.d.ts b/server/node_modules/@redis/client/dist/lib/commands/BITCOUNT.d.ts new file mode 100644 index 0000000..4d94255 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/BITCOUNT.d.ts @@ -0,0 +1,11 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +interface BitCountRange { + start: number; + end: number; + mode?: 'BYTE' | 'BIT'; +} +export declare function transformArguments(key: RedisCommandArgument, range?: BitCountRange): RedisCommandArguments; +export declare function transformReply(): number; +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/commands/BITCOUNT.js b/server/node_modules/@redis/client/dist/lib/commands/BITCOUNT.js new file mode 100644 index 0000000..73131b7 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/BITCOUNT.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, range) { + const args = ['BITCOUNT', key]; + if (range) { + args.push(range.start.toString(), range.end.toString()); + if (range.mode) { + args.push(range.mode); + } + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/BITFIELD.d.ts b/server/node_modules/@redis/client/dist/lib/commands/BITFIELD.d.ts new file mode 100644 index 0000000..f7932fd --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/BITFIELD.d.ts @@ -0,0 +1,26 @@ +export declare const FIRST_KEY_INDEX = 1; +export type BitFieldEncoding = `${'i' | 'u'}${number}`; +export interface BitFieldOperation { + operation: S; +} +export interface BitFieldGetOperation extends BitFieldOperation<'GET'> { + encoding: BitFieldEncoding; + offset: number | string; +} +interface BitFieldSetOperation extends BitFieldOperation<'SET'> { + encoding: BitFieldEncoding; + offset: number | string; + value: number; +} +interface BitFieldIncrByOperation extends BitFieldOperation<'INCRBY'> { + encoding: BitFieldEncoding; + offset: number | string; + increment: number; +} +interface BitFieldOverflowOperation extends BitFieldOperation<'OVERFLOW'> { + behavior: string; +} +type BitFieldOperations = Array; +export declare function transformArguments(key: string, operations: BitFieldOperations): Array; +export declare function transformReply(): Array; +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/commands/BITFIELD.js b/server/node_modules/@redis/client/dist/lib/commands/BITFIELD.js new file mode 100644 index 0000000..0550f21 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/BITFIELD.js @@ -0,0 +1,25 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, operations) { + const args = ['BITFIELD', key]; + for (const options of operations) { + switch (options.operation) { + case 'GET': + args.push('GET', options.encoding, options.offset.toString()); + break; + case 'SET': + args.push('SET', options.encoding, options.offset.toString(), options.value.toString()); + break; + case 'INCRBY': + args.push('INCRBY', options.encoding, options.offset.toString(), options.increment.toString()); + break; + case 'OVERFLOW': + args.push('OVERFLOW', options.behavior); + break; + } + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/BITFIELD_RO.d.ts b/server/node_modules/@redis/client/dist/lib/commands/BITFIELD_RO.d.ts new file mode 100644 index 0000000..72c8a79 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/BITFIELD_RO.d.ts @@ -0,0 +1,7 @@ +import { BitFieldGetOperation } from './BITFIELD'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +type BitFieldRoOperations = Array & Partial>>; +export declare function transformArguments(key: string, operations: BitFieldRoOperations): Array; +export declare function transformReply(): Array; +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/commands/BITFIELD_RO.js b/server/node_modules/@redis/client/dist/lib/commands/BITFIELD_RO.js new file mode 100644 index 0000000..5021750 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/BITFIELD_RO.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, operations) { + const args = ['BITFIELD_RO', key]; + for (const operation of operations) { + args.push('GET', operation.encoding, operation.offset.toString()); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/BITOP.d.ts b/server/node_modules/@redis/client/dist/lib/commands/BITOP.d.ts new file mode 100644 index 0000000..12d506d --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/BITOP.d.ts @@ -0,0 +1,6 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 2; +type BitOperations = 'AND' | 'OR' | 'XOR' | 'NOT'; +export declare function transformArguments(operation: BitOperations, destKey: RedisCommandArgument, key: RedisCommandArgument | Array): RedisCommandArguments; +export declare function transformReply(): number; +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/commands/BITOP.js b/server/node_modules/@redis/client/dist/lib/commands/BITOP.js new file mode 100644 index 0000000..1cab80b --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/BITOP.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 2; +function transformArguments(operation, destKey, key) { + return (0, generic_transformers_1.pushVerdictArguments)(['BITOP', operation, destKey], key); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/BITPOS.d.ts b/server/node_modules/@redis/client/dist/lib/commands/BITPOS.d.ts new file mode 100644 index 0000000..4e32356 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/BITPOS.d.ts @@ -0,0 +1,6 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +import { BitValue } from './generic-transformers'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: RedisCommandArgument, bit: BitValue, start?: number, end?: number, mode?: 'BYTE' | 'BIT'): RedisCommandArguments; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/client/dist/lib/commands/BITPOS.js b/server/node_modules/@redis/client/dist/lib/commands/BITPOS.js new file mode 100644 index 0000000..bd880ea --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/BITPOS.js @@ -0,0 +1,19 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, bit, start, end, mode) { + const args = ['BITPOS', key, bit.toString()]; + if (typeof start === 'number') { + args.push(start.toString()); + } + if (typeof end === 'number') { + args.push(end.toString()); + } + if (mode) { + args.push(mode); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/BLMOVE.d.ts b/server/node_modules/@redis/client/dist/lib/commands/BLMOVE.d.ts new file mode 100644 index 0000000..e641a59 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/BLMOVE.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +import { ListSide } from './generic-transformers'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(source: RedisCommandArgument, destination: RedisCommandArgument, sourceDirection: ListSide, destinationDirection: ListSide, timeout: number): RedisCommandArguments; +export declare function transformReply(): RedisCommandArgument | null; diff --git a/server/node_modules/@redis/client/dist/lib/commands/BLMOVE.js b/server/node_modules/@redis/client/dist/lib/commands/BLMOVE.js new file mode 100644 index 0000000..cfa4233 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/BLMOVE.js @@ -0,0 +1,15 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(source, destination, sourceDirection, destinationDirection, timeout) { + return [ + 'BLMOVE', + source, + destination, + sourceDirection, + destinationDirection, + timeout.toString() + ]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/BLMPOP.d.ts b/server/node_modules/@redis/client/dist/lib/commands/BLMPOP.d.ts new file mode 100644 index 0000000..157bbcb --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/BLMPOP.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +import { LMPopOptions, ListSide } from './generic-transformers'; +export declare const FIRST_KEY_INDEX = 3; +export declare function transformArguments(timeout: number, keys: RedisCommandArgument | Array, side: ListSide, options?: LMPopOptions): RedisCommandArguments; +export { transformReply } from './LMPOP'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/BLMPOP.js b/server/node_modules/@redis/client/dist/lib/commands/BLMPOP.js new file mode 100644 index 0000000..046bb86 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/BLMPOP.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 3; +function transformArguments(timeout, keys, side, options) { + return (0, generic_transformers_1.transformLMPopArguments)(['BLMPOP', timeout.toString()], keys, side, options); +} +exports.transformArguments = transformArguments; +var LMPOP_1 = require("./LMPOP"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return LMPOP_1.transformReply; } }); diff --git a/server/node_modules/@redis/client/dist/lib/commands/BLPOP.d.ts b/server/node_modules/@redis/client/dist/lib/commands/BLPOP.d.ts new file mode 100644 index 0000000..8195564 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/BLPOP.d.ts @@ -0,0 +1,10 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(keys: RedisCommandArgument | Array, timeout: number): RedisCommandArguments; +type BLPopRawReply = null | [RedisCommandArgument, RedisCommandArgument]; +type BLPopReply = null | { + key: RedisCommandArgument; + element: RedisCommandArgument; +}; +export declare function transformReply(reply: BLPopRawReply): BLPopReply; +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/commands/BLPOP.js b/server/node_modules/@redis/client/dist/lib/commands/BLPOP.js new file mode 100644 index 0000000..46682ac --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/BLPOP.js @@ -0,0 +1,20 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +function transformArguments(keys, timeout) { + const args = (0, generic_transformers_1.pushVerdictArguments)(['BLPOP'], keys); + args.push(timeout.toString()); + return args; +} +exports.transformArguments = transformArguments; +function transformReply(reply) { + if (reply === null) + return null; + return { + key: reply[0], + element: reply[1] + }; +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/client/dist/lib/commands/BRPOP.d.ts b/server/node_modules/@redis/client/dist/lib/commands/BRPOP.d.ts new file mode 100644 index 0000000..7d3c79f --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/BRPOP.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument | Array, timeout: number): RedisCommandArguments; +export { transformReply } from './BLPOP'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/BRPOP.js b/server/node_modules/@redis/client/dist/lib/commands/BRPOP.js new file mode 100644 index 0000000..64b7f2c --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/BRPOP.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, timeout) { + const args = (0, generic_transformers_1.pushVerdictArguments)(['BRPOP'], key); + args.push(timeout.toString()); + return args; +} +exports.transformArguments = transformArguments; +var BLPOP_1 = require("./BLPOP"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return BLPOP_1.transformReply; } }); diff --git a/server/node_modules/@redis/client/dist/lib/commands/BRPOPLPUSH.d.ts b/server/node_modules/@redis/client/dist/lib/commands/BRPOPLPUSH.d.ts new file mode 100644 index 0000000..72cf017 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/BRPOPLPUSH.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(source: RedisCommandArgument, destination: RedisCommandArgument, timeout: number): RedisCommandArguments; +export declare function transformReply(): RedisCommandArgument | null; diff --git a/server/node_modules/@redis/client/dist/lib/commands/BRPOPLPUSH.js b/server/node_modules/@redis/client/dist/lib/commands/BRPOPLPUSH.js new file mode 100644 index 0000000..31e3e1b --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/BRPOPLPUSH.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(source, destination, timeout) { + return ['BRPOPLPUSH', source, destination, timeout.toString()]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/BZMPOP.d.ts b/server/node_modules/@redis/client/dist/lib/commands/BZMPOP.d.ts new file mode 100644 index 0000000..a79d87b --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/BZMPOP.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +import { SortedSetSide, ZMPopOptions } from './generic-transformers'; +export declare const FIRST_KEY_INDEX = 3; +export declare function transformArguments(timeout: number, keys: RedisCommandArgument | Array, side: SortedSetSide, options?: ZMPopOptions): RedisCommandArguments; +export { transformReply } from './ZMPOP'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/BZMPOP.js b/server/node_modules/@redis/client/dist/lib/commands/BZMPOP.js new file mode 100644 index 0000000..d219eb2 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/BZMPOP.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 3; +function transformArguments(timeout, keys, side, options) { + return (0, generic_transformers_1.transformZMPopArguments)(['BZMPOP', timeout.toString()], keys, side, options); +} +exports.transformArguments = transformArguments; +var ZMPOP_1 = require("./ZMPOP"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return ZMPOP_1.transformReply; } }); diff --git a/server/node_modules/@redis/client/dist/lib/commands/BZPOPMAX.d.ts b/server/node_modules/@redis/client/dist/lib/commands/BZPOPMAX.d.ts new file mode 100644 index 0000000..f619c17 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/BZPOPMAX.d.ts @@ -0,0 +1,10 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +import { ZMember } from './generic-transformers'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument | Array, timeout: number): RedisCommandArguments; +type ZMemberRawReply = [key: RedisCommandArgument, value: RedisCommandArgument, score: RedisCommandArgument] | null; +type BZPopMaxReply = (ZMember & { + key: RedisCommandArgument; +}) | null; +export declare function transformReply(reply: ZMemberRawReply): BZPopMaxReply | null; +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/commands/BZPOPMAX.js b/server/node_modules/@redis/client/dist/lib/commands/BZPOPMAX.js new file mode 100644 index 0000000..ef9a41e --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/BZPOPMAX.js @@ -0,0 +1,21 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, timeout) { + const args = (0, generic_transformers_1.pushVerdictArguments)(['BZPOPMAX'], key); + args.push(timeout.toString()); + return args; +} +exports.transformArguments = transformArguments; +function transformReply(reply) { + if (!reply) + return null; + return { + key: reply[0], + value: reply[1], + score: (0, generic_transformers_1.transformNumberInfinityReply)(reply[2]) + }; +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/client/dist/lib/commands/BZPOPMIN.d.ts b/server/node_modules/@redis/client/dist/lib/commands/BZPOPMIN.d.ts new file mode 100644 index 0000000..5e88b8f --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/BZPOPMIN.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument | Array, timeout: number): RedisCommandArguments; +export { transformReply } from './BZPOPMAX'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/BZPOPMIN.js b/server/node_modules/@redis/client/dist/lib/commands/BZPOPMIN.js new file mode 100644 index 0000000..b55ee96 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/BZPOPMIN.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, timeout) { + const args = (0, generic_transformers_1.pushVerdictArguments)(['BZPOPMIN'], key); + args.push(timeout.toString()); + return args; +} +exports.transformArguments = transformArguments; +var BZPOPMAX_1 = require("./BZPOPMAX"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return BZPOPMAX_1.transformReply; } }); diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLIENT_CACHING.d.ts b/server/node_modules/@redis/client/dist/lib/commands/CLIENT_CACHING.d.ts new file mode 100644 index 0000000..be851a4 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLIENT_CACHING.d.ts @@ -0,0 +1,4 @@ +/// +import { RedisCommandArguments } from '.'; +export declare function transformArguments(value: boolean): RedisCommandArguments; +export declare function transformReply(): 'OK' | Buffer; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLIENT_CACHING.js b/server/node_modules/@redis/client/dist/lib/commands/CLIENT_CACHING.js new file mode 100644 index 0000000..fe230a2 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLIENT_CACHING.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments(value) { + return [ + 'CLIENT', + 'CACHING', + value ? 'YES' : 'NO' + ]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLIENT_GETNAME.d.ts b/server/node_modules/@redis/client/dist/lib/commands/CLIENT_GETNAME.d.ts new file mode 100644 index 0000000..658ceee --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLIENT_GETNAME.d.ts @@ -0,0 +1,3 @@ +import { RedisCommandArguments } from '.'; +export declare function transformArguments(): RedisCommandArguments; +export declare function transformReply(): string | null; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLIENT_GETNAME.js b/server/node_modules/@redis/client/dist/lib/commands/CLIENT_GETNAME.js new file mode 100644 index 0000000..ee67ae8 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLIENT_GETNAME.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments() { + return ['CLIENT', 'GETNAME']; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLIENT_GETREDIR.d.ts b/server/node_modules/@redis/client/dist/lib/commands/CLIENT_GETREDIR.d.ts new file mode 100644 index 0000000..a911ea1 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLIENT_GETREDIR.d.ts @@ -0,0 +1,3 @@ +import { RedisCommandArguments } from '.'; +export declare function transformArguments(): RedisCommandArguments; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLIENT_GETREDIR.js b/server/node_modules/@redis/client/dist/lib/commands/CLIENT_GETREDIR.js new file mode 100644 index 0000000..b4285c9 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLIENT_GETREDIR.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments() { + return ['CLIENT', 'GETREDIR']; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLIENT_ID.d.ts b/server/node_modules/@redis/client/dist/lib/commands/CLIENT_ID.d.ts new file mode 100644 index 0000000..14244d2 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLIENT_ID.d.ts @@ -0,0 +1,3 @@ +export declare const IS_READ_ONLY = true; +export declare function transformArguments(): Array; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLIENT_ID.js b/server/node_modules/@redis/client/dist/lib/commands/CLIENT_ID.js new file mode 100644 index 0000000..1429e4b --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLIENT_ID.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = void 0; +exports.IS_READ_ONLY = true; +function transformArguments() { + return ['CLIENT', 'ID']; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLIENT_INFO.d.ts b/server/node_modules/@redis/client/dist/lib/commands/CLIENT_INFO.d.ts new file mode 100644 index 0000000..04f28d1 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLIENT_INFO.d.ts @@ -0,0 +1,33 @@ +export declare const IS_READ_ONLY = true; +export declare function transformArguments(): Array; +export interface ClientInfoReply { + id: number; + addr: string; + laddr?: string; + fd: number; + name: string; + age: number; + idle: number; + flags: string; + db: number; + sub: number; + psub: number; + ssub?: number; + multi: number; + qbuf: number; + qbufFree: number; + argvMem?: number; + multiMem?: number; + obl: number; + oll: number; + omem: number; + totMem?: number; + events: string; + cmd: string; + user?: string; + redir?: number; + resp?: number; + libName?: string; + libVer?: string; +} +export declare function transformReply(rawReply: string): ClientInfoReply; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLIENT_INFO.js b/server/node_modules/@redis/client/dist/lib/commands/CLIENT_INFO.js new file mode 100644 index 0000000..b46cb47 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLIENT_INFO.js @@ -0,0 +1,57 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = void 0; +exports.IS_READ_ONLY = true; +function transformArguments() { + return ['CLIENT', 'INFO']; +} +exports.transformArguments = transformArguments; +const CLIENT_INFO_REGEX = /([^\s=]+)=([^\s]*)/g; +function transformReply(rawReply) { + const map = {}; + for (const item of rawReply.matchAll(CLIENT_INFO_REGEX)) { + map[item[1]] = item[2]; + } + const reply = { + id: Number(map.id), + addr: map.addr, + fd: Number(map.fd), + name: map.name, + age: Number(map.age), + idle: Number(map.idle), + flags: map.flags, + db: Number(map.db), + sub: Number(map.sub), + psub: Number(map.psub), + multi: Number(map.multi), + qbuf: Number(map.qbuf), + qbufFree: Number(map['qbuf-free']), + argvMem: Number(map['argv-mem']), + obl: Number(map.obl), + oll: Number(map.oll), + omem: Number(map.omem), + totMem: Number(map['tot-mem']), + events: map.events, + cmd: map.cmd, + user: map.user, + libName: map['lib-name'], + libVer: map['lib-ver'], + }; + if (map.laddr !== undefined) { + reply.laddr = map.laddr; + } + if (map.redir !== undefined) { + reply.redir = Number(map.redir); + } + if (map.ssub !== undefined) { + reply.ssub = Number(map.ssub); + } + if (map['multi-mem'] !== undefined) { + reply.multiMem = Number(map['multi-mem']); + } + if (map.resp !== undefined) { + reply.resp = Number(map.resp); + } + return reply; +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLIENT_KILL.d.ts b/server/node_modules/@redis/client/dist/lib/commands/CLIENT_KILL.d.ts new file mode 100644 index 0000000..ddc8af1 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLIENT_KILL.d.ts @@ -0,0 +1,38 @@ +import { RedisCommandArguments } from '.'; +export declare enum ClientKillFilters { + ADDRESS = "ADDR", + LOCAL_ADDRESS = "LADDR", + ID = "ID", + TYPE = "TYPE", + USER = "USER", + SKIP_ME = "SKIPME", + MAXAGE = "MAXAGE" +} +interface KillFilter { + filter: T; +} +interface KillAddress extends KillFilter { + address: `${string}:${number}`; +} +interface KillLocalAddress extends KillFilter { + localAddress: `${string}:${number}`; +} +interface KillId extends KillFilter { + id: number | `${number}`; +} +interface KillType extends KillFilter { + type: 'normal' | 'master' | 'replica' | 'pubsub'; +} +interface KillUser extends KillFilter { + username: string; +} +type KillSkipMe = ClientKillFilters.SKIP_ME | (KillFilter & { + skipMe: boolean; +}); +interface KillMaxAge extends KillFilter { + maxAge: number; +} +type KillFilters = KillAddress | KillLocalAddress | KillId | KillType | KillUser | KillSkipMe | KillMaxAge; +export declare function transformArguments(filters: KillFilters | Array): RedisCommandArguments; +export declare function transformReply(): number; +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLIENT_KILL.js b/server/node_modules/@redis/client/dist/lib/commands/CLIENT_KILL.js new file mode 100644 index 0000000..eaa2b89 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLIENT_KILL.js @@ -0,0 +1,58 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.ClientKillFilters = void 0; +var ClientKillFilters; +(function (ClientKillFilters) { + ClientKillFilters["ADDRESS"] = "ADDR"; + ClientKillFilters["LOCAL_ADDRESS"] = "LADDR"; + ClientKillFilters["ID"] = "ID"; + ClientKillFilters["TYPE"] = "TYPE"; + ClientKillFilters["USER"] = "USER"; + ClientKillFilters["SKIP_ME"] = "SKIPME"; + ClientKillFilters["MAXAGE"] = "MAXAGE"; +})(ClientKillFilters || (exports.ClientKillFilters = ClientKillFilters = {})); +function transformArguments(filters) { + const args = ['CLIENT', 'KILL']; + if (Array.isArray(filters)) { + for (const filter of filters) { + pushFilter(args, filter); + } + } + else { + pushFilter(args, filters); + } + return args; +} +exports.transformArguments = transformArguments; +function pushFilter(args, filter) { + if (filter === ClientKillFilters.SKIP_ME) { + args.push('SKIPME'); + return; + } + args.push(filter.filter); + switch (filter.filter) { + case ClientKillFilters.ADDRESS: + args.push(filter.address); + break; + case ClientKillFilters.LOCAL_ADDRESS: + args.push(filter.localAddress); + break; + case ClientKillFilters.ID: + args.push(typeof filter.id === 'number' ? + filter.id.toString() : + filter.id); + break; + case ClientKillFilters.TYPE: + args.push(filter.type); + break; + case ClientKillFilters.USER: + args.push(filter.username); + break; + case ClientKillFilters.SKIP_ME: + args.push(filter.skipMe ? 'yes' : 'no'); + break; + case ClientKillFilters.MAXAGE: + args.push(filter.maxAge.toString()); + break; + } +} diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLIENT_LIST.d.ts b/server/node_modules/@redis/client/dist/lib/commands/CLIENT_LIST.d.ts new file mode 100644 index 0000000..7c2d4a8 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLIENT_LIST.d.ts @@ -0,0 +1,15 @@ +import { RedisCommandArguments, RedisCommandArgument } from '.'; +import { ClientInfoReply } from './CLIENT_INFO'; +interface ListFilterType { + TYPE: 'NORMAL' | 'MASTER' | 'REPLICA' | 'PUBSUB'; + ID?: never; +} +interface ListFilterId { + ID: Array; + TYPE?: never; +} +export type ListFilter = ListFilterType | ListFilterId; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(filter?: ListFilter): RedisCommandArguments; +export declare function transformReply(rawReply: string): Array; +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLIENT_LIST.js b/server/node_modules/@redis/client/dist/lib/commands/CLIENT_LIST.js new file mode 100644 index 0000000..bdf8694 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLIENT_LIST.js @@ -0,0 +1,28 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = void 0; +const generic_transformers_1 = require("./generic-transformers"); +const CLIENT_INFO_1 = require("./CLIENT_INFO"); +exports.IS_READ_ONLY = true; +function transformArguments(filter) { + let args = ['CLIENT', 'LIST']; + if (filter) { + if (filter.TYPE !== undefined) { + args.push('TYPE', filter.TYPE); + } + else { + args.push('ID'); + args = (0, generic_transformers_1.pushVerdictArguments)(args, filter.ID); + } + } + return args; +} +exports.transformArguments = transformArguments; +function transformReply(rawReply) { + const split = rawReply.split('\n'), length = split.length - 1, reply = []; + for (let i = 0; i < length; i++) { + reply.push((0, CLIENT_INFO_1.transformReply)(split[i])); + } + return reply; +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLIENT_NO-EVICT.d.ts b/server/node_modules/@redis/client/dist/lib/commands/CLIENT_NO-EVICT.d.ts new file mode 100644 index 0000000..be851a4 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLIENT_NO-EVICT.d.ts @@ -0,0 +1,4 @@ +/// +import { RedisCommandArguments } from '.'; +export declare function transformArguments(value: boolean): RedisCommandArguments; +export declare function transformReply(): 'OK' | Buffer; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLIENT_NO-EVICT.js b/server/node_modules/@redis/client/dist/lib/commands/CLIENT_NO-EVICT.js new file mode 100644 index 0000000..f2331e7 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLIENT_NO-EVICT.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments(value) { + return [ + 'CLIENT', + 'NO-EVICT', + value ? 'ON' : 'OFF' + ]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLIENT_NO-TOUCH.d.ts b/server/node_modules/@redis/client/dist/lib/commands/CLIENT_NO-TOUCH.d.ts new file mode 100644 index 0000000..be851a4 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLIENT_NO-TOUCH.d.ts @@ -0,0 +1,4 @@ +/// +import { RedisCommandArguments } from '.'; +export declare function transformArguments(value: boolean): RedisCommandArguments; +export declare function transformReply(): 'OK' | Buffer; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLIENT_NO-TOUCH.js b/server/node_modules/@redis/client/dist/lib/commands/CLIENT_NO-TOUCH.js new file mode 100644 index 0000000..2c72957 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLIENT_NO-TOUCH.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments(value) { + return [ + 'CLIENT', + 'NO-TOUCH', + value ? 'ON' : 'OFF' + ]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLIENT_PAUSE.d.ts b/server/node_modules/@redis/client/dist/lib/commands/CLIENT_PAUSE.d.ts new file mode 100644 index 0000000..09294c0 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLIENT_PAUSE.d.ts @@ -0,0 +1,4 @@ +/// +import { RedisCommandArguments } from '.'; +export declare function transformArguments(timeout: number, mode?: 'WRITE' | 'ALL'): RedisCommandArguments; +export declare function transformReply(): 'OK' | Buffer; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLIENT_PAUSE.js b/server/node_modules/@redis/client/dist/lib/commands/CLIENT_PAUSE.js new file mode 100644 index 0000000..127c0d5 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLIENT_PAUSE.js @@ -0,0 +1,15 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments(timeout, mode) { + const args = [ + 'CLIENT', + 'PAUSE', + timeout.toString() + ]; + if (mode) { + args.push(mode); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLIENT_SETNAME.d.ts b/server/node_modules/@redis/client/dist/lib/commands/CLIENT_SETNAME.d.ts new file mode 100644 index 0000000..11c70f3 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLIENT_SETNAME.d.ts @@ -0,0 +1,3 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare function transformArguments(name: RedisCommandArgument): RedisCommandArguments; +export declare function transformReply(): RedisCommandArgument; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLIENT_SETNAME.js b/server/node_modules/@redis/client/dist/lib/commands/CLIENT_SETNAME.js new file mode 100644 index 0000000..2dacf4d --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLIENT_SETNAME.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments(name) { + return ['CLIENT', 'SETNAME', name]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLIENT_TRACKING.d.ts b/server/node_modules/@redis/client/dist/lib/commands/CLIENT_TRACKING.d.ts new file mode 100644 index 0000000..072d4c5 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLIENT_TRACKING.d.ts @@ -0,0 +1,20 @@ +/// +import { RedisCommandArgument, RedisCommandArguments } from '.'; +interface CommonOptions { + REDIRECT?: number; + NOLOOP?: boolean; +} +interface BroadcastOptions { + BCAST?: boolean; + PREFIX?: RedisCommandArgument | Array; +} +interface OptInOptions { + OPTIN?: boolean; +} +interface OptOutOptions { + OPTOUT?: boolean; +} +type ClientTrackingOptions = CommonOptions & (BroadcastOptions | OptInOptions | OptOutOptions); +export declare function transformArguments(mode: M, options?: M extends true ? ClientTrackingOptions : undefined): RedisCommandArguments; +export declare function transformReply(): 'OK' | Buffer; +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLIENT_TRACKING.js b/server/node_modules/@redis/client/dist/lib/commands/CLIENT_TRACKING.js new file mode 100644 index 0000000..24817a8 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLIENT_TRACKING.js @@ -0,0 +1,48 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments(mode, options) { + const args = [ + 'CLIENT', + 'TRACKING', + mode ? 'ON' : 'OFF' + ]; + if (mode) { + if (options?.REDIRECT) { + args.push('REDIRECT', options.REDIRECT.toString()); + } + if (isBroadcast(options)) { + args.push('BCAST'); + if (options?.PREFIX) { + if (Array.isArray(options.PREFIX)) { + for (const prefix of options.PREFIX) { + args.push('PREFIX', prefix); + } + } + else { + args.push('PREFIX', options.PREFIX); + } + } + } + else if (isOptIn(options)) { + args.push('OPTIN'); + } + else if (isOptOut(options)) { + args.push('OPTOUT'); + } + if (options?.NOLOOP) { + args.push('NOLOOP'); + } + } + return args; +} +exports.transformArguments = transformArguments; +function isBroadcast(options) { + return options?.BCAST === true; +} +function isOptIn(options) { + return options?.OPTIN === true; +} +function isOptOut(options) { + return options?.OPTOUT === true; +} diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLIENT_TRACKINGINFO.d.ts b/server/node_modules/@redis/client/dist/lib/commands/CLIENT_TRACKINGINFO.d.ts new file mode 100644 index 0000000..2c7519a --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLIENT_TRACKINGINFO.d.ts @@ -0,0 +1,17 @@ +import { RedisCommandArguments } from '.'; +export declare function transformArguments(): RedisCommandArguments; +type RawReply = [ + 'flags', + Array, + 'redirect', + number, + 'prefixes', + Array +]; +interface Reply { + flags: Set; + redirect: number; + prefixes: Array; +} +export declare function transformReply(reply: RawReply): Reply; +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLIENT_TRACKINGINFO.js b/server/node_modules/@redis/client/dist/lib/commands/CLIENT_TRACKINGINFO.js new file mode 100644 index 0000000..8b38d3e --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLIENT_TRACKINGINFO.js @@ -0,0 +1,15 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = void 0; +function transformArguments() { + return ['CLIENT', 'TRACKINGINFO']; +} +exports.transformArguments = transformArguments; +function transformReply(reply) { + return { + flags: new Set(reply[1]), + redirect: reply[3], + prefixes: reply[5] + }; +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLIENT_UNPAUSE.d.ts b/server/node_modules/@redis/client/dist/lib/commands/CLIENT_UNPAUSE.d.ts new file mode 100644 index 0000000..85ed25f --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLIENT_UNPAUSE.d.ts @@ -0,0 +1,4 @@ +/// +import { RedisCommandArguments } from '.'; +export declare function transformArguments(): RedisCommandArguments; +export declare function transformReply(): 'OK' | Buffer; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLIENT_UNPAUSE.js b/server/node_modules/@redis/client/dist/lib/commands/CLIENT_UNPAUSE.js new file mode 100644 index 0000000..8b34bec --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLIENT_UNPAUSE.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments() { + return ['CLIENT', 'UNPAUSE']; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_ADDSLOTS.d.ts b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_ADDSLOTS.d.ts new file mode 100644 index 0000000..a7379a2 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_ADDSLOTS.d.ts @@ -0,0 +1,3 @@ +import { RedisCommandArguments } from '.'; +export declare function transformArguments(slots: number | Array): RedisCommandArguments; +export declare function transformReply(): string; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_ADDSLOTS.js b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_ADDSLOTS.js new file mode 100644 index 0000000..be3c57f --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_ADDSLOTS.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +const generic_transformers_1 = require("./generic-transformers"); +function transformArguments(slots) { + return (0, generic_transformers_1.pushVerdictNumberArguments)(['CLUSTER', 'ADDSLOTS'], slots); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_ADDSLOTSRANGE.d.ts b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_ADDSLOTSRANGE.d.ts new file mode 100644 index 0000000..d300f0a --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_ADDSLOTSRANGE.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArguments } from '.'; +import { SlotRange } from './generic-transformers'; +export declare function transformArguments(ranges: SlotRange | Array): RedisCommandArguments; +export declare function transformReply(): 'OK'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_ADDSLOTSRANGE.js b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_ADDSLOTSRANGE.js new file mode 100644 index 0000000..2f5a581 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_ADDSLOTSRANGE.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +const generic_transformers_1 = require("./generic-transformers"); +function transformArguments(ranges) { + return (0, generic_transformers_1.pushSlotRangesArguments)(['CLUSTER', 'ADDSLOTSRANGE'], ranges); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_BUMPEPOCH.d.ts b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_BUMPEPOCH.d.ts new file mode 100644 index 0000000..4c0c07c --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_BUMPEPOCH.d.ts @@ -0,0 +1,2 @@ +export declare function transformArguments(): Array; +export declare function transformReply(): 'BUMPED' | 'STILL'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_BUMPEPOCH.js b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_BUMPEPOCH.js new file mode 100644 index 0000000..7d9928a --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_BUMPEPOCH.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments() { + return ['CLUSTER', 'BUMPEPOCH']; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_COUNT-FAILURE-REPORTS.d.ts b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_COUNT-FAILURE-REPORTS.d.ts new file mode 100644 index 0000000..fe4cef2 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_COUNT-FAILURE-REPORTS.d.ts @@ -0,0 +1,2 @@ +export declare function transformArguments(nodeId: string): Array; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_COUNT-FAILURE-REPORTS.js b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_COUNT-FAILURE-REPORTS.js new file mode 100644 index 0000000..84d3e42 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_COUNT-FAILURE-REPORTS.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments(nodeId) { + return ['CLUSTER', 'COUNT-FAILURE-REPORTS', nodeId]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_COUNTKEYSINSLOT.d.ts b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_COUNTKEYSINSLOT.d.ts new file mode 100644 index 0000000..8b2d0da --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_COUNTKEYSINSLOT.d.ts @@ -0,0 +1,2 @@ +export declare function transformArguments(slot: number): Array; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_COUNTKEYSINSLOT.js b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_COUNTKEYSINSLOT.js new file mode 100644 index 0000000..de29644 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_COUNTKEYSINSLOT.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments(slot) { + return ['CLUSTER', 'COUNTKEYSINSLOT', slot.toString()]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_DELSLOTS.d.ts b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_DELSLOTS.d.ts new file mode 100644 index 0000000..7fd38c2 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_DELSLOTS.d.ts @@ -0,0 +1,3 @@ +import { RedisCommandArguments } from '.'; +export declare function transformArguments(slots: number | Array): RedisCommandArguments; +export declare function transformReply(): 'OK'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_DELSLOTS.js b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_DELSLOTS.js new file mode 100644 index 0000000..ba06017 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_DELSLOTS.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +const generic_transformers_1 = require("./generic-transformers"); +function transformArguments(slots) { + return (0, generic_transformers_1.pushVerdictNumberArguments)(['CLUSTER', 'DELSLOTS'], slots); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_DELSLOTSRANGE.d.ts b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_DELSLOTSRANGE.d.ts new file mode 100644 index 0000000..d300f0a --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_DELSLOTSRANGE.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArguments } from '.'; +import { SlotRange } from './generic-transformers'; +export declare function transformArguments(ranges: SlotRange | Array): RedisCommandArguments; +export declare function transformReply(): 'OK'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_DELSLOTSRANGE.js b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_DELSLOTSRANGE.js new file mode 100644 index 0000000..bf57903 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_DELSLOTSRANGE.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +const generic_transformers_1 = require("./generic-transformers"); +function transformArguments(ranges) { + return (0, generic_transformers_1.pushSlotRangesArguments)(['CLUSTER', 'DELSLOTSRANGE'], ranges); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_FAILOVER.d.ts b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_FAILOVER.d.ts new file mode 100644 index 0000000..83cd679 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_FAILOVER.d.ts @@ -0,0 +1,6 @@ +export declare enum FailoverModes { + FORCE = "FORCE", + TAKEOVER = "TAKEOVER" +} +export declare function transformArguments(mode?: FailoverModes): Array; +export declare function transformReply(): 'OK'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_FAILOVER.js b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_FAILOVER.js new file mode 100644 index 0000000..2709cfe --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_FAILOVER.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FailoverModes = void 0; +var FailoverModes; +(function (FailoverModes) { + FailoverModes["FORCE"] = "FORCE"; + FailoverModes["TAKEOVER"] = "TAKEOVER"; +})(FailoverModes || (exports.FailoverModes = FailoverModes = {})); +function transformArguments(mode) { + const args = ['CLUSTER', 'FAILOVER']; + if (mode) { + args.push(mode); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_FLUSHSLOTS.d.ts b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_FLUSHSLOTS.d.ts new file mode 100644 index 0000000..42b48b6 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_FLUSHSLOTS.d.ts @@ -0,0 +1,2 @@ +export declare function transformArguments(): Array; +export declare function transformReply(): 'OK'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_FLUSHSLOTS.js b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_FLUSHSLOTS.js new file mode 100644 index 0000000..3ce25ee --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_FLUSHSLOTS.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments() { + return ['CLUSTER', 'FLUSHSLOTS']; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_FORGET.d.ts b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_FORGET.d.ts new file mode 100644 index 0000000..f820b9f --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_FORGET.d.ts @@ -0,0 +1,2 @@ +export declare function transformArguments(nodeId: string): Array; +export declare function transformReply(): 'OK'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_FORGET.js b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_FORGET.js new file mode 100644 index 0000000..177eb52 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_FORGET.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments(nodeId) { + return ['CLUSTER', 'FORGET', nodeId]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_GETKEYSINSLOT.d.ts b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_GETKEYSINSLOT.d.ts new file mode 100644 index 0000000..b234842 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_GETKEYSINSLOT.d.ts @@ -0,0 +1,2 @@ +export declare function transformArguments(slot: number, count: number): Array; +export declare function transformReply(): Array; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_GETKEYSINSLOT.js b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_GETKEYSINSLOT.js new file mode 100644 index 0000000..a151bda --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_GETKEYSINSLOT.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments(slot, count) { + return ['CLUSTER', 'GETKEYSINSLOT', slot.toString(), count.toString()]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_INFO.d.ts b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_INFO.d.ts new file mode 100644 index 0000000..7f6d965 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_INFO.d.ts @@ -0,0 +1,21 @@ +export declare function transformArguments(): Array; +interface ClusterInfoReply { + state: string; + slots: { + assigned: number; + ok: number; + pfail: number; + fail: number; + }; + knownNodes: number; + size: number; + currentEpoch: number; + myEpoch: number; + stats: { + messagesSent: number; + messagesReceived: number; + }; +} +export declare function transformReply(reply: string): ClusterInfoReply; +export declare function extractLineValue(line: string): string; +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_INFO.js b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_INFO.js new file mode 100644 index 0000000..3a81925 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_INFO.js @@ -0,0 +1,32 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.extractLineValue = exports.transformReply = exports.transformArguments = void 0; +function transformArguments() { + return ['CLUSTER', 'INFO']; +} +exports.transformArguments = transformArguments; +function transformReply(reply) { + const lines = reply.split('\r\n'); + return { + state: extractLineValue(lines[0]), + slots: { + assigned: Number(extractLineValue(lines[1])), + ok: Number(extractLineValue(lines[2])), + pfail: Number(extractLineValue(lines[3])), + fail: Number(extractLineValue(lines[4])) + }, + knownNodes: Number(extractLineValue(lines[5])), + size: Number(extractLineValue(lines[6])), + currentEpoch: Number(extractLineValue(lines[7])), + myEpoch: Number(extractLineValue(lines[8])), + stats: { + messagesSent: Number(extractLineValue(lines[9])), + messagesReceived: Number(extractLineValue(lines[10])) + } + }; +} +exports.transformReply = transformReply; +function extractLineValue(line) { + return line.substring(line.indexOf(':') + 1); +} +exports.extractLineValue = extractLineValue; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_KEYSLOT.d.ts b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_KEYSLOT.d.ts new file mode 100644 index 0000000..181d809 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_KEYSLOT.d.ts @@ -0,0 +1,2 @@ +export declare function transformArguments(key: string): Array; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_KEYSLOT.js b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_KEYSLOT.js new file mode 100644 index 0000000..d4ba8d7 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_KEYSLOT.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments(key) { + return ['CLUSTER', 'KEYSLOT', key]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_LINKS.d.ts b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_LINKS.d.ts new file mode 100644 index 0000000..13bb777 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_LINKS.d.ts @@ -0,0 +1,25 @@ +export declare function transformArguments(): Array; +type ClusterLinksRawReply = Array<[ + 'direction', + string, + 'node', + string, + 'createTime', + number, + 'events', + string, + 'send-buffer-allocated', + number, + 'send-buffer-used', + number +]>; +type ClusterLinksReply = Array<{ + direction: string; + node: string; + createTime: number; + events: string; + sendBufferAllocated: number; + sendBufferUsed: number; +}>; +export declare function transformReply(reply: ClusterLinksRawReply): ClusterLinksReply; +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_LINKS.js b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_LINKS.js new file mode 100644 index 0000000..815fd7a --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_LINKS.js @@ -0,0 +1,18 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = void 0; +function transformArguments() { + return ['CLUSTER', 'LINKS']; +} +exports.transformArguments = transformArguments; +function transformReply(reply) { + return reply.map(peerLink => ({ + direction: peerLink[1], + node: peerLink[3], + createTime: Number(peerLink[5]), + events: peerLink[7], + sendBufferAllocated: Number(peerLink[9]), + sendBufferUsed: Number(peerLink[11]) + })); +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_MEET.d.ts b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_MEET.d.ts new file mode 100644 index 0000000..00af6a9 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_MEET.d.ts @@ -0,0 +1,2 @@ +export declare function transformArguments(ip: string, port: number): Array; +export declare function transformReply(): 'OK'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_MEET.js b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_MEET.js new file mode 100644 index 0000000..5a32515 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_MEET.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments(ip, port) { + return ['CLUSTER', 'MEET', ip, port.toString()]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_MYID.d.ts b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_MYID.d.ts new file mode 100644 index 0000000..f7ef9c4 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_MYID.d.ts @@ -0,0 +1,2 @@ +export declare function transformArguments(): Array; +export declare function transformReply(): string; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_MYID.js b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_MYID.js new file mode 100644 index 0000000..184b4fa --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_MYID.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments() { + return ['CLUSTER', 'MYID']; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_MYSHARDID.d.ts b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_MYSHARDID.d.ts new file mode 100644 index 0000000..2e0d31e --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_MYSHARDID.d.ts @@ -0,0 +1,4 @@ +/// +export declare const IS_READ_ONLY = true; +export declare function transformArguments(): string[]; +export declare function transformReply(): string | Buffer; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_MYSHARDID.js b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_MYSHARDID.js new file mode 100644 index 0000000..269a2a4 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_MYSHARDID.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = void 0; +exports.IS_READ_ONLY = true; +function transformArguments() { + return ['CLUSTER', 'MYSHARDID']; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_NODES.d.ts b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_NODES.d.ts new file mode 100644 index 0000000..52d4e3d --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_NODES.d.ts @@ -0,0 +1,28 @@ +export declare function transformArguments(): Array; +export declare enum RedisClusterNodeLinkStates { + CONNECTED = "connected", + DISCONNECTED = "disconnected" +} +interface RedisClusterNodeAddress { + host: string; + port: number; + cport: number | null; +} +export interface RedisClusterReplicaNode extends RedisClusterNodeAddress { + id: string; + address: string; + flags: Array; + pingSent: number; + pongRecv: number; + configEpoch: number; + linkState: RedisClusterNodeLinkStates; +} +export interface RedisClusterMasterNode extends RedisClusterReplicaNode { + slots: Array<{ + from: number; + to: number; + }>; + replicas: Array; +} +export declare function transformReply(reply: string): Array; +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_NODES.js b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_NODES.js new file mode 100644 index 0000000..a88989e --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_NODES.js @@ -0,0 +1,74 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.RedisClusterNodeLinkStates = exports.transformArguments = void 0; +function transformArguments() { + return ['CLUSTER', 'NODES']; +} +exports.transformArguments = transformArguments; +var RedisClusterNodeLinkStates; +(function (RedisClusterNodeLinkStates) { + RedisClusterNodeLinkStates["CONNECTED"] = "connected"; + RedisClusterNodeLinkStates["DISCONNECTED"] = "disconnected"; +})(RedisClusterNodeLinkStates || (exports.RedisClusterNodeLinkStates = RedisClusterNodeLinkStates = {})); +function transformReply(reply) { + const lines = reply.split('\n'); + lines.pop(); // last line is empty + const mastersMap = new Map(), replicasMap = new Map(); + for (const line of lines) { + const [id, address, flags, masterId, pingSent, pongRecv, configEpoch, linkState, ...slots] = line.split(' '), node = { + id, + address, + ...transformNodeAddress(address), + flags: flags.split(','), + pingSent: Number(pingSent), + pongRecv: Number(pongRecv), + configEpoch: Number(configEpoch), + linkState: linkState + }; + if (masterId === '-') { + let replicas = replicasMap.get(id); + if (!replicas) { + replicas = []; + replicasMap.set(id, replicas); + } + mastersMap.set(id, { + ...node, + slots: slots.map(slot => { + // TODO: importing & exporting (https://redis.io/commands/cluster-nodes#special-slot-entries) + const [fromString, toString] = slot.split('-', 2), from = Number(fromString); + return { + from, + to: toString ? Number(toString) : from + }; + }), + replicas + }); + } + else { + const replicas = replicasMap.get(masterId); + if (!replicas) { + replicasMap.set(masterId, [node]); + } + else { + replicas.push(node); + } + } + } + return [...mastersMap.values()]; +} +exports.transformReply = transformReply; +function transformNodeAddress(address) { + const indexOfColon = address.lastIndexOf(':'), indexOfAt = address.indexOf('@', indexOfColon), host = address.substring(0, indexOfColon); + if (indexOfAt === -1) { + return { + host, + port: Number(address.substring(indexOfColon + 1)), + cport: null + }; + } + return { + host: address.substring(0, indexOfColon), + port: Number(address.substring(indexOfColon + 1, indexOfAt)), + cport: Number(address.substring(indexOfAt + 1)) + }; +} diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_REPLICAS.d.ts b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_REPLICAS.d.ts new file mode 100644 index 0000000..73e9e4b --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_REPLICAS.d.ts @@ -0,0 +1,2 @@ +export declare function transformArguments(nodeId: string): Array; +export { transformReply } from './CLUSTER_NODES'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_REPLICAS.js b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_REPLICAS.js new file mode 100644 index 0000000..bc83f4e --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_REPLICAS.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = void 0; +function transformArguments(nodeId) { + return ['CLUSTER', 'REPLICAS', nodeId]; +} +exports.transformArguments = transformArguments; +var CLUSTER_NODES_1 = require("./CLUSTER_NODES"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return CLUSTER_NODES_1.transformReply; } }); diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_REPLICATE.d.ts b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_REPLICATE.d.ts new file mode 100644 index 0000000..f820b9f --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_REPLICATE.d.ts @@ -0,0 +1,2 @@ +export declare function transformArguments(nodeId: string): Array; +export declare function transformReply(): 'OK'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_REPLICATE.js b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_REPLICATE.js new file mode 100644 index 0000000..931b74c --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_REPLICATE.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments(nodeId) { + return ['CLUSTER', 'REPLICATE', nodeId]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_RESET.d.ts b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_RESET.d.ts new file mode 100644 index 0000000..dfb60c3 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_RESET.d.ts @@ -0,0 +1,2 @@ +export declare function transformArguments(mode?: 'HARD' | 'SOFT'): Array; +export declare function transformReply(): string; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_RESET.js b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_RESET.js new file mode 100644 index 0000000..da95cd0 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_RESET.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments(mode) { + const args = ['CLUSTER', 'RESET']; + if (mode) { + args.push(mode); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_SAVECONFIG.d.ts b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_SAVECONFIG.d.ts new file mode 100644 index 0000000..42b48b6 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_SAVECONFIG.d.ts @@ -0,0 +1,2 @@ +export declare function transformArguments(): Array; +export declare function transformReply(): 'OK'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_SAVECONFIG.js b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_SAVECONFIG.js new file mode 100644 index 0000000..2742c94 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_SAVECONFIG.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments() { + return ['CLUSTER', 'SAVECONFIG']; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_SET-CONFIG-EPOCH.d.ts b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_SET-CONFIG-EPOCH.d.ts new file mode 100644 index 0000000..f580d42 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_SET-CONFIG-EPOCH.d.ts @@ -0,0 +1,2 @@ +export declare function transformArguments(configEpoch: number): Array; +export declare function transformReply(): 'OK'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_SET-CONFIG-EPOCH.js b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_SET-CONFIG-EPOCH.js new file mode 100644 index 0000000..b4d3b73 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_SET-CONFIG-EPOCH.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments(configEpoch) { + return ['CLUSTER', 'SET-CONFIG-EPOCH', configEpoch.toString()]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_SETSLOT.d.ts b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_SETSLOT.d.ts new file mode 100644 index 0000000..aae29e0 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_SETSLOT.d.ts @@ -0,0 +1,8 @@ +export declare enum ClusterSlotStates { + IMPORTING = "IMPORTING", + MIGRATING = "MIGRATING", + STABLE = "STABLE", + NODE = "NODE" +} +export declare function transformArguments(slot: number, state: ClusterSlotStates, nodeId?: string): Array; +export declare function transformReply(): 'OK'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_SETSLOT.js b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_SETSLOT.js new file mode 100644 index 0000000..bf726e1 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_SETSLOT.js @@ -0,0 +1,18 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.ClusterSlotStates = void 0; +var ClusterSlotStates; +(function (ClusterSlotStates) { + ClusterSlotStates["IMPORTING"] = "IMPORTING"; + ClusterSlotStates["MIGRATING"] = "MIGRATING"; + ClusterSlotStates["STABLE"] = "STABLE"; + ClusterSlotStates["NODE"] = "NODE"; +})(ClusterSlotStates || (exports.ClusterSlotStates = ClusterSlotStates = {})); +function transformArguments(slot, state, nodeId) { + const args = ['CLUSTER', 'SETSLOT', slot.toString(), state]; + if (nodeId) { + args.push(nodeId); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_SLOTS.d.ts b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_SLOTS.d.ts new file mode 100644 index 0000000..76888e0 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_SLOTS.d.ts @@ -0,0 +1,22 @@ +import { RedisCommandArguments } from '.'; +export declare function transformArguments(): RedisCommandArguments; +type ClusterSlotsRawNode = [ip: string, port: number, id: string]; +type ClusterSlotsRawReply = Array<[ + from: number, + to: number, + master: ClusterSlotsRawNode, + ...replicas: Array +]>; +export interface ClusterSlotsNode { + ip: string; + port: number; + id: string; +} +export type ClusterSlotsReply = Array<{ + from: number; + to: number; + master: ClusterSlotsNode; + replicas: Array; +}>; +export declare function transformReply(reply: ClusterSlotsRawReply): ClusterSlotsReply; +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_SLOTS.js b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_SLOTS.js new file mode 100644 index 0000000..1ee9206 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CLUSTER_SLOTS.js @@ -0,0 +1,26 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = void 0; +function transformArguments() { + return ['CLUSTER', 'SLOTS']; +} +exports.transformArguments = transformArguments; +; +function transformReply(reply) { + return reply.map(([from, to, master, ...replicas]) => { + return { + from, + to, + master: transformNode(master), + replicas: replicas.map(transformNode) + }; + }); +} +exports.transformReply = transformReply; +function transformNode([ip, port, id]) { + return { + ip, + port, + id + }; +} diff --git a/server/node_modules/@redis/client/dist/lib/commands/COMMAND.d.ts b/server/node_modules/@redis/client/dist/lib/commands/COMMAND.d.ts new file mode 100644 index 0000000..f1730e0 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/COMMAND.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArguments } from '.'; +import { CommandRawReply, CommandReply } from './generic-transformers'; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(): RedisCommandArguments; +export declare function transformReply(reply: Array): Array; diff --git a/server/node_modules/@redis/client/dist/lib/commands/COMMAND.js b/server/node_modules/@redis/client/dist/lib/commands/COMMAND.js new file mode 100644 index 0000000..b482a91 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/COMMAND.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.IS_READ_ONLY = true; +function transformArguments() { + return ['COMMAND']; +} +exports.transformArguments = transformArguments; +function transformReply(reply) { + return reply.map(generic_transformers_1.transformCommandReply); +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/client/dist/lib/commands/COMMAND_COUNT.d.ts b/server/node_modules/@redis/client/dist/lib/commands/COMMAND_COUNT.d.ts new file mode 100644 index 0000000..a2461a3 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/COMMAND_COUNT.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArguments } from '.'; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(): RedisCommandArguments; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/client/dist/lib/commands/COMMAND_COUNT.js b/server/node_modules/@redis/client/dist/lib/commands/COMMAND_COUNT.js new file mode 100644 index 0000000..c417a38 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/COMMAND_COUNT.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = void 0; +exports.IS_READ_ONLY = true; +function transformArguments() { + return ['COMMAND', 'COUNT']; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/COMMAND_GETKEYS.d.ts b/server/node_modules/@redis/client/dist/lib/commands/COMMAND_GETKEYS.d.ts new file mode 100644 index 0000000..8979786 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/COMMAND_GETKEYS.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(args: Array): RedisCommandArguments; +export declare function transformReply(): Array; diff --git a/server/node_modules/@redis/client/dist/lib/commands/COMMAND_GETKEYS.js b/server/node_modules/@redis/client/dist/lib/commands/COMMAND_GETKEYS.js new file mode 100644 index 0000000..8a3e57e --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/COMMAND_GETKEYS.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = void 0; +exports.IS_READ_ONLY = true; +function transformArguments(args) { + return ['COMMAND', 'GETKEYS', ...args]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/COMMAND_GETKEYSANDFLAGS.d.ts b/server/node_modules/@redis/client/dist/lib/commands/COMMAND_GETKEYSANDFLAGS.d.ts new file mode 100644 index 0000000..2dcb14c --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/COMMAND_GETKEYSANDFLAGS.d.ts @@ -0,0 +1,13 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(args: Array): RedisCommandArguments; +type KeysAndFlagsRawReply = Array<[ + RedisCommandArgument, + RedisCommandArguments +]>; +type KeysAndFlagsReply = Array<{ + key: RedisCommandArgument; + flags: RedisCommandArguments; +}>; +export declare function transformReply(reply: KeysAndFlagsRawReply): KeysAndFlagsReply; +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/commands/COMMAND_GETKEYSANDFLAGS.js b/server/node_modules/@redis/client/dist/lib/commands/COMMAND_GETKEYSANDFLAGS.js new file mode 100644 index 0000000..76c0fcd --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/COMMAND_GETKEYSANDFLAGS.js @@ -0,0 +1,15 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = void 0; +exports.IS_READ_ONLY = true; +function transformArguments(args) { + return ['COMMAND', 'GETKEYSANDFLAGS', ...args]; +} +exports.transformArguments = transformArguments; +function transformReply(reply) { + return reply.map(([key, flags]) => ({ + key, + flags + })); +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/client/dist/lib/commands/COMMAND_INFO.d.ts b/server/node_modules/@redis/client/dist/lib/commands/COMMAND_INFO.d.ts new file mode 100644 index 0000000..80fce32 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/COMMAND_INFO.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArguments } from '.'; +import { CommandRawReply, CommandReply } from './generic-transformers'; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(commands: Array): RedisCommandArguments; +export declare function transformReply(reply: Array): Array; diff --git a/server/node_modules/@redis/client/dist/lib/commands/COMMAND_INFO.js b/server/node_modules/@redis/client/dist/lib/commands/COMMAND_INFO.js new file mode 100644 index 0000000..552c991 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/COMMAND_INFO.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.IS_READ_ONLY = true; +function transformArguments(commands) { + return ['COMMAND', 'INFO', ...commands]; +} +exports.transformArguments = transformArguments; +function transformReply(reply) { + return reply.map(command => command ? (0, generic_transformers_1.transformCommandReply)(command) : null); +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/client/dist/lib/commands/COMMAND_LIST.d.ts b/server/node_modules/@redis/client/dist/lib/commands/COMMAND_LIST.d.ts new file mode 100644 index 0000000..7f8bdaa --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/COMMAND_LIST.d.ts @@ -0,0 +1,14 @@ +import { RedisCommandArguments } from '.'; +export declare const IS_READ_ONLY = true; +export declare enum FilterBy { + MODULE = "MODULE", + ACLCAT = "ACLCAT", + PATTERN = "PATTERN" +} +interface Filter { + filterBy: FilterBy; + value: string; +} +export declare function transformArguments(filter?: Filter): RedisCommandArguments; +export declare function transformReply(): Array; +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/commands/COMMAND_LIST.js b/server/node_modules/@redis/client/dist/lib/commands/COMMAND_LIST.js new file mode 100644 index 0000000..ffda6c2 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/COMMAND_LIST.js @@ -0,0 +1,18 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FilterBy = exports.IS_READ_ONLY = void 0; +exports.IS_READ_ONLY = true; +var FilterBy; +(function (FilterBy) { + FilterBy["MODULE"] = "MODULE"; + FilterBy["ACLCAT"] = "ACLCAT"; + FilterBy["PATTERN"] = "PATTERN"; +})(FilterBy || (exports.FilterBy = FilterBy = {})); +function transformArguments(filter) { + const args = ['COMMAND', 'LIST']; + if (filter) { + args.push('FILTERBY', filter.filterBy, filter.value); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CONFIG_GET.d.ts b/server/node_modules/@redis/client/dist/lib/commands/CONFIG_GET.d.ts new file mode 100644 index 0000000..063a85a --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CONFIG_GET.d.ts @@ -0,0 +1,2 @@ +export declare function transformArguments(parameter: string): Array; +export { transformTuplesReply as transformReply } from './generic-transformers'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CONFIG_GET.js b/server/node_modules/@redis/client/dist/lib/commands/CONFIG_GET.js new file mode 100644 index 0000000..646c774 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CONFIG_GET.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = void 0; +function transformArguments(parameter) { + return ['CONFIG', 'GET', parameter]; +} +exports.transformArguments = transformArguments; +var generic_transformers_1 = require("./generic-transformers"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return generic_transformers_1.transformTuplesReply; } }); diff --git a/server/node_modules/@redis/client/dist/lib/commands/CONFIG_RESETSTAT.d.ts b/server/node_modules/@redis/client/dist/lib/commands/CONFIG_RESETSTAT.d.ts new file mode 100644 index 0000000..f7ef9c4 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CONFIG_RESETSTAT.d.ts @@ -0,0 +1,2 @@ +export declare function transformArguments(): Array; +export declare function transformReply(): string; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CONFIG_RESETSTAT.js b/server/node_modules/@redis/client/dist/lib/commands/CONFIG_RESETSTAT.js new file mode 100644 index 0000000..debd3b2 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CONFIG_RESETSTAT.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments() { + return ['CONFIG', 'RESETSTAT']; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CONFIG_REWRITE.d.ts b/server/node_modules/@redis/client/dist/lib/commands/CONFIG_REWRITE.d.ts new file mode 100644 index 0000000..f7ef9c4 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CONFIG_REWRITE.d.ts @@ -0,0 +1,2 @@ +export declare function transformArguments(): Array; +export declare function transformReply(): string; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CONFIG_REWRITE.js b/server/node_modules/@redis/client/dist/lib/commands/CONFIG_REWRITE.js new file mode 100644 index 0000000..b78ddbc --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CONFIG_REWRITE.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments() { + return ['CONFIG', 'REWRITE']; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CONFIG_SET.d.ts b/server/node_modules/@redis/client/dist/lib/commands/CONFIG_SET.d.ts new file mode 100644 index 0000000..a6deda1 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CONFIG_SET.d.ts @@ -0,0 +1,6 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +type SingleParameter = [parameter: RedisCommandArgument, value: RedisCommandArgument]; +type MultipleParameters = [config: Record]; +export declare function transformArguments(...[parameterOrConfig, value]: SingleParameter | MultipleParameters): RedisCommandArguments; +export declare function transformReply(): string; +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/commands/CONFIG_SET.js b/server/node_modules/@redis/client/dist/lib/commands/CONFIG_SET.js new file mode 100644 index 0000000..6af6707 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/CONFIG_SET.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments(...[parameterOrConfig, value]) { + const args = ['CONFIG', 'SET']; + if (typeof parameterOrConfig === 'string') { + args.push(parameterOrConfig, value); + } + else { + for (const [key, value] of Object.entries(parameterOrConfig)) { + args.push(key, value); + } + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/COPY.d.ts b/server/node_modules/@redis/client/dist/lib/commands/COPY.d.ts new file mode 100644 index 0000000..d266fee --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/COPY.d.ts @@ -0,0 +1,8 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +interface CopyCommandOptions { + destinationDb?: number; + replace?: boolean; +} +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(source: RedisCommandArgument, destination: RedisCommandArgument, options?: CopyCommandOptions): RedisCommandArguments; +export { transformBooleanReply as transformReply } from './generic-transformers'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/COPY.js b/server/node_modules/@redis/client/dist/lib/commands/COPY.js new file mode 100644 index 0000000..e6090a6 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/COPY.js @@ -0,0 +1,17 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(source, destination, options) { + const args = ['COPY', source, destination]; + if (options?.destinationDb) { + args.push('DB', options.destinationDb.toString()); + } + if (options?.replace) { + args.push('REPLACE'); + } + return args; +} +exports.transformArguments = transformArguments; +var generic_transformers_1 = require("./generic-transformers"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return generic_transformers_1.transformBooleanReply; } }); diff --git a/server/node_modules/@redis/client/dist/lib/commands/DBSIZE.d.ts b/server/node_modules/@redis/client/dist/lib/commands/DBSIZE.d.ts new file mode 100644 index 0000000..14244d2 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/DBSIZE.d.ts @@ -0,0 +1,3 @@ +export declare const IS_READ_ONLY = true; +export declare function transformArguments(): Array; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/client/dist/lib/commands/DBSIZE.js b/server/node_modules/@redis/client/dist/lib/commands/DBSIZE.js new file mode 100644 index 0000000..c50332d --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/DBSIZE.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = void 0; +exports.IS_READ_ONLY = true; +function transformArguments() { + return ['DBSIZE']; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/DECR.d.ts b/server/node_modules/@redis/client/dist/lib/commands/DECR.d.ts new file mode 100644 index 0000000..c35a19c --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/DECR.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument): RedisCommandArguments; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/client/dist/lib/commands/DECR.js b/server/node_modules/@redis/client/dist/lib/commands/DECR.js new file mode 100644 index 0000000..a7fbc3d --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/DECR.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key) { + return ['DECR', key]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/DECRBY.d.ts b/server/node_modules/@redis/client/dist/lib/commands/DECRBY.d.ts new file mode 100644 index 0000000..65d04dc --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/DECRBY.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument, decrement: number): RedisCommandArguments; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/client/dist/lib/commands/DECRBY.js b/server/node_modules/@redis/client/dist/lib/commands/DECRBY.js new file mode 100644 index 0000000..f119275 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/DECRBY.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, decrement) { + return ['DECRBY', key, decrement.toString()]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/DEL.d.ts b/server/node_modules/@redis/client/dist/lib/commands/DEL.d.ts new file mode 100644 index 0000000..8c2d71e --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/DEL.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(keys: RedisCommandArgument | Array): RedisCommandArguments; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/client/dist/lib/commands/DEL.js b/server/node_modules/@redis/client/dist/lib/commands/DEL.js new file mode 100644 index 0000000..bc2a5c0 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/DEL.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +function transformArguments(keys) { + return (0, generic_transformers_1.pushVerdictArguments)(['DEL'], keys); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/DISCARD.d.ts b/server/node_modules/@redis/client/dist/lib/commands/DISCARD.d.ts new file mode 100644 index 0000000..3e8dbce --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/DISCARD.d.ts @@ -0,0 +1,3 @@ +import { RedisCommandArgument } from '.'; +export declare function transformArguments(): Array; +export declare function transformReply(): RedisCommandArgument; diff --git a/server/node_modules/@redis/client/dist/lib/commands/DISCARD.js b/server/node_modules/@redis/client/dist/lib/commands/DISCARD.js new file mode 100644 index 0000000..eb19c5f --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/DISCARD.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments() { + return ['DISCARD']; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/DUMP.d.ts b/server/node_modules/@redis/client/dist/lib/commands/DUMP.d.ts new file mode 100644 index 0000000..287366c --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/DUMP.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument): RedisCommandArguments; +export declare function transformReply(): RedisCommandArgument; diff --git a/server/node_modules/@redis/client/dist/lib/commands/DUMP.js b/server/node_modules/@redis/client/dist/lib/commands/DUMP.js new file mode 100644 index 0000000..9b3d68a --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/DUMP.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key) { + return ['DUMP', key]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ECHO.d.ts b/server/node_modules/@redis/client/dist/lib/commands/ECHO.d.ts new file mode 100644 index 0000000..144daca --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ECHO.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(message: RedisCommandArgument): RedisCommandArguments; +export declare function transformReply(): RedisCommandArgument; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ECHO.js b/server/node_modules/@redis/client/dist/lib/commands/ECHO.js new file mode 100644 index 0000000..06370d2 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ECHO.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = void 0; +exports.IS_READ_ONLY = true; +function transformArguments(message) { + return ['ECHO', message]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/EVAL.d.ts b/server/node_modules/@redis/client/dist/lib/commands/EVAL.d.ts new file mode 100644 index 0000000..f084f6f --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/EVAL.d.ts @@ -0,0 +1,3 @@ +import { evalFirstKeyIndex, EvalOptions } from './generic-transformers'; +export declare const FIRST_KEY_INDEX: typeof evalFirstKeyIndex; +export declare function transformArguments(script: string, options?: EvalOptions): Array; diff --git a/server/node_modules/@redis/client/dist/lib/commands/EVAL.js b/server/node_modules/@redis/client/dist/lib/commands/EVAL.js new file mode 100644 index 0000000..f159be6 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/EVAL.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = generic_transformers_1.evalFirstKeyIndex; +function transformArguments(script, options) { + return (0, generic_transformers_1.pushEvalArguments)(['EVAL', script], options); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/EVALSHA.d.ts b/server/node_modules/@redis/client/dist/lib/commands/EVALSHA.d.ts new file mode 100644 index 0000000..1e07b96 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/EVALSHA.d.ts @@ -0,0 +1,3 @@ +import { evalFirstKeyIndex, EvalOptions } from './generic-transformers'; +export declare const FIRST_KEY_INDEX: typeof evalFirstKeyIndex; +export declare function transformArguments(sha1: string, options?: EvalOptions): Array; diff --git a/server/node_modules/@redis/client/dist/lib/commands/EVALSHA.js b/server/node_modules/@redis/client/dist/lib/commands/EVALSHA.js new file mode 100644 index 0000000..6339378 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/EVALSHA.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = generic_transformers_1.evalFirstKeyIndex; +function transformArguments(sha1, options) { + return (0, generic_transformers_1.pushEvalArguments)(['EVALSHA', sha1], options); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/EVALSHA_RO.d.ts b/server/node_modules/@redis/client/dist/lib/commands/EVALSHA_RO.d.ts new file mode 100644 index 0000000..ba5e8fd --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/EVALSHA_RO.d.ts @@ -0,0 +1,4 @@ +import { evalFirstKeyIndex, EvalOptions } from './generic-transformers'; +export declare const FIRST_KEY_INDEX: typeof evalFirstKeyIndex; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(sha1: string, options?: EvalOptions): Array; diff --git a/server/node_modules/@redis/client/dist/lib/commands/EVALSHA_RO.js b/server/node_modules/@redis/client/dist/lib/commands/EVALSHA_RO.js new file mode 100644 index 0000000..7eead4d --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/EVALSHA_RO.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = generic_transformers_1.evalFirstKeyIndex; +exports.IS_READ_ONLY = true; +function transformArguments(sha1, options) { + return (0, generic_transformers_1.pushEvalArguments)(['EVALSHA_RO', sha1], options); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/EVAL_RO.d.ts b/server/node_modules/@redis/client/dist/lib/commands/EVAL_RO.d.ts new file mode 100644 index 0000000..327b45b --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/EVAL_RO.d.ts @@ -0,0 +1,4 @@ +import { evalFirstKeyIndex, EvalOptions } from './generic-transformers'; +export declare const FIRST_KEY_INDEX: typeof evalFirstKeyIndex; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(script: string, options?: EvalOptions): Array; diff --git a/server/node_modules/@redis/client/dist/lib/commands/EVAL_RO.js b/server/node_modules/@redis/client/dist/lib/commands/EVAL_RO.js new file mode 100644 index 0000000..9aae49f --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/EVAL_RO.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = generic_transformers_1.evalFirstKeyIndex; +exports.IS_READ_ONLY = true; +function transformArguments(script, options) { + return (0, generic_transformers_1.pushEvalArguments)(['EVAL_RO', script], options); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/EXISTS.d.ts b/server/node_modules/@redis/client/dist/lib/commands/EXISTS.d.ts new file mode 100644 index 0000000..4401897 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/EXISTS.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(keys: RedisCommandArgument | Array): RedisCommandArguments; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/client/dist/lib/commands/EXISTS.js b/server/node_modules/@redis/client/dist/lib/commands/EXISTS.js new file mode 100644 index 0000000..e389339 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/EXISTS.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(keys) { + return (0, generic_transformers_1.pushVerdictArguments)(['EXISTS'], keys); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/EXPIRE.d.ts b/server/node_modules/@redis/client/dist/lib/commands/EXPIRE.d.ts new file mode 100644 index 0000000..c226f18 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/EXPIRE.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument, seconds: number, mode?: 'NX' | 'XX' | 'GT' | 'LT'): RedisCommandArguments; +export { transformBooleanReply as transformReply } from './generic-transformers'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/EXPIRE.js b/server/node_modules/@redis/client/dist/lib/commands/EXPIRE.js new file mode 100644 index 0000000..143d0b6 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/EXPIRE.js @@ -0,0 +1,14 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, seconds, mode) { + const args = ['EXPIRE', key, seconds.toString()]; + if (mode) { + args.push(mode); + } + return args; +} +exports.transformArguments = transformArguments; +var generic_transformers_1 = require("./generic-transformers"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return generic_transformers_1.transformBooleanReply; } }); diff --git a/server/node_modules/@redis/client/dist/lib/commands/EXPIREAT.d.ts b/server/node_modules/@redis/client/dist/lib/commands/EXPIREAT.d.ts new file mode 100644 index 0000000..44d630b --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/EXPIREAT.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument, timestamp: number | Date, mode?: 'NX' | 'XX' | 'GT' | 'LT'): RedisCommandArguments; +export { transformBooleanReply as transformReply } from './generic-transformers'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/EXPIREAT.js b/server/node_modules/@redis/client/dist/lib/commands/EXPIREAT.js new file mode 100644 index 0000000..88c9f54 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/EXPIREAT.js @@ -0,0 +1,19 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, timestamp, mode) { + const args = [ + 'EXPIREAT', + key, + (0, generic_transformers_1.transformEXAT)(timestamp) + ]; + if (mode) { + args.push(mode); + } + return args; +} +exports.transformArguments = transformArguments; +var generic_transformers_2 = require("./generic-transformers"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return generic_transformers_2.transformBooleanReply; } }); diff --git a/server/node_modules/@redis/client/dist/lib/commands/EXPIRETIME.d.ts b/server/node_modules/@redis/client/dist/lib/commands/EXPIRETIME.d.ts new file mode 100644 index 0000000..c35a19c --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/EXPIRETIME.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument): RedisCommandArguments; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/client/dist/lib/commands/EXPIRETIME.js b/server/node_modules/@redis/client/dist/lib/commands/EXPIRETIME.js new file mode 100644 index 0000000..3e0c4e2 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/EXPIRETIME.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key) { + return ['EXPIRETIME', key]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/FAILOVER.d.ts b/server/node_modules/@redis/client/dist/lib/commands/FAILOVER.d.ts new file mode 100644 index 0000000..8d74bf9 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/FAILOVER.d.ts @@ -0,0 +1,12 @@ +interface FailoverOptions { + TO?: { + host: string; + port: number; + FORCE?: true; + }; + ABORT?: true; + TIMEOUT?: number; +} +export declare function transformArguments(options?: FailoverOptions): Array; +export declare function transformReply(): string; +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/commands/FAILOVER.js b/server/node_modules/@redis/client/dist/lib/commands/FAILOVER.js new file mode 100644 index 0000000..e6db685 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/FAILOVER.js @@ -0,0 +1,20 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments(options) { + const args = ['FAILOVER']; + if (options?.TO) { + args.push('TO', options.TO.host, options.TO.port.toString()); + if (options.TO.FORCE) { + args.push('FORCE'); + } + } + if (options?.ABORT) { + args.push('ABORT'); + } + if (options?.TIMEOUT) { + args.push('TIMEOUT', options.TIMEOUT.toString()); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/FCALL.d.ts b/server/node_modules/@redis/client/dist/lib/commands/FCALL.d.ts new file mode 100644 index 0000000..79da897 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/FCALL.d.ts @@ -0,0 +1,3 @@ +import { evalFirstKeyIndex, EvalOptions } from './generic-transformers'; +export declare const FIRST_KEY_INDEX: typeof evalFirstKeyIndex; +export declare function transformArguments(fn: string, options?: EvalOptions): Array; diff --git a/server/node_modules/@redis/client/dist/lib/commands/FCALL.js b/server/node_modules/@redis/client/dist/lib/commands/FCALL.js new file mode 100644 index 0000000..eb75f71 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/FCALL.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = generic_transformers_1.evalFirstKeyIndex; +function transformArguments(fn, options) { + return (0, generic_transformers_1.pushEvalArguments)(['FCALL', fn], options); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/FCALL_RO.d.ts b/server/node_modules/@redis/client/dist/lib/commands/FCALL_RO.d.ts new file mode 100644 index 0000000..b963229 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/FCALL_RO.d.ts @@ -0,0 +1,4 @@ +import { evalFirstKeyIndex, EvalOptions } from './generic-transformers'; +export declare const FIRST_KEY_INDEX: typeof evalFirstKeyIndex; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(fn: string, options?: EvalOptions): Array; diff --git a/server/node_modules/@redis/client/dist/lib/commands/FCALL_RO.js b/server/node_modules/@redis/client/dist/lib/commands/FCALL_RO.js new file mode 100644 index 0000000..e086497 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/FCALL_RO.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = generic_transformers_1.evalFirstKeyIndex; +exports.IS_READ_ONLY = true; +function transformArguments(fn, options) { + return (0, generic_transformers_1.pushEvalArguments)(['FCALL_RO', fn], options); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/FLUSHALL.d.ts b/server/node_modules/@redis/client/dist/lib/commands/FLUSHALL.d.ts new file mode 100644 index 0000000..b0a35d1 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/FLUSHALL.d.ts @@ -0,0 +1,6 @@ +export declare enum RedisFlushModes { + ASYNC = "ASYNC", + SYNC = "SYNC" +} +export declare function transformArguments(mode?: RedisFlushModes): Array; +export declare function transformReply(): string; diff --git a/server/node_modules/@redis/client/dist/lib/commands/FLUSHALL.js b/server/node_modules/@redis/client/dist/lib/commands/FLUSHALL.js new file mode 100644 index 0000000..38c1ff1 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/FLUSHALL.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.RedisFlushModes = void 0; +var RedisFlushModes; +(function (RedisFlushModes) { + RedisFlushModes["ASYNC"] = "ASYNC"; + RedisFlushModes["SYNC"] = "SYNC"; +})(RedisFlushModes || (exports.RedisFlushModes = RedisFlushModes = {})); +function transformArguments(mode) { + const args = ['FLUSHALL']; + if (mode) { + args.push(mode); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/FLUSHDB.d.ts b/server/node_modules/@redis/client/dist/lib/commands/FLUSHDB.d.ts new file mode 100644 index 0000000..34c668d --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/FLUSHDB.d.ts @@ -0,0 +1,3 @@ +import { RedisFlushModes } from './FLUSHALL'; +export declare function transformArguments(mode?: RedisFlushModes): Array; +export declare function transformReply(): string; diff --git a/server/node_modules/@redis/client/dist/lib/commands/FLUSHDB.js b/server/node_modules/@redis/client/dist/lib/commands/FLUSHDB.js new file mode 100644 index 0000000..3d52b30 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/FLUSHDB.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments(mode) { + const args = ['FLUSHDB']; + if (mode) { + args.push(mode); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/FUNCTION_DELETE.d.ts b/server/node_modules/@redis/client/dist/lib/commands/FUNCTION_DELETE.d.ts new file mode 100644 index 0000000..bffe6ff --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/FUNCTION_DELETE.d.ts @@ -0,0 +1,3 @@ +import { RedisCommandArguments } from '.'; +export declare function transformArguments(library: string): RedisCommandArguments; +export declare function transformReply(): 'OK'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/FUNCTION_DELETE.js b/server/node_modules/@redis/client/dist/lib/commands/FUNCTION_DELETE.js new file mode 100644 index 0000000..750d230 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/FUNCTION_DELETE.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments(library) { + return ['FUNCTION', 'DELETE', library]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/FUNCTION_DUMP.d.ts b/server/node_modules/@redis/client/dist/lib/commands/FUNCTION_DUMP.d.ts new file mode 100644 index 0000000..2cb83d8 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/FUNCTION_DUMP.d.ts @@ -0,0 +1,3 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare function transformArguments(): RedisCommandArguments; +export declare function transformReply(): RedisCommandArgument; diff --git a/server/node_modules/@redis/client/dist/lib/commands/FUNCTION_DUMP.js b/server/node_modules/@redis/client/dist/lib/commands/FUNCTION_DUMP.js new file mode 100644 index 0000000..a372bf0 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/FUNCTION_DUMP.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments() { + return ['FUNCTION', 'DUMP']; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/FUNCTION_FLUSH.d.ts b/server/node_modules/@redis/client/dist/lib/commands/FUNCTION_FLUSH.d.ts new file mode 100644 index 0000000..782dfae --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/FUNCTION_FLUSH.d.ts @@ -0,0 +1,3 @@ +import { RedisCommandArguments } from '.'; +export declare function transformArguments(mode?: 'ASYNC' | 'SYNC'): RedisCommandArguments; +export declare function transformReply(): 'OK'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/FUNCTION_FLUSH.js b/server/node_modules/@redis/client/dist/lib/commands/FUNCTION_FLUSH.js new file mode 100644 index 0000000..b922cfa --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/FUNCTION_FLUSH.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments(mode) { + const args = ['FUNCTION', 'FLUSH']; + if (mode) { + args.push(mode); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/FUNCTION_KILL.d.ts b/server/node_modules/@redis/client/dist/lib/commands/FUNCTION_KILL.d.ts new file mode 100644 index 0000000..add4a5f --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/FUNCTION_KILL.d.ts @@ -0,0 +1,3 @@ +import { RedisCommandArguments } from '.'; +export declare function transformArguments(): RedisCommandArguments; +export declare function transformReply(): 'OK'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/FUNCTION_KILL.js b/server/node_modules/@redis/client/dist/lib/commands/FUNCTION_KILL.js new file mode 100644 index 0000000..a19919f --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/FUNCTION_KILL.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments() { + return ['FUNCTION', 'KILL']; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/FUNCTION_LIST.d.ts b/server/node_modules/@redis/client/dist/lib/commands/FUNCTION_LIST.d.ts new file mode 100644 index 0000000..95fc892 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/FUNCTION_LIST.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArguments } from '.'; +import { FunctionListItemReply, FunctionListRawItemReply } from './generic-transformers'; +export declare function transformArguments(pattern?: string): RedisCommandArguments; +export declare function transformReply(reply: Array): Array; diff --git a/server/node_modules/@redis/client/dist/lib/commands/FUNCTION_LIST.js b/server/node_modules/@redis/client/dist/lib/commands/FUNCTION_LIST.js new file mode 100644 index 0000000..216ee6b --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/FUNCTION_LIST.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = void 0; +const generic_transformers_1 = require("./generic-transformers"); +function transformArguments(pattern) { + const args = ['FUNCTION', 'LIST']; + if (pattern) { + args.push(pattern); + } + return args; +} +exports.transformArguments = transformArguments; +function transformReply(reply) { + return reply.map(generic_transformers_1.transformFunctionListItemReply); +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/client/dist/lib/commands/FUNCTION_LIST_WITHCODE.d.ts b/server/node_modules/@redis/client/dist/lib/commands/FUNCTION_LIST_WITHCODE.d.ts new file mode 100644 index 0000000..5ae6a77 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/FUNCTION_LIST_WITHCODE.d.ts @@ -0,0 +1,13 @@ +import { RedisCommandArguments } from '.'; +import { FunctionListItemReply, FunctionListRawItemReply } from './generic-transformers'; +export declare function transformArguments(pattern?: string): RedisCommandArguments; +type FunctionListWithCodeRawItemReply = [ + ...FunctionListRawItemReply, + 'library_code', + string +]; +interface FunctionListWithCodeItemReply extends FunctionListItemReply { + libraryCode: string; +} +export declare function transformReply(reply: Array): Array; +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/commands/FUNCTION_LIST_WITHCODE.js b/server/node_modules/@redis/client/dist/lib/commands/FUNCTION_LIST_WITHCODE.js new file mode 100644 index 0000000..3ac65dc --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/FUNCTION_LIST_WITHCODE.js @@ -0,0 +1,18 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = void 0; +const FUNCTION_LIST_1 = require("./FUNCTION_LIST"); +const generic_transformers_1 = require("./generic-transformers"); +function transformArguments(pattern) { + const args = (0, FUNCTION_LIST_1.transformArguments)(pattern); + args.push('WITHCODE'); + return args; +} +exports.transformArguments = transformArguments; +function transformReply(reply) { + return reply.map(library => ({ + ...(0, generic_transformers_1.transformFunctionListItemReply)(library), + libraryCode: library[7] + })); +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/client/dist/lib/commands/FUNCTION_LOAD.d.ts b/server/node_modules/@redis/client/dist/lib/commands/FUNCTION_LOAD.d.ts new file mode 100644 index 0000000..da91865 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/FUNCTION_LOAD.d.ts @@ -0,0 +1,7 @@ +import { RedisCommandArguments } from '.'; +interface FunctionLoadOptions { + REPLACE?: boolean; +} +export declare function transformArguments(code: string, options?: FunctionLoadOptions): RedisCommandArguments; +export declare function transformReply(): string; +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/commands/FUNCTION_LOAD.js b/server/node_modules/@redis/client/dist/lib/commands/FUNCTION_LOAD.js new file mode 100644 index 0000000..51892a0 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/FUNCTION_LOAD.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments(code, options) { + const args = ['FUNCTION', 'LOAD']; + if (options?.REPLACE) { + args.push('REPLACE'); + } + args.push(code); + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/FUNCTION_RESTORE.d.ts b/server/node_modules/@redis/client/dist/lib/commands/FUNCTION_RESTORE.d.ts new file mode 100644 index 0000000..6d1188e --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/FUNCTION_RESTORE.d.ts @@ -0,0 +1,3 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare function transformArguments(dump: RedisCommandArgument, mode?: 'FLUSH' | 'APPEND' | 'REPLACE'): RedisCommandArguments; +export declare function transformReply(): 'OK'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/FUNCTION_RESTORE.js b/server/node_modules/@redis/client/dist/lib/commands/FUNCTION_RESTORE.js new file mode 100644 index 0000000..2d368bf --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/FUNCTION_RESTORE.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments(dump, mode) { + const args = ['FUNCTION', 'RESTORE', dump]; + if (mode) { + args.push(mode); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/FUNCTION_STATS.d.ts b/server/node_modules/@redis/client/dist/lib/commands/FUNCTION_STATS.d.ts new file mode 100644 index 0000000..a170273 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/FUNCTION_STATS.d.ts @@ -0,0 +1,28 @@ +import { RedisCommandArguments } from '.'; +export declare function transformArguments(): RedisCommandArguments; +type FunctionStatsRawReply = [ + 'running_script', + null | [ + 'name', + string, + 'command', + string, + 'duration_ms', + number + ], + 'engines', + Array +]; +interface FunctionStatsReply { + runningScript: null | { + name: string; + command: string; + durationMs: number; + }; + engines: Record; +} +export declare function transformReply(reply: FunctionStatsRawReply): FunctionStatsReply; +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/commands/FUNCTION_STATS.js b/server/node_modules/@redis/client/dist/lib/commands/FUNCTION_STATS.js new file mode 100644 index 0000000..27c7de4 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/FUNCTION_STATS.js @@ -0,0 +1,25 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = void 0; +function transformArguments() { + return ['FUNCTION', 'STATS']; +} +exports.transformArguments = transformArguments; +function transformReply(reply) { + const engines = Object.create(null); + for (let i = 0; i < reply[3].length; i++) { + engines[reply[3][i]] = { + librariesCount: reply[3][++i][1], + functionsCount: reply[3][i][3] + }; + } + return { + runningScript: reply[1] === null ? null : { + name: reply[1][1], + command: reply[1][3], + durationMs: reply[1][5] + }, + engines + }; +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/client/dist/lib/commands/GEOADD.d.ts b/server/node_modules/@redis/client/dist/lib/commands/GEOADD.d.ts new file mode 100644 index 0000000..38967d8 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/GEOADD.d.ts @@ -0,0 +1,20 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +import { GeoCoordinates } from './generic-transformers'; +export declare const FIRST_KEY_INDEX = 1; +interface GeoMember extends GeoCoordinates { + member: RedisCommandArgument; +} +interface NX { + NX?: true; +} +interface XX { + XX?: true; +} +type SetGuards = NX | XX; +interface GeoAddCommonOptions { + CH?: true; +} +type GeoAddOptions = SetGuards & GeoAddCommonOptions; +export declare function transformArguments(key: RedisCommandArgument, toAdd: GeoMember | Array, options?: GeoAddOptions): RedisCommandArguments; +export declare function transformReply(): number; +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/commands/GEOADD.js b/server/node_modules/@redis/client/dist/lib/commands/GEOADD.js new file mode 100644 index 0000000..966758b --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/GEOADD.js @@ -0,0 +1,21 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, toAdd, options) { + const args = ['GEOADD', key]; + if (options?.NX) { + args.push('NX'); + } + else if (options?.XX) { + args.push('XX'); + } + if (options?.CH) { + args.push('CH'); + } + for (const { longitude, latitude, member } of (Array.isArray(toAdd) ? toAdd : [toAdd])) { + args.push(longitude.toString(), latitude.toString(), member); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/GEODIST.d.ts b/server/node_modules/@redis/client/dist/lib/commands/GEODIST.d.ts new file mode 100644 index 0000000..e3064e4 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/GEODIST.d.ts @@ -0,0 +1,6 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +import { GeoUnits } from './generic-transformers'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: RedisCommandArgument, member1: RedisCommandArgument, member2: RedisCommandArgument, unit?: GeoUnits): RedisCommandArguments; +export declare function transformReply(reply: RedisCommandArgument | null): number | null; diff --git a/server/node_modules/@redis/client/dist/lib/commands/GEODIST.js b/server/node_modules/@redis/client/dist/lib/commands/GEODIST.js new file mode 100644 index 0000000..e9f67d2 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/GEODIST.js @@ -0,0 +1,17 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, member1, member2, unit) { + const args = ['GEODIST', key, member1, member2]; + if (unit) { + args.push(unit); + } + return args; +} +exports.transformArguments = transformArguments; +function transformReply(reply) { + return reply === null ? null : Number(reply); +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/client/dist/lib/commands/GEOHASH.d.ts b/server/node_modules/@redis/client/dist/lib/commands/GEOHASH.d.ts new file mode 100644 index 0000000..fab2cad --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/GEOHASH.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: RedisCommandArgument, member: RedisCommandArgument | Array): RedisCommandArguments; +export declare function transformReply(): Array; diff --git a/server/node_modules/@redis/client/dist/lib/commands/GEOHASH.js b/server/node_modules/@redis/client/dist/lib/commands/GEOHASH.js new file mode 100644 index 0000000..e53d5ea --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/GEOHASH.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, member) { + return (0, generic_transformers_1.pushVerdictArguments)(['GEOHASH', key], member); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/GEOPOS.d.ts b/server/node_modules/@redis/client/dist/lib/commands/GEOPOS.d.ts new file mode 100644 index 0000000..e209890 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/GEOPOS.d.ts @@ -0,0 +1,11 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: RedisCommandArgument, member: RedisCommandArgument | Array): RedisCommandArguments; +type GeoCoordinatesRawReply = Array<[RedisCommandArgument, RedisCommandArgument] | null>; +interface GeoCoordinates { + longitude: RedisCommandArgument; + latitude: RedisCommandArgument; +} +export declare function transformReply(reply: GeoCoordinatesRawReply): Array; +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/commands/GEOPOS.js b/server/node_modules/@redis/client/dist/lib/commands/GEOPOS.js new file mode 100644 index 0000000..c1d90e8 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/GEOPOS.js @@ -0,0 +1,17 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, member) { + return (0, generic_transformers_1.pushVerdictArguments)(['GEOPOS', key], member); +} +exports.transformArguments = transformArguments; +function transformReply(reply) { + return reply.map(coordinates => coordinates === null ? null : { + longitude: coordinates[0], + latitude: coordinates[1] + }); +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/client/dist/lib/commands/GEORADIUS.d.ts b/server/node_modules/@redis/client/dist/lib/commands/GEORADIUS.d.ts new file mode 100644 index 0000000..7574a1a --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/GEORADIUS.d.ts @@ -0,0 +1,6 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +import { GeoSearchOptions, GeoCoordinates, GeoUnits } from './generic-transformers'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: RedisCommandArgument, coordinates: GeoCoordinates, radius: number, unit: GeoUnits, options?: GeoSearchOptions): RedisCommandArguments; +export declare function transformReply(): Array; diff --git a/server/node_modules/@redis/client/dist/lib/commands/GEORADIUS.js b/server/node_modules/@redis/client/dist/lib/commands/GEORADIUS.js new file mode 100644 index 0000000..8329111 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/GEORADIUS.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, coordinates, radius, unit, options) { + return (0, generic_transformers_1.pushGeoRadiusArguments)(['GEORADIUS'], key, coordinates, radius, unit, options); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/GEORADIUSBYMEMBER.d.ts b/server/node_modules/@redis/client/dist/lib/commands/GEORADIUSBYMEMBER.d.ts new file mode 100644 index 0000000..c801788 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/GEORADIUSBYMEMBER.d.ts @@ -0,0 +1,6 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +import { GeoSearchOptions, GeoUnits } from './generic-transformers'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: RedisCommandArgument, member: string, radius: number, unit: GeoUnits, options?: GeoSearchOptions): RedisCommandArguments; +export declare function transformReply(): Array; diff --git a/server/node_modules/@redis/client/dist/lib/commands/GEORADIUSBYMEMBER.js b/server/node_modules/@redis/client/dist/lib/commands/GEORADIUSBYMEMBER.js new file mode 100644 index 0000000..18bb292 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/GEORADIUSBYMEMBER.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, member, radius, unit, options) { + return (0, generic_transformers_1.pushGeoRadiusArguments)(['GEORADIUSBYMEMBER'], key, member, radius, unit, options); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/GEORADIUSBYMEMBERSTORE.d.ts b/server/node_modules/@redis/client/dist/lib/commands/GEORADIUSBYMEMBERSTORE.d.ts new file mode 100644 index 0000000..b602982 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/GEORADIUSBYMEMBERSTORE.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +import { GeoUnits, GeoRadiusStoreOptions } from './generic-transformers'; +export { FIRST_KEY_INDEX, IS_READ_ONLY } from './GEORADIUSBYMEMBER'; +export declare function transformArguments(key: RedisCommandArgument, member: string, radius: number, unit: GeoUnits, destination: RedisCommandArgument, options?: GeoRadiusStoreOptions): RedisCommandArguments; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/client/dist/lib/commands/GEORADIUSBYMEMBERSTORE.js b/server/node_modules/@redis/client/dist/lib/commands/GEORADIUSBYMEMBERSTORE.js new file mode 100644 index 0000000..8a91761 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/GEORADIUSBYMEMBERSTORE.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +var GEORADIUSBYMEMBER_1 = require("./GEORADIUSBYMEMBER"); +Object.defineProperty(exports, "FIRST_KEY_INDEX", { enumerable: true, get: function () { return GEORADIUSBYMEMBER_1.FIRST_KEY_INDEX; } }); +Object.defineProperty(exports, "IS_READ_ONLY", { enumerable: true, get: function () { return GEORADIUSBYMEMBER_1.IS_READ_ONLY; } }); +function transformArguments(key, member, radius, unit, destination, options) { + return (0, generic_transformers_1.pushGeoRadiusStoreArguments)(['GEORADIUSBYMEMBER'], key, member, radius, unit, destination, options); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/GEORADIUSBYMEMBER_RO.d.ts b/server/node_modules/@redis/client/dist/lib/commands/GEORADIUSBYMEMBER_RO.d.ts new file mode 100644 index 0000000..c801788 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/GEORADIUSBYMEMBER_RO.d.ts @@ -0,0 +1,6 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +import { GeoSearchOptions, GeoUnits } from './generic-transformers'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: RedisCommandArgument, member: string, radius: number, unit: GeoUnits, options?: GeoSearchOptions): RedisCommandArguments; +export declare function transformReply(): Array; diff --git a/server/node_modules/@redis/client/dist/lib/commands/GEORADIUSBYMEMBER_RO.js b/server/node_modules/@redis/client/dist/lib/commands/GEORADIUSBYMEMBER_RO.js new file mode 100644 index 0000000..7e0c7e0 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/GEORADIUSBYMEMBER_RO.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, member, radius, unit, options) { + return (0, generic_transformers_1.pushGeoRadiusArguments)(['GEORADIUSBYMEMBER_RO'], key, member, radius, unit, options); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/GEORADIUSBYMEMBER_RO_WITH.d.ts b/server/node_modules/@redis/client/dist/lib/commands/GEORADIUSBYMEMBER_RO_WITH.d.ts new file mode 100644 index 0000000..65a34ff --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/GEORADIUSBYMEMBER_RO_WITH.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +import { GeoReplyWith, GeoSearchOptions, GeoUnits } from './generic-transformers'; +export { FIRST_KEY_INDEX, IS_READ_ONLY } from './GEORADIUSBYMEMBER_RO'; +export declare function transformArguments(key: RedisCommandArgument, member: string, radius: number, unit: GeoUnits, replyWith: Array, options?: GeoSearchOptions): RedisCommandArguments; +export { transformGeoMembersWithReply as transformReply } from './generic-transformers'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/GEORADIUSBYMEMBER_RO_WITH.js b/server/node_modules/@redis/client/dist/lib/commands/GEORADIUSBYMEMBER_RO_WITH.js new file mode 100644 index 0000000..dc095b2 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/GEORADIUSBYMEMBER_RO_WITH.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const GEORADIUSBYMEMBER_RO_1 = require("./GEORADIUSBYMEMBER_RO"); +var GEORADIUSBYMEMBER_RO_2 = require("./GEORADIUSBYMEMBER_RO"); +Object.defineProperty(exports, "FIRST_KEY_INDEX", { enumerable: true, get: function () { return GEORADIUSBYMEMBER_RO_2.FIRST_KEY_INDEX; } }); +Object.defineProperty(exports, "IS_READ_ONLY", { enumerable: true, get: function () { return GEORADIUSBYMEMBER_RO_2.IS_READ_ONLY; } }); +function transformArguments(key, member, radius, unit, replyWith, options) { + const args = (0, GEORADIUSBYMEMBER_RO_1.transformArguments)(key, member, radius, unit, options); + args.push(...replyWith); + args.preserve = replyWith; + return args; +} +exports.transformArguments = transformArguments; +var generic_transformers_1 = require("./generic-transformers"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return generic_transformers_1.transformGeoMembersWithReply; } }); diff --git a/server/node_modules/@redis/client/dist/lib/commands/GEORADIUSBYMEMBER_WITH.d.ts b/server/node_modules/@redis/client/dist/lib/commands/GEORADIUSBYMEMBER_WITH.d.ts new file mode 100644 index 0000000..d5976c1 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/GEORADIUSBYMEMBER_WITH.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +import { GeoReplyWith, GeoSearchOptions, GeoUnits } from './generic-transformers'; +export { FIRST_KEY_INDEX, IS_READ_ONLY } from './GEORADIUSBYMEMBER'; +export declare function transformArguments(key: RedisCommandArgument, member: string, radius: number, unit: GeoUnits, replyWith: Array, options?: GeoSearchOptions): RedisCommandArguments; +export { transformGeoMembersWithReply as transformReply } from './generic-transformers'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/GEORADIUSBYMEMBER_WITH.js b/server/node_modules/@redis/client/dist/lib/commands/GEORADIUSBYMEMBER_WITH.js new file mode 100644 index 0000000..c8b18eb --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/GEORADIUSBYMEMBER_WITH.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const GEORADIUSBYMEMBER_1 = require("./GEORADIUSBYMEMBER"); +var GEORADIUSBYMEMBER_2 = require("./GEORADIUSBYMEMBER"); +Object.defineProperty(exports, "FIRST_KEY_INDEX", { enumerable: true, get: function () { return GEORADIUSBYMEMBER_2.FIRST_KEY_INDEX; } }); +Object.defineProperty(exports, "IS_READ_ONLY", { enumerable: true, get: function () { return GEORADIUSBYMEMBER_2.IS_READ_ONLY; } }); +function transformArguments(key, member, radius, unit, replyWith, options) { + const args = (0, GEORADIUSBYMEMBER_1.transformArguments)(key, member, radius, unit, options); + args.push(...replyWith); + args.preserve = replyWith; + return args; +} +exports.transformArguments = transformArguments; +var generic_transformers_1 = require("./generic-transformers"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return generic_transformers_1.transformGeoMembersWithReply; } }); diff --git a/server/node_modules/@redis/client/dist/lib/commands/GEORADIUSSTORE.d.ts b/server/node_modules/@redis/client/dist/lib/commands/GEORADIUSSTORE.d.ts new file mode 100644 index 0000000..272ba5d --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/GEORADIUSSTORE.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +import { GeoCoordinates, GeoUnits, GeoRadiusStoreOptions } from './generic-transformers'; +export { FIRST_KEY_INDEX, IS_READ_ONLY } from './GEORADIUS'; +export declare function transformArguments(key: RedisCommandArgument, coordinates: GeoCoordinates, radius: number, unit: GeoUnits, destination: RedisCommandArgument, options?: GeoRadiusStoreOptions): RedisCommandArguments; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/client/dist/lib/commands/GEORADIUSSTORE.js b/server/node_modules/@redis/client/dist/lib/commands/GEORADIUSSTORE.js new file mode 100644 index 0000000..eec23ef --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/GEORADIUSSTORE.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +var GEORADIUS_1 = require("./GEORADIUS"); +Object.defineProperty(exports, "FIRST_KEY_INDEX", { enumerable: true, get: function () { return GEORADIUS_1.FIRST_KEY_INDEX; } }); +Object.defineProperty(exports, "IS_READ_ONLY", { enumerable: true, get: function () { return GEORADIUS_1.IS_READ_ONLY; } }); +function transformArguments(key, coordinates, radius, unit, destination, options) { + return (0, generic_transformers_1.pushGeoRadiusStoreArguments)(['GEORADIUS'], key, coordinates, radius, unit, destination, options); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/GEORADIUS_RO.d.ts b/server/node_modules/@redis/client/dist/lib/commands/GEORADIUS_RO.d.ts new file mode 100644 index 0000000..7574a1a --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/GEORADIUS_RO.d.ts @@ -0,0 +1,6 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +import { GeoSearchOptions, GeoCoordinates, GeoUnits } from './generic-transformers'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: RedisCommandArgument, coordinates: GeoCoordinates, radius: number, unit: GeoUnits, options?: GeoSearchOptions): RedisCommandArguments; +export declare function transformReply(): Array; diff --git a/server/node_modules/@redis/client/dist/lib/commands/GEORADIUS_RO.js b/server/node_modules/@redis/client/dist/lib/commands/GEORADIUS_RO.js new file mode 100644 index 0000000..7f34dad --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/GEORADIUS_RO.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, coordinates, radius, unit, options) { + return (0, generic_transformers_1.pushGeoRadiusArguments)(['GEORADIUS_RO'], key, coordinates, radius, unit, options); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/GEORADIUS_RO_WITH.d.ts b/server/node_modules/@redis/client/dist/lib/commands/GEORADIUS_RO_WITH.d.ts new file mode 100644 index 0000000..ce99bdd --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/GEORADIUS_RO_WITH.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +import { GeoReplyWith, GeoSearchOptions, GeoCoordinates, GeoUnits } from './generic-transformers'; +export { FIRST_KEY_INDEX, IS_READ_ONLY } from './GEORADIUS_RO'; +export declare function transformArguments(key: RedisCommandArgument, coordinates: GeoCoordinates, radius: number, unit: GeoUnits, replyWith: Array, options?: GeoSearchOptions): RedisCommandArguments; +export { transformGeoMembersWithReply as transformReply } from './generic-transformers'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/GEORADIUS_RO_WITH.js b/server/node_modules/@redis/client/dist/lib/commands/GEORADIUS_RO_WITH.js new file mode 100644 index 0000000..a83fbb1 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/GEORADIUS_RO_WITH.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const GEORADIUS_RO_1 = require("./GEORADIUS_RO"); +var GEORADIUS_RO_2 = require("./GEORADIUS_RO"); +Object.defineProperty(exports, "FIRST_KEY_INDEX", { enumerable: true, get: function () { return GEORADIUS_RO_2.FIRST_KEY_INDEX; } }); +Object.defineProperty(exports, "IS_READ_ONLY", { enumerable: true, get: function () { return GEORADIUS_RO_2.IS_READ_ONLY; } }); +function transformArguments(key, coordinates, radius, unit, replyWith, options) { + const args = (0, GEORADIUS_RO_1.transformArguments)(key, coordinates, radius, unit, options); + args.push(...replyWith); + args.preserve = replyWith; + return args; +} +exports.transformArguments = transformArguments; +var generic_transformers_1 = require("./generic-transformers"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return generic_transformers_1.transformGeoMembersWithReply; } }); diff --git a/server/node_modules/@redis/client/dist/lib/commands/GEORADIUS_WITH.d.ts b/server/node_modules/@redis/client/dist/lib/commands/GEORADIUS_WITH.d.ts new file mode 100644 index 0000000..96f887c --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/GEORADIUS_WITH.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +import { GeoReplyWith, GeoSearchOptions, GeoCoordinates, GeoUnits } from './generic-transformers'; +export { FIRST_KEY_INDEX, IS_READ_ONLY } from './GEORADIUS'; +export declare function transformArguments(key: RedisCommandArgument, coordinates: GeoCoordinates, radius: number, unit: GeoUnits, replyWith: Array, options?: GeoSearchOptions): RedisCommandArguments; +export { transformGeoMembersWithReply as transformReply } from './generic-transformers'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/GEORADIUS_WITH.js b/server/node_modules/@redis/client/dist/lib/commands/GEORADIUS_WITH.js new file mode 100644 index 0000000..e146b00 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/GEORADIUS_WITH.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const GEORADIUS_1 = require("./GEORADIUS"); +var GEORADIUS_2 = require("./GEORADIUS"); +Object.defineProperty(exports, "FIRST_KEY_INDEX", { enumerable: true, get: function () { return GEORADIUS_2.FIRST_KEY_INDEX; } }); +Object.defineProperty(exports, "IS_READ_ONLY", { enumerable: true, get: function () { return GEORADIUS_2.IS_READ_ONLY; } }); +function transformArguments(key, coordinates, radius, unit, replyWith, options) { + const args = (0, GEORADIUS_1.transformArguments)(key, coordinates, radius, unit, options); + args.push(...replyWith); + args.preserve = replyWith; + return args; +} +exports.transformArguments = transformArguments; +var generic_transformers_1 = require("./generic-transformers"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return generic_transformers_1.transformGeoMembersWithReply; } }); diff --git a/server/node_modules/@redis/client/dist/lib/commands/GEOSEARCH.d.ts b/server/node_modules/@redis/client/dist/lib/commands/GEOSEARCH.d.ts new file mode 100644 index 0000000..2205100 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/GEOSEARCH.d.ts @@ -0,0 +1,6 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +import { GeoSearchFrom, GeoSearchBy, GeoSearchOptions } from './generic-transformers'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: RedisCommandArgument, from: GeoSearchFrom, by: GeoSearchBy, options?: GeoSearchOptions): RedisCommandArguments; +export declare function transformReply(): Array; diff --git a/server/node_modules/@redis/client/dist/lib/commands/GEOSEARCH.js b/server/node_modules/@redis/client/dist/lib/commands/GEOSEARCH.js new file mode 100644 index 0000000..b2e2aca --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/GEOSEARCH.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, from, by, options) { + return (0, generic_transformers_1.pushGeoSearchArguments)(['GEOSEARCH'], key, from, by, options); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/GEOSEARCHSTORE.d.ts b/server/node_modules/@redis/client/dist/lib/commands/GEOSEARCHSTORE.d.ts new file mode 100644 index 0000000..1ac151e --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/GEOSEARCHSTORE.d.ts @@ -0,0 +1,8 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +import { GeoSearchFrom, GeoSearchBy, GeoSearchOptions } from './generic-transformers'; +export { FIRST_KEY_INDEX, IS_READ_ONLY } from './GEOSEARCH'; +interface GeoSearchStoreOptions extends GeoSearchOptions { + STOREDIST?: true; +} +export declare function transformArguments(destination: RedisCommandArgument, source: RedisCommandArgument, from: GeoSearchFrom, by: GeoSearchBy, options?: GeoSearchStoreOptions): RedisCommandArguments; +export declare function transformReply(reply: number): number; diff --git a/server/node_modules/@redis/client/dist/lib/commands/GEOSEARCHSTORE.js b/server/node_modules/@redis/client/dist/lib/commands/GEOSEARCHSTORE.js new file mode 100644 index 0000000..da510e6 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/GEOSEARCHSTORE.js @@ -0,0 +1,22 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +var GEOSEARCH_1 = require("./GEOSEARCH"); +Object.defineProperty(exports, "FIRST_KEY_INDEX", { enumerable: true, get: function () { return GEOSEARCH_1.FIRST_KEY_INDEX; } }); +Object.defineProperty(exports, "IS_READ_ONLY", { enumerable: true, get: function () { return GEOSEARCH_1.IS_READ_ONLY; } }); +function transformArguments(destination, source, from, by, options) { + const args = (0, generic_transformers_1.pushGeoSearchArguments)(['GEOSEARCHSTORE', destination], source, from, by, options); + if (options?.STOREDIST) { + args.push('STOREDIST'); + } + return args; +} +exports.transformArguments = transformArguments; +function transformReply(reply) { + if (typeof reply !== 'number') { + throw new TypeError(`https://github.com/redis/redis/issues/9261`); + } + return reply; +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/client/dist/lib/commands/GEOSEARCH_WITH.d.ts b/server/node_modules/@redis/client/dist/lib/commands/GEOSEARCH_WITH.d.ts new file mode 100644 index 0000000..852416d --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/GEOSEARCH_WITH.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +import { GeoSearchFrom, GeoSearchBy, GeoReplyWith, GeoSearchOptions } from './generic-transformers'; +export { FIRST_KEY_INDEX, IS_READ_ONLY } from './GEOSEARCH'; +export declare function transformArguments(key: RedisCommandArgument, from: GeoSearchFrom, by: GeoSearchBy, replyWith: Array, options?: GeoSearchOptions): RedisCommandArguments; +export { transformGeoMembersWithReply as transformReply } from './generic-transformers'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/GEOSEARCH_WITH.js b/server/node_modules/@redis/client/dist/lib/commands/GEOSEARCH_WITH.js new file mode 100644 index 0000000..3fb418f --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/GEOSEARCH_WITH.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const GEOSEARCH_1 = require("./GEOSEARCH"); +var GEOSEARCH_2 = require("./GEOSEARCH"); +Object.defineProperty(exports, "FIRST_KEY_INDEX", { enumerable: true, get: function () { return GEOSEARCH_2.FIRST_KEY_INDEX; } }); +Object.defineProperty(exports, "IS_READ_ONLY", { enumerable: true, get: function () { return GEOSEARCH_2.IS_READ_ONLY; } }); +function transformArguments(key, from, by, replyWith, options) { + const args = (0, GEOSEARCH_1.transformArguments)(key, from, by, options); + args.push(...replyWith); + args.preserve = replyWith; + return args; +} +exports.transformArguments = transformArguments; +var generic_transformers_1 = require("./generic-transformers"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return generic_transformers_1.transformGeoMembersWithReply; } }); diff --git a/server/node_modules/@redis/client/dist/lib/commands/GET.d.ts b/server/node_modules/@redis/client/dist/lib/commands/GET.d.ts new file mode 100644 index 0000000..ac0d54c --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/GET.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: RedisCommandArgument): RedisCommandArguments; +export declare function transformReply(): RedisCommandArgument | null; diff --git a/server/node_modules/@redis/client/dist/lib/commands/GET.js b/server/node_modules/@redis/client/dist/lib/commands/GET.js new file mode 100644 index 0000000..8bb9de2 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/GET.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key) { + return ['GET', key]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/GETBIT.d.ts b/server/node_modules/@redis/client/dist/lib/commands/GETBIT.d.ts new file mode 100644 index 0000000..6eaeaf5 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/GETBIT.d.ts @@ -0,0 +1,6 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +import { BitValue } from './generic-transformers'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: RedisCommandArgument, offset: number): RedisCommandArguments; +export declare function transformReply(): BitValue; diff --git a/server/node_modules/@redis/client/dist/lib/commands/GETBIT.js b/server/node_modules/@redis/client/dist/lib/commands/GETBIT.js new file mode 100644 index 0000000..9ad7b33 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/GETBIT.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, offset) { + return ['GETBIT', key, offset.toString()]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/GETDEL.d.ts b/server/node_modules/@redis/client/dist/lib/commands/GETDEL.d.ts new file mode 100644 index 0000000..15f87fd --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/GETDEL.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument): RedisCommandArguments; +export declare function transformReply(): RedisCommandArgument | null; diff --git a/server/node_modules/@redis/client/dist/lib/commands/GETDEL.js b/server/node_modules/@redis/client/dist/lib/commands/GETDEL.js new file mode 100644 index 0000000..cd80218 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/GETDEL.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key) { + return ['GETDEL', key]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/GETEX.d.ts b/server/node_modules/@redis/client/dist/lib/commands/GETEX.d.ts new file mode 100644 index 0000000..7d7f1f4 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/GETEX.d.ts @@ -0,0 +1,16 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +type GetExModes = { + EX: number; +} | { + PX: number; +} | { + EXAT: number | Date; +} | { + PXAT: number | Date; +} | { + PERSIST: true; +}; +export declare function transformArguments(key: RedisCommandArgument, mode: GetExModes): RedisCommandArguments; +export declare function transformReply(): RedisCommandArgument | null; +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/commands/GETEX.js b/server/node_modules/@redis/client/dist/lib/commands/GETEX.js new file mode 100644 index 0000000..897c824 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/GETEX.js @@ -0,0 +1,25 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, mode) { + const args = ['GETEX', key]; + if ('EX' in mode) { + args.push('EX', mode.EX.toString()); + } + else if ('PX' in mode) { + args.push('PX', mode.PX.toString()); + } + else if ('EXAT' in mode) { + args.push('EXAT', (0, generic_transformers_1.transformEXAT)(mode.EXAT)); + } + else if ('PXAT' in mode) { + args.push('PXAT', (0, generic_transformers_1.transformPXAT)(mode.PXAT)); + } + else { // PERSIST + args.push('PERSIST'); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/GETRANGE.d.ts b/server/node_modules/@redis/client/dist/lib/commands/GETRANGE.d.ts new file mode 100644 index 0000000..c28240e --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/GETRANGE.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: RedisCommandArgument, start: number, end: number): RedisCommandArguments; +export declare function transformReply(): RedisCommandArgument; diff --git a/server/node_modules/@redis/client/dist/lib/commands/GETRANGE.js b/server/node_modules/@redis/client/dist/lib/commands/GETRANGE.js new file mode 100644 index 0000000..32e1527 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/GETRANGE.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, start, end) { + return ['GETRANGE', key, start.toString(), end.toString()]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/GETSET.d.ts b/server/node_modules/@redis/client/dist/lib/commands/GETSET.d.ts new file mode 100644 index 0000000..c2aad11 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/GETSET.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument, value: RedisCommandArgument): RedisCommandArguments; +export declare function transformReply(): RedisCommandArgument | null; diff --git a/server/node_modules/@redis/client/dist/lib/commands/GETSET.js b/server/node_modules/@redis/client/dist/lib/commands/GETSET.js new file mode 100644 index 0000000..972d126 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/GETSET.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, value) { + return ['GETSET', key, value]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/HDEL.d.ts b/server/node_modules/@redis/client/dist/lib/commands/HDEL.d.ts new file mode 100644 index 0000000..b014f91 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/HDEL.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument, field: RedisCommandArgument | Array): RedisCommandArguments; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/client/dist/lib/commands/HDEL.js b/server/node_modules/@redis/client/dist/lib/commands/HDEL.js new file mode 100644 index 0000000..199d9d0 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/HDEL.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, field) { + return (0, generic_transformers_1.pushVerdictArguments)(['HDEL', key], field); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/HELLO.d.ts b/server/node_modules/@redis/client/dist/lib/commands/HELLO.d.ts new file mode 100644 index 0000000..39d7058 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/HELLO.d.ts @@ -0,0 +1,35 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +import { AuthOptions } from './AUTH'; +interface HelloOptions { + protover: number; + auth?: Required; + clientName?: string; +} +export declare function transformArguments(options?: HelloOptions): RedisCommandArguments; +type HelloRawReply = [ + _: never, + server: RedisCommandArgument, + _: never, + version: RedisCommandArgument, + _: never, + proto: number, + _: never, + id: number, + _: never, + mode: RedisCommandArgument, + _: never, + role: RedisCommandArgument, + _: never, + modules: Array +]; +interface HelloTransformedReply { + server: RedisCommandArgument; + version: RedisCommandArgument; + proto: number; + id: number; + mode: RedisCommandArgument; + role: RedisCommandArgument; + modules: Array; +} +export declare function transformReply(reply: HelloRawReply): HelloTransformedReply; +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/commands/HELLO.js b/server/node_modules/@redis/client/dist/lib/commands/HELLO.js new file mode 100644 index 0000000..b16d4ed --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/HELLO.js @@ -0,0 +1,29 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = void 0; +function transformArguments(options) { + const args = ['HELLO']; + if (options) { + args.push(options.protover.toString()); + if (options.auth) { + args.push('AUTH', options.auth.username, options.auth.password); + } + if (options.clientName) { + args.push('SETNAME', options.clientName); + } + } + return args; +} +exports.transformArguments = transformArguments; +function transformReply(reply) { + return { + server: reply[1], + version: reply[3], + proto: reply[5], + id: reply[7], + mode: reply[9], + role: reply[11], + modules: reply[13] + }; +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/client/dist/lib/commands/HEXISTS.d.ts b/server/node_modules/@redis/client/dist/lib/commands/HEXISTS.d.ts new file mode 100644 index 0000000..1a9fd57 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/HEXISTS.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument, field: RedisCommandArgument): RedisCommandArguments; +export { transformBooleanReply as transformReply } from './generic-transformers'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/HEXISTS.js b/server/node_modules/@redis/client/dist/lib/commands/HEXISTS.js new file mode 100644 index 0000000..f659dab --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/HEXISTS.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, field) { + return ['HEXISTS', key, field]; +} +exports.transformArguments = transformArguments; +var generic_transformers_1 = require("./generic-transformers"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return generic_transformers_1.transformBooleanReply; } }); diff --git a/server/node_modules/@redis/client/dist/lib/commands/HEXPIRE.d.ts b/server/node_modules/@redis/client/dist/lib/commands/HEXPIRE.d.ts new file mode 100644 index 0000000..5e7aab1 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/HEXPIRE.d.ts @@ -0,0 +1,23 @@ +import { RedisCommandArgument } from '.'; +/** + * @readonly + * @enum {number} + */ +export declare const HASH_EXPIRATION: { + /** @property {number} */ + /** The field does not exist */ + readonly FIELD_NOT_EXISTS: -2; + /** @property {number} */ + /** Specified NX | XX | GT | LT condition not met */ + readonly CONDITION_NOT_MET: 0; + /** @property {number} */ + /** Expiration time was set or updated */ + readonly UPDATED: 1; + /** @property {number} */ + /** Field deleted because the specified expiration time is in the past */ + readonly DELETED: 2; +}; +export type HashExpiration = typeof HASH_EXPIRATION[keyof typeof HASH_EXPIRATION]; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument, fields: RedisCommandArgument | Array, seconds: number, mode?: 'NX' | 'XX' | 'GT' | 'LT'): import(".").RedisCommandArguments; +export declare function transformReply(): Array; diff --git a/server/node_modules/@redis/client/dist/lib/commands/HEXPIRE.js b/server/node_modules/@redis/client/dist/lib/commands/HEXPIRE.js new file mode 100644 index 0000000..c6657d3 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/HEXPIRE.js @@ -0,0 +1,32 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = exports.HASH_EXPIRATION = void 0; +const generic_transformers_1 = require("./generic-transformers"); +/** + * @readonly + * @enum {number} + */ +exports.HASH_EXPIRATION = { + /** @property {number} */ + /** The field does not exist */ + FIELD_NOT_EXISTS: -2, + /** @property {number} */ + /** Specified NX | XX | GT | LT condition not met */ + CONDITION_NOT_MET: 0, + /** @property {number} */ + /** Expiration time was set or updated */ + UPDATED: 1, + /** @property {number} */ + /** Field deleted because the specified expiration time is in the past */ + DELETED: 2 +}; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, fields, seconds, mode) { + const args = ['HEXPIRE', key, seconds.toString()]; + if (mode) { + args.push(mode); + } + args.push('FIELDS'); + return (0, generic_transformers_1.pushVerdictArgument)(args, fields); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/HEXPIREAT.d.ts b/server/node_modules/@redis/client/dist/lib/commands/HEXPIREAT.d.ts new file mode 100644 index 0000000..f7e2764 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/HEXPIREAT.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument } from '.'; +import { HashExpiration } from './HEXPIRE'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument, fields: RedisCommandArgument | Array, timestamp: number | Date, mode?: 'NX' | 'XX' | 'GT' | 'LT'): import(".").RedisCommandArguments; +export declare function transformReply(): Array; diff --git a/server/node_modules/@redis/client/dist/lib/commands/HEXPIREAT.js b/server/node_modules/@redis/client/dist/lib/commands/HEXPIREAT.js new file mode 100644 index 0000000..a124a91 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/HEXPIREAT.js @@ -0,0 +1,18 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, fields, timestamp, mode) { + const args = [ + 'HEXPIREAT', + key, + (0, generic_transformers_1.transformEXAT)(timestamp) + ]; + if (mode) { + args.push(mode); + } + args.push('FIELDS'); + return (0, generic_transformers_1.pushVerdictArgument)(args, fields); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/HEXPIRETIME.d.ts b/server/node_modules/@redis/client/dist/lib/commands/HEXPIRETIME.d.ts new file mode 100644 index 0000000..a129d25 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/HEXPIRETIME.d.ts @@ -0,0 +1,13 @@ +import { RedisCommandArgument } from '.'; +export declare const HASH_EXPIRATION_TIME: { + /** @property {number} */ + /** The field does not exist */ + readonly FIELD_NOT_EXISTS: -2; + /** @property {number} */ + /** The field exists but has no associated expire */ + readonly NO_EXPIRATION: -1; +}; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: RedisCommandArgument, fields: RedisCommandArgument | Array): import(".").RedisCommandArguments; +export declare function transformReply(): Array; diff --git a/server/node_modules/@redis/client/dist/lib/commands/HEXPIRETIME.js b/server/node_modules/@redis/client/dist/lib/commands/HEXPIRETIME.js new file mode 100644 index 0000000..37cabd1 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/HEXPIRETIME.js @@ -0,0 +1,18 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = exports.HASH_EXPIRATION_TIME = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.HASH_EXPIRATION_TIME = { + /** @property {number} */ + /** The field does not exist */ + FIELD_NOT_EXISTS: -2, + /** @property {number} */ + /** The field exists but has no associated expire */ + NO_EXPIRATION: -1, +}; +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, fields) { + return (0, generic_transformers_1.pushVerdictArgument)(['HEXPIRETIME', key, 'FIELDS'], fields); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/HGET.d.ts b/server/node_modules/@redis/client/dist/lib/commands/HGET.d.ts new file mode 100644 index 0000000..09f0f49 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/HGET.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: RedisCommandArgument, field: RedisCommandArgument): RedisCommandArguments; +export declare function transformReply(): RedisCommandArgument | undefined; diff --git a/server/node_modules/@redis/client/dist/lib/commands/HGET.js b/server/node_modules/@redis/client/dist/lib/commands/HGET.js new file mode 100644 index 0000000..e45af1f --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/HGET.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, field) { + return ['HGET', key, field]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/HGETALL.d.ts b/server/node_modules/@redis/client/dist/lib/commands/HGETALL.d.ts new file mode 100644 index 0000000..6e37bdd --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/HGETALL.d.ts @@ -0,0 +1,6 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare const TRANSFORM_LEGACY_REPLY = true; +export declare function transformArguments(key: RedisCommandArgument): RedisCommandArguments; +export { transformTuplesReply as transformReply } from './generic-transformers'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/HGETALL.js b/server/node_modules/@redis/client/dist/lib/commands/HGETALL.js new file mode 100644 index 0000000..871ea00 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/HGETALL.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.TRANSFORM_LEGACY_REPLY = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +exports.TRANSFORM_LEGACY_REPLY = true; +function transformArguments(key) { + return ['HGETALL', key]; +} +exports.transformArguments = transformArguments; +var generic_transformers_1 = require("./generic-transformers"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return generic_transformers_1.transformTuplesReply; } }); diff --git a/server/node_modules/@redis/client/dist/lib/commands/HINCRBY.d.ts b/server/node_modules/@redis/client/dist/lib/commands/HINCRBY.d.ts new file mode 100644 index 0000000..ba2e705 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/HINCRBY.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument, field: RedisCommandArgument, increment: number): RedisCommandArguments; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/client/dist/lib/commands/HINCRBY.js b/server/node_modules/@redis/client/dist/lib/commands/HINCRBY.js new file mode 100644 index 0000000..a47a501 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/HINCRBY.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, field, increment) { + return ['HINCRBY', key, field, increment.toString()]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/HINCRBYFLOAT.d.ts b/server/node_modules/@redis/client/dist/lib/commands/HINCRBYFLOAT.d.ts new file mode 100644 index 0000000..ba2e705 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/HINCRBYFLOAT.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument, field: RedisCommandArgument, increment: number): RedisCommandArguments; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/client/dist/lib/commands/HINCRBYFLOAT.js b/server/node_modules/@redis/client/dist/lib/commands/HINCRBYFLOAT.js new file mode 100644 index 0000000..dca7e8f --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/HINCRBYFLOAT.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, field, increment) { + return ['HINCRBYFLOAT', key, field, increment.toString()]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/HKEYS.d.ts b/server/node_modules/@redis/client/dist/lib/commands/HKEYS.d.ts new file mode 100644 index 0000000..b5c1c09 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/HKEYS.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument): RedisCommandArguments; +export declare function transformReply(): Array; diff --git a/server/node_modules/@redis/client/dist/lib/commands/HKEYS.js b/server/node_modules/@redis/client/dist/lib/commands/HKEYS.js new file mode 100644 index 0000000..e3da594 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/HKEYS.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key) { + return ['HKEYS', key]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/HLEN.d.ts b/server/node_modules/@redis/client/dist/lib/commands/HLEN.d.ts new file mode 100644 index 0000000..c35a19c --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/HLEN.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument): RedisCommandArguments; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/client/dist/lib/commands/HLEN.js b/server/node_modules/@redis/client/dist/lib/commands/HLEN.js new file mode 100644 index 0000000..76687ff --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/HLEN.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key) { + return ['HLEN', key]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/HMGET.d.ts b/server/node_modules/@redis/client/dist/lib/commands/HMGET.d.ts new file mode 100644 index 0000000..26b7c7c --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/HMGET.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: RedisCommandArgument, fields: RedisCommandArgument | Array): RedisCommandArguments; +export declare function transformReply(): Array; diff --git a/server/node_modules/@redis/client/dist/lib/commands/HMGET.js b/server/node_modules/@redis/client/dist/lib/commands/HMGET.js new file mode 100644 index 0000000..2116543 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/HMGET.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, fields) { + return (0, generic_transformers_1.pushVerdictArguments)(['HMGET', key], fields); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/HPERSIST.d.ts b/server/node_modules/@redis/client/dist/lib/commands/HPERSIST.d.ts new file mode 100644 index 0000000..336a4d2 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/HPERSIST.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument, fields: RedisCommandArgument | Array): import(".").RedisCommandArguments; +export declare function transformReply(): Array | null; diff --git a/server/node_modules/@redis/client/dist/lib/commands/HPERSIST.js b/server/node_modules/@redis/client/dist/lib/commands/HPERSIST.js new file mode 100644 index 0000000..f2eb929 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/HPERSIST.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, fields) { + return (0, generic_transformers_1.pushVerdictArgument)(['HPERSIST', key, 'FIELDS'], fields); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/HPEXPIRE.d.ts b/server/node_modules/@redis/client/dist/lib/commands/HPEXPIRE.d.ts new file mode 100644 index 0000000..050ee87 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/HPEXPIRE.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument } from '.'; +import { HashExpiration } from "./HEXPIRE"; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument, fields: RedisCommandArgument | Array, ms: number, mode?: 'NX' | 'XX' | 'GT' | 'LT'): import(".").RedisCommandArguments; +export declare function transformReply(): Array | null; diff --git a/server/node_modules/@redis/client/dist/lib/commands/HPEXPIRE.js b/server/node_modules/@redis/client/dist/lib/commands/HPEXPIRE.js new file mode 100644 index 0000000..a83ce3b --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/HPEXPIRE.js @@ -0,0 +1,14 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, fields, ms, mode) { + const args = ['HPEXPIRE', key, ms.toString()]; + if (mode) { + args.push(mode); + } + args.push('FIELDS'); + return (0, generic_transformers_1.pushVerdictArgument)(args, fields); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/HPEXPIREAT.d.ts b/server/node_modules/@redis/client/dist/lib/commands/HPEXPIREAT.d.ts new file mode 100644 index 0000000..a839ffc --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/HPEXPIREAT.d.ts @@ -0,0 +1,6 @@ +import { RedisCommandArgument } from '.'; +import { HashExpiration } from './HEXPIRE'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: RedisCommandArgument, fields: RedisCommandArgument | Array, timestamp: number | Date, mode?: 'NX' | 'XX' | 'GT' | 'LT'): import(".").RedisCommandArguments; +export declare function transformReply(): Array | null; diff --git a/server/node_modules/@redis/client/dist/lib/commands/HPEXPIREAT.js b/server/node_modules/@redis/client/dist/lib/commands/HPEXPIREAT.js new file mode 100644 index 0000000..6947263 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/HPEXPIREAT.js @@ -0,0 +1,15 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, fields, timestamp, mode) { + const args = ['HPEXPIREAT', key, (0, generic_transformers_1.transformPXAT)(timestamp)]; + if (mode) { + args.push(mode); + } + args.push('FIELDS'); + return (0, generic_transformers_1.pushVerdictArgument)(args, fields); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/HPEXPIRETIME.d.ts b/server/node_modules/@redis/client/dist/lib/commands/HPEXPIRETIME.d.ts new file mode 100644 index 0000000..f04cffd --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/HPEXPIRETIME.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: RedisCommandArgument, fields: RedisCommandArgument | Array): import(".").RedisCommandArguments; +export declare function transformReply(): Array | null; diff --git a/server/node_modules/@redis/client/dist/lib/commands/HPEXPIRETIME.js b/server/node_modules/@redis/client/dist/lib/commands/HPEXPIRETIME.js new file mode 100644 index 0000000..bf13ff1 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/HPEXPIRETIME.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, fields) { + return (0, generic_transformers_1.pushVerdictArgument)(['HPEXPIRETIME', key, 'FIELDS'], fields); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/HPTTL.d.ts b/server/node_modules/@redis/client/dist/lib/commands/HPTTL.d.ts new file mode 100644 index 0000000..f04cffd --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/HPTTL.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: RedisCommandArgument, fields: RedisCommandArgument | Array): import(".").RedisCommandArguments; +export declare function transformReply(): Array | null; diff --git a/server/node_modules/@redis/client/dist/lib/commands/HPTTL.js b/server/node_modules/@redis/client/dist/lib/commands/HPTTL.js new file mode 100644 index 0000000..71906b1 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/HPTTL.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, fields) { + return (0, generic_transformers_1.pushVerdictArgument)(['HPTTL', key, 'FIELDS'], fields); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/HRANDFIELD.d.ts b/server/node_modules/@redis/client/dist/lib/commands/HRANDFIELD.d.ts new file mode 100644 index 0000000..ac0d54c --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/HRANDFIELD.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: RedisCommandArgument): RedisCommandArguments; +export declare function transformReply(): RedisCommandArgument | null; diff --git a/server/node_modules/@redis/client/dist/lib/commands/HRANDFIELD.js b/server/node_modules/@redis/client/dist/lib/commands/HRANDFIELD.js new file mode 100644 index 0000000..d242aef --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/HRANDFIELD.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key) { + return ['HRANDFIELD', key]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/HRANDFIELD_COUNT.d.ts b/server/node_modules/@redis/client/dist/lib/commands/HRANDFIELD_COUNT.d.ts new file mode 100644 index 0000000..ddfa26b --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/HRANDFIELD_COUNT.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export { FIRST_KEY_INDEX, IS_READ_ONLY } from './HRANDFIELD'; +export declare function transformArguments(key: RedisCommandArgument, count: number): RedisCommandArguments; +export declare function transformReply(): Array; diff --git a/server/node_modules/@redis/client/dist/lib/commands/HRANDFIELD_COUNT.js b/server/node_modules/@redis/client/dist/lib/commands/HRANDFIELD_COUNT.js new file mode 100644 index 0000000..dfb13aa --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/HRANDFIELD_COUNT.js @@ -0,0 +1,14 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const HRANDFIELD_1 = require("./HRANDFIELD"); +var HRANDFIELD_2 = require("./HRANDFIELD"); +Object.defineProperty(exports, "FIRST_KEY_INDEX", { enumerable: true, get: function () { return HRANDFIELD_2.FIRST_KEY_INDEX; } }); +Object.defineProperty(exports, "IS_READ_ONLY", { enumerable: true, get: function () { return HRANDFIELD_2.IS_READ_ONLY; } }); +function transformArguments(key, count) { + return [ + ...(0, HRANDFIELD_1.transformArguments)(key), + count.toString() + ]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/HRANDFIELD_COUNT_WITHVALUES.d.ts b/server/node_modules/@redis/client/dist/lib/commands/HRANDFIELD_COUNT_WITHVALUES.d.ts new file mode 100644 index 0000000..d18f62c --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/HRANDFIELD_COUNT_WITHVALUES.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export { FIRST_KEY_INDEX, IS_READ_ONLY } from './HRANDFIELD_COUNT'; +export declare function transformArguments(key: RedisCommandArgument, count: number): RedisCommandArguments; +export { transformTuplesReply as transformReply } from './generic-transformers'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/HRANDFIELD_COUNT_WITHVALUES.js b/server/node_modules/@redis/client/dist/lib/commands/HRANDFIELD_COUNT_WITHVALUES.js new file mode 100644 index 0000000..24556d2 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/HRANDFIELD_COUNT_WITHVALUES.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const HRANDFIELD_COUNT_1 = require("./HRANDFIELD_COUNT"); +var HRANDFIELD_COUNT_2 = require("./HRANDFIELD_COUNT"); +Object.defineProperty(exports, "FIRST_KEY_INDEX", { enumerable: true, get: function () { return HRANDFIELD_COUNT_2.FIRST_KEY_INDEX; } }); +Object.defineProperty(exports, "IS_READ_ONLY", { enumerable: true, get: function () { return HRANDFIELD_COUNT_2.IS_READ_ONLY; } }); +function transformArguments(key, count) { + return [ + ...(0, HRANDFIELD_COUNT_1.transformArguments)(key, count), + 'WITHVALUES' + ]; +} +exports.transformArguments = transformArguments; +var generic_transformers_1 = require("./generic-transformers"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return generic_transformers_1.transformTuplesReply; } }); diff --git a/server/node_modules/@redis/client/dist/lib/commands/HSCAN.d.ts b/server/node_modules/@redis/client/dist/lib/commands/HSCAN.d.ts new file mode 100644 index 0000000..4d4447e --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/HSCAN.d.ts @@ -0,0 +1,16 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +import { ScanOptions } from './generic-transformers'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: RedisCommandArgument, cursor: number, options?: ScanOptions): RedisCommandArguments; +export type HScanRawReply = [RedisCommandArgument, Array]; +export interface HScanTuple { + field: RedisCommandArgument; + value: RedisCommandArgument; +} +interface HScanReply { + cursor: number; + tuples: Array; +} +export declare function transformReply([cursor, rawTuples]: HScanRawReply): HScanReply; +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/commands/HSCAN.js b/server/node_modules/@redis/client/dist/lib/commands/HSCAN.js new file mode 100644 index 0000000..5930408 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/HSCAN.js @@ -0,0 +1,27 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, cursor, options) { + return (0, generic_transformers_1.pushScanArguments)([ + 'HSCAN', + key + ], cursor, options); +} +exports.transformArguments = transformArguments; +function transformReply([cursor, rawTuples]) { + const parsedTuples = []; + for (let i = 0; i < rawTuples.length; i += 2) { + parsedTuples.push({ + field: rawTuples[i], + value: rawTuples[i + 1] + }); + } + return { + cursor: Number(cursor), + tuples: parsedTuples + }; +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/client/dist/lib/commands/HSCAN_NOVALUES.d.ts b/server/node_modules/@redis/client/dist/lib/commands/HSCAN_NOVALUES.d.ts new file mode 100644 index 0000000..196df8c --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/HSCAN_NOVALUES.d.ts @@ -0,0 +1,10 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +import { ScanOptions } from './generic-transformers'; +import { HScanRawReply } from './HSCAN'; +export { FIRST_KEY_INDEX, IS_READ_ONLY } from './HSCAN'; +export declare function transformArguments(key: RedisCommandArgument, cursor: number, options?: ScanOptions): RedisCommandArguments; +interface HScanNoValuesReply { + cursor: number; + keys: Array; +} +export declare function transformReply([cursor, rawData]: HScanRawReply): HScanNoValuesReply; diff --git a/server/node_modules/@redis/client/dist/lib/commands/HSCAN_NOVALUES.js b/server/node_modules/@redis/client/dist/lib/commands/HSCAN_NOVALUES.js new file mode 100644 index 0000000..68db4ce --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/HSCAN_NOVALUES.js @@ -0,0 +1,20 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const HSCAN_1 = require("./HSCAN"); +var HSCAN_2 = require("./HSCAN"); +Object.defineProperty(exports, "FIRST_KEY_INDEX", { enumerable: true, get: function () { return HSCAN_2.FIRST_KEY_INDEX; } }); +Object.defineProperty(exports, "IS_READ_ONLY", { enumerable: true, get: function () { return HSCAN_2.IS_READ_ONLY; } }); +function transformArguments(key, cursor, options) { + const args = (0, HSCAN_1.transformArguments)(key, cursor, options); + args.push('NOVALUES'); + return args; +} +exports.transformArguments = transformArguments; +function transformReply([cursor, rawData]) { + return { + cursor: Number(cursor), + keys: rawData + }; +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/client/dist/lib/commands/HSET.d.ts b/server/node_modules/@redis/client/dist/lib/commands/HSET.d.ts new file mode 100644 index 0000000..7208ffe --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/HSET.d.ts @@ -0,0 +1,12 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +type Types = RedisCommandArgument | number; +type HSETObject = Record; +type HSETMap = Map; +type HSETTuples = Array<[Types, Types]> | Array; +type GenericArguments = [key: RedisCommandArgument]; +type SingleFieldArguments = [...generic: GenericArguments, field: Types, value: Types]; +type MultipleFieldsArguments = [...generic: GenericArguments, value: HSETObject | HSETMap | HSETTuples]; +export declare function transformArguments(...[key, value, fieldValue]: SingleFieldArguments | MultipleFieldsArguments): RedisCommandArguments; +export declare function transformReply(): number; +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/commands/HSET.js b/server/node_modules/@redis/client/dist/lib/commands/HSET.js new file mode 100644 index 0000000..cb2b735 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/HSET.js @@ -0,0 +1,45 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(...[key, value, fieldValue]) { + const args = ['HSET', key]; + if (typeof value === 'string' || typeof value === 'number' || Buffer.isBuffer(value)) { + args.push(convertValue(value), convertValue(fieldValue)); + } + else if (value instanceof Map) { + pushMap(args, value); + } + else if (Array.isArray(value)) { + pushTuples(args, value); + } + else { + pushObject(args, value); + } + return args; +} +exports.transformArguments = transformArguments; +function pushMap(args, map) { + for (const [key, value] of map.entries()) { + args.push(convertValue(key), convertValue(value)); + } +} +function pushTuples(args, tuples) { + for (const tuple of tuples) { + if (Array.isArray(tuple)) { + pushTuples(args, tuple); + continue; + } + args.push(convertValue(tuple)); + } +} +function pushObject(args, object) { + for (const key of Object.keys(object)) { + args.push(convertValue(key), convertValue(object[key])); + } +} +function convertValue(value) { + return typeof value === 'number' ? + value.toString() : + value; +} diff --git a/server/node_modules/@redis/client/dist/lib/commands/HSETNX.d.ts b/server/node_modules/@redis/client/dist/lib/commands/HSETNX.d.ts new file mode 100644 index 0000000..8c115a0 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/HSETNX.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument, field: RedisCommandArgument, value: RedisCommandArgument): RedisCommandArguments; +export { transformBooleanReply as transformReply } from './generic-transformers'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/HSETNX.js b/server/node_modules/@redis/client/dist/lib/commands/HSETNX.js new file mode 100644 index 0000000..c450fc4 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/HSETNX.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, field, value) { + return ['HSETNX', key, field, value]; +} +exports.transformArguments = transformArguments; +var generic_transformers_1 = require("./generic-transformers"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return generic_transformers_1.transformBooleanReply; } }); diff --git a/server/node_modules/@redis/client/dist/lib/commands/HSTRLEN.d.ts b/server/node_modules/@redis/client/dist/lib/commands/HSTRLEN.d.ts new file mode 100644 index 0000000..cdffa17 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/HSTRLEN.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument, field: RedisCommandArgument): RedisCommandArguments; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/client/dist/lib/commands/HSTRLEN.js b/server/node_modules/@redis/client/dist/lib/commands/HSTRLEN.js new file mode 100644 index 0000000..307213b --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/HSTRLEN.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, field) { + return ['HSTRLEN', key, field]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/HTTL.d.ts b/server/node_modules/@redis/client/dist/lib/commands/HTTL.d.ts new file mode 100644 index 0000000..f04cffd --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/HTTL.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: RedisCommandArgument, fields: RedisCommandArgument | Array): import(".").RedisCommandArguments; +export declare function transformReply(): Array | null; diff --git a/server/node_modules/@redis/client/dist/lib/commands/HTTL.js b/server/node_modules/@redis/client/dist/lib/commands/HTTL.js new file mode 100644 index 0000000..3c93d1c --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/HTTL.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, fields) { + return (0, generic_transformers_1.pushVerdictArgument)(['HTTL', key, 'FIELDS'], fields); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/HVALS.d.ts b/server/node_modules/@redis/client/dist/lib/commands/HVALS.d.ts new file mode 100644 index 0000000..b5c1c09 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/HVALS.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument): RedisCommandArguments; +export declare function transformReply(): Array; diff --git a/server/node_modules/@redis/client/dist/lib/commands/HVALS.js b/server/node_modules/@redis/client/dist/lib/commands/HVALS.js new file mode 100644 index 0000000..f279fa1 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/HVALS.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key) { + return ['HVALS', key]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/INCR.d.ts b/server/node_modules/@redis/client/dist/lib/commands/INCR.d.ts new file mode 100644 index 0000000..c35a19c --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/INCR.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument): RedisCommandArguments; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/client/dist/lib/commands/INCR.js b/server/node_modules/@redis/client/dist/lib/commands/INCR.js new file mode 100644 index 0000000..1364aac --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/INCR.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key) { + return ['INCR', key]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/INCRBY.d.ts b/server/node_modules/@redis/client/dist/lib/commands/INCRBY.d.ts new file mode 100644 index 0000000..2ae5b5a --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/INCRBY.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument, increment: number): RedisCommandArguments; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/client/dist/lib/commands/INCRBY.js b/server/node_modules/@redis/client/dist/lib/commands/INCRBY.js new file mode 100644 index 0000000..4ecbab2 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/INCRBY.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, increment) { + return ['INCRBY', key, increment.toString()]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/INCRBYFLOAT.d.ts b/server/node_modules/@redis/client/dist/lib/commands/INCRBYFLOAT.d.ts new file mode 100644 index 0000000..369c0f6 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/INCRBYFLOAT.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument, increment: number): RedisCommandArguments; +export declare function transformReply(): RedisCommandArgument; diff --git a/server/node_modules/@redis/client/dist/lib/commands/INCRBYFLOAT.js b/server/node_modules/@redis/client/dist/lib/commands/INCRBYFLOAT.js new file mode 100644 index 0000000..33d6bb2 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/INCRBYFLOAT.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, increment) { + return ['INCRBYFLOAT', key, increment.toString()]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/INFO.d.ts b/server/node_modules/@redis/client/dist/lib/commands/INFO.d.ts new file mode 100644 index 0000000..8bec82b --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/INFO.d.ts @@ -0,0 +1,3 @@ +export declare const IS_READ_ONLY = true; +export declare function transformArguments(section?: string): Array; +export declare function transformReply(): string; diff --git a/server/node_modules/@redis/client/dist/lib/commands/INFO.js b/server/node_modules/@redis/client/dist/lib/commands/INFO.js new file mode 100644 index 0000000..0711467 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/INFO.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = void 0; +exports.IS_READ_ONLY = true; +function transformArguments(section) { + const args = ['INFO']; + if (section) { + args.push(section); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/KEYS.d.ts b/server/node_modules/@redis/client/dist/lib/commands/KEYS.d.ts new file mode 100644 index 0000000..afb77fe --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/KEYS.d.ts @@ -0,0 +1,3 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare function transformArguments(pattern: RedisCommandArgument): RedisCommandArguments; +export declare function transformReply(): Array; diff --git a/server/node_modules/@redis/client/dist/lib/commands/KEYS.js b/server/node_modules/@redis/client/dist/lib/commands/KEYS.js new file mode 100644 index 0000000..84a8b33 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/KEYS.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments(pattern) { + return ['KEYS', pattern]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/LASTSAVE.d.ts b/server/node_modules/@redis/client/dist/lib/commands/LASTSAVE.d.ts new file mode 100644 index 0000000..6da05a0 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/LASTSAVE.d.ts @@ -0,0 +1,3 @@ +export declare const IS_READ_ONLY = true; +export declare function transformArguments(): Array; +export declare function transformReply(reply: number): Date; diff --git a/server/node_modules/@redis/client/dist/lib/commands/LASTSAVE.js b/server/node_modules/@redis/client/dist/lib/commands/LASTSAVE.js new file mode 100644 index 0000000..c22924f --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/LASTSAVE.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = void 0; +exports.IS_READ_ONLY = true; +function transformArguments() { + return ['LASTSAVE']; +} +exports.transformArguments = transformArguments; +function transformReply(reply) { + return new Date(reply); +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/client/dist/lib/commands/LATENCY_DOCTOR.d.ts b/server/node_modules/@redis/client/dist/lib/commands/LATENCY_DOCTOR.d.ts new file mode 100644 index 0000000..f7ef9c4 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/LATENCY_DOCTOR.d.ts @@ -0,0 +1,2 @@ +export declare function transformArguments(): Array; +export declare function transformReply(): string; diff --git a/server/node_modules/@redis/client/dist/lib/commands/LATENCY_DOCTOR.js b/server/node_modules/@redis/client/dist/lib/commands/LATENCY_DOCTOR.js new file mode 100644 index 0000000..426c33d --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/LATENCY_DOCTOR.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments() { + return ['LATENCY', 'DOCTOR']; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/LATENCY_GRAPH.d.ts b/server/node_modules/@redis/client/dist/lib/commands/LATENCY_GRAPH.d.ts new file mode 100644 index 0000000..60491ba --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/LATENCY_GRAPH.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArguments } from '.'; +export type EventType = 'active-defrag-cycle' | 'aof-fsync-always' | 'aof-stat' | 'aof-rewrite-diff-write' | 'aof-rename' | 'aof-write' | 'aof-write-active-child' | 'aof-write-alone' | 'aof-write-pending-fsync' | 'command' | 'expire-cycle' | 'eviction-cycle' | 'eviction-del' | 'fast-command' | 'fork' | 'rdb-unlink-temp-file'; +export declare function transformArguments(event: EventType): RedisCommandArguments; +export declare function transformReply(): string; diff --git a/server/node_modules/@redis/client/dist/lib/commands/LATENCY_GRAPH.js b/server/node_modules/@redis/client/dist/lib/commands/LATENCY_GRAPH.js new file mode 100644 index 0000000..1786777 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/LATENCY_GRAPH.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments(event) { + return ['LATENCY', 'GRAPH', event]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/LATENCY_HISTORY.d.ts b/server/node_modules/@redis/client/dist/lib/commands/LATENCY_HISTORY.d.ts new file mode 100644 index 0000000..c9412d4 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/LATENCY_HISTORY.d.ts @@ -0,0 +1,6 @@ +export type EventType = ('active-defrag-cycle' | 'aof-fsync-always' | 'aof-stat' | 'aof-rewrite-diff-write' | 'aof-rename' | 'aof-write' | 'aof-write-active-child' | 'aof-write-alone' | 'aof-write-pending-fsync' | 'command' | 'expire-cycle' | 'eviction-cycle' | 'eviction-del' | 'fast-command' | 'fork' | 'rdb-unlink-temp-file'); +export declare function transformArguments(event: EventType): string[]; +export declare function transformReply(): Array<[ + timestamp: number, + latency: number +]>; diff --git a/server/node_modules/@redis/client/dist/lib/commands/LATENCY_HISTORY.js b/server/node_modules/@redis/client/dist/lib/commands/LATENCY_HISTORY.js new file mode 100644 index 0000000..063da3e --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/LATENCY_HISTORY.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments(event) { + return ['LATENCY', 'HISTORY', event]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/LATENCY_LATEST.d.ts b/server/node_modules/@redis/client/dist/lib/commands/LATENCY_LATEST.d.ts new file mode 100644 index 0000000..f3f12b1 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/LATENCY_LATEST.d.ts @@ -0,0 +1,8 @@ +import { RedisCommandArguments } from '.'; +export declare function transformArguments(): RedisCommandArguments; +export declare function transformReply(): Array<[ + name: string, + timestamp: number, + latestLatency: number, + allTimeLatency: number +]>; diff --git a/server/node_modules/@redis/client/dist/lib/commands/LATENCY_LATEST.js b/server/node_modules/@redis/client/dist/lib/commands/LATENCY_LATEST.js new file mode 100644 index 0000000..98f6733 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/LATENCY_LATEST.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments() { + return ['LATENCY', 'LATEST']; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/LCS.d.ts b/server/node_modules/@redis/client/dist/lib/commands/LCS.d.ts new file mode 100644 index 0000000..3d9a628 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/LCS.d.ts @@ -0,0 +1,6 @@ +/// +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key1: RedisCommandArgument, key2: RedisCommandArgument): RedisCommandArguments; +export declare function transformReply(): string | Buffer; diff --git a/server/node_modules/@redis/client/dist/lib/commands/LCS.js b/server/node_modules/@redis/client/dist/lib/commands/LCS.js new file mode 100644 index 0000000..b770199 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/LCS.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key1, key2) { + return [ + 'LCS', + key1, + key2 + ]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/LCS_IDX.d.ts b/server/node_modules/@redis/client/dist/lib/commands/LCS_IDX.d.ts new file mode 100644 index 0000000..1604e6e --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/LCS_IDX.d.ts @@ -0,0 +1,21 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +import { RangeReply, RawRangeReply } from './generic-transformers'; +export { FIRST_KEY_INDEX, IS_READ_ONLY } from './LCS'; +export declare function transformArguments(key1: RedisCommandArgument, key2: RedisCommandArgument): RedisCommandArguments; +type RawReply = [ + 'matches', + Array<[ + key1: RawRangeReply, + key2: RawRangeReply + ]>, + 'len', + number +]; +interface Reply { + matches: Array<{ + key1: RangeReply; + key2: RangeReply; + }>; + length: number; +} +export declare function transformReply(reply: RawReply): Reply; diff --git a/server/node_modules/@redis/client/dist/lib/commands/LCS_IDX.js b/server/node_modules/@redis/client/dist/lib/commands/LCS_IDX.js new file mode 100644 index 0000000..c38132a --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/LCS_IDX.js @@ -0,0 +1,24 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +const LCS_1 = require("./LCS"); +var LCS_2 = require("./LCS"); +Object.defineProperty(exports, "FIRST_KEY_INDEX", { enumerable: true, get: function () { return LCS_2.FIRST_KEY_INDEX; } }); +Object.defineProperty(exports, "IS_READ_ONLY", { enumerable: true, get: function () { return LCS_2.IS_READ_ONLY; } }); +function transformArguments(key1, key2) { + const args = (0, LCS_1.transformArguments)(key1, key2); + args.push('IDX'); + return args; +} +exports.transformArguments = transformArguments; +function transformReply(reply) { + return { + matches: reply[1].map(([key1, key2]) => ({ + key1: (0, generic_transformers_1.transformRangeReply)(key1), + key2: (0, generic_transformers_1.transformRangeReply)(key2) + })), + length: reply[3] + }; +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/client/dist/lib/commands/LCS_IDX_WITHMATCHLEN.d.ts b/server/node_modules/@redis/client/dist/lib/commands/LCS_IDX_WITHMATCHLEN.d.ts new file mode 100644 index 0000000..89208da --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/LCS_IDX_WITHMATCHLEN.d.ts @@ -0,0 +1,23 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +import { RangeReply, RawRangeReply } from './generic-transformers'; +export { FIRST_KEY_INDEX, IS_READ_ONLY } from './LCS'; +export declare function transformArguments(key1: RedisCommandArgument, key2: RedisCommandArgument): RedisCommandArguments; +type RawReply = [ + 'matches', + Array<[ + key1: RawRangeReply, + key2: RawRangeReply, + length: number + ]>, + 'len', + number +]; +interface Reply { + matches: Array<{ + key1: RangeReply; + key2: RangeReply; + length: number; + }>; + length: number; +} +export declare function transformReply(reply: RawReply): Reply; diff --git a/server/node_modules/@redis/client/dist/lib/commands/LCS_IDX_WITHMATCHLEN.js b/server/node_modules/@redis/client/dist/lib/commands/LCS_IDX_WITHMATCHLEN.js new file mode 100644 index 0000000..e031d5e --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/LCS_IDX_WITHMATCHLEN.js @@ -0,0 +1,25 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +const LCS_1 = require("./LCS"); +var LCS_2 = require("./LCS"); +Object.defineProperty(exports, "FIRST_KEY_INDEX", { enumerable: true, get: function () { return LCS_2.FIRST_KEY_INDEX; } }); +Object.defineProperty(exports, "IS_READ_ONLY", { enumerable: true, get: function () { return LCS_2.IS_READ_ONLY; } }); +function transformArguments(key1, key2) { + const args = (0, LCS_1.transformArguments)(key1, key2); + args.push('IDX', 'WITHMATCHLEN'); + return args; +} +exports.transformArguments = transformArguments; +function transformReply(reply) { + return { + matches: reply[1].map(([key1, key2, length]) => ({ + key1: (0, generic_transformers_1.transformRangeReply)(key1), + key2: (0, generic_transformers_1.transformRangeReply)(key2), + length + })), + length: reply[3] + }; +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/client/dist/lib/commands/LCS_LEN.d.ts b/server/node_modules/@redis/client/dist/lib/commands/LCS_LEN.d.ts new file mode 100644 index 0000000..d8e90e1 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/LCS_LEN.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export { FIRST_KEY_INDEX, IS_READ_ONLY } from './LCS'; +export declare function transformArguments(key1: RedisCommandArgument, key2: RedisCommandArgument): RedisCommandArguments; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/client/dist/lib/commands/LCS_LEN.js b/server/node_modules/@redis/client/dist/lib/commands/LCS_LEN.js new file mode 100644 index 0000000..cba853a --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/LCS_LEN.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const LCS_1 = require("./LCS"); +var LCS_2 = require("./LCS"); +Object.defineProperty(exports, "FIRST_KEY_INDEX", { enumerable: true, get: function () { return LCS_2.FIRST_KEY_INDEX; } }); +Object.defineProperty(exports, "IS_READ_ONLY", { enumerable: true, get: function () { return LCS_2.IS_READ_ONLY; } }); +function transformArguments(key1, key2) { + const args = (0, LCS_1.transformArguments)(key1, key2); + args.push('LEN'); + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/LINDEX.d.ts b/server/node_modules/@redis/client/dist/lib/commands/LINDEX.d.ts new file mode 100644 index 0000000..aa5a007 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/LINDEX.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: RedisCommandArgument, index: number): RedisCommandArguments; +export declare function transformReply(): RedisCommandArgument | null; diff --git a/server/node_modules/@redis/client/dist/lib/commands/LINDEX.js b/server/node_modules/@redis/client/dist/lib/commands/LINDEX.js new file mode 100644 index 0000000..72b52cc --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/LINDEX.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, index) { + return ['LINDEX', key, index.toString()]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/LINSERT.d.ts b/server/node_modules/@redis/client/dist/lib/commands/LINSERT.d.ts new file mode 100644 index 0000000..0ff1842 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/LINSERT.d.ts @@ -0,0 +1,6 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +type LInsertPosition = 'BEFORE' | 'AFTER'; +export declare function transformArguments(key: RedisCommandArgument, position: LInsertPosition, pivot: RedisCommandArgument, element: RedisCommandArgument): RedisCommandArguments; +export declare function transformReply(): number; +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/commands/LINSERT.js b/server/node_modules/@redis/client/dist/lib/commands/LINSERT.js new file mode 100644 index 0000000..2e5b523 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/LINSERT.js @@ -0,0 +1,14 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, position, pivot, element) { + return [ + 'LINSERT', + key, + position, + pivot, + element + ]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/LLEN.d.ts b/server/node_modules/@redis/client/dist/lib/commands/LLEN.d.ts new file mode 100644 index 0000000..367e9b8 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/LLEN.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: RedisCommandArgument): RedisCommandArguments; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/client/dist/lib/commands/LLEN.js b/server/node_modules/@redis/client/dist/lib/commands/LLEN.js new file mode 100644 index 0000000..2c96584 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/LLEN.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key) { + return ['LLEN', key]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/LMOVE.d.ts b/server/node_modules/@redis/client/dist/lib/commands/LMOVE.d.ts new file mode 100644 index 0000000..6c43ddc --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/LMOVE.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +import { ListSide } from './generic-transformers'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(source: RedisCommandArgument, destination: RedisCommandArgument, sourceSide: ListSide, destinationSide: ListSide): RedisCommandArguments; +export declare function transformReply(): RedisCommandArgument | null; diff --git a/server/node_modules/@redis/client/dist/lib/commands/LMOVE.js b/server/node_modules/@redis/client/dist/lib/commands/LMOVE.js new file mode 100644 index 0000000..3d44d91 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/LMOVE.js @@ -0,0 +1,14 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(source, destination, sourceSide, destinationSide) { + return [ + 'LMOVE', + source, + destination, + sourceSide, + destinationSide, + ]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/LMPOP.d.ts b/server/node_modules/@redis/client/dist/lib/commands/LMPOP.d.ts new file mode 100644 index 0000000..e411c3e --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/LMPOP.d.ts @@ -0,0 +1,8 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +import { LMPopOptions, ListSide } from './generic-transformers'; +export declare const FIRST_KEY_INDEX = 2; +export declare function transformArguments(keys: RedisCommandArgument | Array, side: ListSide, options?: LMPopOptions): RedisCommandArguments; +export declare function transformReply(): null | [ + key: string, + elements: Array +]; diff --git a/server/node_modules/@redis/client/dist/lib/commands/LMPOP.js b/server/node_modules/@redis/client/dist/lib/commands/LMPOP.js new file mode 100644 index 0000000..bf2ff9b --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/LMPOP.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 2; +function transformArguments(keys, side, options) { + return (0, generic_transformers_1.transformLMPopArguments)(['LMPOP'], keys, side, options); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/LOLWUT.d.ts b/server/node_modules/@redis/client/dist/lib/commands/LOLWUT.d.ts new file mode 100644 index 0000000..78dd275 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/LOLWUT.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument } from '.'; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(version?: number, ...optionalArguments: Array): Array; +export declare function transformReply(): RedisCommandArgument; diff --git a/server/node_modules/@redis/client/dist/lib/commands/LOLWUT.js b/server/node_modules/@redis/client/dist/lib/commands/LOLWUT.js new file mode 100644 index 0000000..20d6b61 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/LOLWUT.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = void 0; +exports.IS_READ_ONLY = true; +function transformArguments(version, ...optionalArguments) { + const args = ['LOLWUT']; + if (version) { + args.push('VERSION', version.toString(), ...optionalArguments.map(String)); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/LPOP.d.ts b/server/node_modules/@redis/client/dist/lib/commands/LPOP.d.ts new file mode 100644 index 0000000..15f87fd --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/LPOP.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument): RedisCommandArguments; +export declare function transformReply(): RedisCommandArgument | null; diff --git a/server/node_modules/@redis/client/dist/lib/commands/LPOP.js b/server/node_modules/@redis/client/dist/lib/commands/LPOP.js new file mode 100644 index 0000000..84c99a4 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/LPOP.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key) { + return ['LPOP', key]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/LPOP_COUNT.d.ts b/server/node_modules/@redis/client/dist/lib/commands/LPOP_COUNT.d.ts new file mode 100644 index 0000000..e48bfcb --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/LPOP_COUNT.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument, count: number): RedisCommandArguments; +export declare function transformReply(): Array | null; diff --git a/server/node_modules/@redis/client/dist/lib/commands/LPOP_COUNT.js b/server/node_modules/@redis/client/dist/lib/commands/LPOP_COUNT.js new file mode 100644 index 0000000..c865e8e --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/LPOP_COUNT.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, count) { + return ['LPOP', key, count.toString()]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/LPOS.d.ts b/server/node_modules/@redis/client/dist/lib/commands/LPOS.d.ts new file mode 100644 index 0000000..816ba10 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/LPOS.d.ts @@ -0,0 +1,9 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export interface LPosOptions { + RANK?: number; + MAXLEN?: number; +} +export declare function transformArguments(key: RedisCommandArgument, element: RedisCommandArgument, options?: LPosOptions): RedisCommandArguments; +export declare function transformReply(): number | null; diff --git a/server/node_modules/@redis/client/dist/lib/commands/LPOS.js b/server/node_modules/@redis/client/dist/lib/commands/LPOS.js new file mode 100644 index 0000000..72a47a0 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/LPOS.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, element, options) { + const args = ['LPOS', key, element]; + if (typeof options?.RANK === 'number') { + args.push('RANK', options.RANK.toString()); + } + if (typeof options?.MAXLEN === 'number') { + args.push('MAXLEN', options.MAXLEN.toString()); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/LPOS_COUNT.d.ts b/server/node_modules/@redis/client/dist/lib/commands/LPOS_COUNT.d.ts new file mode 100644 index 0000000..d009566 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/LPOS_COUNT.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +import { LPosOptions } from './LPOS'; +export { FIRST_KEY_INDEX, IS_READ_ONLY } from './LPOS'; +export declare function transformArguments(key: RedisCommandArgument, element: RedisCommandArgument, count: number, options?: LPosOptions): RedisCommandArguments; +export declare function transformReply(): Array; diff --git a/server/node_modules/@redis/client/dist/lib/commands/LPOS_COUNT.js b/server/node_modules/@redis/client/dist/lib/commands/LPOS_COUNT.js new file mode 100644 index 0000000..0616a06 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/LPOS_COUNT.js @@ -0,0 +1,18 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +var LPOS_1 = require("./LPOS"); +Object.defineProperty(exports, "FIRST_KEY_INDEX", { enumerable: true, get: function () { return LPOS_1.FIRST_KEY_INDEX; } }); +Object.defineProperty(exports, "IS_READ_ONLY", { enumerable: true, get: function () { return LPOS_1.IS_READ_ONLY; } }); +function transformArguments(key, element, count, options) { + const args = ['LPOS', key, element]; + if (typeof options?.RANK === 'number') { + args.push('RANK', options.RANK.toString()); + } + args.push('COUNT', count.toString()); + if (typeof options?.MAXLEN === 'number') { + args.push('MAXLEN', options.MAXLEN.toString()); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/LPUSH.d.ts b/server/node_modules/@redis/client/dist/lib/commands/LPUSH.d.ts new file mode 100644 index 0000000..9416327 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/LPUSH.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument, elements: RedisCommandArgument | Array): RedisCommandArguments; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/client/dist/lib/commands/LPUSH.js b/server/node_modules/@redis/client/dist/lib/commands/LPUSH.js new file mode 100644 index 0000000..1de8108 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/LPUSH.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, elements) { + return (0, generic_transformers_1.pushVerdictArguments)(['LPUSH', key], elements); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/LPUSHX.d.ts b/server/node_modules/@redis/client/dist/lib/commands/LPUSHX.d.ts new file mode 100644 index 0000000..ce8878e --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/LPUSHX.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument, element: RedisCommandArgument | Array): RedisCommandArguments; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/client/dist/lib/commands/LPUSHX.js b/server/node_modules/@redis/client/dist/lib/commands/LPUSHX.js new file mode 100644 index 0000000..8a45107 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/LPUSHX.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, element) { + return (0, generic_transformers_1.pushVerdictArguments)(['LPUSHX', key], element); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/LRANGE.d.ts b/server/node_modules/@redis/client/dist/lib/commands/LRANGE.d.ts new file mode 100644 index 0000000..4210b9d --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/LRANGE.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: RedisCommandArgument, start: number, stop: number): RedisCommandArguments; +export declare function transformReply(): Array; diff --git a/server/node_modules/@redis/client/dist/lib/commands/LRANGE.js b/server/node_modules/@redis/client/dist/lib/commands/LRANGE.js new file mode 100644 index 0000000..fc6127c --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/LRANGE.js @@ -0,0 +1,14 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, start, stop) { + return [ + 'LRANGE', + key, + start.toString(), + stop.toString() + ]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/LREM.d.ts b/server/node_modules/@redis/client/dist/lib/commands/LREM.d.ts new file mode 100644 index 0000000..1bf4abc --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/LREM.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument, count: number, element: RedisCommandArgument): RedisCommandArguments; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/client/dist/lib/commands/LREM.js b/server/node_modules/@redis/client/dist/lib/commands/LREM.js new file mode 100644 index 0000000..b1a7257 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/LREM.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, count, element) { + return [ + 'LREM', + key, + count.toString(), + element + ]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/LSET.d.ts b/server/node_modules/@redis/client/dist/lib/commands/LSET.d.ts new file mode 100644 index 0000000..0e9f263 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/LSET.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument, index: number, element: RedisCommandArgument): RedisCommandArguments; +export declare function transformReply(): RedisCommandArgument; diff --git a/server/node_modules/@redis/client/dist/lib/commands/LSET.js b/server/node_modules/@redis/client/dist/lib/commands/LSET.js new file mode 100644 index 0000000..132494b --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/LSET.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, index, element) { + return [ + 'LSET', + key, + index.toString(), + element + ]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/LTRIM.d.ts b/server/node_modules/@redis/client/dist/lib/commands/LTRIM.d.ts new file mode 100644 index 0000000..de34a67 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/LTRIM.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument, start: number, stop: number): RedisCommandArguments; +export declare function transformReply(): RedisCommandArgument; diff --git a/server/node_modules/@redis/client/dist/lib/commands/LTRIM.js b/server/node_modules/@redis/client/dist/lib/commands/LTRIM.js new file mode 100644 index 0000000..8c3e9ee --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/LTRIM.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, start, stop) { + return [ + 'LTRIM', + key, + start.toString(), + stop.toString() + ]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/MEMORY_DOCTOR.d.ts b/server/node_modules/@redis/client/dist/lib/commands/MEMORY_DOCTOR.d.ts new file mode 100644 index 0000000..f7ef9c4 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/MEMORY_DOCTOR.d.ts @@ -0,0 +1,2 @@ +export declare function transformArguments(): Array; +export declare function transformReply(): string; diff --git a/server/node_modules/@redis/client/dist/lib/commands/MEMORY_DOCTOR.js b/server/node_modules/@redis/client/dist/lib/commands/MEMORY_DOCTOR.js new file mode 100644 index 0000000..7efd2ea --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/MEMORY_DOCTOR.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments() { + return ['MEMORY', 'DOCTOR']; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/MEMORY_MALLOC-STATS.d.ts b/server/node_modules/@redis/client/dist/lib/commands/MEMORY_MALLOC-STATS.d.ts new file mode 100644 index 0000000..f7ef9c4 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/MEMORY_MALLOC-STATS.d.ts @@ -0,0 +1,2 @@ +export declare function transformArguments(): Array; +export declare function transformReply(): string; diff --git a/server/node_modules/@redis/client/dist/lib/commands/MEMORY_MALLOC-STATS.js b/server/node_modules/@redis/client/dist/lib/commands/MEMORY_MALLOC-STATS.js new file mode 100644 index 0000000..e314ba2 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/MEMORY_MALLOC-STATS.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments() { + return ['MEMORY', 'MALLOC-STATS']; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/MEMORY_PURGE.d.ts b/server/node_modules/@redis/client/dist/lib/commands/MEMORY_PURGE.d.ts new file mode 100644 index 0000000..f7ef9c4 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/MEMORY_PURGE.d.ts @@ -0,0 +1,2 @@ +export declare function transformArguments(): Array; +export declare function transformReply(): string; diff --git a/server/node_modules/@redis/client/dist/lib/commands/MEMORY_PURGE.js b/server/node_modules/@redis/client/dist/lib/commands/MEMORY_PURGE.js new file mode 100644 index 0000000..c24f1c5 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/MEMORY_PURGE.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments() { + return ['MEMORY', 'PURGE']; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/MEMORY_STATS.d.ts b/server/node_modules/@redis/client/dist/lib/commands/MEMORY_STATS.d.ts new file mode 100644 index 0000000..cfaab6e --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/MEMORY_STATS.d.ts @@ -0,0 +1,36 @@ +export declare function transformArguments(): Array; +interface MemoryStatsReply { + peakAllocated: number; + totalAllocated: number; + startupAllocated: number; + replicationBacklog: number; + clientsReplicas: number; + clientsNormal: number; + aofBuffer: number; + luaCaches: number; + overheadTotal: number; + keysCount: number; + keysBytesPerKey: number; + datasetBytes: number; + datasetPercentage: number; + peakPercentage: number; + allocatorAllocated?: number; + allocatorActive?: number; + allocatorResident?: number; + allocatorFragmentationRatio?: number; + allocatorFragmentationBytes?: number; + allocatorRssRatio?: number; + allocatorRssBytes?: number; + rssOverheadRatio?: number; + rssOverheadBytes?: number; + fragmentation?: number; + fragmentationBytes: number; + db: { + [key: number]: { + overheadHashtableMain: number; + overheadHashtableExpires: number; + }; + }; +} +export declare function transformReply(rawReply: Array>): MemoryStatsReply; +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/commands/MEMORY_STATS.js b/server/node_modules/@redis/client/dist/lib/commands/MEMORY_STATS.js new file mode 100644 index 0000000..eea30bb --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/MEMORY_STATS.js @@ -0,0 +1,56 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = void 0; +function transformArguments() { + return ['MEMORY', 'STATS']; +} +exports.transformArguments = transformArguments; +const FIELDS_MAPPING = { + 'peak.allocated': 'peakAllocated', + 'total.allocated': 'totalAllocated', + 'startup.allocated': 'startupAllocated', + 'replication.backlog': 'replicationBacklog', + 'clients.slaves': 'clientsReplicas', + 'clients.normal': 'clientsNormal', + 'aof.buffer': 'aofBuffer', + 'lua.caches': 'luaCaches', + 'overhead.total': 'overheadTotal', + 'keys.count': 'keysCount', + 'keys.bytes-per-key': 'keysBytesPerKey', + 'dataset.bytes': 'datasetBytes', + 'dataset.percentage': 'datasetPercentage', + 'peak.percentage': 'peakPercentage', + 'allocator.allocated': 'allocatorAllocated', + 'allocator.active': 'allocatorActive', + 'allocator.resident': 'allocatorResident', + 'allocator-fragmentation.ratio': 'allocatorFragmentationRatio', + 'allocator-fragmentation.bytes': 'allocatorFragmentationBytes', + 'allocator-rss.ratio': 'allocatorRssRatio', + 'allocator-rss.bytes': 'allocatorRssBytes', + 'rss-overhead.ratio': 'rssOverheadRatio', + 'rss-overhead.bytes': 'rssOverheadBytes', + 'fragmentation': 'fragmentation', + 'fragmentation.bytes': 'fragmentationBytes' +}, DB_FIELDS_MAPPING = { + 'overhead.hashtable.main': 'overheadHashtableMain', + 'overhead.hashtable.expires': 'overheadHashtableExpires' +}; +function transformReply(rawReply) { + const reply = { + db: {} + }; + for (let i = 0; i < rawReply.length; i += 2) { + const key = rawReply[i]; + if (key.startsWith('db.')) { + const dbTuples = rawReply[i + 1], db = {}; + for (let j = 0; j < dbTuples.length; j += 2) { + db[DB_FIELDS_MAPPING[dbTuples[j]]] = dbTuples[j + 1]; + } + reply.db[key.substring(3)] = db; + continue; + } + reply[FIELDS_MAPPING[key]] = Number(rawReply[i + 1]); + } + return reply; +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/client/dist/lib/commands/MEMORY_USAGE.d.ts b/server/node_modules/@redis/client/dist/lib/commands/MEMORY_USAGE.d.ts new file mode 100644 index 0000000..274788a --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/MEMORY_USAGE.d.ts @@ -0,0 +1,8 @@ +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +interface MemoryUsageOptions { + SAMPLES?: number; +} +export declare function transformArguments(key: string, options?: MemoryUsageOptions): Array; +export declare function transformReply(): number | null; +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/commands/MEMORY_USAGE.js b/server/node_modules/@redis/client/dist/lib/commands/MEMORY_USAGE.js new file mode 100644 index 0000000..043d874 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/MEMORY_USAGE.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, options) { + const args = ['MEMORY', 'USAGE', key]; + if (options?.SAMPLES) { + args.push('SAMPLES', options.SAMPLES.toString()); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/MGET.d.ts b/server/node_modules/@redis/client/dist/lib/commands/MGET.d.ts new file mode 100644 index 0000000..e657213 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/MGET.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(keys: Array): RedisCommandArguments; +export declare function transformReply(): Array; diff --git a/server/node_modules/@redis/client/dist/lib/commands/MGET.js b/server/node_modules/@redis/client/dist/lib/commands/MGET.js new file mode 100644 index 0000000..4ef34d8 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/MGET.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(keys) { + return ['MGET', ...keys]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/MIGRATE.d.ts b/server/node_modules/@redis/client/dist/lib/commands/MIGRATE.d.ts new file mode 100644 index 0000000..548ff18 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/MIGRATE.d.ts @@ -0,0 +1,10 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +import { AuthOptions } from './AUTH'; +interface MigrateOptions { + COPY?: true; + REPLACE?: true; + AUTH?: AuthOptions; +} +export declare function transformArguments(host: RedisCommandArgument, port: number, key: RedisCommandArgument | Array, destinationDb: number, timeout: number, options?: MigrateOptions): RedisCommandArguments; +export declare function transformReply(): string; +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/commands/MIGRATE.js b/server/node_modules/@redis/client/dist/lib/commands/MIGRATE.js new file mode 100644 index 0000000..2c38fb1 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/MIGRATE.js @@ -0,0 +1,32 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments(host, port, key, destinationDb, timeout, options) { + const args = ['MIGRATE', host, port.toString()], isKeyArray = Array.isArray(key); + if (isKeyArray) { + args.push(''); + } + else { + args.push(key); + } + args.push(destinationDb.toString(), timeout.toString()); + if (options?.COPY) { + args.push('COPY'); + } + if (options?.REPLACE) { + args.push('REPLACE'); + } + if (options?.AUTH) { + if (options.AUTH.username) { + args.push('AUTH2', options.AUTH.username, options.AUTH.password); + } + else { + args.push('AUTH', options.AUTH.password); + } + } + if (isKeyArray) { + args.push('KEYS', ...key); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/MODULE_LIST.d.ts b/server/node_modules/@redis/client/dist/lib/commands/MODULE_LIST.d.ts new file mode 100644 index 0000000..f7ef9c4 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/MODULE_LIST.d.ts @@ -0,0 +1,2 @@ +export declare function transformArguments(): Array; +export declare function transformReply(): string; diff --git a/server/node_modules/@redis/client/dist/lib/commands/MODULE_LIST.js b/server/node_modules/@redis/client/dist/lib/commands/MODULE_LIST.js new file mode 100644 index 0000000..4fe8c5b --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/MODULE_LIST.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments() { + return ['MODULE', 'LIST']; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/MODULE_LOAD.d.ts b/server/node_modules/@redis/client/dist/lib/commands/MODULE_LOAD.d.ts new file mode 100644 index 0000000..f25f608 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/MODULE_LOAD.d.ts @@ -0,0 +1,2 @@ +export declare function transformArguments(path: string, moduleArgs?: Array): Array; +export declare function transformReply(): string; diff --git a/server/node_modules/@redis/client/dist/lib/commands/MODULE_LOAD.js b/server/node_modules/@redis/client/dist/lib/commands/MODULE_LOAD.js new file mode 100644 index 0000000..34aeb4b --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/MODULE_LOAD.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments(path, moduleArgs) { + const args = ['MODULE', 'LOAD', path]; + if (moduleArgs) { + args.push(...moduleArgs); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/MODULE_UNLOAD.d.ts b/server/node_modules/@redis/client/dist/lib/commands/MODULE_UNLOAD.d.ts new file mode 100644 index 0000000..ab218f9 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/MODULE_UNLOAD.d.ts @@ -0,0 +1,2 @@ +export declare function transformArguments(name: string): Array; +export declare function transformReply(): string; diff --git a/server/node_modules/@redis/client/dist/lib/commands/MODULE_UNLOAD.js b/server/node_modules/@redis/client/dist/lib/commands/MODULE_UNLOAD.js new file mode 100644 index 0000000..dbc9ac7 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/MODULE_UNLOAD.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments(name) { + return ['MODULE', 'UNLOAD', name]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/MOVE.d.ts b/server/node_modules/@redis/client/dist/lib/commands/MOVE.d.ts new file mode 100644 index 0000000..88d4956 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/MOVE.d.ts @@ -0,0 +1,3 @@ +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: string, db: number): Array; +export { transformBooleanReply as transformReply } from './generic-transformers'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/MOVE.js b/server/node_modules/@redis/client/dist/lib/commands/MOVE.js new file mode 100644 index 0000000..20c9b79 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/MOVE.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, db) { + return ['MOVE', key, db.toString()]; +} +exports.transformArguments = transformArguments; +var generic_transformers_1 = require("./generic-transformers"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return generic_transformers_1.transformBooleanReply; } }); diff --git a/server/node_modules/@redis/client/dist/lib/commands/MSET.d.ts b/server/node_modules/@redis/client/dist/lib/commands/MSET.d.ts new file mode 100644 index 0000000..75d7cd1 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/MSET.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export type MSetArguments = Array<[RedisCommandArgument, RedisCommandArgument]> | Array | Record; +export declare function transformArguments(toSet: MSetArguments): RedisCommandArguments; +export declare function transformReply(): RedisCommandArgument; diff --git a/server/node_modules/@redis/client/dist/lib/commands/MSET.js b/server/node_modules/@redis/client/dist/lib/commands/MSET.js new file mode 100644 index 0000000..7662311 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/MSET.js @@ -0,0 +1,17 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(toSet) { + const args = ['MSET']; + if (Array.isArray(toSet)) { + args.push(...toSet.flat()); + } + else { + for (const key of Object.keys(toSet)) { + args.push(key, toSet[key]); + } + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/MSETNX.d.ts b/server/node_modules/@redis/client/dist/lib/commands/MSETNX.d.ts new file mode 100644 index 0000000..cac4eae --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/MSETNX.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArguments } from '.'; +import { MSetArguments } from './MSET'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(toSet: MSetArguments): RedisCommandArguments; +export { transformBooleanReply as transformReply } from './generic-transformers'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/MSETNX.js b/server/node_modules/@redis/client/dist/lib/commands/MSETNX.js new file mode 100644 index 0000000..5ce398a --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/MSETNX.js @@ -0,0 +1,19 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(toSet) { + const args = ['MSETNX']; + if (Array.isArray(toSet)) { + args.push(...toSet.flat()); + } + else { + for (const key of Object.keys(toSet)) { + args.push(key, toSet[key]); + } + } + return args; +} +exports.transformArguments = transformArguments; +var generic_transformers_1 = require("./generic-transformers"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return generic_transformers_1.transformBooleanReply; } }); diff --git a/server/node_modules/@redis/client/dist/lib/commands/OBJECT_ENCODING.d.ts b/server/node_modules/@redis/client/dist/lib/commands/OBJECT_ENCODING.d.ts new file mode 100644 index 0000000..e9929b7 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/OBJECT_ENCODING.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 2; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: RedisCommandArgument): RedisCommandArguments; +export declare function transformReply(): string | null; diff --git a/server/node_modules/@redis/client/dist/lib/commands/OBJECT_ENCODING.js b/server/node_modules/@redis/client/dist/lib/commands/OBJECT_ENCODING.js new file mode 100644 index 0000000..2b493bc --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/OBJECT_ENCODING.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 2; +exports.IS_READ_ONLY = true; +function transformArguments(key) { + return ['OBJECT', 'ENCODING', key]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/OBJECT_FREQ.d.ts b/server/node_modules/@redis/client/dist/lib/commands/OBJECT_FREQ.d.ts new file mode 100644 index 0000000..745bcb2 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/OBJECT_FREQ.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 2; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: RedisCommandArgument): RedisCommandArguments; +export declare function transformReply(): number | null; diff --git a/server/node_modules/@redis/client/dist/lib/commands/OBJECT_FREQ.js b/server/node_modules/@redis/client/dist/lib/commands/OBJECT_FREQ.js new file mode 100644 index 0000000..8b20400 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/OBJECT_FREQ.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 2; +exports.IS_READ_ONLY = true; +function transformArguments(key) { + return ['OBJECT', 'FREQ', key]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/OBJECT_IDLETIME.d.ts b/server/node_modules/@redis/client/dist/lib/commands/OBJECT_IDLETIME.d.ts new file mode 100644 index 0000000..745bcb2 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/OBJECT_IDLETIME.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 2; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: RedisCommandArgument): RedisCommandArguments; +export declare function transformReply(): number | null; diff --git a/server/node_modules/@redis/client/dist/lib/commands/OBJECT_IDLETIME.js b/server/node_modules/@redis/client/dist/lib/commands/OBJECT_IDLETIME.js new file mode 100644 index 0000000..d5f1144 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/OBJECT_IDLETIME.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 2; +exports.IS_READ_ONLY = true; +function transformArguments(key) { + return ['OBJECT', 'IDLETIME', key]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/OBJECT_REFCOUNT.d.ts b/server/node_modules/@redis/client/dist/lib/commands/OBJECT_REFCOUNT.d.ts new file mode 100644 index 0000000..745bcb2 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/OBJECT_REFCOUNT.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 2; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: RedisCommandArgument): RedisCommandArguments; +export declare function transformReply(): number | null; diff --git a/server/node_modules/@redis/client/dist/lib/commands/OBJECT_REFCOUNT.js b/server/node_modules/@redis/client/dist/lib/commands/OBJECT_REFCOUNT.js new file mode 100644 index 0000000..7ae4d66 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/OBJECT_REFCOUNT.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 2; +exports.IS_READ_ONLY = true; +function transformArguments(key) { + return ['OBJECT', 'REFCOUNT', key]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/PERSIST.d.ts b/server/node_modules/@redis/client/dist/lib/commands/PERSIST.d.ts new file mode 100644 index 0000000..6da96dc --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/PERSIST.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument): RedisCommandArguments; +export { transformBooleanReply as transformReply } from './generic-transformers'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/PERSIST.js b/server/node_modules/@redis/client/dist/lib/commands/PERSIST.js new file mode 100644 index 0000000..0430a7f --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/PERSIST.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key) { + return ['PERSIST', key]; +} +exports.transformArguments = transformArguments; +var generic_transformers_1 = require("./generic-transformers"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return generic_transformers_1.transformBooleanReply; } }); diff --git a/server/node_modules/@redis/client/dist/lib/commands/PEXPIRE.d.ts b/server/node_modules/@redis/client/dist/lib/commands/PEXPIRE.d.ts new file mode 100644 index 0000000..2285fc3 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/PEXPIRE.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument, milliseconds: number, mode?: 'NX' | 'XX' | 'GT' | 'LT'): RedisCommandArguments; +export { transformBooleanReply as transformReply } from './generic-transformers'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/PEXPIRE.js b/server/node_modules/@redis/client/dist/lib/commands/PEXPIRE.js new file mode 100644 index 0000000..6203297 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/PEXPIRE.js @@ -0,0 +1,14 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, milliseconds, mode) { + const args = ['PEXPIRE', key, milliseconds.toString()]; + if (mode) { + args.push(mode); + } + return args; +} +exports.transformArguments = transformArguments; +var generic_transformers_1 = require("./generic-transformers"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return generic_transformers_1.transformBooleanReply; } }); diff --git a/server/node_modules/@redis/client/dist/lib/commands/PEXPIREAT.d.ts b/server/node_modules/@redis/client/dist/lib/commands/PEXPIREAT.d.ts new file mode 100644 index 0000000..0d3557a --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/PEXPIREAT.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument, millisecondsTimestamp: number | Date, mode?: 'NX' | 'XX' | 'GT' | 'LT'): RedisCommandArguments; +export { transformBooleanReply as transformReply } from './generic-transformers'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/PEXPIREAT.js b/server/node_modules/@redis/client/dist/lib/commands/PEXPIREAT.js new file mode 100644 index 0000000..67318b0 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/PEXPIREAT.js @@ -0,0 +1,19 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, millisecondsTimestamp, mode) { + const args = [ + 'PEXPIREAT', + key, + (0, generic_transformers_1.transformPXAT)(millisecondsTimestamp) + ]; + if (mode) { + args.push(mode); + } + return args; +} +exports.transformArguments = transformArguments; +var generic_transformers_2 = require("./generic-transformers"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return generic_transformers_2.transformBooleanReply; } }); diff --git a/server/node_modules/@redis/client/dist/lib/commands/PEXPIRETIME.d.ts b/server/node_modules/@redis/client/dist/lib/commands/PEXPIRETIME.d.ts new file mode 100644 index 0000000..c35a19c --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/PEXPIRETIME.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument): RedisCommandArguments; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/client/dist/lib/commands/PEXPIRETIME.js b/server/node_modules/@redis/client/dist/lib/commands/PEXPIRETIME.js new file mode 100644 index 0000000..30ab6d9 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/PEXPIRETIME.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key) { + return ['PEXPIRETIME', key]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/PFADD.d.ts b/server/node_modules/@redis/client/dist/lib/commands/PFADD.d.ts new file mode 100644 index 0000000..194c7c1 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/PFADD.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument, element: RedisCommandArgument | Array): RedisCommandArguments; +export { transformBooleanReply as transformReply } from './generic-transformers'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/PFADD.js b/server/node_modules/@redis/client/dist/lib/commands/PFADD.js new file mode 100644 index 0000000..9c474a7 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/PFADD.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, element) { + return (0, generic_transformers_1.pushVerdictArguments)(['PFADD', key], element); +} +exports.transformArguments = transformArguments; +var generic_transformers_2 = require("./generic-transformers"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return generic_transformers_2.transformBooleanReply; } }); diff --git a/server/node_modules/@redis/client/dist/lib/commands/PFCOUNT.d.ts b/server/node_modules/@redis/client/dist/lib/commands/PFCOUNT.d.ts new file mode 100644 index 0000000..13e0651 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/PFCOUNT.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument | Array): RedisCommandArguments; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/client/dist/lib/commands/PFCOUNT.js b/server/node_modules/@redis/client/dist/lib/commands/PFCOUNT.js new file mode 100644 index 0000000..3a7a1da --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/PFCOUNT.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key) { + return (0, generic_transformers_1.pushVerdictArguments)(['PFCOUNT'], key); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/PFMERGE.d.ts b/server/node_modules/@redis/client/dist/lib/commands/PFMERGE.d.ts new file mode 100644 index 0000000..d406d16 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/PFMERGE.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(destination: string, source: string | Array): RedisCommandArguments; +export declare function transformReply(): string; diff --git a/server/node_modules/@redis/client/dist/lib/commands/PFMERGE.js b/server/node_modules/@redis/client/dist/lib/commands/PFMERGE.js new file mode 100644 index 0000000..48305f9 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/PFMERGE.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +function transformArguments(destination, source) { + return (0, generic_transformers_1.pushVerdictArguments)(['PFMERGE', destination], source); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/PING.d.ts b/server/node_modules/@redis/client/dist/lib/commands/PING.d.ts new file mode 100644 index 0000000..7b7545d --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/PING.d.ts @@ -0,0 +1,3 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare function transformArguments(message?: RedisCommandArgument): RedisCommandArguments; +export declare function transformReply(): RedisCommandArgument; diff --git a/server/node_modules/@redis/client/dist/lib/commands/PING.js b/server/node_modules/@redis/client/dist/lib/commands/PING.js new file mode 100644 index 0000000..cfc7297 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/PING.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments(message) { + const args = ['PING']; + if (message) { + args.push(message); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/PSETEX.d.ts b/server/node_modules/@redis/client/dist/lib/commands/PSETEX.d.ts new file mode 100644 index 0000000..167d175 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/PSETEX.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument, milliseconds: number, value: RedisCommandArgument): RedisCommandArguments; +export declare function transformReply(): RedisCommandArgument; diff --git a/server/node_modules/@redis/client/dist/lib/commands/PSETEX.js b/server/node_modules/@redis/client/dist/lib/commands/PSETEX.js new file mode 100644 index 0000000..c3e7b8d --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/PSETEX.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, milliseconds, value) { + return [ + 'PSETEX', + key, + milliseconds.toString(), + value + ]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/PTTL.d.ts b/server/node_modules/@redis/client/dist/lib/commands/PTTL.d.ts new file mode 100644 index 0000000..367e9b8 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/PTTL.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: RedisCommandArgument): RedisCommandArguments; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/client/dist/lib/commands/PTTL.js b/server/node_modules/@redis/client/dist/lib/commands/PTTL.js new file mode 100644 index 0000000..c7e9cfc --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/PTTL.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key) { + return ['PTTL', key]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/PUBLISH.d.ts b/server/node_modules/@redis/client/dist/lib/commands/PUBLISH.d.ts new file mode 100644 index 0000000..e636aa0 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/PUBLISH.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(channel: RedisCommandArgument, message: RedisCommandArgument): RedisCommandArguments; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/client/dist/lib/commands/PUBLISH.js b/server/node_modules/@redis/client/dist/lib/commands/PUBLISH.js new file mode 100644 index 0000000..b2ca1b5 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/PUBLISH.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = void 0; +exports.IS_READ_ONLY = true; +function transformArguments(channel, message) { + return ['PUBLISH', channel, message]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/PUBSUB_CHANNELS.d.ts b/server/node_modules/@redis/client/dist/lib/commands/PUBSUB_CHANNELS.d.ts new file mode 100644 index 0000000..e892c7b --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/PUBSUB_CHANNELS.d.ts @@ -0,0 +1,3 @@ +export declare const IS_READ_ONLY = true; +export declare function transformArguments(pattern?: string): Array; +export declare function transformReply(): Array; diff --git a/server/node_modules/@redis/client/dist/lib/commands/PUBSUB_CHANNELS.js b/server/node_modules/@redis/client/dist/lib/commands/PUBSUB_CHANNELS.js new file mode 100644 index 0000000..f717e98 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/PUBSUB_CHANNELS.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = void 0; +exports.IS_READ_ONLY = true; +function transformArguments(pattern) { + const args = ['PUBSUB', 'CHANNELS']; + if (pattern) { + args.push(pattern); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/PUBSUB_NUMPAT.d.ts b/server/node_modules/@redis/client/dist/lib/commands/PUBSUB_NUMPAT.d.ts new file mode 100644 index 0000000..c3c75ec --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/PUBSUB_NUMPAT.d.ts @@ -0,0 +1,3 @@ +export declare const IS_READ_ONLY = true; +export declare function transformArguments(): Array; +export declare function transformReply(): string; diff --git a/server/node_modules/@redis/client/dist/lib/commands/PUBSUB_NUMPAT.js b/server/node_modules/@redis/client/dist/lib/commands/PUBSUB_NUMPAT.js new file mode 100644 index 0000000..81102b2 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/PUBSUB_NUMPAT.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = void 0; +exports.IS_READ_ONLY = true; +function transformArguments() { + return ['PUBSUB', 'NUMPAT']; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/PUBSUB_NUMSUB.d.ts b/server/node_modules/@redis/client/dist/lib/commands/PUBSUB_NUMSUB.d.ts new file mode 100644 index 0000000..22ba677 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/PUBSUB_NUMSUB.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(channels?: Array | RedisCommandArgument): RedisCommandArguments; +export declare function transformReply(rawReply: Array): Record; diff --git a/server/node_modules/@redis/client/dist/lib/commands/PUBSUB_NUMSUB.js b/server/node_modules/@redis/client/dist/lib/commands/PUBSUB_NUMSUB.js new file mode 100644 index 0000000..c4671b2 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/PUBSUB_NUMSUB.js @@ -0,0 +1,20 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.IS_READ_ONLY = true; +function transformArguments(channels) { + const args = ['PUBSUB', 'NUMSUB']; + if (channels) + return (0, generic_transformers_1.pushVerdictArguments)(args, channels); + return args; +} +exports.transformArguments = transformArguments; +function transformReply(rawReply) { + const transformedReply = Object.create(null); + for (let i = 0; i < rawReply.length; i += 2) { + transformedReply[rawReply[i]] = rawReply[i + 1]; + } + return transformedReply; +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/client/dist/lib/commands/PUBSUB_SHARDCHANNELS.d.ts b/server/node_modules/@redis/client/dist/lib/commands/PUBSUB_SHARDCHANNELS.d.ts new file mode 100644 index 0000000..548c5fe --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/PUBSUB_SHARDCHANNELS.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(pattern?: RedisCommandArgument): RedisCommandArguments; +export declare function transformReply(): Array; diff --git a/server/node_modules/@redis/client/dist/lib/commands/PUBSUB_SHARDCHANNELS.js b/server/node_modules/@redis/client/dist/lib/commands/PUBSUB_SHARDCHANNELS.js new file mode 100644 index 0000000..3b32c6b --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/PUBSUB_SHARDCHANNELS.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = void 0; +exports.IS_READ_ONLY = true; +function transformArguments(pattern) { + const args = ['PUBSUB', 'SHARDCHANNELS']; + if (pattern) + args.push(pattern); + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/PUBSUB_SHARDNUMSUB.d.ts b/server/node_modules/@redis/client/dist/lib/commands/PUBSUB_SHARDNUMSUB.d.ts new file mode 100644 index 0000000..22ba677 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/PUBSUB_SHARDNUMSUB.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(channels?: Array | RedisCommandArgument): RedisCommandArguments; +export declare function transformReply(rawReply: Array): Record; diff --git a/server/node_modules/@redis/client/dist/lib/commands/PUBSUB_SHARDNUMSUB.js b/server/node_modules/@redis/client/dist/lib/commands/PUBSUB_SHARDNUMSUB.js new file mode 100644 index 0000000..0d32b64 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/PUBSUB_SHARDNUMSUB.js @@ -0,0 +1,20 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.IS_READ_ONLY = true; +function transformArguments(channels) { + const args = ['PUBSUB', 'SHARDNUMSUB']; + if (channels) + return (0, generic_transformers_1.pushVerdictArguments)(args, channels); + return args; +} +exports.transformArguments = transformArguments; +function transformReply(rawReply) { + const transformedReply = Object.create(null); + for (let i = 0; i < rawReply.length; i += 2) { + transformedReply[rawReply[i]] = rawReply[i + 1]; + } + return transformedReply; +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/client/dist/lib/commands/RANDOMKEY.d.ts b/server/node_modules/@redis/client/dist/lib/commands/RANDOMKEY.d.ts new file mode 100644 index 0000000..5214486 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/RANDOMKEY.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(): RedisCommandArguments; +export declare function transformReply(): RedisCommandArgument | null; diff --git a/server/node_modules/@redis/client/dist/lib/commands/RANDOMKEY.js b/server/node_modules/@redis/client/dist/lib/commands/RANDOMKEY.js new file mode 100644 index 0000000..34f6e1a --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/RANDOMKEY.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = void 0; +exports.IS_READ_ONLY = true; +function transformArguments() { + return ['RANDOMKEY']; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/READONLY.d.ts b/server/node_modules/@redis/client/dist/lib/commands/READONLY.d.ts new file mode 100644 index 0000000..f7ef9c4 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/READONLY.d.ts @@ -0,0 +1,2 @@ +export declare function transformArguments(): Array; +export declare function transformReply(): string; diff --git a/server/node_modules/@redis/client/dist/lib/commands/READONLY.js b/server/node_modules/@redis/client/dist/lib/commands/READONLY.js new file mode 100644 index 0000000..1615646 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/READONLY.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments() { + return ['READONLY']; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/READWRITE.d.ts b/server/node_modules/@redis/client/dist/lib/commands/READWRITE.d.ts new file mode 100644 index 0000000..f7ef9c4 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/READWRITE.d.ts @@ -0,0 +1,2 @@ +export declare function transformArguments(): Array; +export declare function transformReply(): string; diff --git a/server/node_modules/@redis/client/dist/lib/commands/READWRITE.js b/server/node_modules/@redis/client/dist/lib/commands/READWRITE.js new file mode 100644 index 0000000..10a4f88 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/READWRITE.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments() { + return ['READWRITE']; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/RENAME.d.ts b/server/node_modules/@redis/client/dist/lib/commands/RENAME.d.ts new file mode 100644 index 0000000..05cdf04 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/RENAME.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument, newKey: RedisCommandArgument): RedisCommandArguments; +export declare function transformReply(): RedisCommandArgument; diff --git a/server/node_modules/@redis/client/dist/lib/commands/RENAME.js b/server/node_modules/@redis/client/dist/lib/commands/RENAME.js new file mode 100644 index 0000000..5148f7a --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/RENAME.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, newKey) { + return ['RENAME', key, newKey]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/RENAMENX.d.ts b/server/node_modules/@redis/client/dist/lib/commands/RENAMENX.d.ts new file mode 100644 index 0000000..396dad0 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/RENAMENX.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument, newKey: RedisCommandArgument): RedisCommandArguments; +export { transformBooleanReply as transformReply } from './generic-transformers'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/RENAMENX.js b/server/node_modules/@redis/client/dist/lib/commands/RENAMENX.js new file mode 100644 index 0000000..1c5276a --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/RENAMENX.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, newKey) { + return ['RENAMENX', key, newKey]; +} +exports.transformArguments = transformArguments; +var generic_transformers_1 = require("./generic-transformers"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return generic_transformers_1.transformBooleanReply; } }); diff --git a/server/node_modules/@redis/client/dist/lib/commands/REPLICAOF.d.ts b/server/node_modules/@redis/client/dist/lib/commands/REPLICAOF.d.ts new file mode 100644 index 0000000..b40e18c --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/REPLICAOF.d.ts @@ -0,0 +1,2 @@ +export declare function transformArguments(host: string, port: number): Array; +export declare function transformReply(): string; diff --git a/server/node_modules/@redis/client/dist/lib/commands/REPLICAOF.js b/server/node_modules/@redis/client/dist/lib/commands/REPLICAOF.js new file mode 100644 index 0000000..1194dbf --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/REPLICAOF.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments(host, port) { + return ['REPLICAOF', host, port.toString()]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/RESTORE-ASKING.d.ts b/server/node_modules/@redis/client/dist/lib/commands/RESTORE-ASKING.d.ts new file mode 100644 index 0000000..f7ef9c4 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/RESTORE-ASKING.d.ts @@ -0,0 +1,2 @@ +export declare function transformArguments(): Array; +export declare function transformReply(): string; diff --git a/server/node_modules/@redis/client/dist/lib/commands/RESTORE-ASKING.js b/server/node_modules/@redis/client/dist/lib/commands/RESTORE-ASKING.js new file mode 100644 index 0000000..6c636b8 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/RESTORE-ASKING.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments() { + return ['RESTORE-ASKING']; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/RESTORE.d.ts b/server/node_modules/@redis/client/dist/lib/commands/RESTORE.d.ts new file mode 100644 index 0000000..97a8dc3 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/RESTORE.d.ts @@ -0,0 +1,11 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +interface RestoreOptions { + REPLACE?: true; + ABSTTL?: true; + IDLETIME?: number; + FREQ?: number; +} +export declare function transformArguments(key: RedisCommandArgument, ttl: number, serializedValue: RedisCommandArgument, options?: RestoreOptions): RedisCommandArguments; +export declare function transformReply(): 'OK'; +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/commands/RESTORE.js b/server/node_modules/@redis/client/dist/lib/commands/RESTORE.js new file mode 100644 index 0000000..86c9662 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/RESTORE.js @@ -0,0 +1,21 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, ttl, serializedValue, options) { + const args = ['RESTORE', key, ttl.toString(), serializedValue]; + if (options?.REPLACE) { + args.push('REPLACE'); + } + if (options?.ABSTTL) { + args.push('ABSTTL'); + } + if (options?.IDLETIME) { + args.push('IDLETIME', options.IDLETIME.toString()); + } + if (options?.FREQ) { + args.push('FREQ', options.FREQ.toString()); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ROLE.d.ts b/server/node_modules/@redis/client/dist/lib/commands/ROLE.d.ts new file mode 100644 index 0000000..c6ca68a --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ROLE.d.ts @@ -0,0 +1,32 @@ +export declare const IS_READ_ONLY = true; +export declare function transformArguments(): Array; +interface RoleReplyInterface { + role: T; +} +type RoleMasterRawReply = ['master', number, Array<[string, string, string]>]; +interface RoleMasterReply extends RoleReplyInterface<'master'> { + replicationOffest: number; + replicas: Array<{ + ip: string; + port: number; + replicationOffest: number; + }>; +} +type RoleReplicaState = 'connect' | 'connecting' | 'sync' | 'connected'; +type RoleReplicaRawReply = ['slave', string, number, RoleReplicaState, number]; +interface RoleReplicaReply extends RoleReplyInterface<'slave'> { + master: { + ip: string; + port: number; + }; + state: RoleReplicaState; + dataReceived: number; +} +type RoleSentinelRawReply = ['sentinel', Array]; +interface RoleSentinelReply extends RoleReplyInterface<'sentinel'> { + masterNames: Array; +} +type RoleRawReply = RoleMasterRawReply | RoleReplicaRawReply | RoleSentinelRawReply; +type RoleReply = RoleMasterReply | RoleReplicaReply | RoleSentinelReply; +export declare function transformReply(reply: RoleRawReply): RoleReply; +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ROLE.js b/server/node_modules/@redis/client/dist/lib/commands/ROLE.js new file mode 100644 index 0000000..30ede94 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ROLE.js @@ -0,0 +1,38 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = void 0; +exports.IS_READ_ONLY = true; +function transformArguments() { + return ['ROLE']; +} +exports.transformArguments = transformArguments; +function transformReply(reply) { + switch (reply[0]) { + case 'master': + return { + role: 'master', + replicationOffest: reply[1], + replicas: reply[2].map(([ip, port, replicationOffest]) => ({ + ip, + port: Number(port), + replicationOffest: Number(replicationOffest) + })) + }; + case 'slave': + return { + role: 'slave', + master: { + ip: reply[1], + port: reply[2] + }, + state: reply[3], + dataReceived: reply[4] + }; + case 'sentinel': + return { + role: 'sentinel', + masterNames: reply[1] + }; + } +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/client/dist/lib/commands/RPOP.d.ts b/server/node_modules/@redis/client/dist/lib/commands/RPOP.d.ts new file mode 100644 index 0000000..15f87fd --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/RPOP.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument): RedisCommandArguments; +export declare function transformReply(): RedisCommandArgument | null; diff --git a/server/node_modules/@redis/client/dist/lib/commands/RPOP.js b/server/node_modules/@redis/client/dist/lib/commands/RPOP.js new file mode 100644 index 0000000..b5c9543 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/RPOP.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key) { + return ['RPOP', key]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/RPOPLPUSH.d.ts b/server/node_modules/@redis/client/dist/lib/commands/RPOPLPUSH.d.ts new file mode 100644 index 0000000..86c0fad --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/RPOPLPUSH.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(source: RedisCommandArgument, destination: RedisCommandArgument): RedisCommandArguments; +export declare function transformReply(): RedisCommandArgument | null; diff --git a/server/node_modules/@redis/client/dist/lib/commands/RPOPLPUSH.js b/server/node_modules/@redis/client/dist/lib/commands/RPOPLPUSH.js new file mode 100644 index 0000000..d314c3d --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/RPOPLPUSH.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(source, destination) { + return ['RPOPLPUSH', source, destination]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/RPOP_COUNT.d.ts b/server/node_modules/@redis/client/dist/lib/commands/RPOP_COUNT.d.ts new file mode 100644 index 0000000..e48bfcb --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/RPOP_COUNT.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument, count: number): RedisCommandArguments; +export declare function transformReply(): Array | null; diff --git a/server/node_modules/@redis/client/dist/lib/commands/RPOP_COUNT.js b/server/node_modules/@redis/client/dist/lib/commands/RPOP_COUNT.js new file mode 100644 index 0000000..baf43bd --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/RPOP_COUNT.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, count) { + return ['RPOP', key, count.toString()]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/RPUSH.d.ts b/server/node_modules/@redis/client/dist/lib/commands/RPUSH.d.ts new file mode 100644 index 0000000..ce8878e --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/RPUSH.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument, element: RedisCommandArgument | Array): RedisCommandArguments; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/client/dist/lib/commands/RPUSH.js b/server/node_modules/@redis/client/dist/lib/commands/RPUSH.js new file mode 100644 index 0000000..58b9de5 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/RPUSH.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, element) { + return (0, generic_transformers_1.pushVerdictArguments)(['RPUSH', key], element); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/RPUSHX.d.ts b/server/node_modules/@redis/client/dist/lib/commands/RPUSHX.d.ts new file mode 100644 index 0000000..ce8878e --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/RPUSHX.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument, element: RedisCommandArgument | Array): RedisCommandArguments; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/client/dist/lib/commands/RPUSHX.js b/server/node_modules/@redis/client/dist/lib/commands/RPUSHX.js new file mode 100644 index 0000000..1eec61d --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/RPUSHX.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, element) { + return (0, generic_transformers_1.pushVerdictArguments)(['RPUSHX', key], element); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SADD.d.ts b/server/node_modules/@redis/client/dist/lib/commands/SADD.d.ts new file mode 100644 index 0000000..7586a6d --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SADD.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument, members: RedisCommandArgument | Array): RedisCommandArguments; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SADD.js b/server/node_modules/@redis/client/dist/lib/commands/SADD.js new file mode 100644 index 0000000..f4b2072 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SADD.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, members) { + return (0, generic_transformers_1.pushVerdictArguments)(['SADD', key], members); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SAVE.d.ts b/server/node_modules/@redis/client/dist/lib/commands/SAVE.d.ts new file mode 100644 index 0000000..3e8dbce --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SAVE.d.ts @@ -0,0 +1,3 @@ +import { RedisCommandArgument } from '.'; +export declare function transformArguments(): Array; +export declare function transformReply(): RedisCommandArgument; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SAVE.js b/server/node_modules/@redis/client/dist/lib/commands/SAVE.js new file mode 100644 index 0000000..051bb9c --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SAVE.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments() { + return ['SAVE']; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SCAN.d.ts b/server/node_modules/@redis/client/dist/lib/commands/SCAN.d.ts new file mode 100644 index 0000000..0c95616 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SCAN.d.ts @@ -0,0 +1,14 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +import { ScanOptions } from './generic-transformers'; +export declare const IS_READ_ONLY = true; +export interface ScanCommandOptions extends ScanOptions { + TYPE?: RedisCommandArgument; +} +export declare function transformArguments(cursor: number, options?: ScanCommandOptions): RedisCommandArguments; +type ScanRawReply = [string, Array]; +export interface ScanReply { + cursor: number; + keys: Array; +} +export declare function transformReply([cursor, keys]: ScanRawReply): ScanReply; +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SCAN.js b/server/node_modules/@redis/client/dist/lib/commands/SCAN.js new file mode 100644 index 0000000..584b4b0 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SCAN.js @@ -0,0 +1,20 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.IS_READ_ONLY = true; +function transformArguments(cursor, options) { + const args = (0, generic_transformers_1.pushScanArguments)(['SCAN'], cursor, options); + if (options?.TYPE) { + args.push('TYPE', options.TYPE); + } + return args; +} +exports.transformArguments = transformArguments; +function transformReply([cursor, keys]) { + return { + cursor: Number(cursor), + keys + }; +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SCARD.d.ts b/server/node_modules/@redis/client/dist/lib/commands/SCARD.d.ts new file mode 100644 index 0000000..c1eb736 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SCARD.d.ts @@ -0,0 +1,3 @@ +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: string): Array; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SCARD.js b/server/node_modules/@redis/client/dist/lib/commands/SCARD.js new file mode 100644 index 0000000..4a1bdab --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SCARD.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key) { + return ['SCARD', key]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SCRIPT_DEBUG.d.ts b/server/node_modules/@redis/client/dist/lib/commands/SCRIPT_DEBUG.d.ts new file mode 100644 index 0000000..56af8af --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SCRIPT_DEBUG.d.ts @@ -0,0 +1,2 @@ +export declare function transformArguments(mode: 'YES' | 'SYNC' | 'NO'): Array; +export declare function transformReply(): string; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SCRIPT_DEBUG.js b/server/node_modules/@redis/client/dist/lib/commands/SCRIPT_DEBUG.js new file mode 100644 index 0000000..15b9a0b --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SCRIPT_DEBUG.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments(mode) { + return ['SCRIPT', 'DEBUG', mode]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SCRIPT_EXISTS.d.ts b/server/node_modules/@redis/client/dist/lib/commands/SCRIPT_EXISTS.d.ts new file mode 100644 index 0000000..12fc6da --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SCRIPT_EXISTS.d.ts @@ -0,0 +1,3 @@ +import { RedisCommandArguments } from '.'; +export declare function transformArguments(sha1: string | Array): RedisCommandArguments; +export { transformBooleanArrayReply as transformReply } from './generic-transformers'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SCRIPT_EXISTS.js b/server/node_modules/@redis/client/dist/lib/commands/SCRIPT_EXISTS.js new file mode 100644 index 0000000..475c3b5 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SCRIPT_EXISTS.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = void 0; +const generic_transformers_1 = require("./generic-transformers"); +function transformArguments(sha1) { + return (0, generic_transformers_1.pushVerdictArguments)(['SCRIPT', 'EXISTS'], sha1); +} +exports.transformArguments = transformArguments; +var generic_transformers_2 = require("./generic-transformers"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return generic_transformers_2.transformBooleanArrayReply; } }); diff --git a/server/node_modules/@redis/client/dist/lib/commands/SCRIPT_FLUSH.d.ts b/server/node_modules/@redis/client/dist/lib/commands/SCRIPT_FLUSH.d.ts new file mode 100644 index 0000000..8675eff --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SCRIPT_FLUSH.d.ts @@ -0,0 +1,2 @@ +export declare function transformArguments(mode?: 'ASYNC' | 'SYNC'): Array; +export declare function transformReply(): string; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SCRIPT_FLUSH.js b/server/node_modules/@redis/client/dist/lib/commands/SCRIPT_FLUSH.js new file mode 100644 index 0000000..207885f --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SCRIPT_FLUSH.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments(mode) { + const args = ['SCRIPT', 'FLUSH']; + if (mode) { + args.push(mode); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SCRIPT_KILL.d.ts b/server/node_modules/@redis/client/dist/lib/commands/SCRIPT_KILL.d.ts new file mode 100644 index 0000000..f7ef9c4 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SCRIPT_KILL.d.ts @@ -0,0 +1,2 @@ +export declare function transformArguments(): Array; +export declare function transformReply(): string; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SCRIPT_KILL.js b/server/node_modules/@redis/client/dist/lib/commands/SCRIPT_KILL.js new file mode 100644 index 0000000..33b5ea0 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SCRIPT_KILL.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments() { + return ['SCRIPT', 'KILL']; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SCRIPT_LOAD.d.ts b/server/node_modules/@redis/client/dist/lib/commands/SCRIPT_LOAD.d.ts new file mode 100644 index 0000000..8995e3e --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SCRIPT_LOAD.d.ts @@ -0,0 +1,2 @@ +export declare function transformArguments(script: string): Array; +export declare function transformReply(): string; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SCRIPT_LOAD.js b/server/node_modules/@redis/client/dist/lib/commands/SCRIPT_LOAD.js new file mode 100644 index 0000000..41c0836 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SCRIPT_LOAD.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments(script) { + return ['SCRIPT', 'LOAD', script]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SDIFF.d.ts b/server/node_modules/@redis/client/dist/lib/commands/SDIFF.d.ts new file mode 100644 index 0000000..354b335 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SDIFF.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(keys: RedisCommandArgument | Array): RedisCommandArguments; +export declare function transformReply(): Array; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SDIFF.js b/server/node_modules/@redis/client/dist/lib/commands/SDIFF.js new file mode 100644 index 0000000..10b3d18 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SDIFF.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(keys) { + return (0, generic_transformers_1.pushVerdictArguments)(['SDIFF'], keys); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SDIFFSTORE.d.ts b/server/node_modules/@redis/client/dist/lib/commands/SDIFFSTORE.d.ts new file mode 100644 index 0000000..cc3d9ec --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SDIFFSTORE.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(destination: RedisCommandArgument, keys: RedisCommandArgument | Array): RedisCommandArguments; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SDIFFSTORE.js b/server/node_modules/@redis/client/dist/lib/commands/SDIFFSTORE.js new file mode 100644 index 0000000..c5dba76 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SDIFFSTORE.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +function transformArguments(destination, keys) { + return (0, generic_transformers_1.pushVerdictArguments)(['SDIFFSTORE', destination], keys); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SET.d.ts b/server/node_modules/@redis/client/dist/lib/commands/SET.d.ts new file mode 100644 index 0000000..f7a2a2b --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SET.d.ts @@ -0,0 +1,23 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +type MaximumOneOf = K extends keyof T ? { + [P in K]?: T[K]; +} & Partial, never>> : never; +type SetTTL = MaximumOneOf<{ + EX: number; + PX: number; + EXAT: number; + PXAT: number; + KEEPTTL: true; +}>; +type SetGuards = MaximumOneOf<{ + NX: true; + XX: true; +}>; +interface SetCommonOptions { + GET?: true; +} +export type SetOptions = SetTTL & SetGuards & SetCommonOptions; +export declare function transformArguments(key: RedisCommandArgument, value: RedisCommandArgument | number, options?: SetOptions): RedisCommandArguments; +export declare function transformReply(): RedisCommandArgument | null; +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SET.js b/server/node_modules/@redis/client/dist/lib/commands/SET.js new file mode 100644 index 0000000..5470edb --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SET.js @@ -0,0 +1,37 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, value, options) { + const args = [ + 'SET', + key, + typeof value === 'number' ? value.toString() : value + ]; + if (options?.EX !== undefined) { + args.push('EX', options.EX.toString()); + } + else if (options?.PX !== undefined) { + args.push('PX', options.PX.toString()); + } + else if (options?.EXAT !== undefined) { + args.push('EXAT', options.EXAT.toString()); + } + else if (options?.PXAT !== undefined) { + args.push('PXAT', options.PXAT.toString()); + } + else if (options?.KEEPTTL) { + args.push('KEEPTTL'); + } + if (options?.NX) { + args.push('NX'); + } + else if (options?.XX) { + args.push('XX'); + } + if (options?.GET) { + args.push('GET'); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SETBIT.d.ts b/server/node_modules/@redis/client/dist/lib/commands/SETBIT.d.ts new file mode 100644 index 0000000..e1bb713 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SETBIT.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +import { BitValue } from './generic-transformers'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument, offset: number, value: BitValue): RedisCommandArguments; +export declare function transformReply(): BitValue; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SETBIT.js b/server/node_modules/@redis/client/dist/lib/commands/SETBIT.js new file mode 100644 index 0000000..87882a2 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SETBIT.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, offset, value) { + return ['SETBIT', key, offset.toString(), value.toString()]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SETEX.d.ts b/server/node_modules/@redis/client/dist/lib/commands/SETEX.d.ts new file mode 100644 index 0000000..a89b023 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SETEX.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument, seconds: number, value: RedisCommandArgument): RedisCommandArguments; +export declare function transformReply(): RedisCommandArgument; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SETEX.js b/server/node_modules/@redis/client/dist/lib/commands/SETEX.js new file mode 100644 index 0000000..4c61175 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SETEX.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, seconds, value) { + return [ + 'SETEX', + key, + seconds.toString(), + value + ]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SETNX.d.ts b/server/node_modules/@redis/client/dist/lib/commands/SETNX.d.ts new file mode 100644 index 0000000..fd42e1d --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SETNX.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument, value: RedisCommandArgument): RedisCommandArguments; +export { transformBooleanReply as transformReply } from './generic-transformers'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SETNX.js b/server/node_modules/@redis/client/dist/lib/commands/SETNX.js new file mode 100644 index 0000000..6745e4b --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SETNX.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, value) { + return ['SETNX', key, value]; +} +exports.transformArguments = transformArguments; +var generic_transformers_1 = require("./generic-transformers"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return generic_transformers_1.transformBooleanReply; } }); diff --git a/server/node_modules/@redis/client/dist/lib/commands/SETRANGE.d.ts b/server/node_modules/@redis/client/dist/lib/commands/SETRANGE.d.ts new file mode 100644 index 0000000..b8239a6 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SETRANGE.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument, offset: number, value: RedisCommandArgument): RedisCommandArguments; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SETRANGE.js b/server/node_modules/@redis/client/dist/lib/commands/SETRANGE.js new file mode 100644 index 0000000..2d8502e --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SETRANGE.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, offset, value) { + return ['SETRANGE', key, offset.toString(), value]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SHUTDOWN.d.ts b/server/node_modules/@redis/client/dist/lib/commands/SHUTDOWN.d.ts new file mode 100644 index 0000000..88018cd --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SHUTDOWN.d.ts @@ -0,0 +1,2 @@ +export declare function transformArguments(mode?: 'NOSAVE' | 'SAVE'): Array; +export declare function transformReply(): void; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SHUTDOWN.js b/server/node_modules/@redis/client/dist/lib/commands/SHUTDOWN.js new file mode 100644 index 0000000..05ab37d --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SHUTDOWN.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments(mode) { + const args = ['SHUTDOWN']; + if (mode) { + args.push(mode); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SINTER.d.ts b/server/node_modules/@redis/client/dist/lib/commands/SINTER.d.ts new file mode 100644 index 0000000..354b335 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SINTER.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(keys: RedisCommandArgument | Array): RedisCommandArguments; +export declare function transformReply(): Array; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SINTER.js b/server/node_modules/@redis/client/dist/lib/commands/SINTER.js new file mode 100644 index 0000000..5af0ecd --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SINTER.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(keys) { + return (0, generic_transformers_1.pushVerdictArguments)(['SINTER'], keys); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SINTERCARD.d.ts b/server/node_modules/@redis/client/dist/lib/commands/SINTERCARD.d.ts new file mode 100644 index 0000000..1606dd4 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SINTERCARD.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 2; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(keys: Array | RedisCommandArgument, limit?: number): RedisCommandArguments; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SINTERCARD.js b/server/node_modules/@redis/client/dist/lib/commands/SINTERCARD.js new file mode 100644 index 0000000..449b2b2 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SINTERCARD.js @@ -0,0 +1,14 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 2; +exports.IS_READ_ONLY = true; +function transformArguments(keys, limit) { + const args = (0, generic_transformers_1.pushVerdictArgument)(['SINTERCARD'], keys); + if (limit) { + args.push('LIMIT', limit.toString()); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SINTERSTORE.d.ts b/server/node_modules/@redis/client/dist/lib/commands/SINTERSTORE.d.ts new file mode 100644 index 0000000..044a3a2 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SINTERSTORE.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(destination: RedisCommandArgument, keys: RedisCommandArgument | Array): RedisCommandArguments; +export declare function transformReply(): Array; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SINTERSTORE.js b/server/node_modules/@redis/client/dist/lib/commands/SINTERSTORE.js new file mode 100644 index 0000000..c0b5e60 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SINTERSTORE.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +function transformArguments(destination, keys) { + return (0, generic_transformers_1.pushVerdictArguments)(['SINTERSTORE', destination], keys); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SISMEMBER.d.ts b/server/node_modules/@redis/client/dist/lib/commands/SISMEMBER.d.ts new file mode 100644 index 0000000..c9f4031 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SISMEMBER.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument, member: RedisCommandArgument): RedisCommandArguments; +export { transformBooleanReply as transformReply } from './generic-transformers'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SISMEMBER.js b/server/node_modules/@redis/client/dist/lib/commands/SISMEMBER.js new file mode 100644 index 0000000..0baffee --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SISMEMBER.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, member) { + return ['SISMEMBER', key, member]; +} +exports.transformArguments = transformArguments; +var generic_transformers_1 = require("./generic-transformers"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return generic_transformers_1.transformBooleanReply; } }); diff --git a/server/node_modules/@redis/client/dist/lib/commands/SMEMBERS.d.ts b/server/node_modules/@redis/client/dist/lib/commands/SMEMBERS.d.ts new file mode 100644 index 0000000..b5c1c09 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SMEMBERS.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument): RedisCommandArguments; +export declare function transformReply(): Array; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SMEMBERS.js b/server/node_modules/@redis/client/dist/lib/commands/SMEMBERS.js new file mode 100644 index 0000000..ac54aba --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SMEMBERS.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key) { + return ['SMEMBERS', key]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SMISMEMBER.d.ts b/server/node_modules/@redis/client/dist/lib/commands/SMISMEMBER.d.ts new file mode 100644 index 0000000..a17d5f6 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SMISMEMBER.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument, members: Array): RedisCommandArguments; +export { transformBooleanArrayReply as transformReply } from './generic-transformers'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SMISMEMBER.js b/server/node_modules/@redis/client/dist/lib/commands/SMISMEMBER.js new file mode 100644 index 0000000..dfa5ae3 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SMISMEMBER.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, members) { + return ['SMISMEMBER', key, ...members]; +} +exports.transformArguments = transformArguments; +var generic_transformers_1 = require("./generic-transformers"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return generic_transformers_1.transformBooleanArrayReply; } }); diff --git a/server/node_modules/@redis/client/dist/lib/commands/SMOVE.d.ts b/server/node_modules/@redis/client/dist/lib/commands/SMOVE.d.ts new file mode 100644 index 0000000..7eee513 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SMOVE.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(source: RedisCommandArgument, destination: RedisCommandArgument, member: RedisCommandArgument): RedisCommandArguments; +export { transformBooleanReply as transformReply } from './generic-transformers'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SMOVE.js b/server/node_modules/@redis/client/dist/lib/commands/SMOVE.js new file mode 100644 index 0000000..be14ce7 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SMOVE.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(source, destination, member) { + return ['SMOVE', source, destination, member]; +} +exports.transformArguments = transformArguments; +var generic_transformers_1 = require("./generic-transformers"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return generic_transformers_1.transformBooleanReply; } }); diff --git a/server/node_modules/@redis/client/dist/lib/commands/SORT.d.ts b/server/node_modules/@redis/client/dist/lib/commands/SORT.d.ts new file mode 100644 index 0000000..f63a21d --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SORT.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArguments } from '.'; +import { SortOptions } from './generic-transformers'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: string, options?: SortOptions): RedisCommandArguments; +export declare function transformReply(): Array; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SORT.js b/server/node_modules/@redis/client/dist/lib/commands/SORT.js new file mode 100644 index 0000000..706a57d --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SORT.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, options) { + return (0, generic_transformers_1.pushSortArguments)(['SORT', key], options); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SORT_RO.d.ts b/server/node_modules/@redis/client/dist/lib/commands/SORT_RO.d.ts new file mode 100644 index 0000000..d00bd97 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SORT_RO.d.ts @@ -0,0 +1,6 @@ +import { RedisCommandArguments } from '.'; +import { SortOptions } from "./generic-transformers"; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: string, options?: SortOptions): RedisCommandArguments; +export declare function transformReply(): Array; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SORT_RO.js b/server/node_modules/@redis/client/dist/lib/commands/SORT_RO.js new file mode 100644 index 0000000..d8fa37d --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SORT_RO.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, options) { + return (0, generic_transformers_1.pushSortArguments)(['SORT_RO', key], options); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SORT_STORE.d.ts b/server/node_modules/@redis/client/dist/lib/commands/SORT_STORE.d.ts new file mode 100644 index 0000000..8d6b555 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SORT_STORE.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArguments } from '.'; +import { SortOptions } from './generic-transformers'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(source: string, destination: string, options?: SortOptions): RedisCommandArguments; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SORT_STORE.js b/server/node_modules/@redis/client/dist/lib/commands/SORT_STORE.js new file mode 100644 index 0000000..b5bc7ad --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SORT_STORE.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const SORT_1 = require("./SORT"); +exports.FIRST_KEY_INDEX = 1; +function transformArguments(source, destination, options) { + const args = (0, SORT_1.transformArguments)(source, options); + args.push('STORE', destination); + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SPOP.d.ts b/server/node_modules/@redis/client/dist/lib/commands/SPOP.d.ts new file mode 100644 index 0000000..72cf152 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SPOP.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument, count?: number): RedisCommandArguments; +export declare function transformReply(): Array; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SPOP.js b/server/node_modules/@redis/client/dist/lib/commands/SPOP.js new file mode 100644 index 0000000..51d8244 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SPOP.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, count) { + const args = ['SPOP', key]; + if (typeof count === 'number') { + args.push(count.toString()); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SPUBLISH.d.ts b/server/node_modules/@redis/client/dist/lib/commands/SPUBLISH.d.ts new file mode 100644 index 0000000..d3d20d3 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SPUBLISH.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const IS_READ_ONLY = true; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(channel: RedisCommandArgument, message: RedisCommandArgument): RedisCommandArguments; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SPUBLISH.js b/server/node_modules/@redis/client/dist/lib/commands/SPUBLISH.js new file mode 100644 index 0000000..8a18640 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SPUBLISH.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = exports.IS_READ_ONLY = void 0; +exports.IS_READ_ONLY = true; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(channel, message) { + return ['SPUBLISH', channel, message]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SRANDMEMBER.d.ts b/server/node_modules/@redis/client/dist/lib/commands/SRANDMEMBER.d.ts new file mode 100644 index 0000000..15f87fd --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SRANDMEMBER.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument): RedisCommandArguments; +export declare function transformReply(): RedisCommandArgument | null; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SRANDMEMBER.js b/server/node_modules/@redis/client/dist/lib/commands/SRANDMEMBER.js new file mode 100644 index 0000000..cfd1cb3 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SRANDMEMBER.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key) { + return ['SRANDMEMBER', key]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SRANDMEMBER_COUNT.d.ts b/server/node_modules/@redis/client/dist/lib/commands/SRANDMEMBER_COUNT.d.ts new file mode 100644 index 0000000..b149d68 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SRANDMEMBER_COUNT.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export { FIRST_KEY_INDEX } from './SRANDMEMBER'; +export declare function transformArguments(key: RedisCommandArgument, count: number): RedisCommandArguments; +export declare function transformReply(): Array; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SRANDMEMBER_COUNT.js b/server/node_modules/@redis/client/dist/lib/commands/SRANDMEMBER_COUNT.js new file mode 100644 index 0000000..6e0c4a3 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SRANDMEMBER_COUNT.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const SRANDMEMBER_1 = require("./SRANDMEMBER"); +var SRANDMEMBER_2 = require("./SRANDMEMBER"); +Object.defineProperty(exports, "FIRST_KEY_INDEX", { enumerable: true, get: function () { return SRANDMEMBER_2.FIRST_KEY_INDEX; } }); +function transformArguments(key, count) { + return [ + ...(0, SRANDMEMBER_1.transformArguments)(key), + count.toString() + ]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SREM.d.ts b/server/node_modules/@redis/client/dist/lib/commands/SREM.d.ts new file mode 100644 index 0000000..7586a6d --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SREM.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument, members: RedisCommandArgument | Array): RedisCommandArguments; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SREM.js b/server/node_modules/@redis/client/dist/lib/commands/SREM.js new file mode 100644 index 0000000..121b1ef --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SREM.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, members) { + return (0, generic_transformers_1.pushVerdictArguments)(['SREM', key], members); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SSCAN.d.ts b/server/node_modules/@redis/client/dist/lib/commands/SSCAN.d.ts new file mode 100644 index 0000000..b8bea7b --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SSCAN.d.ts @@ -0,0 +1,12 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +import { ScanOptions } from './generic-transformers'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: RedisCommandArgument, cursor: number, options?: ScanOptions): RedisCommandArguments; +type SScanRawReply = [string, Array]; +interface SScanReply { + cursor: number; + members: Array; +} +export declare function transformReply([cursor, members]: SScanRawReply): SScanReply; +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SSCAN.js b/server/node_modules/@redis/client/dist/lib/commands/SSCAN.js new file mode 100644 index 0000000..e14f086 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SSCAN.js @@ -0,0 +1,20 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, cursor, options) { + return (0, generic_transformers_1.pushScanArguments)([ + 'SSCAN', + key, + ], cursor, options); +} +exports.transformArguments = transformArguments; +function transformReply([cursor, members]) { + return { + cursor: Number(cursor), + members + }; +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/client/dist/lib/commands/STRLEN.d.ts b/server/node_modules/@redis/client/dist/lib/commands/STRLEN.d.ts new file mode 100644 index 0000000..367e9b8 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/STRLEN.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: RedisCommandArgument): RedisCommandArguments; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/client/dist/lib/commands/STRLEN.js b/server/node_modules/@redis/client/dist/lib/commands/STRLEN.js new file mode 100644 index 0000000..4786064 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/STRLEN.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key) { + return ['STRLEN', key]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SUNION.d.ts b/server/node_modules/@redis/client/dist/lib/commands/SUNION.d.ts new file mode 100644 index 0000000..354b335 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SUNION.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(keys: RedisCommandArgument | Array): RedisCommandArguments; +export declare function transformReply(): Array; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SUNION.js b/server/node_modules/@redis/client/dist/lib/commands/SUNION.js new file mode 100644 index 0000000..d3d7521 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SUNION.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(keys) { + return (0, generic_transformers_1.pushVerdictArguments)(['SUNION'], keys); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SUNIONSTORE.d.ts b/server/node_modules/@redis/client/dist/lib/commands/SUNIONSTORE.d.ts new file mode 100644 index 0000000..cc3d9ec --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SUNIONSTORE.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(destination: RedisCommandArgument, keys: RedisCommandArgument | Array): RedisCommandArguments; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SUNIONSTORE.js b/server/node_modules/@redis/client/dist/lib/commands/SUNIONSTORE.js new file mode 100644 index 0000000..93d85fd --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SUNIONSTORE.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +function transformArguments(destination, keys) { + return (0, generic_transformers_1.pushVerdictArguments)(['SUNIONSTORE', destination], keys); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SWAPDB.d.ts b/server/node_modules/@redis/client/dist/lib/commands/SWAPDB.d.ts new file mode 100644 index 0000000..21e7bbd --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SWAPDB.d.ts @@ -0,0 +1,2 @@ +export declare function transformArguments(index1: number, index2: number): Array; +export declare function transformReply(): string; diff --git a/server/node_modules/@redis/client/dist/lib/commands/SWAPDB.js b/server/node_modules/@redis/client/dist/lib/commands/SWAPDB.js new file mode 100644 index 0000000..4967529 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/SWAPDB.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments(index1, index2) { + return ['SWAPDB', index1.toString(), index2.toString()]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/TIME.d.ts b/server/node_modules/@redis/client/dist/lib/commands/TIME.d.ts new file mode 100644 index 0000000..806bc25 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/TIME.d.ts @@ -0,0 +1,6 @@ +export declare function transformArguments(): Array; +interface TimeReply extends Date { + microseconds: number; +} +export declare function transformReply(reply: [string, string]): TimeReply; +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/commands/TIME.js b/server/node_modules/@redis/client/dist/lib/commands/TIME.js new file mode 100644 index 0000000..087bc18 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/TIME.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = void 0; +function transformArguments() { + return ['TIME']; +} +exports.transformArguments = transformArguments; +function transformReply(reply) { + const seconds = Number(reply[0]), microseconds = Number(reply[1]), d = new Date(seconds * 1000 + microseconds / 1000); + d.microseconds = microseconds; + return d; +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/client/dist/lib/commands/TOUCH.d.ts b/server/node_modules/@redis/client/dist/lib/commands/TOUCH.d.ts new file mode 100644 index 0000000..13e0651 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/TOUCH.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument | Array): RedisCommandArguments; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/client/dist/lib/commands/TOUCH.js b/server/node_modules/@redis/client/dist/lib/commands/TOUCH.js new file mode 100644 index 0000000..96fe9fe --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/TOUCH.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key) { + return (0, generic_transformers_1.pushVerdictArguments)(['TOUCH'], key); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/TTL.d.ts b/server/node_modules/@redis/client/dist/lib/commands/TTL.d.ts new file mode 100644 index 0000000..367e9b8 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/TTL.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: RedisCommandArgument): RedisCommandArguments; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/client/dist/lib/commands/TTL.js b/server/node_modules/@redis/client/dist/lib/commands/TTL.js new file mode 100644 index 0000000..7a3949f --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/TTL.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key) { + return ['TTL', key]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/TYPE.d.ts b/server/node_modules/@redis/client/dist/lib/commands/TYPE.d.ts new file mode 100644 index 0000000..021d48e --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/TYPE.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: RedisCommandArgument): RedisCommandArguments; +export declare function transformReply(): RedisCommandArgument; diff --git a/server/node_modules/@redis/client/dist/lib/commands/TYPE.js b/server/node_modules/@redis/client/dist/lib/commands/TYPE.js new file mode 100644 index 0000000..53b79e7 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/TYPE.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key) { + return ['TYPE', key]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/UNLINK.d.ts b/server/node_modules/@redis/client/dist/lib/commands/UNLINK.d.ts new file mode 100644 index 0000000..13e0651 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/UNLINK.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument | Array): RedisCommandArguments; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/client/dist/lib/commands/UNLINK.js b/server/node_modules/@redis/client/dist/lib/commands/UNLINK.js new file mode 100644 index 0000000..7e8591c --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/UNLINK.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key) { + return (0, generic_transformers_1.pushVerdictArguments)(['UNLINK'], key); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/UNWATCH.d.ts b/server/node_modules/@redis/client/dist/lib/commands/UNWATCH.d.ts new file mode 100644 index 0000000..f7ef9c4 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/UNWATCH.d.ts @@ -0,0 +1,2 @@ +export declare function transformArguments(): Array; +export declare function transformReply(): string; diff --git a/server/node_modules/@redis/client/dist/lib/commands/UNWATCH.js b/server/node_modules/@redis/client/dist/lib/commands/UNWATCH.js new file mode 100644 index 0000000..085fec8 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/UNWATCH.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments() { + return ['UNWATCH']; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/WAIT.d.ts b/server/node_modules/@redis/client/dist/lib/commands/WAIT.d.ts new file mode 100644 index 0000000..3b9e386 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/WAIT.d.ts @@ -0,0 +1,3 @@ +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(numberOfReplicas: number, timeout: number): Array; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/client/dist/lib/commands/WAIT.js b/server/node_modules/@redis/client/dist/lib/commands/WAIT.js new file mode 100644 index 0000000..ad980ee --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/WAIT.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(numberOfReplicas, timeout) { + return ['WAIT', numberOfReplicas.toString(), timeout.toString()]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/WATCH.d.ts b/server/node_modules/@redis/client/dist/lib/commands/WATCH.d.ts new file mode 100644 index 0000000..2408532 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/WATCH.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: string | Array): RedisCommandArguments; +export declare function transformReply(): string; diff --git a/server/node_modules/@redis/client/dist/lib/commands/WATCH.js b/server/node_modules/@redis/client/dist/lib/commands/WATCH.js new file mode 100644 index 0000000..2e4048a --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/WATCH.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key) { + return (0, generic_transformers_1.pushVerdictArguments)(['WATCH'], key); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/XACK.d.ts b/server/node_modules/@redis/client/dist/lib/commands/XACK.d.ts new file mode 100644 index 0000000..706f075 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/XACK.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument, group: RedisCommandArgument, id: RedisCommandArgument | Array): RedisCommandArguments; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/client/dist/lib/commands/XACK.js b/server/node_modules/@redis/client/dist/lib/commands/XACK.js new file mode 100644 index 0000000..07bd8db --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/XACK.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, group, id) { + return (0, generic_transformers_1.pushVerdictArguments)(['XACK', key, group], id); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/XADD.d.ts b/server/node_modules/@redis/client/dist/lib/commands/XADD.d.ts new file mode 100644 index 0000000..a5fee51 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/XADD.d.ts @@ -0,0 +1,14 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +interface XAddOptions { + NOMKSTREAM?: true; + TRIM?: { + strategy?: 'MAXLEN' | 'MINID'; + strategyModifier?: '=' | '~'; + threshold: number; + limit?: number; + }; +} +export declare function transformArguments(key: RedisCommandArgument, id: RedisCommandArgument, message: Record, options?: XAddOptions): RedisCommandArguments; +export declare function transformReply(): string; +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/commands/XADD.js b/server/node_modules/@redis/client/dist/lib/commands/XADD.js new file mode 100644 index 0000000..3eee1be --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/XADD.js @@ -0,0 +1,28 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, id, message, options) { + const args = ['XADD', key]; + if (options?.NOMKSTREAM) { + args.push('NOMKSTREAM'); + } + if (options?.TRIM) { + if (options.TRIM.strategy) { + args.push(options.TRIM.strategy); + } + if (options.TRIM.strategyModifier) { + args.push(options.TRIM.strategyModifier); + } + args.push(options.TRIM.threshold.toString()); + if (options.TRIM.limit) { + args.push('LIMIT', options.TRIM.limit.toString()); + } + } + args.push(id); + for (const [key, value] of Object.entries(message)) { + args.push(key, value); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/XAUTOCLAIM.d.ts b/server/node_modules/@redis/client/dist/lib/commands/XAUTOCLAIM.d.ts new file mode 100644 index 0000000..c3ddaac --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/XAUTOCLAIM.d.ts @@ -0,0 +1,14 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +import { StreamMessagesNullReply } from './generic-transformers'; +export declare const FIRST_KEY_INDEX = 1; +export interface XAutoClaimOptions { + COUNT?: number; +} +export declare function transformArguments(key: RedisCommandArgument, group: RedisCommandArgument, consumer: RedisCommandArgument, minIdleTime: number, start: string, options?: XAutoClaimOptions): RedisCommandArguments; +type XAutoClaimRawReply = [RedisCommandArgument, Array]; +interface XAutoClaimReply { + nextId: RedisCommandArgument; + messages: StreamMessagesNullReply; +} +export declare function transformReply(reply: XAutoClaimRawReply): XAutoClaimReply; +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/commands/XAUTOCLAIM.js b/server/node_modules/@redis/client/dist/lib/commands/XAUTOCLAIM.js new file mode 100644 index 0000000..6b93781 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/XAUTOCLAIM.js @@ -0,0 +1,20 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, group, consumer, minIdleTime, start, options) { + const args = ['XAUTOCLAIM', key, group, consumer, minIdleTime.toString(), start]; + if (options?.COUNT) { + args.push('COUNT', options.COUNT.toString()); + } + return args; +} +exports.transformArguments = transformArguments; +function transformReply(reply) { + return { + nextId: reply[0], + messages: (0, generic_transformers_1.transformStreamMessagesNullReply)(reply[1]) + }; +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/client/dist/lib/commands/XAUTOCLAIM_JUSTID.d.ts b/server/node_modules/@redis/client/dist/lib/commands/XAUTOCLAIM_JUSTID.d.ts new file mode 100644 index 0000000..373775f --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/XAUTOCLAIM_JUSTID.d.ts @@ -0,0 +1,10 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +import { transformArguments as transformXAutoClaimArguments } from './XAUTOCLAIM'; +export { FIRST_KEY_INDEX } from './XAUTOCLAIM'; +export declare function transformArguments(...args: Parameters): RedisCommandArguments; +type XAutoClaimJustIdRawReply = [RedisCommandArgument, Array]; +interface XAutoClaimJustIdReply { + nextId: RedisCommandArgument; + messages: Array; +} +export declare function transformReply(reply: XAutoClaimJustIdRawReply): XAutoClaimJustIdReply; diff --git a/server/node_modules/@redis/client/dist/lib/commands/XAUTOCLAIM_JUSTID.js b/server/node_modules/@redis/client/dist/lib/commands/XAUTOCLAIM_JUSTID.js new file mode 100644 index 0000000..8835b47 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/XAUTOCLAIM_JUSTID.js @@ -0,0 +1,20 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const XAUTOCLAIM_1 = require("./XAUTOCLAIM"); +var XAUTOCLAIM_2 = require("./XAUTOCLAIM"); +Object.defineProperty(exports, "FIRST_KEY_INDEX", { enumerable: true, get: function () { return XAUTOCLAIM_2.FIRST_KEY_INDEX; } }); +function transformArguments(...args) { + return [ + ...(0, XAUTOCLAIM_1.transformArguments)(...args), + 'JUSTID' + ]; +} +exports.transformArguments = transformArguments; +function transformReply(reply) { + return { + nextId: reply[0], + messages: reply[1] + }; +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/client/dist/lib/commands/XCLAIM.d.ts b/server/node_modules/@redis/client/dist/lib/commands/XCLAIM.d.ts new file mode 100644 index 0000000..62d5fb7 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/XCLAIM.d.ts @@ -0,0 +1,10 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export interface XClaimOptions { + IDLE?: number; + TIME?: number | Date; + RETRYCOUNT?: number; + FORCE?: true; +} +export declare function transformArguments(key: RedisCommandArgument, group: RedisCommandArgument, consumer: RedisCommandArgument, minIdleTime: number, id: RedisCommandArgument | Array, options?: XClaimOptions): RedisCommandArguments; +export { transformStreamMessagesNullReply as transformReply } from './generic-transformers'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/XCLAIM.js b/server/node_modules/@redis/client/dist/lib/commands/XCLAIM.js new file mode 100644 index 0000000..b30c854 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/XCLAIM.js @@ -0,0 +1,24 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, group, consumer, minIdleTime, id, options) { + const args = (0, generic_transformers_1.pushVerdictArguments)(['XCLAIM', key, group, consumer, minIdleTime.toString()], id); + if (options?.IDLE) { + args.push('IDLE', options.IDLE.toString()); + } + if (options?.TIME) { + args.push('TIME', (typeof options.TIME === 'number' ? options.TIME : options.TIME.getTime()).toString()); + } + if (options?.RETRYCOUNT) { + args.push('RETRYCOUNT', options.RETRYCOUNT.toString()); + } + if (options?.FORCE) { + args.push('FORCE'); + } + return args; +} +exports.transformArguments = transformArguments; +var generic_transformers_2 = require("./generic-transformers"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return generic_transformers_2.transformStreamMessagesNullReply; } }); diff --git a/server/node_modules/@redis/client/dist/lib/commands/XCLAIM_JUSTID.d.ts b/server/node_modules/@redis/client/dist/lib/commands/XCLAIM_JUSTID.d.ts new file mode 100644 index 0000000..c0a206d --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/XCLAIM_JUSTID.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +import { transformArguments as transformXClaimArguments } from './XCLAIM'; +export { FIRST_KEY_INDEX } from './XCLAIM'; +export declare function transformArguments(...args: Parameters): RedisCommandArguments; +export declare function transformReply(): Array; diff --git a/server/node_modules/@redis/client/dist/lib/commands/XCLAIM_JUSTID.js b/server/node_modules/@redis/client/dist/lib/commands/XCLAIM_JUSTID.js new file mode 100644 index 0000000..ef7093b --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/XCLAIM_JUSTID.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const XCLAIM_1 = require("./XCLAIM"); +var XCLAIM_2 = require("./XCLAIM"); +Object.defineProperty(exports, "FIRST_KEY_INDEX", { enumerable: true, get: function () { return XCLAIM_2.FIRST_KEY_INDEX; } }); +function transformArguments(...args) { + return [ + ...(0, XCLAIM_1.transformArguments)(...args), + 'JUSTID' + ]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/XDEL.d.ts b/server/node_modules/@redis/client/dist/lib/commands/XDEL.d.ts new file mode 100644 index 0000000..5b4e2d3 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/XDEL.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument, id: RedisCommandArgument | Array): RedisCommandArguments; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/client/dist/lib/commands/XDEL.js b/server/node_modules/@redis/client/dist/lib/commands/XDEL.js new file mode 100644 index 0000000..2713cea --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/XDEL.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, id) { + return (0, generic_transformers_1.pushVerdictArguments)(['XDEL', key], id); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/XGROUP_CREATE.d.ts b/server/node_modules/@redis/client/dist/lib/commands/XGROUP_CREATE.d.ts new file mode 100644 index 0000000..eb83a0c --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/XGROUP_CREATE.d.ts @@ -0,0 +1,8 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 2; +interface XGroupCreateOptions { + MKSTREAM?: true; +} +export declare function transformArguments(key: RedisCommandArgument, group: RedisCommandArgument, id: RedisCommandArgument, options?: XGroupCreateOptions): RedisCommandArguments; +export declare function transformReply(): RedisCommandArgument; +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/commands/XGROUP_CREATE.js b/server/node_modules/@redis/client/dist/lib/commands/XGROUP_CREATE.js new file mode 100644 index 0000000..4aa4976 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/XGROUP_CREATE.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 2; +function transformArguments(key, group, id, options) { + const args = ['XGROUP', 'CREATE', key, group, id]; + if (options?.MKSTREAM) { + args.push('MKSTREAM'); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/XGROUP_CREATECONSUMER.d.ts b/server/node_modules/@redis/client/dist/lib/commands/XGROUP_CREATECONSUMER.d.ts new file mode 100644 index 0000000..2c88f0b --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/XGROUP_CREATECONSUMER.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 2; +export declare function transformArguments(key: RedisCommandArgument, group: RedisCommandArgument, consumer: RedisCommandArgument): RedisCommandArguments; +export { transformBooleanReply as transformReply } from './generic-transformers'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/XGROUP_CREATECONSUMER.js b/server/node_modules/@redis/client/dist/lib/commands/XGROUP_CREATECONSUMER.js new file mode 100644 index 0000000..2e533de --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/XGROUP_CREATECONSUMER.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 2; +function transformArguments(key, group, consumer) { + return ['XGROUP', 'CREATECONSUMER', key, group, consumer]; +} +exports.transformArguments = transformArguments; +var generic_transformers_1 = require("./generic-transformers"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return generic_transformers_1.transformBooleanReply; } }); diff --git a/server/node_modules/@redis/client/dist/lib/commands/XGROUP_DELCONSUMER.d.ts b/server/node_modules/@redis/client/dist/lib/commands/XGROUP_DELCONSUMER.d.ts new file mode 100644 index 0000000..0e433e0 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/XGROUP_DELCONSUMER.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 2; +export declare function transformArguments(key: RedisCommandArgument, group: RedisCommandArgument, consumer: RedisCommandArgument): RedisCommandArguments; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/client/dist/lib/commands/XGROUP_DELCONSUMER.js b/server/node_modules/@redis/client/dist/lib/commands/XGROUP_DELCONSUMER.js new file mode 100644 index 0000000..32b1bd3 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/XGROUP_DELCONSUMER.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 2; +function transformArguments(key, group, consumer) { + return ['XGROUP', 'DELCONSUMER', key, group, consumer]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/XGROUP_DESTROY.d.ts b/server/node_modules/@redis/client/dist/lib/commands/XGROUP_DESTROY.d.ts new file mode 100644 index 0000000..222c00b --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/XGROUP_DESTROY.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 2; +export declare function transformArguments(key: RedisCommandArgument, group: RedisCommandArgument): RedisCommandArguments; +export { transformBooleanReply as transformReply } from './generic-transformers'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/XGROUP_DESTROY.js b/server/node_modules/@redis/client/dist/lib/commands/XGROUP_DESTROY.js new file mode 100644 index 0000000..043a5f4 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/XGROUP_DESTROY.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 2; +function transformArguments(key, group) { + return ['XGROUP', 'DESTROY', key, group]; +} +exports.transformArguments = transformArguments; +var generic_transformers_1 = require("./generic-transformers"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return generic_transformers_1.transformBooleanReply; } }); diff --git a/server/node_modules/@redis/client/dist/lib/commands/XGROUP_SETID.d.ts b/server/node_modules/@redis/client/dist/lib/commands/XGROUP_SETID.d.ts new file mode 100644 index 0000000..3e0f98d --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/XGROUP_SETID.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 2; +export declare function transformArguments(key: RedisCommandArgument, group: RedisCommandArgument, id: RedisCommandArgument): RedisCommandArguments; +export declare function transformReply(): RedisCommandArgument; diff --git a/server/node_modules/@redis/client/dist/lib/commands/XGROUP_SETID.js b/server/node_modules/@redis/client/dist/lib/commands/XGROUP_SETID.js new file mode 100644 index 0000000..0accac4 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/XGROUP_SETID.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 2; +function transformArguments(key, group, id) { + return ['XGROUP', 'SETID', key, group, id]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/XINFO_CONSUMERS.d.ts b/server/node_modules/@redis/client/dist/lib/commands/XINFO_CONSUMERS.d.ts new file mode 100644 index 0000000..23c4ec2 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/XINFO_CONSUMERS.d.ts @@ -0,0 +1,12 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 2; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: RedisCommandArgument, group: RedisCommandArgument): RedisCommandArguments; +type XInfoConsumersReply = Array<{ + name: RedisCommandArgument; + pending: number; + idle: number; + inactive: number; +}>; +export declare function transformReply(rawReply: Array): XInfoConsumersReply; +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/commands/XINFO_CONSUMERS.js b/server/node_modules/@redis/client/dist/lib/commands/XINFO_CONSUMERS.js new file mode 100644 index 0000000..ad0ebad --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/XINFO_CONSUMERS.js @@ -0,0 +1,18 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 2; +exports.IS_READ_ONLY = true; +function transformArguments(key, group) { + return ['XINFO', 'CONSUMERS', key, group]; +} +exports.transformArguments = transformArguments; +function transformReply(rawReply) { + return rawReply.map(consumer => ({ + name: consumer[1], + pending: consumer[3], + idle: consumer[5], + inactive: consumer[7] + })); +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/client/dist/lib/commands/XINFO_GROUPS.d.ts b/server/node_modules/@redis/client/dist/lib/commands/XINFO_GROUPS.d.ts new file mode 100644 index 0000000..35f5216 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/XINFO_GROUPS.d.ts @@ -0,0 +1,12 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 2; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: RedisCommandArgument): RedisCommandArguments; +type XInfoGroupsReply = Array<{ + name: RedisCommandArgument; + consumers: number; + pending: number; + lastDeliveredId: RedisCommandArgument; +}>; +export declare function transformReply(rawReply: Array): XInfoGroupsReply; +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/commands/XINFO_GROUPS.js b/server/node_modules/@redis/client/dist/lib/commands/XINFO_GROUPS.js new file mode 100644 index 0000000..45ede76 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/XINFO_GROUPS.js @@ -0,0 +1,18 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 2; +exports.IS_READ_ONLY = true; +function transformArguments(key) { + return ['XINFO', 'GROUPS', key]; +} +exports.transformArguments = transformArguments; +function transformReply(rawReply) { + return rawReply.map(group => ({ + name: group[1], + consumers: group[3], + pending: group[5], + lastDeliveredId: group[7] + })); +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/client/dist/lib/commands/XINFO_STREAM.d.ts b/server/node_modules/@redis/client/dist/lib/commands/XINFO_STREAM.d.ts new file mode 100644 index 0000000..18fc057 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/XINFO_STREAM.d.ts @@ -0,0 +1,16 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +import { StreamMessageReply } from './generic-transformers'; +export declare const FIRST_KEY_INDEX = 2; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: RedisCommandArgument): RedisCommandArguments; +interface XInfoStreamReply { + length: number; + radixTreeKeys: number; + radixTreeNodes: number; + groups: number; + lastGeneratedId: RedisCommandArgument; + firstEntry: StreamMessageReply | null; + lastEntry: StreamMessageReply | null; +} +export declare function transformReply(rawReply: Array): XInfoStreamReply; +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/commands/XINFO_STREAM.js b/server/node_modules/@redis/client/dist/lib/commands/XINFO_STREAM.js new file mode 100644 index 0000000..f636807 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/XINFO_STREAM.js @@ -0,0 +1,46 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 2; +exports.IS_READ_ONLY = true; +function transformArguments(key) { + return ['XINFO', 'STREAM', key]; +} +exports.transformArguments = transformArguments; +function transformReply(rawReply) { + const parsedReply = {}; + for (let i = 0; i < rawReply.length; i += 2) { + switch (rawReply[i]) { + case 'length': + parsedReply.length = rawReply[i + 1]; + break; + case 'radix-tree-keys': + parsedReply.radixTreeKeys = rawReply[i + 1]; + break; + case 'radix-tree-nodes': + parsedReply.radixTreeNodes = rawReply[i + 1]; + break; + case 'groups': + parsedReply.groups = rawReply[i + 1]; + break; + case 'last-generated-id': + parsedReply.lastGeneratedId = rawReply[i + 1]; + break; + case 'first-entry': + parsedReply.firstEntry = rawReply[i + 1] ? { + id: rawReply[i + 1][0], + message: (0, generic_transformers_1.transformTuplesReply)(rawReply[i + 1][1]) + } : null; + break; + case 'last-entry': + parsedReply.lastEntry = rawReply[i + 1] ? { + id: rawReply[i + 1][0], + message: (0, generic_transformers_1.transformTuplesReply)(rawReply[i + 1][1]) + } : null; + break; + } + } + return parsedReply; +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/client/dist/lib/commands/XLEN.d.ts b/server/node_modules/@redis/client/dist/lib/commands/XLEN.d.ts new file mode 100644 index 0000000..367e9b8 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/XLEN.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: RedisCommandArgument): RedisCommandArguments; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/client/dist/lib/commands/XLEN.js b/server/node_modules/@redis/client/dist/lib/commands/XLEN.js new file mode 100644 index 0000000..cbac3ec --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/XLEN.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key) { + return ['XLEN', key]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/XPENDING.d.ts b/server/node_modules/@redis/client/dist/lib/commands/XPENDING.d.ts new file mode 100644 index 0000000..bd166d5 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/XPENDING.d.ts @@ -0,0 +1,24 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: RedisCommandArgument, group: RedisCommandArgument): RedisCommandArguments; +type XPendingRawReply = [ + pending: number, + firstId: RedisCommandArgument | null, + lastId: RedisCommandArgument | null, + consumers: Array<[ + name: RedisCommandArgument, + deliveriesCounter: RedisCommandArgument + ]> | null +]; +interface XPendingReply { + pending: number; + firstId: RedisCommandArgument | null; + lastId: RedisCommandArgument | null; + consumers: Array<{ + name: RedisCommandArgument; + deliveriesCounter: number; + }> | null; +} +export declare function transformReply(reply: XPendingRawReply): XPendingReply; +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/commands/XPENDING.js b/server/node_modules/@redis/client/dist/lib/commands/XPENDING.js new file mode 100644 index 0000000..019c493 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/XPENDING.js @@ -0,0 +1,21 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, group) { + return ['XPENDING', key, group]; +} +exports.transformArguments = transformArguments; +function transformReply(reply) { + return { + pending: reply[0], + firstId: reply[1], + lastId: reply[2], + consumers: reply[3] === null ? null : reply[3].map(([name, deliveriesCounter]) => ({ + name, + deliveriesCounter: Number(deliveriesCounter) + })) + }; +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/client/dist/lib/commands/XPENDING_RANGE.d.ts b/server/node_modules/@redis/client/dist/lib/commands/XPENDING_RANGE.d.ts new file mode 100644 index 0000000..ca8e022 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/XPENDING_RANGE.d.ts @@ -0,0 +1,22 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +interface XPendingRangeOptions { + IDLE?: number; + consumer?: RedisCommandArgument; +} +export declare function transformArguments(key: RedisCommandArgument, group: RedisCommandArgument, start: string, end: string, count: number, options?: XPendingRangeOptions): RedisCommandArguments; +type XPendingRangeRawReply = Array<[ + id: RedisCommandArgument, + consumer: RedisCommandArgument, + millisecondsSinceLastDelivery: number, + deliveriesCounter: number +]>; +type XPendingRangeReply = Array<{ + id: RedisCommandArgument; + owner: RedisCommandArgument; + millisecondsSinceLastDelivery: number; + deliveriesCounter: number; +}>; +export declare function transformReply(reply: XPendingRangeRawReply): XPendingRangeReply; +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/commands/XPENDING_RANGE.js b/server/node_modules/@redis/client/dist/lib/commands/XPENDING_RANGE.js new file mode 100644 index 0000000..2f051fb --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/XPENDING_RANGE.js @@ -0,0 +1,26 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, group, start, end, count, options) { + const args = ['XPENDING', key, group]; + if (options?.IDLE) { + args.push('IDLE', options.IDLE.toString()); + } + args.push(start, end, count.toString()); + if (options?.consumer) { + args.push(options.consumer); + } + return args; +} +exports.transformArguments = transformArguments; +function transformReply(reply) { + return reply.map(([id, owner, millisecondsSinceLastDelivery, deliveriesCounter]) => ({ + id, + owner, + millisecondsSinceLastDelivery, + deliveriesCounter + })); +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/client/dist/lib/commands/XRANGE.d.ts b/server/node_modules/@redis/client/dist/lib/commands/XRANGE.d.ts new file mode 100644 index 0000000..a01cf54 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/XRANGE.d.ts @@ -0,0 +1,8 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +interface XRangeOptions { + COUNT?: number; +} +export declare function transformArguments(key: RedisCommandArgument, start: RedisCommandArgument, end: RedisCommandArgument, options?: XRangeOptions): RedisCommandArguments; +export { transformStreamMessagesReply as transformReply } from './generic-transformers'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/XRANGE.js b/server/node_modules/@redis/client/dist/lib/commands/XRANGE.js new file mode 100644 index 0000000..6817372 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/XRANGE.js @@ -0,0 +1,15 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, start, end, options) { + const args = ['XRANGE', key, start, end]; + if (options?.COUNT) { + args.push('COUNT', options.COUNT.toString()); + } + return args; +} +exports.transformArguments = transformArguments; +var generic_transformers_1 = require("./generic-transformers"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return generic_transformers_1.transformStreamMessagesReply; } }); diff --git a/server/node_modules/@redis/client/dist/lib/commands/XREAD.d.ts b/server/node_modules/@redis/client/dist/lib/commands/XREAD.d.ts new file mode 100644 index 0000000..a054dfe --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/XREAD.d.ts @@ -0,0 +1,13 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX: (streams: Array | XReadStream) => RedisCommandArgument; +export declare const IS_READ_ONLY = true; +interface XReadStream { + key: RedisCommandArgument; + id: RedisCommandArgument; +} +interface XReadOptions { + COUNT?: number; + BLOCK?: number; +} +export declare function transformArguments(streams: Array | XReadStream, options?: XReadOptions): RedisCommandArguments; +export { transformStreamsMessagesReply as transformReply } from './generic-transformers'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/XREAD.js b/server/node_modules/@redis/client/dist/lib/commands/XREAD.js new file mode 100644 index 0000000..e23b13d --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/XREAD.js @@ -0,0 +1,28 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const FIRST_KEY_INDEX = (streams) => { + return Array.isArray(streams) ? streams[0].key : streams.key; +}; +exports.FIRST_KEY_INDEX = FIRST_KEY_INDEX; +exports.IS_READ_ONLY = true; +function transformArguments(streams, options) { + const args = ['XREAD']; + if (options?.COUNT) { + args.push('COUNT', options.COUNT.toString()); + } + if (typeof options?.BLOCK === 'number') { + args.push('BLOCK', options.BLOCK.toString()); + } + args.push('STREAMS'); + const streamsArray = Array.isArray(streams) ? streams : [streams], argsLength = args.length; + for (let i = 0; i < streamsArray.length; i++) { + const stream = streamsArray[i]; + args[argsLength + i] = stream.key; + args[argsLength + streamsArray.length + i] = stream.id; + } + return args; +} +exports.transformArguments = transformArguments; +var generic_transformers_1 = require("./generic-transformers"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return generic_transformers_1.transformStreamsMessagesReply; } }); diff --git a/server/node_modules/@redis/client/dist/lib/commands/XREADGROUP.d.ts b/server/node_modules/@redis/client/dist/lib/commands/XREADGROUP.d.ts new file mode 100644 index 0000000..11f648d --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/XREADGROUP.d.ts @@ -0,0 +1,14 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export interface XReadGroupStream { + key: RedisCommandArgument; + id: RedisCommandArgument; +} +export interface XReadGroupOptions { + COUNT?: number; + BLOCK?: number; + NOACK?: true; +} +export declare const FIRST_KEY_INDEX: (_group: RedisCommandArgument, _consumer: RedisCommandArgument, streams: Array | XReadGroupStream) => RedisCommandArgument; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(group: RedisCommandArgument, consumer: RedisCommandArgument, streams: Array | XReadGroupStream, options?: XReadGroupOptions): RedisCommandArguments; +export { transformStreamsMessagesReply as transformReply } from './generic-transformers'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/XREADGROUP.js b/server/node_modules/@redis/client/dist/lib/commands/XREADGROUP.js new file mode 100644 index 0000000..73da656 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/XREADGROUP.js @@ -0,0 +1,31 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const FIRST_KEY_INDEX = (_group, _consumer, streams) => { + return Array.isArray(streams) ? streams[0].key : streams.key; +}; +exports.FIRST_KEY_INDEX = FIRST_KEY_INDEX; +exports.IS_READ_ONLY = true; +function transformArguments(group, consumer, streams, options) { + const args = ['XREADGROUP', 'GROUP', group, consumer]; + if (options?.COUNT) { + args.push('COUNT', options.COUNT.toString()); + } + if (typeof options?.BLOCK === 'number') { + args.push('BLOCK', options.BLOCK.toString()); + } + if (options?.NOACK) { + args.push('NOACK'); + } + args.push('STREAMS'); + const streamsArray = Array.isArray(streams) ? streams : [streams], argsLength = args.length; + for (let i = 0; i < streamsArray.length; i++) { + const stream = streamsArray[i]; + args[argsLength + i] = stream.key; + args[argsLength + streamsArray.length + i] = stream.id; + } + return args; +} +exports.transformArguments = transformArguments; +var generic_transformers_1 = require("./generic-transformers"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return generic_transformers_1.transformStreamsMessagesReply; } }); diff --git a/server/node_modules/@redis/client/dist/lib/commands/XREVRANGE.d.ts b/server/node_modules/@redis/client/dist/lib/commands/XREVRANGE.d.ts new file mode 100644 index 0000000..b5f4c05 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/XREVRANGE.d.ts @@ -0,0 +1,8 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +interface XRangeRevOptions { + COUNT?: number; +} +export declare function transformArguments(key: RedisCommandArgument, start: RedisCommandArgument, end: RedisCommandArgument, options?: XRangeRevOptions): RedisCommandArguments; +export { transformStreamMessagesReply as transformReply } from './generic-transformers'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/XREVRANGE.js b/server/node_modules/@redis/client/dist/lib/commands/XREVRANGE.js new file mode 100644 index 0000000..242ac79 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/XREVRANGE.js @@ -0,0 +1,15 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, start, end, options) { + const args = ['XREVRANGE', key, start, end]; + if (options?.COUNT) { + args.push('COUNT', options.COUNT.toString()); + } + return args; +} +exports.transformArguments = transformArguments; +var generic_transformers_1 = require("./generic-transformers"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return generic_transformers_1.transformStreamMessagesReply; } }); diff --git a/server/node_modules/@redis/client/dist/lib/commands/XSETID.d.ts b/server/node_modules/@redis/client/dist/lib/commands/XSETID.d.ts new file mode 100644 index 0000000..ac55f65 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/XSETID.d.ts @@ -0,0 +1,9 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +interface XSetIdOptions { + ENTRIESADDED?: number; + MAXDELETEDID?: RedisCommandArgument; +} +export declare function transformArguments(key: RedisCommandArgument, lastId: RedisCommandArgument, options?: XSetIdOptions): RedisCommandArguments; +export declare function transformReply(): 'OK'; +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/commands/XSETID.js b/server/node_modules/@redis/client/dist/lib/commands/XSETID.js new file mode 100644 index 0000000..2212bbc --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/XSETID.js @@ -0,0 +1,15 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, lastId, options) { + const args = ['XSETID', key, lastId]; + if (options?.ENTRIESADDED) { + args.push('ENTRIESADDED', options.ENTRIESADDED.toString()); + } + if (options?.MAXDELETEDID) { + args.push('MAXDELETEDID', options.MAXDELETEDID); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/XTRIM.d.ts b/server/node_modules/@redis/client/dist/lib/commands/XTRIM.d.ts new file mode 100644 index 0000000..f90c4c7 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/XTRIM.d.ts @@ -0,0 +1,9 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +interface XTrimOptions { + strategyModifier?: '=' | '~'; + LIMIT?: number; +} +export declare function transformArguments(key: RedisCommandArgument, strategy: 'MAXLEN' | 'MINID', threshold: number, options?: XTrimOptions): RedisCommandArguments; +export declare function transformReply(): number; +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/commands/XTRIM.js b/server/node_modules/@redis/client/dist/lib/commands/XTRIM.js new file mode 100644 index 0000000..c2b7530 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/XTRIM.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, strategy, threshold, options) { + const args = ['XTRIM', key, strategy]; + if (options?.strategyModifier) { + args.push(options.strategyModifier); + } + args.push(threshold.toString()); + if (options?.LIMIT) { + args.push('LIMIT', options.LIMIT.toString()); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZADD.d.ts b/server/node_modules/@redis/client/dist/lib/commands/ZADD.d.ts new file mode 100644 index 0000000..a269c33 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZADD.d.ts @@ -0,0 +1,24 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +import { ZMember } from './generic-transformers'; +export declare const FIRST_KEY_INDEX = 1; +interface NX { + NX?: true; +} +interface XX { + XX?: true; +} +interface LT { + LT?: true; +} +interface GT { + GT?: true; +} +interface CH { + CH?: true; +} +interface INCR { + INCR?: true; +} +type ZAddOptions = (NX | (XX & LT & GT)) & CH & INCR; +export declare function transformArguments(key: RedisCommandArgument, members: ZMember | Array, options?: ZAddOptions): RedisCommandArguments; +export { transformNumberInfinityReply as transformReply } from './generic-transformers'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZADD.js b/server/node_modules/@redis/client/dist/lib/commands/ZADD.js new file mode 100644 index 0000000..643d425 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZADD.js @@ -0,0 +1,35 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, members, options) { + const args = ['ZADD', key]; + if (options?.NX) { + args.push('NX'); + } + else { + if (options?.XX) { + args.push('XX'); + } + if (options?.GT) { + args.push('GT'); + } + else if (options?.LT) { + args.push('LT'); + } + } + if (options?.CH) { + args.push('CH'); + } + if (options?.INCR) { + args.push('INCR'); + } + for (const { score, value } of (Array.isArray(members) ? members : [members])) { + args.push((0, generic_transformers_1.transformNumberInfinityArgument)(score), value); + } + return args; +} +exports.transformArguments = transformArguments; +var generic_transformers_2 = require("./generic-transformers"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return generic_transformers_2.transformNumberInfinityReply; } }); diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZCARD.d.ts b/server/node_modules/@redis/client/dist/lib/commands/ZCARD.d.ts new file mode 100644 index 0000000..367e9b8 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZCARD.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: RedisCommandArgument): RedisCommandArguments; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZCARD.js b/server/node_modules/@redis/client/dist/lib/commands/ZCARD.js new file mode 100644 index 0000000..9ac6f61 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZCARD.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key) { + return ['ZCARD', key]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZCOUNT.d.ts b/server/node_modules/@redis/client/dist/lib/commands/ZCOUNT.d.ts new file mode 100644 index 0000000..c80e931 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZCOUNT.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: RedisCommandArgument, min: RedisCommandArgument | number, max: RedisCommandArgument | number): RedisCommandArguments; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZCOUNT.js b/server/node_modules/@redis/client/dist/lib/commands/ZCOUNT.js new file mode 100644 index 0000000..04ab60e --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZCOUNT.js @@ -0,0 +1,15 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, min, max) { + return [ + 'ZCOUNT', + key, + (0, generic_transformers_1.transformStringNumberInfinityArgument)(min), + (0, generic_transformers_1.transformStringNumberInfinityArgument)(max) + ]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZDIFF.d.ts b/server/node_modules/@redis/client/dist/lib/commands/ZDIFF.d.ts new file mode 100644 index 0000000..b6b465b --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZDIFF.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 2; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(keys: Array | RedisCommandArgument): RedisCommandArguments; +export declare function transformReply(): Array; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZDIFF.js b/server/node_modules/@redis/client/dist/lib/commands/ZDIFF.js new file mode 100644 index 0000000..94386d0 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZDIFF.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 2; +exports.IS_READ_ONLY = true; +function transformArguments(keys) { + return (0, generic_transformers_1.pushVerdictArgument)(['ZDIFF'], keys); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZDIFFSTORE.d.ts b/server/node_modules/@redis/client/dist/lib/commands/ZDIFFSTORE.d.ts new file mode 100644 index 0000000..556dbef --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZDIFFSTORE.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(destination: RedisCommandArgument, keys: Array | RedisCommandArgument): RedisCommandArguments; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZDIFFSTORE.js b/server/node_modules/@redis/client/dist/lib/commands/ZDIFFSTORE.js new file mode 100644 index 0000000..da3ef86 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZDIFFSTORE.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +function transformArguments(destination, keys) { + return (0, generic_transformers_1.pushVerdictArgument)(['ZDIFFSTORE', destination], keys); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZDIFF_WITHSCORES.d.ts b/server/node_modules/@redis/client/dist/lib/commands/ZDIFF_WITHSCORES.d.ts new file mode 100644 index 0000000..ef74c30 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZDIFF_WITHSCORES.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArguments } from '.'; +import { transformArguments as transformZDiffArguments } from './ZDIFF'; +export { FIRST_KEY_INDEX, IS_READ_ONLY } from './ZDIFF'; +export declare function transformArguments(...args: Parameters): RedisCommandArguments; +export { transformSortedSetWithScoresReply as transformReply } from './generic-transformers'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZDIFF_WITHSCORES.js b/server/node_modules/@redis/client/dist/lib/commands/ZDIFF_WITHSCORES.js new file mode 100644 index 0000000..2d1c953 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZDIFF_WITHSCORES.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const ZDIFF_1 = require("./ZDIFF"); +var ZDIFF_2 = require("./ZDIFF"); +Object.defineProperty(exports, "FIRST_KEY_INDEX", { enumerable: true, get: function () { return ZDIFF_2.FIRST_KEY_INDEX; } }); +Object.defineProperty(exports, "IS_READ_ONLY", { enumerable: true, get: function () { return ZDIFF_2.IS_READ_ONLY; } }); +function transformArguments(...args) { + return [ + ...(0, ZDIFF_1.transformArguments)(...args), + 'WITHSCORES' + ]; +} +exports.transformArguments = transformArguments; +var generic_transformers_1 = require("./generic-transformers"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return generic_transformers_1.transformSortedSetWithScoresReply; } }); diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZINCRBY.d.ts b/server/node_modules/@redis/client/dist/lib/commands/ZINCRBY.d.ts new file mode 100644 index 0000000..92378f7 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZINCRBY.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument, increment: number, member: RedisCommandArgument): RedisCommandArguments; +export { transformNumberInfinityReply as transformReply } from './generic-transformers'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZINCRBY.js b/server/node_modules/@redis/client/dist/lib/commands/ZINCRBY.js new file mode 100644 index 0000000..3ca7e2f --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZINCRBY.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, increment, member) { + return [ + 'ZINCRBY', + key, + (0, generic_transformers_1.transformNumberInfinityArgument)(increment), + member + ]; +} +exports.transformArguments = transformArguments; +var generic_transformers_2 = require("./generic-transformers"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return generic_transformers_2.transformNumberInfinityReply; } }); diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZINTER.d.ts b/server/node_modules/@redis/client/dist/lib/commands/ZINTER.d.ts new file mode 100644 index 0000000..9938be3 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZINTER.d.ts @@ -0,0 +1,10 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 2; +export declare const IS_READ_ONLY = true; +interface ZInterOptions { + WEIGHTS?: Array; + AGGREGATE?: 'SUM' | 'MIN' | 'MAX'; +} +export declare function transformArguments(keys: Array | RedisCommandArgument, options?: ZInterOptions): RedisCommandArguments; +export declare function transformReply(): Array; +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZINTER.js b/server/node_modules/@redis/client/dist/lib/commands/ZINTER.js new file mode 100644 index 0000000..15fd2d4 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZINTER.js @@ -0,0 +1,17 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 2; +exports.IS_READ_ONLY = true; +function transformArguments(keys, options) { + const args = (0, generic_transformers_1.pushVerdictArgument)(['ZINTER'], keys); + if (options?.WEIGHTS) { + args.push('WEIGHTS', ...options.WEIGHTS.map(weight => weight.toString())); + } + if (options?.AGGREGATE) { + args.push('AGGREGATE', options.AGGREGATE); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZINTERCARD.d.ts b/server/node_modules/@redis/client/dist/lib/commands/ZINTERCARD.d.ts new file mode 100644 index 0000000..1606dd4 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZINTERCARD.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 2; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(keys: Array | RedisCommandArgument, limit?: number): RedisCommandArguments; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZINTERCARD.js b/server/node_modules/@redis/client/dist/lib/commands/ZINTERCARD.js new file mode 100644 index 0000000..9f8cd3c --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZINTERCARD.js @@ -0,0 +1,14 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 2; +exports.IS_READ_ONLY = true; +function transformArguments(keys, limit) { + const args = (0, generic_transformers_1.pushVerdictArgument)(['ZINTERCARD'], keys); + if (limit) { + args.push('LIMIT', limit.toString()); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZINTERSTORE.d.ts b/server/node_modules/@redis/client/dist/lib/commands/ZINTERSTORE.d.ts new file mode 100644 index 0000000..3bda1a0 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZINTERSTORE.d.ts @@ -0,0 +1,9 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +interface ZInterStoreOptions { + WEIGHTS?: Array; + AGGREGATE?: 'SUM' | 'MIN' | 'MAX'; +} +export declare function transformArguments(destination: RedisCommandArgument, keys: Array | RedisCommandArgument, options?: ZInterStoreOptions): RedisCommandArguments; +export declare function transformReply(): number; +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZINTERSTORE.js b/server/node_modules/@redis/client/dist/lib/commands/ZINTERSTORE.js new file mode 100644 index 0000000..4005555 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZINTERSTORE.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +function transformArguments(destination, keys, options) { + const args = (0, generic_transformers_1.pushVerdictArgument)(['ZINTERSTORE', destination], keys); + if (options?.WEIGHTS) { + args.push('WEIGHTS', ...options.WEIGHTS.map(weight => weight.toString())); + } + if (options?.AGGREGATE) { + args.push('AGGREGATE', options.AGGREGATE); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZINTER_WITHSCORES.d.ts b/server/node_modules/@redis/client/dist/lib/commands/ZINTER_WITHSCORES.d.ts new file mode 100644 index 0000000..0899841 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZINTER_WITHSCORES.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArguments } from '.'; +import { transformArguments as transformZInterArguments } from './ZINTER'; +export { FIRST_KEY_INDEX, IS_READ_ONLY } from './ZINTER'; +export declare function transformArguments(...args: Parameters): RedisCommandArguments; +export { transformSortedSetWithScoresReply as transformReply } from './generic-transformers'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZINTER_WITHSCORES.js b/server/node_modules/@redis/client/dist/lib/commands/ZINTER_WITHSCORES.js new file mode 100644 index 0000000..c908e64 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZINTER_WITHSCORES.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const ZINTER_1 = require("./ZINTER"); +var ZINTER_2 = require("./ZINTER"); +Object.defineProperty(exports, "FIRST_KEY_INDEX", { enumerable: true, get: function () { return ZINTER_2.FIRST_KEY_INDEX; } }); +Object.defineProperty(exports, "IS_READ_ONLY", { enumerable: true, get: function () { return ZINTER_2.IS_READ_ONLY; } }); +function transformArguments(...args) { + return [ + ...(0, ZINTER_1.transformArguments)(...args), + 'WITHSCORES' + ]; +} +exports.transformArguments = transformArguments; +var generic_transformers_1 = require("./generic-transformers"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return generic_transformers_1.transformSortedSetWithScoresReply; } }); diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZLEXCOUNT.d.ts b/server/node_modules/@redis/client/dist/lib/commands/ZLEXCOUNT.d.ts new file mode 100644 index 0000000..b17344b --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZLEXCOUNT.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: RedisCommandArgument, min: RedisCommandArgument, max: RedisCommandArgument): RedisCommandArguments; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZLEXCOUNT.js b/server/node_modules/@redis/client/dist/lib/commands/ZLEXCOUNT.js new file mode 100644 index 0000000..31a02b9 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZLEXCOUNT.js @@ -0,0 +1,14 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, min, max) { + return [ + 'ZLEXCOUNT', + key, + min, + max + ]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZMPOP.d.ts b/server/node_modules/@redis/client/dist/lib/commands/ZMPOP.d.ts new file mode 100644 index 0000000..07a23c4 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZMPOP.d.ts @@ -0,0 +1,14 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +import { SortedSetSide, ZMember, ZMPopOptions } from './generic-transformers'; +export declare const FIRST_KEY_INDEX = 2; +export declare function transformArguments(keys: RedisCommandArgument | Array, side: SortedSetSide, options?: ZMPopOptions): RedisCommandArguments; +type ZMPopRawReply = null | [ + key: string, + elements: Array<[RedisCommandArgument, RedisCommandArgument]> +]; +type ZMPopReply = null | { + key: string; + elements: Array; +}; +export declare function transformReply(reply: ZMPopRawReply): ZMPopReply; +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZMPOP.js b/server/node_modules/@redis/client/dist/lib/commands/ZMPOP.js new file mode 100644 index 0000000..e2a5787 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZMPOP.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 2; +function transformArguments(keys, side, options) { + return (0, generic_transformers_1.transformZMPopArguments)(['ZMPOP'], keys, side, options); +} +exports.transformArguments = transformArguments; +function transformReply(reply) { + return reply === null ? null : { + key: reply[0], + elements: reply[1].map(generic_transformers_1.transformSortedSetMemberReply) + }; +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZMSCORE.d.ts b/server/node_modules/@redis/client/dist/lib/commands/ZMSCORE.d.ts new file mode 100644 index 0000000..37b9d1c --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZMSCORE.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: RedisCommandArgument, member: RedisCommandArgument | Array): RedisCommandArguments; +export { transformNumberInfinityNullArrayReply as transformReply } from './generic-transformers'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZMSCORE.js b/server/node_modules/@redis/client/dist/lib/commands/ZMSCORE.js new file mode 100644 index 0000000..8f06a03 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZMSCORE.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, member) { + return (0, generic_transformers_1.pushVerdictArguments)(['ZMSCORE', key], member); +} +exports.transformArguments = transformArguments; +var generic_transformers_2 = require("./generic-transformers"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return generic_transformers_2.transformNumberInfinityNullArrayReply; } }); diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZPOPMAX.d.ts b/server/node_modules/@redis/client/dist/lib/commands/ZPOPMAX.d.ts new file mode 100644 index 0000000..af0daa2 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZPOPMAX.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument): RedisCommandArguments; +export { transformSortedSetMemberNullReply as transformReply } from './generic-transformers'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZPOPMAX.js b/server/node_modules/@redis/client/dist/lib/commands/ZPOPMAX.js new file mode 100644 index 0000000..d5cfb11 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZPOPMAX.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key) { + return [ + 'ZPOPMAX', + key + ]; +} +exports.transformArguments = transformArguments; +var generic_transformers_1 = require("./generic-transformers"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return generic_transformers_1.transformSortedSetMemberNullReply; } }); diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZPOPMAX_COUNT.d.ts b/server/node_modules/@redis/client/dist/lib/commands/ZPOPMAX_COUNT.d.ts new file mode 100644 index 0000000..b46939e --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZPOPMAX_COUNT.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export { FIRST_KEY_INDEX } from './ZPOPMAX'; +export declare function transformArguments(key: RedisCommandArgument, count: number): RedisCommandArguments; +export { transformSortedSetWithScoresReply as transformReply } from './generic-transformers'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZPOPMAX_COUNT.js b/server/node_modules/@redis/client/dist/lib/commands/ZPOPMAX_COUNT.js new file mode 100644 index 0000000..2bbfef7 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZPOPMAX_COUNT.js @@ -0,0 +1,15 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const ZPOPMAX_1 = require("./ZPOPMAX"); +var ZPOPMAX_2 = require("./ZPOPMAX"); +Object.defineProperty(exports, "FIRST_KEY_INDEX", { enumerable: true, get: function () { return ZPOPMAX_2.FIRST_KEY_INDEX; } }); +function transformArguments(key, count) { + return [ + ...(0, ZPOPMAX_1.transformArguments)(key), + count.toString() + ]; +} +exports.transformArguments = transformArguments; +var generic_transformers_1 = require("./generic-transformers"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return generic_transformers_1.transformSortedSetWithScoresReply; } }); diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZPOPMIN.d.ts b/server/node_modules/@redis/client/dist/lib/commands/ZPOPMIN.d.ts new file mode 100644 index 0000000..af0daa2 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZPOPMIN.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument): RedisCommandArguments; +export { transformSortedSetMemberNullReply as transformReply } from './generic-transformers'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZPOPMIN.js b/server/node_modules/@redis/client/dist/lib/commands/ZPOPMIN.js new file mode 100644 index 0000000..c460010 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZPOPMIN.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key) { + return [ + 'ZPOPMIN', + key + ]; +} +exports.transformArguments = transformArguments; +var generic_transformers_1 = require("./generic-transformers"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return generic_transformers_1.transformSortedSetMemberNullReply; } }); diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZPOPMIN_COUNT.d.ts b/server/node_modules/@redis/client/dist/lib/commands/ZPOPMIN_COUNT.d.ts new file mode 100644 index 0000000..9856992 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZPOPMIN_COUNT.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export { FIRST_KEY_INDEX } from './ZPOPMIN'; +export declare function transformArguments(key: RedisCommandArgument, count: number): RedisCommandArguments; +export { transformSortedSetWithScoresReply as transformReply } from './generic-transformers'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZPOPMIN_COUNT.js b/server/node_modules/@redis/client/dist/lib/commands/ZPOPMIN_COUNT.js new file mode 100644 index 0000000..e1328fc --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZPOPMIN_COUNT.js @@ -0,0 +1,15 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const ZPOPMIN_1 = require("./ZPOPMIN"); +var ZPOPMIN_2 = require("./ZPOPMIN"); +Object.defineProperty(exports, "FIRST_KEY_INDEX", { enumerable: true, get: function () { return ZPOPMIN_2.FIRST_KEY_INDEX; } }); +function transformArguments(key, count) { + return [ + ...(0, ZPOPMIN_1.transformArguments)(key), + count.toString() + ]; +} +exports.transformArguments = transformArguments; +var generic_transformers_1 = require("./generic-transformers"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return generic_transformers_1.transformSortedSetWithScoresReply; } }); diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZRANDMEMBER.d.ts b/server/node_modules/@redis/client/dist/lib/commands/ZRANDMEMBER.d.ts new file mode 100644 index 0000000..ac0d54c --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZRANDMEMBER.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: RedisCommandArgument): RedisCommandArguments; +export declare function transformReply(): RedisCommandArgument | null; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZRANDMEMBER.js b/server/node_modules/@redis/client/dist/lib/commands/ZRANDMEMBER.js new file mode 100644 index 0000000..2792f2a --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZRANDMEMBER.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key) { + return ['ZRANDMEMBER', key]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZRANDMEMBER_COUNT.d.ts b/server/node_modules/@redis/client/dist/lib/commands/ZRANDMEMBER_COUNT.d.ts new file mode 100644 index 0000000..3a985d0 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZRANDMEMBER_COUNT.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export { FIRST_KEY_INDEX, IS_READ_ONLY } from './ZRANDMEMBER'; +export declare function transformArguments(key: RedisCommandArgument, count: number): RedisCommandArguments; +export declare function transformReply(): Array; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZRANDMEMBER_COUNT.js b/server/node_modules/@redis/client/dist/lib/commands/ZRANDMEMBER_COUNT.js new file mode 100644 index 0000000..7a0d4cd --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZRANDMEMBER_COUNT.js @@ -0,0 +1,14 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const ZRANDMEMBER_1 = require("./ZRANDMEMBER"); +var ZRANDMEMBER_2 = require("./ZRANDMEMBER"); +Object.defineProperty(exports, "FIRST_KEY_INDEX", { enumerable: true, get: function () { return ZRANDMEMBER_2.FIRST_KEY_INDEX; } }); +Object.defineProperty(exports, "IS_READ_ONLY", { enumerable: true, get: function () { return ZRANDMEMBER_2.IS_READ_ONLY; } }); +function transformArguments(key, count) { + return [ + ...(0, ZRANDMEMBER_1.transformArguments)(key), + count.toString() + ]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZRANDMEMBER_COUNT_WITHSCORES.d.ts b/server/node_modules/@redis/client/dist/lib/commands/ZRANDMEMBER_COUNT_WITHSCORES.d.ts new file mode 100644 index 0000000..aeb80a8 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZRANDMEMBER_COUNT_WITHSCORES.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArguments } from '.'; +import { transformArguments as transformZRandMemberCountArguments } from './ZRANDMEMBER_COUNT'; +export { FIRST_KEY_INDEX, IS_READ_ONLY } from './ZRANDMEMBER_COUNT'; +export declare function transformArguments(...args: Parameters): RedisCommandArguments; +export { transformSortedSetWithScoresReply as transformReply } from './generic-transformers'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZRANDMEMBER_COUNT_WITHSCORES.js b/server/node_modules/@redis/client/dist/lib/commands/ZRANDMEMBER_COUNT_WITHSCORES.js new file mode 100644 index 0000000..3280888 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZRANDMEMBER_COUNT_WITHSCORES.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const ZRANDMEMBER_COUNT_1 = require("./ZRANDMEMBER_COUNT"); +var ZRANDMEMBER_COUNT_2 = require("./ZRANDMEMBER_COUNT"); +Object.defineProperty(exports, "FIRST_KEY_INDEX", { enumerable: true, get: function () { return ZRANDMEMBER_COUNT_2.FIRST_KEY_INDEX; } }); +Object.defineProperty(exports, "IS_READ_ONLY", { enumerable: true, get: function () { return ZRANDMEMBER_COUNT_2.IS_READ_ONLY; } }); +function transformArguments(...args) { + return [ + ...(0, ZRANDMEMBER_COUNT_1.transformArguments)(...args), + 'WITHSCORES' + ]; +} +exports.transformArguments = transformArguments; +var generic_transformers_1 = require("./generic-transformers"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return generic_transformers_1.transformSortedSetWithScoresReply; } }); diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZRANGE.d.ts b/server/node_modules/@redis/client/dist/lib/commands/ZRANGE.d.ts new file mode 100644 index 0000000..85c18b8 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZRANGE.d.ts @@ -0,0 +1,14 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +interface ZRangeOptions { + BY?: 'SCORE' | 'LEX'; + REV?: true; + LIMIT?: { + offset: number; + count: number; + }; +} +export declare function transformArguments(key: RedisCommandArgument, min: RedisCommandArgument | number, max: RedisCommandArgument | number, options?: ZRangeOptions): RedisCommandArguments; +export declare function transformReply(): Array; +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZRANGE.js b/server/node_modules/@redis/client/dist/lib/commands/ZRANGE.js new file mode 100644 index 0000000..3e43721 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZRANGE.js @@ -0,0 +1,30 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, min, max, options) { + const args = [ + 'ZRANGE', + key, + (0, generic_transformers_1.transformStringNumberInfinityArgument)(min), + (0, generic_transformers_1.transformStringNumberInfinityArgument)(max) + ]; + switch (options?.BY) { + case 'SCORE': + args.push('BYSCORE'); + break; + case 'LEX': + args.push('BYLEX'); + break; + } + if (options?.REV) { + args.push('REV'); + } + if (options?.LIMIT) { + args.push('LIMIT', options.LIMIT.offset.toString(), options.LIMIT.count.toString()); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZRANGEBYLEX.d.ts b/server/node_modules/@redis/client/dist/lib/commands/ZRANGEBYLEX.d.ts new file mode 100644 index 0000000..45eddb8 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZRANGEBYLEX.d.ts @@ -0,0 +1,11 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export interface ZRangeByLexOptions { + LIMIT?: { + offset: number; + count: number; + }; +} +export declare function transformArguments(key: RedisCommandArgument, min: RedisCommandArgument, max: RedisCommandArgument, options?: ZRangeByLexOptions): RedisCommandArguments; +export declare function transformReply(): Array; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZRANGEBYLEX.js b/server/node_modules/@redis/client/dist/lib/commands/ZRANGEBYLEX.js new file mode 100644 index 0000000..771a3ba --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZRANGEBYLEX.js @@ -0,0 +1,19 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, min, max, options) { + const args = [ + 'ZRANGEBYLEX', + key, + (0, generic_transformers_1.transformStringNumberInfinityArgument)(min), + (0, generic_transformers_1.transformStringNumberInfinityArgument)(max) + ]; + if (options?.LIMIT) { + args.push('LIMIT', options.LIMIT.offset.toString(), options.LIMIT.count.toString()); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZRANGEBYSCORE.d.ts b/server/node_modules/@redis/client/dist/lib/commands/ZRANGEBYSCORE.d.ts new file mode 100644 index 0000000..511c92b --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZRANGEBYSCORE.d.ts @@ -0,0 +1,11 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export interface ZRangeByScoreOptions { + LIMIT?: { + offset: number; + count: number; + }; +} +export declare function transformArguments(key: RedisCommandArgument, min: string | number, max: string | number, options?: ZRangeByScoreOptions): RedisCommandArguments; +export declare function transformReply(): Array; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZRANGEBYSCORE.js b/server/node_modules/@redis/client/dist/lib/commands/ZRANGEBYSCORE.js new file mode 100644 index 0000000..011d222 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZRANGEBYSCORE.js @@ -0,0 +1,19 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, min, max, options) { + const args = [ + 'ZRANGEBYSCORE', + key, + (0, generic_transformers_1.transformStringNumberInfinityArgument)(min), + (0, generic_transformers_1.transformStringNumberInfinityArgument)(max) + ]; + if (options?.LIMIT) { + args.push('LIMIT', options.LIMIT.offset.toString(), options.LIMIT.count.toString()); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZRANGEBYSCORE_WITHSCORES.d.ts b/server/node_modules/@redis/client/dist/lib/commands/ZRANGEBYSCORE_WITHSCORES.d.ts new file mode 100644 index 0000000..522af76 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZRANGEBYSCORE_WITHSCORES.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +import { ZRangeByScoreOptions } from './ZRANGEBYSCORE'; +export { FIRST_KEY_INDEX, IS_READ_ONLY } from './ZRANGEBYSCORE'; +export declare function transformArguments(key: RedisCommandArgument, min: string | number, max: string | number, options?: ZRangeByScoreOptions): RedisCommandArguments; +export { transformSortedSetWithScoresReply as transformReply } from './generic-transformers'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZRANGEBYSCORE_WITHSCORES.js b/server/node_modules/@redis/client/dist/lib/commands/ZRANGEBYSCORE_WITHSCORES.js new file mode 100644 index 0000000..5f57e2e --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZRANGEBYSCORE_WITHSCORES.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const ZRANGEBYSCORE_1 = require("./ZRANGEBYSCORE"); +var ZRANGEBYSCORE_2 = require("./ZRANGEBYSCORE"); +Object.defineProperty(exports, "FIRST_KEY_INDEX", { enumerable: true, get: function () { return ZRANGEBYSCORE_2.FIRST_KEY_INDEX; } }); +Object.defineProperty(exports, "IS_READ_ONLY", { enumerable: true, get: function () { return ZRANGEBYSCORE_2.IS_READ_ONLY; } }); +function transformArguments(key, min, max, options) { + return [ + ...(0, ZRANGEBYSCORE_1.transformArguments)(key, min, max, options), + 'WITHSCORES' + ]; +} +exports.transformArguments = transformArguments; +var generic_transformers_1 = require("./generic-transformers"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return generic_transformers_1.transformSortedSetWithScoresReply; } }); diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZRANGESTORE.d.ts b/server/node_modules/@redis/client/dist/lib/commands/ZRANGESTORE.d.ts new file mode 100644 index 0000000..0facbc7 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZRANGESTORE.d.ts @@ -0,0 +1,14 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +interface ZRangeStoreOptions { + BY?: 'SCORE' | 'LEX'; + REV?: true; + LIMIT?: { + offset: number; + count: number; + }; + WITHSCORES?: true; +} +export declare function transformArguments(dst: RedisCommandArgument, src: RedisCommandArgument, min: RedisCommandArgument | number, max: RedisCommandArgument | number, options?: ZRangeStoreOptions): RedisCommandArguments; +export declare function transformReply(reply: number): number; +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZRANGESTORE.js b/server/node_modules/@redis/client/dist/lib/commands/ZRANGESTORE.js new file mode 100644 index 0000000..69b8046 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZRANGESTORE.js @@ -0,0 +1,40 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +function transformArguments(dst, src, min, max, options) { + const args = [ + 'ZRANGESTORE', + dst, + src, + (0, generic_transformers_1.transformStringNumberInfinityArgument)(min), + (0, generic_transformers_1.transformStringNumberInfinityArgument)(max) + ]; + switch (options?.BY) { + case 'SCORE': + args.push('BYSCORE'); + break; + case 'LEX': + args.push('BYLEX'); + break; + } + if (options?.REV) { + args.push('REV'); + } + if (options?.LIMIT) { + args.push('LIMIT', options.LIMIT.offset.toString(), options.LIMIT.count.toString()); + } + if (options?.WITHSCORES) { + args.push('WITHSCORES'); + } + return args; +} +exports.transformArguments = transformArguments; +function transformReply(reply) { + if (typeof reply !== 'number') { + throw new TypeError(`Upgrade to Redis 6.2.5 and up (https://github.com/redis/redis/pull/9089)`); + } + return reply; +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZRANGE_WITHSCORES.d.ts b/server/node_modules/@redis/client/dist/lib/commands/ZRANGE_WITHSCORES.d.ts new file mode 100644 index 0000000..fc78d2b --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZRANGE_WITHSCORES.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArguments } from '.'; +import { transformArguments as transformZRangeArguments } from './ZRANGE'; +export { FIRST_KEY_INDEX, IS_READ_ONLY } from './ZRANGE'; +export declare function transformArguments(...args: Parameters): RedisCommandArguments; +export { transformSortedSetWithScoresReply as transformReply } from './generic-transformers'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZRANGE_WITHSCORES.js b/server/node_modules/@redis/client/dist/lib/commands/ZRANGE_WITHSCORES.js new file mode 100644 index 0000000..23084c9 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZRANGE_WITHSCORES.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const ZRANGE_1 = require("./ZRANGE"); +var ZRANGE_2 = require("./ZRANGE"); +Object.defineProperty(exports, "FIRST_KEY_INDEX", { enumerable: true, get: function () { return ZRANGE_2.FIRST_KEY_INDEX; } }); +Object.defineProperty(exports, "IS_READ_ONLY", { enumerable: true, get: function () { return ZRANGE_2.IS_READ_ONLY; } }); +function transformArguments(...args) { + return [ + ...(0, ZRANGE_1.transformArguments)(...args), + 'WITHSCORES' + ]; +} +exports.transformArguments = transformArguments; +var generic_transformers_1 = require("./generic-transformers"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return generic_transformers_1.transformSortedSetWithScoresReply; } }); diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZRANK.d.ts b/server/node_modules/@redis/client/dist/lib/commands/ZRANK.d.ts new file mode 100644 index 0000000..7527828 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZRANK.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: RedisCommandArgument, member: RedisCommandArgument): RedisCommandArguments; +export declare function transformReply(): number | null; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZRANK.js b/server/node_modules/@redis/client/dist/lib/commands/ZRANK.js new file mode 100644 index 0000000..b8b7f0a --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZRANK.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, member) { + return ['ZRANK', key, member]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZREM.d.ts b/server/node_modules/@redis/client/dist/lib/commands/ZREM.d.ts new file mode 100644 index 0000000..c18fefb --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZREM.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument, member: RedisCommandArgument | Array): RedisCommandArguments; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZREM.js b/server/node_modules/@redis/client/dist/lib/commands/ZREM.js new file mode 100644 index 0000000..fc00be0 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZREM.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, member) { + return (0, generic_transformers_1.pushVerdictArguments)(['ZREM', key], member); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZREMRANGEBYLEX.d.ts b/server/node_modules/@redis/client/dist/lib/commands/ZREMRANGEBYLEX.d.ts new file mode 100644 index 0000000..11ed7fa --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZREMRANGEBYLEX.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument, min: RedisCommandArgument | number, max: RedisCommandArgument | number): RedisCommandArguments; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZREMRANGEBYLEX.js b/server/node_modules/@redis/client/dist/lib/commands/ZREMRANGEBYLEX.js new file mode 100644 index 0000000..4992781 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZREMRANGEBYLEX.js @@ -0,0 +1,14 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, min, max) { + return [ + 'ZREMRANGEBYLEX', + key, + (0, generic_transformers_1.transformStringNumberInfinityArgument)(min), + (0, generic_transformers_1.transformStringNumberInfinityArgument)(max) + ]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZREMRANGEBYRANK.d.ts b/server/node_modules/@redis/client/dist/lib/commands/ZREMRANGEBYRANK.d.ts new file mode 100644 index 0000000..ec3e9c0 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZREMRANGEBYRANK.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument, start: number, stop: number): RedisCommandArguments; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZREMRANGEBYRANK.js b/server/node_modules/@redis/client/dist/lib/commands/ZREMRANGEBYRANK.js new file mode 100644 index 0000000..a139d01 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZREMRANGEBYRANK.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, start, stop) { + return ['ZREMRANGEBYRANK', key, start.toString(), stop.toString()]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZREMRANGEBYSCORE.d.ts b/server/node_modules/@redis/client/dist/lib/commands/ZREMRANGEBYSCORE.d.ts new file mode 100644 index 0000000..11ed7fa --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZREMRANGEBYSCORE.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: RedisCommandArgument, min: RedisCommandArgument | number, max: RedisCommandArgument | number): RedisCommandArguments; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZREMRANGEBYSCORE.js b/server/node_modules/@redis/client/dist/lib/commands/ZREMRANGEBYSCORE.js new file mode 100644 index 0000000..79e486c --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZREMRANGEBYSCORE.js @@ -0,0 +1,14 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, min, max) { + return [ + 'ZREMRANGEBYSCORE', + key, + (0, generic_transformers_1.transformStringNumberInfinityArgument)(min), + (0, generic_transformers_1.transformStringNumberInfinityArgument)(max) + ]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZREVRANK.d.ts b/server/node_modules/@redis/client/dist/lib/commands/ZREVRANK.d.ts new file mode 100644 index 0000000..7527828 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZREVRANK.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: RedisCommandArgument, member: RedisCommandArgument): RedisCommandArguments; +export declare function transformReply(): number | null; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZREVRANK.js b/server/node_modules/@redis/client/dist/lib/commands/ZREVRANK.js new file mode 100644 index 0000000..e111248 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZREVRANK.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, member) { + return ['ZREVRANK', key, member]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZSCAN.d.ts b/server/node_modules/@redis/client/dist/lib/commands/ZSCAN.d.ts new file mode 100644 index 0000000..b86d12b --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZSCAN.d.ts @@ -0,0 +1,12 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +import { ScanOptions, ZMember } from './generic-transformers'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: RedisCommandArgument, cursor: number, options?: ScanOptions): RedisCommandArguments; +type ZScanRawReply = [RedisCommandArgument, Array]; +interface ZScanReply { + cursor: number; + members: Array; +} +export declare function transformReply([cursor, rawMembers]: ZScanRawReply): ZScanReply; +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZSCAN.js b/server/node_modules/@redis/client/dist/lib/commands/ZSCAN.js new file mode 100644 index 0000000..ce72c15 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZSCAN.js @@ -0,0 +1,27 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, cursor, options) { + return (0, generic_transformers_1.pushScanArguments)([ + 'ZSCAN', + key + ], cursor, options); +} +exports.transformArguments = transformArguments; +function transformReply([cursor, rawMembers]) { + const parsedMembers = []; + for (let i = 0; i < rawMembers.length; i += 2) { + parsedMembers.push({ + value: rawMembers[i], + score: (0, generic_transformers_1.transformNumberInfinityReply)(rawMembers[i + 1]) + }); + } + return { + cursor: Number(cursor), + members: parsedMembers + }; +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZSCORE.d.ts b/server/node_modules/@redis/client/dist/lib/commands/ZSCORE.d.ts new file mode 100644 index 0000000..309294a --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZSCORE.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: RedisCommandArgument, member: RedisCommandArgument): RedisCommandArguments; +export { transformNumberInfinityNullReply as transformReply } from './generic-transformers'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZSCORE.js b/server/node_modules/@redis/client/dist/lib/commands/ZSCORE.js new file mode 100644 index 0000000..f50a641 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZSCORE.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, member) { + return ['ZSCORE', key, member]; +} +exports.transformArguments = transformArguments; +var generic_transformers_1 = require("./generic-transformers"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return generic_transformers_1.transformNumberInfinityNullReply; } }); diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZUNION.d.ts b/server/node_modules/@redis/client/dist/lib/commands/ZUNION.d.ts new file mode 100644 index 0000000..7a06f00 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZUNION.d.ts @@ -0,0 +1,10 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 2; +export declare const IS_READ_ONLY = true; +interface ZUnionOptions { + WEIGHTS?: Array; + AGGREGATE?: 'SUM' | 'MIN' | 'MAX'; +} +export declare function transformArguments(keys: Array | RedisCommandArgument, options?: ZUnionOptions): RedisCommandArguments; +export declare function transformReply(): Array; +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZUNION.js b/server/node_modules/@redis/client/dist/lib/commands/ZUNION.js new file mode 100644 index 0000000..f06d8f9 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZUNION.js @@ -0,0 +1,17 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 2; +exports.IS_READ_ONLY = true; +function transformArguments(keys, options) { + const args = (0, generic_transformers_1.pushVerdictArgument)(['ZUNION'], keys); + if (options?.WEIGHTS) { + args.push('WEIGHTS', ...options.WEIGHTS.map(weight => weight.toString())); + } + if (options?.AGGREGATE) { + args.push('AGGREGATE', options.AGGREGATE); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZUNIONSTORE.d.ts b/server/node_modules/@redis/client/dist/lib/commands/ZUNIONSTORE.d.ts new file mode 100644 index 0000000..7b3a64b --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZUNIONSTORE.d.ts @@ -0,0 +1,9 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare const FIRST_KEY_INDEX = 1; +interface ZUnionOptions { + WEIGHTS?: Array; + AGGREGATE?: 'SUM' | 'MIN' | 'MAX'; +} +export declare function transformArguments(destination: RedisCommandArgument, keys: Array | RedisCommandArgument, options?: ZUnionOptions): RedisCommandArguments; +export declare function transformReply(): number; +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZUNIONSTORE.js b/server/node_modules/@redis/client/dist/lib/commands/ZUNIONSTORE.js new file mode 100644 index 0000000..3e5f0ff --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZUNIONSTORE.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("./generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +function transformArguments(destination, keys, options) { + const args = (0, generic_transformers_1.pushVerdictArgument)(['ZUNIONSTORE', destination], keys); + if (options?.WEIGHTS) { + args.push('WEIGHTS', ...options.WEIGHTS.map(weight => weight.toString())); + } + if (options?.AGGREGATE) { + args.push('AGGREGATE', options.AGGREGATE); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZUNION_WITHSCORES.d.ts b/server/node_modules/@redis/client/dist/lib/commands/ZUNION_WITHSCORES.d.ts new file mode 100644 index 0000000..07fe4e3 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZUNION_WITHSCORES.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArguments } from '.'; +import { transformArguments as transformZUnionArguments } from './ZUNION'; +export { FIRST_KEY_INDEX, IS_READ_ONLY } from './ZUNION'; +export declare function transformArguments(...args: Parameters): RedisCommandArguments; +export { transformSortedSetWithScoresReply as transformReply } from './generic-transformers'; diff --git a/server/node_modules/@redis/client/dist/lib/commands/ZUNION_WITHSCORES.js b/server/node_modules/@redis/client/dist/lib/commands/ZUNION_WITHSCORES.js new file mode 100644 index 0000000..23c2b86 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/ZUNION_WITHSCORES.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const ZUNION_1 = require("./ZUNION"); +var ZUNION_2 = require("./ZUNION"); +Object.defineProperty(exports, "FIRST_KEY_INDEX", { enumerable: true, get: function () { return ZUNION_2.FIRST_KEY_INDEX; } }); +Object.defineProperty(exports, "IS_READ_ONLY", { enumerable: true, get: function () { return ZUNION_2.IS_READ_ONLY; } }); +function transformArguments(...args) { + return [ + ...(0, ZUNION_1.transformArguments)(...args), + 'WITHSCORES' + ]; +} +exports.transformArguments = transformArguments; +var generic_transformers_1 = require("./generic-transformers"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return generic_transformers_1.transformSortedSetWithScoresReply; } }); diff --git a/server/node_modules/@redis/client/dist/lib/commands/generic-transformers.d.ts b/server/node_modules/@redis/client/dist/lib/commands/generic-transformers.d.ts new file mode 100644 index 0000000..1162ac1 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/generic-transformers.d.ts @@ -0,0 +1,221 @@ +import { RedisCommandArgument, RedisCommandArguments } from '.'; +export declare function transformBooleanReply(reply: number): boolean; +export declare function transformBooleanArrayReply(reply: Array): Array; +export type BitValue = 0 | 1; +export interface ScanOptions { + MATCH?: string; + COUNT?: number; +} +export declare function pushScanArguments(args: RedisCommandArguments, cursor: number, options?: ScanOptions): RedisCommandArguments; +export declare function transformNumberInfinityReply(reply: RedisCommandArgument): number; +export declare function transformNumberInfinityNullReply(reply: RedisCommandArgument | null): number | null; +export declare function transformNumberInfinityNullArrayReply(reply: Array): Array; +export declare function transformNumberInfinityArgument(num: number): string; +export declare function transformStringNumberInfinityArgument(num: RedisCommandArgument | number): RedisCommandArgument; +export declare function transformTuplesReply(reply: Array): Record; +export interface StreamMessageReply { + id: RedisCommandArgument; + message: Record; +} +export declare function transformStreamMessageReply([id, message]: Array): StreamMessageReply; +export declare function transformStreamMessageNullReply(reply: Array): StreamMessageReply | null; +export type StreamMessagesReply = Array; +export declare function transformStreamMessagesReply(reply: Array): StreamMessagesReply; +export type StreamMessagesNullReply = Array; +export declare function transformStreamMessagesNullReply(reply: Array): StreamMessagesNullReply; +export type StreamsMessagesReply = Array<{ + name: RedisCommandArgument; + messages: StreamMessagesReply; +}> | null; +export declare function transformStreamsMessagesReply(reply: Array | null): StreamsMessagesReply | null; +export interface ZMember { + score: number; + value: RedisCommandArgument; +} +export declare function transformSortedSetMemberNullReply(reply: [RedisCommandArgument, RedisCommandArgument] | []): ZMember | null; +export declare function transformSortedSetMemberReply(reply: [RedisCommandArgument, RedisCommandArgument]): ZMember; +export declare function transformSortedSetWithScoresReply(reply: Array): Array; +export type SortedSetSide = 'MIN' | 'MAX'; +export interface ZMPopOptions { + COUNT?: number; +} +export declare function transformZMPopArguments(args: RedisCommandArguments, keys: RedisCommandArgument | Array, side: SortedSetSide, options?: ZMPopOptions): RedisCommandArguments; +export type ListSide = 'LEFT' | 'RIGHT'; +export interface LMPopOptions { + COUNT?: number; +} +export declare function transformLMPopArguments(args: RedisCommandArguments, keys: RedisCommandArgument | Array, side: ListSide, options?: LMPopOptions): RedisCommandArguments; +type GeoCountArgument = number | { + value: number; + ANY?: true; +}; +export declare function pushGeoCountArgument(args: RedisCommandArguments, count: GeoCountArgument | undefined): RedisCommandArguments; +export type GeoUnits = 'm' | 'km' | 'mi' | 'ft'; +export interface GeoCoordinates { + longitude: string | number; + latitude: string | number; +} +type GeoSearchFromMember = string; +export type GeoSearchFrom = GeoSearchFromMember | GeoCoordinates; +interface GeoSearchByRadius { + radius: number; + unit: GeoUnits; +} +interface GeoSearchByBox { + width: number; + height: number; + unit: GeoUnits; +} +export type GeoSearchBy = GeoSearchByRadius | GeoSearchByBox; +export interface GeoSearchOptions { + SORT?: 'ASC' | 'DESC'; + COUNT?: GeoCountArgument; +} +export declare function pushGeoSearchArguments(args: RedisCommandArguments, key: RedisCommandArgument, from: GeoSearchFrom, by: GeoSearchBy, options?: GeoSearchOptions): RedisCommandArguments; +export declare function pushGeoRadiusArguments(args: RedisCommandArguments, key: RedisCommandArgument, from: GeoSearchFrom, radius: number, unit: GeoUnits, options?: GeoSearchOptions): RedisCommandArguments; +export interface GeoRadiusStoreOptions extends GeoSearchOptions { + STOREDIST?: boolean; +} +export declare function pushGeoRadiusStoreArguments(args: RedisCommandArguments, key: RedisCommandArgument, from: GeoSearchFrom, radius: number, unit: GeoUnits, destination: RedisCommandArgument, options?: GeoRadiusStoreOptions): RedisCommandArguments; +export declare enum GeoReplyWith { + DISTANCE = "WITHDIST", + HASH = "WITHHASH", + COORDINATES = "WITHCOORD" +} +export interface GeoReplyWithMember { + member: string; + distance?: number; + hash?: string; + coordinates?: { + longitude: string; + latitude: string; + }; +} +export declare function transformGeoMembersWithReply(reply: Array>, replyWith: Array): Array; +export declare function transformEXAT(EXAT: number | Date): string; +export declare function transformPXAT(PXAT: number | Date): string; +export interface EvalOptions { + keys?: Array; + arguments?: Array; +} +export declare function evalFirstKeyIndex(options?: EvalOptions): string | undefined; +export declare function pushEvalArguments(args: Array, options?: EvalOptions): Array; +export declare function pushVerdictArguments(args: RedisCommandArguments, value: RedisCommandArgument | Array): RedisCommandArguments; +export declare function pushVerdictNumberArguments(args: RedisCommandArguments, value: number | Array): RedisCommandArguments; +export declare function pushVerdictArgument(args: RedisCommandArguments, value: RedisCommandArgument | Array): RedisCommandArguments; +export declare function pushOptionalVerdictArgument(args: RedisCommandArguments, name: RedisCommandArgument, value: undefined | RedisCommandArgument | Array): RedisCommandArguments; +export declare enum CommandFlags { + WRITE = "write", + READONLY = "readonly", + DENYOOM = "denyoom", + ADMIN = "admin", + PUBSUB = "pubsub", + NOSCRIPT = "noscript", + RANDOM = "random", + SORT_FOR_SCRIPT = "sort_for_script", + LOADING = "loading", + STALE = "stale", + SKIP_MONITOR = "skip_monitor", + ASKING = "asking", + FAST = "fast", + MOVABLEKEYS = "movablekeys" +} +export declare enum CommandCategories { + KEYSPACE = "@keyspace", + READ = "@read", + WRITE = "@write", + SET = "@set", + SORTEDSET = "@sortedset", + LIST = "@list", + HASH = "@hash", + STRING = "@string", + BITMAP = "@bitmap", + HYPERLOGLOG = "@hyperloglog", + GEO = "@geo", + STREAM = "@stream", + PUBSUB = "@pubsub", + ADMIN = "@admin", + FAST = "@fast", + SLOW = "@slow", + BLOCKING = "@blocking", + DANGEROUS = "@dangerous", + CONNECTION = "@connection", + TRANSACTION = "@transaction", + SCRIPTING = "@scripting" +} +export type CommandRawReply = [ + name: string, + arity: number, + flags: Array, + firstKeyIndex: number, + lastKeyIndex: number, + step: number, + categories: Array +]; +export type CommandReply = { + name: string; + arity: number; + flags: Set; + firstKeyIndex: number; + lastKeyIndex: number; + step: number; + categories: Set; +}; +export declare function transformCommandReply(this: void, [name, arity, flags, firstKeyIndex, lastKeyIndex, step, categories]: CommandRawReply): CommandReply; +export declare enum RedisFunctionFlags { + NO_WRITES = "no-writes", + ALLOW_OOM = "allow-oom", + ALLOW_STALE = "allow-stale", + NO_CLUSTER = "no-cluster" +} +export type FunctionListRawItemReply = [ + 'library_name', + string, + 'engine', + string, + 'functions', + Array<[ + 'name', + string, + 'description', + string | null, + 'flags', + Array + ]> +]; +export interface FunctionListItemReply { + libraryName: string; + engine: string; + functions: Array<{ + name: string; + description: string | null; + flags: Array; + }>; +} +export declare function transformFunctionListItemReply(reply: FunctionListRawItemReply): FunctionListItemReply; +export interface SortOptions { + BY?: string; + LIMIT?: { + offset: number; + count: number; + }; + GET?: string | Array; + DIRECTION?: 'ASC' | 'DESC'; + ALPHA?: true; +} +export declare function pushSortArguments(args: RedisCommandArguments, options?: SortOptions): RedisCommandArguments; +export interface SlotRange { + start: number; + end: number; +} +export declare function pushSlotRangesArguments(args: RedisCommandArguments, ranges: SlotRange | Array): RedisCommandArguments; +export type RawRangeReply = [ + start: number, + end: number +]; +export interface RangeReply { + start: number; + end: number; +} +export declare function transformRangeReply([start, end]: RawRangeReply): RangeReply; +export {}; diff --git a/server/node_modules/@redis/client/dist/lib/commands/generic-transformers.js b/server/node_modules/@redis/client/dist/lib/commands/generic-transformers.js new file mode 100644 index 0000000..e4a90e3 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/generic-transformers.js @@ -0,0 +1,413 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformRangeReply = exports.pushSlotRangesArguments = exports.pushSortArguments = exports.transformFunctionListItemReply = exports.RedisFunctionFlags = exports.transformCommandReply = exports.CommandCategories = exports.CommandFlags = exports.pushOptionalVerdictArgument = exports.pushVerdictArgument = exports.pushVerdictNumberArguments = exports.pushVerdictArguments = exports.pushEvalArguments = exports.evalFirstKeyIndex = exports.transformPXAT = exports.transformEXAT = exports.transformGeoMembersWithReply = exports.GeoReplyWith = exports.pushGeoRadiusStoreArguments = exports.pushGeoRadiusArguments = exports.pushGeoSearchArguments = exports.pushGeoCountArgument = exports.transformLMPopArguments = exports.transformZMPopArguments = exports.transformSortedSetWithScoresReply = exports.transformSortedSetMemberReply = exports.transformSortedSetMemberNullReply = exports.transformStreamsMessagesReply = exports.transformStreamMessagesNullReply = exports.transformStreamMessagesReply = exports.transformStreamMessageNullReply = exports.transformStreamMessageReply = exports.transformTuplesReply = exports.transformStringNumberInfinityArgument = exports.transformNumberInfinityArgument = exports.transformNumberInfinityNullArrayReply = exports.transformNumberInfinityNullReply = exports.transformNumberInfinityReply = exports.pushScanArguments = exports.transformBooleanArrayReply = exports.transformBooleanReply = void 0; +function transformBooleanReply(reply) { + return reply === 1; +} +exports.transformBooleanReply = transformBooleanReply; +function transformBooleanArrayReply(reply) { + return reply.map(transformBooleanReply); +} +exports.transformBooleanArrayReply = transformBooleanArrayReply; +function pushScanArguments(args, cursor, options) { + args.push(cursor.toString()); + if (options?.MATCH) { + args.push('MATCH', options.MATCH); + } + if (options?.COUNT) { + args.push('COUNT', options.COUNT.toString()); + } + return args; +} +exports.pushScanArguments = pushScanArguments; +function transformNumberInfinityReply(reply) { + switch (reply.toString()) { + case '+inf': + return Infinity; + case '-inf': + return -Infinity; + default: + return Number(reply); + } +} +exports.transformNumberInfinityReply = transformNumberInfinityReply; +function transformNumberInfinityNullReply(reply) { + if (reply === null) + return null; + return transformNumberInfinityReply(reply); +} +exports.transformNumberInfinityNullReply = transformNumberInfinityNullReply; +function transformNumberInfinityNullArrayReply(reply) { + return reply.map(transformNumberInfinityNullReply); +} +exports.transformNumberInfinityNullArrayReply = transformNumberInfinityNullArrayReply; +function transformNumberInfinityArgument(num) { + switch (num) { + case Infinity: + return '+inf'; + case -Infinity: + return '-inf'; + default: + return num.toString(); + } +} +exports.transformNumberInfinityArgument = transformNumberInfinityArgument; +function transformStringNumberInfinityArgument(num) { + if (typeof num !== 'number') + return num; + return transformNumberInfinityArgument(num); +} +exports.transformStringNumberInfinityArgument = transformStringNumberInfinityArgument; +function transformTuplesReply(reply) { + const message = Object.create(null); + for (let i = 0; i < reply.length; i += 2) { + message[reply[i].toString()] = reply[i + 1]; + } + return message; +} +exports.transformTuplesReply = transformTuplesReply; +function transformStreamMessageReply([id, message]) { + return { + id, + message: transformTuplesReply(message) + }; +} +exports.transformStreamMessageReply = transformStreamMessageReply; +function transformStreamMessageNullReply(reply) { + if (reply === null) + return null; + return transformStreamMessageReply(reply); +} +exports.transformStreamMessageNullReply = transformStreamMessageNullReply; +function transformStreamMessagesReply(reply) { + return reply.map(transformStreamMessageReply); +} +exports.transformStreamMessagesReply = transformStreamMessagesReply; +function transformStreamMessagesNullReply(reply) { + return reply.map(transformStreamMessageNullReply); +} +exports.transformStreamMessagesNullReply = transformStreamMessagesNullReply; +function transformStreamsMessagesReply(reply) { + if (reply === null) + return null; + return reply.map(([name, rawMessages]) => ({ + name, + messages: transformStreamMessagesReply(rawMessages) + })); +} +exports.transformStreamsMessagesReply = transformStreamsMessagesReply; +function transformSortedSetMemberNullReply(reply) { + if (!reply.length) + return null; + return transformSortedSetMemberReply(reply); +} +exports.transformSortedSetMemberNullReply = transformSortedSetMemberNullReply; +function transformSortedSetMemberReply(reply) { + return { + value: reply[0], + score: transformNumberInfinityReply(reply[1]) + }; +} +exports.transformSortedSetMemberReply = transformSortedSetMemberReply; +function transformSortedSetWithScoresReply(reply) { + const members = []; + for (let i = 0; i < reply.length; i += 2) { + members.push({ + value: reply[i], + score: transformNumberInfinityReply(reply[i + 1]) + }); + } + return members; +} +exports.transformSortedSetWithScoresReply = transformSortedSetWithScoresReply; +function transformZMPopArguments(args, keys, side, options) { + pushVerdictArgument(args, keys); + args.push(side); + if (options?.COUNT) { + args.push('COUNT', options.COUNT.toString()); + } + return args; +} +exports.transformZMPopArguments = transformZMPopArguments; +function transformLMPopArguments(args, keys, side, options) { + pushVerdictArgument(args, keys); + args.push(side); + if (options?.COUNT) { + args.push('COUNT', options.COUNT.toString()); + } + return args; +} +exports.transformLMPopArguments = transformLMPopArguments; +function pushGeoCountArgument(args, count) { + if (typeof count === 'number') { + args.push('COUNT', count.toString()); + } + else if (count) { + args.push('COUNT', count.value.toString()); + if (count.ANY) { + args.push('ANY'); + } + } + return args; +} +exports.pushGeoCountArgument = pushGeoCountArgument; +function pushGeoSearchArguments(args, key, from, by, options) { + args.push(key); + if (typeof from === 'string') { + args.push('FROMMEMBER', from); + } + else { + args.push('FROMLONLAT', from.longitude.toString(), from.latitude.toString()); + } + if ('radius' in by) { + args.push('BYRADIUS', by.radius.toString()); + } + else { + args.push('BYBOX', by.width.toString(), by.height.toString()); + } + args.push(by.unit); + if (options?.SORT) { + args.push(options.SORT); + } + pushGeoCountArgument(args, options?.COUNT); + return args; +} +exports.pushGeoSearchArguments = pushGeoSearchArguments; +function pushGeoRadiusArguments(args, key, from, radius, unit, options) { + args.push(key); + if (typeof from === 'string') { + args.push(from); + } + else { + args.push(from.longitude.toString(), from.latitude.toString()); + } + args.push(radius.toString(), unit); + if (options?.SORT) { + args.push(options.SORT); + } + pushGeoCountArgument(args, options?.COUNT); + return args; +} +exports.pushGeoRadiusArguments = pushGeoRadiusArguments; +function pushGeoRadiusStoreArguments(args, key, from, radius, unit, destination, options) { + pushGeoRadiusArguments(args, key, from, radius, unit, options); + if (options?.STOREDIST) { + args.push('STOREDIST', destination); + } + else { + args.push('STORE', destination); + } + return args; +} +exports.pushGeoRadiusStoreArguments = pushGeoRadiusStoreArguments; +var GeoReplyWith; +(function (GeoReplyWith) { + GeoReplyWith["DISTANCE"] = "WITHDIST"; + GeoReplyWith["HASH"] = "WITHHASH"; + GeoReplyWith["COORDINATES"] = "WITHCOORD"; +})(GeoReplyWith || (exports.GeoReplyWith = GeoReplyWith = {})); +function transformGeoMembersWithReply(reply, replyWith) { + const replyWithSet = new Set(replyWith); + let index = 0; + const distanceIndex = replyWithSet.has(GeoReplyWith.DISTANCE) && ++index, hashIndex = replyWithSet.has(GeoReplyWith.HASH) && ++index, coordinatesIndex = replyWithSet.has(GeoReplyWith.COORDINATES) && ++index; + return reply.map(member => { + const transformedMember = { + member: member[0] + }; + if (distanceIndex) { + transformedMember.distance = member[distanceIndex]; + } + if (hashIndex) { + transformedMember.hash = member[hashIndex]; + } + if (coordinatesIndex) { + const [longitude, latitude] = member[coordinatesIndex]; + transformedMember.coordinates = { + longitude, + latitude + }; + } + return transformedMember; + }); +} +exports.transformGeoMembersWithReply = transformGeoMembersWithReply; +function transformEXAT(EXAT) { + return (typeof EXAT === 'number' ? EXAT : Math.floor(EXAT.getTime() / 1000)).toString(); +} +exports.transformEXAT = transformEXAT; +function transformPXAT(PXAT) { + return (typeof PXAT === 'number' ? PXAT : PXAT.getTime()).toString(); +} +exports.transformPXAT = transformPXAT; +function evalFirstKeyIndex(options) { + return options?.keys?.[0]; +} +exports.evalFirstKeyIndex = evalFirstKeyIndex; +function pushEvalArguments(args, options) { + if (options?.keys) { + args.push(options.keys.length.toString(), ...options.keys); + } + else { + args.push('0'); + } + if (options?.arguments) { + args.push(...options.arguments); + } + return args; +} +exports.pushEvalArguments = pushEvalArguments; +function pushVerdictArguments(args, value) { + if (Array.isArray(value)) { + // https://github.com/redis/node-redis/pull/2160 + args = args.concat(value); + } + else { + args.push(value); + } + return args; +} +exports.pushVerdictArguments = pushVerdictArguments; +function pushVerdictNumberArguments(args, value) { + if (Array.isArray(value)) { + for (const item of value) { + args.push(item.toString()); + } + } + else { + args.push(value.toString()); + } + return args; +} +exports.pushVerdictNumberArguments = pushVerdictNumberArguments; +function pushVerdictArgument(args, value) { + if (Array.isArray(value)) { + args.push(value.length.toString(), ...value); + } + else { + args.push('1', value); + } + return args; +} +exports.pushVerdictArgument = pushVerdictArgument; +function pushOptionalVerdictArgument(args, name, value) { + if (value === undefined) + return args; + args.push(name); + return pushVerdictArgument(args, value); +} +exports.pushOptionalVerdictArgument = pushOptionalVerdictArgument; +var CommandFlags; +(function (CommandFlags) { + CommandFlags["WRITE"] = "write"; + CommandFlags["READONLY"] = "readonly"; + CommandFlags["DENYOOM"] = "denyoom"; + CommandFlags["ADMIN"] = "admin"; + CommandFlags["PUBSUB"] = "pubsub"; + CommandFlags["NOSCRIPT"] = "noscript"; + CommandFlags["RANDOM"] = "random"; + CommandFlags["SORT_FOR_SCRIPT"] = "sort_for_script"; + CommandFlags["LOADING"] = "loading"; + CommandFlags["STALE"] = "stale"; + CommandFlags["SKIP_MONITOR"] = "skip_monitor"; + CommandFlags["ASKING"] = "asking"; + CommandFlags["FAST"] = "fast"; + CommandFlags["MOVABLEKEYS"] = "movablekeys"; // keys have no pre-determined position. You must discover keys yourself. +})(CommandFlags || (exports.CommandFlags = CommandFlags = {})); +var CommandCategories; +(function (CommandCategories) { + CommandCategories["KEYSPACE"] = "@keyspace"; + CommandCategories["READ"] = "@read"; + CommandCategories["WRITE"] = "@write"; + CommandCategories["SET"] = "@set"; + CommandCategories["SORTEDSET"] = "@sortedset"; + CommandCategories["LIST"] = "@list"; + CommandCategories["HASH"] = "@hash"; + CommandCategories["STRING"] = "@string"; + CommandCategories["BITMAP"] = "@bitmap"; + CommandCategories["HYPERLOGLOG"] = "@hyperloglog"; + CommandCategories["GEO"] = "@geo"; + CommandCategories["STREAM"] = "@stream"; + CommandCategories["PUBSUB"] = "@pubsub"; + CommandCategories["ADMIN"] = "@admin"; + CommandCategories["FAST"] = "@fast"; + CommandCategories["SLOW"] = "@slow"; + CommandCategories["BLOCKING"] = "@blocking"; + CommandCategories["DANGEROUS"] = "@dangerous"; + CommandCategories["CONNECTION"] = "@connection"; + CommandCategories["TRANSACTION"] = "@transaction"; + CommandCategories["SCRIPTING"] = "@scripting"; +})(CommandCategories || (exports.CommandCategories = CommandCategories = {})); +function transformCommandReply([name, arity, flags, firstKeyIndex, lastKeyIndex, step, categories]) { + return { + name, + arity, + flags: new Set(flags), + firstKeyIndex, + lastKeyIndex, + step, + categories: new Set(categories) + }; +} +exports.transformCommandReply = transformCommandReply; +var RedisFunctionFlags; +(function (RedisFunctionFlags) { + RedisFunctionFlags["NO_WRITES"] = "no-writes"; + RedisFunctionFlags["ALLOW_OOM"] = "allow-oom"; + RedisFunctionFlags["ALLOW_STALE"] = "allow-stale"; + RedisFunctionFlags["NO_CLUSTER"] = "no-cluster"; +})(RedisFunctionFlags || (exports.RedisFunctionFlags = RedisFunctionFlags = {})); +function transformFunctionListItemReply(reply) { + return { + libraryName: reply[1], + engine: reply[3], + functions: reply[5].map(fn => ({ + name: fn[1], + description: fn[3], + flags: fn[5] + })) + }; +} +exports.transformFunctionListItemReply = transformFunctionListItemReply; +function pushSortArguments(args, options) { + if (options?.BY) { + args.push('BY', options.BY); + } + if (options?.LIMIT) { + args.push('LIMIT', options.LIMIT.offset.toString(), options.LIMIT.count.toString()); + } + if (options?.GET) { + for (const pattern of (typeof options.GET === 'string' ? [options.GET] : options.GET)) { + args.push('GET', pattern); + } + } + if (options?.DIRECTION) { + args.push(options.DIRECTION); + } + if (options?.ALPHA) { + args.push('ALPHA'); + } + return args; +} +exports.pushSortArguments = pushSortArguments; +function pushSlotRangeArguments(args, range) { + args.push(range.start.toString(), range.end.toString()); +} +function pushSlotRangesArguments(args, ranges) { + if (Array.isArray(ranges)) { + for (const range of ranges) { + pushSlotRangeArguments(args, range); + } + } + else { + pushSlotRangeArguments(args, ranges); + } + return args; +} +exports.pushSlotRangesArguments = pushSlotRangesArguments; +function transformRangeReply([start, end]) { + return { + start, + end + }; +} +exports.transformRangeReply = transformRangeReply; diff --git a/server/node_modules/@redis/client/dist/lib/commands/index.d.ts b/server/node_modules/@redis/client/dist/lib/commands/index.d.ts new file mode 100644 index 0000000..d956111 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/index.d.ts @@ -0,0 +1,49 @@ +/// +import { ClientCommandOptions } from '../client'; +import { CommandOptions } from '../command-options'; +import { RedisScriptConfig, SHA1 } from '../lua-script'; +export type RedisCommandRawReply = string | number | Buffer | null | undefined | Array; +export type RedisCommandArgument = string | Buffer; +export type RedisCommandArguments = Array & { + preserve?: unknown; +}; +export interface RedisCommand { + FIRST_KEY_INDEX?: number | ((...args: Array) => RedisCommandArgument | undefined); + IS_READ_ONLY?: boolean; + TRANSFORM_LEGACY_REPLY?: boolean; + transformArguments(this: void, ...args: Array): RedisCommandArguments; + transformReply?(this: void, reply: any, preserved?: any): any; +} +export type RedisCommandReply = C['transformReply'] extends (...args: any) => infer T ? T : RedisCommandRawReply; +export type ConvertArgumentType = Type extends RedisCommandArgument ? (Type extends (string & ToType) ? Type : ToType) : (Type extends Set ? Set> : (Type extends Map ? Map> : (Type extends Array ? Array> : (Type extends Date ? Type : (Type extends Record ? { + [Property in keyof Type]: ConvertArgumentType; +} : Type))))); +export type RedisCommandSignature = Parameters> = >(...args: Params | [options: Options, ...rest: Params]) => Promise, Options['returnBuffers'] extends true ? Buffer : string>>; +export interface RedisCommands { + [command: string]: RedisCommand; +} +export interface RedisModule { + [command: string]: RedisCommand; +} +export interface RedisModules { + [module: string]: RedisModule; +} +export interface RedisFunction extends RedisCommand { + NUMBER_OF_KEYS?: number; +} +export interface RedisFunctionLibrary { + [fn: string]: RedisFunction; +} +export interface RedisFunctions { + [library: string]: RedisFunctionLibrary; +} +export type RedisScript = RedisScriptConfig & SHA1; +export interface RedisScripts { + [script: string]: RedisScript; +} +export interface RedisExtensions { + modules?: M; + functions?: F; + scripts?: S; +} +export type ExcludeMappedString = string extends S ? never : S; diff --git a/server/node_modules/@redis/client/dist/lib/commands/index.js b/server/node_modules/@redis/client/dist/lib/commands/index.js new file mode 100644 index 0000000..c8ad2e5 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/commands/index.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/server/node_modules/@redis/client/dist/lib/errors.d.ts b/server/node_modules/@redis/client/dist/lib/errors.d.ts new file mode 100644 index 0000000..f0ccef9 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/errors.d.ts @@ -0,0 +1,39 @@ +import { RedisCommandRawReply } from './commands'; +export declare class AbortError extends Error { + constructor(); +} +export declare class WatchError extends Error { + constructor(); +} +export declare class ConnectionTimeoutError extends Error { + constructor(); +} +export declare class ClientClosedError extends Error { + constructor(); +} +export declare class ClientOfflineError extends Error { + constructor(); +} +export declare class DisconnectsClientError extends Error { + constructor(); +} +export declare class SocketClosedUnexpectedlyError extends Error { + constructor(); +} +export declare class RootNodesUnavailableError extends Error { + constructor(); +} +export declare class ReconnectStrategyError extends Error { + originalError: Error; + socketError: unknown; + constructor(originalError: Error, socketError: unknown); +} +export declare class ErrorReply extends Error { + constructor(message: string); +} +export declare class MultiErrorReply extends ErrorReply { + replies: (RedisCommandRawReply | ErrorReply)[]; + errorIndexes: number[]; + constructor(replies: Array, errorIndexes: Array); + errors(): Generator; +} diff --git a/server/node_modules/@redis/client/dist/lib/errors.js b/server/node_modules/@redis/client/dist/lib/errors.js new file mode 100644 index 0000000..7919d27 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/errors.js @@ -0,0 +1,103 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.MultiErrorReply = exports.ErrorReply = exports.ReconnectStrategyError = exports.RootNodesUnavailableError = exports.SocketClosedUnexpectedlyError = exports.DisconnectsClientError = exports.ClientOfflineError = exports.ClientClosedError = exports.ConnectionTimeoutError = exports.WatchError = exports.AbortError = void 0; +class AbortError extends Error { + constructor() { + super('The command was aborted'); + } +} +exports.AbortError = AbortError; +class WatchError extends Error { + constructor() { + super('One (or more) of the watched keys has been changed'); + } +} +exports.WatchError = WatchError; +class ConnectionTimeoutError extends Error { + constructor() { + super('Connection timeout'); + } +} +exports.ConnectionTimeoutError = ConnectionTimeoutError; +class ClientClosedError extends Error { + constructor() { + super('The client is closed'); + } +} +exports.ClientClosedError = ClientClosedError; +class ClientOfflineError extends Error { + constructor() { + super('The client is offline'); + } +} +exports.ClientOfflineError = ClientOfflineError; +class DisconnectsClientError extends Error { + constructor() { + super('Disconnects client'); + } +} +exports.DisconnectsClientError = DisconnectsClientError; +class SocketClosedUnexpectedlyError extends Error { + constructor() { + super('Socket closed unexpectedly'); + } +} +exports.SocketClosedUnexpectedlyError = SocketClosedUnexpectedlyError; +class RootNodesUnavailableError extends Error { + constructor() { + super('All the root nodes are unavailable'); + } +} +exports.RootNodesUnavailableError = RootNodesUnavailableError; +class ReconnectStrategyError extends Error { + constructor(originalError, socketError) { + super(originalError.message); + Object.defineProperty(this, "originalError", { + enumerable: true, + configurable: true, + writable: true, + value: void 0 + }); + Object.defineProperty(this, "socketError", { + enumerable: true, + configurable: true, + writable: true, + value: void 0 + }); + this.originalError = originalError; + this.socketError = socketError; + } +} +exports.ReconnectStrategyError = ReconnectStrategyError; +class ErrorReply extends Error { + constructor(message) { + super(message); + this.stack = undefined; + } +} +exports.ErrorReply = ErrorReply; +class MultiErrorReply extends ErrorReply { + constructor(replies, errorIndexes) { + super(`${errorIndexes.length} commands failed, see .replies and .errorIndexes for more information`); + Object.defineProperty(this, "replies", { + enumerable: true, + configurable: true, + writable: true, + value: void 0 + }); + Object.defineProperty(this, "errorIndexes", { + enumerable: true, + configurable: true, + writable: true, + value: void 0 + }); + this.replies = replies; + this.errorIndexes = errorIndexes; + } + *errors() { + for (const index of this.errorIndexes) { + yield this.replies[index]; + } + } +} +exports.MultiErrorReply = MultiErrorReply; diff --git a/server/node_modules/@redis/client/dist/lib/lua-script.d.ts b/server/node_modules/@redis/client/dist/lib/lua-script.d.ts new file mode 100644 index 0000000..29a7116 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/lua-script.d.ts @@ -0,0 +1,10 @@ +import { RedisCommand } from './commands'; +export interface RedisScriptConfig extends RedisCommand { + SCRIPT: string; + NUMBER_OF_KEYS?: number; +} +export interface SHA1 { + SHA1: string; +} +export declare function defineScript(script: S): S & SHA1; +export declare function scriptSha1(script: string): string; diff --git a/server/node_modules/@redis/client/dist/lib/lua-script.js b/server/node_modules/@redis/client/dist/lib/lua-script.js new file mode 100644 index 0000000..3a5d94f --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/lua-script.js @@ -0,0 +1,15 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.scriptSha1 = exports.defineScript = void 0; +const crypto_1 = require("crypto"); +function defineScript(script) { + return { + ...script, + SHA1: scriptSha1(script.SCRIPT) + }; +} +exports.defineScript = defineScript; +function scriptSha1(script) { + return (0, crypto_1.createHash)('sha1').update(script).digest('hex'); +} +exports.scriptSha1 = scriptSha1; diff --git a/server/node_modules/@redis/client/dist/lib/multi-command.d.ts b/server/node_modules/@redis/client/dist/lib/multi-command.d.ts new file mode 100644 index 0000000..9e47534 --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/multi-command.d.ts @@ -0,0 +1,16 @@ +import { RedisCommand, RedisCommandArguments, RedisCommandRawReply, RedisFunction, RedisScript } from './commands'; +import { ErrorReply } from './errors'; +export interface RedisMultiQueuedCommand { + args: RedisCommandArguments; + transformReply?: RedisCommand['transformReply']; +} +export default class RedisMultiCommand { + static generateChainId(): symbol; + readonly queue: Array; + readonly scriptsInUse: Set; + addCommand(args: RedisCommandArguments, transformReply?: RedisCommand['transformReply']): void; + addFunction(name: string, fn: RedisFunction, args: Array): RedisCommandArguments; + addScript(script: RedisScript, args: Array): RedisCommandArguments; + handleExecReplies(rawReplies: Array): Array; + transformReplies(rawReplies: Array): Array; +} diff --git a/server/node_modules/@redis/client/dist/lib/multi-command.js b/server/node_modules/@redis/client/dist/lib/multi-command.js new file mode 100644 index 0000000..91da60c --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/multi-command.js @@ -0,0 +1,78 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const commander_1 = require("./commander"); +const errors_1 = require("./errors"); +class RedisMultiCommand { + constructor() { + Object.defineProperty(this, "queue", { + enumerable: true, + configurable: true, + writable: true, + value: [] + }); + Object.defineProperty(this, "scriptsInUse", { + enumerable: true, + configurable: true, + writable: true, + value: new Set() + }); + } + static generateChainId() { + return Symbol('RedisMultiCommand Chain Id'); + } + addCommand(args, transformReply) { + this.queue.push({ + args, + transformReply + }); + } + addFunction(name, fn, args) { + const transformedArguments = (0, commander_1.fCallArguments)(name, fn, fn.transformArguments(...args)); + this.queue.push({ + args: transformedArguments, + transformReply: fn.transformReply + }); + return transformedArguments; + } + addScript(script, args) { + const transformedArguments = []; + if (this.scriptsInUse.has(script.SHA1)) { + transformedArguments.push('EVALSHA', script.SHA1); + } + else { + this.scriptsInUse.add(script.SHA1); + transformedArguments.push('EVAL', script.SCRIPT); + } + if (script.NUMBER_OF_KEYS !== undefined) { + transformedArguments.push(script.NUMBER_OF_KEYS.toString()); + } + const scriptArguments = script.transformArguments(...args); + transformedArguments.push(...scriptArguments); + if (scriptArguments.preserve) { + transformedArguments.preserve = scriptArguments.preserve; + } + this.addCommand(transformedArguments, script.transformReply); + return transformedArguments; + } + handleExecReplies(rawReplies) { + const execReply = rawReplies[rawReplies.length - 1]; + if (execReply === null) { + throw new errors_1.WatchError(); + } + return this.transformReplies(execReply); + } + transformReplies(rawReplies) { + const errorIndexes = [], replies = rawReplies.map((reply, i) => { + if (reply instanceof errors_1.ErrorReply) { + errorIndexes.push(i); + return reply; + } + const { transformReply, args } = this.queue[i]; + return transformReply ? transformReply(reply, args.preserve) : reply; + }); + if (errorIndexes.length) + throw new errors_1.MultiErrorReply(replies, errorIndexes); + return replies; + } +} +exports.default = RedisMultiCommand; diff --git a/server/node_modules/@redis/client/dist/lib/utils.d.ts b/server/node_modules/@redis/client/dist/lib/utils.d.ts new file mode 100644 index 0000000..c930f9d --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/utils.d.ts @@ -0,0 +1 @@ +export declare function promiseTimeout(ms: number): Promise; diff --git a/server/node_modules/@redis/client/dist/lib/utils.js b/server/node_modules/@redis/client/dist/lib/utils.js new file mode 100644 index 0000000..013763c --- /dev/null +++ b/server/node_modules/@redis/client/dist/lib/utils.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.promiseTimeout = void 0; +function promiseTimeout(ms) { + return new Promise(resolve => setTimeout(resolve, ms)); +} +exports.promiseTimeout = promiseTimeout; diff --git a/server/node_modules/@redis/client/dist/package.json b/server/node_modules/@redis/client/dist/package.json new file mode 100644 index 0000000..183b935 --- /dev/null +++ b/server/node_modules/@redis/client/dist/package.json @@ -0,0 +1,52 @@ +{ + "name": "@redis/client", + "version": "1.5.17", + "license": "MIT", + "main": "./dist/index.js", + "types": "./dist/index.d.ts", + "files": [ + "dist/" + ], + "scripts": { + "test": "nyc -r text-summary -r lcov mocha -r source-map-support/register -r ts-node/register './lib/**/*.spec.ts'", + "build": "tsc", + "lint": "eslint ./*.ts ./lib/**/*.ts", + "documentation": "typedoc" + }, + "dependencies": { + "cluster-key-slot": "1.1.2", + "generic-pool": "3.9.0", + "yallist": "4.0.0" + }, + "devDependencies": { + "@istanbuljs/nyc-config-typescript": "^1.0.2", + "@redis/test-utils": "*", + "@types/node": "^20.6.2", + "@types/sinon": "^10.0.16", + "@types/yallist": "^4.0.1", + "@typescript-eslint/eslint-plugin": "^6.7.2", + "@typescript-eslint/parser": "^6.7.2", + "eslint": "^8.49.0", + "nyc": "^15.1.0", + "release-it": "^16.1.5", + "sinon": "^16.0.0", + "source-map-support": "^0.5.21", + "ts-node": "^10.9.1", + "typedoc": "^0.25.1", + "typescript": "^5.2.2" + }, + "engines": { + "node": ">=14" + }, + "repository": { + "type": "git", + "url": "git://github.com/redis/node-redis.git" + }, + "bugs": { + "url": "https://github.com/redis/node-redis/issues" + }, + "homepage": "https://github.com/redis/node-redis/tree/master/packages/client", + "keywords": [ + "redis" + ] +} diff --git a/server/node_modules/@redis/client/package.json b/server/node_modules/@redis/client/package.json new file mode 100644 index 0000000..e344edd --- /dev/null +++ b/server/node_modules/@redis/client/package.json @@ -0,0 +1,52 @@ +{ + "name": "@redis/client", + "version": "1.6.0", + "license": "MIT", + "main": "./dist/index.js", + "types": "./dist/index.d.ts", + "files": [ + "dist/" + ], + "scripts": { + "test": "nyc -r text-summary -r lcov mocha -r source-map-support/register -r ts-node/register './lib/**/*.spec.ts'", + "build": "tsc", + "lint": "eslint ./*.ts ./lib/**/*.ts", + "documentation": "typedoc" + }, + "dependencies": { + "cluster-key-slot": "1.1.2", + "generic-pool": "3.9.0", + "yallist": "4.0.0" + }, + "devDependencies": { + "@istanbuljs/nyc-config-typescript": "^1.0.2", + "@redis/test-utils": "*", + "@types/node": "^20.6.2", + "@types/sinon": "^10.0.16", + "@types/yallist": "^4.0.1", + "@typescript-eslint/eslint-plugin": "^6.7.2", + "@typescript-eslint/parser": "^6.7.2", + "eslint": "^8.49.0", + "nyc": "^15.1.0", + "release-it": "^16.1.5", + "sinon": "^16.0.0", + "source-map-support": "^0.5.21", + "ts-node": "^10.9.1", + "typedoc": "^0.25.1", + "typescript": "^5.2.2" + }, + "engines": { + "node": ">=14" + }, + "repository": { + "type": "git", + "url": "git://github.com/redis/node-redis.git" + }, + "bugs": { + "url": "https://github.com/redis/node-redis/issues" + }, + "homepage": "https://github.com/redis/node-redis/tree/master/packages/client", + "keywords": [ + "redis" + ] +} diff --git a/server/node_modules/@redis/graph/README.md b/server/node_modules/@redis/graph/README.md new file mode 100644 index 0000000..4c712bf --- /dev/null +++ b/server/node_modules/@redis/graph/README.md @@ -0,0 +1,34 @@ +# @redis/graph + +Example usage: +```javascript +import { createClient, Graph } from 'redis'; + +const client = createClient(); +client.on('error', (err) => console.log('Redis Client Error', err)); + +await client.connect(); + +const graph = new Graph(client, 'graph'); + +await graph.query( + 'CREATE (:Rider { name: $riderName })-[:rides]->(:Team { name: $teamName })', + { + params: { + riderName: 'Buzz Aldrin', + teamName: 'Apollo' + } + } +); + +const result = await graph.roQuery( + 'MATCH (r:Rider)-[:rides]->(t:Team { name: $name }) RETURN r.name AS name', + { + params: { + name: 'Apollo' + } + } +); + +console.log(result.data); // [{ name: 'Buzz Aldrin' }] +``` diff --git a/server/node_modules/@redis/graph/dist/commands/CONFIG_GET.d.ts b/server/node_modules/@redis/graph/dist/commands/CONFIG_GET.d.ts new file mode 100644 index 0000000..3a89f87 --- /dev/null +++ b/server/node_modules/@redis/graph/dist/commands/CONFIG_GET.d.ts @@ -0,0 +1,8 @@ +export declare const IS_READ_ONLY = true; +export declare function transformArguments(configKey: string): Array; +type ConfigItem = [ + configKey: string, + value: number +]; +export declare function transformReply(): ConfigItem | Array; +export {}; diff --git a/server/node_modules/@redis/graph/dist/commands/CONFIG_GET.js b/server/node_modules/@redis/graph/dist/commands/CONFIG_GET.js new file mode 100644 index 0000000..169c40f --- /dev/null +++ b/server/node_modules/@redis/graph/dist/commands/CONFIG_GET.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = void 0; +exports.IS_READ_ONLY = true; +function transformArguments(configKey) { + return ['GRAPH.CONFIG', 'GET', configKey]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/graph/dist/commands/CONFIG_SET.d.ts b/server/node_modules/@redis/graph/dist/commands/CONFIG_SET.d.ts new file mode 100644 index 0000000..6209229 --- /dev/null +++ b/server/node_modules/@redis/graph/dist/commands/CONFIG_SET.d.ts @@ -0,0 +1,2 @@ +export declare function transformArguments(configKey: string, value: number): Array; +export declare function transformReply(): 'OK'; diff --git a/server/node_modules/@redis/graph/dist/commands/CONFIG_SET.js b/server/node_modules/@redis/graph/dist/commands/CONFIG_SET.js new file mode 100644 index 0000000..7336c4b --- /dev/null +++ b/server/node_modules/@redis/graph/dist/commands/CONFIG_SET.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments(configKey, value) { + return [ + 'GRAPH.CONFIG', + 'SET', + configKey, + value.toString() + ]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/graph/dist/commands/DELETE.d.ts b/server/node_modules/@redis/graph/dist/commands/DELETE.d.ts new file mode 100644 index 0000000..8b5c99b --- /dev/null +++ b/server/node_modules/@redis/graph/dist/commands/DELETE.d.ts @@ -0,0 +1,3 @@ +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: string): Array; +export declare function transformReply(): string; diff --git a/server/node_modules/@redis/graph/dist/commands/DELETE.js b/server/node_modules/@redis/graph/dist/commands/DELETE.js new file mode 100644 index 0000000..6123ffc --- /dev/null +++ b/server/node_modules/@redis/graph/dist/commands/DELETE.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key) { + return ['GRAPH.DELETE', key]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/graph/dist/commands/EXPLAIN.d.ts b/server/node_modules/@redis/graph/dist/commands/EXPLAIN.d.ts new file mode 100644 index 0000000..883405b --- /dev/null +++ b/server/node_modules/@redis/graph/dist/commands/EXPLAIN.d.ts @@ -0,0 +1,4 @@ +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: string, query: string): Array; +export declare function transformReply(): Array; diff --git a/server/node_modules/@redis/graph/dist/commands/EXPLAIN.js b/server/node_modules/@redis/graph/dist/commands/EXPLAIN.js new file mode 100644 index 0000000..d63c05c --- /dev/null +++ b/server/node_modules/@redis/graph/dist/commands/EXPLAIN.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, query) { + return ['GRAPH.EXPLAIN', key, query]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/graph/dist/commands/LIST.d.ts b/server/node_modules/@redis/graph/dist/commands/LIST.d.ts new file mode 100644 index 0000000..53667fd --- /dev/null +++ b/server/node_modules/@redis/graph/dist/commands/LIST.d.ts @@ -0,0 +1,3 @@ +export declare const IS_READ_ONLY = true; +export declare function transformArguments(): Array; +export declare function transformReply(): Array; diff --git a/server/node_modules/@redis/graph/dist/commands/LIST.js b/server/node_modules/@redis/graph/dist/commands/LIST.js new file mode 100644 index 0000000..b9c6f06 --- /dev/null +++ b/server/node_modules/@redis/graph/dist/commands/LIST.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = void 0; +exports.IS_READ_ONLY = true; +function transformArguments() { + return ['GRAPH.LIST']; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/graph/dist/commands/PROFILE.d.ts b/server/node_modules/@redis/graph/dist/commands/PROFILE.d.ts new file mode 100644 index 0000000..883405b --- /dev/null +++ b/server/node_modules/@redis/graph/dist/commands/PROFILE.d.ts @@ -0,0 +1,4 @@ +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: string, query: string): Array; +export declare function transformReply(): Array; diff --git a/server/node_modules/@redis/graph/dist/commands/PROFILE.js b/server/node_modules/@redis/graph/dist/commands/PROFILE.js new file mode 100644 index 0000000..f5749e6 --- /dev/null +++ b/server/node_modules/@redis/graph/dist/commands/PROFILE.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, query) { + return ['GRAPH.PROFILE', key, query]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/graph/dist/commands/QUERY.d.ts b/server/node_modules/@redis/graph/dist/commands/QUERY.d.ts new file mode 100644 index 0000000..a14264b --- /dev/null +++ b/server/node_modules/@redis/graph/dist/commands/QUERY.d.ts @@ -0,0 +1,25 @@ +import { RedisCommandArgument, RedisCommandArguments } from '@redis/client/dist/lib/commands/index'; +import { QueryOptionsBackwardCompatible } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(graph: RedisCommandArgument, query: RedisCommandArgument, options?: QueryOptionsBackwardCompatible, compact?: boolean): RedisCommandArguments; +type Headers = Array; +type Data = Array; +type Metadata = Array; +type QueryRawReply = [ + headers: Headers, + data: Data, + metadata: Metadata +] | [ + metadata: Metadata +]; +export type QueryReply = { + headers: undefined; + data: undefined; + metadata: Metadata; +} | { + headers: Headers; + data: Data; + metadata: Metadata; +}; +export declare function transformReply(reply: QueryRawReply): QueryReply; +export {}; diff --git a/server/node_modules/@redis/graph/dist/commands/QUERY.js b/server/node_modules/@redis/graph/dist/commands/QUERY.js new file mode 100644 index 0000000..cb81373 --- /dev/null +++ b/server/node_modules/@redis/graph/dist/commands/QUERY.js @@ -0,0 +1,21 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const _1 = require("."); +exports.FIRST_KEY_INDEX = 1; +function transformArguments(graph, query, options, compact) { + return (0, _1.pushQueryArguments)(['GRAPH.QUERY'], graph, query, options, compact); +} +exports.transformArguments = transformArguments; +function transformReply(reply) { + return reply.length === 1 ? { + headers: undefined, + data: undefined, + metadata: reply[0] + } : { + headers: reply[0], + data: reply[1], + metadata: reply[2] + }; +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/graph/dist/commands/RO_QUERY.d.ts b/server/node_modules/@redis/graph/dist/commands/RO_QUERY.d.ts new file mode 100644 index 0000000..7ffad65 --- /dev/null +++ b/server/node_modules/@redis/graph/dist/commands/RO_QUERY.d.ts @@ -0,0 +1,6 @@ +import { RedisCommandArgument, RedisCommandArguments } from '@redis/client/dist/lib/commands'; +import { QueryOptionsBackwardCompatible } from '.'; +export { FIRST_KEY_INDEX } from './QUERY'; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(graph: RedisCommandArgument, query: RedisCommandArgument, options?: QueryOptionsBackwardCompatible, compact?: boolean): RedisCommandArguments; +export { transformReply } from './QUERY'; diff --git a/server/node_modules/@redis/graph/dist/commands/RO_QUERY.js b/server/node_modules/@redis/graph/dist/commands/RO_QUERY.js new file mode 100644 index 0000000..eb9ed57 --- /dev/null +++ b/server/node_modules/@redis/graph/dist/commands/RO_QUERY.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const _1 = require("."); +var QUERY_1 = require("./QUERY"); +Object.defineProperty(exports, "FIRST_KEY_INDEX", { enumerable: true, get: function () { return QUERY_1.FIRST_KEY_INDEX; } }); +exports.IS_READ_ONLY = true; +function transformArguments(graph, query, options, compact) { + return (0, _1.pushQueryArguments)(['GRAPH.RO_QUERY'], graph, query, options, compact); +} +exports.transformArguments = transformArguments; +var QUERY_2 = require("./QUERY"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return QUERY_2.transformReply; } }); diff --git a/server/node_modules/@redis/graph/dist/commands/SLOWLOG.d.ts b/server/node_modules/@redis/graph/dist/commands/SLOWLOG.d.ts new file mode 100644 index 0000000..53155f2 --- /dev/null +++ b/server/node_modules/@redis/graph/dist/commands/SLOWLOG.d.ts @@ -0,0 +1,17 @@ +export declare const IS_READ_ONLY = true; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: string): string[]; +type SlowLogRawReply = Array<[ + timestamp: string, + command: string, + query: string, + took: string +]>; +type SlowLogReply = Array<{ + timestamp: Date; + command: string; + query: string; + took: number; +}>; +export declare function transformReply(logs: SlowLogRawReply): SlowLogReply; +export {}; diff --git a/server/node_modules/@redis/graph/dist/commands/SLOWLOG.js b/server/node_modules/@redis/graph/dist/commands/SLOWLOG.js new file mode 100644 index 0000000..bbadeb3 --- /dev/null +++ b/server/node_modules/@redis/graph/dist/commands/SLOWLOG.js @@ -0,0 +1,18 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.FIRST_KEY_INDEX = exports.IS_READ_ONLY = void 0; +exports.IS_READ_ONLY = true; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key) { + return ['GRAPH.SLOWLOG', key]; +} +exports.transformArguments = transformArguments; +function transformReply(logs) { + return logs.map(([timestamp, command, query, took]) => ({ + timestamp: new Date(Number(timestamp) * 1000), + command, + query, + took: Number(took) + })); +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/graph/dist/commands/index.d.ts b/server/node_modules/@redis/graph/dist/commands/index.d.ts new file mode 100644 index 0000000..d39c646 --- /dev/null +++ b/server/node_modules/@redis/graph/dist/commands/index.d.ts @@ -0,0 +1,41 @@ +import * as CONFIG_GET from './CONFIG_GET'; +import * as CONFIG_SET from './CONFIG_SET'; +import * as DELETE from './DELETE'; +import * as EXPLAIN from './EXPLAIN'; +import * as LIST from './LIST'; +import * as PROFILE from './PROFILE'; +import * as QUERY from './QUERY'; +import * as RO_QUERY from './RO_QUERY'; +import * as SLOWLOG from './SLOWLOG'; +import { RedisCommandArgument, RedisCommandArguments } from '@redis/client/dist/lib/commands'; +declare const _default: { + CONFIG_GET: typeof CONFIG_GET; + configGet: typeof CONFIG_GET; + CONFIG_SET: typeof CONFIG_SET; + configSet: typeof CONFIG_SET; + DELETE: typeof DELETE; + delete: typeof DELETE; + EXPLAIN: typeof EXPLAIN; + explain: typeof EXPLAIN; + LIST: typeof LIST; + list: typeof LIST; + PROFILE: typeof PROFILE; + profile: typeof PROFILE; + QUERY: typeof QUERY; + query: typeof QUERY; + RO_QUERY: typeof RO_QUERY; + roQuery: typeof RO_QUERY; + SLOWLOG: typeof SLOWLOG; + slowLog: typeof SLOWLOG; +}; +export default _default; +type QueryParam = null | string | number | boolean | QueryParams | Array; +type QueryParams = { + [key: string]: QueryParam; +}; +export interface QueryOptions { + params?: QueryParams; + TIMEOUT?: number; +} +export type QueryOptionsBackwardCompatible = QueryOptions | number; +export declare function pushQueryArguments(args: RedisCommandArguments, graph: RedisCommandArgument, query: RedisCommandArgument, options?: QueryOptionsBackwardCompatible, compact?: boolean): RedisCommandArguments; diff --git a/server/node_modules/@redis/graph/dist/commands/index.js b/server/node_modules/@redis/graph/dist/commands/index.js new file mode 100644 index 0000000..1f71400 --- /dev/null +++ b/server/node_modules/@redis/graph/dist/commands/index.js @@ -0,0 +1,88 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.pushQueryArguments = void 0; +const CONFIG_GET = require("./CONFIG_GET"); +const CONFIG_SET = require("./CONFIG_SET"); +; +const DELETE = require("./DELETE"); +const EXPLAIN = require("./EXPLAIN"); +const LIST = require("./LIST"); +const PROFILE = require("./PROFILE"); +const QUERY = require("./QUERY"); +const RO_QUERY = require("./RO_QUERY"); +const SLOWLOG = require("./SLOWLOG"); +exports.default = { + CONFIG_GET, + configGet: CONFIG_GET, + CONFIG_SET, + configSet: CONFIG_SET, + DELETE, + delete: DELETE, + EXPLAIN, + explain: EXPLAIN, + LIST, + list: LIST, + PROFILE, + profile: PROFILE, + QUERY, + query: QUERY, + RO_QUERY, + roQuery: RO_QUERY, + SLOWLOG, + slowLog: SLOWLOG +}; +function pushQueryArguments(args, graph, query, options, compact) { + args.push(graph); + if (typeof options === 'number') { + args.push(query); + pushTimeout(args, options); + } + else { + args.push(options?.params ? + `CYPHER ${queryParamsToString(options.params)} ${query}` : + query); + if (options?.TIMEOUT !== undefined) { + pushTimeout(args, options.TIMEOUT); + } + } + if (compact) { + args.push('--compact'); + } + return args; +} +exports.pushQueryArguments = pushQueryArguments; +function pushTimeout(args, timeout) { + args.push('TIMEOUT', timeout.toString()); +} +function queryParamsToString(params) { + const parts = []; + for (const [key, value] of Object.entries(params)) { + parts.push(`${key}=${queryParamToString(value)}`); + } + return parts.join(' '); +} +function queryParamToString(param) { + if (param === null) { + return 'null'; + } + switch (typeof param) { + case 'string': + return `"${param.replace(/["\\]/g, '\\$&')}"`; + case 'number': + case 'boolean': + return param.toString(); + } + if (Array.isArray(param)) { + return `[${param.map(queryParamToString).join(',')}]`; + } + else if (typeof param === 'object') { + const body = []; + for (const [key, value] of Object.entries(param)) { + body.push(`${key}:${queryParamToString(value)}`); + } + return `{${body.join(',')}}`; + } + else { + throw new TypeError(`Unexpected param type ${typeof param} ${param}`); + } +} diff --git a/server/node_modules/@redis/graph/dist/graph.d.ts b/server/node_modules/@redis/graph/dist/graph.d.ts new file mode 100644 index 0000000..0764e69 --- /dev/null +++ b/server/node_modules/@redis/graph/dist/graph.d.ts @@ -0,0 +1,19 @@ +import { RedisClientType } from '@redis/client/dist/lib/client/index'; +import { RedisCommandArgument, RedisFunctions, RedisScripts } from '@redis/client/dist/lib/commands'; +import { QueryOptions } from './commands'; +import { QueryReply } from './commands/QUERY'; +export type GraphReply = Omit & { + data?: Array; +}; +export type GraphClientType = RedisClientType<{ + graph: { + query: typeof import('./commands/QUERY'); + roQuery: typeof import('./commands/RO_QUERY'); + }; +}, RedisFunctions, RedisScripts>; +export default class Graph { + #private; + constructor(client: GraphClientType, name: string); + query(query: RedisCommandArgument, options?: QueryOptions): Promise>; + roQuery(query: RedisCommandArgument, options?: QueryOptions): Promise>; +} diff --git a/server/node_modules/@redis/graph/dist/graph.js b/server/node_modules/@redis/graph/dist/graph.js new file mode 100644 index 0000000..230de6f --- /dev/null +++ b/server/node_modules/@redis/graph/dist/graph.js @@ -0,0 +1,173 @@ +"use strict"; +var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; +}; +var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var _Graph_instances, _Graph_client, _Graph_name, _Graph_metadata, _Graph_setMetadataPromise, _Graph_updateMetadata, _Graph_setMetadata, _Graph_cleanMetadataArray, _Graph_getMetadata, _Graph_getMetadataAsync, _Graph_parseReply, _Graph_parseValue, _Graph_parseEdge, _Graph_parseNode, _Graph_parseProperties; +Object.defineProperty(exports, "__esModule", { value: true }); +// https://github.com/RedisGraph/RedisGraph/blob/master/src/resultset/formatters/resultset_formatter.h#L20 +var GraphValueTypes; +(function (GraphValueTypes) { + GraphValueTypes[GraphValueTypes["UNKNOWN"] = 0] = "UNKNOWN"; + GraphValueTypes[GraphValueTypes["NULL"] = 1] = "NULL"; + GraphValueTypes[GraphValueTypes["STRING"] = 2] = "STRING"; + GraphValueTypes[GraphValueTypes["INTEGER"] = 3] = "INTEGER"; + GraphValueTypes[GraphValueTypes["BOOLEAN"] = 4] = "BOOLEAN"; + GraphValueTypes[GraphValueTypes["DOUBLE"] = 5] = "DOUBLE"; + GraphValueTypes[GraphValueTypes["ARRAY"] = 6] = "ARRAY"; + GraphValueTypes[GraphValueTypes["EDGE"] = 7] = "EDGE"; + GraphValueTypes[GraphValueTypes["NODE"] = 8] = "NODE"; + GraphValueTypes[GraphValueTypes["PATH"] = 9] = "PATH"; + GraphValueTypes[GraphValueTypes["MAP"] = 10] = "MAP"; + GraphValueTypes[GraphValueTypes["POINT"] = 11] = "POINT"; +})(GraphValueTypes || (GraphValueTypes = {})); +class Graph { + constructor(client, name) { + _Graph_instances.add(this); + _Graph_client.set(this, void 0); + _Graph_name.set(this, void 0); + _Graph_metadata.set(this, void 0); + _Graph_setMetadataPromise.set(this, void 0); + __classPrivateFieldSet(this, _Graph_client, client, "f"); + __classPrivateFieldSet(this, _Graph_name, name, "f"); + } + async query(query, options) { + return __classPrivateFieldGet(this, _Graph_instances, "m", _Graph_parseReply).call(this, await __classPrivateFieldGet(this, _Graph_client, "f").graph.query(__classPrivateFieldGet(this, _Graph_name, "f"), query, options, true)); + } + async roQuery(query, options) { + return __classPrivateFieldGet(this, _Graph_instances, "m", _Graph_parseReply).call(this, await __classPrivateFieldGet(this, _Graph_client, "f").graph.roQuery(__classPrivateFieldGet(this, _Graph_name, "f"), query, options, true)); + } +} +_Graph_client = new WeakMap(), _Graph_name = new WeakMap(), _Graph_metadata = new WeakMap(), _Graph_setMetadataPromise = new WeakMap(), _Graph_instances = new WeakSet(), _Graph_updateMetadata = function _Graph_updateMetadata() { + __classPrivateFieldSet(this, _Graph_setMetadataPromise, __classPrivateFieldGet(this, _Graph_setMetadataPromise, "f") ?? __classPrivateFieldGet(this, _Graph_instances, "m", _Graph_setMetadata).call(this) + .finally(() => __classPrivateFieldSet(this, _Graph_setMetadataPromise, undefined, "f")), "f"); + return __classPrivateFieldGet(this, _Graph_setMetadataPromise, "f"); +}, _Graph_setMetadata = +// DO NOT use directly, use #updateMetadata instead +async function _Graph_setMetadata() { + const [labels, relationshipTypes, propertyKeys] = await Promise.all([ + __classPrivateFieldGet(this, _Graph_client, "f").graph.roQuery(__classPrivateFieldGet(this, _Graph_name, "f"), 'CALL db.labels()'), + __classPrivateFieldGet(this, _Graph_client, "f").graph.roQuery(__classPrivateFieldGet(this, _Graph_name, "f"), 'CALL db.relationshipTypes()'), + __classPrivateFieldGet(this, _Graph_client, "f").graph.roQuery(__classPrivateFieldGet(this, _Graph_name, "f"), 'CALL db.propertyKeys()') + ]); + __classPrivateFieldSet(this, _Graph_metadata, { + labels: __classPrivateFieldGet(this, _Graph_instances, "m", _Graph_cleanMetadataArray).call(this, labels.data), + relationshipTypes: __classPrivateFieldGet(this, _Graph_instances, "m", _Graph_cleanMetadataArray).call(this, relationshipTypes.data), + propertyKeys: __classPrivateFieldGet(this, _Graph_instances, "m", _Graph_cleanMetadataArray).call(this, propertyKeys.data) + }, "f"); + return __classPrivateFieldGet(this, _Graph_metadata, "f"); +}, _Graph_cleanMetadataArray = function _Graph_cleanMetadataArray(arr) { + return arr.map(([value]) => value); +}, _Graph_getMetadata = function _Graph_getMetadata(key, id) { + return __classPrivateFieldGet(this, _Graph_metadata, "f")?.[key][id] ?? __classPrivateFieldGet(this, _Graph_instances, "m", _Graph_getMetadataAsync).call(this, key, id); +}, _Graph_getMetadataAsync = +// DO NOT use directly, use #getMetadata instead +async function _Graph_getMetadataAsync(key, id) { + const value = (await __classPrivateFieldGet(this, _Graph_instances, "m", _Graph_updateMetadata).call(this))[key][id]; + if (value === undefined) + throw new Error(`Cannot find value from ${key}[${id}]`); + return value; +}, _Graph_parseReply = async function _Graph_parseReply(reply) { + if (!reply.data) + return reply; + const promises = [], parsed = { + metadata: reply.metadata, + data: reply.data.map((row) => { + const data = {}; + for (let i = 0; i < row.length; i++) { + data[reply.headers[i][1]] = __classPrivateFieldGet(this, _Graph_instances, "m", _Graph_parseValue).call(this, row[i], promises); + } + return data; + }) + }; + if (promises.length) + await Promise.all(promises); + return parsed; +}, _Graph_parseValue = function _Graph_parseValue([valueType, value], promises) { + switch (valueType) { + case GraphValueTypes.NULL: + return null; + case GraphValueTypes.STRING: + case GraphValueTypes.INTEGER: + return value; + case GraphValueTypes.BOOLEAN: + return value === 'true'; + case GraphValueTypes.DOUBLE: + return parseFloat(value); + case GraphValueTypes.ARRAY: + return value.map(x => __classPrivateFieldGet(this, _Graph_instances, "m", _Graph_parseValue).call(this, x, promises)); + case GraphValueTypes.EDGE: + return __classPrivateFieldGet(this, _Graph_instances, "m", _Graph_parseEdge).call(this, value, promises); + case GraphValueTypes.NODE: + return __classPrivateFieldGet(this, _Graph_instances, "m", _Graph_parseNode).call(this, value, promises); + case GraphValueTypes.PATH: + return { + nodes: value[0][1].map(([, node]) => __classPrivateFieldGet(this, _Graph_instances, "m", _Graph_parseNode).call(this, node, promises)), + edges: value[1][1].map(([, edge]) => __classPrivateFieldGet(this, _Graph_instances, "m", _Graph_parseEdge).call(this, edge, promises)) + }; + case GraphValueTypes.MAP: + const map = {}; + for (let i = 0; i < value.length; i++) { + map[value[i++]] = __classPrivateFieldGet(this, _Graph_instances, "m", _Graph_parseValue).call(this, value[i], promises); + } + return map; + case GraphValueTypes.POINT: + return { + latitude: parseFloat(value[0]), + longitude: parseFloat(value[1]) + }; + default: + throw new Error(`unknown scalar type: ${valueType}`); + } +}, _Graph_parseEdge = function _Graph_parseEdge([id, relationshipTypeId, sourceId, destinationId, properties], promises) { + const edge = { + id, + sourceId, + destinationId, + properties: __classPrivateFieldGet(this, _Graph_instances, "m", _Graph_parseProperties).call(this, properties, promises) + }; + const relationshipType = __classPrivateFieldGet(this, _Graph_instances, "m", _Graph_getMetadata).call(this, 'relationshipTypes', relationshipTypeId); + if (relationshipType instanceof Promise) { + promises.push(relationshipType.then(value => edge.relationshipType = value)); + } + else { + edge.relationshipType = relationshipType; + } + return edge; +}, _Graph_parseNode = function _Graph_parseNode([id, labelIds, properties], promises) { + const labels = new Array(labelIds.length); + for (let i = 0; i < labelIds.length; i++) { + const value = __classPrivateFieldGet(this, _Graph_instances, "m", _Graph_getMetadata).call(this, 'labels', labelIds[i]); + if (value instanceof Promise) { + promises.push(value.then(value => labels[i] = value)); + } + else { + labels[i] = value; + } + } + return { + id, + labels, + properties: __classPrivateFieldGet(this, _Graph_instances, "m", _Graph_parseProperties).call(this, properties, promises) + }; +}, _Graph_parseProperties = function _Graph_parseProperties(raw, promises) { + const parsed = {}; + for (const [id, type, value] of raw) { + const parsedValue = __classPrivateFieldGet(this, _Graph_instances, "m", _Graph_parseValue).call(this, [type, value], promises), key = __classPrivateFieldGet(this, _Graph_instances, "m", _Graph_getMetadata).call(this, 'propertyKeys', id); + if (key instanceof Promise) { + promises.push(key.then(key => parsed[key] = parsedValue)); + } + else { + parsed[key] = parsedValue; + } + } + return parsed; +}; +exports.default = Graph; diff --git a/server/node_modules/@redis/graph/dist/index.d.ts b/server/node_modules/@redis/graph/dist/index.d.ts new file mode 100644 index 0000000..e9f15ab --- /dev/null +++ b/server/node_modules/@redis/graph/dist/index.d.ts @@ -0,0 +1,2 @@ +export { default } from './commands'; +export { default as Graph } from './graph'; diff --git a/server/node_modules/@redis/graph/dist/index.js b/server/node_modules/@redis/graph/dist/index.js new file mode 100644 index 0000000..3552eff --- /dev/null +++ b/server/node_modules/@redis/graph/dist/index.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Graph = exports.default = void 0; +var commands_1 = require("./commands"); +Object.defineProperty(exports, "default", { enumerable: true, get: function () { return commands_1.default; } }); +var graph_1 = require("./graph"); +Object.defineProperty(exports, "Graph", { enumerable: true, get: function () { return graph_1.default; } }); diff --git a/server/node_modules/@redis/graph/package.json b/server/node_modules/@redis/graph/package.json new file mode 100644 index 0000000..95cce6b --- /dev/null +++ b/server/node_modules/@redis/graph/package.json @@ -0,0 +1,41 @@ +{ + "name": "@redis/graph", + "version": "1.1.1", + "license": "MIT", + "main": "./dist/index.js", + "types": "./dist/index.d.ts", + "files": [ + "dist/" + ], + "scripts": { + "test": "nyc -r text-summary -r lcov mocha -r source-map-support/register -r ts-node/register './lib/**/*.spec.ts'", + "build": "tsc", + "documentation": "typedoc" + }, + "peerDependencies": { + "@redis/client": "^1.0.0" + }, + "devDependencies": { + "@istanbuljs/nyc-config-typescript": "^1.0.2", + "@redis/test-utils": "*", + "@types/node": "^20.6.2", + "nyc": "^15.1.0", + "release-it": "^16.1.5", + "source-map-support": "^0.5.21", + "ts-node": "^10.9.1", + "typedoc": "^0.25.1", + "typescript": "^5.2.2" + }, + "repository": { + "type": "git", + "url": "git://github.com/redis/node-redis.git" + }, + "bugs": { + "url": "https://github.com/redis/node-redis/issues" + }, + "homepage": "https://github.com/redis/node-redis/tree/master/packages/graph", + "keywords": [ + "redis", + "RedisGraph" + ] +} diff --git a/server/node_modules/@redis/json/README.md b/server/node_modules/@redis/json/README.md new file mode 100644 index 0000000..e7f7017 --- /dev/null +++ b/server/node_modules/@redis/json/README.md @@ -0,0 +1,80 @@ +# @redis/json + +This package provides support for the [RedisJSON](https://redis.io/docs/stack/json/) module, which adds JSON as a native data type to Redis. It extends the [Node Redis client](https://github.com/redis/node-redis) to include functions for each of the RedisJSON commands. + +To use these extra commands, your Redis server must have the RedisJSON module installed. + +## Usage + +For a complete example, see [`managing-json.js`](https://github.com/redis/node-redis/blob/master/examples/managing-json.js) in the Node Redis examples folder. + +### Storing JSON Documents in Redis + +The [`JSON.SET`](https://redis.io/commands/json.set/) command stores a JSON value at a given JSON Path in a Redis key. + +Here, we'll store a JSON document in the root of the Redis key "`mydoc`": + +```javascript +import { createClient } from 'redis'; + +... +await client.json.set('noderedis:jsondata', '$', { + name: 'Roberta McDonald', + pets: [ + { + name: 'Rex', + species: 'dog', + age: 3, + isMammal: true + }, + { + name: 'Goldie', + species: 'fish', + age: 2, + isMammal: false + } + ] +}); +``` + +For more information about RedisJSON's path syntax, [check out the documentation](https://redis.io/docs/stack/json/path/). + +### Retrieving JSON Documents from Redis + +With RedisJSON, we can retrieve all or part(s) of a JSON document using the [`JSON.GET`](https://redis.io/commands/json.get/) command and one or more JSON Paths. Let's get the name and age of one of the pets: + +```javascript +const results = await client.json.get('noderedis:jsondata', { + path: [ + '.pets[1].name', + '.pets[1].age' + ] +}); +``` + +`results` will contain the following: + +```javascript + { '.pets[1].name': 'Goldie', '.pets[1].age': 2 } +``` + +### Performing Atomic Updates on JSON Documents Stored in Redis + +RedisJSON includes commands that can atomically update values in a JSON document, in place in Redis without having to first retrieve the entire document. + +Using the [`JSON.NUMINCRBY`](https://redis.io/commands/json.numincrby/) command, we can update the age of one of the pets like this: + +```javascript +await client.json.numIncrBy('noderedis:jsondata', '.pets[1].age', 1); +``` + +And we can add a new object to the pets array with the [`JSON.ARRAPPEND`](https://redis.io/commands/json.arrappend/) command: + +```javascript +await client.json.arrAppend('noderedis:jsondata', '.pets', { + name: 'Robin', + species: 'bird', + age: 1, + isMammal: false +}); +``` diff --git a/server/node_modules/@redis/json/dist/commands/ARRAPPEND.d.ts b/server/node_modules/@redis/json/dist/commands/ARRAPPEND.d.ts new file mode 100644 index 0000000..c13272a --- /dev/null +++ b/server/node_modules/@redis/json/dist/commands/ARRAPPEND.d.ts @@ -0,0 +1,4 @@ +import { RedisJSON } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: string, path: string, ...jsons: Array): Array; +export declare function transformReply(): number | Array; diff --git a/server/node_modules/@redis/json/dist/commands/ARRAPPEND.js b/server/node_modules/@redis/json/dist/commands/ARRAPPEND.js new file mode 100644 index 0000000..cc178b6 --- /dev/null +++ b/server/node_modules/@redis/json/dist/commands/ARRAPPEND.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const _1 = require("."); +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, path, ...jsons) { + const args = ['JSON.ARRAPPEND', key, path]; + for (const json of jsons) { + args.push((0, _1.transformRedisJsonArgument)(json)); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/json/dist/commands/ARRINDEX.d.ts b/server/node_modules/@redis/json/dist/commands/ARRINDEX.d.ts new file mode 100644 index 0000000..bc13f45 --- /dev/null +++ b/server/node_modules/@redis/json/dist/commands/ARRINDEX.d.ts @@ -0,0 +1,5 @@ +import { RedisJSON } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: string, path: string, json: RedisJSON, start?: number, stop?: number): Array; +export declare function transformReply(): number | Array; diff --git a/server/node_modules/@redis/json/dist/commands/ARRINDEX.js b/server/node_modules/@redis/json/dist/commands/ARRINDEX.js new file mode 100644 index 0000000..95c9cf1 --- /dev/null +++ b/server/node_modules/@redis/json/dist/commands/ARRINDEX.js @@ -0,0 +1,17 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const _1 = require("."); +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, path, json, start, stop) { + const args = ['JSON.ARRINDEX', key, path, (0, _1.transformRedisJsonArgument)(json)]; + if (start !== undefined && start !== null) { + args.push(start.toString()); + if (stop !== undefined && stop !== null) { + args.push(stop.toString()); + } + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/json/dist/commands/ARRINSERT.d.ts b/server/node_modules/@redis/json/dist/commands/ARRINSERT.d.ts new file mode 100644 index 0000000..19f2adb --- /dev/null +++ b/server/node_modules/@redis/json/dist/commands/ARRINSERT.d.ts @@ -0,0 +1,4 @@ +import { RedisJSON } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: string, path: string, index: number, ...jsons: Array): Array; +export declare function transformReply(): number | Array; diff --git a/server/node_modules/@redis/json/dist/commands/ARRINSERT.js b/server/node_modules/@redis/json/dist/commands/ARRINSERT.js new file mode 100644 index 0000000..540c481 --- /dev/null +++ b/server/node_modules/@redis/json/dist/commands/ARRINSERT.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const _1 = require("."); +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, path, index, ...jsons) { + const args = ['JSON.ARRINSERT', key, path, index.toString()]; + for (const json of jsons) { + args.push((0, _1.transformRedisJsonArgument)(json)); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/json/dist/commands/ARRLEN.d.ts b/server/node_modules/@redis/json/dist/commands/ARRLEN.d.ts new file mode 100644 index 0000000..f78020a --- /dev/null +++ b/server/node_modules/@redis/json/dist/commands/ARRLEN.d.ts @@ -0,0 +1,4 @@ +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: string, path?: string): Array; +export declare function transformReply(): number | Array; diff --git a/server/node_modules/@redis/json/dist/commands/ARRLEN.js b/server/node_modules/@redis/json/dist/commands/ARRLEN.js new file mode 100644 index 0000000..30a50cf --- /dev/null +++ b/server/node_modules/@redis/json/dist/commands/ARRLEN.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, path) { + const args = ['JSON.ARRLEN', key]; + if (path) { + args.push(path); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/json/dist/commands/ARRPOP.d.ts b/server/node_modules/@redis/json/dist/commands/ARRPOP.d.ts new file mode 100644 index 0000000..ce9bca5 --- /dev/null +++ b/server/node_modules/@redis/json/dist/commands/ARRPOP.d.ts @@ -0,0 +1,4 @@ +import { RedisJSON } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: string, path?: string, index?: number): Array; +export declare function transformReply(reply: null | string | Array): null | RedisJSON | Array; diff --git a/server/node_modules/@redis/json/dist/commands/ARRPOP.js b/server/node_modules/@redis/json/dist/commands/ARRPOP.js new file mode 100644 index 0000000..2be6472 --- /dev/null +++ b/server/node_modules/@redis/json/dist/commands/ARRPOP.js @@ -0,0 +1,25 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const _1 = require("."); +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, path, index) { + const args = ['JSON.ARRPOP', key]; + if (path) { + args.push(path); + if (index !== undefined && index !== null) { + args.push(index.toString()); + } + } + return args; +} +exports.transformArguments = transformArguments; +function transformReply(reply) { + if (reply === null) + return null; + if (Array.isArray(reply)) { + return reply.map(_1.transformRedisJsonNullReply); + } + return (0, _1.transformRedisJsonNullReply)(reply); +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/json/dist/commands/ARRTRIM.d.ts b/server/node_modules/@redis/json/dist/commands/ARRTRIM.d.ts new file mode 100644 index 0000000..ac7d469 --- /dev/null +++ b/server/node_modules/@redis/json/dist/commands/ARRTRIM.d.ts @@ -0,0 +1,3 @@ +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: string, path: string, start: number, stop: number): Array; +export declare function transformReply(): number | Array; diff --git a/server/node_modules/@redis/json/dist/commands/ARRTRIM.js b/server/node_modules/@redis/json/dist/commands/ARRTRIM.js new file mode 100644 index 0000000..287a02c --- /dev/null +++ b/server/node_modules/@redis/json/dist/commands/ARRTRIM.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, path, start, stop) { + return ['JSON.ARRTRIM', key, path, start.toString(), stop.toString()]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/json/dist/commands/DEBUG_MEMORY.d.ts b/server/node_modules/@redis/json/dist/commands/DEBUG_MEMORY.d.ts new file mode 100644 index 0000000..d9fa8ce --- /dev/null +++ b/server/node_modules/@redis/json/dist/commands/DEBUG_MEMORY.d.ts @@ -0,0 +1,3 @@ +export declare const FIRST_KEY_INDEX = 2; +export declare function transformArguments(key: string, path?: string): Array; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/json/dist/commands/DEBUG_MEMORY.js b/server/node_modules/@redis/json/dist/commands/DEBUG_MEMORY.js new file mode 100644 index 0000000..3382bde --- /dev/null +++ b/server/node_modules/@redis/json/dist/commands/DEBUG_MEMORY.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 2; +function transformArguments(key, path) { + const args = ['JSON.DEBUG', 'MEMORY', key]; + if (path) { + args.push(path); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/json/dist/commands/DEL.d.ts b/server/node_modules/@redis/json/dist/commands/DEL.d.ts new file mode 100644 index 0000000..6526825 --- /dev/null +++ b/server/node_modules/@redis/json/dist/commands/DEL.d.ts @@ -0,0 +1,3 @@ +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: string, path?: string): Array; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/json/dist/commands/DEL.js b/server/node_modules/@redis/json/dist/commands/DEL.js new file mode 100644 index 0000000..4866aa8 --- /dev/null +++ b/server/node_modules/@redis/json/dist/commands/DEL.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, path) { + const args = ['JSON.DEL', key]; + if (path) { + args.push(path); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/json/dist/commands/FORGET.d.ts b/server/node_modules/@redis/json/dist/commands/FORGET.d.ts new file mode 100644 index 0000000..6526825 --- /dev/null +++ b/server/node_modules/@redis/json/dist/commands/FORGET.d.ts @@ -0,0 +1,3 @@ +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: string, path?: string): Array; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/json/dist/commands/FORGET.js b/server/node_modules/@redis/json/dist/commands/FORGET.js new file mode 100644 index 0000000..e48d301 --- /dev/null +++ b/server/node_modules/@redis/json/dist/commands/FORGET.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, path) { + const args = ['JSON.FORGET', key]; + if (path) { + args.push(path); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/json/dist/commands/GET.d.ts b/server/node_modules/@redis/json/dist/commands/GET.d.ts new file mode 100644 index 0000000..8dcce9a --- /dev/null +++ b/server/node_modules/@redis/json/dist/commands/GET.d.ts @@ -0,0 +1,12 @@ +import { RedisCommandArguments } from '@redis/client/dist/lib/commands'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +interface GetOptions { + path?: string | Array; + INDENT?: string; + NEWLINE?: string; + SPACE?: string; + NOESCAPE?: true; +} +export declare function transformArguments(key: string, options?: GetOptions): RedisCommandArguments; +export { transformRedisJsonNullReply as transformReply } from '.'; diff --git a/server/node_modules/@redis/json/dist/commands/GET.js b/server/node_modules/@redis/json/dist/commands/GET.js new file mode 100644 index 0000000..2915ad1 --- /dev/null +++ b/server/node_modules/@redis/json/dist/commands/GET.js @@ -0,0 +1,28 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const generic_transformers_1 = require("@redis/client/dist/lib/commands/generic-transformers"); +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, options) { + let args = ['JSON.GET', key]; + if (options?.path) { + args = (0, generic_transformers_1.pushVerdictArguments)(args, options.path); + } + if (options?.INDENT) { + args.push('INDENT', options.INDENT); + } + if (options?.NEWLINE) { + args.push('NEWLINE', options.NEWLINE); + } + if (options?.SPACE) { + args.push('SPACE', options.SPACE); + } + if (options?.NOESCAPE) { + args.push('NOESCAPE'); + } + return args; +} +exports.transformArguments = transformArguments; +var _1 = require("."); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return _1.transformRedisJsonNullReply; } }); diff --git a/server/node_modules/@redis/json/dist/commands/MERGE.d.ts b/server/node_modules/@redis/json/dist/commands/MERGE.d.ts new file mode 100644 index 0000000..b4974da --- /dev/null +++ b/server/node_modules/@redis/json/dist/commands/MERGE.d.ts @@ -0,0 +1,4 @@ +import { RedisJSON } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: string, path: string, json: RedisJSON): Array; +export declare function transformReply(): 'OK'; diff --git a/server/node_modules/@redis/json/dist/commands/MERGE.js b/server/node_modules/@redis/json/dist/commands/MERGE.js new file mode 100644 index 0000000..ccfbfa7 --- /dev/null +++ b/server/node_modules/@redis/json/dist/commands/MERGE.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const _1 = require("."); +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, path, json) { + return ['JSON.MERGE', key, path, (0, _1.transformRedisJsonArgument)(json)]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/json/dist/commands/MGET.d.ts b/server/node_modules/@redis/json/dist/commands/MGET.d.ts new file mode 100644 index 0000000..431d38c --- /dev/null +++ b/server/node_modules/@redis/json/dist/commands/MGET.d.ts @@ -0,0 +1,5 @@ +import { RedisJSON } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(keys: Array, path: string): Array; +export declare function transformReply(reply: Array): Array; diff --git a/server/node_modules/@redis/json/dist/commands/MGET.js b/server/node_modules/@redis/json/dist/commands/MGET.js new file mode 100644 index 0000000..ff5b53f --- /dev/null +++ b/server/node_modules/@redis/json/dist/commands/MGET.js @@ -0,0 +1,18 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const _1 = require("."); +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(keys, path) { + return [ + 'JSON.MGET', + ...keys, + path + ]; +} +exports.transformArguments = transformArguments; +function transformReply(reply) { + return reply.map(_1.transformRedisJsonNullReply); +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/json/dist/commands/MSET.d.ts b/server/node_modules/@redis/json/dist/commands/MSET.d.ts new file mode 100644 index 0000000..8ae7758 --- /dev/null +++ b/server/node_modules/@redis/json/dist/commands/MSET.d.ts @@ -0,0 +1,11 @@ +import { RedisJSON } from '.'; +import { RedisCommandArgument } from '@redis/client/dist/lib/commands'; +export declare const FIRST_KEY_INDEX = 1; +interface JsonMSetItem { + key: RedisCommandArgument; + path: RedisCommandArgument; + value: RedisJSON; +} +export declare function transformArguments(items: Array): Array; +export declare function transformReply(): 'OK'; +export {}; diff --git a/server/node_modules/@redis/json/dist/commands/MSET.js b/server/node_modules/@redis/json/dist/commands/MSET.js new file mode 100644 index 0000000..1af9afa --- /dev/null +++ b/server/node_modules/@redis/json/dist/commands/MSET.js @@ -0,0 +1,18 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const _1 = require("."); +exports.FIRST_KEY_INDEX = 1; +function transformArguments(items) { + const args = new Array(1 + items.length * 3); + args[0] = 'JSON.MSET'; + let argsIndex = 1; + for (let i = 0; i < items.length; i++) { + const item = items[i]; + args[argsIndex++] = item.key; + args[argsIndex++] = item.path; + args[argsIndex++] = (0, _1.transformRedisJsonArgument)(item.value); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/json/dist/commands/NUMINCRBY.d.ts b/server/node_modules/@redis/json/dist/commands/NUMINCRBY.d.ts new file mode 100644 index 0000000..3cac586 --- /dev/null +++ b/server/node_modules/@redis/json/dist/commands/NUMINCRBY.d.ts @@ -0,0 +1,3 @@ +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: string, path: string, by: number): Array; +export { transformNumbersReply as transformReply } from '.'; diff --git a/server/node_modules/@redis/json/dist/commands/NUMINCRBY.js b/server/node_modules/@redis/json/dist/commands/NUMINCRBY.js new file mode 100644 index 0000000..a0f9100 --- /dev/null +++ b/server/node_modules/@redis/json/dist/commands/NUMINCRBY.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, path, by) { + return ['JSON.NUMINCRBY', key, path, by.toString()]; +} +exports.transformArguments = transformArguments; +var _1 = require("."); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return _1.transformNumbersReply; } }); diff --git a/server/node_modules/@redis/json/dist/commands/NUMMULTBY.d.ts b/server/node_modules/@redis/json/dist/commands/NUMMULTBY.d.ts new file mode 100644 index 0000000..3cac586 --- /dev/null +++ b/server/node_modules/@redis/json/dist/commands/NUMMULTBY.d.ts @@ -0,0 +1,3 @@ +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: string, path: string, by: number): Array; +export { transformNumbersReply as transformReply } from '.'; diff --git a/server/node_modules/@redis/json/dist/commands/NUMMULTBY.js b/server/node_modules/@redis/json/dist/commands/NUMMULTBY.js new file mode 100644 index 0000000..64de23f --- /dev/null +++ b/server/node_modules/@redis/json/dist/commands/NUMMULTBY.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, path, by) { + return ['JSON.NUMMULTBY', key, path, by.toString()]; +} +exports.transformArguments = transformArguments; +var _1 = require("."); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return _1.transformNumbersReply; } }); diff --git a/server/node_modules/@redis/json/dist/commands/OBJKEYS.d.ts b/server/node_modules/@redis/json/dist/commands/OBJKEYS.d.ts new file mode 100644 index 0000000..b66d5de --- /dev/null +++ b/server/node_modules/@redis/json/dist/commands/OBJKEYS.d.ts @@ -0,0 +1,3 @@ +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: string, path?: string): Array; +export declare function transformReply(): Array | null | Array | null>; diff --git a/server/node_modules/@redis/json/dist/commands/OBJKEYS.js b/server/node_modules/@redis/json/dist/commands/OBJKEYS.js new file mode 100644 index 0000000..fa936f2 --- /dev/null +++ b/server/node_modules/@redis/json/dist/commands/OBJKEYS.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, path) { + const args = ['JSON.OBJKEYS', key]; + if (path) { + args.push(path); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/json/dist/commands/OBJLEN.d.ts b/server/node_modules/@redis/json/dist/commands/OBJLEN.d.ts new file mode 100644 index 0000000..915b6e1 --- /dev/null +++ b/server/node_modules/@redis/json/dist/commands/OBJLEN.d.ts @@ -0,0 +1,3 @@ +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: string, path?: string): Array; +export declare function transformReply(): number | null | Array; diff --git a/server/node_modules/@redis/json/dist/commands/OBJLEN.js b/server/node_modules/@redis/json/dist/commands/OBJLEN.js new file mode 100644 index 0000000..07c0962 --- /dev/null +++ b/server/node_modules/@redis/json/dist/commands/OBJLEN.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, path) { + const args = ['JSON.OBJLEN', key]; + if (path) { + args.push(path); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/json/dist/commands/RESP.d.ts b/server/node_modules/@redis/json/dist/commands/RESP.d.ts new file mode 100644 index 0000000..d1ba697 --- /dev/null +++ b/server/node_modules/@redis/json/dist/commands/RESP.d.ts @@ -0,0 +1,5 @@ +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: string, path?: string): Array; +type RESPReply = Array; +export declare function transformReply(): RESPReply; +export {}; diff --git a/server/node_modules/@redis/json/dist/commands/RESP.js b/server/node_modules/@redis/json/dist/commands/RESP.js new file mode 100644 index 0000000..76fc64b --- /dev/null +++ b/server/node_modules/@redis/json/dist/commands/RESP.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, path) { + const args = ['JSON.RESP', key]; + if (path) { + args.push(path); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/json/dist/commands/SET.d.ts b/server/node_modules/@redis/json/dist/commands/SET.d.ts new file mode 100644 index 0000000..9acba66 --- /dev/null +++ b/server/node_modules/@redis/json/dist/commands/SET.d.ts @@ -0,0 +1,11 @@ +import { RedisJSON } from '.'; +export declare const FIRST_KEY_INDEX = 1; +interface NX { + NX: true; +} +interface XX { + XX: true; +} +export declare function transformArguments(key: string, path: string, json: RedisJSON, options?: NX | XX): Array; +export declare function transformReply(): 'OK' | null; +export {}; diff --git a/server/node_modules/@redis/json/dist/commands/SET.js b/server/node_modules/@redis/json/dist/commands/SET.js new file mode 100644 index 0000000..d7a6988 --- /dev/null +++ b/server/node_modules/@redis/json/dist/commands/SET.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const _1 = require("."); +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, path, json, options) { + const args = ['JSON.SET', key, path, (0, _1.transformRedisJsonArgument)(json)]; + if (options?.NX) { + args.push('NX'); + } + else if (options?.XX) { + args.push('XX'); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/json/dist/commands/STRAPPEND.d.ts b/server/node_modules/@redis/json/dist/commands/STRAPPEND.d.ts new file mode 100644 index 0000000..0983914 --- /dev/null +++ b/server/node_modules/@redis/json/dist/commands/STRAPPEND.d.ts @@ -0,0 +1,6 @@ +export declare const FIRST_KEY_INDEX = 1; +type AppendArguments = [key: string, append: string]; +type AppendWithPathArguments = [key: string, path: string, append: string]; +export declare function transformArguments(...[key, pathOrAppend, append]: AppendArguments | AppendWithPathArguments): Array; +export declare function transformReply(): number | Array; +export {}; diff --git a/server/node_modules/@redis/json/dist/commands/STRAPPEND.js b/server/node_modules/@redis/json/dist/commands/STRAPPEND.js new file mode 100644 index 0000000..b5c6736 --- /dev/null +++ b/server/node_modules/@redis/json/dist/commands/STRAPPEND.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const _1 = require("."); +exports.FIRST_KEY_INDEX = 1; +function transformArguments(...[key, pathOrAppend, append]) { + const args = ['JSON.STRAPPEND', key]; + if (append !== undefined && append !== null) { + args.push(pathOrAppend, (0, _1.transformRedisJsonArgument)(append)); + } + else { + args.push((0, _1.transformRedisJsonArgument)(pathOrAppend)); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/json/dist/commands/STRLEN.d.ts b/server/node_modules/@redis/json/dist/commands/STRLEN.d.ts new file mode 100644 index 0000000..a27960d --- /dev/null +++ b/server/node_modules/@redis/json/dist/commands/STRLEN.d.ts @@ -0,0 +1,4 @@ +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: string, path?: string): Array; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/json/dist/commands/STRLEN.js b/server/node_modules/@redis/json/dist/commands/STRLEN.js new file mode 100644 index 0000000..599a793 --- /dev/null +++ b/server/node_modules/@redis/json/dist/commands/STRLEN.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, path) { + const args = ['JSON.STRLEN', key]; + if (path) { + args.push(path); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/json/dist/commands/TYPE.d.ts b/server/node_modules/@redis/json/dist/commands/TYPE.d.ts new file mode 100644 index 0000000..f9bc3f4 --- /dev/null +++ b/server/node_modules/@redis/json/dist/commands/TYPE.d.ts @@ -0,0 +1,3 @@ +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: string, path?: string): Array; +export declare function transformReply(): string | null | Array; diff --git a/server/node_modules/@redis/json/dist/commands/TYPE.js b/server/node_modules/@redis/json/dist/commands/TYPE.js new file mode 100644 index 0000000..7a4bc8a --- /dev/null +++ b/server/node_modules/@redis/json/dist/commands/TYPE.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, path) { + const args = ['JSON.TYPE', key]; + if (path) { + args.push(path); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/json/dist/commands/index.d.ts b/server/node_modules/@redis/json/dist/commands/index.d.ts new file mode 100644 index 0000000..ac894b9 --- /dev/null +++ b/server/node_modules/@redis/json/dist/commands/index.d.ts @@ -0,0 +1,80 @@ +import * as ARRAPPEND from './ARRAPPEND'; +import * as ARRINDEX from './ARRINDEX'; +import * as ARRINSERT from './ARRINSERT'; +import * as ARRLEN from './ARRLEN'; +import * as ARRPOP from './ARRPOP'; +import * as ARRTRIM from './ARRTRIM'; +import * as DEBUG_MEMORY from './DEBUG_MEMORY'; +import * as DEL from './DEL'; +import * as FORGET from './FORGET'; +import * as GET from './GET'; +import * as MERGE from './MERGE'; +import * as MGET from './MGET'; +import * as MSET from './MSET'; +import * as NUMINCRBY from './NUMINCRBY'; +import * as NUMMULTBY from './NUMMULTBY'; +import * as OBJKEYS from './OBJKEYS'; +import * as OBJLEN from './OBJLEN'; +import * as RESP from './RESP'; +import * as SET from './SET'; +import * as STRAPPEND from './STRAPPEND'; +import * as STRLEN from './STRLEN'; +import * as TYPE from './TYPE'; +declare const _default: { + ARRAPPEND: typeof ARRAPPEND; + arrAppend: typeof ARRAPPEND; + ARRINDEX: typeof ARRINDEX; + arrIndex: typeof ARRINDEX; + ARRINSERT: typeof ARRINSERT; + arrInsert: typeof ARRINSERT; + ARRLEN: typeof ARRLEN; + arrLen: typeof ARRLEN; + ARRPOP: typeof ARRPOP; + arrPop: typeof ARRPOP; + ARRTRIM: typeof ARRTRIM; + arrTrim: typeof ARRTRIM; + DEBUG_MEMORY: typeof DEBUG_MEMORY; + debugMemory: typeof DEBUG_MEMORY; + DEL: typeof DEL; + del: typeof DEL; + FORGET: typeof FORGET; + forget: typeof FORGET; + GET: typeof GET; + get: typeof GET; + MERGE: typeof MERGE; + merge: typeof MERGE; + MGET: typeof MGET; + mGet: typeof MGET; + MSET: typeof MSET; + mSet: typeof MSET; + NUMINCRBY: typeof NUMINCRBY; + numIncrBy: typeof NUMINCRBY; + NUMMULTBY: typeof NUMMULTBY; + numMultBy: typeof NUMMULTBY; + OBJKEYS: typeof OBJKEYS; + objKeys: typeof OBJKEYS; + OBJLEN: typeof OBJLEN; + objLen: typeof OBJLEN; + RESP: typeof RESP; + resp: typeof RESP; + SET: typeof SET; + set: typeof SET; + STRAPPEND: typeof STRAPPEND; + strAppend: typeof STRAPPEND; + STRLEN: typeof STRLEN; + strLen: typeof STRLEN; + TYPE: typeof TYPE; + type: typeof TYPE; +}; +export default _default; +interface RedisJSONArray extends Array { +} +interface RedisJSONObject { + [key: string]: RedisJSON; + [key: number]: RedisJSON; +} +export type RedisJSON = null | boolean | number | string | Date | RedisJSONArray | RedisJSONObject; +export declare function transformRedisJsonArgument(json: RedisJSON): string; +export declare function transformRedisJsonReply(json: string): RedisJSON; +export declare function transformRedisJsonNullReply(json: string | null): RedisJSON | null; +export declare function transformNumbersReply(reply: string): number | Array; diff --git a/server/node_modules/@redis/json/dist/commands/index.js b/server/node_modules/@redis/json/dist/commands/index.js new file mode 100644 index 0000000..94c4e17 --- /dev/null +++ b/server/node_modules/@redis/json/dist/commands/index.js @@ -0,0 +1,89 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformNumbersReply = exports.transformRedisJsonNullReply = exports.transformRedisJsonReply = exports.transformRedisJsonArgument = void 0; +const ARRAPPEND = require("./ARRAPPEND"); +const ARRINDEX = require("./ARRINDEX"); +const ARRINSERT = require("./ARRINSERT"); +const ARRLEN = require("./ARRLEN"); +const ARRPOP = require("./ARRPOP"); +const ARRTRIM = require("./ARRTRIM"); +const DEBUG_MEMORY = require("./DEBUG_MEMORY"); +const DEL = require("./DEL"); +const FORGET = require("./FORGET"); +const GET = require("./GET"); +const MERGE = require("./MERGE"); +const MGET = require("./MGET"); +const MSET = require("./MSET"); +const NUMINCRBY = require("./NUMINCRBY"); +const NUMMULTBY = require("./NUMMULTBY"); +const OBJKEYS = require("./OBJKEYS"); +const OBJLEN = require("./OBJLEN"); +const RESP = require("./RESP"); +const SET = require("./SET"); +const STRAPPEND = require("./STRAPPEND"); +const STRLEN = require("./STRLEN"); +const TYPE = require("./TYPE"); +exports.default = { + ARRAPPEND, + arrAppend: ARRAPPEND, + ARRINDEX, + arrIndex: ARRINDEX, + ARRINSERT, + arrInsert: ARRINSERT, + ARRLEN, + arrLen: ARRLEN, + ARRPOP, + arrPop: ARRPOP, + ARRTRIM, + arrTrim: ARRTRIM, + DEBUG_MEMORY, + debugMemory: DEBUG_MEMORY, + DEL, + del: DEL, + FORGET, + forget: FORGET, + GET, + get: GET, + MERGE, + merge: MERGE, + MGET, + mGet: MGET, + MSET, + mSet: MSET, + NUMINCRBY, + numIncrBy: NUMINCRBY, + NUMMULTBY, + numMultBy: NUMMULTBY, + OBJKEYS, + objKeys: OBJKEYS, + OBJLEN, + objLen: OBJLEN, + RESP, + resp: RESP, + SET, + set: SET, + STRAPPEND, + strAppend: STRAPPEND, + STRLEN, + strLen: STRLEN, + TYPE, + type: TYPE +}; +function transformRedisJsonArgument(json) { + return JSON.stringify(json); +} +exports.transformRedisJsonArgument = transformRedisJsonArgument; +function transformRedisJsonReply(json) { + return JSON.parse(json); +} +exports.transformRedisJsonReply = transformRedisJsonReply; +function transformRedisJsonNullReply(json) { + if (json === null) + return null; + return transformRedisJsonReply(json); +} +exports.transformRedisJsonNullReply = transformRedisJsonNullReply; +function transformNumbersReply(reply) { + return JSON.parse(reply); +} +exports.transformNumbersReply = transformNumbersReply; diff --git a/server/node_modules/@redis/json/dist/index.d.ts b/server/node_modules/@redis/json/dist/index.d.ts new file mode 100644 index 0000000..bc0e103 --- /dev/null +++ b/server/node_modules/@redis/json/dist/index.d.ts @@ -0,0 +1 @@ +export { default } from './commands'; diff --git a/server/node_modules/@redis/json/dist/index.js b/server/node_modules/@redis/json/dist/index.js new file mode 100644 index 0000000..992c58d --- /dev/null +++ b/server/node_modules/@redis/json/dist/index.js @@ -0,0 +1,5 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = void 0; +var commands_1 = require("./commands"); +Object.defineProperty(exports, "default", { enumerable: true, get: function () { return commands_1.default; } }); diff --git a/server/node_modules/@redis/json/package.json b/server/node_modules/@redis/json/package.json new file mode 100644 index 0000000..ad60cc1 --- /dev/null +++ b/server/node_modules/@redis/json/package.json @@ -0,0 +1,41 @@ +{ + "name": "@redis/json", + "version": "1.0.7", + "license": "MIT", + "main": "./dist/index.js", + "types": "./dist/index.d.ts", + "files": [ + "dist/" + ], + "scripts": { + "test": "nyc -r text-summary -r lcov mocha -r source-map-support/register -r ts-node/register './lib/**/*.spec.ts'", + "build": "tsc", + "documentation": "typedoc" + }, + "peerDependencies": { + "@redis/client": "^1.0.0" + }, + "devDependencies": { + "@istanbuljs/nyc-config-typescript": "^1.0.2", + "@redis/test-utils": "*", + "@types/node": "^20.6.2", + "nyc": "^15.1.0", + "release-it": "^16.1.5", + "source-map-support": "^0.5.21", + "ts-node": "^10.9.1", + "typedoc": "^0.25.1", + "typescript": "^5.2.2" + }, + "repository": { + "type": "git", + "url": "git://github.com/redis/node-redis.git" + }, + "bugs": { + "url": "https://github.com/redis/node-redis/issues" + }, + "homepage": "https://github.com/redis/node-redis/tree/master/packages/json", + "keywords": [ + "redis", + "RedisJSON" + ] +} diff --git a/server/node_modules/@redis/search/README.md b/server/node_modules/@redis/search/README.md new file mode 100644 index 0000000..60186ba --- /dev/null +++ b/server/node_modules/@redis/search/README.md @@ -0,0 +1,119 @@ +# @redis/search + +This package provides support for the [RediSearch](https://redisearch.io) module, which adds indexing and querying support for data stored in Redis Hashes or as JSON documents with the RedisJSON module. It extends the [Node Redis client](https://github.com/redis/node-redis) to include functions for each of the RediSearch commands. + +To use these extra commands, your Redis server must have the RediSearch module installed. To index and query JSON documents, you'll also need to add the RedisJSON module. + +## Usage + +For complete examples, see [`search-hashes.js`](https://github.com/redis/node-redis/blob/master/examples/search-hashes.js) and [`search-json.js`](https://github.com/redis/node-redis/blob/master/examples/search-json.js) in the Node Redis examples folder. + +### Indexing and Querying Data in Redis Hashes + +#### Creating an Index + +Before we can perform any searches, we need to tell RediSearch how to index our data, and which Redis keys to find that data in. The [FT.CREATE](https://redis.io/commands/ft.create) command creates a RediSearch index. Here's how to use it to create an index we'll call `idx:animals` where we want to index hashes containing `name`, `species` and `age` fields, and whose key names in Redis begin with the prefix `noderedis:animals`: + +```javascript +await client.ft.create('idx:animals', { + name: { + type: SchemaFieldTypes.TEXT, + SORTABLE: true + }, + species: SchemaFieldTypes.TAG, + age: SchemaFieldTypes.NUMERIC +}, { + ON: 'HASH', + PREFIX: 'noderedis:animals' +}); +``` + +See the [`FT.CREATE` documentation](https://redis.io/commands/ft.create/#description) for information about the different field types and additional options. + +#### Querying the Index + +Once we've created an index, and added some data to Redis hashes whose keys begin with the prefix `noderedis:animals`, we can start writing some search queries. RediSearch supports a rich query syntax for full-text search, faceted search, aggregation and more. Check out the [`FT.SEARCH` documentation](https://redis.io/commands/ft.search) and the [query syntax reference](https://redis.io/docs/interact/search-and-query/query) for more information. + +Let's write a query to find all the animals where the `species` field has the value `dog`: + +```javascript +const results = await client.ft.search('idx:animals', '@species:{dog}'); +``` + +`results` looks like this: + +```javascript +{ + total: 2, + documents: [ + { + id: 'noderedis:animals:4', + value: { + name: 'Fido', + species: 'dog', + age: '7' + } + }, + { + id: 'noderedis:animals:3', + value: { + name: 'Rover', + species: 'dog', + age: '9' + } + } + ] +} +``` + +### Indexing and Querying Data with RedisJSON + +RediSearch can also index and query JSON documents stored in Redis using the RedisJSON module. The approach is similar to that for indexing and searching data in hashes, but we can now use JSON Path like syntax and the data no longer has to be flat name/value pairs - it can contain nested objects and arrays. + +#### Creating an Index + +As before, we create an index with the `FT.CREATE` command, this time specifying we want to index JSON documents that look like this: + +```javascript +{ + name: 'Alice', + age: 32, + coins: 100 +} +``` + +Each document represents a user in some system, and users have name, age and coins properties. + +One way we might choose to index these documents is as follows: + +```javascript +await client.ft.create('idx:users', { + '$.name': { + type: SchemaFieldTypes.TEXT, + SORTABLE: 'UNF' + }, + '$.age': { + type: SchemaFieldTypes.NUMERIC, + AS: 'age' + }, + '$.coins': { + type: SchemaFieldTypes.NUMERIC, + AS: 'coins' + } +}, { + ON: 'JSON', + PREFIX: 'noderedis:users' +}); +``` + +Note that we're using JSON Path to specify where the fields to index are in our JSON documents, and the `AS` clause to define a name/alias for each field. We'll use these when writing queries. + +#### Querying the Index + +Now we have an index and some data stored as JSON documents in Redis (see the [JSON package documentation](https://github.com/redis/node-redis/tree/master/packages/json) for examples of how to store JSON), we can write some queries... + +We'll use the [RediSearch query language](https://redis.io/docs/interact/search-and-query/query) and [`FT.SEARCH`](https://redis.io/commands/ft.search) command. Here's a query to find users under the age of 30: + +```javascript +await client.ft.search('idx:users', '@age:[0 30]'); +``` diff --git a/server/node_modules/@redis/search/dist/commands/AGGREGATE.d.ts b/server/node_modules/@redis/search/dist/commands/AGGREGATE.d.ts new file mode 100644 index 0000000..a390ad9 --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/AGGREGATE.d.ts @@ -0,0 +1,118 @@ +import { RedisCommandArgument, RedisCommandArguments } from '@redis/client/dist/lib/commands'; +import { Params, PropertyName, SortByProperty } from '.'; +export declare enum AggregateSteps { + GROUPBY = "GROUPBY", + SORTBY = "SORTBY", + APPLY = "APPLY", + LIMIT = "LIMIT", + FILTER = "FILTER" +} +interface AggregateStep { + type: T; +} +export declare enum AggregateGroupByReducers { + COUNT = "COUNT", + COUNT_DISTINCT = "COUNT_DISTINCT", + COUNT_DISTINCTISH = "COUNT_DISTINCTISH", + SUM = "SUM", + MIN = "MIN", + MAX = "MAX", + AVG = "AVG", + STDDEV = "STDDEV", + QUANTILE = "QUANTILE", + TOLIST = "TOLIST", + TO_LIST = "TOLIST", + FIRST_VALUE = "FIRST_VALUE", + RANDOM_SAMPLE = "RANDOM_SAMPLE" +} +interface GroupByReducer { + type: T; + AS?: string; +} +type CountReducer = GroupByReducer; +interface CountDistinctReducer extends GroupByReducer { + property: PropertyName; +} +interface CountDistinctishReducer extends GroupByReducer { + property: PropertyName; +} +interface SumReducer extends GroupByReducer { + property: PropertyName; +} +interface MinReducer extends GroupByReducer { + property: PropertyName; +} +interface MaxReducer extends GroupByReducer { + property: PropertyName; +} +interface AvgReducer extends GroupByReducer { + property: PropertyName; +} +interface StdDevReducer extends GroupByReducer { + property: PropertyName; +} +interface QuantileReducer extends GroupByReducer { + property: PropertyName; + quantile: number; +} +interface ToListReducer extends GroupByReducer { + property: PropertyName; +} +interface FirstValueReducer extends GroupByReducer { + property: PropertyName; + BY?: PropertyName | { + property: PropertyName; + direction?: 'ASC' | 'DESC'; + }; +} +interface RandomSampleReducer extends GroupByReducer { + property: PropertyName; + sampleSize: number; +} +type GroupByReducers = CountReducer | CountDistinctReducer | CountDistinctishReducer | SumReducer | MinReducer | MaxReducer | AvgReducer | StdDevReducer | QuantileReducer | ToListReducer | FirstValueReducer | RandomSampleReducer; +interface GroupByStep extends AggregateStep { + properties?: PropertyName | Array; + REDUCE: GroupByReducers | Array; +} +interface SortStep extends AggregateStep { + BY: SortByProperty | Array; + MAX?: number; +} +interface ApplyStep extends AggregateStep { + expression: string; + AS: string; +} +interface LimitStep extends AggregateStep { + from: number; + size: number; +} +interface FilterStep extends AggregateStep { + expression: string; +} +type LoadField = PropertyName | { + identifier: PropertyName; + AS?: string; +}; +export interface AggregateOptions { + VERBATIM?: boolean; + ADDSCORES?: boolean; + LOAD?: LoadField | Array; + STEPS?: Array; + PARAMS?: Params; + DIALECT?: number; + TIMEOUT?: number; +} +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(index: string, query: string, options?: AggregateOptions): RedisCommandArguments; +export declare function pushAggregatehOptions(args: RedisCommandArguments, options?: AggregateOptions): RedisCommandArguments; +export type AggregateRawReply = [ + total: number, + ...results: Array> +]; +export interface AggregateReply { + total: number; + results: Array>; +} +export declare function transformReply(rawReply: AggregateRawReply): AggregateReply; +export {}; diff --git a/server/node_modules/@redis/search/dist/commands/AGGREGATE.js b/server/node_modules/@redis/search/dist/commands/AGGREGATE.js new file mode 100644 index 0000000..58d42b4 --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/AGGREGATE.js @@ -0,0 +1,170 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.pushAggregatehOptions = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = exports.AggregateGroupByReducers = exports.AggregateSteps = void 0; +const generic_transformers_1 = require("@redis/client/dist/lib/commands/generic-transformers"); +const _1 = require("."); +var AggregateSteps; +(function (AggregateSteps) { + AggregateSteps["GROUPBY"] = "GROUPBY"; + AggregateSteps["SORTBY"] = "SORTBY"; + AggregateSteps["APPLY"] = "APPLY"; + AggregateSteps["LIMIT"] = "LIMIT"; + AggregateSteps["FILTER"] = "FILTER"; +})(AggregateSteps || (exports.AggregateSteps = AggregateSteps = {})); +var AggregateGroupByReducers; +(function (AggregateGroupByReducers) { + AggregateGroupByReducers["COUNT"] = "COUNT"; + AggregateGroupByReducers["COUNT_DISTINCT"] = "COUNT_DISTINCT"; + AggregateGroupByReducers["COUNT_DISTINCTISH"] = "COUNT_DISTINCTISH"; + AggregateGroupByReducers["SUM"] = "SUM"; + AggregateGroupByReducers["MIN"] = "MIN"; + AggregateGroupByReducers["MAX"] = "MAX"; + AggregateGroupByReducers["AVG"] = "AVG"; + AggregateGroupByReducers["STDDEV"] = "STDDEV"; + AggregateGroupByReducers["QUANTILE"] = "QUANTILE"; + AggregateGroupByReducers["TOLIST"] = "TOLIST"; + AggregateGroupByReducers["TO_LIST"] = "TOLIST"; + AggregateGroupByReducers["FIRST_VALUE"] = "FIRST_VALUE"; + AggregateGroupByReducers["RANDOM_SAMPLE"] = "RANDOM_SAMPLE"; +})(AggregateGroupByReducers || (exports.AggregateGroupByReducers = AggregateGroupByReducers = {})); +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(index, query, options) { + return pushAggregatehOptions(['FT.AGGREGATE', index, query], options); +} +exports.transformArguments = transformArguments; +function pushAggregatehOptions(args, options) { + if (options?.VERBATIM) { + args.push('VERBATIM'); + } + if (options?.ADDSCORES) { + args.push('ADDSCORES'); + } + if (options?.LOAD) { + args.push('LOAD'); + (0, _1.pushArgumentsWithLength)(args, () => { + if (Array.isArray(options.LOAD)) { + for (const load of options.LOAD) { + pushLoadField(args, load); + } + } + else { + pushLoadField(args, options.LOAD); + } + }); + } + if (options?.STEPS) { + for (const step of options.STEPS) { + switch (step.type) { + case AggregateSteps.GROUPBY: + args.push('GROUPBY'); + if (!step.properties) { + args.push('0'); + } + else { + (0, generic_transformers_1.pushVerdictArgument)(args, step.properties); + } + if (Array.isArray(step.REDUCE)) { + for (const reducer of step.REDUCE) { + pushGroupByReducer(args, reducer); + } + } + else { + pushGroupByReducer(args, step.REDUCE); + } + break; + case AggregateSteps.SORTBY: + (0, _1.pushSortByArguments)(args, 'SORTBY', step.BY); + if (step.MAX) { + args.push('MAX', step.MAX.toString()); + } + break; + case AggregateSteps.APPLY: + args.push('APPLY', step.expression, 'AS', step.AS); + break; + case AggregateSteps.LIMIT: + args.push('LIMIT', step.from.toString(), step.size.toString()); + break; + case AggregateSteps.FILTER: + args.push('FILTER', step.expression); + break; + } + } + } + (0, _1.pushParamsArgs)(args, options?.PARAMS); + if (options?.DIALECT) { + args.push('DIALECT', options.DIALECT.toString()); + } + if (options?.TIMEOUT !== undefined) { + args.push('TIMEOUT', options.TIMEOUT.toString()); + } + return args; +} +exports.pushAggregatehOptions = pushAggregatehOptions; +function pushLoadField(args, toLoad) { + if (typeof toLoad === 'string') { + args.push(toLoad); + } + else { + args.push(toLoad.identifier); + if (toLoad.AS) { + args.push('AS', toLoad.AS); + } + } +} +function pushGroupByReducer(args, reducer) { + args.push('REDUCE', reducer.type); + switch (reducer.type) { + case AggregateGroupByReducers.COUNT: + args.push('0'); + break; + case AggregateGroupByReducers.COUNT_DISTINCT: + case AggregateGroupByReducers.COUNT_DISTINCTISH: + case AggregateGroupByReducers.SUM: + case AggregateGroupByReducers.MIN: + case AggregateGroupByReducers.MAX: + case AggregateGroupByReducers.AVG: + case AggregateGroupByReducers.STDDEV: + case AggregateGroupByReducers.TOLIST: + args.push('1', reducer.property); + break; + case AggregateGroupByReducers.QUANTILE: + args.push('2', reducer.property, reducer.quantile.toString()); + break; + case AggregateGroupByReducers.FIRST_VALUE: { + (0, _1.pushArgumentsWithLength)(args, () => { + args.push(reducer.property); + if (reducer.BY) { + args.push('BY'); + if (typeof reducer.BY === 'string') { + args.push(reducer.BY); + } + else { + args.push(reducer.BY.property); + if (reducer.BY.direction) { + args.push(reducer.BY.direction); + } + } + } + }); + break; + } + case AggregateGroupByReducers.RANDOM_SAMPLE: + args.push('2', reducer.property, reducer.sampleSize.toString()); + break; + } + if (reducer.AS) { + args.push('AS', reducer.AS); + } +} +function transformReply(rawReply) { + const results = []; + for (let i = 1; i < rawReply.length; i++) { + results.push((0, generic_transformers_1.transformTuplesReply)(rawReply[i])); + } + return { + total: rawReply[0], + results + }; +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/search/dist/commands/AGGREGATE_WITHCURSOR.d.ts b/server/node_modules/@redis/search/dist/commands/AGGREGATE_WITHCURSOR.d.ts new file mode 100644 index 0000000..5cd8461 --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/AGGREGATE_WITHCURSOR.d.ts @@ -0,0 +1,14 @@ +import { AggregateOptions, AggregateRawReply, AggregateReply } from './AGGREGATE'; +export { FIRST_KEY_INDEX, IS_READ_ONLY } from './AGGREGATE'; +interface AggregateWithCursorOptions extends AggregateOptions { + COUNT?: number; +} +export declare function transformArguments(index: string, query: string, options?: AggregateWithCursorOptions): import("@redis/client/dist/lib/commands").RedisCommandArguments; +type AggregateWithCursorRawReply = [ + result: AggregateRawReply, + cursor: number +]; +interface AggregateWithCursorReply extends AggregateReply { + cursor: number; +} +export declare function transformReply(reply: AggregateWithCursorRawReply): AggregateWithCursorReply; diff --git a/server/node_modules/@redis/search/dist/commands/AGGREGATE_WITHCURSOR.js b/server/node_modules/@redis/search/dist/commands/AGGREGATE_WITHCURSOR.js new file mode 100644 index 0000000..7c40c69 --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/AGGREGATE_WITHCURSOR.js @@ -0,0 +1,23 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const AGGREGATE_1 = require("./AGGREGATE"); +var AGGREGATE_2 = require("./AGGREGATE"); +Object.defineProperty(exports, "FIRST_KEY_INDEX", { enumerable: true, get: function () { return AGGREGATE_2.FIRST_KEY_INDEX; } }); +Object.defineProperty(exports, "IS_READ_ONLY", { enumerable: true, get: function () { return AGGREGATE_2.IS_READ_ONLY; } }); +function transformArguments(index, query, options) { + const args = (0, AGGREGATE_1.transformArguments)(index, query, options); + args.push('WITHCURSOR'); + if (options?.COUNT) { + args.push('COUNT', options.COUNT.toString()); + } + return args; +} +exports.transformArguments = transformArguments; +function transformReply(reply) { + return { + ...(0, AGGREGATE_1.transformReply)(reply[0]), + cursor: reply[1] + }; +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/search/dist/commands/ALIASADD.d.ts b/server/node_modules/@redis/search/dist/commands/ALIASADD.d.ts new file mode 100644 index 0000000..e3e7ab4 --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/ALIASADD.d.ts @@ -0,0 +1,2 @@ +export declare function transformArguments(name: string, index: string): Array; +export declare function transformReply(): 'OK'; diff --git a/server/node_modules/@redis/search/dist/commands/ALIASADD.js b/server/node_modules/@redis/search/dist/commands/ALIASADD.js new file mode 100644 index 0000000..f71c91e --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/ALIASADD.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments(name, index) { + return ['FT.ALIASADD', name, index]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/search/dist/commands/ALIASDEL.d.ts b/server/node_modules/@redis/search/dist/commands/ALIASDEL.d.ts new file mode 100644 index 0000000..e3e7ab4 --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/ALIASDEL.d.ts @@ -0,0 +1,2 @@ +export declare function transformArguments(name: string, index: string): Array; +export declare function transformReply(): 'OK'; diff --git a/server/node_modules/@redis/search/dist/commands/ALIASDEL.js b/server/node_modules/@redis/search/dist/commands/ALIASDEL.js new file mode 100644 index 0000000..f80ce4e --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/ALIASDEL.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments(name, index) { + return ['FT.ALIASDEL', name, index]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/search/dist/commands/ALIASUPDATE.d.ts b/server/node_modules/@redis/search/dist/commands/ALIASUPDATE.d.ts new file mode 100644 index 0000000..e3e7ab4 --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/ALIASUPDATE.d.ts @@ -0,0 +1,2 @@ +export declare function transformArguments(name: string, index: string): Array; +export declare function transformReply(): 'OK'; diff --git a/server/node_modules/@redis/search/dist/commands/ALIASUPDATE.js b/server/node_modules/@redis/search/dist/commands/ALIASUPDATE.js new file mode 100644 index 0000000..718d8f5 --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/ALIASUPDATE.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments(name, index) { + return ['FT.ALIASUPDATE', name, index]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/search/dist/commands/ALTER.d.ts b/server/node_modules/@redis/search/dist/commands/ALTER.d.ts new file mode 100644 index 0000000..1a6413c --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/ALTER.d.ts @@ -0,0 +1,3 @@ +import { RediSearchSchema } from '.'; +export declare function transformArguments(index: string, schema: RediSearchSchema): Array; +export declare function transformReply(): 'OK'; diff --git a/server/node_modules/@redis/search/dist/commands/ALTER.js b/server/node_modules/@redis/search/dist/commands/ALTER.js new file mode 100644 index 0000000..1f1971f --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/ALTER.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +const _1 = require("."); +function transformArguments(index, schema) { + const args = ['FT.ALTER', index, 'SCHEMA', 'ADD']; + (0, _1.pushSchema)(args, schema); + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/search/dist/commands/CONFIG_GET.d.ts b/server/node_modules/@redis/search/dist/commands/CONFIG_GET.d.ts new file mode 100644 index 0000000..de47f89 --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/CONFIG_GET.d.ts @@ -0,0 +1,6 @@ +export declare function transformArguments(option: string): string[]; +interface ConfigGetReply { + [option: string]: string | null; +} +export declare function transformReply(rawReply: Array<[string, string | null]>): ConfigGetReply; +export {}; diff --git a/server/node_modules/@redis/search/dist/commands/CONFIG_GET.js b/server/node_modules/@redis/search/dist/commands/CONFIG_GET.js new file mode 100644 index 0000000..58fb360 --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/CONFIG_GET.js @@ -0,0 +1,15 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = void 0; +function transformArguments(option) { + return ['FT.CONFIG', 'GET', option]; +} +exports.transformArguments = transformArguments; +function transformReply(rawReply) { + const transformedReply = Object.create(null); + for (const [key, value] of rawReply) { + transformedReply[key] = value; + } + return transformedReply; +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/search/dist/commands/CONFIG_SET.d.ts b/server/node_modules/@redis/search/dist/commands/CONFIG_SET.d.ts new file mode 100644 index 0000000..c354779 --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/CONFIG_SET.d.ts @@ -0,0 +1,2 @@ +export declare function transformArguments(option: string, value: string): Array; +export declare function transformReply(): 'OK'; diff --git a/server/node_modules/@redis/search/dist/commands/CONFIG_SET.js b/server/node_modules/@redis/search/dist/commands/CONFIG_SET.js new file mode 100644 index 0000000..c1b095f --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/CONFIG_SET.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments(option, value) { + return ['FT.CONFIG', 'SET', option, value]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/search/dist/commands/CREATE.d.ts b/server/node_modules/@redis/search/dist/commands/CREATE.d.ts new file mode 100644 index 0000000..a0da3a3 --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/CREATE.d.ts @@ -0,0 +1,21 @@ +import { RedisSearchLanguages, PropertyName, RediSearchSchema } from '.'; +interface CreateOptions { + ON?: 'HASH' | 'JSON'; + PREFIX?: string | Array; + FILTER?: string; + LANGUAGE?: RedisSearchLanguages; + LANGUAGE_FIELD?: PropertyName; + SCORE?: number; + SCORE_FIELD?: PropertyName; + MAXTEXTFIELDS?: true; + TEMPORARY?: number; + NOOFFSETS?: true; + NOHL?: true; + NOFIELDS?: true; + NOFREQS?: true; + SKIPINITIALSCAN?: true; + STOPWORDS?: string | Array; +} +export declare function transformArguments(index: string, schema: RediSearchSchema, options?: CreateOptions): Array; +export declare function transformReply(): 'OK'; +export {}; diff --git a/server/node_modules/@redis/search/dist/commands/CREATE.js b/server/node_modules/@redis/search/dist/commands/CREATE.js new file mode 100644 index 0000000..a8641d2 --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/CREATE.js @@ -0,0 +1,56 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +const generic_transformers_1 = require("@redis/client/dist/lib/commands/generic-transformers"); +const _1 = require("."); +function transformArguments(index, schema, options) { + const args = ['FT.CREATE', index]; + if (options?.ON) { + args.push('ON', options.ON); + } + (0, generic_transformers_1.pushOptionalVerdictArgument)(args, 'PREFIX', options?.PREFIX); + if (options?.FILTER) { + args.push('FILTER', options.FILTER); + } + if (options?.LANGUAGE) { + args.push('LANGUAGE', options.LANGUAGE); + } + if (options?.LANGUAGE_FIELD) { + args.push('LANGUAGE_FIELD', options.LANGUAGE_FIELD); + } + if (options?.SCORE) { + args.push('SCORE', options.SCORE.toString()); + } + if (options?.SCORE_FIELD) { + args.push('SCORE_FIELD', options.SCORE_FIELD); + } + // if (options?.PAYLOAD_FIELD) { + // args.push('PAYLOAD_FIELD', options.PAYLOAD_FIELD); + // } + if (options?.MAXTEXTFIELDS) { + args.push('MAXTEXTFIELDS'); + } + if (options?.TEMPORARY) { + args.push('TEMPORARY', options.TEMPORARY.toString()); + } + if (options?.NOOFFSETS) { + args.push('NOOFFSETS'); + } + if (options?.NOHL) { + args.push('NOHL'); + } + if (options?.NOFIELDS) { + args.push('NOFIELDS'); + } + if (options?.NOFREQS) { + args.push('NOFREQS'); + } + if (options?.SKIPINITIALSCAN) { + args.push('SKIPINITIALSCAN'); + } + (0, generic_transformers_1.pushOptionalVerdictArgument)(args, 'STOPWORDS', options?.STOPWORDS); + args.push('SCHEMA'); + (0, _1.pushSchema)(args, schema); + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/search/dist/commands/CURSOR_DEL.d.ts b/server/node_modules/@redis/search/dist/commands/CURSOR_DEL.d.ts new file mode 100644 index 0000000..1f12c3f --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/CURSOR_DEL.d.ts @@ -0,0 +1,4 @@ +import { RedisCommandArgument } from '@redis/client/dist/lib/commands'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(index: RedisCommandArgument, cursorId: number): RedisCommandArgument[]; +export declare function transformReply(): 'OK'; diff --git a/server/node_modules/@redis/search/dist/commands/CURSOR_DEL.js b/server/node_modules/@redis/search/dist/commands/CURSOR_DEL.js new file mode 100644 index 0000000..cbba23a --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/CURSOR_DEL.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(index, cursorId) { + return [ + 'FT.CURSOR', + 'DEL', + index, + cursorId.toString() + ]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/search/dist/commands/CURSOR_READ.d.ts b/server/node_modules/@redis/search/dist/commands/CURSOR_READ.d.ts new file mode 100644 index 0000000..7a186c0 --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/CURSOR_READ.d.ts @@ -0,0 +1,8 @@ +import { RedisCommandArgument, RedisCommandArguments } from '@redis/client/dist/lib/commands'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +interface CursorReadOptions { + COUNT?: number; +} +export declare function transformArguments(index: RedisCommandArgument, cursor: number, options?: CursorReadOptions): RedisCommandArguments; +export { transformReply } from './AGGREGATE_WITHCURSOR'; diff --git a/server/node_modules/@redis/search/dist/commands/CURSOR_READ.js b/server/node_modules/@redis/search/dist/commands/CURSOR_READ.js new file mode 100644 index 0000000..edcc14d --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/CURSOR_READ.js @@ -0,0 +1,20 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(index, cursor, options) { + const args = [ + 'FT.CURSOR', + 'READ', + index, + cursor.toString() + ]; + if (options?.COUNT) { + args.push('COUNT', options.COUNT.toString()); + } + return args; +} +exports.transformArguments = transformArguments; +var AGGREGATE_WITHCURSOR_1 = require("./AGGREGATE_WITHCURSOR"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return AGGREGATE_WITHCURSOR_1.transformReply; } }); diff --git a/server/node_modules/@redis/search/dist/commands/DICTADD.d.ts b/server/node_modules/@redis/search/dist/commands/DICTADD.d.ts new file mode 100644 index 0000000..c7f064d --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/DICTADD.d.ts @@ -0,0 +1,3 @@ +import { RedisCommandArguments } from '@redis/client/dist/lib/commands'; +export declare function transformArguments(dictionary: string, term: string | Array): RedisCommandArguments; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/search/dist/commands/DICTADD.js b/server/node_modules/@redis/search/dist/commands/DICTADD.js new file mode 100644 index 0000000..189a93f --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/DICTADD.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +const generic_transformers_1 = require("@redis/client/dist/lib/commands/generic-transformers"); +function transformArguments(dictionary, term) { + return (0, generic_transformers_1.pushVerdictArguments)(['FT.DICTADD', dictionary], term); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/search/dist/commands/DICTDEL.d.ts b/server/node_modules/@redis/search/dist/commands/DICTDEL.d.ts new file mode 100644 index 0000000..c7f064d --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/DICTDEL.d.ts @@ -0,0 +1,3 @@ +import { RedisCommandArguments } from '@redis/client/dist/lib/commands'; +export declare function transformArguments(dictionary: string, term: string | Array): RedisCommandArguments; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/search/dist/commands/DICTDEL.js b/server/node_modules/@redis/search/dist/commands/DICTDEL.js new file mode 100644 index 0000000..f4fbb26 --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/DICTDEL.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +const generic_transformers_1 = require("@redis/client/dist/lib/commands/generic-transformers"); +function transformArguments(dictionary, term) { + return (0, generic_transformers_1.pushVerdictArguments)(['FT.DICTDEL', dictionary], term); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/search/dist/commands/DICTDUMP.d.ts b/server/node_modules/@redis/search/dist/commands/DICTDUMP.d.ts new file mode 100644 index 0000000..3bf7808 --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/DICTDUMP.d.ts @@ -0,0 +1,2 @@ +export declare function transformArguments(dictionary: string): Array; +export declare function transformReply(): Array; diff --git a/server/node_modules/@redis/search/dist/commands/DICTDUMP.js b/server/node_modules/@redis/search/dist/commands/DICTDUMP.js new file mode 100644 index 0000000..e736b16 --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/DICTDUMP.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments(dictionary) { + return ['FT.DICTDUMP', dictionary]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/search/dist/commands/DROPINDEX.d.ts b/server/node_modules/@redis/search/dist/commands/DROPINDEX.d.ts new file mode 100644 index 0000000..e8ed7f3 --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/DROPINDEX.d.ts @@ -0,0 +1,6 @@ +interface DropIndexOptions { + DD?: true; +} +export declare function transformArguments(index: string, options?: DropIndexOptions): Array; +export declare function transformReply(): 'OK'; +export {}; diff --git a/server/node_modules/@redis/search/dist/commands/DROPINDEX.js b/server/node_modules/@redis/search/dist/commands/DROPINDEX.js new file mode 100644 index 0000000..f9fb4de --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/DROPINDEX.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments(index, options) { + const args = ['FT.DROPINDEX', index]; + if (options?.DD) { + args.push('DD'); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/search/dist/commands/EXPLAIN.d.ts b/server/node_modules/@redis/search/dist/commands/EXPLAIN.d.ts new file mode 100644 index 0000000..8bb7a3f --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/EXPLAIN.d.ts @@ -0,0 +1,9 @@ +import { Params } from "."; +export declare const IS_READ_ONLY = true; +interface ExplainOptions { + PARAMS?: Params; + DIALECT?: number; +} +export declare function transformArguments(index: string, query: string, options?: ExplainOptions): Array; +export declare function transformReply(): string; +export {}; diff --git a/server/node_modules/@redis/search/dist/commands/EXPLAIN.js b/server/node_modules/@redis/search/dist/commands/EXPLAIN.js new file mode 100644 index 0000000..a05b77e --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/EXPLAIN.js @@ -0,0 +1,14 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = void 0; +const _1 = require("."); +exports.IS_READ_ONLY = true; +function transformArguments(index, query, options) { + const args = ['FT.EXPLAIN', index, query]; + (0, _1.pushParamsArgs)(args, options?.PARAMS); + if (options?.DIALECT) { + args.push('DIALECT', options.DIALECT.toString()); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/search/dist/commands/EXPLAINCLI.d.ts b/server/node_modules/@redis/search/dist/commands/EXPLAINCLI.d.ts new file mode 100644 index 0000000..1eaddc9 --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/EXPLAINCLI.d.ts @@ -0,0 +1,3 @@ +export declare const IS_READ_ONLY = true; +export declare function transformArguments(index: string, query: string): Array; +export declare function transformReply(): Array; diff --git a/server/node_modules/@redis/search/dist/commands/EXPLAINCLI.js b/server/node_modules/@redis/search/dist/commands/EXPLAINCLI.js new file mode 100644 index 0000000..f802560 --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/EXPLAINCLI.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = void 0; +exports.IS_READ_ONLY = true; +function transformArguments(index, query) { + return ['FT.EXPLAINCLI', index, query]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/search/dist/commands/INFO.d.ts b/server/node_modules/@redis/search/dist/commands/INFO.d.ts new file mode 100644 index 0000000..7d5e8ef --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/INFO.d.ts @@ -0,0 +1,120 @@ +import { RedisCommandArgument } from '@redis/client/dist/lib/commands'; +export declare function transformArguments(index: string): Array; +type InfoRawReply = [ + 'index_name', + RedisCommandArgument, + 'index_options', + Array, + 'index_definition', + Array, + 'attributes', + Array>, + 'num_docs', + RedisCommandArgument, + 'max_doc_id', + RedisCommandArgument, + 'num_terms', + RedisCommandArgument, + 'num_records', + RedisCommandArgument, + 'inverted_sz_mb', + RedisCommandArgument, + 'vector_index_sz_mb', + RedisCommandArgument, + 'total_inverted_index_blocks', + RedisCommandArgument, + 'offset_vectors_sz_mb', + RedisCommandArgument, + 'doc_table_size_mb', + RedisCommandArgument, + 'sortable_values_size_mb', + RedisCommandArgument, + 'key_table_size_mb', + RedisCommandArgument, + 'records_per_doc_avg', + RedisCommandArgument, + 'bytes_per_record_avg', + RedisCommandArgument, + 'offsets_per_term_avg', + RedisCommandArgument, + 'offset_bits_per_record_avg', + RedisCommandArgument, + 'hash_indexing_failures', + RedisCommandArgument, + 'indexing', + RedisCommandArgument, + 'percent_indexed', + RedisCommandArgument, + 'gc_stats', + [ + 'bytes_collected', + RedisCommandArgument, + 'total_ms_run', + RedisCommandArgument, + 'total_cycles', + RedisCommandArgument, + 'average_cycle_time_ms', + RedisCommandArgument, + 'last_run_time_ms', + RedisCommandArgument, + 'gc_numeric_trees_missed', + RedisCommandArgument, + 'gc_blocks_denied', + RedisCommandArgument + ], + 'cursor_stats', + [ + 'global_idle', + number, + 'global_total', + number, + 'index_capacity', + number, + 'index_total', + number + ], + 'stopwords_list'?, + Array? +]; +interface InfoReply { + indexName: RedisCommandArgument; + indexOptions: Array; + indexDefinition: Record; + attributes: Array>; + numDocs: RedisCommandArgument; + maxDocId: RedisCommandArgument; + numTerms: RedisCommandArgument; + numRecords: RedisCommandArgument; + invertedSzMb: RedisCommandArgument; + vectorIndexSzMb: RedisCommandArgument; + totalInvertedIndexBlocks: RedisCommandArgument; + offsetVectorsSzMb: RedisCommandArgument; + docTableSizeMb: RedisCommandArgument; + sortableValuesSizeMb: RedisCommandArgument; + keyTableSizeMb: RedisCommandArgument; + recordsPerDocAvg: RedisCommandArgument; + bytesPerRecordAvg: RedisCommandArgument; + offsetsPerTermAvg: RedisCommandArgument; + offsetBitsPerRecordAvg: RedisCommandArgument; + hashIndexingFailures: RedisCommandArgument; + indexing: RedisCommandArgument; + percentIndexed: RedisCommandArgument; + gcStats: { + bytesCollected: RedisCommandArgument; + totalMsRun: RedisCommandArgument; + totalCycles: RedisCommandArgument; + averageCycleTimeMs: RedisCommandArgument; + lastRunTimeMs: RedisCommandArgument; + gcNumericTreesMissed: RedisCommandArgument; + gcBlocksDenied: RedisCommandArgument; + }; + cursorStats: { + globalIdle: number; + globalTotal: number; + indexCapacity: number; + idnexTotal: number; + }; + stopWords: Array | undefined; +} +export declare function transformReply(rawReply: InfoRawReply): InfoReply; +export {}; diff --git a/server/node_modules/@redis/search/dist/commands/INFO.js b/server/node_modules/@redis/search/dist/commands/INFO.js new file mode 100644 index 0000000..c09c9e3 --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/INFO.js @@ -0,0 +1,51 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = void 0; +const generic_transformers_1 = require("@redis/client/dist/lib/commands/generic-transformers"); +function transformArguments(index) { + return ['FT.INFO', index]; +} +exports.transformArguments = transformArguments; +function transformReply(rawReply) { + return { + indexName: rawReply[1], + indexOptions: rawReply[3], + indexDefinition: (0, generic_transformers_1.transformTuplesReply)(rawReply[5]), + attributes: rawReply[7].map(attribute => (0, generic_transformers_1.transformTuplesReply)(attribute)), + numDocs: rawReply[9], + maxDocId: rawReply[11], + numTerms: rawReply[13], + numRecords: rawReply[15], + invertedSzMb: rawReply[17], + vectorIndexSzMb: rawReply[19], + totalInvertedIndexBlocks: rawReply[21], + offsetVectorsSzMb: rawReply[23], + docTableSizeMb: rawReply[25], + sortableValuesSizeMb: rawReply[27], + keyTableSizeMb: rawReply[29], + recordsPerDocAvg: rawReply[31], + bytesPerRecordAvg: rawReply[33], + offsetsPerTermAvg: rawReply[35], + offsetBitsPerRecordAvg: rawReply[37], + hashIndexingFailures: rawReply[39], + indexing: rawReply[41], + percentIndexed: rawReply[43], + gcStats: { + bytesCollected: rawReply[45][1], + totalMsRun: rawReply[45][3], + totalCycles: rawReply[45][5], + averageCycleTimeMs: rawReply[45][7], + lastRunTimeMs: rawReply[45][9], + gcNumericTreesMissed: rawReply[45][11], + gcBlocksDenied: rawReply[45][13] + }, + cursorStats: { + globalIdle: rawReply[47][1], + globalTotal: rawReply[47][3], + indexCapacity: rawReply[47][5], + idnexTotal: rawReply[47][7] + }, + stopWords: rawReply[49] + }; +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/search/dist/commands/PROFILE_AGGREGATE.d.ts b/server/node_modules/@redis/search/dist/commands/PROFILE_AGGREGATE.d.ts new file mode 100644 index 0000000..f44d2aa --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/PROFILE_AGGREGATE.d.ts @@ -0,0 +1,7 @@ +import { AggregateOptions, AggregateRawReply } from './AGGREGATE'; +import { ProfileOptions, ProfileRawReply, ProfileReply } from '.'; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(index: string, query: string, options?: ProfileOptions & AggregateOptions): Array; +type ProfileAggeregateRawReply = ProfileRawReply; +export declare function transformReply(reply: ProfileAggeregateRawReply): ProfileReply; +export {}; diff --git a/server/node_modules/@redis/search/dist/commands/PROFILE_AGGREGATE.js b/server/node_modules/@redis/search/dist/commands/PROFILE_AGGREGATE.js new file mode 100644 index 0000000..0e16492 --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/PROFILE_AGGREGATE.js @@ -0,0 +1,23 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = void 0; +const AGGREGATE_1 = require("./AGGREGATE"); +const _1 = require("."); +exports.IS_READ_ONLY = true; +function transformArguments(index, query, options) { + const args = ['FT.PROFILE', index, 'AGGREGATE']; + if (options?.LIMITED) { + args.push('LIMITED'); + } + args.push('QUERY', query); + (0, AGGREGATE_1.pushAggregatehOptions)(args, options); + return args; +} +exports.transformArguments = transformArguments; +function transformReply(reply) { + return { + results: (0, AGGREGATE_1.transformReply)(reply[0]), + profile: (0, _1.transformProfile)(reply[1]) + }; +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/search/dist/commands/PROFILE_SEARCH.d.ts b/server/node_modules/@redis/search/dist/commands/PROFILE_SEARCH.d.ts new file mode 100644 index 0000000..bc160e3 --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/PROFILE_SEARCH.d.ts @@ -0,0 +1,8 @@ +import { SearchOptions, SearchRawReply } from './SEARCH'; +import { ProfileOptions, ProfileRawReply, ProfileReply } from '.'; +import { RedisCommandArguments } from '@redis/client/dist/lib/commands'; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(index: string, query: string, options?: ProfileOptions & SearchOptions): RedisCommandArguments; +type ProfileSearchRawReply = ProfileRawReply; +export declare function transformReply(reply: ProfileSearchRawReply, withoutDocuments: boolean): ProfileReply; +export {}; diff --git a/server/node_modules/@redis/search/dist/commands/PROFILE_SEARCH.js b/server/node_modules/@redis/search/dist/commands/PROFILE_SEARCH.js new file mode 100644 index 0000000..126d14c --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/PROFILE_SEARCH.js @@ -0,0 +1,22 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = void 0; +const SEARCH_1 = require("./SEARCH"); +const _1 = require("."); +exports.IS_READ_ONLY = true; +function transformArguments(index, query, options) { + let args = ['FT.PROFILE', index, 'SEARCH']; + if (options?.LIMITED) { + args.push('LIMITED'); + } + args.push('QUERY', query); + return (0, _1.pushSearchOptions)(args, options); +} +exports.transformArguments = transformArguments; +function transformReply(reply, withoutDocuments) { + return { + results: (0, SEARCH_1.transformReply)(reply[0], withoutDocuments), + profile: (0, _1.transformProfile)(reply[1]) + }; +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/search/dist/commands/SEARCH.d.ts b/server/node_modules/@redis/search/dist/commands/SEARCH.d.ts new file mode 100644 index 0000000..495695a --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/SEARCH.d.ts @@ -0,0 +1,41 @@ +import { RedisCommandArguments } from '@redis/client/dist/lib/commands'; +import { RedisSearchLanguages, Params, PropertyName, SortByProperty, SearchReply } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export interface SearchOptions { + VERBATIM?: true; + NOSTOPWORDS?: true; + WITHSORTKEYS?: true; + INKEYS?: string | Array; + INFIELDS?: string | Array; + RETURN?: string | Array; + SUMMARIZE?: true | { + FIELDS?: PropertyName | Array; + FRAGS?: number; + LEN?: number; + SEPARATOR?: string; + }; + HIGHLIGHT?: true | { + FIELDS?: PropertyName | Array; + TAGS?: { + open: string; + close: string; + }; + }; + SLOP?: number; + INORDER?: true; + LANGUAGE?: RedisSearchLanguages; + EXPANDER?: string; + SCORER?: string; + SORTBY?: SortByProperty; + LIMIT?: { + from: number | string; + size: number | string; + }; + PARAMS?: Params; + DIALECT?: number; + TIMEOUT?: number; +} +export declare function transformArguments(index: string, query: string, options?: SearchOptions): RedisCommandArguments; +export type SearchRawReply = Array; +export declare function transformReply(reply: SearchRawReply, withoutDocuments: boolean): SearchReply; diff --git a/server/node_modules/@redis/search/dist/commands/SEARCH.js b/server/node_modules/@redis/search/dist/commands/SEARCH.js new file mode 100644 index 0000000..a8ebf43 --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/SEARCH.js @@ -0,0 +1,43 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const _1 = require("."); +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(index, query, options) { + return (0, _1.pushSearchOptions)(['FT.SEARCH', index, query], options); +} +exports.transformArguments = transformArguments; +function transformReply(reply, withoutDocuments) { + const documents = []; + let i = 1; + while (i < reply.length) { + documents.push({ + id: reply[i++], + value: withoutDocuments ? Object.create(null) : documentValue(reply[i++]) + }); + } + return { + total: reply[0], + documents + }; +} +exports.transformReply = transformReply; +function documentValue(tuples) { + const message = Object.create(null); + let i = 0; + while (i < tuples.length) { + const key = tuples[i++], value = tuples[i++]; + if (key === '$') { // might be a JSON reply + try { + Object.assign(message, JSON.parse(value)); + continue; + } + catch { + // set as a regular property if not a valid JSON + } + } + message[key] = value; + } + return message; +} diff --git a/server/node_modules/@redis/search/dist/commands/SEARCH_NOCONTENT.d.ts b/server/node_modules/@redis/search/dist/commands/SEARCH_NOCONTENT.d.ts new file mode 100644 index 0000000..4018a80 --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/SEARCH_NOCONTENT.d.ts @@ -0,0 +1,10 @@ +import { RedisCommandArguments } from "@redis/client/dist/lib/commands"; +import { SearchOptions, SearchRawReply } from "./SEARCH"; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(index: string, query: string, options?: SearchOptions): RedisCommandArguments; +export interface SearchNoContentReply { + total: number; + documents: Array; +} +export declare function transformReply(reply: SearchRawReply): SearchNoContentReply; diff --git a/server/node_modules/@redis/search/dist/commands/SEARCH_NOCONTENT.js b/server/node_modules/@redis/search/dist/commands/SEARCH_NOCONTENT.js new file mode 100644 index 0000000..5d94cdd --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/SEARCH_NOCONTENT.js @@ -0,0 +1,18 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const _1 = require("."); +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(index, query, options) { + return (0, _1.pushSearchOptions)(['FT.SEARCH', index, query, 'NOCONTENT'], options); +} +exports.transformArguments = transformArguments; +; +function transformReply(reply) { + return { + total: reply[0], + documents: reply.slice(1) + }; +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/search/dist/commands/SPELLCHECK.d.ts b/server/node_modules/@redis/search/dist/commands/SPELLCHECK.d.ts new file mode 100644 index 0000000..f5bf946 --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/SPELLCHECK.d.ts @@ -0,0 +1,24 @@ +interface SpellCheckTerms { + mode: 'INCLUDE' | 'EXCLUDE'; + dictionary: string; +} +interface SpellCheckOptions { + DISTANCE?: number; + TERMS?: SpellCheckTerms | Array; + DIALECT?: number; +} +export declare function transformArguments(index: string, query: string, options?: SpellCheckOptions): Array; +type SpellCheckRawReply = Array<[ + _: string, + term: string, + suggestions: Array<[score: string, suggestion: string]> +]>; +type SpellCheckReply = Array<{ + term: string; + suggestions: Array<{ + score: number; + suggestion: string; + }>; +}>; +export declare function transformReply(rawReply: SpellCheckRawReply): SpellCheckReply; +export {}; diff --git a/server/node_modules/@redis/search/dist/commands/SPELLCHECK.js b/server/node_modules/@redis/search/dist/commands/SPELLCHECK.js new file mode 100644 index 0000000..96f71b8 --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/SPELLCHECK.js @@ -0,0 +1,37 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = void 0; +function transformArguments(index, query, options) { + const args = ['FT.SPELLCHECK', index, query]; + if (options?.DISTANCE) { + args.push('DISTANCE', options.DISTANCE.toString()); + } + if (options?.TERMS) { + if (Array.isArray(options.TERMS)) { + for (const term of options.TERMS) { + pushTerms(args, term); + } + } + else { + pushTerms(args, options.TERMS); + } + } + if (options?.DIALECT) { + args.push('DIALECT', options.DIALECT.toString()); + } + return args; +} +exports.transformArguments = transformArguments; +function pushTerms(args, { mode, dictionary }) { + args.push('TERMS', mode, dictionary); +} +function transformReply(rawReply) { + return rawReply.map(([, term, suggestions]) => ({ + term, + suggestions: suggestions.map(([score, suggestion]) => ({ + score: Number(score), + suggestion + })) + })); +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/search/dist/commands/SUGADD.d.ts b/server/node_modules/@redis/search/dist/commands/SUGADD.d.ts new file mode 100644 index 0000000..1bbae32 --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/SUGADD.d.ts @@ -0,0 +1,7 @@ +interface SugAddOptions { + INCR?: true; + PAYLOAD?: string; +} +export declare function transformArguments(key: string, string: string, score: number, options?: SugAddOptions): Array; +export declare function transformReply(): number; +export {}; diff --git a/server/node_modules/@redis/search/dist/commands/SUGADD.js b/server/node_modules/@redis/search/dist/commands/SUGADD.js new file mode 100644 index 0000000..d9bb8ed --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/SUGADD.js @@ -0,0 +1,14 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments(key, string, score, options) { + const args = ['FT.SUGADD', key, string, score.toString()]; + if (options?.INCR) { + args.push('INCR'); + } + if (options?.PAYLOAD) { + args.push('PAYLOAD', options.PAYLOAD); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/search/dist/commands/SUGDEL.d.ts b/server/node_modules/@redis/search/dist/commands/SUGDEL.d.ts new file mode 100644 index 0000000..8476ac2 --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/SUGDEL.d.ts @@ -0,0 +1,2 @@ +export declare function transformArguments(key: string, string: string): Array; +export { transformBooleanReply as transformReply } from '@redis/client/dist/lib/commands/generic-transformers'; diff --git a/server/node_modules/@redis/search/dist/commands/SUGDEL.js b/server/node_modules/@redis/search/dist/commands/SUGDEL.js new file mode 100644 index 0000000..d23e9a1 --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/SUGDEL.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = void 0; +function transformArguments(key, string) { + return ['FT.SUGDEL', key, string]; +} +exports.transformArguments = transformArguments; +var generic_transformers_1 = require("@redis/client/dist/lib/commands/generic-transformers"); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return generic_transformers_1.transformBooleanReply; } }); diff --git a/server/node_modules/@redis/search/dist/commands/SUGGET.d.ts b/server/node_modules/@redis/search/dist/commands/SUGGET.d.ts new file mode 100644 index 0000000..079cfc7 --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/SUGGET.d.ts @@ -0,0 +1,7 @@ +export declare const IS_READ_ONLY = true; +export interface SugGetOptions { + FUZZY?: true; + MAX?: number; +} +export declare function transformArguments(key: string, prefix: string, options?: SugGetOptions): Array; +export declare function transformReply(): null | Array; diff --git a/server/node_modules/@redis/search/dist/commands/SUGGET.js b/server/node_modules/@redis/search/dist/commands/SUGGET.js new file mode 100644 index 0000000..2190e4b --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/SUGGET.js @@ -0,0 +1,15 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = void 0; +exports.IS_READ_ONLY = true; +function transformArguments(key, prefix, options) { + const args = ['FT.SUGGET', key, prefix]; + if (options?.FUZZY) { + args.push('FUZZY'); + } + if (options?.MAX) { + args.push('MAX', options.MAX.toString()); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/search/dist/commands/SUGGET_WITHPAYLOADS.d.ts b/server/node_modules/@redis/search/dist/commands/SUGGET_WITHPAYLOADS.d.ts new file mode 100644 index 0000000..a8ff955 --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/SUGGET_WITHPAYLOADS.d.ts @@ -0,0 +1,8 @@ +import { SugGetOptions } from './SUGGET'; +export { IS_READ_ONLY } from './SUGGET'; +export declare function transformArguments(key: string, prefix: string, options?: SugGetOptions): Array; +export interface SuggestionWithPayload { + suggestion: string; + payload: string | null; +} +export declare function transformReply(rawReply: Array | null): Array | null; diff --git a/server/node_modules/@redis/search/dist/commands/SUGGET_WITHPAYLOADS.js b/server/node_modules/@redis/search/dist/commands/SUGGET_WITHPAYLOADS.js new file mode 100644 index 0000000..c091b30 --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/SUGGET_WITHPAYLOADS.js @@ -0,0 +1,26 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = void 0; +const SUGGET_1 = require("./SUGGET"); +var SUGGET_2 = require("./SUGGET"); +Object.defineProperty(exports, "IS_READ_ONLY", { enumerable: true, get: function () { return SUGGET_2.IS_READ_ONLY; } }); +function transformArguments(key, prefix, options) { + return [ + ...(0, SUGGET_1.transformArguments)(key, prefix, options), + 'WITHPAYLOADS' + ]; +} +exports.transformArguments = transformArguments; +function transformReply(rawReply) { + if (rawReply === null) + return null; + const transformedReply = []; + for (let i = 0; i < rawReply.length; i += 2) { + transformedReply.push({ + suggestion: rawReply[i], + payload: rawReply[i + 1] + }); + } + return transformedReply; +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/search/dist/commands/SUGGET_WITHSCORES.d.ts b/server/node_modules/@redis/search/dist/commands/SUGGET_WITHSCORES.d.ts new file mode 100644 index 0000000..2d42b68 --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/SUGGET_WITHSCORES.d.ts @@ -0,0 +1,8 @@ +import { SugGetOptions } from './SUGGET'; +export { IS_READ_ONLY } from './SUGGET'; +export declare function transformArguments(key: string, prefix: string, options?: SugGetOptions): Array; +export interface SuggestionWithScores { + suggestion: string; + score: number; +} +export declare function transformReply(rawReply: Array | null): Array | null; diff --git a/server/node_modules/@redis/search/dist/commands/SUGGET_WITHSCORES.js b/server/node_modules/@redis/search/dist/commands/SUGGET_WITHSCORES.js new file mode 100644 index 0000000..5147cb1 --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/SUGGET_WITHSCORES.js @@ -0,0 +1,26 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = void 0; +const SUGGET_1 = require("./SUGGET"); +var SUGGET_2 = require("./SUGGET"); +Object.defineProperty(exports, "IS_READ_ONLY", { enumerable: true, get: function () { return SUGGET_2.IS_READ_ONLY; } }); +function transformArguments(key, prefix, options) { + return [ + ...(0, SUGGET_1.transformArguments)(key, prefix, options), + 'WITHSCORES' + ]; +} +exports.transformArguments = transformArguments; +function transformReply(rawReply) { + if (rawReply === null) + return null; + const transformedReply = []; + for (let i = 0; i < rawReply.length; i += 2) { + transformedReply.push({ + suggestion: rawReply[i], + score: Number(rawReply[i + 1]) + }); + } + return transformedReply; +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/search/dist/commands/SUGGET_WITHSCORES_WITHPAYLOADS.d.ts b/server/node_modules/@redis/search/dist/commands/SUGGET_WITHSCORES_WITHPAYLOADS.d.ts new file mode 100644 index 0000000..0c53891 --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/SUGGET_WITHSCORES_WITHPAYLOADS.d.ts @@ -0,0 +1,7 @@ +import { SugGetOptions } from './SUGGET'; +import { SuggestionWithPayload } from './SUGGET_WITHPAYLOADS'; +import { SuggestionWithScores } from './SUGGET_WITHSCORES'; +export { IS_READ_ONLY } from './SUGGET'; +export declare function transformArguments(key: string, prefix: string, options?: SugGetOptions): Array; +type SuggestionWithScoresAndPayloads = SuggestionWithScores & SuggestionWithPayload; +export declare function transformReply(rawReply: Array | null): Array | null; diff --git a/server/node_modules/@redis/search/dist/commands/SUGGET_WITHSCORES_WITHPAYLOADS.js b/server/node_modules/@redis/search/dist/commands/SUGGET_WITHSCORES_WITHPAYLOADS.js new file mode 100644 index 0000000..fa5d83a --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/SUGGET_WITHSCORES_WITHPAYLOADS.js @@ -0,0 +1,28 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = void 0; +const SUGGET_1 = require("./SUGGET"); +var SUGGET_2 = require("./SUGGET"); +Object.defineProperty(exports, "IS_READ_ONLY", { enumerable: true, get: function () { return SUGGET_2.IS_READ_ONLY; } }); +function transformArguments(key, prefix, options) { + return [ + ...(0, SUGGET_1.transformArguments)(key, prefix, options), + 'WITHSCORES', + 'WITHPAYLOADS' + ]; +} +exports.transformArguments = transformArguments; +function transformReply(rawReply) { + if (rawReply === null) + return null; + const transformedReply = []; + for (let i = 0; i < rawReply.length; i += 3) { + transformedReply.push({ + suggestion: rawReply[i], + score: Number(rawReply[i + 1]), + payload: rawReply[i + 2] + }); + } + return transformedReply; +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/search/dist/commands/SUGLEN.d.ts b/server/node_modules/@redis/search/dist/commands/SUGLEN.d.ts new file mode 100644 index 0000000..b0c7168 --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/SUGLEN.d.ts @@ -0,0 +1,3 @@ +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: string): Array; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/search/dist/commands/SUGLEN.js b/server/node_modules/@redis/search/dist/commands/SUGLEN.js new file mode 100644 index 0000000..3681839 --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/SUGLEN.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = void 0; +exports.IS_READ_ONLY = true; +function transformArguments(key) { + return ['FT.SUGLEN', key]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/search/dist/commands/SYNDUMP.d.ts b/server/node_modules/@redis/search/dist/commands/SYNDUMP.d.ts new file mode 100644 index 0000000..3bade6c --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/SYNDUMP.d.ts @@ -0,0 +1,2 @@ +export declare function transformArguments(index: string): Array; +export declare function transformReply(): Array; diff --git a/server/node_modules/@redis/search/dist/commands/SYNDUMP.js b/server/node_modules/@redis/search/dist/commands/SYNDUMP.js new file mode 100644 index 0000000..b7c153e --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/SYNDUMP.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments(index) { + return ['FT.SYNDUMP', index]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/search/dist/commands/SYNUPDATE.d.ts b/server/node_modules/@redis/search/dist/commands/SYNUPDATE.d.ts new file mode 100644 index 0000000..2a1c21f --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/SYNUPDATE.d.ts @@ -0,0 +1,7 @@ +import { RedisCommandArguments } from '@redis/client/dist/lib/commands'; +interface SynUpdateOptions { + SKIPINITIALSCAN?: true; +} +export declare function transformArguments(index: string, groupId: string, terms: string | Array, options?: SynUpdateOptions): RedisCommandArguments; +export declare function transformReply(): 'OK'; +export {}; diff --git a/server/node_modules/@redis/search/dist/commands/SYNUPDATE.js b/server/node_modules/@redis/search/dist/commands/SYNUPDATE.js new file mode 100644 index 0000000..b6498cc --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/SYNUPDATE.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +const generic_transformers_1 = require("@redis/client/dist/lib/commands/generic-transformers"); +function transformArguments(index, groupId, terms, options) { + const args = ['FT.SYNUPDATE', index, groupId]; + if (options?.SKIPINITIALSCAN) { + args.push('SKIPINITIALSCAN'); + } + return (0, generic_transformers_1.pushVerdictArguments)(args, terms); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/search/dist/commands/TAGVALS.d.ts b/server/node_modules/@redis/search/dist/commands/TAGVALS.d.ts new file mode 100644 index 0000000..dff3e30 --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/TAGVALS.d.ts @@ -0,0 +1,2 @@ +export declare function transformArguments(index: string, fieldName: string): Array; +export declare function transformReply(): Array; diff --git a/server/node_modules/@redis/search/dist/commands/TAGVALS.js b/server/node_modules/@redis/search/dist/commands/TAGVALS.js new file mode 100644 index 0000000..84fc416 --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/TAGVALS.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments(index, fieldName) { + return ['FT.TAGVALS', index, fieldName]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/search/dist/commands/_LIST.d.ts b/server/node_modules/@redis/search/dist/commands/_LIST.d.ts new file mode 100644 index 0000000..db92074 --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/_LIST.d.ts @@ -0,0 +1,2 @@ +export declare function transformArguments(): Array; +export declare function transformReply(): Array; diff --git a/server/node_modules/@redis/search/dist/commands/_LIST.js b/server/node_modules/@redis/search/dist/commands/_LIST.js new file mode 100644 index 0000000..c255557 --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/_LIST.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = void 0; +function transformArguments() { + return ['FT._LIST']; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/search/dist/commands/index.d.ts b/server/node_modules/@redis/search/dist/commands/index.d.ts new file mode 100644 index 0000000..ce41a97 --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/index.d.ts @@ -0,0 +1,267 @@ +import * as _LIST from './_LIST'; +import * as ALTER from './ALTER'; +import * as AGGREGATE_WITHCURSOR from './AGGREGATE_WITHCURSOR'; +import * as AGGREGATE from './AGGREGATE'; +import * as ALIASADD from './ALIASADD'; +import * as ALIASDEL from './ALIASDEL'; +import * as ALIASUPDATE from './ALIASUPDATE'; +import * as CONFIG_GET from './CONFIG_GET'; +import * as CONFIG_SET from './CONFIG_SET'; +import * as CREATE from './CREATE'; +import * as CURSOR_DEL from './CURSOR_DEL'; +import * as CURSOR_READ from './CURSOR_READ'; +import * as DICTADD from './DICTADD'; +import * as DICTDEL from './DICTDEL'; +import * as DICTDUMP from './DICTDUMP'; +import * as DROPINDEX from './DROPINDEX'; +import * as EXPLAIN from './EXPLAIN'; +import * as EXPLAINCLI from './EXPLAINCLI'; +import * as INFO from './INFO'; +import * as PROFILESEARCH from './PROFILE_SEARCH'; +import * as PROFILEAGGREGATE from './PROFILE_AGGREGATE'; +import * as SEARCH from './SEARCH'; +import * as SEARCH_NOCONTENT from './SEARCH_NOCONTENT'; +import * as SPELLCHECK from './SPELLCHECK'; +import * as SUGADD from './SUGADD'; +import * as SUGDEL from './SUGDEL'; +import * as SUGGET_WITHPAYLOADS from './SUGGET_WITHPAYLOADS'; +import * as SUGGET_WITHSCORES_WITHPAYLOADS from './SUGGET_WITHSCORES_WITHPAYLOADS'; +import * as SUGGET_WITHSCORES from './SUGGET_WITHSCORES'; +import * as SUGGET from './SUGGET'; +import * as SUGLEN from './SUGLEN'; +import * as SYNDUMP from './SYNDUMP'; +import * as SYNUPDATE from './SYNUPDATE'; +import * as TAGVALS from './TAGVALS'; +import { RedisCommandArgument, RedisCommandArguments } from '@redis/client/dist/lib/commands'; +import { SearchOptions } from './SEARCH'; +declare const _default: { + _LIST: typeof _LIST; + _list: typeof _LIST; + ALTER: typeof ALTER; + alter: typeof ALTER; + AGGREGATE_WITHCURSOR: typeof AGGREGATE_WITHCURSOR; + aggregateWithCursor: typeof AGGREGATE_WITHCURSOR; + AGGREGATE: typeof AGGREGATE; + aggregate: typeof AGGREGATE; + ALIASADD: typeof ALIASADD; + aliasAdd: typeof ALIASADD; + ALIASDEL: typeof ALIASDEL; + aliasDel: typeof ALIASDEL; + ALIASUPDATE: typeof ALIASUPDATE; + aliasUpdate: typeof ALIASUPDATE; + CONFIG_GET: typeof CONFIG_GET; + configGet: typeof CONFIG_GET; + CONFIG_SET: typeof CONFIG_SET; + configSet: typeof CONFIG_SET; + CREATE: typeof CREATE; + create: typeof CREATE; + CURSOR_DEL: typeof CURSOR_DEL; + cursorDel: typeof CURSOR_DEL; + CURSOR_READ: typeof CURSOR_READ; + cursorRead: typeof CURSOR_READ; + DICTADD: typeof DICTADD; + dictAdd: typeof DICTADD; + DICTDEL: typeof DICTDEL; + dictDel: typeof DICTDEL; + DICTDUMP: typeof DICTDUMP; + dictDump: typeof DICTDUMP; + DROPINDEX: typeof DROPINDEX; + dropIndex: typeof DROPINDEX; + EXPLAIN: typeof EXPLAIN; + explain: typeof EXPLAIN; + EXPLAINCLI: typeof EXPLAINCLI; + explainCli: typeof EXPLAINCLI; + INFO: typeof INFO; + info: typeof INFO; + PROFILESEARCH: typeof PROFILESEARCH; + profileSearch: typeof PROFILESEARCH; + PROFILEAGGREGATE: typeof PROFILEAGGREGATE; + profileAggregate: typeof PROFILEAGGREGATE; + SEARCH: typeof SEARCH; + search: typeof SEARCH; + SEARCH_NOCONTENT: typeof SEARCH_NOCONTENT; + searchNoContent: typeof SEARCH_NOCONTENT; + SPELLCHECK: typeof SPELLCHECK; + spellCheck: typeof SPELLCHECK; + SUGADD: typeof SUGADD; + sugAdd: typeof SUGADD; + SUGDEL: typeof SUGDEL; + sugDel: typeof SUGDEL; + SUGGET_WITHPAYLOADS: typeof SUGGET_WITHPAYLOADS; + sugGetWithPayloads: typeof SUGGET_WITHPAYLOADS; + SUGGET_WITHSCORES_WITHPAYLOADS: typeof SUGGET_WITHSCORES_WITHPAYLOADS; + sugGetWithScoresWithPayloads: typeof SUGGET_WITHSCORES_WITHPAYLOADS; + SUGGET_WITHSCORES: typeof SUGGET_WITHSCORES; + sugGetWithScores: typeof SUGGET_WITHSCORES; + SUGGET: typeof SUGGET; + sugGet: typeof SUGGET; + SUGLEN: typeof SUGLEN; + sugLen: typeof SUGLEN; + SYNDUMP: typeof SYNDUMP; + synDump: typeof SYNDUMP; + SYNUPDATE: typeof SYNUPDATE; + synUpdate: typeof SYNUPDATE; + TAGVALS: typeof TAGVALS; + tagVals: typeof TAGVALS; +}; +export default _default; +export declare enum RedisSearchLanguages { + ARABIC = "Arabic", + BASQUE = "Basque", + CATALANA = "Catalan", + DANISH = "Danish", + DUTCH = "Dutch", + ENGLISH = "English", + FINNISH = "Finnish", + FRENCH = "French", + GERMAN = "German", + GREEK = "Greek", + HUNGARIAN = "Hungarian", + INDONESAIN = "Indonesian", + IRISH = "Irish", + ITALIAN = "Italian", + LITHUANIAN = "Lithuanian", + NEPALI = "Nepali", + NORWEIGAN = "Norwegian", + PORTUGUESE = "Portuguese", + ROMANIAN = "Romanian", + RUSSIAN = "Russian", + SPANISH = "Spanish", + SWEDISH = "Swedish", + TAMIL = "Tamil", + TURKISH = "Turkish", + CHINESE = "Chinese" +} +export type PropertyName = `${'@' | '$.'}${string}`; +export type SortByProperty = string | { + BY: string; + DIRECTION?: 'ASC' | 'DESC'; +}; +export declare function pushSortByProperty(args: RedisCommandArguments, sortBy: SortByProperty): void; +export declare function pushSortByArguments(args: RedisCommandArguments, name: string, sortBy: SortByProperty | Array): RedisCommandArguments; +export declare function pushArgumentsWithLength(args: RedisCommandArguments, fn: (args: RedisCommandArguments) => void): RedisCommandArguments; +export declare enum SchemaFieldTypes { + TEXT = "TEXT", + NUMERIC = "NUMERIC", + GEO = "GEO", + TAG = "TAG", + VECTOR = "VECTOR", + GEOSHAPE = "GEOSHAPE" +} +type CreateSchemaField> = T | ({ + type: T; + AS?: string; + INDEXMISSING?: boolean; +} & E); +type CommonFieldArguments = { + SORTABLE?: boolean | 'UNF'; + NOINDEX?: boolean; +}; +type CreateSchemaCommonField> = CreateSchemaField; +export declare enum SchemaTextFieldPhonetics { + DM_EN = "dm:en", + DM_FR = "dm:fr", + FM_PT = "dm:pt", + DM_ES = "dm:es" +} +type CreateSchemaTextField = CreateSchemaCommonField; +type CreateSchemaNumericField = CreateSchemaCommonField; +type CreateSchemaGeoField = CreateSchemaCommonField; +type CreateSchemaTagField = CreateSchemaCommonField; +export declare enum VectorAlgorithms { + FLAT = "FLAT", + HNSW = "HNSW" +} +type CreateSchemaVectorField> = CreateSchemaField; +type CreateSchemaFlatVectorField = CreateSchemaVectorField; +type CreateSchemaHNSWVectorField = CreateSchemaVectorField; +export declare const SCHEMA_GEO_SHAPE_COORD_SYSTEM: { + readonly SPHERICAL: "SPHERICAL"; + readonly FLAT: "FLAT"; +}; +export type SchemaGeoShapeFieldCoordSystem = typeof SCHEMA_GEO_SHAPE_COORD_SYSTEM[keyof typeof SCHEMA_GEO_SHAPE_COORD_SYSTEM]; +type CreateSchemaGeoShapeField = CreateSchemaCommonField; +export interface RediSearchSchema { + [field: string]: CreateSchemaTextField | CreateSchemaNumericField | CreateSchemaGeoField | CreateSchemaTagField | CreateSchemaFlatVectorField | CreateSchemaHNSWVectorField | CreateSchemaGeoShapeField; +} +export declare function pushSchema(args: RedisCommandArguments, schema: RediSearchSchema): void; +export type Params = Record; +export declare function pushParamsArgs(args: RedisCommandArguments, params?: Params): RedisCommandArguments; +export declare function pushSearchOptions(args: RedisCommandArguments, options?: SearchOptions): RedisCommandArguments; +interface SearchDocumentValue { + [key: string]: string | number | null | Array | SearchDocumentValue; +} +export interface SearchReply { + total: number; + documents: Array<{ + id: string; + value: SearchDocumentValue; + }>; +} +export interface ProfileOptions { + LIMITED?: true; +} +export type ProfileRawReply = [ + results: T, + profile: [ + _: string, + TotalProfileTime: string, + _: string, + ParsingTime: string, + _: string, + PipelineCreationTime: string, + _: string, + IteratorsProfile: Array + ] +]; +export interface ProfileReply { + results: SearchReply | AGGREGATE.AggregateReply; + profile: ProfileData; +} +interface ChildIterator { + type?: string; + counter?: number; + term?: string; + size?: number; + time?: string; + childIterators?: Array; +} +interface IteratorsProfile { + type?: string; + counter?: number; + queryType?: string; + time?: string; + childIterators?: Array; +} +interface ProfileData { + totalProfileTime: string; + parsingTime: string; + pipelineCreationTime: string; + iteratorsProfile: IteratorsProfile; +} +export declare function transformProfile(reply: Array): ProfileData; diff --git a/server/node_modules/@redis/search/dist/commands/index.js b/server/node_modules/@redis/search/dist/commands/index.js new file mode 100644 index 0000000..f2467e0 --- /dev/null +++ b/server/node_modules/@redis/search/dist/commands/index.js @@ -0,0 +1,458 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformProfile = exports.pushSearchOptions = exports.pushParamsArgs = exports.pushSchema = exports.SCHEMA_GEO_SHAPE_COORD_SYSTEM = exports.VectorAlgorithms = exports.SchemaTextFieldPhonetics = exports.SchemaFieldTypes = exports.pushArgumentsWithLength = exports.pushSortByArguments = exports.pushSortByProperty = exports.RedisSearchLanguages = void 0; +const _LIST = require("./_LIST"); +const ALTER = require("./ALTER"); +const AGGREGATE_WITHCURSOR = require("./AGGREGATE_WITHCURSOR"); +const AGGREGATE = require("./AGGREGATE"); +const ALIASADD = require("./ALIASADD"); +const ALIASDEL = require("./ALIASDEL"); +const ALIASUPDATE = require("./ALIASUPDATE"); +const CONFIG_GET = require("./CONFIG_GET"); +const CONFIG_SET = require("./CONFIG_SET"); +const CREATE = require("./CREATE"); +const CURSOR_DEL = require("./CURSOR_DEL"); +const CURSOR_READ = require("./CURSOR_READ"); +const DICTADD = require("./DICTADD"); +const DICTDEL = require("./DICTDEL"); +const DICTDUMP = require("./DICTDUMP"); +const DROPINDEX = require("./DROPINDEX"); +const EXPLAIN = require("./EXPLAIN"); +const EXPLAINCLI = require("./EXPLAINCLI"); +const INFO = require("./INFO"); +const PROFILESEARCH = require("./PROFILE_SEARCH"); +const PROFILEAGGREGATE = require("./PROFILE_AGGREGATE"); +const SEARCH = require("./SEARCH"); +const SEARCH_NOCONTENT = require("./SEARCH_NOCONTENT"); +const SPELLCHECK = require("./SPELLCHECK"); +const SUGADD = require("./SUGADD"); +const SUGDEL = require("./SUGDEL"); +const SUGGET_WITHPAYLOADS = require("./SUGGET_WITHPAYLOADS"); +const SUGGET_WITHSCORES_WITHPAYLOADS = require("./SUGGET_WITHSCORES_WITHPAYLOADS"); +const SUGGET_WITHSCORES = require("./SUGGET_WITHSCORES"); +const SUGGET = require("./SUGGET"); +const SUGLEN = require("./SUGLEN"); +const SYNDUMP = require("./SYNDUMP"); +const SYNUPDATE = require("./SYNUPDATE"); +const TAGVALS = require("./TAGVALS"); +const generic_transformers_1 = require("@redis/client/dist/lib/commands/generic-transformers"); +exports.default = { + _LIST, + _list: _LIST, + ALTER, + alter: ALTER, + AGGREGATE_WITHCURSOR, + aggregateWithCursor: AGGREGATE_WITHCURSOR, + AGGREGATE, + aggregate: AGGREGATE, + ALIASADD, + aliasAdd: ALIASADD, + ALIASDEL, + aliasDel: ALIASDEL, + ALIASUPDATE, + aliasUpdate: ALIASUPDATE, + CONFIG_GET, + configGet: CONFIG_GET, + CONFIG_SET, + configSet: CONFIG_SET, + CREATE, + create: CREATE, + CURSOR_DEL, + cursorDel: CURSOR_DEL, + CURSOR_READ, + cursorRead: CURSOR_READ, + DICTADD, + dictAdd: DICTADD, + DICTDEL, + dictDel: DICTDEL, + DICTDUMP, + dictDump: DICTDUMP, + DROPINDEX, + dropIndex: DROPINDEX, + EXPLAIN, + explain: EXPLAIN, + EXPLAINCLI, + explainCli: EXPLAINCLI, + INFO, + info: INFO, + PROFILESEARCH, + profileSearch: PROFILESEARCH, + PROFILEAGGREGATE, + profileAggregate: PROFILEAGGREGATE, + SEARCH, + search: SEARCH, + SEARCH_NOCONTENT, + searchNoContent: SEARCH_NOCONTENT, + SPELLCHECK, + spellCheck: SPELLCHECK, + SUGADD, + sugAdd: SUGADD, + SUGDEL, + sugDel: SUGDEL, + SUGGET_WITHPAYLOADS, + sugGetWithPayloads: SUGGET_WITHPAYLOADS, + SUGGET_WITHSCORES_WITHPAYLOADS, + sugGetWithScoresWithPayloads: SUGGET_WITHSCORES_WITHPAYLOADS, + SUGGET_WITHSCORES, + sugGetWithScores: SUGGET_WITHSCORES, + SUGGET, + sugGet: SUGGET, + SUGLEN, + sugLen: SUGLEN, + SYNDUMP, + synDump: SYNDUMP, + SYNUPDATE, + synUpdate: SYNUPDATE, + TAGVALS, + tagVals: TAGVALS +}; +var RedisSearchLanguages; +(function (RedisSearchLanguages) { + RedisSearchLanguages["ARABIC"] = "Arabic"; + RedisSearchLanguages["BASQUE"] = "Basque"; + RedisSearchLanguages["CATALANA"] = "Catalan"; + RedisSearchLanguages["DANISH"] = "Danish"; + RedisSearchLanguages["DUTCH"] = "Dutch"; + RedisSearchLanguages["ENGLISH"] = "English"; + RedisSearchLanguages["FINNISH"] = "Finnish"; + RedisSearchLanguages["FRENCH"] = "French"; + RedisSearchLanguages["GERMAN"] = "German"; + RedisSearchLanguages["GREEK"] = "Greek"; + RedisSearchLanguages["HUNGARIAN"] = "Hungarian"; + RedisSearchLanguages["INDONESAIN"] = "Indonesian"; + RedisSearchLanguages["IRISH"] = "Irish"; + RedisSearchLanguages["ITALIAN"] = "Italian"; + RedisSearchLanguages["LITHUANIAN"] = "Lithuanian"; + RedisSearchLanguages["NEPALI"] = "Nepali"; + RedisSearchLanguages["NORWEIGAN"] = "Norwegian"; + RedisSearchLanguages["PORTUGUESE"] = "Portuguese"; + RedisSearchLanguages["ROMANIAN"] = "Romanian"; + RedisSearchLanguages["RUSSIAN"] = "Russian"; + RedisSearchLanguages["SPANISH"] = "Spanish"; + RedisSearchLanguages["SWEDISH"] = "Swedish"; + RedisSearchLanguages["TAMIL"] = "Tamil"; + RedisSearchLanguages["TURKISH"] = "Turkish"; + RedisSearchLanguages["CHINESE"] = "Chinese"; +})(RedisSearchLanguages || (exports.RedisSearchLanguages = RedisSearchLanguages = {})); +function pushSortByProperty(args, sortBy) { + if (typeof sortBy === 'string') { + args.push(sortBy); + } + else { + args.push(sortBy.BY); + if (sortBy.DIRECTION) { + args.push(sortBy.DIRECTION); + } + } +} +exports.pushSortByProperty = pushSortByProperty; +function pushSortByArguments(args, name, sortBy) { + const lengthBefore = args.push(name, '' // will be overwritten + ); + if (Array.isArray(sortBy)) { + for (const field of sortBy) { + pushSortByProperty(args, field); + } + } + else { + pushSortByProperty(args, sortBy); + } + args[lengthBefore - 1] = (args.length - lengthBefore).toString(); + return args; +} +exports.pushSortByArguments = pushSortByArguments; +function pushArgumentsWithLength(args, fn) { + const lengthIndex = args.push('') - 1; + fn(args); + args[lengthIndex] = (args.length - lengthIndex - 1).toString(); + return args; +} +exports.pushArgumentsWithLength = pushArgumentsWithLength; +var SchemaFieldTypes; +(function (SchemaFieldTypes) { + SchemaFieldTypes["TEXT"] = "TEXT"; + SchemaFieldTypes["NUMERIC"] = "NUMERIC"; + SchemaFieldTypes["GEO"] = "GEO"; + SchemaFieldTypes["TAG"] = "TAG"; + SchemaFieldTypes["VECTOR"] = "VECTOR"; + SchemaFieldTypes["GEOSHAPE"] = "GEOSHAPE"; +})(SchemaFieldTypes || (exports.SchemaFieldTypes = SchemaFieldTypes = {})); +function pushCommonFieldArguments(args, fieldOptions) { + if (fieldOptions.SORTABLE) { + args.push('SORTABLE'); + if (fieldOptions.SORTABLE === 'UNF') { + args.push('UNF'); + } + } + if (fieldOptions.NOINDEX) { + args.push('NOINDEX'); + } +} +var SchemaTextFieldPhonetics; +(function (SchemaTextFieldPhonetics) { + SchemaTextFieldPhonetics["DM_EN"] = "dm:en"; + SchemaTextFieldPhonetics["DM_FR"] = "dm:fr"; + SchemaTextFieldPhonetics["FM_PT"] = "dm:pt"; + SchemaTextFieldPhonetics["DM_ES"] = "dm:es"; +})(SchemaTextFieldPhonetics || (exports.SchemaTextFieldPhonetics = SchemaTextFieldPhonetics = {})); +var VectorAlgorithms; +(function (VectorAlgorithms) { + VectorAlgorithms["FLAT"] = "FLAT"; + VectorAlgorithms["HNSW"] = "HNSW"; +})(VectorAlgorithms || (exports.VectorAlgorithms = VectorAlgorithms = {})); +exports.SCHEMA_GEO_SHAPE_COORD_SYSTEM = { + SPHERICAL: 'SPHERICAL', + FLAT: 'FLAT' +}; +function pushSchema(args, schema) { + for (const [field, fieldOptions] of Object.entries(schema)) { + args.push(field); + if (typeof fieldOptions === 'string') { + args.push(fieldOptions); + continue; + } + if (fieldOptions.AS) { + args.push('AS', fieldOptions.AS); + } + args.push(fieldOptions.type); + switch (fieldOptions.type) { + case SchemaFieldTypes.TEXT: + if (fieldOptions.NOSTEM) { + args.push('NOSTEM'); + } + if (fieldOptions.WEIGHT) { + args.push('WEIGHT', fieldOptions.WEIGHT.toString()); + } + if (fieldOptions.PHONETIC) { + args.push('PHONETIC', fieldOptions.PHONETIC); + } + if (fieldOptions.WITHSUFFIXTRIE) { + args.push('WITHSUFFIXTRIE'); + } + pushCommonFieldArguments(args, fieldOptions); + if (fieldOptions.INDEXEMPTY) { + args.push('INDEXEMPTY'); + } + break; + case SchemaFieldTypes.NUMERIC: + case SchemaFieldTypes.GEO: + pushCommonFieldArguments(args, fieldOptions); + break; + case SchemaFieldTypes.TAG: + if (fieldOptions.SEPARATOR) { + args.push('SEPARATOR', fieldOptions.SEPARATOR); + } + if (fieldOptions.CASESENSITIVE) { + args.push('CASESENSITIVE'); + } + if (fieldOptions.WITHSUFFIXTRIE) { + args.push('WITHSUFFIXTRIE'); + } + pushCommonFieldArguments(args, fieldOptions); + if (fieldOptions.INDEXEMPTY) { + args.push('INDEXEMPTY'); + } + break; + case SchemaFieldTypes.VECTOR: + args.push(fieldOptions.ALGORITHM); + pushArgumentsWithLength(args, () => { + args.push('TYPE', fieldOptions.TYPE, 'DIM', fieldOptions.DIM.toString(), 'DISTANCE_METRIC', fieldOptions.DISTANCE_METRIC); + if (fieldOptions.INITIAL_CAP) { + args.push('INITIAL_CAP', fieldOptions.INITIAL_CAP.toString()); + } + switch (fieldOptions.ALGORITHM) { + case VectorAlgorithms.FLAT: + if (fieldOptions.BLOCK_SIZE) { + args.push('BLOCK_SIZE', fieldOptions.BLOCK_SIZE.toString()); + } + break; + case VectorAlgorithms.HNSW: + if (fieldOptions.M) { + args.push('M', fieldOptions.M.toString()); + } + if (fieldOptions.EF_CONSTRUCTION) { + args.push('EF_CONSTRUCTION', fieldOptions.EF_CONSTRUCTION.toString()); + } + if (fieldOptions.EF_RUNTIME) { + args.push('EF_RUNTIME', fieldOptions.EF_RUNTIME.toString()); + } + break; + } + }); + break; + case SchemaFieldTypes.GEOSHAPE: + if (fieldOptions.COORD_SYSTEM !== undefined) { + args.push('COORD_SYSTEM', fieldOptions.COORD_SYSTEM); + } + pushCommonFieldArguments(args, fieldOptions); + break; + } + if (fieldOptions.INDEXMISSING) { + args.push('INDEXMISSING'); + } + } +} +exports.pushSchema = pushSchema; +function pushParamsArgs(args, params) { + if (params) { + const enrties = Object.entries(params); + args.push('PARAMS', (enrties.length * 2).toString()); + for (const [key, value] of enrties) { + args.push(key, typeof value === 'number' ? value.toString() : value); + } + } + return args; +} +exports.pushParamsArgs = pushParamsArgs; +function pushSearchOptions(args, options) { + if (options?.VERBATIM) { + args.push('VERBATIM'); + } + if (options?.NOSTOPWORDS) { + args.push('NOSTOPWORDS'); + } + // if (options?.WITHSCORES) { + // args.push('WITHSCORES'); + // } + // if (options?.WITHPAYLOADS) { + // args.push('WITHPAYLOADS'); + // } + (0, generic_transformers_1.pushOptionalVerdictArgument)(args, 'INKEYS', options?.INKEYS); + (0, generic_transformers_1.pushOptionalVerdictArgument)(args, 'INFIELDS', options?.INFIELDS); + (0, generic_transformers_1.pushOptionalVerdictArgument)(args, 'RETURN', options?.RETURN); + if (options?.SUMMARIZE) { + args.push('SUMMARIZE'); + if (typeof options.SUMMARIZE === 'object') { + if (options.SUMMARIZE.FIELDS) { + args.push('FIELDS'); + (0, generic_transformers_1.pushVerdictArgument)(args, options.SUMMARIZE.FIELDS); + } + if (options.SUMMARIZE.FRAGS) { + args.push('FRAGS', options.SUMMARIZE.FRAGS.toString()); + } + if (options.SUMMARIZE.LEN) { + args.push('LEN', options.SUMMARIZE.LEN.toString()); + } + if (options.SUMMARIZE.SEPARATOR) { + args.push('SEPARATOR', options.SUMMARIZE.SEPARATOR); + } + } + } + if (options?.HIGHLIGHT) { + args.push('HIGHLIGHT'); + if (typeof options.HIGHLIGHT === 'object') { + if (options.HIGHLIGHT.FIELDS) { + args.push('FIELDS'); + (0, generic_transformers_1.pushVerdictArgument)(args, options.HIGHLIGHT.FIELDS); + } + if (options.HIGHLIGHT.TAGS) { + args.push('TAGS', options.HIGHLIGHT.TAGS.open, options.HIGHLIGHT.TAGS.close); + } + } + } + if (options?.SLOP) { + args.push('SLOP', options.SLOP.toString()); + } + if (options?.INORDER) { + args.push('INORDER'); + } + if (options?.LANGUAGE) { + args.push('LANGUAGE', options.LANGUAGE); + } + if (options?.EXPANDER) { + args.push('EXPANDER', options.EXPANDER); + } + if (options?.SCORER) { + args.push('SCORER', options.SCORER); + } + // if (options?.EXPLAINSCORE) { + // args.push('EXPLAINSCORE'); + // } + // if (options?.PAYLOAD) { + // args.push('PAYLOAD', options.PAYLOAD); + // } + if (options?.SORTBY) { + args.push('SORTBY'); + pushSortByProperty(args, options.SORTBY); + } + // if (options?.MSORTBY) { + // pushSortByArguments(args, 'MSORTBY', options.MSORTBY); + // } + if (options?.LIMIT) { + args.push('LIMIT', options.LIMIT.from.toString(), options.LIMIT.size.toString()); + } + if (options?.PARAMS) { + pushParamsArgs(args, options.PARAMS); + } + if (options?.DIALECT) { + args.push('DIALECT', options.DIALECT.toString()); + } + if (options?.RETURN?.length === 0) { + args.preserve = true; + } + if (options?.TIMEOUT !== undefined) { + args.push('TIMEOUT', options.TIMEOUT.toString()); + } + return args; +} +exports.pushSearchOptions = pushSearchOptions; +function transformProfile(reply) { + return { + totalProfileTime: reply[0][1], + parsingTime: reply[1][1], + pipelineCreationTime: reply[2][1], + iteratorsProfile: transformIterators(reply[3][1]) + }; +} +exports.transformProfile = transformProfile; +function transformIterators(IteratorsProfile) { + var res = {}; + for (let i = 0; i < IteratorsProfile.length; i += 2) { + const value = IteratorsProfile[i + 1]; + switch (IteratorsProfile[i]) { + case 'Type': + res.type = value; + break; + case 'Counter': + res.counter = value; + break; + case 'Time': + res.time = value; + break; + case 'Query type': + res.queryType = value; + break; + case 'Child iterators': + res.childIterators = value.map(transformChildIterators); + break; + } + } + return res; +} +function transformChildIterators(IteratorsProfile) { + var res = {}; + for (let i = 1; i < IteratorsProfile.length; i += 2) { + const value = IteratorsProfile[i + 1]; + switch (IteratorsProfile[i]) { + case 'Type': + res.type = value; + break; + case 'Counter': + res.counter = value; + break; + case 'Time': + res.time = value; + break; + case 'Size': + res.size = value; + break; + case 'Term': + res.term = value; + break; + case 'Child iterators': + res.childIterators = value.map(transformChildIterators); + break; + } + } + return res; +} diff --git a/server/node_modules/@redis/search/dist/index.d.ts b/server/node_modules/@redis/search/dist/index.d.ts new file mode 100644 index 0000000..745ad29 --- /dev/null +++ b/server/node_modules/@redis/search/dist/index.d.ts @@ -0,0 +1,4 @@ +export { default } from './commands'; +export { RediSearchSchema, RedisSearchLanguages, SchemaFieldTypes, SchemaTextFieldPhonetics, SearchReply, VectorAlgorithms } from './commands'; +export { AggregateGroupByReducers, AggregateSteps } from './commands/AGGREGATE'; +export { SearchOptions } from './commands/SEARCH'; diff --git a/server/node_modules/@redis/search/dist/index.js b/server/node_modules/@redis/search/dist/index.js new file mode 100644 index 0000000..36d7c1d --- /dev/null +++ b/server/node_modules/@redis/search/dist/index.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AggregateSteps = exports.AggregateGroupByReducers = exports.VectorAlgorithms = exports.SchemaTextFieldPhonetics = exports.SchemaFieldTypes = exports.RedisSearchLanguages = exports.default = void 0; +var commands_1 = require("./commands"); +Object.defineProperty(exports, "default", { enumerable: true, get: function () { return commands_1.default; } }); +var commands_2 = require("./commands"); +Object.defineProperty(exports, "RedisSearchLanguages", { enumerable: true, get: function () { return commands_2.RedisSearchLanguages; } }); +Object.defineProperty(exports, "SchemaFieldTypes", { enumerable: true, get: function () { return commands_2.SchemaFieldTypes; } }); +Object.defineProperty(exports, "SchemaTextFieldPhonetics", { enumerable: true, get: function () { return commands_2.SchemaTextFieldPhonetics; } }); +Object.defineProperty(exports, "VectorAlgorithms", { enumerable: true, get: function () { return commands_2.VectorAlgorithms; } }); +var AGGREGATE_1 = require("./commands/AGGREGATE"); +Object.defineProperty(exports, "AggregateGroupByReducers", { enumerable: true, get: function () { return AGGREGATE_1.AggregateGroupByReducers; } }); +Object.defineProperty(exports, "AggregateSteps", { enumerable: true, get: function () { return AGGREGATE_1.AggregateSteps; } }); diff --git a/server/node_modules/@redis/search/package.json b/server/node_modules/@redis/search/package.json new file mode 100644 index 0000000..aaf9bc5 --- /dev/null +++ b/server/node_modules/@redis/search/package.json @@ -0,0 +1,41 @@ +{ + "name": "@redis/search", + "version": "1.2.0", + "license": "MIT", + "main": "./dist/index.js", + "types": "./dist/index.d.ts", + "files": [ + "dist/" + ], + "scripts": { + "test": "nyc -r text-summary -r lcov mocha -r source-map-support/register -r ts-node/register './lib/**/*.spec.ts'", + "build": "tsc", + "documentation": "typedoc" + }, + "peerDependencies": { + "@redis/client": "^1.0.0" + }, + "devDependencies": { + "@istanbuljs/nyc-config-typescript": "^1.0.2", + "@redis/test-utils": "*", + "@types/node": "^20.6.2", + "nyc": "^15.1.0", + "release-it": "^16.1.5", + "source-map-support": "^0.5.21", + "ts-node": "^10.9.1", + "typedoc": "^0.25.1", + "typescript": "^5.2.2" + }, + "repository": { + "type": "git", + "url": "git://github.com/redis/node-redis.git" + }, + "bugs": { + "url": "https://github.com/redis/node-redis/issues" + }, + "homepage": "https://github.com/redis/node-redis/tree/master/packages/search", + "keywords": [ + "redis", + "RediSearch" + ] +} diff --git a/server/node_modules/@redis/time-series/README.md b/server/node_modules/@redis/time-series/README.md new file mode 100644 index 0000000..5923979 --- /dev/null +++ b/server/node_modules/@redis/time-series/README.md @@ -0,0 +1,151 @@ +# @redis/time-series + +This package provides support for the [RedisTimeSeries](https://redistimeseries.io) module, which adds a time series data structure to Redis. It extends the [Node Redis client](https://github.com/redis/node-redis) to include functions for each of the RedisTimeSeries commands. + +To use these extra commands, your Redis server must have the RedisTimeSeries module installed. + +## Usage + +For a complete example, see [`time-series.js`](https://github.com/redis/node-redis/blob/master/examples/time-series.js) in the Node Redis examples folder. + +### Creating Time Series data structure in Redis + +The [`TS.CREATE`](https://oss.redis.com/redistimeseries/commands/#tscreate) command creates a new time series. + +Here, we'll create a new time series "`temperature`": + +```javascript + +import { createClient } from 'redis'; +import { TimeSeriesDuplicatePolicies, TimeSeriesEncoding, TimeSeriesAggregationType } from '@redis/time-series'; + +... + + const created = await client.ts.create('temperature', { + RETENTION: 86400000, // 1 day in milliseconds + ENCODING: TimeSeriesEncoding.UNCOMPRESSED, // No compression - When not specified, the option is set to COMPRESSED + DUPLICATE_POLICY: TimeSeriesDuplicatePolicies.BLOCK, // No duplicates - When not specified: set to the global DUPLICATE_POLICY configuration of the database (which by default, is BLOCK). + }); + + if (created === 'OK') { + console.log('Created timeseries.'); + } else { + console.log('Error creating timeseries :('); + process.exit(1); + } + +``` + +### Adding new value to a Time Series data structure in Redis + +With RedisTimeSeries, we can add a single value to time series data structure using the [`TS.ADD`](https://redis.io/commands/ts.add/) command and if we would like to add multiple values we can use the [`TS.MADD`](https://redis.io/commands/ts.madd/) command. + +```javascript + +let value = Math.floor(Math.random() * 1000) + 1; // Random data point value + let currentTimestamp = 1640995200000; // Jan 1 2022 00:00:00 + let num = 0; + + while (num < 10000) { + // Add a new value to the timeseries, providing our own timestamp: + // https://redis.io/commands/ts.add/ + await client.ts.add('temperature', currentTimestamp, value); + console.log(`Added timestamp ${currentTimestamp}, value ${value}.`); + + num += 1; + value = Math.floor(Math.random() * 1000) + 1; // Get another random value + currentTimestamp += 1000; // Move on one second. + } + + // Add multiple values to the timeseries in round trip to the server: + // https://redis.io/commands/ts.madd/ + const response = await client.ts.mAdd([{ + key: 'temperature', + timestamp: currentTimestamp + 60000, + value: Math.floor(Math.random() * 1000) + 1 + }, { + key: 'temperature', + timestamp: currentTimestamp + 120000, + value: Math.floor(Math.random() * 1000) + 1 + }]); + + +``` + +### Retrieving Time Series data from Redis + +With RedisTimeSeries, we can retrieve the time series data using the [`TS.RANGE`](https://redis.io/commands/ts.range/) command by passing the criteria as follows: + +```javascript + +// Query the timeseries with TS.RANGE: + // https://redis.io/commands/ts.range/ + const fromTimestamp = 1640995200000; // Jan 1 2022 00:00:00 + const toTimestamp = 1640995260000; // Jan 1 2022 00:01:00 + const rangeResponse = await client.ts.range('temperature', fromTimestamp, toTimestamp, { + // Group into 10 second averages. + AGGREGATION: { + type: TimeSeriesAggregationType.AVERAGE, + timeBucket: 10000 + } + }); + + console.log('RANGE RESPONSE:'); + // rangeResponse looks like: + // [ + // { timestamp: 1640995200000, value: 356.8 }, + // { timestamp: 1640995210000, value: 534.8 }, + // { timestamp: 1640995220000, value: 481.3 }, + // { timestamp: 1640995230000, value: 437 }, + // { timestamp: 1640995240000, value: 507.3 }, + // { timestamp: 1640995250000, value: 581.2 }, + // { timestamp: 1640995260000, value: 600 } + // ] + +``` + +### Altering Time Series data Stored in Redis + +RedisTimeSeries includes commands that can update values in a time series data structure. + +Using the [`TS.ALTER`](https://redis.io/commands/ts.alter/) command, we can update time series retention like this: + +```javascript + + // https://redis.io/commands/ts.alter/ + const alterResponse = await client.ts.alter('temperature', { + RETENTION: 0 // Keep the entries forever + }); + +``` + +### Retrieving Information about the timeseries Stored in Redis + +RedisTimeSeries also includes commands that can help to view the information on the state of a time series. + +Using the [`TS.INFO`](https://redis.io/commands/ts.info/) command, we can view timeseries information like this: + +```javascript + + // Get some information about the state of the timeseries. + // https://redis.io/commands/ts.info/ + const tsInfo = await client.ts.info('temperature'); + + // tsInfo looks like this: + // { + // totalSamples: 1440, + // memoryUsage: 28904, + // firstTimestamp: 1641508920000, + // lastTimestamp: 1641595320000, + // retentionTime: 86400000, + // chunkCount: 7, + // chunkSize: 4096, + // chunkType: 'uncompressed', + // duplicatePolicy: 'block', + // labels: [], + // sourceKey: null, + // rules: [] + // } + +``` + diff --git a/server/node_modules/@redis/time-series/dist/commands/ADD.d.ts b/server/node_modules/@redis/time-series/dist/commands/ADD.d.ts new file mode 100644 index 0000000..58b0489 --- /dev/null +++ b/server/node_modules/@redis/time-series/dist/commands/ADD.d.ts @@ -0,0 +1,17 @@ +import { TimeSeriesEncoding, TimeSeriesDuplicatePolicies, Labels, Timestamp } from '.'; +export interface TsIgnoreOptions { + MAX_TIME_DIFF: number; + MAX_VAL_DIFF: number; +} +interface AddOptions { + RETENTION?: number; + ENCODING?: TimeSeriesEncoding; + CHUNK_SIZE?: number; + ON_DUPLICATE?: TimeSeriesDuplicatePolicies; + LABELS?: Labels; + IGNORE?: TsIgnoreOptions; +} +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: string, timestamp: Timestamp, value: number, options?: AddOptions): Array; +export declare function transformReply(): number; +export {}; diff --git a/server/node_modules/@redis/time-series/dist/commands/ADD.js b/server/node_modules/@redis/time-series/dist/commands/ADD.js new file mode 100644 index 0000000..a799b62 --- /dev/null +++ b/server/node_modules/@redis/time-series/dist/commands/ADD.js @@ -0,0 +1,23 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const _1 = require("."); +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, timestamp, value, options) { + const args = [ + 'TS.ADD', + key, + (0, _1.transformTimestampArgument)(timestamp), + value.toString() + ]; + (0, _1.pushRetentionArgument)(args, options?.RETENTION); + (0, _1.pushEncodingArgument)(args, options?.ENCODING); + (0, _1.pushChunkSizeArgument)(args, options?.CHUNK_SIZE); + if (options?.ON_DUPLICATE) { + args.push('ON_DUPLICATE', options.ON_DUPLICATE); + } + (0, _1.pushLabelsArgument)(args, options?.LABELS); + (0, _1.pushIgnoreArgument)(args, options?.IGNORE); + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/time-series/dist/commands/ALTER.d.ts b/server/node_modules/@redis/time-series/dist/commands/ALTER.d.ts new file mode 100644 index 0000000..8f30a2a --- /dev/null +++ b/server/node_modules/@redis/time-series/dist/commands/ALTER.d.ts @@ -0,0 +1,13 @@ +import { Labels, TimeSeriesDuplicatePolicies } from '.'; +import { TsIgnoreOptions } from './ADD'; +export declare const FIRST_KEY_INDEX = 1; +interface AlterOptions { + RETENTION?: number; + CHUNK_SIZE?: number; + DUPLICATE_POLICY?: TimeSeriesDuplicatePolicies; + LABELS?: Labels; + IGNORE?: TsIgnoreOptions; +} +export declare function transformArguments(key: string, options?: AlterOptions): Array; +export declare function transformReply(): 'OK'; +export {}; diff --git a/server/node_modules/@redis/time-series/dist/commands/ALTER.js b/server/node_modules/@redis/time-series/dist/commands/ALTER.js new file mode 100644 index 0000000..3041885 --- /dev/null +++ b/server/node_modules/@redis/time-series/dist/commands/ALTER.js @@ -0,0 +1,15 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const _1 = require("."); +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, options) { + const args = ['TS.ALTER', key]; + (0, _1.pushRetentionArgument)(args, options?.RETENTION); + (0, _1.pushChunkSizeArgument)(args, options?.CHUNK_SIZE); + (0, _1.pushDuplicatePolicy)(args, options?.DUPLICATE_POLICY); + (0, _1.pushLabelsArgument)(args, options?.LABELS); + (0, _1.pushIgnoreArgument)(args, options?.IGNORE); + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/time-series/dist/commands/CREATE.d.ts b/server/node_modules/@redis/time-series/dist/commands/CREATE.d.ts new file mode 100644 index 0000000..386ecfb --- /dev/null +++ b/server/node_modules/@redis/time-series/dist/commands/CREATE.d.ts @@ -0,0 +1,14 @@ +import { TimeSeriesEncoding, TimeSeriesDuplicatePolicies, Labels } from '.'; +import { TsIgnoreOptions } from './ADD'; +export declare const FIRST_KEY_INDEX = 1; +interface CreateOptions { + RETENTION?: number; + ENCODING?: TimeSeriesEncoding; + CHUNK_SIZE?: number; + DUPLICATE_POLICY?: TimeSeriesDuplicatePolicies; + LABELS?: Labels; + IGNORE?: TsIgnoreOptions; +} +export declare function transformArguments(key: string, options?: CreateOptions): Array; +export declare function transformReply(): 'OK'; +export {}; diff --git a/server/node_modules/@redis/time-series/dist/commands/CREATE.js b/server/node_modules/@redis/time-series/dist/commands/CREATE.js new file mode 100644 index 0000000..0c3ae17 --- /dev/null +++ b/server/node_modules/@redis/time-series/dist/commands/CREATE.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const _1 = require("."); +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, options) { + const args = ['TS.CREATE', key]; + (0, _1.pushRetentionArgument)(args, options?.RETENTION); + (0, _1.pushEncodingArgument)(args, options?.ENCODING); + (0, _1.pushChunkSizeArgument)(args, options?.CHUNK_SIZE); + (0, _1.pushDuplicatePolicy)(args, options?.DUPLICATE_POLICY); + (0, _1.pushLabelsArgument)(args, options?.LABELS); + (0, _1.pushIgnoreArgument)(args, options?.IGNORE); + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/time-series/dist/commands/CREATERULE.d.ts b/server/node_modules/@redis/time-series/dist/commands/CREATERULE.d.ts new file mode 100644 index 0000000..c2544f4 --- /dev/null +++ b/server/node_modules/@redis/time-series/dist/commands/CREATERULE.d.ts @@ -0,0 +1,4 @@ +import { TimeSeriesAggregationType } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(sourceKey: string, destinationKey: string, aggregationType: TimeSeriesAggregationType, bucketDuration: number, alignTimestamp?: number): Array; +export declare function transformReply(): 'OK'; diff --git a/server/node_modules/@redis/time-series/dist/commands/CREATERULE.js b/server/node_modules/@redis/time-series/dist/commands/CREATERULE.js new file mode 100644 index 0000000..a77fcb4 --- /dev/null +++ b/server/node_modules/@redis/time-series/dist/commands/CREATERULE.js @@ -0,0 +1,19 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(sourceKey, destinationKey, aggregationType, bucketDuration, alignTimestamp) { + const args = [ + 'TS.CREATERULE', + sourceKey, + destinationKey, + 'AGGREGATION', + aggregationType, + bucketDuration.toString() + ]; + if (alignTimestamp) { + args.push(alignTimestamp.toString()); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/time-series/dist/commands/DECRBY.d.ts b/server/node_modules/@redis/time-series/dist/commands/DECRBY.d.ts new file mode 100644 index 0000000..8c04451 --- /dev/null +++ b/server/node_modules/@redis/time-series/dist/commands/DECRBY.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArguments } from '@redis/client/dist/lib/commands'; +import { IncrDecrOptions } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: string, value: number, options?: IncrDecrOptions): RedisCommandArguments; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/time-series/dist/commands/DECRBY.js b/server/node_modules/@redis/time-series/dist/commands/DECRBY.js new file mode 100644 index 0000000..adb19a9 --- /dev/null +++ b/server/node_modules/@redis/time-series/dist/commands/DECRBY.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const _1 = require("."); +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, value, options) { + return (0, _1.transformIncrDecrArguments)('TS.DECRBY', key, value, options); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/time-series/dist/commands/DEL.d.ts b/server/node_modules/@redis/time-series/dist/commands/DEL.d.ts new file mode 100644 index 0000000..c33a8ab --- /dev/null +++ b/server/node_modules/@redis/time-series/dist/commands/DEL.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArguments } from '@redis/client/dist/lib/commands'; +import { Timestamp } from '.'; +export declare const FIRTS_KEY_INDEX = 1; +export declare function transformArguments(key: string, fromTimestamp: Timestamp, toTimestamp: Timestamp): RedisCommandArguments; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/time-series/dist/commands/DEL.js b/server/node_modules/@redis/time-series/dist/commands/DEL.js new file mode 100644 index 0000000..39a8236 --- /dev/null +++ b/server/node_modules/@redis/time-series/dist/commands/DEL.js @@ -0,0 +1,14 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRTS_KEY_INDEX = void 0; +const _1 = require("."); +exports.FIRTS_KEY_INDEX = 1; +function transformArguments(key, fromTimestamp, toTimestamp) { + return [ + 'TS.DEL', + key, + (0, _1.transformTimestampArgument)(fromTimestamp), + (0, _1.transformTimestampArgument)(toTimestamp) + ]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/time-series/dist/commands/DELETERULE.d.ts b/server/node_modules/@redis/time-series/dist/commands/DELETERULE.d.ts new file mode 100644 index 0000000..a13a756 --- /dev/null +++ b/server/node_modules/@redis/time-series/dist/commands/DELETERULE.d.ts @@ -0,0 +1,3 @@ +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(sourceKey: string, destinationKey: string): Array; +export declare function transformReply(): 'OK'; diff --git a/server/node_modules/@redis/time-series/dist/commands/DELETERULE.js b/server/node_modules/@redis/time-series/dist/commands/DELETERULE.js new file mode 100644 index 0000000..aece0d6 --- /dev/null +++ b/server/node_modules/@redis/time-series/dist/commands/DELETERULE.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +function transformArguments(sourceKey, destinationKey) { + return [ + 'TS.DELETERULE', + sourceKey, + destinationKey + ]; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/time-series/dist/commands/GET.d.ts b/server/node_modules/@redis/time-series/dist/commands/GET.d.ts new file mode 100644 index 0000000..16f1ff8 --- /dev/null +++ b/server/node_modules/@redis/time-series/dist/commands/GET.d.ts @@ -0,0 +1,10 @@ +import { RedisCommandArguments } from '@redis/client/dist/lib/commands'; +import { SampleRawReply, SampleReply } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +interface GetOptions { + LATEST?: boolean; +} +export declare function transformArguments(key: string, options?: GetOptions): RedisCommandArguments; +export declare function transformReply(reply: [] | SampleRawReply): null | SampleReply; +export {}; diff --git a/server/node_modules/@redis/time-series/dist/commands/GET.js b/server/node_modules/@redis/time-series/dist/commands/GET.js new file mode 100644 index 0000000..9f7b9a9 --- /dev/null +++ b/server/node_modules/@redis/time-series/dist/commands/GET.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const _1 = require("."); +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, options) { + return (0, _1.pushLatestArgument)(['TS.GET', key], options?.LATEST); +} +exports.transformArguments = transformArguments; +function transformReply(reply) { + if (reply.length === 0) + return null; + return (0, _1.transformSampleReply)(reply); +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/time-series/dist/commands/INCRBY.d.ts b/server/node_modules/@redis/time-series/dist/commands/INCRBY.d.ts new file mode 100644 index 0000000..8c04451 --- /dev/null +++ b/server/node_modules/@redis/time-series/dist/commands/INCRBY.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArguments } from '@redis/client/dist/lib/commands'; +import { IncrDecrOptions } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare function transformArguments(key: string, value: number, options?: IncrDecrOptions): RedisCommandArguments; +export declare function transformReply(): number; diff --git a/server/node_modules/@redis/time-series/dist/commands/INCRBY.js b/server/node_modules/@redis/time-series/dist/commands/INCRBY.js new file mode 100644 index 0000000..18037d0 --- /dev/null +++ b/server/node_modules/@redis/time-series/dist/commands/INCRBY.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const _1 = require("."); +exports.FIRST_KEY_INDEX = 1; +function transformArguments(key, value, options) { + return (0, _1.transformIncrDecrArguments)('TS.INCRBY', key, value, options); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/time-series/dist/commands/INFO.d.ts b/server/node_modules/@redis/time-series/dist/commands/INFO.d.ts new file mode 100644 index 0000000..6eb9482 --- /dev/null +++ b/server/node_modules/@redis/time-series/dist/commands/INFO.d.ts @@ -0,0 +1,52 @@ +import { TimeSeriesAggregationType, TimeSeriesDuplicatePolicies } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: string): Array; +export type InfoRawReply = [ + 'totalSamples', + number, + 'memoryUsage', + number, + 'firstTimestamp', + number, + 'lastTimestamp', + number, + 'retentionTime', + number, + 'chunkCount', + number, + 'chunkSize', + number, + 'chunkType', + string, + 'duplicatePolicy', + TimeSeriesDuplicatePolicies | null, + 'labels', + Array<[name: string, value: string]>, + 'sourceKey', + string | null, + 'rules', + Array<[key: string, timeBucket: number, aggregationType: TimeSeriesAggregationType]> +]; +export interface InfoReply { + totalSamples: number; + memoryUsage: number; + firstTimestamp: number; + lastTimestamp: number; + retentionTime: number; + chunkCount: number; + chunkSize: number; + chunkType: string; + duplicatePolicy: TimeSeriesDuplicatePolicies | null; + labels: Array<{ + name: string; + value: string; + }>; + sourceKey: string | null; + rules: Array<{ + key: string; + timeBucket: number; + aggregationType: TimeSeriesAggregationType; + }>; +} +export declare function transformReply(reply: InfoRawReply): InfoReply; diff --git a/server/node_modules/@redis/time-series/dist/commands/INFO.js b/server/node_modules/@redis/time-series/dist/commands/INFO.js new file mode 100644 index 0000000..007582a --- /dev/null +++ b/server/node_modules/@redis/time-series/dist/commands/INFO.js @@ -0,0 +1,33 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key) { + return ['TS.INFO', key]; +} +exports.transformArguments = transformArguments; +function transformReply(reply) { + return { + totalSamples: reply[1], + memoryUsage: reply[3], + firstTimestamp: reply[5], + lastTimestamp: reply[7], + retentionTime: reply[9], + chunkCount: reply[11], + chunkSize: reply[13], + chunkType: reply[15], + duplicatePolicy: reply[17], + labels: reply[19].map(([name, value]) => ({ + name, + value + })), + sourceKey: reply[21], + rules: reply[23].map(([key, timeBucket, aggregationType]) => ({ + key, + timeBucket, + aggregationType + })) + }; +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/time-series/dist/commands/INFO_DEBUG.d.ts b/server/node_modules/@redis/time-series/dist/commands/INFO_DEBUG.d.ts new file mode 100644 index 0000000..4b71b47 --- /dev/null +++ b/server/node_modules/@redis/time-series/dist/commands/INFO_DEBUG.d.ts @@ -0,0 +1,32 @@ +import { InfoRawReply, InfoReply } from './INFO'; +export { IS_READ_ONLY, FIRST_KEY_INDEX } from './INFO'; +export declare function transformArguments(key: string): Array; +type InfoDebugRawReply = [ + ...InfoRawReply, + 'keySelfName', + string, + 'chunks', + Array<[ + 'startTimestamp', + number, + 'endTimestamp', + number, + 'samples', + number, + 'size', + number, + 'bytesPerSample', + string + ]> +]; +interface InfoDebugReply extends InfoReply { + keySelfName: string; + chunks: Array<{ + startTimestamp: number; + endTimestamp: number; + samples: number; + size: number; + bytesPerSample: string; + }>; +} +export declare function transformReply(rawReply: InfoDebugRawReply): InfoDebugReply; diff --git a/server/node_modules/@redis/time-series/dist/commands/INFO_DEBUG.js b/server/node_modules/@redis/time-series/dist/commands/INFO_DEBUG.js new file mode 100644 index 0000000..c289e07 --- /dev/null +++ b/server/node_modules/@redis/time-series/dist/commands/INFO_DEBUG.js @@ -0,0 +1,26 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.FIRST_KEY_INDEX = exports.IS_READ_ONLY = void 0; +const INFO_1 = require("./INFO"); +var INFO_2 = require("./INFO"); +Object.defineProperty(exports, "IS_READ_ONLY", { enumerable: true, get: function () { return INFO_2.IS_READ_ONLY; } }); +Object.defineProperty(exports, "FIRST_KEY_INDEX", { enumerable: true, get: function () { return INFO_2.FIRST_KEY_INDEX; } }); +function transformArguments(key) { + const args = (0, INFO_1.transformArguments)(key); + args.push('DEBUG'); + return args; +} +exports.transformArguments = transformArguments; +function transformReply(rawReply) { + const reply = (0, INFO_1.transformReply)(rawReply); + reply.keySelfName = rawReply[25]; + reply.chunks = rawReply[27].map(chunk => ({ + startTimestamp: chunk[1], + endTimestamp: chunk[3], + samples: chunk[5], + size: chunk[7], + bytesPerSample: chunk[9] + })); + return reply; +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/time-series/dist/commands/MADD.d.ts b/server/node_modules/@redis/time-series/dist/commands/MADD.d.ts new file mode 100644 index 0000000..f9c5e98 --- /dev/null +++ b/server/node_modules/@redis/time-series/dist/commands/MADD.d.ts @@ -0,0 +1,10 @@ +import { Timestamp } from '.'; +export declare const FIRST_KEY_INDEX = 1; +interface MAddSample { + key: string; + timestamp: Timestamp; + value: number; +} +export declare function transformArguments(toAdd: Array): Array; +export declare function transformReply(): Array; +export {}; diff --git a/server/node_modules/@redis/time-series/dist/commands/MADD.js b/server/node_modules/@redis/time-series/dist/commands/MADD.js new file mode 100644 index 0000000..54b74c2 --- /dev/null +++ b/server/node_modules/@redis/time-series/dist/commands/MADD.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; +const _1 = require("."); +exports.FIRST_KEY_INDEX = 1; +function transformArguments(toAdd) { + const args = ['TS.MADD']; + for (const { key, timestamp, value } of toAdd) { + args.push(key, (0, _1.transformTimestampArgument)(timestamp), value.toString()); + } + return args; +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/time-series/dist/commands/MGET.d.ts b/server/node_modules/@redis/time-series/dist/commands/MGET.d.ts new file mode 100644 index 0000000..7b1f74b --- /dev/null +++ b/server/node_modules/@redis/time-series/dist/commands/MGET.d.ts @@ -0,0 +1,17 @@ +import { RedisCommandArguments } from '@redis/client/dist/lib/commands'; +import { Filter, RawLabels, SampleRawReply, SampleReply } from '.'; +export declare const IS_READ_ONLY = true; +export interface MGetOptions { + LATEST?: boolean; +} +export declare function transformArguments(filter: Filter, options?: MGetOptions): RedisCommandArguments; +export type MGetRawReply = Array<[ + key: string, + labels: RawLabels, + sample: SampleRawReply +]>; +export interface MGetReply { + key: string; + sample: SampleReply; +} +export declare function transformReply(reply: MGetRawReply): Array; diff --git a/server/node_modules/@redis/time-series/dist/commands/MGET.js b/server/node_modules/@redis/time-series/dist/commands/MGET.js new file mode 100644 index 0000000..c0e4012 --- /dev/null +++ b/server/node_modules/@redis/time-series/dist/commands/MGET.js @@ -0,0 +1,17 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = void 0; +const _1 = require("."); +exports.IS_READ_ONLY = true; +function transformArguments(filter, options) { + const args = (0, _1.pushLatestArgument)(['TS.MGET'], options?.LATEST); + return (0, _1.pushFilterArgument)(args, filter); +} +exports.transformArguments = transformArguments; +function transformReply(reply) { + return reply.map(([key, _, sample]) => ({ + key, + sample: (0, _1.transformSampleReply)(sample) + })); +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/time-series/dist/commands/MGET_WITHLABELS.d.ts b/server/node_modules/@redis/time-series/dist/commands/MGET_WITHLABELS.d.ts new file mode 100644 index 0000000..7b32b64 --- /dev/null +++ b/server/node_modules/@redis/time-series/dist/commands/MGET_WITHLABELS.d.ts @@ -0,0 +1,13 @@ +import { SelectedLabels, Labels, Filter } from '.'; +import { MGetOptions, MGetRawReply, MGetReply } from './MGET'; +import { RedisCommandArguments } from '@redis/client/dist/lib/commands'; +export declare const IS_READ_ONLY = true; +interface MGetWithLabelsOptions extends MGetOptions { + SELECTED_LABELS?: SelectedLabels; +} +export declare function transformArguments(filter: Filter, options?: MGetWithLabelsOptions): RedisCommandArguments; +export interface MGetWithLabelsReply extends MGetReply { + labels: Labels; +} +export declare function transformReply(reply: MGetRawReply): Array; +export {}; diff --git a/server/node_modules/@redis/time-series/dist/commands/MGET_WITHLABELS.js b/server/node_modules/@redis/time-series/dist/commands/MGET_WITHLABELS.js new file mode 100644 index 0000000..fcda8f9 --- /dev/null +++ b/server/node_modules/@redis/time-series/dist/commands/MGET_WITHLABELS.js @@ -0,0 +1,19 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = void 0; +const _1 = require("."); +exports.IS_READ_ONLY = true; +function transformArguments(filter, options) { + const args = (0, _1.pushWithLabelsArgument)(['TS.MGET'], options?.SELECTED_LABELS); + return (0, _1.pushFilterArgument)(args, filter); +} +exports.transformArguments = transformArguments; +; +function transformReply(reply) { + return reply.map(([key, labels, sample]) => ({ + key, + labels: (0, _1.transformLablesReply)(labels), + sample: (0, _1.transformSampleReply)(sample) + })); +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/time-series/dist/commands/MRANGE.d.ts b/server/node_modules/@redis/time-series/dist/commands/MRANGE.d.ts new file mode 100644 index 0000000..874d1e5 --- /dev/null +++ b/server/node_modules/@redis/time-series/dist/commands/MRANGE.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArguments } from '@redis/client/dist/lib/commands'; +import { MRangeOptions, Timestamp, Filter } from '.'; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(fromTimestamp: Timestamp, toTimestamp: Timestamp, filters: Filter, options?: MRangeOptions): RedisCommandArguments; +export { transformMRangeReply as transformReply } from '.'; diff --git a/server/node_modules/@redis/time-series/dist/commands/MRANGE.js b/server/node_modules/@redis/time-series/dist/commands/MRANGE.js new file mode 100644 index 0000000..0c7cdeb --- /dev/null +++ b/server/node_modules/@redis/time-series/dist/commands/MRANGE.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = void 0; +const _1 = require("."); +exports.IS_READ_ONLY = true; +function transformArguments(fromTimestamp, toTimestamp, filters, options) { + return (0, _1.pushMRangeArguments)(['TS.MRANGE'], fromTimestamp, toTimestamp, filters, options); +} +exports.transformArguments = transformArguments; +var _2 = require("."); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return _2.transformMRangeReply; } }); diff --git a/server/node_modules/@redis/time-series/dist/commands/MRANGE_WITHLABELS.d.ts b/server/node_modules/@redis/time-series/dist/commands/MRANGE_WITHLABELS.d.ts new file mode 100644 index 0000000..99c86e5 --- /dev/null +++ b/server/node_modules/@redis/time-series/dist/commands/MRANGE_WITHLABELS.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArguments } from '@redis/client/dist/lib/commands'; +import { Timestamp, MRangeWithLabelsOptions } from '.'; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(fromTimestamp: Timestamp, toTimestamp: Timestamp, filters: string | Array, options?: MRangeWithLabelsOptions): RedisCommandArguments; +export { transformMRangeWithLabelsReply as transformReply } from '.'; diff --git a/server/node_modules/@redis/time-series/dist/commands/MRANGE_WITHLABELS.js b/server/node_modules/@redis/time-series/dist/commands/MRANGE_WITHLABELS.js new file mode 100644 index 0000000..8a70547 --- /dev/null +++ b/server/node_modules/@redis/time-series/dist/commands/MRANGE_WITHLABELS.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = void 0; +const _1 = require("."); +exports.IS_READ_ONLY = true; +function transformArguments(fromTimestamp, toTimestamp, filters, options) { + return (0, _1.pushMRangeWithLabelsArguments)(['TS.MRANGE'], fromTimestamp, toTimestamp, filters, options); +} +exports.transformArguments = transformArguments; +var _2 = require("."); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return _2.transformMRangeWithLabelsReply; } }); diff --git a/server/node_modules/@redis/time-series/dist/commands/MREVRANGE.d.ts b/server/node_modules/@redis/time-series/dist/commands/MREVRANGE.d.ts new file mode 100644 index 0000000..874d1e5 --- /dev/null +++ b/server/node_modules/@redis/time-series/dist/commands/MREVRANGE.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArguments } from '@redis/client/dist/lib/commands'; +import { MRangeOptions, Timestamp, Filter } from '.'; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(fromTimestamp: Timestamp, toTimestamp: Timestamp, filters: Filter, options?: MRangeOptions): RedisCommandArguments; +export { transformMRangeReply as transformReply } from '.'; diff --git a/server/node_modules/@redis/time-series/dist/commands/MREVRANGE.js b/server/node_modules/@redis/time-series/dist/commands/MREVRANGE.js new file mode 100644 index 0000000..f433633 --- /dev/null +++ b/server/node_modules/@redis/time-series/dist/commands/MREVRANGE.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = void 0; +const _1 = require("."); +exports.IS_READ_ONLY = true; +function transformArguments(fromTimestamp, toTimestamp, filters, options) { + return (0, _1.pushMRangeArguments)(['TS.MREVRANGE'], fromTimestamp, toTimestamp, filters, options); +} +exports.transformArguments = transformArguments; +var _2 = require("."); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return _2.transformMRangeReply; } }); diff --git a/server/node_modules/@redis/time-series/dist/commands/MREVRANGE_WITHLABELS.d.ts b/server/node_modules/@redis/time-series/dist/commands/MREVRANGE_WITHLABELS.d.ts new file mode 100644 index 0000000..0cdbf08 --- /dev/null +++ b/server/node_modules/@redis/time-series/dist/commands/MREVRANGE_WITHLABELS.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArguments } from '@redis/client/dist/lib/commands'; +import { Timestamp, MRangeWithLabelsOptions, Filter } from '.'; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(fromTimestamp: Timestamp, toTimestamp: Timestamp, filters: Filter, options?: MRangeWithLabelsOptions): RedisCommandArguments; +export { transformMRangeWithLabelsReply as transformReply } from '.'; diff --git a/server/node_modules/@redis/time-series/dist/commands/MREVRANGE_WITHLABELS.js b/server/node_modules/@redis/time-series/dist/commands/MREVRANGE_WITHLABELS.js new file mode 100644 index 0000000..81b04c0 --- /dev/null +++ b/server/node_modules/@redis/time-series/dist/commands/MREVRANGE_WITHLABELS.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = void 0; +const _1 = require("."); +exports.IS_READ_ONLY = true; +function transformArguments(fromTimestamp, toTimestamp, filters, options) { + return (0, _1.pushMRangeWithLabelsArguments)(['TS.MREVRANGE'], fromTimestamp, toTimestamp, filters, options); +} +exports.transformArguments = transformArguments; +var _2 = require("."); +Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return _2.transformMRangeWithLabelsReply; } }); diff --git a/server/node_modules/@redis/time-series/dist/commands/QUERYINDEX.d.ts b/server/node_modules/@redis/time-series/dist/commands/QUERYINDEX.d.ts new file mode 100644 index 0000000..10f6c1c --- /dev/null +++ b/server/node_modules/@redis/time-series/dist/commands/QUERYINDEX.d.ts @@ -0,0 +1,5 @@ +import { RedisCommandArguments } from '@redis/client/dist/lib/commands'; +import { Filter } from '.'; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(filter: Filter): RedisCommandArguments; +export declare function transformReply(): Array; diff --git a/server/node_modules/@redis/time-series/dist/commands/QUERYINDEX.js b/server/node_modules/@redis/time-series/dist/commands/QUERYINDEX.js new file mode 100644 index 0000000..37ea026 --- /dev/null +++ b/server/node_modules/@redis/time-series/dist/commands/QUERYINDEX.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformArguments = exports.IS_READ_ONLY = void 0; +const generic_transformers_1 = require("@redis/client/dist/lib/commands/generic-transformers"); +exports.IS_READ_ONLY = true; +function transformArguments(filter) { + return (0, generic_transformers_1.pushVerdictArguments)(['TS.QUERYINDEX'], filter); +} +exports.transformArguments = transformArguments; diff --git a/server/node_modules/@redis/time-series/dist/commands/RANGE.d.ts b/server/node_modules/@redis/time-series/dist/commands/RANGE.d.ts new file mode 100644 index 0000000..07fa6f3 --- /dev/null +++ b/server/node_modules/@redis/time-series/dist/commands/RANGE.d.ts @@ -0,0 +1,6 @@ +import { RedisCommandArguments } from '@redis/client/dist/lib/commands'; +import { RangeOptions, Timestamp, SampleRawReply, SampleReply } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: string, fromTimestamp: Timestamp, toTimestamp: Timestamp, options?: RangeOptions): RedisCommandArguments; +export declare function transformReply(reply: Array): Array; diff --git a/server/node_modules/@redis/time-series/dist/commands/RANGE.js b/server/node_modules/@redis/time-series/dist/commands/RANGE.js new file mode 100644 index 0000000..0136280 --- /dev/null +++ b/server/node_modules/@redis/time-series/dist/commands/RANGE.js @@ -0,0 +1,14 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const _1 = require("."); +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, fromTimestamp, toTimestamp, options) { + return (0, _1.pushRangeArguments)(['TS.RANGE', key], fromTimestamp, toTimestamp, options); +} +exports.transformArguments = transformArguments; +function transformReply(reply) { + return (0, _1.transformRangeReply)(reply); +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/time-series/dist/commands/REVRANGE.d.ts b/server/node_modules/@redis/time-series/dist/commands/REVRANGE.d.ts new file mode 100644 index 0000000..07fa6f3 --- /dev/null +++ b/server/node_modules/@redis/time-series/dist/commands/REVRANGE.d.ts @@ -0,0 +1,6 @@ +import { RedisCommandArguments } from '@redis/client/dist/lib/commands'; +import { RangeOptions, Timestamp, SampleRawReply, SampleReply } from '.'; +export declare const FIRST_KEY_INDEX = 1; +export declare const IS_READ_ONLY = true; +export declare function transformArguments(key: string, fromTimestamp: Timestamp, toTimestamp: Timestamp, options?: RangeOptions): RedisCommandArguments; +export declare function transformReply(reply: Array): Array; diff --git a/server/node_modules/@redis/time-series/dist/commands/REVRANGE.js b/server/node_modules/@redis/time-series/dist/commands/REVRANGE.js new file mode 100644 index 0000000..e3abdac --- /dev/null +++ b/server/node_modules/@redis/time-series/dist/commands/REVRANGE.js @@ -0,0 +1,14 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; +const _1 = require("."); +exports.FIRST_KEY_INDEX = 1; +exports.IS_READ_ONLY = true; +function transformArguments(key, fromTimestamp, toTimestamp, options) { + return (0, _1.pushRangeArguments)(['TS.REVRANGE', key], fromTimestamp, toTimestamp, options); +} +exports.transformArguments = transformArguments; +function transformReply(reply) { + return (0, _1.transformRangeReply)(reply); +} +exports.transformReply = transformReply; diff --git a/server/node_modules/@redis/time-series/dist/commands/index.d.ts b/server/node_modules/@redis/time-series/dist/commands/index.d.ts new file mode 100644 index 0000000..0db3157 --- /dev/null +++ b/server/node_modules/@redis/time-series/dist/commands/index.d.ts @@ -0,0 +1,193 @@ +import * as ADD from './ADD'; +import * as ALTER from './ALTER'; +import * as CREATE from './CREATE'; +import * as CREATERULE from './CREATERULE'; +import * as DECRBY from './DECRBY'; +import * as DEL from './DEL'; +import * as DELETERULE from './DELETERULE'; +import * as GET from './GET'; +import * as INCRBY from './INCRBY'; +import * as INFO_DEBUG from './INFO_DEBUG'; +import * as INFO from './INFO'; +import * as MADD from './MADD'; +import * as MGET from './MGET'; +import * as MGET_WITHLABELS from './MGET_WITHLABELS'; +import * as QUERYINDEX from './QUERYINDEX'; +import * as RANGE from './RANGE'; +import * as REVRANGE from './REVRANGE'; +import * as MRANGE from './MRANGE'; +import * as MRANGE_WITHLABELS from './MRANGE_WITHLABELS'; +import * as MREVRANGE from './MREVRANGE'; +import * as MREVRANGE_WITHLABELS from './MREVRANGE_WITHLABELS'; +import { RedisCommandArguments } from '@redis/client/dist/lib/commands'; +declare const _default: { + ADD: typeof ADD; + add: typeof ADD; + ALTER: typeof ALTER; + alter: typeof ALTER; + CREATE: typeof CREATE; + create: typeof CREATE; + CREATERULE: typeof CREATERULE; + createRule: typeof CREATERULE; + DECRBY: typeof DECRBY; + decrBy: typeof DECRBY; + DEL: typeof DEL; + del: typeof DEL; + DELETERULE: typeof DELETERULE; + deleteRule: typeof DELETERULE; + GET: typeof GET; + get: typeof GET; + INCRBY: typeof INCRBY; + incrBy: typeof INCRBY; + INFO_DEBUG: typeof INFO_DEBUG; + infoDebug: typeof INFO_DEBUG; + INFO: typeof INFO; + info: typeof INFO; + MADD: typeof MADD; + mAdd: typeof MADD; + MGET: typeof MGET; + mGet: typeof MGET; + MGET_WITHLABELS: typeof MGET_WITHLABELS; + mGetWithLabels: typeof MGET_WITHLABELS; + QUERYINDEX: typeof QUERYINDEX; + queryIndex: typeof QUERYINDEX; + RANGE: typeof RANGE; + range: typeof RANGE; + REVRANGE: typeof REVRANGE; + revRange: typeof REVRANGE; + MRANGE: typeof MRANGE; + mRange: typeof MRANGE; + MRANGE_WITHLABELS: typeof MRANGE_WITHLABELS; + mRangeWithLabels: typeof MRANGE_WITHLABELS; + MREVRANGE: typeof MREVRANGE; + mRevRange: typeof MREVRANGE; + MREVRANGE_WITHLABELS: typeof MREVRANGE_WITHLABELS; + mRevRangeWithLabels: typeof MREVRANGE_WITHLABELS; +}; +export default _default; +export declare enum TimeSeriesAggregationType { + AVG = "AVG", + AVERAGE = "AVG", + FIRST = "FIRST", + LAST = "LAST", + MIN = "MIN", + MINIMUM = "MIN", + MAX = "MAX", + MAXIMUM = "MAX", + SUM = "SUM", + RANGE = "RANGE", + COUNT = "COUNT", + STD_P = "STD.P", + STD_S = "STD.S", + VAR_P = "VAR.P", + VAR_S = "VAR.S", + TWA = "TWA" +} +export declare enum TimeSeriesDuplicatePolicies { + BLOCK = "BLOCK", + FIRST = "FIRST", + LAST = "LAST", + MIN = "MIN", + MAX = "MAX", + SUM = "SUM" +} +export declare enum TimeSeriesReducers { + AVG = "AVG", + SUM = "SUM", + MIN = "MIN", + MINIMUM = "MIN", + MAX = "MAX", + MAXIMUM = "MAX", + RANGE = "range", + COUNT = "COUNT", + STD_P = "STD.P", + STD_S = "STD.S", + VAR_P = "VAR.P", + VAR_S = "VAR.S" +} +export type Timestamp = number | Date | string; +export declare function transformTimestampArgument(timestamp: Timestamp): string; +export declare function pushIgnoreArgument(args: RedisCommandArguments, ignore?: ADD.TsIgnoreOptions): void; +export declare function pushRetentionArgument(args: RedisCommandArguments, retention?: number): RedisCommandArguments; +export declare enum TimeSeriesEncoding { + COMPRESSED = "COMPRESSED", + UNCOMPRESSED = "UNCOMPRESSED" +} +export declare function pushEncodingArgument(args: RedisCommandArguments, encoding?: TimeSeriesEncoding): RedisCommandArguments; +export declare function pushChunkSizeArgument(args: RedisCommandArguments, chunkSize?: number): RedisCommandArguments; +export declare function pushDuplicatePolicy(args: RedisCommandArguments, duplicatePolicy?: TimeSeriesDuplicatePolicies): RedisCommandArguments; +export type RawLabels = Array<[label: string, value: string]>; +export type Labels = { + [label: string]: string; +}; +export declare function transformLablesReply(reply: RawLabels): Labels; +export declare function pushLabelsArgument(args: RedisCommandArguments, labels?: Labels): RedisCommandArguments; +export interface IncrDecrOptions { + TIMESTAMP?: Timestamp; + RETENTION?: number; + UNCOMPRESSED?: boolean; + CHUNK_SIZE?: number; + LABELS?: Labels; +} +export declare function transformIncrDecrArguments(command: 'TS.INCRBY' | 'TS.DECRBY', key: string, value: number, options?: IncrDecrOptions): RedisCommandArguments; +export type SampleRawReply = [timestamp: number, value: string]; +export interface SampleReply { + timestamp: number; + value: number; +} +export declare function transformSampleReply(reply: SampleRawReply): SampleReply; +export declare enum TimeSeriesBucketTimestamp { + LOW = "-", + HIGH = "+", + MID = "~" +} +export interface RangeOptions { + LATEST?: boolean; + FILTER_BY_TS?: Array; + FILTER_BY_VALUE?: { + min: number; + max: number; + }; + COUNT?: number; + ALIGN?: Timestamp; + AGGREGATION?: { + type: TimeSeriesAggregationType; + timeBucket: Timestamp; + BUCKETTIMESTAMP?: TimeSeriesBucketTimestamp; + EMPTY?: boolean; + }; +} +export declare function pushRangeArguments(args: RedisCommandArguments, fromTimestamp: Timestamp, toTimestamp: Timestamp, options?: RangeOptions): RedisCommandArguments; +interface MRangeGroupBy { + label: string; + reducer: TimeSeriesReducers; +} +export declare function pushMRangeGroupByArguments(args: RedisCommandArguments, groupBy?: MRangeGroupBy): RedisCommandArguments; +export type Filter = string | Array; +export declare function pushFilterArgument(args: RedisCommandArguments, filter: string | Array): RedisCommandArguments; +export interface MRangeOptions extends RangeOptions { + GROUPBY?: MRangeGroupBy; +} +export declare function pushMRangeArguments(args: RedisCommandArguments, fromTimestamp: Timestamp, toTimestamp: Timestamp, filter: Filter, options?: MRangeOptions): RedisCommandArguments; +export type SelectedLabels = string | Array; +export declare function pushWithLabelsArgument(args: RedisCommandArguments, selectedLabels?: SelectedLabels): RedisCommandArguments; +export interface MRangeWithLabelsOptions extends MRangeOptions { + SELECTED_LABELS?: SelectedLabels; +} +export declare function pushMRangeWithLabelsArguments(args: RedisCommandArguments, fromTimestamp: Timestamp, toTimestamp: Timestamp, filter: Filter, options?: MRangeWithLabelsOptions): RedisCommandArguments; +export declare function transformRangeReply(reply: Array): Array; +type MRangeRawReply = Array<[ + key: string, + labels: RawLabels, + samples: Array +]>; +interface MRangeReplyItem { + key: string; + samples: Array; +} +export declare function transformMRangeReply(reply: MRangeRawReply): Array; +export interface MRangeWithLabelsReplyItem extends MRangeReplyItem { + labels: Labels; +} +export declare function transformMRangeWithLabelsReply(reply: MRangeRawReply): Array; +export declare function pushLatestArgument(args: RedisCommandArguments, latest?: boolean): RedisCommandArguments; diff --git a/server/node_modules/@redis/time-series/dist/commands/index.js b/server/node_modules/@redis/time-series/dist/commands/index.js new file mode 100644 index 0000000..0123582 --- /dev/null +++ b/server/node_modules/@redis/time-series/dist/commands/index.js @@ -0,0 +1,313 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.pushLatestArgument = exports.transformMRangeWithLabelsReply = exports.transformMRangeReply = exports.transformRangeReply = exports.pushMRangeWithLabelsArguments = exports.pushWithLabelsArgument = exports.pushMRangeArguments = exports.pushFilterArgument = exports.pushMRangeGroupByArguments = exports.pushRangeArguments = exports.TimeSeriesBucketTimestamp = exports.transformSampleReply = exports.transformIncrDecrArguments = exports.pushLabelsArgument = exports.transformLablesReply = exports.pushDuplicatePolicy = exports.pushChunkSizeArgument = exports.pushEncodingArgument = exports.TimeSeriesEncoding = exports.pushRetentionArgument = exports.pushIgnoreArgument = exports.transformTimestampArgument = exports.TimeSeriesReducers = exports.TimeSeriesDuplicatePolicies = exports.TimeSeriesAggregationType = void 0; +const ADD = require("./ADD"); +const ALTER = require("./ALTER"); +const CREATE = require("./CREATE"); +const CREATERULE = require("./CREATERULE"); +const DECRBY = require("./DECRBY"); +const DEL = require("./DEL"); +const DELETERULE = require("./DELETERULE"); +const GET = require("./GET"); +const INCRBY = require("./INCRBY"); +const INFO_DEBUG = require("./INFO_DEBUG"); +const INFO = require("./INFO"); +const MADD = require("./MADD"); +const MGET = require("./MGET"); +const MGET_WITHLABELS = require("./MGET_WITHLABELS"); +const QUERYINDEX = require("./QUERYINDEX"); +const RANGE = require("./RANGE"); +const REVRANGE = require("./REVRANGE"); +const MRANGE = require("./MRANGE"); +const MRANGE_WITHLABELS = require("./MRANGE_WITHLABELS"); +const MREVRANGE = require("./MREVRANGE"); +const MREVRANGE_WITHLABELS = require("./MREVRANGE_WITHLABELS"); +const generic_transformers_1 = require("@redis/client/dist/lib/commands/generic-transformers"); +exports.default = { + ADD, + add: ADD, + ALTER, + alter: ALTER, + CREATE, + create: CREATE, + CREATERULE, + createRule: CREATERULE, + DECRBY, + decrBy: DECRBY, + DEL, + del: DEL, + DELETERULE, + deleteRule: DELETERULE, + GET, + get: GET, + INCRBY, + incrBy: INCRBY, + INFO_DEBUG, + infoDebug: INFO_DEBUG, + INFO, + info: INFO, + MADD, + mAdd: MADD, + MGET, + mGet: MGET, + MGET_WITHLABELS, + mGetWithLabels: MGET_WITHLABELS, + QUERYINDEX, + queryIndex: QUERYINDEX, + RANGE, + range: RANGE, + REVRANGE, + revRange: REVRANGE, + MRANGE, + mRange: MRANGE, + MRANGE_WITHLABELS, + mRangeWithLabels: MRANGE_WITHLABELS, + MREVRANGE, + mRevRange: MREVRANGE, + MREVRANGE_WITHLABELS, + mRevRangeWithLabels: MREVRANGE_WITHLABELS +}; +var TimeSeriesAggregationType; +(function (TimeSeriesAggregationType) { + TimeSeriesAggregationType["AVG"] = "AVG"; + // @deprecated + TimeSeriesAggregationType["AVERAGE"] = "AVG"; + TimeSeriesAggregationType["FIRST"] = "FIRST"; + TimeSeriesAggregationType["LAST"] = "LAST"; + TimeSeriesAggregationType["MIN"] = "MIN"; + // @deprecated + TimeSeriesAggregationType["MINIMUM"] = "MIN"; + TimeSeriesAggregationType["MAX"] = "MAX"; + // @deprecated + TimeSeriesAggregationType["MAXIMUM"] = "MAX"; + TimeSeriesAggregationType["SUM"] = "SUM"; + TimeSeriesAggregationType["RANGE"] = "RANGE"; + TimeSeriesAggregationType["COUNT"] = "COUNT"; + TimeSeriesAggregationType["STD_P"] = "STD.P"; + TimeSeriesAggregationType["STD_S"] = "STD.S"; + TimeSeriesAggregationType["VAR_P"] = "VAR.P"; + TimeSeriesAggregationType["VAR_S"] = "VAR.S"; + TimeSeriesAggregationType["TWA"] = "TWA"; +})(TimeSeriesAggregationType || (exports.TimeSeriesAggregationType = TimeSeriesAggregationType = {})); +var TimeSeriesDuplicatePolicies; +(function (TimeSeriesDuplicatePolicies) { + TimeSeriesDuplicatePolicies["BLOCK"] = "BLOCK"; + TimeSeriesDuplicatePolicies["FIRST"] = "FIRST"; + TimeSeriesDuplicatePolicies["LAST"] = "LAST"; + TimeSeriesDuplicatePolicies["MIN"] = "MIN"; + TimeSeriesDuplicatePolicies["MAX"] = "MAX"; + TimeSeriesDuplicatePolicies["SUM"] = "SUM"; +})(TimeSeriesDuplicatePolicies || (exports.TimeSeriesDuplicatePolicies = TimeSeriesDuplicatePolicies = {})); +var TimeSeriesReducers; +(function (TimeSeriesReducers) { + TimeSeriesReducers["AVG"] = "AVG"; + TimeSeriesReducers["SUM"] = "SUM"; + TimeSeriesReducers["MIN"] = "MIN"; + // @deprecated + TimeSeriesReducers["MINIMUM"] = "MIN"; + TimeSeriesReducers["MAX"] = "MAX"; + // @deprecated + TimeSeriesReducers["MAXIMUM"] = "MAX"; + TimeSeriesReducers["RANGE"] = "range"; + TimeSeriesReducers["COUNT"] = "COUNT"; + TimeSeriesReducers["STD_P"] = "STD.P"; + TimeSeriesReducers["STD_S"] = "STD.S"; + TimeSeriesReducers["VAR_P"] = "VAR.P"; + TimeSeriesReducers["VAR_S"] = "VAR.S"; +})(TimeSeriesReducers || (exports.TimeSeriesReducers = TimeSeriesReducers = {})); +function transformTimestampArgument(timestamp) { + if (typeof timestamp === 'string') + return timestamp; + return (typeof timestamp === 'number' ? + timestamp : + timestamp.getTime()).toString(); +} +exports.transformTimestampArgument = transformTimestampArgument; +function pushIgnoreArgument(args, ignore) { + if (ignore !== undefined) { + args.push('IGNORE', ignore.MAX_TIME_DIFF.toString(), ignore.MAX_VAL_DIFF.toString()); + } +} +exports.pushIgnoreArgument = pushIgnoreArgument; +function pushRetentionArgument(args, retention) { + if (retention !== undefined) { + args.push('RETENTION', retention.toString()); + } + return args; +} +exports.pushRetentionArgument = pushRetentionArgument; +var TimeSeriesEncoding; +(function (TimeSeriesEncoding) { + TimeSeriesEncoding["COMPRESSED"] = "COMPRESSED"; + TimeSeriesEncoding["UNCOMPRESSED"] = "UNCOMPRESSED"; +})(TimeSeriesEncoding || (exports.TimeSeriesEncoding = TimeSeriesEncoding = {})); +function pushEncodingArgument(args, encoding) { + if (encoding !== undefined) { + args.push('ENCODING', encoding); + } + return args; +} +exports.pushEncodingArgument = pushEncodingArgument; +function pushChunkSizeArgument(args, chunkSize) { + if (chunkSize !== undefined) { + args.push('CHUNK_SIZE', chunkSize.toString()); + } + return args; +} +exports.pushChunkSizeArgument = pushChunkSizeArgument; +function pushDuplicatePolicy(args, duplicatePolicy) { + if (duplicatePolicy !== undefined) { + args.push('DUPLICATE_POLICY', duplicatePolicy); + } + return args; +} +exports.pushDuplicatePolicy = pushDuplicatePolicy; +function transformLablesReply(reply) { + const labels = {}; + for (const [key, value] of reply) { + labels[key] = value; + } + return labels; +} +exports.transformLablesReply = transformLablesReply; +function pushLabelsArgument(args, labels) { + if (labels) { + args.push('LABELS'); + for (const [label, value] of Object.entries(labels)) { + args.push(label, value); + } + } + return args; +} +exports.pushLabelsArgument = pushLabelsArgument; +function transformIncrDecrArguments(command, key, value, options) { + const args = [ + command, + key, + value.toString() + ]; + if (options?.TIMESTAMP !== undefined && options?.TIMESTAMP !== null) { + args.push('TIMESTAMP', transformTimestampArgument(options.TIMESTAMP)); + } + pushRetentionArgument(args, options?.RETENTION); + if (options?.UNCOMPRESSED) { + args.push('UNCOMPRESSED'); + } + pushChunkSizeArgument(args, options?.CHUNK_SIZE); + pushLabelsArgument(args, options?.LABELS); + return args; +} +exports.transformIncrDecrArguments = transformIncrDecrArguments; +function transformSampleReply(reply) { + return { + timestamp: reply[0], + value: Number(reply[1]) + }; +} +exports.transformSampleReply = transformSampleReply; +var TimeSeriesBucketTimestamp; +(function (TimeSeriesBucketTimestamp) { + TimeSeriesBucketTimestamp["LOW"] = "-"; + TimeSeriesBucketTimestamp["HIGH"] = "+"; + TimeSeriesBucketTimestamp["MID"] = "~"; +})(TimeSeriesBucketTimestamp || (exports.TimeSeriesBucketTimestamp = TimeSeriesBucketTimestamp = {})); +function pushRangeArguments(args, fromTimestamp, toTimestamp, options) { + args.push(transformTimestampArgument(fromTimestamp), transformTimestampArgument(toTimestamp)); + pushLatestArgument(args, options?.LATEST); + if (options?.FILTER_BY_TS) { + args.push('FILTER_BY_TS'); + for (const ts of options.FILTER_BY_TS) { + args.push(transformTimestampArgument(ts)); + } + } + if (options?.FILTER_BY_VALUE) { + args.push('FILTER_BY_VALUE', options.FILTER_BY_VALUE.min.toString(), options.FILTER_BY_VALUE.max.toString()); + } + if (options?.COUNT) { + args.push('COUNT', options.COUNT.toString()); + } + if (options?.ALIGN) { + args.push('ALIGN', transformTimestampArgument(options.ALIGN)); + } + if (options?.AGGREGATION) { + args.push('AGGREGATION', options.AGGREGATION.type, transformTimestampArgument(options.AGGREGATION.timeBucket)); + if (options.AGGREGATION.BUCKETTIMESTAMP) { + args.push('BUCKETTIMESTAMP', options.AGGREGATION.BUCKETTIMESTAMP); + } + if (options.AGGREGATION.EMPTY) { + args.push('EMPTY'); + } + } + return args; +} +exports.pushRangeArguments = pushRangeArguments; +function pushMRangeGroupByArguments(args, groupBy) { + if (groupBy) { + args.push('GROUPBY', groupBy.label, 'REDUCE', groupBy.reducer); + } + return args; +} +exports.pushMRangeGroupByArguments = pushMRangeGroupByArguments; +function pushFilterArgument(args, filter) { + args.push('FILTER'); + return (0, generic_transformers_1.pushVerdictArguments)(args, filter); +} +exports.pushFilterArgument = pushFilterArgument; +function pushMRangeArguments(args, fromTimestamp, toTimestamp, filter, options) { + args = pushRangeArguments(args, fromTimestamp, toTimestamp, options); + args = pushFilterArgument(args, filter); + return pushMRangeGroupByArguments(args, options?.GROUPBY); +} +exports.pushMRangeArguments = pushMRangeArguments; +function pushWithLabelsArgument(args, selectedLabels) { + if (!selectedLabels) { + args.push('WITHLABELS'); + } + else { + args.push('SELECTED_LABELS'); + args = (0, generic_transformers_1.pushVerdictArguments)(args, selectedLabels); + } + return args; +} +exports.pushWithLabelsArgument = pushWithLabelsArgument; +function pushMRangeWithLabelsArguments(args, fromTimestamp, toTimestamp, filter, options) { + args = pushRangeArguments(args, fromTimestamp, toTimestamp, options); + args = pushWithLabelsArgument(args, options?.SELECTED_LABELS); + args = pushFilterArgument(args, filter); + return pushMRangeGroupByArguments(args, options?.GROUPBY); +} +exports.pushMRangeWithLabelsArguments = pushMRangeWithLabelsArguments; +function transformRangeReply(reply) { + return reply.map(transformSampleReply); +} +exports.transformRangeReply = transformRangeReply; +function transformMRangeReply(reply) { + const args = []; + for (const [key, _, sample] of reply) { + args.push({ + key, + samples: sample.map(transformSampleReply) + }); + } + return args; +} +exports.transformMRangeReply = transformMRangeReply; +function transformMRangeWithLabelsReply(reply) { + const args = []; + for (const [key, labels, samples] of reply) { + args.push({ + key, + labels: transformLablesReply(labels), + samples: samples.map(transformSampleReply) + }); + } + return args; +} +exports.transformMRangeWithLabelsReply = transformMRangeWithLabelsReply; +function pushLatestArgument(args, latest) { + if (latest) { + args.push('LATEST'); + } + return args; +} +exports.pushLatestArgument = pushLatestArgument; diff --git a/server/node_modules/@redis/time-series/dist/index.d.ts b/server/node_modules/@redis/time-series/dist/index.d.ts new file mode 100644 index 0000000..308850a --- /dev/null +++ b/server/node_modules/@redis/time-series/dist/index.d.ts @@ -0,0 +1,2 @@ +export { default } from './commands'; +export { TimeSeriesDuplicatePolicies, TimeSeriesEncoding, TimeSeriesAggregationType, TimeSeriesReducers, TimeSeriesBucketTimestamp } from './commands'; diff --git a/server/node_modules/@redis/time-series/dist/index.js b/server/node_modules/@redis/time-series/dist/index.js new file mode 100644 index 0000000..363237e --- /dev/null +++ b/server/node_modules/@redis/time-series/dist/index.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TimeSeriesBucketTimestamp = exports.TimeSeriesReducers = exports.TimeSeriesAggregationType = exports.TimeSeriesEncoding = exports.TimeSeriesDuplicatePolicies = exports.default = void 0; +var commands_1 = require("./commands"); +Object.defineProperty(exports, "default", { enumerable: true, get: function () { return commands_1.default; } }); +var commands_2 = require("./commands"); +Object.defineProperty(exports, "TimeSeriesDuplicatePolicies", { enumerable: true, get: function () { return commands_2.TimeSeriesDuplicatePolicies; } }); +Object.defineProperty(exports, "TimeSeriesEncoding", { enumerable: true, get: function () { return commands_2.TimeSeriesEncoding; } }); +Object.defineProperty(exports, "TimeSeriesAggregationType", { enumerable: true, get: function () { return commands_2.TimeSeriesAggregationType; } }); +Object.defineProperty(exports, "TimeSeriesReducers", { enumerable: true, get: function () { return commands_2.TimeSeriesReducers; } }); +Object.defineProperty(exports, "TimeSeriesBucketTimestamp", { enumerable: true, get: function () { return commands_2.TimeSeriesBucketTimestamp; } }); diff --git a/server/node_modules/@redis/time-series/package.json b/server/node_modules/@redis/time-series/package.json new file mode 100644 index 0000000..65ee1e9 --- /dev/null +++ b/server/node_modules/@redis/time-series/package.json @@ -0,0 +1,41 @@ +{ + "name": "@redis/time-series", + "version": "1.1.0", + "license": "MIT", + "main": "./dist/index.js", + "types": "./dist/index.d.ts", + "files": [ + "dist/" + ], + "scripts": { + "test": "nyc -r text-summary -r lcov mocha -r source-map-support/register -r ts-node/register './lib/**/*.spec.ts'", + "build": "tsc", + "documentation": "typedoc" + }, + "peerDependencies": { + "@redis/client": "^1.0.0" + }, + "devDependencies": { + "@istanbuljs/nyc-config-typescript": "^1.0.2", + "@redis/test-utils": "*", + "@types/node": "^20.6.2", + "nyc": "^15.1.0", + "release-it": "^16.1.5", + "source-map-support": "^0.5.21", + "ts-node": "^10.9.1", + "typedoc": "^0.25.1", + "typescript": "^5.2.2" + }, + "repository": { + "type": "git", + "url": "git://github.com/redis/node-redis.git" + }, + "bugs": { + "url": "https://github.com/redis/node-redis/issues" + }, + "homepage": "https://github.com/redis/node-redis/tree/master/packages/time-series", + "keywords": [ + "redis", + "RedisTimeSeries" + ] +} diff --git a/server/node_modules/cluster-key-slot/.eslintrc b/server/node_modules/cluster-key-slot/.eslintrc new file mode 100644 index 0000000..3ee8296 --- /dev/null +++ b/server/node_modules/cluster-key-slot/.eslintrc @@ -0,0 +1,16 @@ +{ + "extends": "airbnb-base/legacy", + "parserOptions":{ + "ecmaFeatures": { + "experimentalObjectRestSpread": true + } + }, + "rules": { + "max-len": 0, + "no-plusplus": 0, + "no-bitwise": 0, + "no-param-reassign": 0, + "no-undef": 0 + }, + "globals": {} +} diff --git a/server/node_modules/cluster-key-slot/LICENSE b/server/node_modules/cluster-key-slot/LICENSE new file mode 100644 index 0000000..fd22a2d --- /dev/null +++ b/server/node_modules/cluster-key-slot/LICENSE @@ -0,0 +1,13 @@ +Copyright (c) 2018 Mike Diarmid (Salakar) + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this library except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/server/node_modules/cluster-key-slot/README.md b/server/node_modules/cluster-key-slot/README.md new file mode 100644 index 0000000..440f7b1 --- /dev/null +++ b/server/node_modules/cluster-key-slot/README.md @@ -0,0 +1,61 @@ +[![Coverage Status](https://coveralls.io/repos/github/Salakar/cluster-key-slot/badge.svg?branch=master)](https://coveralls.io/github/Salakar/cluster-key-slot?branch=master) +![Downloads](https://img.shields.io/npm/dt/cluster-key-slot.svg) +[![npm version](https://img.shields.io/npm/v/cluster-key-slot.svg)](https://www.npmjs.com/package/cluster-key-slot) +[![dependencies](https://img.shields.io/david/Salakar/cluster-key-slot.svg)](https://david-dm.org/Salakar/cluster-key-slot) +[![License](https://img.shields.io/npm/l/cluster-key-slot.svg)](/LICENSE) +Follow on Twitter + +# Redis Key Slot Calculator + +A high performance redis cluster key slot calculator for node redis clients e.g. [node_redis](https://github.com/NodeRedis/node_redis), [ioredis](https://github.com/luin/ioredis) and [redis-clustr](https://github.com/gosquared/redis-clustr/). + +This also handles key tags such as `somekey{actualTag}`. + +## Install + +Install with [NPM](https://npmjs.org/): + +``` +npm install cluster-key-slot --save +``` + +## Usage + +```js +const calculateSlot = require('cluster-key-slot'); +const calculateMultipleSlots = require('cluster-key-slot').generateMulti; + +// ... + +// a single slot number +const slot = calculateSlot('test:key:{butOnlyThis}redis'); +// Buffer is also supported +const anotherSlot = calculateSlot(Buffer.from([0x7b, 0x7d, 0x2a])); + +// multiple keys - multi returns a single key slot number, returns -1 if any +// of the keys does not match the base slot number (base is defaulted to first keys slot) +// This is useful to quickly determine a singe slot for multi keys operations. +const slotForRedisMulti = calculateMultipleSlots([ + 'test:key:{butOnlyThis}redis', + 'something:key45:{butOnlyThis}hello', + 'example:key46:{butOnlyThis}foobar', +]); +``` + +## Benchmarks + +`OLD` in these benchmarks refers to the `ioredis` crc calc and many of the other calculators that use `Buffer`. + +```text +node -v  ✔  16.38G RAM  10:29:07 +v10.15.3 + +NEW tags x 721,445 ops/sec ±0.44% (90 runs sampled) +OLD tags x 566,777 ops/sec ±0.97% (96 runs sampled) +NEW without tags x 2,054,845 ops/sec ±1.77% (92 runs sampled) +OLD without tags x 865,839 ops/sec ±0.43% (96 runs sampled) +NEW without tags singular x 6,354,097 ops/sec ±1.25% (94 runs sampled) +OLD without tags singular x 4,012,250 ops/sec ±0.96% (94 runs sampled) +NEW tags (Buffer) x 552,346 ops/sec ±1.35% (92 runs sampled) +``` + diff --git a/server/node_modules/cluster-key-slot/index.d.ts b/server/node_modules/cluster-key-slot/index.d.ts new file mode 100644 index 0000000..1713b44 --- /dev/null +++ b/server/node_modules/cluster-key-slot/index.d.ts @@ -0,0 +1,10 @@ +declare module 'cluster-key-slot' { + // Convert a string or Buffer into a redis slot hash. + function calculate(value: string | Buffer): number; + + // Convert an array of multiple strings or Buffers into a redis slot hash. + // Returns -1 if one of the keys is not for the same slot as the others + export function generateMulti(values: Array): number; + + export = calculate; +} \ No newline at end of file diff --git a/server/node_modules/cluster-key-slot/lib/index.js b/server/node_modules/cluster-key-slot/lib/index.js new file mode 100644 index 0000000..7928c77 --- /dev/null +++ b/server/node_modules/cluster-key-slot/lib/index.js @@ -0,0 +1,166 @@ +/* + * Copyright 2001-2010 Georges Menie (www.menie.org) + * Copyright 2010 Salvatore Sanfilippo (adapted to Redis coding style) + * Copyright 2015 Zihua Li (http://zihua.li) (ported to JavaScript) + * Copyright 2016 Mike Diarmid (http://github.com/salakar) (re-write for performance, ~700% perf inc) + * All rights reserved. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the University of California, Berkeley nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* CRC16 implementation according to CCITT standards. + * + * Note by @antirez: this is actually the XMODEM CRC 16 algorithm, using the + * following parameters: + * + * Name : "XMODEM", also known as "ZMODEM", "CRC-16/ACORN" + * Width : 16 bit + * Poly : 1021 (That is actually x^16 + x^12 + x^5 + 1) + * Initialization : 0000 + * Reflect Input byte : False + * Reflect Output CRC : False + * Xor constant to output CRC : 0000 + * Output for "123456789" : 31C3 + */ + +var lookup = [ + 0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50a5, 0x60c6, 0x70e7, + 0x8108, 0x9129, 0xa14a, 0xb16b, 0xc18c, 0xd1ad, 0xe1ce, 0xf1ef, + 0x1231, 0x0210, 0x3273, 0x2252, 0x52b5, 0x4294, 0x72f7, 0x62d6, + 0x9339, 0x8318, 0xb37b, 0xa35a, 0xd3bd, 0xc39c, 0xf3ff, 0xe3de, + 0x2462, 0x3443, 0x0420, 0x1401, 0x64e6, 0x74c7, 0x44a4, 0x5485, + 0xa56a, 0xb54b, 0x8528, 0x9509, 0xe5ee, 0xf5cf, 0xc5ac, 0xd58d, + 0x3653, 0x2672, 0x1611, 0x0630, 0x76d7, 0x66f6, 0x5695, 0x46b4, + 0xb75b, 0xa77a, 0x9719, 0x8738, 0xf7df, 0xe7fe, 0xd79d, 0xc7bc, + 0x48c4, 0x58e5, 0x6886, 0x78a7, 0x0840, 0x1861, 0x2802, 0x3823, + 0xc9cc, 0xd9ed, 0xe98e, 0xf9af, 0x8948, 0x9969, 0xa90a, 0xb92b, + 0x5af5, 0x4ad4, 0x7ab7, 0x6a96, 0x1a71, 0x0a50, 0x3a33, 0x2a12, + 0xdbfd, 0xcbdc, 0xfbbf, 0xeb9e, 0x9b79, 0x8b58, 0xbb3b, 0xab1a, + 0x6ca6, 0x7c87, 0x4ce4, 0x5cc5, 0x2c22, 0x3c03, 0x0c60, 0x1c41, + 0xedae, 0xfd8f, 0xcdec, 0xddcd, 0xad2a, 0xbd0b, 0x8d68, 0x9d49, + 0x7e97, 0x6eb6, 0x5ed5, 0x4ef4, 0x3e13, 0x2e32, 0x1e51, 0x0e70, + 0xff9f, 0xefbe, 0xdfdd, 0xcffc, 0xbf1b, 0xaf3a, 0x9f59, 0x8f78, + 0x9188, 0x81a9, 0xb1ca, 0xa1eb, 0xd10c, 0xc12d, 0xf14e, 0xe16f, + 0x1080, 0x00a1, 0x30c2, 0x20e3, 0x5004, 0x4025, 0x7046, 0x6067, + 0x83b9, 0x9398, 0xa3fb, 0xb3da, 0xc33d, 0xd31c, 0xe37f, 0xf35e, + 0x02b1, 0x1290, 0x22f3, 0x32d2, 0x4235, 0x5214, 0x6277, 0x7256, + 0xb5ea, 0xa5cb, 0x95a8, 0x8589, 0xf56e, 0xe54f, 0xd52c, 0xc50d, + 0x34e2, 0x24c3, 0x14a0, 0x0481, 0x7466, 0x6447, 0x5424, 0x4405, + 0xa7db, 0xb7fa, 0x8799, 0x97b8, 0xe75f, 0xf77e, 0xc71d, 0xd73c, + 0x26d3, 0x36f2, 0x0691, 0x16b0, 0x6657, 0x7676, 0x4615, 0x5634, + 0xd94c, 0xc96d, 0xf90e, 0xe92f, 0x99c8, 0x89e9, 0xb98a, 0xa9ab, + 0x5844, 0x4865, 0x7806, 0x6827, 0x18c0, 0x08e1, 0x3882, 0x28a3, + 0xcb7d, 0xdb5c, 0xeb3f, 0xfb1e, 0x8bf9, 0x9bd8, 0xabbb, 0xbb9a, + 0x4a75, 0x5a54, 0x6a37, 0x7a16, 0x0af1, 0x1ad0, 0x2ab3, 0x3a92, + 0xfd2e, 0xed0f, 0xdd6c, 0xcd4d, 0xbdaa, 0xad8b, 0x9de8, 0x8dc9, + 0x7c26, 0x6c07, 0x5c64, 0x4c45, 0x3ca2, 0x2c83, 0x1ce0, 0x0cc1, + 0xef1f, 0xff3e, 0xcf5d, 0xdf7c, 0xaf9b, 0xbfba, 0x8fd9, 0x9ff8, + 0x6e17, 0x7e36, 0x4e55, 0x5e74, 0x2e93, 0x3eb2, 0x0ed1, 0x1ef0 +]; + +/** + * Convert a string to a UTF8 array - faster than via buffer + * @param str + * @returns {Array} + */ +var toUTF8Array = function toUTF8Array(str) { + var char; + var i = 0; + var p = 0; + var utf8 = []; + var len = str.length; + + for (; i < len; i++) { + char = str.charCodeAt(i); + if (char < 128) { + utf8[p++] = char; + } else if (char < 2048) { + utf8[p++] = (char >> 6) | 192; + utf8[p++] = (char & 63) | 128; + } else if ( + ((char & 0xFC00) === 0xD800) && (i + 1) < str.length && + ((str.charCodeAt(i + 1) & 0xFC00) === 0xDC00)) { + char = 0x10000 + ((char & 0x03FF) << 10) + (str.charCodeAt(++i) & 0x03FF); + utf8[p++] = (char >> 18) | 240; + utf8[p++] = ((char >> 12) & 63) | 128; + utf8[p++] = ((char >> 6) & 63) | 128; + utf8[p++] = (char & 63) | 128; + } else { + utf8[p++] = (char >> 12) | 224; + utf8[p++] = ((char >> 6) & 63) | 128; + utf8[p++] = (char & 63) | 128; + } + } + + return utf8; +}; + +/** + * Convert a string into a redis slot hash. + * @param str + * @returns {number} + */ +var generate = module.exports = function generate(str) { + var char; + var i = 0; + var start = -1; + var result = 0; + var resultHash = 0; + var utf8 = typeof str === 'string' ? toUTF8Array(str) : str; + var len = utf8.length; + + while (i < len) { + char = utf8[i++]; + if (start === -1) { + if (char === 0x7B) { + start = i; + } + } else if (char !== 0x7D) { + resultHash = lookup[(char ^ (resultHash >> 8)) & 0xFF] ^ (resultHash << 8); + } else if (i - 1 !== start) { + return resultHash & 0x3FFF; + } + + result = lookup[(char ^ (result >> 8)) & 0xFF] ^ (result << 8); + } + + return result & 0x3FFF; +}; + +/** + * Convert an array of multiple strings into a redis slot hash. + * Returns -1 if one of the keys is not for the same slot as the others + * @param keys + * @returns {number} + */ +module.exports.generateMulti = function generateMulti(keys) { + var i = 1; + var len = keys.length; + var base = generate(keys[0]); + + while (i < len) { + if (generate(keys[i++]) !== base) return -1; + } + + return base; +}; diff --git a/server/node_modules/cluster-key-slot/package.json b/server/node_modules/cluster-key-slot/package.json new file mode 100644 index 0000000..f75d3d6 --- /dev/null +++ b/server/node_modules/cluster-key-slot/package.json @@ -0,0 +1,56 @@ +{ + "name": "cluster-key-slot", + "version": "1.1.2", + "description": "Generates CRC hashes for strings - for use by node redis clients to determine key slots.", + "main": "lib/index.js", + "types": "index.d.ts", + "scripts": { + "benchmark": "node ./benchmark", + "posttest": "eslint ./lib && npm run coveralls", + "coveralls": "cat ./coverage/lcov.info | coveralls", + "test": "node ./node_modules/istanbul/lib/cli.js cover --preserve-comments ./node_modules/mocha/bin/_mocha -- -R spec", + "coverage:check": "node ./node_modules/istanbul/lib/cli.js check-coverage --branch 100 --statement 100" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/Salakar/cluster-key-slot.git" + }, + "keywords": [ + "redis", + "hash", + "crc", + "slot", + "calc", + "javascript", + "node", + "node_redis", + "ioredis" + ], + "engines": { + "node": ">=0.10.0" + }, + "devDependencies": { + "benchmark": "^2.1.0", + "codeclimate-test-reporter": "^0.3.1", + "coveralls": "^2.11.9", + "eslint": "^3.5.0", + "eslint-config-airbnb-base": "^7.1.0", + "eslint-plugin-import": "^1.8.0", + "istanbul": "^0.4.0", + "mocha": "^3.0.2" + }, + "author": { + "name": "Mike Diarmid", + "email": "mike.diarmid@gmail.com", + "url": "http://github.com/Salakar/" + }, + "license": "Apache-2.0", + "bugs": { + "url": "https://github.com/Salakar/cluster-key-slot/issues" + }, + "homepage": "https://github.com/Salakar/cluster-key-slot#readme", + "directories": { + "test": "test", + "lib": "lib" + } +} diff --git a/server/node_modules/generic-pool/README.md b/server/node_modules/generic-pool/README.md new file mode 100644 index 0000000..9a3850d --- /dev/null +++ b/server/node_modules/generic-pool/README.md @@ -0,0 +1,407 @@ +[![build status](https://secure.travis-ci.org/coopernurse/node-pool.png)](http://travis-ci.org/coopernurse/node-pool) + +# Generic Pool + +## About + + Generic resource pool with Promise based API. Can be used to reuse or throttle usage of expensive resources such as database connections. + + + +**V3 upgrade warning** + +Version 3 contains many breaking changes. The differences are mostly minor and I hope easy to accommodate. There is a very rough and basic [upgrade guide](https://gist.github.com/sandfox/5ca20648b60a0cb959638c0cd6fcd02d) I've written, improvements and other attempts most welcome. + +If you are after the older version 2 of this library you should look at the [current github branch](https://github.com/coopernurse/node-pool/tree/v2.5) for it. + + +## History + +The history has been moved to the [CHANGELOG](CHANGELOG.md) + + +## Installation + +```sh +$ npm install generic-pool [--save] +``` + + +## Example + +Here is an example using a fictional generic database driver that doesn't implement any pooling whatsoever itself. + +```js +const genericPool = require("generic-pool"); +const DbDriver = require("some-db-driver"); + +/** + * Step 1 - Create pool using a factory object + */ +const factory = { + create: function() { + return DbDriver.createClient(); + }, + destroy: function(client) { + client.disconnect(); + } +}; + +const opts = { + max: 10, // maximum size of the pool + min: 2 // minimum size of the pool +}; + +const myPool = genericPool.createPool(factory, opts); + +/** + * Step 2 - Use pool in your code to acquire/release resources + */ + +// acquire connection - Promise is resolved +// once a resource becomes available +const resourcePromise = myPool.acquire(); + +resourcePromise + .then(function(client) { + client.query("select * from foo", [], function() { + // return object back to pool + myPool.release(client); + }); + }) + .catch(function(err) { + // handle error - this is generally a timeout or maxWaitingClients + // error + }); + +/** + * Step 3 - Drain pool during shutdown (optional) + */ +// Only call this once in your application -- at the point you want +// to shutdown and stop using this pool. +myPool.drain().then(function() { + myPool.clear(); +}); + +``` + + +## Documentation + + + +### Creating a pool + +Whilst it is possible to directly instantiate the Pool class directly, it is recommended to use the `createPool` function exported by module as the constructor method signature may change in the future. + +### createPool + +The createPool function takes two arguments: + +- `factory` : an object containing functions to create/destroy/test resources for the `Pool` +- `opts` : an optional object/dictonary to allow configuring/altering behaviour of the `Pool` + +```js +const genericPool = require('generic-pool') +const pool = genericPool.createPool(factory, opts) +``` + +**factory** + +Can be any object/instance but must have the following properties: + +- `create` : a function that the pool will call when it wants a new resource. It should return a Promise that either resolves to a `resource` or rejects to an `Error` if it is unable to create a resource for whatever reason. +- `destroy`: a function that the pool will call when it wants to destroy a resource. It should accept one argument `resource` where `resource` is whatever `factory.create` made. The `destroy` function should return a `Promise` that resolves once it has destroyed the resource. + + +optionally it can also have the following property: + +- `validate`: a function that the pool will call if it wants to validate a resource. It should accept one argument `resource` where `resource` is whatever `factory.create` made. Should return a `Promise` that resolves a `boolean` where `true` indicates the resource is still valid or `false` if the resource is invalid. + +_Note: The values returned from `create`, `destroy`, and `validate` are all wrapped in a `Promise.resolve` by the pool before being used internally._ + +**opts** + +An optional object/dictionary with the any of the following properties: + +- `max`: maximum number of resources to create at any given time. (default=1) +- `min`: minimum number of resources to keep in pool at any given time. If this is set >= max, the pool will silently set the min to equal `max`. (default=0) +- `maxWaitingClients`: maximum number of queued requests allowed, additional `acquire` calls will be callback with an `err` in a future cycle of the event loop. +- `testOnBorrow`: `boolean`: should the pool validate resources before giving them to clients. Requires that `factory.validate` is specified. +- `acquireTimeoutMillis`: max milliseconds an `acquire` call will wait for a resource before timing out. (default no limit), if supplied should non-zero positive integer. +- `destroyTimeoutMillis`: max milliseconds a `destroy` call will wait for a resource before timing out. (default no limit), if supplied should non-zero positive integer. +- `fifo` : if true the oldest resources will be first to be allocated. If false the most recently released resources will be the first to be allocated. This in effect turns the pool's behaviour from a queue into a stack. `boolean`, (default true) +- `priorityRange`: int between 1 and x - if set, borrowers can specify their relative priority in the queue if no resources are available. + see example. (default 1) +- `autostart`: boolean, should the pool start creating resources, initialize the evictor, etc once the constructor is called. If false, the pool can be started by calling `pool.start`, otherwise the first call to `acquire` will start the pool. (default true) +- `evictionRunIntervalMillis`: How often to run eviction checks. Default: 0 (does not run). +- `numTestsPerEvictionRun`: Number of resources to check each eviction run. Default: 3. +- `softIdleTimeoutMillis`: amount of time an object may sit idle in the pool before it is eligible for eviction by the idle object evictor (if any), with the extra condition that at least "min idle" object instances remain in the pool. Default -1 (nothing can get evicted) +- `idleTimeoutMillis`: the minimum amount of time that an object may sit idle in the pool before it is eligible for eviction due to idle time. Supercedes `softIdleTimeoutMillis` Default: 30000 +- `Promise`: Promise lib, a Promises/A+ implementation that the pool should use. Defaults to whatever `global.Promise` is (usually native promises). + +### pool.acquire + +```js +const onfulfilled = function(resource){ + resource.doStuff() + // release/destroy/etc +} + +pool.acquire().then(onfulfilled) +//or +const priority = 2 +pool.acquire(priority).then(onfulfilled) +``` + +This function is for when you want to "borrow" a resource from the pool. + +`acquire` takes one optional argument: + +- `priority`: optional, number, see **Priority Queueing** below. + +and returns a `Promise` +Once a resource in the pool is available, the promise will be resolved with a `resource` (whatever `factory.create` makes for you). If the Pool is unable to give a resource (e.g timeout) then the promise will be rejected with an `Error` + +### pool.release + +```js +pool.release(resource) +``` + +This function is for when you want to return a resource to the pool. + +`release` takes one required argument: + +- `resource`: a previously borrowed resource + +and returns a `Promise`. This promise will resolve once the `resource` is accepted by the pool, or reject if the pool is unable to accept the `resource` for any reason (e.g `resource` is not a resource or object that came from the pool). If you do not care the outcome it is safe to ignore this promise. + +### pool.isBorrowedResource + +```js +pool.isBorrowedResource(resource) +``` + +This function is for when you need to check if a resource has been acquired from the pool and not yet released/destroyed. + +`isBorrowedResource` takes one required argument: + +- `resource`: any object which you need to test + +and returns true (primitive, not Promise) if resource is currently borrowed from the pool, false otherwise. + +### pool.destroy + +```js +pool.destroy(resource) +``` + +This function is for when you want to return a resource to the pool but want it destroyed rather than being made available to other resources. E.g you may know the resource has timed out or crashed. + +`destroy` takes one required argument: + +- `resource`: a previously borrowed resource + +and returns a `Promise`. This promise will resolve once the `resource` is accepted by the pool, or reject if the pool is unable to accept the `resource` for any reason (e.g `resource` is not a resource or object that came from the pool). If you do not care the outcome it is safe to ignore this promise. + +### pool.on + +```js +pool.on('factoryCreateError', function(err){ + //log stuff maybe +}) + +pool.on('factoryDestroyError', function(err){ + //log stuff maybe +}) +``` + +The pool is an event emitter. Below are the events it emits and any args for those events + +- `factoryCreateError` : emitted when a promise returned by `factory.create` is rejected. If this event has no listeners then the `error` will be silently discarded + - `error`: whatever `reason` the promise was rejected with. + +- `factoryDestroyError` : emitted when a promise returned by `factory.destroy` is rejected. If this event has no listeners then the `error` will be silently discarded + - `error`: whatever `reason` the promise was rejected with. + +### pool.start + +```js +pool.start() +``` + +If `autostart` is `false` then this method can be used to start the pool and therefore begin creation of resources, start the evictor, and any other internal logic. + +### pool.ready + +```js +pool.ready() +``` + +Waits for the pool to fully start. + +### pool.use + +```js + +const myTask = dbClient => { + return new Promise( (resolve, reject) => { + // do something with the client and resolve/reject + }) +} + +pool.use(myTask).then(/* a promise that will run after myTask resolves */) +``` + +This method handles acquiring a `resource` from the pool, handing it to your function and then calling `pool.release` or `pool.destroy` with resource after your function has finished. + +`use` takes one required argument: + +- `fn`: a function that accepts a `resource` and returns a `Promise`. Once that promise `resolve`s the `resource` is returned to the pool, else if it `reject`s then the resource is destroyed. +- `priority`: Optionally, you can specify the priority as number. See [Priority Queueing](#priority-queueing) section. + +and returns a `Promise` that either `resolve`s with the value from the user supplied `fn` or `reject`s with an error. + +## Idle Object Eviction + +The pool has an evictor (off by default) which will inspect idle items in the pool and `destroy` them if they are too old. + +By default the evictor does not run, to enable it you must set the `evictionRunIntervalMillis` option to a non-zero value. Once enable the evictor will check at most `numTestsPerEvictionRun` each time, this is to stop it blocking your application if you have lots of resources in the pool. + + +## Priority Queueing + +The pool supports optional priority queueing. This becomes relevant when no resources are available and the caller has to wait. `acquire()` accepts an optional priority int which +specifies the caller's relative position in the queue. Each priority slot has it's own internal queue created for it. When a resource is available for borrowing, the first request in the highest priority queue will be given it. + +Specifying a `priority` to `acquire` that is outside the `priorityRange` set at `Pool` creation time will result in the `priority` being converted the lowest possible `priority` + +```js +// create pool with priorityRange of 3 +// borrowers can specify a priority 0 to 2 +const opts = { + priorityRange : 3 +} +const pool = genericPool.createPool(someFactory,opts); + +// acquire connection - no priority specified - will go onto lowest priority queue +pool.acquire().then(function(client) { + pool.release(client); +}); + +// acquire connection - high priority - will go into highest priority queue +pool.acquire(0).then(function(client) { + pool.release(client); +}); + +// acquire connection - medium priority - will go into 'mid' priority queue +pool.acquire(1).then(function(client) { + pool.release(client); +}); + +// etc.. +``` + +## Draining + +If you are shutting down a long-lived process, you may notice +that node fails to exit for 30 seconds or so. This is a side +effect of the idleTimeoutMillis behavior -- the pool has a +setTimeout() call registered that is in the event loop queue, so +node won't terminate until all resources have timed out, and the pool +stops trying to manage them. + +This behavior will be more problematic when you set factory.min > 0, +as the pool will never become empty, and the setTimeout calls will +never end. + +In these cases, use the pool.drain() function. This sets the pool +into a "draining" state which will gracefully wait until all +idle resources have timed out. For example, you can call: + +If you do this, your node process will exit gracefully. + +If you know you would like to terminate all the available resources in your pool before any timeouts they might have are reached, you can use `clear()` in conjunction with `drain()`: + +```js +const p = pool.drain() +.then(function() { + return pool.clear(); +}); +``` +The `promise` returned will resolve once all waiting clients have acquired and return resources, and any available resources have been destroyed + +One side-effect of calling `drain()` is that subsequent calls to `acquire()` +will throw an Error. + +## Pooled function decoration + +This has now been extracted out it's own module [generic-pool-decorator](https://github.com/sandfox/generic-pool-decorator) + +## Pool info + +The following properties will let you get information about the pool: + +```js + +// How many many more resources can the pool manage/create +pool.spareResourceCapacity + +// returns number of resources in the pool regardless of +// whether they are free or in use +pool.size + +// returns number of unused resources in the pool +pool.available + +// number of resources that are currently acquired by userland code +pool.borrowed + +// returns number of callers waiting to acquire a resource +pool.pending + +// returns number of maxixmum number of resources allowed by pool +pool.max + +// returns number of minimum number of resources allowed by pool +pool.min + +``` + +## Run Tests + + $ npm install + $ npm test + +The tests are run/written using Tap. Most are ports from the old espresso tests and are not in great condition. Most cases are inside `test/generic-pool-test.js` with newer cases in their own files (legacy reasons). + +## Linting + +We use eslint combined with prettier + + +## License + +(The MIT License) + +Copyright (c) 2010-2016 James Cooper <james@bitmechanic.com> + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/server/node_modules/generic-pool/index.d.ts b/server/node_modules/generic-pool/index.d.ts new file mode 100644 index 0000000..8b4bae8 --- /dev/null +++ b/server/node_modules/generic-pool/index.d.ts @@ -0,0 +1,51 @@ +// Type definitions for node-pool 3.1 +// Derived from https://github.com/DefinitelyTyped/DefinitelyTyped +// -> https://github.com/DefinitelyTyped/DefinitelyTyped/blob/454dcbcbe5e932010b128dca9793758dd28adb45/types/generic-pool/index.d.ts + +/// + +import { EventEmitter } from "events"; + +export class Pool extends EventEmitter { + spareResourceCapacity: number; + size: number; + available: number; + borrowed: number; + pending: number; + max: number; + min: number; + + start(): void; + acquire(priority?: number): Promise; + release(resource: T): Promise; + destroy(resource: T): Promise; + drain(): Promise; + clear(): Promise; + use(cb: (resource: T) => U | Promise): Promise; + isBorrowedResource(resource: T): boolean; + ready(): Promise; +} + +export interface Factory { + create(): Promise; + destroy(client: T): Promise; + validate?(client: T): Promise; +} + +export interface Options { + max?: number; + min?: number; + maxWaitingClients?: number; + testOnBorrow?: boolean; + testOnReturn?: boolean; + acquireTimeoutMillis?: number; + fifo?: boolean; + priorityRange?: number; + autostart?: boolean; + evictionRunIntervalMillis?: number; + numTestsPerEvictionRun?: number; + softIdleTimeoutMillis?: number; + idleTimeoutMillis?: number; +} + +export function createPool(factory: Factory, opts?: Options): Pool; diff --git a/server/node_modules/generic-pool/index.js b/server/node_modules/generic-pool/index.js new file mode 100644 index 0000000..ddb53ae --- /dev/null +++ b/server/node_modules/generic-pool/index.js @@ -0,0 +1,13 @@ +const Pool = require("./lib/Pool"); +const Deque = require("./lib/Deque"); +const PriorityQueue = require("./lib/PriorityQueue"); +const DefaultEvictor = require("./lib/DefaultEvictor"); +module.exports = { + Pool: Pool, + Deque: Deque, + PriorityQueue: PriorityQueue, + DefaultEvictor: DefaultEvictor, + createPool: function(factory, config) { + return new Pool(DefaultEvictor, Deque, PriorityQueue, factory, config); + } +}; diff --git a/server/node_modules/generic-pool/lib/DefaultEvictor.js b/server/node_modules/generic-pool/lib/DefaultEvictor.js new file mode 100644 index 0000000..658d345 --- /dev/null +++ b/server/node_modules/generic-pool/lib/DefaultEvictor.js @@ -0,0 +1,23 @@ +"use strict"; + +class DefaultEvictor { + evict(config, pooledResource, availableObjectsCount) { + const idleTime = Date.now() - pooledResource.lastIdleTime; + + if ( + config.softIdleTimeoutMillis > 0 && + config.softIdleTimeoutMillis < idleTime && + config.min < availableObjectsCount + ) { + return true; + } + + if (config.idleTimeoutMillis < idleTime) { + return true; + } + + return false; + } +} + +module.exports = DefaultEvictor; diff --git a/server/node_modules/generic-pool/lib/Deferred.js b/server/node_modules/generic-pool/lib/Deferred.js new file mode 100644 index 0000000..b38c22a --- /dev/null +++ b/server/node_modules/generic-pool/lib/Deferred.js @@ -0,0 +1,49 @@ +"use strict"; + +/** + * This is apparently a bit like a Jquery deferred, hence the name + */ + +class Deferred { + constructor(Promise) { + this._state = Deferred.PENDING; + this._resolve = undefined; + this._reject = undefined; + + this._promise = new Promise((resolve, reject) => { + this._resolve = resolve; + this._reject = reject; + }); + } + + get state() { + return this._state; + } + + get promise() { + return this._promise; + } + + reject(reason) { + if (this._state !== Deferred.PENDING) { + return; + } + this._state = Deferred.REJECTED; + this._reject(reason); + } + + resolve(value) { + if (this._state !== Deferred.PENDING) { + return; + } + this._state = Deferred.FULFILLED; + this._resolve(value); + } +} + +// TODO: should these really live here? or be a seperate 'state' enum +Deferred.PENDING = "PENDING"; +Deferred.FULFILLED = "FULFILLED"; +Deferred.REJECTED = "REJECTED"; + +module.exports = Deferred; diff --git a/server/node_modules/generic-pool/lib/Deque.js b/server/node_modules/generic-pool/lib/Deque.js new file mode 100644 index 0000000..552ec3b --- /dev/null +++ b/server/node_modules/generic-pool/lib/Deque.js @@ -0,0 +1,106 @@ +"use strict"; + +const DoublyLinkedList = require("./DoublyLinkedList"); +const DequeIterator = require("./DequeIterator"); +/** + * DoublyLinkedList backed double ended queue + * implements just enough to keep the Pool + */ +class Deque { + constructor() { + this._list = new DoublyLinkedList(); + } + + /** + * removes and returns the first element from the queue + * @return {any} [description] + */ + shift() { + if (this.length === 0) { + return undefined; + } + + const node = this._list.head; + this._list.remove(node); + + return node.data; + } + + /** + * adds one elemts to the beginning of the queue + * @param {any} element [description] + * @return {any} [description] + */ + unshift(element) { + const node = DoublyLinkedList.createNode(element); + + this._list.insertBeginning(node); + } + + /** + * adds one to the end of the queue + * @param {any} element [description] + * @return {any} [description] + */ + push(element) { + const node = DoublyLinkedList.createNode(element); + + this._list.insertEnd(node); + } + + /** + * removes and returns the last element from the queue + */ + pop() { + if (this.length === 0) { + return undefined; + } + + const node = this._list.tail; + this._list.remove(node); + + return node.data; + } + + [Symbol.iterator]() { + return new DequeIterator(this._list); + } + + iterator() { + return new DequeIterator(this._list); + } + + reverseIterator() { + return new DequeIterator(this._list, true); + } + + /** + * get a reference to the item at the head of the queue + * @return {any} [description] + */ + get head() { + if (this.length === 0) { + return undefined; + } + const node = this._list.head; + return node.data; + } + + /** + * get a reference to the item at the tail of the queue + * @return {any} [description] + */ + get tail() { + if (this.length === 0) { + return undefined; + } + const node = this._list.tail; + return node.data; + } + + get length() { + return this._list.length; + } +} + +module.exports = Deque; diff --git a/server/node_modules/generic-pool/lib/DequeIterator.js b/server/node_modules/generic-pool/lib/DequeIterator.js new file mode 100644 index 0000000..0f1f461 --- /dev/null +++ b/server/node_modules/generic-pool/lib/DequeIterator.js @@ -0,0 +1,20 @@ +"use strict"; + +const DoublyLinkedListIterator = require("./DoublyLinkedListIterator"); +/** + * Thin wrapper around an underlying DDL iterator + */ +class DequeIterator extends DoublyLinkedListIterator { + next() { + const result = super.next(); + + // unwrap the node... + if (result.value) { + result.value = result.value.data; + } + + return result; + } +} + +module.exports = DequeIterator; diff --git a/server/node_modules/generic-pool/lib/DoublyLinkedList.js b/server/node_modules/generic-pool/lib/DoublyLinkedList.js new file mode 100644 index 0000000..a207a40 --- /dev/null +++ b/server/node_modules/generic-pool/lib/DoublyLinkedList.js @@ -0,0 +1,94 @@ +"use strict"; + +/** + * A Doubly Linked List, because there aren't enough in the world... + * this is pretty much a direct JS port of the one wikipedia + * https://en.wikipedia.org/wiki/Doubly_linked_list + * + * For most usage 'insertBeginning' and 'insertEnd' should be enough + * + * nodes are expected to something like a POJSO like + * { + * prev: null, + * next: null, + * something: 'whatever you like' + * } + */ +class DoublyLinkedList { + constructor() { + this.head = null; + this.tail = null; + this.length = 0; + } + + insertBeginning(node) { + if (this.head === null) { + this.head = node; + this.tail = node; + node.prev = null; + node.next = null; + this.length++; + } else { + this.insertBefore(this.head, node); + } + } + + insertEnd(node) { + if (this.tail === null) { + this.insertBeginning(node); + } else { + this.insertAfter(this.tail, node); + } + } + + insertAfter(node, newNode) { + newNode.prev = node; + newNode.next = node.next; + if (node.next === null) { + this.tail = newNode; + } else { + node.next.prev = newNode; + } + node.next = newNode; + this.length++; + } + + insertBefore(node, newNode) { + newNode.prev = node.prev; + newNode.next = node; + if (node.prev === null) { + this.head = newNode; + } else { + node.prev.next = newNode; + } + node.prev = newNode; + this.length++; + } + + remove(node) { + if (node.prev === null) { + this.head = node.next; + } else { + node.prev.next = node.next; + } + if (node.next === null) { + this.tail = node.prev; + } else { + node.next.prev = node.prev; + } + node.prev = null; + node.next = null; + this.length--; + } + + // FIXME: this should not live here and has become a dumping ground... + static createNode(data) { + return { + prev: null, + next: null, + data: data + }; + } +} + +module.exports = DoublyLinkedList; diff --git a/server/node_modules/generic-pool/lib/DoublyLinkedListIterator.js b/server/node_modules/generic-pool/lib/DoublyLinkedListIterator.js new file mode 100644 index 0000000..7304a1a --- /dev/null +++ b/server/node_modules/generic-pool/lib/DoublyLinkedListIterator.js @@ -0,0 +1,100 @@ +"use strict"; + +/** + * Creates an interator for a DoublyLinkedList starting at the given node + * It's internal cursor will remains relative to the last "iterated" node as that + * node moves through the list until it either iterates to the end of the list, + * or the the node it's tracking is removed from the list. Until the first 'next' + * call it tracks the head/tail of the linked list. This means that one can create + * an iterator on an empty list, then add nodes, and then the iterator will follow + * those nodes. Because the DoublyLinkedList nodes don't track their owning "list" and + * it's highly inefficient to walk the list for every iteration, the iterator won't know + * if the node has been detached from one List and added to another list, or if the iterator + * + * The created object is an es6 compatible iterator + */ +class DoublyLinkedListIterator { + /** + * @param {Object} doublyLinkedList a node that is part of a doublyLinkedList + * @param {Boolean} [reverse=false] is this a reverse iterator? default: false + */ + constructor(doublyLinkedList, reverse) { + this._list = doublyLinkedList; + // NOTE: these key names are tied to the DoublyLinkedListIterator + this._direction = reverse === true ? "prev" : "next"; + this._startPosition = reverse === true ? "tail" : "head"; + this._started = false; + this._cursor = null; + this._done = false; + } + + _start() { + this._cursor = this._list[this._startPosition]; + this._started = true; + } + + _advanceCursor() { + if (this._started === false) { + this._started = true; + this._cursor = this._list[this._startPosition]; + return; + } + this._cursor = this._cursor[this._direction]; + } + + reset() { + this._done = false; + this._started = false; + this._cursor = null; + } + + remove() { + if ( + this._started === false || + this._done === true || + this._isCursorDetached() + ) { + return false; + } + this._list.remove(this._cursor); + } + + next() { + if (this._done === true) { + return { done: true }; + } + + this._advanceCursor(); + + // if there is no node at the cursor or the node at the cursor is no longer part of + // a doubly linked list then we are done/finished/kaput + if (this._cursor === null || this._isCursorDetached()) { + this._done = true; + return { done: true }; + } + + return { + value: this._cursor, + done: false + }; + } + + /** + * Is the node detached from a list? + * NOTE: you can trick/bypass/confuse this check by removing a node from one DoublyLinkedList + * and adding it to another. + * TODO: We can make this smarter by checking the direction of travel and only checking + * the required next/prev/head/tail rather than all of them + * @return {Boolean} [description] + */ + _isCursorDetached() { + return ( + this._cursor.prev === null && + this._cursor.next === null && + this._list.tail !== this._cursor && + this._list.head !== this._cursor + ); + } +} + +module.exports = DoublyLinkedListIterator; diff --git a/server/node_modules/generic-pool/lib/Pool.js b/server/node_modules/generic-pool/lib/Pool.js new file mode 100644 index 0000000..d014052 --- /dev/null +++ b/server/node_modules/generic-pool/lib/Pool.js @@ -0,0 +1,744 @@ +"use strict"; + +const EventEmitter = require("events").EventEmitter; + +const factoryValidator = require("./factoryValidator"); +const PoolOptions = require("./PoolOptions"); +const ResourceRequest = require("./ResourceRequest"); +const ResourceLoan = require("./ResourceLoan"); +const PooledResource = require("./PooledResource"); +const DefaultEvictor = require("./DefaultEvictor"); +const Deque = require("./Deque"); +const Deferred = require("./Deferred"); +const PriorityQueue = require("./PriorityQueue"); +const DequeIterator = require("./DequeIterator"); + +const reflector = require("./utils").reflector; + +/** + * TODO: move me + */ +const FACTORY_CREATE_ERROR = "factoryCreateError"; +const FACTORY_DESTROY_ERROR = "factoryDestroyError"; + +class Pool extends EventEmitter { + /** + * Generate an Object pool with a specified `factory` and `config`. + * + * @param {typeof DefaultEvictor} Evictor + * @param {typeof Deque} Deque + * @param {typeof PriorityQueue} PriorityQueue + * @param {Object} factory + * Factory to be used for generating and destroying the items. + * @param {Function} factory.create + * Should create the item to be acquired, + * and call it's first callback argument with the generated item as it's argument. + * @param {Function} factory.destroy + * Should gently close any resources that the item is using. + * Called before the items is destroyed. + * @param {Function} factory.validate + * Test if a resource is still valid .Should return a promise that resolves to a boolean, true if resource is still valid and false + * If it should be removed from pool. + * @param {Object} options + */ + constructor(Evictor, Deque, PriorityQueue, factory, options) { + super(); + + factoryValidator(factory); + + this._config = new PoolOptions(options); + + // TODO: fix up this ugly glue-ing + this._Promise = this._config.Promise; + + this._factory = factory; + this._draining = false; + this._started = false; + /** + * Holds waiting clients + * @type {PriorityQueue} + */ + this._waitingClientsQueue = new PriorityQueue(this._config.priorityRange); + + /** + * Collection of promises for resource creation calls made by the pool to factory.create + * @type {Set} + */ + this._factoryCreateOperations = new Set(); + + /** + * Collection of promises for resource destruction calls made by the pool to factory.destroy + * @type {Set} + */ + this._factoryDestroyOperations = new Set(); + + /** + * A queue/stack of pooledResources awaiting acquisition + * TODO: replace with LinkedList backed array + * @type {Deque} + */ + this._availableObjects = new Deque(); + + /** + * Collection of references for any resource that are undergoing validation before being acquired + * @type {Set} + */ + this._testOnBorrowResources = new Set(); + + /** + * Collection of references for any resource that are undergoing validation before being returned + * @type {Set} + */ + this._testOnReturnResources = new Set(); + + /** + * Collection of promises for any validations currently in process + * @type {Set} + */ + this._validationOperations = new Set(); + + /** + * All objects associated with this pool in any state (except destroyed) + * @type {Set} + */ + this._allObjects = new Set(); + + /** + * Loans keyed by the borrowed resource + * @type {Map} + */ + this._resourceLoans = new Map(); + + /** + * Infinitely looping iterator over available object + * @type {DequeIterator} + */ + this._evictionIterator = this._availableObjects.iterator(); + + this._evictor = new Evictor(); + + /** + * handle for setTimeout for next eviction run + * @type {(number|null)} + */ + this._scheduledEviction = null; + + // create initial resources (if factory.min > 0) + if (this._config.autostart === true) { + this.start(); + } + } + + _destroy(pooledResource) { + // FIXME: do we need another state for "in destruction"? + pooledResource.invalidate(); + this._allObjects.delete(pooledResource); + // NOTE: this maybe very bad promise usage? + const destroyPromise = this._factory.destroy(pooledResource.obj); + const wrappedDestroyPromise = this._config.destroyTimeoutMillis + ? this._Promise.resolve(this._applyDestroyTimeout(destroyPromise)) + : this._Promise.resolve(destroyPromise); + + this._trackOperation( + wrappedDestroyPromise, + this._factoryDestroyOperations + ).catch(reason => { + this.emit(FACTORY_DESTROY_ERROR, reason); + }); + + // TODO: maybe ensuring minimum pool size should live outside here + this._ensureMinimum(); + } + + _applyDestroyTimeout(promise) { + const timeoutPromise = new this._Promise((resolve, reject) => { + setTimeout(() => { + reject(new Error("destroy timed out")); + }, this._config.destroyTimeoutMillis).unref(); + }); + return this._Promise.race([timeoutPromise, promise]); + } + + /** + * Attempt to move an available resource into test and then onto a waiting client + * @return {Boolean} could we move an available resource into test + */ + _testOnBorrow() { + if (this._availableObjects.length < 1) { + return false; + } + + const pooledResource = this._availableObjects.shift(); + // Mark the resource as in test + pooledResource.test(); + this._testOnBorrowResources.add(pooledResource); + const validationPromise = this._factory.validate(pooledResource.obj); + const wrappedValidationPromise = this._Promise.resolve(validationPromise); + + this._trackOperation( + wrappedValidationPromise, + this._validationOperations + ).then(isValid => { + this._testOnBorrowResources.delete(pooledResource); + + if (isValid === false) { + pooledResource.invalidate(); + this._destroy(pooledResource); + this._dispense(); + return; + } + this._dispatchPooledResourceToNextWaitingClient(pooledResource); + }); + + return true; + } + + /** + * Attempt to move an available resource to a waiting client + * @return {Boolean} [description] + */ + _dispatchResource() { + if (this._availableObjects.length < 1) { + return false; + } + + const pooledResource = this._availableObjects.shift(); + this._dispatchPooledResourceToNextWaitingClient(pooledResource); + return false; + } + + /** + * Attempt to resolve an outstanding resource request using an available resource from + * the pool, or creating new ones + * + * @private + */ + _dispense() { + /** + * Local variables for ease of reading/writing + * these don't (shouldn't) change across the execution of this fn + */ + const numWaitingClients = this._waitingClientsQueue.length; + + // If there aren't any waiting requests then there is nothing to do + // so lets short-circuit + if (numWaitingClients < 1) { + return; + } + + const resourceShortfall = + numWaitingClients - this._potentiallyAllocableResourceCount; + + const actualNumberOfResourcesToCreate = Math.min( + this.spareResourceCapacity, + resourceShortfall + ); + for (let i = 0; actualNumberOfResourcesToCreate > i; i++) { + this._createResource(); + } + + // If we are doing test-on-borrow see how many more resources need to be moved into test + // to help satisfy waitingClients + if (this._config.testOnBorrow === true) { + // how many available resources do we need to shift into test + const desiredNumberOfResourcesToMoveIntoTest = + numWaitingClients - this._testOnBorrowResources.size; + const actualNumberOfResourcesToMoveIntoTest = Math.min( + this._availableObjects.length, + desiredNumberOfResourcesToMoveIntoTest + ); + for (let i = 0; actualNumberOfResourcesToMoveIntoTest > i; i++) { + this._testOnBorrow(); + } + } + + // if we aren't testing-on-borrow then lets try to allocate what we can + if (this._config.testOnBorrow === false) { + const actualNumberOfResourcesToDispatch = Math.min( + this._availableObjects.length, + numWaitingClients + ); + for (let i = 0; actualNumberOfResourcesToDispatch > i; i++) { + this._dispatchResource(); + } + } + } + + /** + * Dispatches a pooledResource to the next waiting client (if any) else + * puts the PooledResource back on the available list + * @param {PooledResource} pooledResource [description] + * @return {Boolean} [description] + */ + _dispatchPooledResourceToNextWaitingClient(pooledResource) { + const clientResourceRequest = this._waitingClientsQueue.dequeue(); + if ( + clientResourceRequest === undefined || + clientResourceRequest.state !== Deferred.PENDING + ) { + // While we were away either all the waiting clients timed out + // or were somehow fulfilled. put our pooledResource back. + this._addPooledResourceToAvailableObjects(pooledResource); + // TODO: do need to trigger anything before we leave? + return false; + } + const loan = new ResourceLoan(pooledResource, this._Promise); + this._resourceLoans.set(pooledResource.obj, loan); + pooledResource.allocate(); + clientResourceRequest.resolve(pooledResource.obj); + return true; + } + + /** + * tracks on operation using given set + * handles adding/removing from the set and resolve/rejects the value/reason + * @param {Promise} operation + * @param {Set} set Set holding operations + * @return {Promise} Promise that resolves once operation has been removed from set + */ + _trackOperation(operation, set) { + set.add(operation); + + return operation.then( + v => { + set.delete(operation); + return this._Promise.resolve(v); + }, + e => { + set.delete(operation); + return this._Promise.reject(e); + } + ); + } + + /** + * @private + */ + _createResource() { + // An attempt to create a resource + const factoryPromise = this._factory.create(); + const wrappedFactoryPromise = this._Promise + .resolve(factoryPromise) + .then(resource => { + const pooledResource = new PooledResource(resource); + this._allObjects.add(pooledResource); + this._addPooledResourceToAvailableObjects(pooledResource); + }); + + this._trackOperation(wrappedFactoryPromise, this._factoryCreateOperations) + .then(() => { + this._dispense(); + // Stop bluebird complaining about this side-effect only handler + // - a promise was created in a handler but was not returned from it + // https://goo.gl/rRqMUw + return null; + }) + .catch(reason => { + this.emit(FACTORY_CREATE_ERROR, reason); + this._dispense(); + }); + } + + /** + * @private + */ + _ensureMinimum() { + if (this._draining === true) { + return; + } + const minShortfall = this._config.min - this._count; + for (let i = 0; i < minShortfall; i++) { + this._createResource(); + } + } + + _evict() { + const testsToRun = Math.min( + this._config.numTestsPerEvictionRun, + this._availableObjects.length + ); + const evictionConfig = { + softIdleTimeoutMillis: this._config.softIdleTimeoutMillis, + idleTimeoutMillis: this._config.idleTimeoutMillis, + min: this._config.min + }; + for (let testsHaveRun = 0; testsHaveRun < testsToRun; ) { + const iterationResult = this._evictionIterator.next(); + + // Safety check incase we could get stuck in infinite loop because we + // somehow emptied the array after checking its length. + if (iterationResult.done === true && this._availableObjects.length < 1) { + this._evictionIterator.reset(); + return; + } + // If this happens it should just mean we reached the end of the + // list and can reset the cursor. + if (iterationResult.done === true && this._availableObjects.length > 0) { + this._evictionIterator.reset(); + continue; + } + + const resource = iterationResult.value; + + const shouldEvict = this._evictor.evict( + evictionConfig, + resource, + this._availableObjects.length + ); + testsHaveRun++; + + if (shouldEvict === true) { + // take it out of the _availableObjects list + this._evictionIterator.remove(); + this._destroy(resource); + } + } + } + + _scheduleEvictorRun() { + // Start eviction if set + if (this._config.evictionRunIntervalMillis > 0) { + // @ts-ignore + this._scheduledEviction = setTimeout(() => { + this._evict(); + this._scheduleEvictorRun(); + }, this._config.evictionRunIntervalMillis).unref(); + } + } + + _descheduleEvictorRun() { + if (this._scheduledEviction) { + clearTimeout(this._scheduledEviction); + } + this._scheduledEviction = null; + } + + start() { + if (this._draining === true) { + return; + } + if (this._started === true) { + return; + } + this._started = true; + this._scheduleEvictorRun(); + this._ensureMinimum(); + } + + /** + * Request a new resource. The callback will be called, + * when a new resource is available, passing the resource to the callback. + * TODO: should we add a seperate "acquireWithPriority" function + * + * @param {Number} [priority=0] + * Optional. Integer between 0 and (priorityRange - 1). Specifies the priority + * of the caller if there are no available resources. Lower numbers mean higher + * priority. + * + * @returns {Promise} + */ + acquire(priority) { + if (this._started === false && this._config.autostart === false) { + this.start(); + } + + if (this._draining) { + return this._Promise.reject( + new Error("pool is draining and cannot accept work") + ); + } + + // TODO: should we defer this check till after this event loop incase "the situation" changes in the meantime + if ( + this.spareResourceCapacity < 1 && + this._availableObjects.length < 1 && + this._config.maxWaitingClients !== undefined && + this._waitingClientsQueue.length >= this._config.maxWaitingClients + ) { + return this._Promise.reject( + new Error("max waitingClients count exceeded") + ); + } + + const resourceRequest = new ResourceRequest( + this._config.acquireTimeoutMillis, + this._Promise + ); + this._waitingClientsQueue.enqueue(resourceRequest, priority); + this._dispense(); + + return resourceRequest.promise; + } + + /** + * [use method, aquires a resource, passes the resource to a user supplied function and releases it] + * @param {Function} fn [a function that accepts a resource and returns a promise that resolves/rejects once it has finished using the resource] + * @return {Promise} [resolves once the resource is released to the pool] + */ + use(fn, priority) { + return this.acquire(priority).then(resource => { + return fn(resource).then( + result => { + this.release(resource); + return result; + }, + err => { + this.destroy(resource); + throw err; + } + ); + }); + } + + /** + * Check if resource is currently on loan from the pool + * + * @param {Function} resource + * Resource for checking. + * + * @returns {Boolean} + * True if resource belongs to this pool and false otherwise + */ + isBorrowedResource(resource) { + return this._resourceLoans.has(resource); + } + + /** + * Return the resource to the pool when it is no longer required. + * + * @param {Object} resource + * The acquired object to be put back to the pool. + */ + release(resource) { + // check for an outstanding loan + const loan = this._resourceLoans.get(resource); + + if (loan === undefined) { + return this._Promise.reject( + new Error("Resource not currently part of this pool") + ); + } + + this._resourceLoans.delete(resource); + loan.resolve(); + const pooledResource = loan.pooledResource; + + pooledResource.deallocate(); + this._addPooledResourceToAvailableObjects(pooledResource); + + this._dispense(); + return this._Promise.resolve(); + } + + /** + * Request the resource to be destroyed. The factory's destroy handler + * will also be called. + * + * This should be called within an acquire() block as an alternative to release(). + * + * @param {Object} resource + * The acquired resource to be destoyed. + */ + destroy(resource) { + // check for an outstanding loan + const loan = this._resourceLoans.get(resource); + + if (loan === undefined) { + return this._Promise.reject( + new Error("Resource not currently part of this pool") + ); + } + + this._resourceLoans.delete(resource); + loan.resolve(); + const pooledResource = loan.pooledResource; + + pooledResource.deallocate(); + this._destroy(pooledResource); + + this._dispense(); + return this._Promise.resolve(); + } + + _addPooledResourceToAvailableObjects(pooledResource) { + pooledResource.idle(); + if (this._config.fifo === true) { + this._availableObjects.push(pooledResource); + } else { + this._availableObjects.unshift(pooledResource); + } + } + + /** + * Disallow any new acquire calls and let the request backlog dissapate. + * The Pool will no longer attempt to maintain a "min" number of resources + * and will only make new resources on demand. + * Resolves once all resource requests are fulfilled and all resources are returned to pool and available... + * Should probably be called "drain work" + * @returns {Promise} + */ + drain() { + this._draining = true; + return this.__allResourceRequestsSettled() + .then(() => { + return this.__allResourcesReturned(); + }) + .then(() => { + this._descheduleEvictorRun(); + }); + } + + __allResourceRequestsSettled() { + if (this._waitingClientsQueue.length > 0) { + // wait for last waiting client to be settled + // FIXME: what if they can "resolve" out of order....? + return reflector(this._waitingClientsQueue.tail.promise); + } + return this._Promise.resolve(); + } + + // FIXME: this is a horrific mess + __allResourcesReturned() { + const ps = Array.from(this._resourceLoans.values()) + .map(loan => loan.promise) + .map(reflector); + return this._Promise.all(ps); + } + + /** + * Forcibly destroys all available resources regardless of timeout. Intended to be + * invoked as part of a drain. Does not prevent the creation of new + * resources as a result of subsequent calls to acquire. + * + * Note that if factory.min > 0 and the pool isn't "draining", the pool will destroy all idle resources + * in the pool, but replace them with newly created resources up to the + * specified factory.min value. If this is not desired, set factory.min + * to zero before calling clear() + * + */ + clear() { + const reflectedCreatePromises = Array.from( + this._factoryCreateOperations + ).map(reflector); + + // wait for outstanding factory.create to complete + return this._Promise.all(reflectedCreatePromises).then(() => { + // Destroy existing resources + // @ts-ignore + for (const resource of this._availableObjects) { + this._destroy(resource); + } + const reflectedDestroyPromises = Array.from( + this._factoryDestroyOperations + ).map(reflector); + return reflector(this._Promise.all(reflectedDestroyPromises)); + }); + } + + /** + * Waits until the pool is ready. + * We define ready by checking if the current resource number is at least + * the minimum number defined. + * @returns {Promise} that resolves when the minimum number is ready. + */ + ready() { + return new this._Promise(resolve => { + const isReady = () => { + if (this.available >= this.min) { + resolve(); + } else { + setTimeout(isReady, 100); + } + }; + + isReady(); + }); + } + + /** + * How many resources are available to allocated + * (includes resources that have not been tested and may faul validation) + * NOTE: internal for now as the name is awful and might not be useful to anyone + * @return {Number} number of resources the pool has to allocate + */ + get _potentiallyAllocableResourceCount() { + return ( + this._availableObjects.length + + this._testOnBorrowResources.size + + this._testOnReturnResources.size + + this._factoryCreateOperations.size + ); + } + + /** + * The combined count of the currently created objects and those in the + * process of being created + * Does NOT include resources in the process of being destroyed + * sort of legacy... + * @return {Number} + */ + get _count() { + return this._allObjects.size + this._factoryCreateOperations.size; + } + + /** + * How many more resources does the pool have room for + * @return {Number} number of resources the pool could create before hitting any limits + */ + get spareResourceCapacity() { + return ( + this._config.max - + (this._allObjects.size + this._factoryCreateOperations.size) + ); + } + + /** + * see _count above + * @return {Number} [description] + */ + get size() { + return this._count; + } + + /** + * number of available resources + * @return {Number} [description] + */ + get available() { + return this._availableObjects.length; + } + + /** + * number of resources that are currently acquired + * @return {Number} [description] + */ + get borrowed() { + return this._resourceLoans.size; + } + + /** + * number of waiting acquire calls + * @return {Number} [description] + */ + get pending() { + return this._waitingClientsQueue.length; + } + + /** + * maximum size of the pool + * @return {Number} [description] + */ + get max() { + return this._config.max; + } + + /** + * minimum size of the pool + * @return {Number} [description] + */ + get min() { + return this._config.min; + } +} + +module.exports = Pool; diff --git a/server/node_modules/generic-pool/lib/PoolDefaults.js b/server/node_modules/generic-pool/lib/PoolDefaults.js new file mode 100644 index 0000000..56d004c --- /dev/null +++ b/server/node_modules/generic-pool/lib/PoolDefaults.js @@ -0,0 +1,34 @@ +"use strict"; +/** + * Create the default settings used by the pool + * + * @class + */ +class PoolDefaults { + constructor() { + this.fifo = true; + this.priorityRange = 1; + + this.testOnBorrow = false; + this.testOnReturn = false; + + this.autostart = true; + + this.evictionRunIntervalMillis = 0; + this.numTestsPerEvictionRun = 3; + this.softIdleTimeoutMillis = -1; + this.idleTimeoutMillis = 30000; + + // FIXME: no defaults! + this.acquireTimeoutMillis = null; + this.destroyTimeoutMillis = null; + this.maxWaitingClients = null; + + this.min = null; + this.max = null; + // FIXME: this seems odd? + this.Promise = Promise; + } +} + +module.exports = PoolDefaults; diff --git a/server/node_modules/generic-pool/lib/PoolOptions.js b/server/node_modules/generic-pool/lib/PoolOptions.js new file mode 100644 index 0000000..f355948 --- /dev/null +++ b/server/node_modules/generic-pool/lib/PoolOptions.js @@ -0,0 +1,109 @@ +"use strict"; + +const PoolDefaults = require("./PoolDefaults"); + +class PoolOptions { + /** + * @param {Object} opts + * configuration for the pool + * @param {Number} [opts.max=null] + * Maximum number of items that can exist at the same time. Default: 1. + * Any further acquire requests will be pushed to the waiting list. + * @param {Number} [opts.min=null] + * Minimum number of items in pool (including in-use). Default: 0. + * When the pool is created, or a resource destroyed, this minimum will + * be checked. If the pool resource count is below the minimum, a new + * resource will be created and added to the pool. + * @param {Number} [opts.maxWaitingClients=null] + * maximum number of queued requests allowed after which acquire calls will be rejected + * @param {Boolean} [opts.testOnBorrow=false] + * should the pool validate resources before giving them to clients. Requires that + * `factory.validate` is specified. + * @param {Boolean} [opts.testOnReturn=false] + * should the pool validate resources before returning them to the pool. + * @param {Number} [opts.acquireTimeoutMillis=null] + * Delay in milliseconds after which the an `acquire` call will fail. optional. + * Default: undefined. Should be positive and non-zero + * @param {Number} [opts.destroyTimeoutMillis=null] + * Delay in milliseconds after which the an `destroy` call will fail, causing it to emit a factoryDestroyError event. optional. + * Default: undefined. Should be positive and non-zero + * @param {Number} [opts.priorityRange=1] + * The range from 1 to be treated as a valid priority + * @param {Boolean} [opts.fifo=true] + * Sets whether the pool has LIFO (last in, first out) behaviour with respect to idle objects. + * if false then pool has FIFO behaviour + * @param {Boolean} [opts.autostart=true] + * Should the pool start creating resources etc once the constructor is called + * @param {Number} [opts.evictionRunIntervalMillis=0] + * How often to run eviction checks. Default: 0 (does not run). + * @param {Number} [opts.numTestsPerEvictionRun=3] + * Number of resources to check each eviction run. Default: 3. + * @param {Number} [opts.softIdleTimeoutMillis=-1] + * amount of time an object may sit idle in the pool before it is eligible + * for eviction by the idle object evictor (if any), with the extra condition + * that at least "min idle" object instances remain in the pool. Default -1 (nothing can get evicted) + * @param {Number} [opts.idleTimeoutMillis=30000] + * the minimum amount of time that an object may sit idle in the pool before it is eligible for eviction + * due to idle time. Supercedes "softIdleTimeoutMillis" Default: 30000 + * @param {typeof Promise} [opts.Promise=Promise] + * What promise implementation should the pool use, defaults to native promises. + */ + constructor(opts) { + const poolDefaults = new PoolDefaults(); + + opts = opts || {}; + + this.fifo = typeof opts.fifo === "boolean" ? opts.fifo : poolDefaults.fifo; + this.priorityRange = opts.priorityRange || poolDefaults.priorityRange; + + this.testOnBorrow = + typeof opts.testOnBorrow === "boolean" + ? opts.testOnBorrow + : poolDefaults.testOnBorrow; + this.testOnReturn = + typeof opts.testOnReturn === "boolean" + ? opts.testOnReturn + : poolDefaults.testOnReturn; + + this.autostart = + typeof opts.autostart === "boolean" + ? opts.autostart + : poolDefaults.autostart; + + if (opts.acquireTimeoutMillis) { + // @ts-ignore + this.acquireTimeoutMillis = parseInt(opts.acquireTimeoutMillis, 10); + } + + if (opts.destroyTimeoutMillis) { + // @ts-ignore + this.destroyTimeoutMillis = parseInt(opts.destroyTimeoutMillis, 10); + } + + if (opts.maxWaitingClients !== undefined) { + // @ts-ignore + this.maxWaitingClients = parseInt(opts.maxWaitingClients, 10); + } + + // @ts-ignore + this.max = parseInt(opts.max, 10); + // @ts-ignore + this.min = parseInt(opts.min, 10); + + this.max = Math.max(isNaN(this.max) ? 1 : this.max, 1); + this.min = Math.min(isNaN(this.min) ? 0 : this.min, this.max); + + this.evictionRunIntervalMillis = + opts.evictionRunIntervalMillis || poolDefaults.evictionRunIntervalMillis; + this.numTestsPerEvictionRun = + opts.numTestsPerEvictionRun || poolDefaults.numTestsPerEvictionRun; + this.softIdleTimeoutMillis = + opts.softIdleTimeoutMillis || poolDefaults.softIdleTimeoutMillis; + this.idleTimeoutMillis = + opts.idleTimeoutMillis || poolDefaults.idleTimeoutMillis; + + this.Promise = opts.Promise != null ? opts.Promise : poolDefaults.Promise; + } +} + +module.exports = PoolOptions; diff --git a/server/node_modules/generic-pool/lib/PooledResource.js b/server/node_modules/generic-pool/lib/PooledResource.js new file mode 100644 index 0000000..9748748 --- /dev/null +++ b/server/node_modules/generic-pool/lib/PooledResource.js @@ -0,0 +1,49 @@ +"use strict"; + +const PooledResourceStateEnum = require("./PooledResourceStateEnum"); + +/** + * @class + * @private + */ +class PooledResource { + constructor(resource) { + this.creationTime = Date.now(); + this.lastReturnTime = null; + this.lastBorrowTime = null; + this.lastIdleTime = null; + this.obj = resource; + this.state = PooledResourceStateEnum.IDLE; + } + + // mark the resource as "allocated" + allocate() { + this.lastBorrowTime = Date.now(); + this.state = PooledResourceStateEnum.ALLOCATED; + } + + // mark the resource as "deallocated" + deallocate() { + this.lastReturnTime = Date.now(); + this.state = PooledResourceStateEnum.IDLE; + } + + invalidate() { + this.state = PooledResourceStateEnum.INVALID; + } + + test() { + this.state = PooledResourceStateEnum.VALIDATION; + } + + idle() { + this.lastIdleTime = Date.now(); + this.state = PooledResourceStateEnum.IDLE; + } + + returning() { + this.state = PooledResourceStateEnum.RETURNING; + } +} + +module.exports = PooledResource; diff --git a/server/node_modules/generic-pool/lib/PooledResourceStateEnum.js b/server/node_modules/generic-pool/lib/PooledResourceStateEnum.js new file mode 100644 index 0000000..aaab2d7 --- /dev/null +++ b/server/node_modules/generic-pool/lib/PooledResourceStateEnum.js @@ -0,0 +1,11 @@ +"use strict"; + +const PooledResourceStateEnum = { + ALLOCATED: "ALLOCATED", // In use + IDLE: "IDLE", // In the queue, not in use. + INVALID: "INVALID", // Failed validation + RETURNING: "RETURNING", // Resource is in process of returning + VALIDATION: "VALIDATION" // Currently being tested +}; + +module.exports = PooledResourceStateEnum; diff --git a/server/node_modules/generic-pool/lib/PriorityQueue.js b/server/node_modules/generic-pool/lib/PriorityQueue.js new file mode 100644 index 0000000..ca9916b --- /dev/null +++ b/server/node_modules/generic-pool/lib/PriorityQueue.js @@ -0,0 +1,69 @@ +"use strict"; + +const Queue = require("./Queue"); + +/** + * @class + * @private + */ +class PriorityQueue { + constructor(size) { + this._size = Math.max(+size | 0, 1); + /** @type {Queue[]} */ + this._slots = []; + // initialize arrays to hold queue elements + for (let i = 0; i < this._size; i++) { + this._slots.push(new Queue()); + } + } + + get length() { + let _length = 0; + for (let i = 0, slots = this._slots.length; i < slots; i++) { + _length += this._slots[i].length; + } + return _length; + } + + enqueue(obj, priority) { + // Convert to integer with a default value of 0. + priority = (priority && +priority | 0) || 0; + + if (priority) { + if (priority < 0 || priority >= this._size) { + priority = this._size - 1; + // put obj at the end of the line + } + } + this._slots[priority].push(obj); + } + + dequeue() { + for (let i = 0, sl = this._slots.length; i < sl; i += 1) { + if (this._slots[i].length) { + return this._slots[i].shift(); + } + } + return; + } + + get head() { + for (let i = 0, sl = this._slots.length; i < sl; i += 1) { + if (this._slots[i].length > 0) { + return this._slots[i].head; + } + } + return; + } + + get tail() { + for (let i = this._slots.length - 1; i >= 0; i--) { + if (this._slots[i].length > 0) { + return this._slots[i].tail; + } + } + return; + } +} + +module.exports = PriorityQueue; diff --git a/server/node_modules/generic-pool/lib/Queue.js b/server/node_modules/generic-pool/lib/Queue.js new file mode 100644 index 0000000..94cab13 --- /dev/null +++ b/server/node_modules/generic-pool/lib/Queue.js @@ -0,0 +1,35 @@ +"use strict"; + +const DoublyLinkedList = require("./DoublyLinkedList"); +const Deque = require("./Deque"); + +/** + * Sort of a internal queue for holding the waiting + * resource requets for a given "priority". + * Also handles managing timeouts rejections on items (is this the best place for this?) + * This is the last point where we know which queue a resourceRequest is in + * + */ +class Queue extends Deque { + /** + * Adds the obj to the end of the list for this slot + * we completely override the parent method because we need access to the + * node for our rejection handler + * @param {any} resourceRequest [description] + */ + push(resourceRequest) { + const node = DoublyLinkedList.createNode(resourceRequest); + resourceRequest.promise.catch(this._createTimeoutRejectionHandler(node)); + this._list.insertEnd(node); + } + + _createTimeoutRejectionHandler(node) { + return reason => { + if (reason.name === "TimeoutError") { + this._list.remove(node); + } + }; + } +} + +module.exports = Queue; diff --git a/server/node_modules/generic-pool/lib/ResourceLoan.js b/server/node_modules/generic-pool/lib/ResourceLoan.js new file mode 100644 index 0000000..f657cb4 --- /dev/null +++ b/server/node_modules/generic-pool/lib/ResourceLoan.js @@ -0,0 +1,29 @@ +"use strict"; + +const Deferred = require("./Deferred"); + +/** + * Plan is to maybe add tracking via Error objects + * and other fun stuff! + */ + +class ResourceLoan extends Deferred { + /** + * + * @param {any} pooledResource the PooledResource this loan belongs to + * @return {any} [description] + */ + constructor(pooledResource, Promise) { + super(Promise); + this._creationTimestamp = Date.now(); + this.pooledResource = pooledResource; + } + + reject() { + /** + * Loans can only be resolved at the moment + */ + } +} + +module.exports = ResourceLoan; diff --git a/server/node_modules/generic-pool/lib/ResourceRequest.js b/server/node_modules/generic-pool/lib/ResourceRequest.js new file mode 100644 index 0000000..aa30619 --- /dev/null +++ b/server/node_modules/generic-pool/lib/ResourceRequest.js @@ -0,0 +1,76 @@ +"use strict"; + +const Deferred = require("./Deferred"); +const errors = require("./errors"); + +function fbind(fn, ctx) { + return function bound() { + return fn.apply(ctx, arguments); + }; +} + +/** + * Wraps a users request for a resource + * Basically a promise mashed in with a timeout + * @private + */ +class ResourceRequest extends Deferred { + /** + * [constructor description] + * @param {Number} ttl timeout + */ + constructor(ttl, Promise) { + super(Promise); + this._creationTimestamp = Date.now(); + this._timeout = null; + + if (ttl !== undefined) { + this.setTimeout(ttl); + } + } + + setTimeout(delay) { + if (this._state !== ResourceRequest.PENDING) { + return; + } + const ttl = parseInt(delay, 10); + + if (isNaN(ttl) || ttl <= 0) { + throw new Error("delay must be a positive int"); + } + + const age = Date.now() - this._creationTimestamp; + + if (this._timeout) { + this.removeTimeout(); + } + + this._timeout = setTimeout( + fbind(this._fireTimeout, this), + Math.max(ttl - age, 0) + ); + } + + removeTimeout() { + if (this._timeout) { + clearTimeout(this._timeout); + } + this._timeout = null; + } + + _fireTimeout() { + this.reject(new errors.TimeoutError("ResourceRequest timed out")); + } + + reject(reason) { + this.removeTimeout(); + super.reject(reason); + } + + resolve(value) { + this.removeTimeout(); + super.resolve(value); + } +} + +module.exports = ResourceRequest; diff --git a/server/node_modules/generic-pool/lib/errors.js b/server/node_modules/generic-pool/lib/errors.js new file mode 100644 index 0000000..b02d822 --- /dev/null +++ b/server/node_modules/generic-pool/lib/errors.js @@ -0,0 +1,27 @@ +"use strict"; + +class ExtendableError extends Error { + constructor(message) { + super(message); + // @ts-ignore + this.name = this.constructor.name; + this.message = message; + if (typeof Error.captureStackTrace === "function") { + Error.captureStackTrace(this, this.constructor); + } else { + this.stack = new Error(message).stack; + } + } +} + +/* eslint-disable no-useless-constructor */ +class TimeoutError extends ExtendableError { + constructor(m) { + super(m); + } +} +/* eslint-enable no-useless-constructor */ + +module.exports = { + TimeoutError: TimeoutError +}; diff --git a/server/node_modules/generic-pool/lib/factoryValidator.js b/server/node_modules/generic-pool/lib/factoryValidator.js new file mode 100644 index 0000000..2f2fb5e --- /dev/null +++ b/server/node_modules/generic-pool/lib/factoryValidator.js @@ -0,0 +1,16 @@ +module.exports = function(factory) { + if (typeof factory.create !== "function") { + throw new TypeError("factory.create must be a function"); + } + + if (typeof factory.destroy !== "function") { + throw new TypeError("factory.destroy must be a function"); + } + + if ( + typeof factory.validate !== "undefined" && + typeof factory.validate !== "function" + ) { + throw new TypeError("factory.validate must be a function"); + } +}; diff --git a/server/node_modules/generic-pool/lib/utils.js b/server/node_modules/generic-pool/lib/utils.js new file mode 100644 index 0000000..19d7f31 --- /dev/null +++ b/server/node_modules/generic-pool/lib/utils.js @@ -0,0 +1,13 @@ +"use strict"; + +function noop() {} + +/** + * Reflects a promise but does not expose any + * underlying value or rejection from that promise. + * @param {Promise} promise [description] + * @return {Promise} [description] + */ +exports.reflector = function(promise) { + return promise.then(noop, noop); +}; diff --git a/server/node_modules/generic-pool/package.json b/server/node_modules/generic-pool/package.json new file mode 100644 index 0000000..4daf20a --- /dev/null +++ b/server/node_modules/generic-pool/package.json @@ -0,0 +1,297 @@ +{ + "name": "generic-pool", + "description": "Generic resource pooling for Node.JS", + "homepage": "https://github.com/coopernurse/node-pool#readme", + "version": "3.9.0", + "main": "index.js", + "author": { + "email": "james@bitmechanic.com", + "name": "James Cooper" + }, + "contributors": [ + { + "name": "James Butler", + "email": "james.butler@sandfox.co.uk" + }, + { + "name": "Kiko Beats", + "email": "josefrancisco.verdu@gmail.com" + }, + { + "name": "Felipe Machado", + "email": "felipou@gmail.com" + }, + { + "name": "Idan Attias", + "email": "idana@wix.com" + }, + { + "name": "Bryan Donovan", + "email": "bdondo@gmail.com" + }, + { + "name": "C-h-e-r-r-y", + "email": "C-h-e-r-r-y@users.noreply.github.com" + }, + { + "name": "rebareba", + "email": "forcdc1990@gmail.com" + }, + { + "name": "t3hmrman", + "email": "t3hmrman@gmail.com" + }, + { + "name": "Thomas Dimson", + "email": "tdimson@gmail.com" + }, + { + "name": "Anup Baldawa", + "email": "anup@joinhoney.com" + }, + { + "name": "Kevin Burke", + "email": "burke@shyp.com" + }, + { + "name": "Teow Hua Jun", + "email": "huajun@Teows-MacBook-Pro.local" + }, + { + "name": "Joe Z", + "email": "jzarate@gmail.com" + }, + { + "name": "Peter Galiba", + "email": "poetro@poetro.hu" + }, + { + "name": "Asbjørn Sannes", + "email": "asbjorn.sannes@interhost.no" + }, + { + "name": "san00", + "email": "c5d59d07@opayq.com" + }, + { + "name": "Christian d'Heureuse", + "email": "chdh@inventec.ch" + }, + { + "name": "Ryan Dao", + "email": "ddao@paypal.com" + }, + { + "name": "Diego Rodríguez Baquero", + "email": "diegorbaquero@gmail.com" + }, + { + "name": "Felix Becker", + "email": "felix.b@outlook.com" + }, + { + "name": "Geovani de Souza", + "email": "geovanisouza92@gmail.com" + }, + { + "name": "Jemila", + "email": "jemila.abulhawa@gmail.com" + }, + { + "name": "Justin Robinson", + "email": "jrobinson@redventures.com" + }, + { + "name": "linchuang", + "email": "linchuang@tencent.com" + }, + { + "name": "Nayana Hettiarachchi", + "email": "nayana@corp-gems.com" + }, + { + "name": "restjohn", + "email": "restjohn@users.noreply.github.com" + }, + { + "name": "Sushant", + "email": "sushantdhiman@outlook.com" + }, + { + "name": "travis4all", + "email": "travis4all@diamon.dz" + }, + { + "name": "Will Shaver", + "email": "will.shaver@emberex.com" + }, + { + "name": "windyrobin", + "email": "windyrobin@Gmail.com" + }, + { + "name": "王秋石", + "email": "12qiushi@163.com" + }, + { + "name": "Stephen Cresswell", + "email": "229672+cressie176@users.noreply.github.com" + }, + { + "name": "Arek Flinik", + "email": "aflinik@gmail.com" + }, + { + "name": "Alexander Tesfamichael", + "email": "Alex.Tesfamichael@gmail.com" + }, + { + "name": "calibr", + "email": "awcalibr@gmail.com" + }, + { + "name": "benny-medflyt", + "email": "benny@medflyt.com" + }, + { + "name": "Bryan Kaplan", + "email": "bryan@pinchit.com" + }, + { + "name": "Dumitru Uzun", + "email": "contact@duzun.me" + }, + { + "name": "Douglas Christopher Wilson", + "email": "doug@somethingdoug.com" + }, + { + "name": "Drew R", + "email": "drewrathbone@gmail.com" + }, + { + "name": "Magnus Eide", + "email": "eide@iterate.no" + }, + { + "name": "gdusbabek", + "email": "gdusbabek@gmail.com" + }, + { + "name": "Jason Rhodes", + "email": "jason.matthew.rhodes@gmail.com" + }, + { + "name": "John Dooley", + "email": "john.j.dooley@gmail.com" + }, + { + "name": "Lewis Ellis", + "email": "lewis@getsentry.com" + }, + { + "name": "Tom MacWright", + "email": "macwright@gmail.com" + }, + { + "name": "Louis Roché", + "email": "mail+github@louisroche.net" + }, + { + "name": "Mike Morris", + "email": "mikemorris@users.noreply.github.com" + }, + { + "name": "molipet", + "email": "molipet@gmail.com" + }, + { + "name": "An Nguyen Le", + "email": "nguyenan169@gmail.com" + }, + { + "name": "Piotr", + "email": "pwalc@agora.pl" + }, + { + "name": "Randall Leeds", + "email": "randall.leeds@gmail.com" + }, + { + "name": "Roy Binux", + "email": "root@binux.me" + }, + { + "name": "Sandro Santilli", + "email": "strk@keybit.net" + }, + { + "name": "Teemu Ikonen", + "email": "teemu.ikonen@iki.fi" + }, + { + "name": "Tevye Krynski", + "email": "tevye@mog.com" + }, + { + "name": "Thom Seddon", + "email": "thom@nightworld.com" + }, + { + "name": "Thomas Watson Steen", + "email": "w@tson.dk" + }, + { + "name": "Wilfred van der Deijl", + "email": "wilfred@vanderdeijl.com" + }, + { + "name": "Yanlong Wang", + "email": "yanlong.wang@naiver.org" + }, + { + "name": "Young Hahn", + "email": "young@developmentseed.org" + }, + { + "name": "Rajesh kumar", + "email": "zazzel.cvs@gmail.com" + } + ], + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/coopernurse/node-pool.git" + }, + "bugs": { + "url": "https://github.com/coopernurse/node-pool/issues" + }, + "keywords": [ + "pool", + "pooling", + "throttle" + ], + "devDependencies": { + "@types/node": "^8.5.1", + "eslint": "^4.9.0", + "eslint-config-prettier": "^2.6.0", + "eslint-plugin-prettier": "^2.3.1", + "eslint-plugin-promise": "^3.3.0", + "prettier": "^1.7.4", + "tap": "^8.0.0", + "typescript": "^2.6.2" + }, + "engines": { + "node": ">= 4" + }, + "files": [ + "index.d.ts", + "index.js", + "lib" + ], + "license": "MIT", + "scripts": { + "lint": "eslint lib test index.js .eslintrc.js", + "lint-fix": "eslint --fix lib test index.js .eslintrc.js", + "test": "tap test/*-test.js " + } +} \ No newline at end of file diff --git a/server/node_modules/redis/LICENSE b/server/node_modules/redis/LICENSE new file mode 100644 index 0000000..8509ccd --- /dev/null +++ b/server/node_modules/redis/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022-2023, Redis, inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/server/node_modules/redis/README.md b/server/node_modules/redis/README.md new file mode 100644 index 0000000..a590372 --- /dev/null +++ b/server/node_modules/redis/README.md @@ -0,0 +1,384 @@ +# Node-Redis + +[![Tests](https://img.shields.io/github/actions/workflow/status/redis/node-redis/tests.yml?branch=master)](https://github.com/redis/node-redis/actions/workflows/tests.yml) +[![Coverage](https://codecov.io/gh/redis/node-redis/branch/master/graph/badge.svg?token=xcfqHhJC37)](https://codecov.io/gh/redis/node-redis) +[![License](https://img.shields.io/github/license/redis/node-redis.svg)](https://github.com/redis/node-redis/blob/master/LICENSE) + +[![Discord](https://img.shields.io/discord/697882427875393627.svg?style=social&logo=discord)](https://discord.gg/redis) +[![Twitch](https://img.shields.io/twitch/status/redisinc?style=social)](https://www.twitch.tv/redisinc) +[![YouTube](https://img.shields.io/youtube/channel/views/UCD78lHSwYqMlyetR0_P4Vig?style=social)](https://www.youtube.com/redisinc) +[![Twitter](https://img.shields.io/twitter/follow/redisinc?style=social)](https://twitter.com/redisinc) + +node-redis is a modern, high performance [Redis](https://redis.io) client for Node.js. + +## How do I Redis? + +[Learn for free at Redis University](https://university.redis.com/) + +[Build faster with the Redis Launchpad](https://launchpad.redis.com/) + +[Try the Redis Cloud](https://redis.com/try-free/) + +[Dive in developer tutorials](https://developer.redis.com/) + +[Join the Redis community](https://redis.com/community/) + +[Work at Redis](https://redis.com/company/careers/jobs/) + +## Packages + +| Name | Description | +|----------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| [redis](./) | [![Downloads](https://img.shields.io/npm/dm/redis.svg)](https://www.npmjs.com/package/redis) [![Version](https://img.shields.io/npm/v/redis.svg)](https://www.npmjs.com/package/redis) | +| [@redis/client](./packages/client) | [![Downloads](https://img.shields.io/npm/dm/@redis/client.svg)](https://www.npmjs.com/package/@redis/client) [![Version](https://img.shields.io/npm/v/@redis/client.svg)](https://www.npmjs.com/package/@redis/client) [![Docs](https://img.shields.io/badge/-documentation-dc382c)](https://redis.js.org/documentation/client/) | +| [@redis/bloom](./packages/bloom) | [![Downloads](https://img.shields.io/npm/dm/@redis/bloom.svg)](https://www.npmjs.com/package/@redis/bloom) [![Version](https://img.shields.io/npm/v/@redis/bloom.svg)](https://www.npmjs.com/package/@redis/bloom) [![Docs](https://img.shields.io/badge/-documentation-dc382c)](https://redis.js.org/documentation/bloom/) [Redis Bloom](https://oss.redis.com/redisbloom/) commands | +| [@redis/graph](./packages/graph) | [![Downloads](https://img.shields.io/npm/dm/@redis/graph.svg)](https://www.npmjs.com/package/@redis/graph) [![Version](https://img.shields.io/npm/v/@redis/graph.svg)](https://www.npmjs.com/package/@redis/graph) [![Docs](https://img.shields.io/badge/-documentation-dc382c)](https://redis.js.org/documentation/graph/) [Redis Graph](https://oss.redis.com/redisgraph/) commands | +| [@redis/json](./packages/json) | [![Downloads](https://img.shields.io/npm/dm/@redis/json.svg)](https://www.npmjs.com/package/@redis/json) [![Version](https://img.shields.io/npm/v/@redis/json.svg)](https://www.npmjs.com/package/@redis/json) [![Docs](https://img.shields.io/badge/-documentation-dc382c)](https://redis.js.org/documentation/json/) [Redis JSON](https://oss.redis.com/redisjson/) commands | +| [@redis/search](./packages/search) | [![Downloads](https://img.shields.io/npm/dm/@redis/search.svg)](https://www.npmjs.com/package/@redis/search) [![Version](https://img.shields.io/npm/v/@redis/search.svg)](https://www.npmjs.com/package/@redis/search) [![Docs](https://img.shields.io/badge/-documentation-dc382c)](https://redis.js.org/documentation/search/) [RediSearch](https://oss.redis.com/redisearch/) commands | +| [@redis/time-series](./packages/time-series) | [![Downloads](https://img.shields.io/npm/dm/@redis/time-series.svg)](https://www.npmjs.com/package/@redis/time-series) [![Version](https://img.shields.io/npm/v/@redis/time-series.svg)](https://www.npmjs.com/package/@redis/time-series) [![Docs](https://img.shields.io/badge/-documentation-dc382c)](https://redis.js.org/documentation/time-series/) [Redis Time-Series](https://oss.redis.com/redistimeseries/) commands | + +> :warning: In version 4.1.0 we moved our subpackages from `@node-redis` to `@redis`. If you're just using `npm install redis`, you don't need to do anything—it'll upgrade automatically. If you're using the subpackages directly, you'll need to point to the new scope (e.g. `@redis/client` instead of `@node-redis/client`). + +## Installation + +Start a redis via docker: + +``` bash +docker run -p 6379:6379 -it redis/redis-stack-server:latest +``` + +To install node-redis, simply: + +```bash +npm install redis +``` + +> :warning: The new interface is clean and cool, but if you have an existing codebase, you'll want to read the [migration guide](./docs/v3-to-v4.md). + +Looking for a high-level library to handle object mapping? See [redis-om-node](https://github.com/redis/redis-om-node)! + +## Usage + +### Basic Example + +```typescript +import { createClient } from 'redis'; + +const client = await createClient() + .on('error', err => console.log('Redis Client Error', err)) + .connect(); + +await client.set('key', 'value'); +const value = await client.get('key'); +await client.disconnect(); +``` + +The above code connects to localhost on port 6379. To connect to a different host or port, use a connection string in the format `redis[s]://[[username][:password]@][host][:port][/db-number]`: + +```typescript +createClient({ + url: 'redis://alice:foobared@awesome.redis.server:6380' +}); +``` + +You can also use discrete parameters, UNIX sockets, and even TLS to connect. Details can be found in the [client configuration guide](./docs/client-configuration.md). + +To check if the the client is connected and ready to send commands, use `client.isReady` which returns a boolean. `client.isOpen` is also available. This returns `true` when the client's underlying socket is open, and `false` when it isn't (for example when the client is still connecting or reconnecting after a network error). + +### Redis Commands + +There is built-in support for all of the [out-of-the-box Redis commands](https://redis.io/commands). They are exposed using the raw Redis command names (`HSET`, `HGETALL`, etc.) and a friendlier camel-cased version (`hSet`, `hGetAll`, etc.): + +```typescript +// raw Redis commands +await client.HSET('key', 'field', 'value'); +await client.HGETALL('key'); + +// friendly JavaScript commands +await client.hSet('key', 'field', 'value'); +await client.hGetAll('key'); +``` + +Modifiers to commands are specified using a JavaScript object: + +```typescript +await client.set('key', 'value', { + EX: 10, + NX: true +}); +``` + +Replies will be transformed into useful data structures: + +```typescript +await client.hGetAll('key'); // { field1: 'value1', field2: 'value2' } +await client.hVals('key'); // ['value1', 'value2'] +``` + +`Buffer`s are supported as well: + +```typescript +await client.hSet('key', 'field', Buffer.from('value')); // 'OK' +await client.hGetAll( + commandOptions({ returnBuffers: true }), + 'key' +); // { field: } +``` + +### Unsupported Redis Commands + +If you want to run commands and/or use arguments that Node Redis doesn't know about (yet!) use `.sendCommand()`: + +```typescript +await client.sendCommand(['SET', 'key', 'value', 'NX']); // 'OK' + +await client.sendCommand(['HGETALL', 'key']); // ['key1', 'field1', 'key2', 'field2'] +``` + +### Transactions (Multi/Exec) + +Start a [transaction](https://redis.io/topics/transactions) by calling `.multi()`, then chaining your commands. When you're done, call `.exec()` and you'll get an array back with your results: + +```typescript +await client.set('another-key', 'another-value'); + +const [setKeyReply, otherKeyValue] = await client + .multi() + .set('key', 'value') + .get('another-key') + .exec(); // ['OK', 'another-value'] +``` + +You can also [watch](https://redis.io/topics/transactions#optimistic-locking-using-check-and-set) keys by calling `.watch()`. Your transaction will abort if any of the watched keys change. + +To dig deeper into transactions, check out the [Isolated Execution Guide](./docs/isolated-execution.md). + +### Blocking Commands + +Any command can be run on a new connection by specifying the `isolated` option. The newly created connection is closed when the command's `Promise` is fulfilled. + +This pattern works especially well for blocking commands—such as `BLPOP` and `BLMOVE`: + +```typescript +import { commandOptions } from 'redis'; + +const blPopPromise = client.blPop( + commandOptions({ isolated: true }), + 'key', + 0 +); + +await client.lPush('key', ['1', '2']); + +await blPopPromise; // '2' +``` + +To learn more about isolated execution, check out the [guide](./docs/isolated-execution.md). + +### Pub/Sub + +See the [Pub/Sub overview](./docs/pub-sub.md). + +### Scan Iterator + +[`SCAN`](https://redis.io/commands/scan) results can be looped over using [async iterators](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/asyncIterator): + +```typescript +for await (const key of client.scanIterator()) { + // use the key! + await client.get(key); +} +``` + +This works with `HSCAN`, `SSCAN`, and `ZSCAN` too: + +```typescript +for await (const { field, value } of client.hScanIterator('hash')) {} +for await (const member of client.sScanIterator('set')) {} +for await (const { score, value } of client.zScanIterator('sorted-set')) {} +``` + +You can override the default options by providing a configuration object: + +```typescript +client.scanIterator({ + TYPE: 'string', // `SCAN` only + MATCH: 'patter*', + COUNT: 100 +}); +``` + +### [Programmability](https://redis.io/docs/manual/programmability/) + +Redis provides a programming interface allowing code execution on the redis server. + +#### [Functions](https://redis.io/docs/manual/programmability/functions-intro/) + +The following example retrieves a key in redis, returning the value of the key, incremented by an integer. For example, if your key _foo_ has the value _17_ and we run `add('foo', 25)`, it returns the answer to Life, the Universe and Everything. + +```lua +#!lua name=library + +redis.register_function { + function_name = 'add', + callback = function(keys, args) return redis.call('GET', keys[1]) + args[1] end, + flags = { 'no-writes' } +} +``` + +Here is the same example, but in a format that can be pasted into the `redis-cli`. + +``` +FUNCTION LOAD "#!lua name=library\nredis.register_function{function_name=\"add\", callback=function(keys, args) return redis.call('GET', keys[1])+args[1] end, flags={\"no-writes\"}}" +``` + +Load the prior redis function on the _redis server_ before running the example below. + +```typescript +import { createClient } from 'redis'; + +const client = createClient({ + functions: { + library: { + add: { + NUMBER_OF_KEYS: 1, + transformArguments(key: string, toAdd: number): Array { + return [key, toAdd.toString()]; + }, + transformReply(reply: number): number { + return reply; + } + } + } + } +}); + +await client.connect(); + +await client.set('key', '1'); +await client.library.add('key', 2); // 3 +``` + +#### [Lua Scripts](https://redis.io/docs/manual/programmability/eval-intro/) + +The following is an end-to-end example of the prior concept. + +```typescript +import { createClient, defineScript } from 'redis'; + +const client = createClient({ + scripts: { + add: defineScript({ + NUMBER_OF_KEYS: 1, + SCRIPT: + 'return redis.call("GET", KEYS[1]) + ARGV[1];', + transformArguments(key: string, toAdd: number): Array { + return [key, toAdd.toString()]; + }, + transformReply(reply: number): number { + return reply; + } + }) + } +}); + +await client.connect(); + +await client.set('key', '1'); +await client.add('key', 2); // 3 +``` + +### Disconnecting + +There are two functions that disconnect a client from the Redis server. In most scenarios you should use `.quit()` to ensure that pending commands are sent to Redis before closing a connection. + +#### `.QUIT()`/`.quit()` + +Gracefully close a client's connection to Redis, by sending the [`QUIT`](https://redis.io/commands/quit) command to the server. Before quitting, the client executes any remaining commands in its queue, and will receive replies from Redis for each of them. + +```typescript +const [ping, get, quit] = await Promise.all([ + client.ping(), + client.get('key'), + client.quit() +]); // ['PONG', null, 'OK'] + +try { + await client.get('key'); +} catch (err) { + // ClosedClient Error +} +``` + +#### `.disconnect()` + +Forcibly close a client's connection to Redis immediately. Calling `disconnect` will not send further pending commands to the Redis server, or wait for or parse outstanding responses. + +```typescript +await client.disconnect(); +``` + +### Auto-Pipelining + +Node Redis will automatically pipeline requests that are made during the same "tick". + +```typescript +client.set('Tm9kZSBSZWRpcw==', 'users:1'); +client.sAdd('users:1:tokens', 'Tm9kZSBSZWRpcw=='); +``` + +Of course, if you don't do something with your Promises you're certain to get [unhandled Promise exceptions](https://nodejs.org/api/process.html#process_event_unhandledrejection). To take advantage of auto-pipelining and handle your Promises, use `Promise.all()`. + +```typescript +await Promise.all([ + client.set('Tm9kZSBSZWRpcw==', 'users:1'), + client.sAdd('users:1:tokens', 'Tm9kZSBSZWRpcw==') +]); +``` + +### Clustering + +Check out the [Clustering Guide](./docs/clustering.md) when using Node Redis to connect to a Redis Cluster. + +### Events + +The Node Redis client class is an Nodejs EventEmitter and it emits an event each time the network status changes: + +| Name | When | Listener arguments | +|-------------------------|------------------------------------------------------------------------------------|------------------------------------------------------------| +| `connect` | Initiating a connection to the server | *No arguments* | +| `ready` | Client is ready to use | *No arguments* | +| `end` | Connection has been closed (via `.quit()` or `.disconnect()`) | *No arguments* | +| `error` | An error has occurred—usually a network issue such as "Socket closed unexpectedly" | `(error: Error)` | +| `reconnecting` | Client is trying to reconnect to the server | *No arguments* | +| `sharded-channel-moved` | See [here](./docs/pub-sub.md#sharded-channel-moved-event) | See [here](./docs/pub-sub.md#sharded-channel-moved-event) | + +> :warning: You **MUST** listen to `error` events. If a client doesn't have at least one `error` listener registered and an `error` occurs, that error will be thrown and the Node.js process will exit. See the [`EventEmitter` docs](https://nodejs.org/api/events.html#events_error_events) for more details. + +> The client will not emit [any other events](./docs/v3-to-v4.md#all-the-removed-events) beyond those listed above. + +## Supported Redis versions + +Node Redis is supported with the following versions of Redis: + +| Version | Supported | +|---------|--------------------| +| 7.0.z | :heavy_check_mark: | +| 6.2.z | :heavy_check_mark: | +| 6.0.z | :heavy_check_mark: | +| 5.0.z | :heavy_check_mark: | +| < 5.0 | :x: | + +> Node Redis should work with older versions of Redis, but it is not fully tested and we cannot offer support. + +## Contributing + +If you'd like to contribute, check out the [contributing guide](CONTRIBUTING.md). + +Thank you to all the people who already contributed to Node Redis! + +[![Contributors](https://contrib.rocks/image?repo=redis/node-redis)](https://github.com/redis/node-redis/graphs/contributors) + +## License + +This repository is licensed under the "MIT" license. See [LICENSE](LICENSE). diff --git a/server/node_modules/redis/dist/index.d.ts b/server/node_modules/redis/dist/index.d.ts new file mode 100644 index 0000000..ef004a3 --- /dev/null +++ b/server/node_modules/redis/dist/index.d.ts @@ -0,0 +1,302 @@ +import { RedisModules, RedisFunctions, RedisScripts, RedisClientOptions, RedisClientType as _RedisClientType, RedisClusterOptions, RedisClusterType as _RedisClusterType } from '@redis/client'; +export * from '@redis/client'; +export * from '@redis/bloom'; +export * from '@redis/graph'; +export * from '@redis/json'; +export * from '@redis/search'; +export * from '@redis/time-series'; +declare const modules: { + graph: { + CONFIG_GET: typeof import("@redis/graph/dist/commands/CONFIG_GET"); + configGet: typeof import("@redis/graph/dist/commands/CONFIG_GET"); + CONFIG_SET: typeof import("@redis/graph/dist/commands/CONFIG_SET"); + configSet: typeof import("@redis/graph/dist/commands/CONFIG_SET"); + DELETE: typeof import("@redis/graph/dist/commands/DELETE"); + delete: typeof import("@redis/graph/dist/commands/DELETE"); + EXPLAIN: typeof import("@redis/graph/dist/commands/EXPLAIN"); + explain: typeof import("@redis/graph/dist/commands/EXPLAIN"); + LIST: typeof import("@redis/graph/dist/commands/LIST"); + list: typeof import("@redis/graph/dist/commands/LIST"); + PROFILE: typeof import("@redis/graph/dist/commands/PROFILE"); + profile: typeof import("@redis/graph/dist/commands/PROFILE"); + QUERY: typeof import("@redis/graph/dist/commands/QUERY"); + query: typeof import("@redis/graph/dist/commands/QUERY"); + RO_QUERY: typeof import("@redis/graph/dist/commands/RO_QUERY"); + roQuery: typeof import("@redis/graph/dist/commands/RO_QUERY"); + SLOWLOG: typeof import("@redis/graph/dist/commands/SLOWLOG"); + slowLog: typeof import("@redis/graph/dist/commands/SLOWLOG"); + }; + json: { + ARRAPPEND: typeof import("@redis/json/dist/commands/ARRAPPEND"); + arrAppend: typeof import("@redis/json/dist/commands/ARRAPPEND"); + ARRINDEX: typeof import("@redis/json/dist/commands/ARRINDEX"); + arrIndex: typeof import("@redis/json/dist/commands/ARRINDEX"); + ARRINSERT: typeof import("@redis/json/dist/commands/ARRINSERT"); + arrInsert: typeof import("@redis/json/dist/commands/ARRINSERT"); + ARRLEN: typeof import("@redis/json/dist/commands/ARRLEN"); + arrLen: typeof import("@redis/json/dist/commands/ARRLEN"); + ARRPOP: typeof import("@redis/json/dist/commands/ARRPOP"); + arrPop: typeof import("@redis/json/dist/commands/ARRPOP"); + ARRTRIM: typeof import("@redis/json/dist/commands/ARRTRIM"); + arrTrim: typeof import("@redis/json/dist/commands/ARRTRIM"); + DEBUG_MEMORY: typeof import("@redis/json/dist/commands/DEBUG_MEMORY"); + debugMemory: typeof import("@redis/json/dist/commands/DEBUG_MEMORY"); + DEL: typeof import("@redis/json/dist/commands/DEL"); + del: typeof import("@redis/json/dist/commands/DEL"); + FORGET: typeof import("@redis/json/dist/commands/FORGET"); + forget: typeof import("@redis/json/dist/commands/FORGET"); + GET: typeof import("@redis/json/dist/commands/GET"); + get: typeof import("@redis/json/dist/commands/GET"); + MERGE: typeof import("@redis/json/dist/commands/MERGE"); + merge: typeof import("@redis/json/dist/commands/MERGE"); + MGET: typeof import("@redis/json/dist/commands/MGET"); + mGet: typeof import("@redis/json/dist/commands/MGET"); + MSET: typeof import("@redis/json/dist/commands/MSET"); + mSet: typeof import("@redis/json/dist/commands/MSET"); + NUMINCRBY: typeof import("@redis/json/dist/commands/NUMINCRBY"); + numIncrBy: typeof import("@redis/json/dist/commands/NUMINCRBY"); + NUMMULTBY: typeof import("@redis/json/dist/commands/NUMMULTBY"); + numMultBy: typeof import("@redis/json/dist/commands/NUMMULTBY"); + OBJKEYS: typeof import("@redis/json/dist/commands/OBJKEYS"); + objKeys: typeof import("@redis/json/dist/commands/OBJKEYS"); + OBJLEN: typeof import("@redis/json/dist/commands/OBJLEN"); + objLen: typeof import("@redis/json/dist/commands/OBJLEN"); + RESP: typeof import("@redis/json/dist/commands/RESP"); + resp: typeof import("@redis/json/dist/commands/RESP"); + SET: typeof import("@redis/json/dist/commands/SET"); + set: typeof import("@redis/json/dist/commands/SET"); + STRAPPEND: typeof import("@redis/json/dist/commands/STRAPPEND"); + strAppend: typeof import("@redis/json/dist/commands/STRAPPEND"); + STRLEN: typeof import("@redis/json/dist/commands/STRLEN"); + strLen: typeof import("@redis/json/dist/commands/STRLEN"); + TYPE: typeof import("@redis/json/dist/commands/TYPE"); + type: typeof import("@redis/json/dist/commands/TYPE"); + }; + ft: { + _LIST: typeof import("@redis/search/dist/commands/_LIST"); + _list: typeof import("@redis/search/dist/commands/_LIST"); + ALTER: typeof import("@redis/search/dist/commands/ALTER"); + alter: typeof import("@redis/search/dist/commands/ALTER"); + AGGREGATE_WITHCURSOR: typeof import("@redis/search/dist/commands/AGGREGATE_WITHCURSOR"); + aggregateWithCursor: typeof import("@redis/search/dist/commands/AGGREGATE_WITHCURSOR"); + AGGREGATE: typeof import("@redis/search/dist/commands/AGGREGATE"); + aggregate: typeof import("@redis/search/dist/commands/AGGREGATE"); + ALIASADD: typeof import("@redis/search/dist/commands/ALIASADD"); + aliasAdd: typeof import("@redis/search/dist/commands/ALIASADD"); + ALIASDEL: typeof import("@redis/search/dist/commands/ALIASDEL"); + aliasDel: typeof import("@redis/search/dist/commands/ALIASDEL"); + ALIASUPDATE: typeof import("@redis/search/dist/commands/ALIASUPDATE"); + aliasUpdate: typeof import("@redis/search/dist/commands/ALIASUPDATE"); + CONFIG_GET: typeof import("@redis/search/dist/commands/CONFIG_GET"); + configGet: typeof import("@redis/search/dist/commands/CONFIG_GET"); + CONFIG_SET: typeof import("@redis/search/dist/commands/CONFIG_SET"); + configSet: typeof import("@redis/search/dist/commands/CONFIG_SET"); + CREATE: typeof import("@redis/search/dist/commands/CREATE"); + create: typeof import("@redis/search/dist/commands/CREATE"); + CURSOR_DEL: typeof import("@redis/search/dist/commands/CURSOR_DEL"); + cursorDel: typeof import("@redis/search/dist/commands/CURSOR_DEL"); + CURSOR_READ: typeof import("@redis/search/dist/commands/CURSOR_READ"); + cursorRead: typeof import("@redis/search/dist/commands/CURSOR_READ"); + DICTADD: typeof import("@redis/search/dist/commands/DICTADD"); + dictAdd: typeof import("@redis/search/dist/commands/DICTADD"); + DICTDEL: typeof import("@redis/search/dist/commands/DICTDEL"); + dictDel: typeof import("@redis/search/dist/commands/DICTDEL"); + DICTDUMP: typeof import("@redis/search/dist/commands/DICTDUMP"); + dictDump: typeof import("@redis/search/dist/commands/DICTDUMP"); + DROPINDEX: typeof import("@redis/search/dist/commands/DROPINDEX"); + dropIndex: typeof import("@redis/search/dist/commands/DROPINDEX"); + EXPLAIN: typeof import("@redis/search/dist/commands/EXPLAIN"); + explain: typeof import("@redis/search/dist/commands/EXPLAIN"); + EXPLAINCLI: typeof import("@redis/search/dist/commands/EXPLAINCLI"); + explainCli: typeof import("@redis/search/dist/commands/EXPLAINCLI"); + INFO: typeof import("@redis/search/dist/commands/INFO"); + info: typeof import("@redis/search/dist/commands/INFO"); + PROFILESEARCH: typeof import("@redis/search/dist/commands/PROFILE_SEARCH"); + profileSearch: typeof import("@redis/search/dist/commands/PROFILE_SEARCH"); + PROFILEAGGREGATE: typeof import("@redis/search/dist/commands/PROFILE_AGGREGATE"); + profileAggregate: typeof import("@redis/search/dist/commands/PROFILE_AGGREGATE"); + SEARCH: typeof import("@redis/search/dist/commands/SEARCH"); + search: typeof import("@redis/search/dist/commands/SEARCH"); + SEARCH_NOCONTENT: typeof import("@redis/search/dist/commands/SEARCH_NOCONTENT"); + searchNoContent: typeof import("@redis/search/dist/commands/SEARCH_NOCONTENT"); + SPELLCHECK: typeof import("@redis/search/dist/commands/SPELLCHECK"); + spellCheck: typeof import("@redis/search/dist/commands/SPELLCHECK"); + SUGADD: typeof import("@redis/search/dist/commands/SUGADD"); + sugAdd: typeof import("@redis/search/dist/commands/SUGADD"); + SUGDEL: typeof import("@redis/search/dist/commands/SUGDEL"); + sugDel: typeof import("@redis/search/dist/commands/SUGDEL"); + SUGGET_WITHPAYLOADS: typeof import("@redis/search/dist/commands/SUGGET_WITHPAYLOADS"); + sugGetWithPayloads: typeof import("@redis/search/dist/commands/SUGGET_WITHPAYLOADS"); + SUGGET_WITHSCORES_WITHPAYLOADS: typeof import("@redis/search/dist/commands/SUGGET_WITHSCORES_WITHPAYLOADS"); + sugGetWithScoresWithPayloads: typeof import("@redis/search/dist/commands/SUGGET_WITHSCORES_WITHPAYLOADS"); + SUGGET_WITHSCORES: typeof import("@redis/search/dist/commands/SUGGET_WITHSCORES"); + sugGetWithScores: typeof import("@redis/search/dist/commands/SUGGET_WITHSCORES"); + SUGGET: typeof import("@redis/search/dist/commands/SUGGET"); + sugGet: typeof import("@redis/search/dist/commands/SUGGET"); + SUGLEN: typeof import("@redis/search/dist/commands/SUGLEN"); + sugLen: typeof import("@redis/search/dist/commands/SUGLEN"); + SYNDUMP: typeof import("@redis/search/dist/commands/SYNDUMP"); + synDump: typeof import("@redis/search/dist/commands/SYNDUMP"); + SYNUPDATE: typeof import("@redis/search/dist/commands/SYNUPDATE"); + synUpdate: typeof import("@redis/search/dist/commands/SYNUPDATE"); + TAGVALS: typeof import("@redis/search/dist/commands/TAGVALS"); + tagVals: typeof import("@redis/search/dist/commands/TAGVALS"); + }; + ts: { + ADD: typeof import("@redis/time-series/dist/commands/ADD"); + add: typeof import("@redis/time-series/dist/commands/ADD"); + ALTER: typeof import("@redis/time-series/dist/commands/ALTER"); + alter: typeof import("@redis/time-series/dist/commands/ALTER"); + CREATE: typeof import("@redis/time-series/dist/commands/CREATE"); + create: typeof import("@redis/time-series/dist/commands/CREATE"); + CREATERULE: typeof import("@redis/time-series/dist/commands/CREATERULE"); + createRule: typeof import("@redis/time-series/dist/commands/CREATERULE"); + DECRBY: typeof import("@redis/time-series/dist/commands/DECRBY"); + decrBy: typeof import("@redis/time-series/dist/commands/DECRBY"); + DEL: typeof import("@redis/time-series/dist/commands/DEL"); + del: typeof import("@redis/time-series/dist/commands/DEL"); + DELETERULE: typeof import("@redis/time-series/dist/commands/DELETERULE"); + deleteRule: typeof import("@redis/time-series/dist/commands/DELETERULE"); + GET: typeof import("@redis/time-series/dist/commands/GET"); + get: typeof import("@redis/time-series/dist/commands/GET"); + INCRBY: typeof import("@redis/time-series/dist/commands/INCRBY"); + incrBy: typeof import("@redis/time-series/dist/commands/INCRBY"); + INFO_DEBUG: typeof import("@redis/time-series/dist/commands/INFO_DEBUG"); + infoDebug: typeof import("@redis/time-series/dist/commands/INFO_DEBUG"); + INFO: typeof import("@redis/time-series/dist/commands/INFO"); + info: typeof import("@redis/time-series/dist/commands/INFO"); + MADD: typeof import("@redis/time-series/dist/commands/MADD"); + mAdd: typeof import("@redis/time-series/dist/commands/MADD"); + MGET: typeof import("@redis/time-series/dist/commands/MGET"); + mGet: typeof import("@redis/time-series/dist/commands/MGET"); + MGET_WITHLABELS: typeof import("@redis/time-series/dist/commands/MGET_WITHLABELS"); + mGetWithLabels: typeof import("@redis/time-series/dist/commands/MGET_WITHLABELS"); + QUERYINDEX: typeof import("@redis/time-series/dist/commands/QUERYINDEX"); + queryIndex: typeof import("@redis/time-series/dist/commands/QUERYINDEX"); + RANGE: typeof import("@redis/time-series/dist/commands/RANGE"); + range: typeof import("@redis/time-series/dist/commands/RANGE"); + REVRANGE: typeof import("@redis/time-series/dist/commands/REVRANGE"); + revRange: typeof import("@redis/time-series/dist/commands/REVRANGE"); + MRANGE: typeof import("@redis/time-series/dist/commands/MRANGE"); + mRange: typeof import("@redis/time-series/dist/commands/MRANGE"); + MRANGE_WITHLABELS: typeof import("@redis/time-series/dist/commands/MRANGE_WITHLABELS"); + mRangeWithLabels: typeof import("@redis/time-series/dist/commands/MRANGE_WITHLABELS"); + MREVRANGE: typeof import("@redis/time-series/dist/commands/MREVRANGE"); + mRevRange: typeof import("@redis/time-series/dist/commands/MREVRANGE"); + MREVRANGE_WITHLABELS: typeof import("@redis/time-series/dist/commands/MREVRANGE_WITHLABELS"); + mRevRangeWithLabels: typeof import("@redis/time-series/dist/commands/MREVRANGE_WITHLABELS"); + }; + bf: { + ADD: typeof import("@redis/bloom/dist/commands/bloom/ADD"); + add: typeof import("@redis/bloom/dist/commands/bloom/ADD"); + CARD: typeof import("@redis/bloom/dist/commands/bloom/CARD"); + card: typeof import("@redis/bloom/dist/commands/bloom/CARD"); + EXISTS: typeof import("@redis/bloom/dist/commands/bloom/EXISTS"); + exists: typeof import("@redis/bloom/dist/commands/bloom/EXISTS"); + INFO: typeof import("@redis/bloom/dist/commands/bloom/INFO"); + info: typeof import("@redis/bloom/dist/commands/bloom/INFO"); + INSERT: typeof import("@redis/bloom/dist/commands/bloom/INSERT"); + insert: typeof import("@redis/bloom/dist/commands/bloom/INSERT"); + LOADCHUNK: typeof import("@redis/bloom/dist/commands/bloom/LOADCHUNK"); + loadChunk: typeof import("@redis/bloom/dist/commands/bloom/LOADCHUNK"); + MADD: typeof import("@redis/bloom/dist/commands/bloom/MADD"); + mAdd: typeof import("@redis/bloom/dist/commands/bloom/MADD"); + MEXISTS: typeof import("@redis/bloom/dist/commands/bloom/MEXISTS"); + mExists: typeof import("@redis/bloom/dist/commands/bloom/MEXISTS"); + RESERVE: typeof import("@redis/bloom/dist/commands/bloom/RESERVE"); + reserve: typeof import("@redis/bloom/dist/commands/bloom/RESERVE"); + SCANDUMP: typeof import("@redis/bloom/dist/commands/bloom/SCANDUMP"); + scanDump: typeof import("@redis/bloom/dist/commands/bloom/SCANDUMP"); + }; + cms: { + INCRBY: typeof import("@redis/bloom/dist/commands/count-min-sketch/INCRBY"); + incrBy: typeof import("@redis/bloom/dist/commands/count-min-sketch/INCRBY"); + INFO: typeof import("@redis/bloom/dist/commands/count-min-sketch/INFO"); + info: typeof import("@redis/bloom/dist/commands/count-min-sketch/INFO"); + INITBYDIM: typeof import("@redis/bloom/dist/commands/count-min-sketch/INITBYDIM"); + initByDim: typeof import("@redis/bloom/dist/commands/count-min-sketch/INITBYDIM"); + INITBYPROB: typeof import("@redis/bloom/dist/commands/count-min-sketch/INITBYPROB"); + initByProb: typeof import("@redis/bloom/dist/commands/count-min-sketch/INITBYPROB"); + MERGE: typeof import("@redis/bloom/dist/commands/count-min-sketch/MERGE"); + merge: typeof import("@redis/bloom/dist/commands/count-min-sketch/MERGE"); + QUERY: typeof import("@redis/bloom/dist/commands/count-min-sketch/QUERY"); + query: typeof import("@redis/bloom/dist/commands/count-min-sketch/QUERY"); + }; + cf: { + ADD: typeof import("@redis/bloom/dist/commands/cuckoo/ADD"); + add: typeof import("@redis/bloom/dist/commands/cuckoo/ADD"); + ADDNX: typeof import("@redis/bloom/dist/commands/cuckoo/ADDNX"); + addNX: typeof import("@redis/bloom/dist/commands/cuckoo/ADDNX"); + COUNT: typeof import("@redis/bloom/dist/commands/cuckoo/COUNT"); + count: typeof import("@redis/bloom/dist/commands/cuckoo/COUNT"); + DEL: typeof import("@redis/bloom/dist/commands/cuckoo/DEL"); + del: typeof import("@redis/bloom/dist/commands/cuckoo/DEL"); + EXISTS: typeof import("@redis/bloom/dist/commands/cuckoo/EXISTS"); + exists: typeof import("@redis/bloom/dist/commands/cuckoo/EXISTS"); + INFO: typeof import("@redis/bloom/dist/commands/cuckoo/INFO"); + info: typeof import("@redis/bloom/dist/commands/cuckoo/INFO"); + INSERT: typeof import("@redis/bloom/dist/commands/cuckoo/INSERT"); + insert: typeof import("@redis/bloom/dist/commands/cuckoo/INSERT"); + INSERTNX: typeof import("@redis/bloom/dist/commands/cuckoo/INSERTNX"); + insertNX: typeof import("@redis/bloom/dist/commands/cuckoo/INSERTNX"); + LOADCHUNK: typeof import("@redis/bloom/dist/commands/cuckoo/LOADCHUNK"); + loadChunk: typeof import("@redis/bloom/dist/commands/cuckoo/LOADCHUNK"); + RESERVE: typeof import("@redis/bloom/dist/commands/cuckoo/RESERVE"); + reserve: typeof import("@redis/bloom/dist/commands/cuckoo/RESERVE"); + SCANDUMP: typeof import("@redis/bloom/dist/commands/cuckoo/SCANDUMP"); + scanDump: typeof import("@redis/bloom/dist/commands/cuckoo/SCANDUMP"); + }; + tDigest: { + ADD: typeof import("@redis/bloom/dist/commands/t-digest/ADD"); + add: typeof import("@redis/bloom/dist/commands/t-digest/ADD"); + BYRANK: typeof import("@redis/bloom/dist/commands/t-digest/BYRANK"); + byRank: typeof import("@redis/bloom/dist/commands/t-digest/BYRANK"); + BYREVRANK: typeof import("@redis/bloom/dist/commands/t-digest/BYREVRANK"); + byRevRank: typeof import("@redis/bloom/dist/commands/t-digest/BYREVRANK"); + CDF: typeof import("@redis/bloom/dist/commands/t-digest/CDF"); + cdf: typeof import("@redis/bloom/dist/commands/t-digest/CDF"); + CREATE: typeof import("@redis/bloom/dist/commands/t-digest/CREATE"); + create: typeof import("@redis/bloom/dist/commands/t-digest/CREATE"); + INFO: typeof import("@redis/bloom/dist/commands/t-digest/INFO"); + info: typeof import("@redis/bloom/dist/commands/t-digest/INFO"); + MAX: typeof import("@redis/bloom/dist/commands/t-digest/MAX"); + max: typeof import("@redis/bloom/dist/commands/t-digest/MAX"); + MERGE: typeof import("@redis/bloom/dist/commands/t-digest/MERGE"); + merge: typeof import("@redis/bloom/dist/commands/t-digest/MERGE"); + MIN: typeof import("@redis/bloom/dist/commands/t-digest/MIN"); + min: typeof import("@redis/bloom/dist/commands/t-digest/MIN"); + QUANTILE: typeof import("@redis/bloom/dist/commands/t-digest/QUANTILE"); + quantile: typeof import("@redis/bloom/dist/commands/t-digest/QUANTILE"); + RANK: typeof import("@redis/bloom/dist/commands/t-digest/RANK"); + rank: typeof import("@redis/bloom/dist/commands/t-digest/RANK"); + RESET: typeof import("@redis/bloom/dist/commands/t-digest/RESET"); + reset: typeof import("@redis/bloom/dist/commands/t-digest/RESET"); + REVRANK: typeof import("@redis/bloom/dist/commands/t-digest/REVRANK"); + revRank: typeof import("@redis/bloom/dist/commands/t-digest/REVRANK"); + TRIMMED_MEAN: typeof import("@redis/bloom/dist/commands/t-digest/TRIMMED_MEAN"); + trimmedMean: typeof import("@redis/bloom/dist/commands/t-digest/TRIMMED_MEAN"); + }; + topK: { + ADD: typeof import("@redis/bloom/dist/commands/top-k/ADD"); + add: typeof import("@redis/bloom/dist/commands/top-k/ADD"); + COUNT: typeof import("@redis/bloom/dist/commands/top-k/COUNT"); + count: typeof import("@redis/bloom/dist/commands/top-k/COUNT"); + INCRBY: typeof import("@redis/bloom/dist/commands/top-k/INCRBY"); + incrBy: typeof import("@redis/bloom/dist/commands/top-k/INCRBY"); + INFO: typeof import("@redis/bloom/dist/commands/top-k/INFO"); + info: typeof import("@redis/bloom/dist/commands/top-k/INFO"); + LIST_WITHCOUNT: typeof import("@redis/bloom/dist/commands/top-k/LIST_WITHCOUNT"); + listWithCount: typeof import("@redis/bloom/dist/commands/top-k/LIST_WITHCOUNT"); + LIST: typeof import("@redis/bloom/dist/commands/top-k/LIST"); + list: typeof import("@redis/bloom/dist/commands/top-k/LIST"); + QUERY: typeof import("@redis/bloom/dist/commands/top-k/QUERY"); + query: typeof import("@redis/bloom/dist/commands/top-k/QUERY"); + RESERVE: typeof import("@redis/bloom/dist/commands/top-k/RESERVE"); + reserve: typeof import("@redis/bloom/dist/commands/top-k/RESERVE"); + }; +}; +export type RedisDefaultModules = typeof modules; +export type RedisClientType, S extends RedisScripts = Record> = _RedisClientType; +export declare function createClient(options?: RedisClientOptions): _RedisClientType; +export type RedisClusterType, S extends RedisScripts = Record> = _RedisClusterType; +export declare function createCluster(options: RedisClusterOptions): RedisClusterType; diff --git a/server/node_modules/redis/dist/index.js b/server/node_modules/redis/dist/index.js new file mode 100644 index 0000000..fb6b04b --- /dev/null +++ b/server/node_modules/redis/dist/index.js @@ -0,0 +1,56 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createCluster = exports.createClient = void 0; +const client_1 = require("@redis/client"); +const bloom_1 = require("@redis/bloom"); +const graph_1 = require("@redis/graph"); +const json_1 = require("@redis/json"); +const search_1 = require("@redis/search"); +const time_series_1 = require("@redis/time-series"); +__exportStar(require("@redis/client"), exports); +__exportStar(require("@redis/bloom"), exports); +__exportStar(require("@redis/graph"), exports); +__exportStar(require("@redis/json"), exports); +__exportStar(require("@redis/search"), exports); +__exportStar(require("@redis/time-series"), exports); +const modules = { + ...bloom_1.default, + graph: graph_1.default, + json: json_1.default, + ft: search_1.default, + ts: time_series_1.default +}; +function createClient(options) { + return (0, client_1.createClient)({ + ...options, + modules: { + ...modules, + ...options?.modules + } + }); +} +exports.createClient = createClient; +function createCluster(options) { + return (0, client_1.createCluster)({ + ...options, + modules: { + ...modules, + ...options?.modules + } + }); +} +exports.createCluster = createCluster; diff --git a/server/node_modules/redis/package.json b/server/node_modules/redis/package.json new file mode 100644 index 0000000..e8ceef7 --- /dev/null +++ b/server/node_modules/redis/package.json @@ -0,0 +1,50 @@ +{ + "name": "redis", + "description": "A modern, high performance Redis client", + "version": "4.7.0", + "license": "MIT", + "main": "./dist/index.js", + "types": "./dist/index.d.ts", + "files": [ + "dist/" + ], + "workspaces": [ + "./packages/*" + ], + "scripts": { + "test": "npm run test -ws --if-present", + "build:client": "npm run build -w ./packages/client", + "build:test-utils": "npm run build -w ./packages/test-utils", + "build:tests-tools": "npm run build:client && npm run build:test-utils", + "build:modules": "find ./packages -mindepth 1 -maxdepth 1 -type d ! -name 'client' ! -name 'test-utils' -exec npm run build -w {} \\;", + "build": "tsc", + "build-all": "npm run build:client && npm run build:test-utils && npm run build:modules && npm run build", + "documentation": "npm run documentation -ws --if-present", + "gh-pages": "gh-pages -d ./documentation -e ./documentation -u 'documentation-bot '" + }, + "dependencies": { + "@redis/bloom": "1.2.0", + "@redis/client": "1.6.0", + "@redis/graph": "1.1.1", + "@redis/json": "1.0.7", + "@redis/search": "1.2.0", + "@redis/time-series": "1.1.0" + }, + "devDependencies": { + "@tsconfig/node14": "^14.1.0", + "gh-pages": "^6.0.0", + "release-it": "^16.1.5", + "typescript": "^5.2.2" + }, + "repository": { + "type": "git", + "url": "git://github.com/redis/node-redis.git" + }, + "bugs": { + "url": "https://github.com/redis/node-redis/issues" + }, + "homepage": "https://github.com/redis/node-redis", + "keywords": [ + "redis" + ] +} diff --git a/server/node_modules/yallist/LICENSE b/server/node_modules/yallist/LICENSE new file mode 100644 index 0000000..19129e3 --- /dev/null +++ b/server/node_modules/yallist/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/server/node_modules/yallist/README.md b/server/node_modules/yallist/README.md new file mode 100644 index 0000000..f586101 --- /dev/null +++ b/server/node_modules/yallist/README.md @@ -0,0 +1,204 @@ +# yallist + +Yet Another Linked List + +There are many doubly-linked list implementations like it, but this +one is mine. + +For when an array would be too big, and a Map can't be iterated in +reverse order. + + +[![Build Status](https://travis-ci.org/isaacs/yallist.svg?branch=master)](https://travis-ci.org/isaacs/yallist) [![Coverage Status](https://coveralls.io/repos/isaacs/yallist/badge.svg?service=github)](https://coveralls.io/github/isaacs/yallist) + +## basic usage + +```javascript +var yallist = require('yallist') +var myList = yallist.create([1, 2, 3]) +myList.push('foo') +myList.unshift('bar') +// of course pop() and shift() are there, too +console.log(myList.toArray()) // ['bar', 1, 2, 3, 'foo'] +myList.forEach(function (k) { + // walk the list head to tail +}) +myList.forEachReverse(function (k, index, list) { + // walk the list tail to head +}) +var myDoubledList = myList.map(function (k) { + return k + k +}) +// now myDoubledList contains ['barbar', 2, 4, 6, 'foofoo'] +// mapReverse is also a thing +var myDoubledListReverse = myList.mapReverse(function (k) { + return k + k +}) // ['foofoo', 6, 4, 2, 'barbar'] + +var reduced = myList.reduce(function (set, entry) { + set += entry + return set +}, 'start') +console.log(reduced) // 'startfoo123bar' +``` + +## api + +The whole API is considered "public". + +Functions with the same name as an Array method work more or less the +same way. + +There's reverse versions of most things because that's the point. + +### Yallist + +Default export, the class that holds and manages a list. + +Call it with either a forEach-able (like an array) or a set of +arguments, to initialize the list. + +The Array-ish methods all act like you'd expect. No magic length, +though, so if you change that it won't automatically prune or add +empty spots. + +### Yallist.create(..) + +Alias for Yallist function. Some people like factories. + +#### yallist.head + +The first node in the list + +#### yallist.tail + +The last node in the list + +#### yallist.length + +The number of nodes in the list. (Change this at your peril. It is +not magic like Array length.) + +#### yallist.toArray() + +Convert the list to an array. + +#### yallist.forEach(fn, [thisp]) + +Call a function on each item in the list. + +#### yallist.forEachReverse(fn, [thisp]) + +Call a function on each item in the list, in reverse order. + +#### yallist.get(n) + +Get the data at position `n` in the list. If you use this a lot, +probably better off just using an Array. + +#### yallist.getReverse(n) + +Get the data at position `n`, counting from the tail. + +#### yallist.map(fn, thisp) + +Create a new Yallist with the result of calling the function on each +item. + +#### yallist.mapReverse(fn, thisp) + +Same as `map`, but in reverse. + +#### yallist.pop() + +Get the data from the list tail, and remove the tail from the list. + +#### yallist.push(item, ...) + +Insert one or more items to the tail of the list. + +#### yallist.reduce(fn, initialValue) + +Like Array.reduce. + +#### yallist.reduceReverse + +Like Array.reduce, but in reverse. + +#### yallist.reverse + +Reverse the list in place. + +#### yallist.shift() + +Get the data from the list head, and remove the head from the list. + +#### yallist.slice([from], [to]) + +Just like Array.slice, but returns a new Yallist. + +#### yallist.sliceReverse([from], [to]) + +Just like yallist.slice, but the result is returned in reverse. + +#### yallist.toArray() + +Create an array representation of the list. + +#### yallist.toArrayReverse() + +Create a reversed array representation of the list. + +#### yallist.unshift(item, ...) + +Insert one or more items to the head of the list. + +#### yallist.unshiftNode(node) + +Move a Node object to the front of the list. (That is, pull it out of +wherever it lives, and make it the new head.) + +If the node belongs to a different list, then that list will remove it +first. + +#### yallist.pushNode(node) + +Move a Node object to the end of the list. (That is, pull it out of +wherever it lives, and make it the new tail.) + +If the node belongs to a list already, then that list will remove it +first. + +#### yallist.removeNode(node) + +Remove a node from the list, preserving referential integrity of head +and tail and other nodes. + +Will throw an error if you try to have a list remove a node that +doesn't belong to it. + +### Yallist.Node + +The class that holds the data and is actually the list. + +Call with `var n = new Node(value, previousNode, nextNode)` + +Note that if you do direct operations on Nodes themselves, it's very +easy to get into weird states where the list is broken. Be careful :) + +#### node.next + +The next node in the list. + +#### node.prev + +The previous node in the list. + +#### node.value + +The data the node contains. + +#### node.list + +The list to which this node belongs. (Null if it does not belong to +any list.) diff --git a/server/node_modules/yallist/iterator.js b/server/node_modules/yallist/iterator.js new file mode 100644 index 0000000..d41c97a --- /dev/null +++ b/server/node_modules/yallist/iterator.js @@ -0,0 +1,8 @@ +'use strict' +module.exports = function (Yallist) { + Yallist.prototype[Symbol.iterator] = function* () { + for (let walker = this.head; walker; walker = walker.next) { + yield walker.value + } + } +} diff --git a/server/node_modules/yallist/package.json b/server/node_modules/yallist/package.json new file mode 100644 index 0000000..8a08386 --- /dev/null +++ b/server/node_modules/yallist/package.json @@ -0,0 +1,29 @@ +{ + "name": "yallist", + "version": "4.0.0", + "description": "Yet Another Linked List", + "main": "yallist.js", + "directories": { + "test": "test" + }, + "files": [ + "yallist.js", + "iterator.js" + ], + "dependencies": {}, + "devDependencies": { + "tap": "^12.1.0" + }, + "scripts": { + "test": "tap test/*.js --100", + "preversion": "npm test", + "postversion": "npm publish", + "postpublish": "git push origin --all; git push origin --tags" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/isaacs/yallist.git" + }, + "author": "Isaac Z. Schlueter (http://blog.izs.me/)", + "license": "ISC" +} diff --git a/server/node_modules/yallist/yallist.js b/server/node_modules/yallist/yallist.js new file mode 100644 index 0000000..4e83ab1 --- /dev/null +++ b/server/node_modules/yallist/yallist.js @@ -0,0 +1,426 @@ +'use strict' +module.exports = Yallist + +Yallist.Node = Node +Yallist.create = Yallist + +function Yallist (list) { + var self = this + if (!(self instanceof Yallist)) { + self = new Yallist() + } + + self.tail = null + self.head = null + self.length = 0 + + if (list && typeof list.forEach === 'function') { + list.forEach(function (item) { + self.push(item) + }) + } else if (arguments.length > 0) { + for (var i = 0, l = arguments.length; i < l; i++) { + self.push(arguments[i]) + } + } + + return self +} + +Yallist.prototype.removeNode = function (node) { + if (node.list !== this) { + throw new Error('removing node which does not belong to this list') + } + + var next = node.next + var prev = node.prev + + if (next) { + next.prev = prev + } + + if (prev) { + prev.next = next + } + + if (node === this.head) { + this.head = next + } + if (node === this.tail) { + this.tail = prev + } + + node.list.length-- + node.next = null + node.prev = null + node.list = null + + return next +} + +Yallist.prototype.unshiftNode = function (node) { + if (node === this.head) { + return + } + + if (node.list) { + node.list.removeNode(node) + } + + var head = this.head + node.list = this + node.next = head + if (head) { + head.prev = node + } + + this.head = node + if (!this.tail) { + this.tail = node + } + this.length++ +} + +Yallist.prototype.pushNode = function (node) { + if (node === this.tail) { + return + } + + if (node.list) { + node.list.removeNode(node) + } + + var tail = this.tail + node.list = this + node.prev = tail + if (tail) { + tail.next = node + } + + this.tail = node + if (!this.head) { + this.head = node + } + this.length++ +} + +Yallist.prototype.push = function () { + for (var i = 0, l = arguments.length; i < l; i++) { + push(this, arguments[i]) + } + return this.length +} + +Yallist.prototype.unshift = function () { + for (var i = 0, l = arguments.length; i < l; i++) { + unshift(this, arguments[i]) + } + return this.length +} + +Yallist.prototype.pop = function () { + if (!this.tail) { + return undefined + } + + var res = this.tail.value + this.tail = this.tail.prev + if (this.tail) { + this.tail.next = null + } else { + this.head = null + } + this.length-- + return res +} + +Yallist.prototype.shift = function () { + if (!this.head) { + return undefined + } + + var res = this.head.value + this.head = this.head.next + if (this.head) { + this.head.prev = null + } else { + this.tail = null + } + this.length-- + return res +} + +Yallist.prototype.forEach = function (fn, thisp) { + thisp = thisp || this + for (var walker = this.head, i = 0; walker !== null; i++) { + fn.call(thisp, walker.value, i, this) + walker = walker.next + } +} + +Yallist.prototype.forEachReverse = function (fn, thisp) { + thisp = thisp || this + for (var walker = this.tail, i = this.length - 1; walker !== null; i--) { + fn.call(thisp, walker.value, i, this) + walker = walker.prev + } +} + +Yallist.prototype.get = function (n) { + for (var i = 0, walker = this.head; walker !== null && i < n; i++) { + // abort out of the list early if we hit a cycle + walker = walker.next + } + if (i === n && walker !== null) { + return walker.value + } +} + +Yallist.prototype.getReverse = function (n) { + for (var i = 0, walker = this.tail; walker !== null && i < n; i++) { + // abort out of the list early if we hit a cycle + walker = walker.prev + } + if (i === n && walker !== null) { + return walker.value + } +} + +Yallist.prototype.map = function (fn, thisp) { + thisp = thisp || this + var res = new Yallist() + for (var walker = this.head; walker !== null;) { + res.push(fn.call(thisp, walker.value, this)) + walker = walker.next + } + return res +} + +Yallist.prototype.mapReverse = function (fn, thisp) { + thisp = thisp || this + var res = new Yallist() + for (var walker = this.tail; walker !== null;) { + res.push(fn.call(thisp, walker.value, this)) + walker = walker.prev + } + return res +} + +Yallist.prototype.reduce = function (fn, initial) { + var acc + var walker = this.head + if (arguments.length > 1) { + acc = initial + } else if (this.head) { + walker = this.head.next + acc = this.head.value + } else { + throw new TypeError('Reduce of empty list with no initial value') + } + + for (var i = 0; walker !== null; i++) { + acc = fn(acc, walker.value, i) + walker = walker.next + } + + return acc +} + +Yallist.prototype.reduceReverse = function (fn, initial) { + var acc + var walker = this.tail + if (arguments.length > 1) { + acc = initial + } else if (this.tail) { + walker = this.tail.prev + acc = this.tail.value + } else { + throw new TypeError('Reduce of empty list with no initial value') + } + + for (var i = this.length - 1; walker !== null; i--) { + acc = fn(acc, walker.value, i) + walker = walker.prev + } + + return acc +} + +Yallist.prototype.toArray = function () { + var arr = new Array(this.length) + for (var i = 0, walker = this.head; walker !== null; i++) { + arr[i] = walker.value + walker = walker.next + } + return arr +} + +Yallist.prototype.toArrayReverse = function () { + var arr = new Array(this.length) + for (var i = 0, walker = this.tail; walker !== null; i++) { + arr[i] = walker.value + walker = walker.prev + } + return arr +} + +Yallist.prototype.slice = function (from, to) { + to = to || this.length + if (to < 0) { + to += this.length + } + from = from || 0 + if (from < 0) { + from += this.length + } + var ret = new Yallist() + if (to < from || to < 0) { + return ret + } + if (from < 0) { + from = 0 + } + if (to > this.length) { + to = this.length + } + for (var i = 0, walker = this.head; walker !== null && i < from; i++) { + walker = walker.next + } + for (; walker !== null && i < to; i++, walker = walker.next) { + ret.push(walker.value) + } + return ret +} + +Yallist.prototype.sliceReverse = function (from, to) { + to = to || this.length + if (to < 0) { + to += this.length + } + from = from || 0 + if (from < 0) { + from += this.length + } + var ret = new Yallist() + if (to < from || to < 0) { + return ret + } + if (from < 0) { + from = 0 + } + if (to > this.length) { + to = this.length + } + for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) { + walker = walker.prev + } + for (; walker !== null && i > from; i--, walker = walker.prev) { + ret.push(walker.value) + } + return ret +} + +Yallist.prototype.splice = function (start, deleteCount, ...nodes) { + if (start > this.length) { + start = this.length - 1 + } + if (start < 0) { + start = this.length + start; + } + + for (var i = 0, walker = this.head; walker !== null && i < start; i++) { + walker = walker.next + } + + var ret = [] + for (var i = 0; walker && i < deleteCount; i++) { + ret.push(walker.value) + walker = this.removeNode(walker) + } + if (walker === null) { + walker = this.tail + } + + if (walker !== this.head && walker !== this.tail) { + walker = walker.prev + } + + for (var i = 0; i < nodes.length; i++) { + walker = insert(this, walker, nodes[i]) + } + return ret; +} + +Yallist.prototype.reverse = function () { + var head = this.head + var tail = this.tail + for (var walker = head; walker !== null; walker = walker.prev) { + var p = walker.prev + walker.prev = walker.next + walker.next = p + } + this.head = tail + this.tail = head + return this +} + +function insert (self, node, value) { + var inserted = node === self.head ? + new Node(value, null, node, self) : + new Node(value, node, node.next, self) + + if (inserted.next === null) { + self.tail = inserted + } + if (inserted.prev === null) { + self.head = inserted + } + + self.length++ + + return inserted +} + +function push (self, item) { + self.tail = new Node(item, self.tail, null, self) + if (!self.head) { + self.head = self.tail + } + self.length++ +} + +function unshift (self, item) { + self.head = new Node(item, null, self.head, self) + if (!self.tail) { + self.tail = self.head + } + self.length++ +} + +function Node (value, prev, next, list) { + if (!(this instanceof Node)) { + return new Node(value, prev, next, list) + } + + this.list = list + this.value = value + + if (prev) { + prev.next = this + this.prev = prev + } else { + this.prev = null + } + + if (next) { + next.prev = this + this.next = next + } else { + this.next = null + } +} + +try { + // add if support for Symbol.iterator is present + require('./iterator.js')(Yallist) +} catch (er) {} diff --git a/server/package-lock.json b/server/package-lock.json index e73eea4..3dc9069 100644 --- a/server/package-lock.json +++ b/server/package-lock.json @@ -1,18 +1,78 @@ { - "name": "socket-chat-example", + "name": "dama-online-backend", "version": "0.0.1", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "socket-chat-example", + "name": "dama-online-backend", "version": "0.0.1", "license": "ISC", "dependencies": { "express": "^4.21.2", + "redis": "^4.7.0", "socket.io": "^4.8.1" } }, + "node_modules/@redis/bloom": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@redis/bloom/-/bloom-1.2.0.tgz", + "integrity": "sha512-HG2DFjYKbpNmVXsa0keLHp/3leGJz1mjh09f2RLGGLQZzSHpkmZWuwJbAvo3QcRY8p80m5+ZdXZdYOSBLlp7Cg==", + "license": "MIT", + "peerDependencies": { + "@redis/client": "^1.0.0" + } + }, + "node_modules/@redis/client": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@redis/client/-/client-1.6.0.tgz", + "integrity": "sha512-aR0uffYI700OEEH4gYnitAnv3vzVGXCFvYfdpu/CJKvk4pHfLPEy/JSZyrpQ+15WhXe1yJRXLtfQ84s4mEXnPg==", + "license": "MIT", + "dependencies": { + "cluster-key-slot": "1.1.2", + "generic-pool": "3.9.0", + "yallist": "4.0.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/@redis/graph": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@redis/graph/-/graph-1.1.1.tgz", + "integrity": "sha512-FEMTcTHZozZciLRl6GiiIB4zGm5z5F3F6a6FZCyrfxdKOhFlGkiAqlexWMBzCi4DcRoyiOsuLfW+cjlGWyExOw==", + "license": "MIT", + "peerDependencies": { + "@redis/client": "^1.0.0" + } + }, + "node_modules/@redis/json": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@redis/json/-/json-1.0.7.tgz", + "integrity": "sha512-6UyXfjVaTBTJtKNG4/9Z8PSpKE6XgSyEb8iwaqDcy+uKrd/DGYHTWkUdnQDyzm727V7p21WUMhsqz5oy65kPcQ==", + "license": "MIT", + "peerDependencies": { + "@redis/client": "^1.0.0" + } + }, + "node_modules/@redis/search": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@redis/search/-/search-1.2.0.tgz", + "integrity": "sha512-tYoDBbtqOVigEDMAcTGsRlMycIIjwMCgD8eR2t0NANeQmgK/lvxNAvYyb6bZDD4frHRhIHkJu2TBRvB0ERkOmw==", + "license": "MIT", + "peerDependencies": { + "@redis/client": "^1.0.0" + } + }, + "node_modules/@redis/time-series": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@redis/time-series/-/time-series-1.1.0.tgz", + "integrity": "sha512-c1Q99M5ljsIuc4YdaCwfUEXsofakb9c8+Zse2qxTadu8TalLXuAESzLvFAvNVbkmSlvlzIQOLpBCmWI9wTOt+g==", + "license": "MIT", + "peerDependencies": { + "@redis/client": "^1.0.0" + } + }, "node_modules/@socket.io/component-emitter": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.2.tgz", @@ -127,6 +187,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/cluster-key-slot": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/cluster-key-slot/-/cluster-key-slot-1.1.2.tgz", + "integrity": "sha512-RMr0FhtfXemyinomL4hrWcYJxmX6deFdCxpJzhDttxgO1+bcCnkk+9drydLVDmAMG7NE6aN/fl4F7ucU/90gAA==", + "license": "Apache-2.0", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/content-disposition": { "version": "0.5.4", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", @@ -430,6 +499,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/generic-pool": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/generic-pool/-/generic-pool-3.9.0.tgz", + "integrity": "sha512-hymDOu5B53XvN4QT9dBmZxPX4CWhBPPLguTZ9MMFeFa/Kg0xWVfylOVNlJji/E7yTZWFd/q9GO5TxDLq156D7g==", + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, "node_modules/get-intrinsic": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", @@ -730,6 +808,23 @@ "node": ">= 0.8" } }, + "node_modules/redis": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/redis/-/redis-4.7.0.tgz", + "integrity": "sha512-zvmkHEAdGMn+hMRXuMBtu4Vo5P6rHQjLoHftu+lBqq8ZTA3RCVC/WzD790bkKKiNFp7d5/9PcSD19fJyyRvOdQ==", + "license": "MIT", + "workspaces": [ + "./packages/*" + ], + "dependencies": { + "@redis/bloom": "1.2.0", + "@redis/client": "1.6.0", + "@redis/graph": "1.1.1", + "@redis/json": "1.0.7", + "@redis/search": "1.2.0", + "@redis/time-series": "1.1.0" + } + }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -1082,6 +1177,12 @@ "optional": true } } + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "license": "ISC" } } } diff --git a/server/package.json b/server/package.json index 3da75ef..1de1265 100644 --- a/server/package.json +++ b/server/package.json @@ -1,5 +1,5 @@ { - "name": "socket-chat-example", + "name": "dama-online-backend", "version": "0.0.1", "description": "my first socket.io app", "type": "commonjs", @@ -11,6 +11,7 @@ "license": "ISC", "dependencies": { "express": "^4.21.2", + "redis": "^4.7.0", "socket.io": "^4.8.1" } }