You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-04 15:02:09 +03:00
add node:
to node "core modules" imports
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import yargs from 'yargs';
|
||||
import { hideBin } from 'yargs/helpers';
|
||||
import { promises as fs } from 'fs';
|
||||
import { fork } from 'child_process';
|
||||
import { URL, fileURLToPath } from 'url';
|
||||
import { once } from 'events';
|
||||
import { extname } from 'path';
|
||||
import { promises as fs } from 'node:fs';
|
||||
import { fork } from 'node:child_process';
|
||||
import { URL, fileURLToPath } from 'node:url';
|
||||
import { once } from 'node:events';
|
||||
import { extname } from 'node:path';
|
||||
|
||||
async function getPathChoices() {
|
||||
const dirents = await fs.readdir(new URL('.', import.meta.url), {
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import { createClient } from 'redis-v3';
|
||||
import { once } from 'events';
|
||||
import { promisify } from 'util';
|
||||
import { once } from 'node:events';
|
||||
import { promisify } from 'node:util';
|
||||
|
||||
export default async (host) => {
|
||||
const client = createClient({ host }),
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import yargs from 'yargs';
|
||||
import { hideBin } from 'yargs/helpers';
|
||||
import { basename } from 'path';
|
||||
import { promises as fs } from 'fs';
|
||||
import { basename } from 'node:path';
|
||||
import { promises as fs } from 'node:fs';
|
||||
import * as hdr from 'hdr-histogram-js';
|
||||
hdr.initWebAssemblySync();
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import yargs from 'yargs';
|
||||
import { hideBin } from 'yargs/helpers';
|
||||
import { randomBytes } from 'crypto';
|
||||
import { randomBytes } from 'node:crypto';
|
||||
|
||||
const { size } = yargs(hideBin(process.argv))
|
||||
.option('size', {
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import { createClient } from 'redis-v3';
|
||||
import { once } from 'events';
|
||||
import { promisify } from 'util';
|
||||
import { once } from 'node:events';
|
||||
import { promisify } from 'node:util';
|
||||
|
||||
export default async (host, { randomString }) => {
|
||||
const client = createClient({ host }),
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../../test-utils';
|
||||
import ADD from './ADD';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../../test-utils';
|
||||
import CARD from './CARD';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../../test-utils';
|
||||
import EXISTS from './EXISTS';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// import { strict as assert } from 'assert';
|
||||
// import { strict as assert } from 'node:assert';
|
||||
// import testUtils, { GLOBAL } from '../../test-utils';
|
||||
// import { transformArguments } from './INFO';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../../test-utils';
|
||||
import INSERT from './INSERT';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../../test-utils';
|
||||
import LOADCHUNK from './LOADCHUNK';
|
||||
import { RESP_TYPES } from '@redis/client';
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../../test-utils';
|
||||
import MADD from './MADD';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../../test-utils';
|
||||
import MEXISTS from './MEXISTS';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../../test-utils';
|
||||
import RESERVE from './RESERVE';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../../test-utils';
|
||||
import SCANDUMP from './SCANDUMP';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../../test-utils';
|
||||
import INCRBY from './INCRBY';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../../test-utils';
|
||||
import INFO from './INFO';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../../test-utils';
|
||||
import INITBYDIM from './INITBYDIM';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../../test-utils';
|
||||
import INITBYPROB from './INITBYPROB';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../../test-utils';
|
||||
import MERGE from './MERGE';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../../test-utils';
|
||||
import QUERY from './QUERY';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../../test-utils';
|
||||
import ADD from './ADD';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../../test-utils';
|
||||
import ADDNX from './ADDNX';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../../test-utils';
|
||||
import COUNT from './COUNT';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../../test-utils';
|
||||
import DEL from './DEL';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../../test-utils';
|
||||
import EXISTS from './EXISTS';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// import { strict as assert } from 'assert';
|
||||
// import { strict as assert } from 'node:assert';
|
||||
// import testUtils, { GLOBAL } from '../../test-utils';
|
||||
// import { transformArguments } from './INFO';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../../test-utils';
|
||||
import INSERT from './INSERT';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../../test-utils';
|
||||
import INSERTNX from './INSERTNX';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../../test-utils';
|
||||
import LOADCHUNK from './LOADCHUNK';
|
||||
import { RESP_TYPES } from '@redis/client';
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../../test-utils';
|
||||
import RESERVE from './RESERVE';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../../test-utils';
|
||||
import SCANDUMP from './SCANDUMP';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../../test-utils';
|
||||
import ADD from './ADD';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../../test-utils';
|
||||
import BYRANK from './BYRANK';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../../test-utils';
|
||||
import BYREVRANK from './BYREVRANK';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../../test-utils';
|
||||
import CDF from './CDF';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../../test-utils';
|
||||
import CREATE from './CREATE';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// import { strict as assert } from 'assert';
|
||||
// import { strict as assert } from 'node:assert';
|
||||
// import testUtils, { GLOBAL } from '../../test-utils';
|
||||
// import { transformArguments } from './INFO';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../../test-utils';
|
||||
import MAX from './MAX';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../../test-utils';
|
||||
import MERGE from './MERGE';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../../test-utils';
|
||||
import MIN from './MIN';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../../test-utils';
|
||||
import QUANTILE from './QUANTILE';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../../test-utils';
|
||||
import RANK from './RANK';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../../test-utils';
|
||||
import RESET from './RESET';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../../test-utils';
|
||||
import REVRANK from './REVRANK';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../../test-utils';
|
||||
import TRIMMED_MEAN from './TRIMMED_MEAN';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../../test-utils';
|
||||
import ADD from './ADD';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../../test-utils';
|
||||
import COUNT from './COUNT';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../../test-utils';
|
||||
import INCRBY from './INCRBY';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../../test-utils';
|
||||
import INFO from './INFO';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../../test-utils';
|
||||
import LIST from './LIST';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../../test-utils';
|
||||
import LIST_WITHCOUNT from './LIST_WITHCOUNT';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../../test-utils';
|
||||
import QUERY from './QUERY';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../../test-utils';
|
||||
import RESERVE from './RESERVE';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// import { strict as assert } from 'assert';
|
||||
// import { strict as assert } from 'node:assert';
|
||||
// import { SinonSpy, spy } from 'sinon';
|
||||
// import { Decoder, RESP_TYPES } from './decoder';
|
||||
// import { ErrorReply } from '../errors';
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import { describe } from 'mocha';
|
||||
import encodeCommand from './encoder';
|
||||
|
||||
|
@@ -4,7 +4,7 @@ import { Decoder, PUSH_TYPE_MAPPING, RESP_TYPES } from '../RESP/decoder';
|
||||
import { CommandArguments, TypeMapping, ReplyUnion, RespVersions } from '../RESP/types';
|
||||
import { ChannelListeners, PubSub, PubSubCommand, PubSubListener, PubSubType, PubSubTypeListeners } from './pub-sub';
|
||||
import { AbortError, ErrorReply } from '../errors';
|
||||
import { EventEmitter } from 'stream';
|
||||
import { EventEmitter } from 'node:stream';
|
||||
|
||||
export interface CommandOptions<T = TypeMapping> {
|
||||
chainId?: symbol;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL, waitTillBeenCalled } from '../test-utils';
|
||||
import RedisClient, { RedisClientType } from '.';
|
||||
// import { RedisClientMultiCommandType } from './multi-command';
|
||||
@@ -6,9 +6,9 @@ import RedisClient, { RedisClientType } from '.';
|
||||
import { AbortError, ClientClosedError, ClientOfflineError, ConnectionTimeoutError, DisconnectsClientError, SocketClosedUnexpectedlyError, WatchError } from '../errors';
|
||||
import { defineScript } from '../lua-script';
|
||||
// import { spy } from 'sinon';
|
||||
import { once } from 'events';
|
||||
import { once } from 'node:events';
|
||||
// import { ClientKillFilters } from '../commands/CLIENT_KILL';
|
||||
// import { promisify } from 'util';
|
||||
// import { promisify } from 'node:util';
|
||||
import { MATH_FUNCTION, loadMathFunction } from '../commands/FUNCTION_LOAD.spec';
|
||||
import { RESP_TYPES } from '../RESP/decoder';
|
||||
import { SortedSetMember } from '../commands/generic-transformers';
|
||||
|
@@ -1,11 +1,11 @@
|
||||
import COMMANDS from '../commands';
|
||||
import RedisSocket, { RedisSocketOptions, RedisTlsSocketOptions } from './socket';
|
||||
import RedisCommandsQueue, { CommandOptions } from './commands-queue';
|
||||
import { EventEmitter } from 'events';
|
||||
import { EventEmitter } from 'node:events';
|
||||
import { attachConfig, functionArgumentsPrefix, getTransformReply, scriptArgumentsPrefix } from '../commander';
|
||||
import { ClientClosedError, ClientOfflineError, DisconnectsClientError, WatchError } from '../errors';
|
||||
import { URL } from 'url';
|
||||
import { TcpSocketConnectOpts } from 'net';
|
||||
import { URL } from 'node:url';
|
||||
import { TcpSocketConnectOpts } from 'node:net';
|
||||
import { PubSubType, PubSubListener, PubSubTypeListeners, ChannelListeners } from './pub-sub';
|
||||
import { Command, CommandSignature, TypeMapping, CommanderConfig, RedisFunction, RedisFunctions, RedisModules, RedisScript, RedisScripts, ReplyUnion, RespVersions, RedisArgument } from '../RESP/types';
|
||||
import RedisClientMultiCommand, { RedisClientMultiCommandType } from './multi-command';
|
||||
|
@@ -1,10 +1,10 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../test-utils';
|
||||
import { promisify } from 'util';
|
||||
import { promisify } from 'node:util';
|
||||
import { RedisLegacyClientType } from './legacy-mode';
|
||||
import { ErrorReply } from '../errors';
|
||||
import { RedisClientType } from '.';
|
||||
import { once } from 'events';
|
||||
import { once } from 'node:events';
|
||||
|
||||
function testWithLegacyClient(title: string, fn: (legacy: RedisLegacyClientType, client: RedisClientType) => Promise<unknown>) {
|
||||
testUtils.testWithClient(title, client => fn(client.legacy(), client), GLOBAL.SERVERS.OPEN);
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import COMMANDS from '../commands';
|
||||
import { Command, RedisArgument, RedisFunction, RedisFunctions, RedisModules, RedisScript, RedisScripts, RespVersions, TypeMapping } from '../RESP/types';
|
||||
import RedisClient, { RedisClientType, RedisClientOptions, RedisClientExtensions } from '.';
|
||||
import { EventEmitter } from 'events';
|
||||
import { EventEmitter } from 'node:events';
|
||||
import { DoublyLinkedNode, DoublyLinkedList, SinglyLinkedList } from './linked-list';
|
||||
import { TimeoutError } from '../errors';
|
||||
import { attachConfig, functionArgumentsPrefix, getTransformReply, scriptArgumentsPrefix } from '../commander';
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import { PubSub, PubSubType } from './pub-sub';
|
||||
|
||||
describe('PubSub', () => {
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import { spy } from 'sinon';
|
||||
import { once } from 'events';
|
||||
import { once } from 'node:events';
|
||||
import RedisSocket, { RedisSocketOptions } from './socket';
|
||||
|
||||
describe('Socket', () => {
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import { EventEmitter } from 'events';
|
||||
import * as net from 'net';
|
||||
import * as tls from 'tls';
|
||||
import { EventEmitter } from 'node:events';
|
||||
import * as net from 'node:net';
|
||||
import * as tls from 'node:tls';
|
||||
import { ConnectionTimeoutError, ClientClosedError, SocketClosedUnexpectedlyError, ReconnectStrategyError } from '../errors';
|
||||
import { setTimeout } from 'timers/promises';
|
||||
import { RedisArgument } from '../RESP/types';
|
||||
|
@@ -1,8 +1,8 @@
|
||||
import { RedisClusterClientOptions, RedisClusterOptions } from '.';
|
||||
import { RootNodesUnavailableError } from '../errors';
|
||||
import RedisClient, { RedisClientOptions, RedisClientType } from '../client';
|
||||
import { types } from 'util';
|
||||
import { EventEmitter } from 'stream';
|
||||
import { types } from 'node:util';
|
||||
import { EventEmitter } from 'node:stream';
|
||||
import { ChannelListeners, PubSubType, PubSubTypeListeners } from '../client/pub-sub';
|
||||
import { RedisArgument, RedisFunctions, RedisModules, RedisScripts, RespVersions } from '../RESP/types';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// import { strict as assert } from 'assert';
|
||||
// import { strict as assert } from 'node:assert';
|
||||
// import testUtils, { GLOBAL, waitTillBeenCalled } from '../test-utils';
|
||||
// import RedisCluster from '.';
|
||||
// import { ClusterSlotStates } from '../commands/CLUSTER_SETSLOT';
|
||||
|
@@ -2,7 +2,7 @@ import { RedisClientOptions, RedisClientType } from '../client';
|
||||
import { CommandOptions } from '../client/commands-queue';
|
||||
import { Command, CommandArguments, CommanderConfig, CommandPolicies, CommandWithPoliciesSignature, TypeMapping, RedisArgument, RedisFunction, RedisFunctions, RedisModules, RedisScript, RedisScripts, ReplyUnion, RespVersions } from '../RESP/types';
|
||||
import COMMANDS from '../commands';
|
||||
import { EventEmitter } from 'events';
|
||||
import { EventEmitter } from 'node:events';
|
||||
import { attachConfig, functionArgumentsPrefix, getTransformReply, scriptArgumentsPrefix } from '../commander';
|
||||
import RedisClusterSlots, { NodeAddressMap, ShardNode } from './cluster-slots';
|
||||
import RedisClusterMultiCommand, { RedisClusterMultiCommandType } from './multi-command';
|
||||
@@ -16,14 +16,14 @@ interface ClusterCommander<
|
||||
S extends RedisScripts,
|
||||
RESP extends RespVersions,
|
||||
TYPE_MAPPING extends TypeMapping,
|
||||
POLICIES extends CommandPolicies
|
||||
// POLICIES extends CommandPolicies
|
||||
> extends CommanderConfig<M, F, S, RESP>{
|
||||
commandOptions?: ClusterCommandOptions<TYPE_MAPPING, POLICIES>;
|
||||
commandOptions?: ClusterCommandOptions<TYPE_MAPPING/*, POLICIES*/>;
|
||||
}
|
||||
|
||||
export type RedisClusterClientOptions = Omit<
|
||||
RedisClientOptions,
|
||||
keyof ClusterCommander<RedisModules, RedisFunctions, RedisScripts, RespVersions, TypeMapping, CommandPolicies>
|
||||
keyof ClusterCommander<RedisModules, RedisFunctions, RedisScripts, RespVersions, TypeMapping/*, CommandPolicies*/>
|
||||
>;
|
||||
|
||||
export interface RedisClusterOptions<
|
||||
@@ -32,8 +32,8 @@ export interface RedisClusterOptions<
|
||||
S extends RedisScripts = RedisScripts,
|
||||
RESP extends RespVersions = RespVersions,
|
||||
TYPE_MAPPING extends TypeMapping = TypeMapping,
|
||||
POLICIES extends CommandPolicies = CommandPolicies
|
||||
> extends ClusterCommander<M, F, S, RESP, TYPE_MAPPING, POLICIES> {
|
||||
// POLICIES extends CommandPolicies = CommandPolicies
|
||||
> extends ClusterCommander<M, F, S, RESP, TYPE_MAPPING/*, POLICIES*/> {
|
||||
/**
|
||||
* 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.
|
||||
@@ -68,9 +68,9 @@ export interface RedisClusterOptions<
|
||||
type WithCommands<
|
||||
RESP extends RespVersions,
|
||||
TYPE_MAPPING extends TypeMapping,
|
||||
POLICIES extends CommandPolicies
|
||||
// POLICIES extends CommandPolicies
|
||||
> = {
|
||||
[P in keyof typeof COMMANDS]: CommandWithPoliciesSignature<(typeof COMMANDS)[P], RESP, TYPE_MAPPING, POLICIES>;
|
||||
[P in keyof typeof COMMANDS]: CommandWithPoliciesSignature<(typeof COMMANDS)[P], RESP, TYPE_MAPPING, POLICIES>;
|
||||
};
|
||||
|
||||
export type RedisClusterType<
|
||||
@@ -79,8 +79,8 @@ export type RedisClusterType<
|
||||
S extends RedisScripts = {},
|
||||
RESP extends RespVersions = 2,
|
||||
TYPE_MAPPING extends TypeMapping = {},
|
||||
POLICIES extends CommandPolicies = {}
|
||||
> = RedisCluster<M, F, S, RESP, TYPE_MAPPING, POLICIES> & WithCommands<RESP, TYPE_MAPPING, POLICIES>;
|
||||
// POLICIES extends CommandPolicies = {}
|
||||
> = RedisCluster<M, F, S, RESP, TYPE_MAPPING, POLICIES> & WithCommands<RESP, TYPE_MAPPING/*, POLICIES*/>;
|
||||
// & WithModules<M> & WithFunctions<F> & WithScripts<S>
|
||||
|
||||
export interface ClusterCommandOptions<
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../test-utils';
|
||||
import ACL_CAT from './ACL_CAT';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../test-utils';
|
||||
import ACL_DELUSER from './ACL_DELUSER';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../test-utils';
|
||||
import ACL_DRYRUN from './ACL_DRYRUN';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../test-utils';
|
||||
import ACL_GENPASS from './ACL_GENPASS';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../test-utils';
|
||||
import ACL_GETUSER from './ACL_GETUSER';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../test-utils';
|
||||
import ACL_LIST from './ACL_LIST';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils from '../test-utils';
|
||||
import ACL_LOAD from './ACL_LOAD';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../test-utils';
|
||||
import ACL_LOG from './ACL_LOG';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../test-utils';
|
||||
import ACL_LOG_RESET from './ACL_LOG_RESET';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils from '../test-utils';
|
||||
import ACL_SAVE from './ACL_SAVE';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils from '../test-utils';
|
||||
import ACL_SETUSER from './ACL_SETUSER';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils from '../test-utils';
|
||||
import ACL_USERS from './ACL_USERS';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils from '../test-utils';
|
||||
import ACL_WHOAMI from './ACL_WHOAMI';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../test-utils';
|
||||
import APPEND from './APPEND';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import ASKING from './ASKING';
|
||||
|
||||
describe('ASKING', () => {
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import AUTH from './AUTH';
|
||||
|
||||
describe('AUTH', () => {
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../test-utils';
|
||||
import BGREWRITEAOF from './BGREWRITEAOF';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../test-utils';
|
||||
import BGSAVE from './BGSAVE';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../test-utils';
|
||||
import BITCOUNT from './BITCOUNT';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../test-utils';
|
||||
import BITFIELD from './BITFIELD';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../test-utils';
|
||||
import BITFIELD_RO from './BITFIELD_RO';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../test-utils';
|
||||
import BITOP from './BITOP';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../test-utils';
|
||||
import BITPOS from './BITPOS';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL, BLOCKING_MIN_VALUE } from '../test-utils';
|
||||
import BLMOVE from './BLMOVE';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL, BLOCKING_MIN_VALUE } from '../test-utils';
|
||||
import BLMPOP from './BLMPOP';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL, BLOCKING_MIN_VALUE } from '../test-utils';
|
||||
import BLPOP from './BLPOP';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL, BLOCKING_MIN_VALUE } from '../test-utils';
|
||||
import BRPOP from './BRPOP';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL, BLOCKING_MIN_VALUE } from '../test-utils';
|
||||
import BRPOPLPUSH from './BRPOPLPUSH';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL, BLOCKING_MIN_VALUE } from '../test-utils';
|
||||
import BZMPOP from './BZMPOP';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL, BLOCKING_MIN_VALUE } from '../test-utils';
|
||||
import BZPOPMAX from './BZPOPMAX';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL, BLOCKING_MIN_VALUE } from '../test-utils';
|
||||
import BZPOPMIN from './BZPOPMIN';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import CLIENT_CACHING from './CLIENT_CACHING';
|
||||
|
||||
describe('CLIENT CACHING', () => {
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../test-utils';
|
||||
import CLIENT_GETNAME from './CLIENT_GETNAME';
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user