This commit is contained in:
2026-01-28 00:55:06 +03:00
parent fc033be6a5
commit 25fc82c14a
1642 changed files with 101122 additions and 0 deletions

View File

@ -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<string>): RedisCommandArguments;
export declare function transformReply(): Array<null | string>;

9
node_modules/@redis/bloom/dist/commands/top-k/ADD.js generated vendored Normal file
View File

@ -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;

View File

@ -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<string>): RedisCommandArguments;
export declare function transformReply(): Array<number>;

10
node_modules/@redis/bloom/dist/commands/top-k/COUNT.js generated vendored Normal file
View File

@ -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;

View File

@ -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<IncrByItem>): Array<string>;
export declare function transformReply(): Array<string | null>;
export {};

View File

@ -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());
}

View File

@ -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<string>;
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;

18
node_modules/@redis/bloom/dist/commands/top-k/INFO.js generated vendored Normal file
View File

@ -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;

View File

@ -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<string>;
export declare function transformReply(): Array<string | null>;

View File

@ -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;

View File

@ -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<string>;
type ListWithCountRawReply = Array<string | number>;
type ListWithCountReply = Array<{
item: string;
count: number;
}>;
export declare function transformReply(rawReply: ListWithCountRawReply): ListWithCountReply;
export {};

View File

@ -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;

View File

@ -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<string>): RedisCommandArguments;
export declare function transformReply(): Array<number>;

10
node_modules/@redis/bloom/dist/commands/top-k/QUERY.js generated vendored Normal file
View File

@ -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;

View File

@ -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<string>;
export declare function transformReply(): 'OK';
export {};

View File

@ -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;

View File

@ -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;

28
node_modules/@redis/bloom/dist/commands/top-k/index.js generated vendored Normal file
View File

@ -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
};