You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-17 19:41:06 +03:00
add tests coverage report
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -3,6 +3,6 @@
|
|||||||
node_modules
|
node_modules
|
||||||
dist
|
dist
|
||||||
.nyc_output
|
.nyc_output
|
||||||
.nycrc.json
|
coverage
|
||||||
benchmark
|
benchmark
|
||||||
dump.rdb
|
dump.rdb
|
4
.nycrc.json
Normal file
4
.nycrc.json
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"extends": "@istanbuljs/nyc-config-typescript",
|
||||||
|
"exclude": ["./**/*.spec.ts", "./lib/test-utils.ts"]
|
||||||
|
}
|
@@ -1,6 +1,6 @@
|
|||||||
import { strict as assert } from 'assert';
|
import { strict as assert } from 'assert';
|
||||||
import { TestRedisServers, TEST_REDIS_SERVERS, itWithClient } from './test-utils.js';
|
import { TestRedisServers, TEST_REDIS_SERVERS, itWithClient } from './test-utils';
|
||||||
import RedisClient from './client.js';
|
import RedisClient from './client';
|
||||||
|
|
||||||
describe('Client', () => {
|
describe('Client', () => {
|
||||||
describe('authentication', () => {
|
describe('authentication', () => {
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
import RedisSocket, { RedisSocketOptions } from './socket.js';
|
import RedisSocket, { RedisSocketOptions } from './socket';
|
||||||
import RedisCommandsQueue, { AddCommandOptions } from './commands-queue.js';
|
import RedisCommandsQueue, { AddCommandOptions } from './commands-queue';
|
||||||
import COMMANDS from './commands/client.js';
|
import COMMANDS from './commands/client';
|
||||||
import { RedisCommand, RedisModules, RedisModule, RedisReply } from './commands/index.js';
|
import { RedisCommand, RedisModules, RedisModule, RedisReply } from './commands';
|
||||||
import RedisMultiCommand, { MultiQueuedCommand, RedisMultiCommandType } from './multi-command.js';
|
import RedisMultiCommand, { MultiQueuedCommand, RedisMultiCommandType } from './multi-command';
|
||||||
import EventEmitter from 'events';
|
import EventEmitter from 'events';
|
||||||
|
|
||||||
export interface RedisClientOptions<M = RedisModules> {
|
export interface RedisClientOptions<M = RedisModules> {
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
import calculateSlot from 'cluster-key-slot';
|
import calculateSlot from 'cluster-key-slot';
|
||||||
import RedisClient from './client.js';
|
import RedisClient from './client';
|
||||||
import { RedisSocketOptions } from './socket.js';
|
import { RedisSocketOptions } from './socket';
|
||||||
import { RedisClusterNode } from './commands/CLUSTER_NODES.js';
|
import { RedisClusterNode } from './commands/CLUSTER_NODES';
|
||||||
import { RedisClusterOptions } from './cluster.js';
|
import { RedisClusterOptions } from './cluster';
|
||||||
|
|
||||||
export default class RedisClusterSlots {
|
export default class RedisClusterSlots {
|
||||||
readonly #options: RedisClusterOptions;
|
readonly #options: RedisClusterOptions;
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import RedisCluster from './cluster.js';
|
import RedisCluster from './cluster';
|
||||||
|
|
||||||
describe.skip('Cluster', () => {
|
describe.skip('Cluster', () => {
|
||||||
it('sendCommand', async () => {
|
it('sendCommand', async () => {
|
||||||
|
@@ -1,9 +1,8 @@
|
|||||||
import calculateSlot from 'cluster-key-slot';
|
import COMMANDS from './commands/cluster';
|
||||||
import COMMANDS from './commands/cluster.js';
|
import { RedisCommand, RedisModule, RedisModules } from './commands';
|
||||||
import { RedisCommand, RedisModule, RedisModules } from './commands/index.js';
|
import { RedisCommandSignature } from './client';
|
||||||
import { RedisCommandSignature } from './client.js';
|
import { RedisSocketOptions } from './socket';
|
||||||
import { RedisSocketOptions } from './socket.js';
|
import RedisClusterSlots from './cluster-slots';
|
||||||
import RedisClusterSlots from './cluster-slots.js';
|
|
||||||
|
|
||||||
export interface RedisClusterOptions<M = RedisModules> {
|
export interface RedisClusterOptions<M = RedisModules> {
|
||||||
rootNodes: Array<RedisSocketOptions>;
|
rootNodes: Array<RedisSocketOptions>;
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
import { strict as assert } from 'assert';
|
import { strict as assert } from 'assert';
|
||||||
import { transformArguments } from './APPEND.js';
|
import { transformArguments } from './APPEND';
|
||||||
|
|
||||||
describe('AUTH', () => {
|
describe('AUTH', () => {
|
||||||
it('transformArguments', () => {
|
it('transformArguments', () => {
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import { transformReplyString } from './generic-transformers.js';
|
import { transformReplyString } from './generic-transformers';
|
||||||
|
|
||||||
export const FIRST_KEY_INDEX = 1;
|
export const FIRST_KEY_INDEX = 1;
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
import { strict as assert } from 'assert';
|
import { strict as assert } from 'assert';
|
||||||
import { transformArguments } from './AUTH.js';
|
import { transformArguments } from './AUTH';
|
||||||
|
|
||||||
describe('AUTH', () => {
|
describe('AUTH', () => {
|
||||||
describe('transformArguments', () => {
|
describe('transformArguments', () => {
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import { transformReplyString } from './generic-transformers.js';
|
import { transformReplyString } from './generic-transformers';
|
||||||
|
|
||||||
export interface AuthOptions {
|
export interface AuthOptions {
|
||||||
username?: string;
|
username?: string;
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
import { strict as assert } from 'assert';
|
import { strict as assert } from 'assert';
|
||||||
import { RedisClusterNodeLinkStates, transformArguments, transformReply } from './CLUSTER_NODES.js';
|
import { RedisClusterNodeLinkStates, transformArguments, transformReply } from './CLUSTER_NODES';
|
||||||
|
|
||||||
describe('CLUSTER NODES', () => {
|
describe('CLUSTER NODES', () => {
|
||||||
it('transformArguments', () => {
|
it('transformArguments', () => {
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
import { strict as assert } from 'assert';
|
import { strict as assert } from 'assert';
|
||||||
import { TestRedisServers, itWithClient } from '../test-utils.js';
|
import { TestRedisServers, itWithClient } from '../test-utils';
|
||||||
import { transformArguments, transformReply } from './COPY.js';
|
import { transformArguments, transformReply } from './COPY';
|
||||||
|
|
||||||
describe('COPY', () => {
|
describe('COPY', () => {
|
||||||
describe('transformArguments', () => {
|
describe('transformArguments', () => {
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import { transformReplyBoolean } from './generic-transformers.js';
|
import { transformReplyBoolean } from './generic-transformers';
|
||||||
|
|
||||||
interface CopyCommandOptions {
|
interface CopyCommandOptions {
|
||||||
destinationDb?: number;
|
destinationDb?: number;
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
import { strict as assert } from 'assert';
|
import { strict as assert } from 'assert';
|
||||||
import { TestRedisServers, itWithClient } from '../test-utils.js';
|
import { TestRedisServers, itWithClient } from '../test-utils';
|
||||||
import { transformArguments } from './DECR.js';
|
import { transformArguments } from './DECR';
|
||||||
|
|
||||||
describe('DECR', () => {
|
describe('DECR', () => {
|
||||||
it('transformArguments', () => {
|
it('transformArguments', () => {
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import { transformReplyNumber } from './generic-transformers.js';
|
import { transformReplyNumber } from './generic-transformers';
|
||||||
|
|
||||||
export const FIRST_KEY_INDEX = 1;
|
export const FIRST_KEY_INDEX = 1;
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
import { strict as assert } from 'assert';
|
import { strict as assert } from 'assert';
|
||||||
import { TestRedisServers, itWithClient } from '../test-utils.js';
|
import { TestRedisServers, itWithClient } from '../test-utils';
|
||||||
import { transformArguments } from './DECRBY.js';
|
import { transformArguments } from './DECRBY';
|
||||||
|
|
||||||
describe('DECRBY', () => {
|
describe('DECRBY', () => {
|
||||||
it('transformArguments', () => {
|
it('transformArguments', () => {
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import { transformReplyNumber } from './generic-transformers.js';
|
import { transformReplyNumber } from './generic-transformers';
|
||||||
|
|
||||||
export const FIRST_KEY_INDEX = 1;
|
export const FIRST_KEY_INDEX = 1;
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
import { strict as assert } from 'assert';
|
import { strict as assert } from 'assert';
|
||||||
import { TestRedisServers, itWithClient } from '../test-utils.js';
|
import { TestRedisServers, itWithClient } from '../test-utils';
|
||||||
import { transformArguments } from './DEL.js';
|
import { transformArguments } from './DEL';
|
||||||
|
|
||||||
describe('DEL', () => {
|
describe('DEL', () => {
|
||||||
describe('transformArguments', () => {
|
describe('transformArguments', () => {
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import { transformReplyNumber } from './generic-transformers.js';
|
import { transformReplyNumber } from './generic-transformers';
|
||||||
|
|
||||||
export function transformArguments(...keys: Array<string>): Array<string> {
|
export function transformArguments(...keys: Array<string>): Array<string> {
|
||||||
return ['DEL', ...keys];
|
return ['DEL', ...keys];
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
import { strict as assert } from 'assert';
|
import { strict as assert } from 'assert';
|
||||||
import { TestRedisServers, itWithClient } from '../test-utils.js';
|
import { TestRedisServers, itWithClient } from '../test-utils';
|
||||||
|
|
||||||
describe('DUMP', () => {
|
describe('DUMP', () => {
|
||||||
itWithClient(TestRedisServers.OPEN, 'client.dump', async client => {
|
itWithClient(TestRedisServers.OPEN, 'client.dump', async client => {
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import { transformReplyString } from './generic-transformers.js';
|
import { transformReplyString } from './generic-transformers';
|
||||||
|
|
||||||
export function transformArguments(key: string): Array<string> {
|
export function transformArguments(key: string): Array<string> {
|
||||||
return ['DUMP', key];
|
return ['DUMP', key];
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import { transformReplyBoolean } from './generic-transformers.js';
|
import { transformReplyBoolean } from './generic-transformers';
|
||||||
|
|
||||||
export function transformArguments(...keys: Array<string>): Array<string> {
|
export function transformArguments(...keys: Array<string>): Array<string> {
|
||||||
return ['EXISTS', ...keys];
|
return ['EXISTS', ...keys];
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import { transformReplyBoolean } from './generic-transformers.js';
|
import { transformReplyBoolean } from './generic-transformers';
|
||||||
|
|
||||||
export function transformArguments(key: string, seconds: number): Array<string> {
|
export function transformArguments(key: string, seconds: number): Array<string> {
|
||||||
return ['EXPIRE', key, seconds.toString()];
|
return ['EXPIRE', key, seconds.toString()];
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import { transformReplyBoolean } from './generic-transformers.js';
|
import { transformReplyBoolean } from './generic-transformers';
|
||||||
|
|
||||||
export function transformArguments(key: string, timestamp: Date | number): Array<string> {
|
export function transformArguments(key: string, timestamp: Date | number): Array<string> {
|
||||||
return [
|
return [
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import { transformReplyString } from './generic-transformers.js';
|
import { transformReplyString } from './generic-transformers';
|
||||||
|
|
||||||
enum RedisFlushModes {
|
enum RedisFlushModes {
|
||||||
ASYNC = 'ASYNC',
|
ASYNC = 'ASYNC',
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import { transformReplyString } from './generic-transformers.js';
|
import { transformReplyString } from './generic-transformers';
|
||||||
|
|
||||||
export const FIRST_KEY_INDEX = 1;
|
export const FIRST_KEY_INDEX = 1;
|
||||||
|
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import { transformReplyNumber } from './generic-transformers.js';
|
import { transformReplyNumber } from './generic-transformers';
|
||||||
|
|
||||||
export const FIRST_KEY_INDEX = 1;
|
export const FIRST_KEY_INDEX = 1;
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
import { strict as assert } from 'assert';
|
import { strict as assert } from 'assert';
|
||||||
import { transformArguments } from './HELLO.js';
|
import { transformArguments } from './HELLO';
|
||||||
|
|
||||||
describe('HELLO', () => {
|
describe('HELLO', () => {
|
||||||
describe('transformArguments', () => {
|
describe('transformArguments', () => {
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import { AuthOptions, transformArguments as transformAuthArguments } from './AUTH.js';
|
import { AuthOptions, transformArguments as transformAuthArguments } from './AUTH';
|
||||||
|
|
||||||
export function transformArguments(protover?: number, auth?: AuthOptions): Array<string> {
|
export function transformArguments(protover?: number, auth?: AuthOptions): Array<string> {
|
||||||
const args = ['HELLO'];
|
const args = ['HELLO'];
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import { transformReplyBoolean } from './generic-transformers.js';
|
import { transformReplyBoolean } from './generic-transformers';
|
||||||
|
|
||||||
export const FIRST_KEY_INDEX = 1;
|
export const FIRST_KEY_INDEX = 1;
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
import { strict as assert } from 'assert';
|
import { strict as assert } from 'assert';
|
||||||
import { transformReply } from './HGETALL.js';
|
import { transformReply } from './HGETALL';
|
||||||
|
|
||||||
describe('HGETALL', () => {
|
describe('HGETALL', () => {
|
||||||
describe('transformReply', () => {
|
describe('transformReply', () => {
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import { transformReplyNumber } from './generic-transformers.js';
|
import { transformReplyNumber } from './generic-transformers';
|
||||||
|
|
||||||
export const FIRST_KEY_INDEX = 1;
|
export const FIRST_KEY_INDEX = 1;
|
||||||
|
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import { transformReplyNumber } from './generic-transformers.js';
|
import { transformReplyNumber } from './generic-transformers';
|
||||||
|
|
||||||
export const FIRST_KEY_INDEX = 1;
|
export const FIRST_KEY_INDEX = 1;
|
||||||
|
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import { transformReplyNumber } from './generic-transformers.js';
|
import { transformReplyNumber } from './generic-transformers';
|
||||||
|
|
||||||
export const FIRST_KEY_INDEX = 1;
|
export const FIRST_KEY_INDEX = 1;
|
||||||
|
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import { transformReplyString } from './generic-transformers.js';
|
import { transformReplyString } from './generic-transformers';
|
||||||
|
|
||||||
type HSETObject = Record<string | number, string | number>;
|
type HSETObject = Record<string | number, string | number>;
|
||||||
|
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import { transformReplyNumber } from './generic-transformers.js';
|
import { transformReplyNumber } from './generic-transformers';
|
||||||
|
|
||||||
export const FIRST_KEY_INDEX = 1;
|
export const FIRST_KEY_INDEX = 1;
|
||||||
|
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import { transformReplyNumber } from './generic-transformers.js';
|
import { transformReplyNumber } from './generic-transformers';
|
||||||
|
|
||||||
export const FIRST_KEY_INDEX = 1;
|
export const FIRST_KEY_INDEX = 1;
|
||||||
|
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import { transformReplyNumber } from './generic-transformers.js';
|
import { transformReplyNumber } from './generic-transformers';
|
||||||
|
|
||||||
export const FIRST_KEY_INDEX = 1;
|
export const FIRST_KEY_INDEX = 1;
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
import { strict as assert } from 'assert';
|
import { strict as assert } from 'assert';
|
||||||
import { TestRedisServers, itWithClient } from '../test-utils.js';
|
import { TestRedisServers, itWithClient } from '../test-utils';
|
||||||
|
|
||||||
describe('KEYS', () => {
|
describe('KEYS', () => {
|
||||||
itWithClient(TestRedisServers.OPEN, 'client.keys', async client => {
|
itWithClient(TestRedisServers.OPEN, 'client.keys', async client => {
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
import { strict as assert } from 'assert';
|
import { strict as assert } from 'assert';
|
||||||
import { TestRedisServers, itWithClient } from '../test-utils.js';
|
import { TestRedisServers, itWithClient } from '../test-utils';
|
||||||
|
|
||||||
describe('PING', () => {
|
describe('PING', () => {
|
||||||
itWithClient(TestRedisServers.OPEN, 'client.ping', async client => {
|
itWithClient(TestRedisServers.OPEN, 'client.ping', async client => {
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import { transformReplyString } from './generic-transformers.js';
|
import { transformReplyString } from './generic-transformers';
|
||||||
|
|
||||||
export function transformArguments(): Array<string> {
|
export function transformArguments(): Array<string> {
|
||||||
return ['PING'];
|
return ['PING'];
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
import { strict as assert } from 'assert';
|
import { strict as assert } from 'assert';
|
||||||
import { TestRedisServers, itWithClient } from '../test-utils.js';
|
import { TestRedisServers, itWithClient } from '../test-utils';
|
||||||
import { transformArguments } from './SET.js';
|
import { transformArguments } from './SET';
|
||||||
|
|
||||||
describe('SET', () => {
|
describe('SET', () => {
|
||||||
describe('transformArguments', () => {
|
describe('transformArguments', () => {
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import COMMON_COMMANDS from './index.js';
|
import COMMON_COMMANDS from './index';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
...COMMON_COMMANDS
|
...COMMON_COMMANDS
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import COMMON_COMMANDS from './index.js';
|
import COMMON_COMMANDS from './index';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
...COMMON_COMMANDS
|
...COMMON_COMMANDS
|
||||||
|
@@ -1,32 +1,32 @@
|
|||||||
import * as APPEND from './APPEND.js';
|
import * as APPEND from './APPEND';
|
||||||
import * as AUTH from './AUTH.js';
|
import * as AUTH from './AUTH';
|
||||||
import * as CLUSTER_NODES from './CLUSTER_NODES.js';
|
import * as CLUSTER_NODES from './CLUSTER_NODES';
|
||||||
import * as COPY from './COPY.js';
|
import * as COPY from './COPY';
|
||||||
import * as DECR from './DECR.js';
|
import * as DECR from './DECR';
|
||||||
import * as DECRBY from './DECRBY.js';
|
import * as DECRBY from './DECRBY';
|
||||||
import * as DEL from './DEL.js';
|
import * as DEL from './DEL';
|
||||||
import * as DUMP from './DUMP.js';
|
import * as DUMP from './DUMP';
|
||||||
import * as EXISTS from './EXISTS.js';
|
import * as EXISTS from './EXISTS';
|
||||||
import * as EXPIRE from './EXPIRE.js';
|
import * as EXPIRE from './EXPIRE';
|
||||||
import * as EXPIREAT from './EXPIREAT.js';
|
import * as EXPIREAT from './EXPIREAT';
|
||||||
import * as FLUSHALL from './FLUSHALL.js';
|
import * as FLUSHALL from './FLUSHALL';
|
||||||
import * as GET from './GET.js';
|
import * as GET from './GET';
|
||||||
import * as HDEL from './HDEL.js';
|
import * as HDEL from './HDEL';
|
||||||
import * as HEXISTS from './HEXISTS.js';
|
import * as HEXISTS from './HEXISTS';
|
||||||
import * as HGET from './HGET.js';
|
import * as HGET from './HGET';
|
||||||
import * as HGETALL from './HGETALL.js';
|
import * as HGETALL from './HGETALL';
|
||||||
import * as HINCRBY from './HINCRBY.js';
|
import * as HINCRBY from './HINCRBY';
|
||||||
import * as HINCRBYFLOAT from './HINCRBYFLOAT.js';
|
import * as HINCRBYFLOAT from './HINCRBYFLOAT';
|
||||||
import * as HKEYS from './HKEYS.js';
|
import * as HKEYS from './HKEYS';
|
||||||
import * as HLEN from './HLEN.js';
|
import * as HLEN from './HLEN';
|
||||||
import * as HSET from './HSET.js';
|
import * as HSET from './HSET';
|
||||||
import * as HVALS from './HVALS.js';
|
import * as HVALS from './HVALS';
|
||||||
import * as INCR from './INCR.js';
|
import * as INCR from './INCR';
|
||||||
import * as INCRBY from './INCRBY.js';
|
import * as INCRBY from './INCRBY';
|
||||||
import * as INCRBYFLOAT from './INCRBYFLOAT.js';
|
import * as INCRBYFLOAT from './INCRBYFLOAT';
|
||||||
import * as KEYS from './KEYS.js';
|
import * as KEYS from './KEYS';
|
||||||
import * as PING from './PING.js';
|
import * as PING from './PING';
|
||||||
import * as SET from './SET.js';
|
import * as SET from './SET';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
APPEND,
|
APPEND,
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
import { strict as assert } from 'assert';
|
import { strict as assert } from 'assert';
|
||||||
import RedisMultiCommand, { MultiQueuedCommand } from './multi-command.js';
|
import RedisMultiCommand, { MultiQueuedCommand } from './multi-command';
|
||||||
import RedisClient from './client.js';
|
import RedisClient from './client';
|
||||||
|
|
||||||
describe('Multi Command', () => {
|
describe('Multi Command', () => {
|
||||||
it('create', async () => {
|
it('create', async () => {
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
import COMMANDS from './commands/client.js';
|
import COMMANDS from './commands/client';
|
||||||
import { RedisCommand, RedisModule, RedisModules, RedisReply } from './commands/index.js';
|
import { RedisCommand, RedisModule, RedisModules, RedisReply } from './commands';
|
||||||
import RedisCommandsQueue from './commands-queue.js';
|
import RedisCommandsQueue from './commands-queue';
|
||||||
|
|
||||||
type RedisMultiCommandSignature<C extends RedisCommand, M extends RedisModules> = (...args: Parameters<C['transformArguments']>) => RedisMultiCommandType<M>;
|
type RedisMultiCommandSignature<C extends RedisCommand, M extends RedisModules> = (...args: Parameters<C['transformArguments']>) => RedisMultiCommandType<M>;
|
||||||
|
|
||||||
|
@@ -163,6 +163,7 @@ export default class RedisSocket extends EventEmitter {
|
|||||||
await this.#retryConnection(0);
|
await this.#retryConnection(0);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
this.emit('error', err);
|
this.emit('error', err);
|
||||||
|
this.#socket = undefined;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,9 +1,9 @@
|
|||||||
import RedisClient, { RedisClientOptions, RedisClientType } from './client.js';
|
import RedisClient, { RedisClientType } from './client';
|
||||||
import { RedisModules } from './commands/index.js';
|
import { RedisModules } from './commands';
|
||||||
import { spawn } from 'child_process';
|
import { spawn } from 'child_process';
|
||||||
import { once } from 'events';
|
import { once } from 'events';
|
||||||
import tcpPortUsed from 'tcp-port-used';
|
import tcpPortUsed from 'tcp-port-used';
|
||||||
import { RedisSocketOptions } from './socket.js';
|
import { RedisSocketOptions } from './socket';
|
||||||
|
|
||||||
export enum TestRedisServers {
|
export enum TestRedisServers {
|
||||||
OPEN,
|
OPEN,
|
||||||
|
185
package-lock.json
generated
185
package-lock.json
generated
@@ -14,6 +14,7 @@
|
|||||||
"yallist": "4.0.0"
|
"yallist": "4.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@istanbuljs/nyc-config-typescript": "^1.0.1",
|
||||||
"@types/mocha": "^8.2.2",
|
"@types/mocha": "^8.2.2",
|
||||||
"@types/node": "^15.0.2",
|
"@types/node": "^15.0.2",
|
||||||
"@types/tcp-port-used": "^1.0.0",
|
"@types/tcp-port-used": "^1.0.0",
|
||||||
@@ -21,6 +22,7 @@
|
|||||||
"mocha": "^8.4.0",
|
"mocha": "^8.4.0",
|
||||||
"nyc": "^15.1.0",
|
"nyc": "^15.1.0",
|
||||||
"tcp-port-used": "^1.0.2",
|
"tcp-port-used": "^1.0.2",
|
||||||
|
"ts-node": "^9.1.1",
|
||||||
"typescript": "^4.3.0-beta"
|
"typescript": "^4.3.0-beta"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
@@ -439,6 +441,23 @@
|
|||||||
"node": ">=8"
|
"node": ">=8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@istanbuljs/nyc-config-typescript": {
|
||||||
|
"version": "1.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@istanbuljs/nyc-config-typescript/-/nyc-config-typescript-1.0.1.tgz",
|
||||||
|
"integrity": "sha512-/gz6LgVpky205LuoOfwEZmnUtaSmdk0QIMcNFj9OvxhiMhPpKftMgZmGN7jNj7jR+lr8IB1Yks3QSSSNSxfoaQ==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@istanbuljs/schema": "^0.1.2"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=8"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"nyc": ">=15",
|
||||||
|
"source-map-support": "*",
|
||||||
|
"ts-node": "*"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@istanbuljs/schema": {
|
"node_modules/@istanbuljs/schema": {
|
||||||
"version": "0.1.3",
|
"version": "0.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz",
|
||||||
@@ -555,6 +574,12 @@
|
|||||||
"integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=",
|
"integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"node_modules/arg": {
|
||||||
|
"version": "4.1.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz",
|
||||||
|
"integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"node_modules/argparse": {
|
"node_modules/argparse": {
|
||||||
"version": "2.0.1",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
|
||||||
@@ -627,6 +652,12 @@
|
|||||||
"url": "https://opencollective.com/browserslist"
|
"url": "https://opencollective.com/browserslist"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/buffer-from": {
|
||||||
|
"version": "1.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz",
|
||||||
|
"integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"node_modules/caching-transform": {
|
"node_modules/caching-transform": {
|
||||||
"version": "4.0.0",
|
"version": "4.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-4.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-4.0.0.tgz",
|
||||||
@@ -827,6 +858,12 @@
|
|||||||
"safe-buffer": "~5.1.1"
|
"safe-buffer": "~5.1.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/create-require": {
|
||||||
|
"version": "1.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz",
|
||||||
|
"integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"node_modules/cross-spawn": {
|
"node_modules/cross-spawn": {
|
||||||
"version": "7.0.3",
|
"version": "7.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
|
||||||
@@ -1544,6 +1581,12 @@
|
|||||||
"url": "https://github.com/sponsors/sindresorhus"
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/make-error": {
|
||||||
|
"version": "1.3.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz",
|
||||||
|
"integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"node_modules/minimatch": {
|
"node_modules/minimatch": {
|
||||||
"version": "3.0.4",
|
"version": "3.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
|
||||||
@@ -2201,6 +2244,25 @@
|
|||||||
"node": ">=0.10.0"
|
"node": ">=0.10.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/source-map-support": {
|
||||||
|
"version": "0.5.19",
|
||||||
|
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz",
|
||||||
|
"integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"buffer-from": "^1.0.0",
|
||||||
|
"source-map": "^0.6.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/source-map-support/node_modules/source-map": {
|
||||||
|
"version": "0.6.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
|
||||||
|
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
|
||||||
|
"dev": true,
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.10.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/spawn-wrap": {
|
"node_modules/spawn-wrap": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-2.0.0.tgz",
|
||||||
@@ -2330,6 +2392,41 @@
|
|||||||
"node": ">=8.0"
|
"node": ">=8.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/ts-node": {
|
||||||
|
"version": "9.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-9.1.1.tgz",
|
||||||
|
"integrity": "sha512-hPlt7ZACERQGf03M253ytLY3dHbGNGrAq9qIHWUY9XHYl1z7wYngSr3OQ5xmui8o2AaxsONxIzjafLUiWBo1Fg==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"arg": "^4.1.0",
|
||||||
|
"create-require": "^1.1.0",
|
||||||
|
"diff": "^4.0.1",
|
||||||
|
"make-error": "^1.1.1",
|
||||||
|
"source-map-support": "^0.5.17",
|
||||||
|
"yn": "3.1.1"
|
||||||
|
},
|
||||||
|
"bin": {
|
||||||
|
"ts-node": "dist/bin.js",
|
||||||
|
"ts-node-script": "dist/bin-script.js",
|
||||||
|
"ts-node-transpile-only": "dist/bin-transpile.js",
|
||||||
|
"ts-script": "dist/bin-script-deprecated.js"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=10.0.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"typescript": ">=2.7"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/ts-node/node_modules/diff": {
|
||||||
|
"version": "4.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz",
|
||||||
|
"integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==",
|
||||||
|
"dev": true,
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.3.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/type-fest": {
|
"node_modules/type-fest": {
|
||||||
"version": "0.8.1",
|
"version": "0.8.1",
|
||||||
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz",
|
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz",
|
||||||
@@ -2609,6 +2706,15 @@
|
|||||||
"node": ">=8"
|
"node": ">=8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/yn": {
|
||||||
|
"version": "3.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz",
|
||||||
|
"integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==",
|
||||||
|
"dev": true,
|
||||||
|
"engines": {
|
||||||
|
"node": ">=6"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/yocto-queue": {
|
"node_modules/yocto-queue": {
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
|
||||||
@@ -2983,6 +3089,15 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"@istanbuljs/nyc-config-typescript": {
|
||||||
|
"version": "1.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@istanbuljs/nyc-config-typescript/-/nyc-config-typescript-1.0.1.tgz",
|
||||||
|
"integrity": "sha512-/gz6LgVpky205LuoOfwEZmnUtaSmdk0QIMcNFj9OvxhiMhPpKftMgZmGN7jNj7jR+lr8IB1Yks3QSSSNSxfoaQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"@istanbuljs/schema": "^0.1.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
"@istanbuljs/schema": {
|
"@istanbuljs/schema": {
|
||||||
"version": "0.1.3",
|
"version": "0.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz",
|
||||||
@@ -3075,6 +3190,12 @@
|
|||||||
"integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=",
|
"integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"arg": {
|
||||||
|
"version": "4.1.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz",
|
||||||
|
"integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"argparse": {
|
"argparse": {
|
||||||
"version": "2.0.1",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
|
||||||
@@ -3131,6 +3252,12 @@
|
|||||||
"node-releases": "^1.1.71"
|
"node-releases": "^1.1.71"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"buffer-from": {
|
||||||
|
"version": "1.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz",
|
||||||
|
"integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"caching-transform": {
|
"caching-transform": {
|
||||||
"version": "4.0.0",
|
"version": "4.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-4.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-4.0.0.tgz",
|
||||||
@@ -3290,6 +3417,12 @@
|
|||||||
"safe-buffer": "~5.1.1"
|
"safe-buffer": "~5.1.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"create-require": {
|
||||||
|
"version": "1.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz",
|
||||||
|
"integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"cross-spawn": {
|
"cross-spawn": {
|
||||||
"version": "7.0.3",
|
"version": "7.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
|
||||||
@@ -3806,6 +3939,12 @@
|
|||||||
"semver": "^6.0.0"
|
"semver": "^6.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"make-error": {
|
||||||
|
"version": "1.3.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz",
|
||||||
|
"integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"minimatch": {
|
"minimatch": {
|
||||||
"version": "3.0.4",
|
"version": "3.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
|
||||||
@@ -4306,6 +4445,24 @@
|
|||||||
"integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
|
"integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"source-map-support": {
|
||||||
|
"version": "0.5.19",
|
||||||
|
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz",
|
||||||
|
"integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"buffer-from": "^1.0.0",
|
||||||
|
"source-map": "^0.6.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"source-map": {
|
||||||
|
"version": "0.6.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
|
||||||
|
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
|
||||||
|
"dev": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"spawn-wrap": {
|
"spawn-wrap": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-2.0.0.tgz",
|
||||||
@@ -4402,6 +4559,28 @@
|
|||||||
"is-number": "^7.0.0"
|
"is-number": "^7.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"ts-node": {
|
||||||
|
"version": "9.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-9.1.1.tgz",
|
||||||
|
"integrity": "sha512-hPlt7ZACERQGf03M253ytLY3dHbGNGrAq9qIHWUY9XHYl1z7wYngSr3OQ5xmui8o2AaxsONxIzjafLUiWBo1Fg==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"arg": "^4.1.0",
|
||||||
|
"create-require": "^1.1.0",
|
||||||
|
"diff": "^4.0.1",
|
||||||
|
"make-error": "^1.1.1",
|
||||||
|
"source-map-support": "^0.5.17",
|
||||||
|
"yn": "3.1.1"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"diff": {
|
||||||
|
"version": "4.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz",
|
||||||
|
"integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==",
|
||||||
|
"dev": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"type-fest": {
|
"type-fest": {
|
||||||
"version": "0.8.1",
|
"version": "0.8.1",
|
||||||
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz",
|
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz",
|
||||||
@@ -4614,6 +4793,12 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"yn": {
|
||||||
|
"version": "3.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz",
|
||||||
|
"integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"yocto-queue": {
|
"yocto-queue": {
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
|
||||||
|
@@ -23,7 +23,7 @@
|
|||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"types": "./dist/index.t.ts",
|
"types": "./dist/index.t.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "tsc -p tsconfig.spec.json && nyc mocha './dist/**/*.spec.js'",
|
"test": "nyc -r text -r html mocha -r ts-node/register './lib/**/*.spec.ts'",
|
||||||
"build": "tsc",
|
"build": "tsc",
|
||||||
"benchmark": "cd ./benchmark && npm run start"
|
"benchmark": "cd ./benchmark && npm run start"
|
||||||
},
|
},
|
||||||
@@ -33,6 +33,7 @@
|
|||||||
"yallist": "4.0.0"
|
"yallist": "4.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@istanbuljs/nyc-config-typescript": "^1.0.1",
|
||||||
"@types/mocha": "^8.2.2",
|
"@types/mocha": "^8.2.2",
|
||||||
"@types/node": "^15.0.2",
|
"@types/node": "^15.0.2",
|
||||||
"@types/tcp-port-used": "^1.0.0",
|
"@types/tcp-port-used": "^1.0.0",
|
||||||
@@ -40,6 +41,7 @@
|
|||||||
"mocha": "^8.4.0",
|
"mocha": "^8.4.0",
|
||||||
"nyc": "^15.1.0",
|
"nyc": "^15.1.0",
|
||||||
"tcp-port-used": "^1.0.2",
|
"tcp-port-used": "^1.0.2",
|
||||||
|
"ts-node": "^9.1.1",
|
||||||
"typescript": "^4.3.0-beta"
|
"typescript": "^4.3.0-beta"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
@@ -8,8 +8,7 @@
|
|||||||
"outDir": "./dist",
|
"outDir": "./dist",
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
"useDefineForClassFields": true,
|
"useDefineForClassFields": true,
|
||||||
"allowJs": true,
|
"allowJs": true
|
||||||
"sourceMap": true
|
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"./lib/ts-declarations/cluster-key-slot.d.ts",
|
"./lib/ts-declarations/cluster-key-slot.d.ts",
|
||||||
@@ -18,5 +17,11 @@
|
|||||||
"include": [
|
"include": [
|
||||||
"./index.ts",
|
"./index.ts",
|
||||||
"./lib/**/*.ts"
|
"./lib/**/*.ts"
|
||||||
]
|
],
|
||||||
|
"ts-node": {
|
||||||
|
"files": true,
|
||||||
|
"compilerOptions": {
|
||||||
|
"module": "CommonJS"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,8 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": "./tsconfig.json",
|
|
||||||
"include": [
|
|
||||||
"./index.ts",
|
|
||||||
"./lib/**/*.ts",
|
|
||||||
"./**/*.spec.ts"
|
|
||||||
]
|
|
||||||
}
|
|
Reference in New Issue
Block a user