You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
WIP
This commit is contained in:
@@ -210,11 +210,6 @@ export type ReplyWithTypeMapping<
|
||||
)
|
||||
);
|
||||
|
||||
type a = ReplyWithTypeMapping<
|
||||
ArrayReply<TuplesReply<[BlobStringReply | NullReply]>>,
|
||||
{}
|
||||
>;
|
||||
|
||||
export type TransformReply = (this: void, reply: any, preserve?: any) => any; // TODO;
|
||||
|
||||
export type RedisArgument = string | Buffer;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { RedisModules, RedisFunctions, RedisScripts, RespVersions, TypeMapping, Command, CommandArguments, ReplyUnion } from '../RESP/types';
|
||||
import { RedisModules, RedisFunctions, RedisScripts, RespVersions, Command, CommandArguments, ReplyUnion } from '../RESP/types';
|
||||
import { RedisClientType } from '.';
|
||||
import { getTransformReply } from '../commander';
|
||||
import { ErrorReply } from '../errors';
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import COMMANDS from '../commands';
|
||||
import RedisMultiCommand, { MULTI_REPLY, MultiReply, MultiReplyType } from '../multi-command';
|
||||
import { ReplyWithTypeMapping, CommandReply, Command, CommandArguments, CommanderConfig, RedisFunctions, RedisModules, RedisScripts, RespVersions, TransformReply, RedisScript, RedisFunction, TypeMapping, ReplyUnion } from '../RESP/types';
|
||||
import { ReplyWithTypeMapping, CommandReply, Command, CommandArguments, CommanderConfig, RedisFunctions, RedisModules, RedisScripts, RespVersions, TransformReply, RedisScript, RedisFunction, TypeMapping } from '../RESP/types';
|
||||
import { attachConfig, functionArgumentsPrefix, getTransformReply } from '../commander';
|
||||
import { RedisClientType } from '.';
|
||||
|
||||
|
@@ -1,16 +1,10 @@
|
||||
import { RedisClusterClientOptions, RedisClusterOptions } from '.';
|
||||
import { RootNodesUnavailableError } from '../errors';
|
||||
import RedisClient, { RedisClientOptions, RedisClientType } from '../client';
|
||||
import { types } from 'node:util';
|
||||
import { EventEmitter } from 'node:stream';
|
||||
import { ChannelListeners, PubSubType, PubSubTypeListeners } from '../client/pub-sub';
|
||||
import { RedisArgument, RedisFunctions, RedisModules, RedisScripts, RespVersions, TypeMapping } from '../RESP/types';
|
||||
|
||||
// TODO: ?!
|
||||
// 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');
|
||||
import calculateSlot from 'cluster-key-slot';
|
||||
|
||||
interface NodeAddress {
|
||||
host: string;
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import COMMANDS from '../commands';
|
||||
import RedisMultiCommand, { MULTI_REPLY, MultiReply, MultiReplyType } from '../multi-command';
|
||||
import { ReplyWithTypeMapping, CommandReply, Command, CommandArguments, CommanderConfig, RedisFunctions, RedisModules, RedisScripts, RespVersions, TransformReply, RedisScript, RedisFunction, TypeMapping, ReplyUnion, RedisArgument } from '../RESP/types';
|
||||
import { ReplyWithTypeMapping, CommandReply, Command, CommandArguments, CommanderConfig, RedisFunctions, RedisModules, RedisScripts, RespVersions, TransformReply, RedisScript, RedisFunction, TypeMapping, RedisArgument } from '../RESP/types';
|
||||
import { attachConfig, functionArgumentsPrefix, getTransformReply } from '../commander';
|
||||
import RedisCluster, { RedisClusterType } from '.';
|
||||
|
||||
|
@@ -1,7 +1,6 @@
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../test-utils';
|
||||
import CLIENT_TRACKINGINFO from './CLIENT_TRACKINGINFO';
|
||||
import { RESP_TYPES } from '../RESP/decoder';
|
||||
|
||||
describe('CLIENT TRACKINGINFO', () => {
|
||||
testUtils.isVersionGreaterThanHook([6, 2]);
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { Command } from '../RESP/types';
|
||||
import EVAL, { EvalOptions, transformEvalArguments } from './EVAL';
|
||||
import EVAL, { transformEvalArguments } from './EVAL';
|
||||
|
||||
export default {
|
||||
FIRST_KEY_INDEX: EVAL.FIRST_KEY_INDEX,
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { Command } from '../RESP/types';
|
||||
import EVAL, { EvalOptions, transformEvalArguments } from './EVAL';
|
||||
import EVAL, { transformEvalArguments } from './EVAL';
|
||||
|
||||
export default {
|
||||
FIRST_KEY_INDEX: EVAL.FIRST_KEY_INDEX,
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { RedisArgument, TuplesToMapReply, BlobStringReply, ArrayReply, NullReply, SetReply, UnwrapReply, Resp2Reply, CommandArguments, Command, ReplyWithTypeMapping } from '../RESP/types';
|
||||
import { RedisArgument, TuplesToMapReply, BlobStringReply, ArrayReply, NullReply, SetReply, UnwrapReply, Resp2Reply, CommandArguments, Command } from '../RESP/types';
|
||||
|
||||
export interface FunctionListOptions {
|
||||
LIBRARYNAME?: RedisArgument;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { RedisArgument, CommandArguments, ArrayReply, BlobStringReply, Command } from '../RESP/types';
|
||||
import { RedisArgument, CommandArguments, Command } from '../RESP/types';
|
||||
import GEORADIUSBYMEMBER from './GEORADIUSBYMEMBER';
|
||||
import { GeoSearchOptions, GeoUnits, pushGeoSearchOptions } from './GEOSEARCH';
|
||||
import GEOSEARCH_WITH, { GeoReplyWith } from './GEOSEARCH_WITH';
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { TuplesToMapReply, BlobStringReply, NumberReply, DoubleReply, ArrayReply, UnwrapReply, Resp2Reply, Command } from '../RESP/types';
|
||||
import { TuplesToMapReply, BlobStringReply, NumberReply, DoubleReply, ArrayReply, UnwrapReply, Command } from '../RESP/types';
|
||||
|
||||
export type MemoryStatsReply = TuplesToMapReply<[
|
||||
[BlobStringReply<'peak.allocated'>, NumberReply],
|
||||
|
@@ -1,5 +1,4 @@
|
||||
import { RedisArgument, SimpleStringReply, Command } from '../RESP/types';
|
||||
import { pushVariadicArguments } from './generic-transformers';
|
||||
|
||||
export default {
|
||||
FIRST_KEY_INDEX: undefined,
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { RedisArgument, SimpleStringReply, Command } from '../RESP/types';
|
||||
import { SimpleStringReply, Command } from '../RESP/types';
|
||||
|
||||
export default {
|
||||
FIRST_KEY_INDEX: undefined,
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { RedisArgument, DoubleReply, Command } from '../RESP/types';
|
||||
import { RedisArgument, Command } from '../RESP/types';
|
||||
import { transformDoubleArgument, transformDoubleReply } from './generic-transformers';
|
||||
|
||||
export default {
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import { RedisArgument, ArrayReply, BlobStringReply, Command } from '../RESP/types';
|
||||
import { ScanCommonOptions, pushScanArguments } from './SCAN';
|
||||
import { SortedSetMember, transformDoubleReply, transformSortedSetReply } from './generic-transformers';
|
||||
import { transformSortedSetReply } from './generic-transformers';
|
||||
|
||||
export interface HScanEntry {
|
||||
field: BlobStringReply;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { UnwrapReply, ArrayReply, BlobStringReply, BooleanReply, CommandArguments, DoubleReply, MapReply, NullReply, NumberReply, RedisArgument, TuplesReply, RespType } from '../RESP/types';
|
||||
import { UnwrapReply, ArrayReply, BlobStringReply, BooleanReply, CommandArguments, DoubleReply, NullReply, NumberReply, RedisArgument, TuplesReply } from '../RESP/types';
|
||||
|
||||
export function isNullReply(reply: unknown): reply is NullReply {
|
||||
return reply === null;
|
||||
|
@@ -9,7 +9,7 @@
|
||||
"!dist/tsconfig.tsbuildinfo"
|
||||
],
|
||||
"scripts": {
|
||||
"test": "nyc -r text-summary -r lcov mocha -r source-map-support/register -r ts-node/register './lib/**/*.spec.ts'"
|
||||
"test": "nyc -r text-summary -r lcov mocha -r tsx './lib/**/*.spec.ts'"
|
||||
},
|
||||
"dependencies": {
|
||||
"cluster-key-slot": "1.1.2",
|
||||
|
Reference in New Issue
Block a user