From 51a1904c7d383f2f1dc83c5c3e7b65fe564d24aa Mon Sep 17 00:00:00 2001 From: Luna-Runa Date: Tue, 9 Apr 2024 17:19:16 +0900 Subject: [PATCH 1/4] Refact: Apply strict mode modify type errors that occur when the strict is set to true --- lib/redis-stream-client.core-module.ts | 19 +++++--- lib/redis.client.ts | 30 ++++++++----- lib/redis.server.ts | 30 ++++++++----- lib/redis.utils.ts | 3 +- lib/requests-map.ts | 10 ++--- lib/streams.utils.ts | 4 +- package-lock.json | 61 +++++++++++++++++++++++--- package.json | 1 + tsconfig.json | 1 + 9 files changed, 116 insertions(+), 43 deletions(-) diff --git a/lib/redis-stream-client.core-module.ts b/lib/redis-stream-client.core-module.ts index 29cadca..48fc7a2 100644 --- a/lib/redis-stream-client.core-module.ts +++ b/lib/redis-stream-client.core-module.ts @@ -57,14 +57,13 @@ export class RedisStreamClientCoreModule { ); } - if (options.useExisting || options.useFactory) { - return [this.createAsyncClientProvider(options)]; + const providers: Provider[] = [this.createAsyncClientProvider(options)]; + + if (!options.useExisting && !options.useFactory && options.useClass) { + providers.push({ provide: options.useClass, useClass: options.useClass }); } - return [ - this.createAsyncClientProvider(options), - { provide: options.useClass, useClass: options.useClass }, - ]; + return providers } /* createAsyncOptionsProvider */ @@ -86,12 +85,18 @@ export class RedisStreamClientCoreModule { }; } + const inject = options.useClass + ? [options.useClass] + : options.useExisting + ? [options.useExisting] + : [] + return { provide: REDIS_STREAM_CLIENT_MODULE_OPTIONS, useFactory: async ( optionsFactory: RedisStreamClientModuleOptionsFactory, ) => optionsFactory.createRedisStreamClientModuleOptions(), - inject: [options.useClass || options.useExisting], + inject, }; } } diff --git a/lib/redis.client.ts b/lib/redis.client.ts index c3844c2..781dc1a 100644 --- a/lib/redis.client.ts +++ b/lib/redis.client.ts @@ -12,11 +12,11 @@ import { firstValueFrom, share } from 'rxjs'; export class RedisStreamClient extends ClientProxy { protected readonly logger = new Logger(RedisStreamClient.name); - private redis: RedisInstance; // server instance for listening on response streams. + private redis: RedisInstance | null = null; // server instance for listening on response streams. - private client: RedisInstance; // client instance for publishing streams. + private client: RedisInstance | null = null; // client instance for publishing streams. - protected connection: Promise; // client connection logic is required by framework. + protected connection: Promise | null = null; // client connection logic is required by framework. private streamsToListenOn: string[] = []; // response streams to listen on. @@ -40,9 +40,9 @@ export class RedisStreamClient extends ClientProxy { this.logger.log( 'Redis Client Responses Listener connected successfully on ' + (this.options.connection?.url ?? - this.options.connection.host + + this.options.connection?.host + ':' + - this.options.connection.port), + this.options.connection?.port), ); this.initListener(); @@ -102,6 +102,8 @@ export class RedisStreamClient extends ClientProxy { public async handleXadd(stream: string, serializedPayloadArray: any[]) { try { + if (!this.client) throw new Error('Redis client instance not found.'); + let response = await this.client.xadd( stream, '*', @@ -222,12 +224,14 @@ export class RedisStreamClient extends ClientProxy { private async createConsumerGroup(stream: string, consumerGroup: string) { try { + if (!this.redis) throw new Error('Redis instance not found.'); + await this.redis.xgroup('CREATE', stream, consumerGroup, '$', 'MKSTREAM'); return true; } catch (error) { // if group exist for this stream. log debug. - if (error?.message.includes('BUSYGROUP')) { + if (error instanceof Error && error?.message.includes('BUSYGROUP')) { this.logger.debug( 'Consumer Group "' + consumerGroup + @@ -242,14 +246,16 @@ export class RedisStreamClient extends ClientProxy { } } - private async listenOnStreams() { + private async listenOnStreams(): Promise { try { + if (!this.redis) throw new Error('Redis instance not found.'); + let results: any[]; results = await this.redis.xreadgroup( 'GROUP', - this.options?.streams?.consumerGroup || undefined, - this.options?.streams?.consumer || undefined, // need to make it throw an error. + this.options?.streams?.consumerGroup || '', + this.options?.streams?.consumer || '', // need to make it throw an error. 'BLOCK', this.options?.streams?.block || 0, 'STREAMS', @@ -315,8 +321,8 @@ export class RedisStreamClient extends ClientProxy { // after message private async deliverToHandler( - correlationId, - parsedPayload, + correlationId: string, + parsedPayload: any, ctx: RedisStreamContext, ) { try { @@ -369,6 +375,8 @@ export class RedisStreamClient extends ClientProxy { private async handleAck(inboundContext: RedisStreamContext) { try { + if (!this.client) throw new Error('Redis client instance not found.'); + await this.client.xack( inboundContext.getStream(), inboundContext.getConsumerGroup(), diff --git a/lib/redis.server.ts b/lib/redis.server.ts index 6d3e254..c556728 100644 --- a/lib/redis.server.ts +++ b/lib/redis.server.ts @@ -17,11 +17,11 @@ export class RedisStreamStrategy extends Server implements CustomTransportStrategy { - private streamHandlerMap = {}; + private streamHandlerMap: { [key: string]: any } = {}; - private redis: RedisInstance; - - private client: RedisInstance; + private redis: RedisInstance | null = null; + + private client: RedisInstance | null = null; constructor(private readonly options: ConstructorOptions) { super(); @@ -40,7 +40,7 @@ export class RedisStreamStrategy this.logger.log( 'Redis connected successfully on ' + (this.options.connection?.url ?? - this.options.connection.host + ':' + this.options.connection.port), + this.options.connection?.host + ':' + this.options.connection?.port), ); this.bindHandlers(); @@ -85,20 +85,22 @@ export class RedisStreamStrategy return true; } catch (error) { // JSON.parse will throw error, if is not parsable. - this.logger.debug(error + '. Handler Pattern is: ' + pattern); + this.logger.debug!(error + '. Handler Pattern is: ' + pattern); return false; } } private async createConsumerGroup(stream: string, consumerGroup: string) { try { + if (!this.redis) throw new Error('Redis instance not found.'); + await this.redis.xgroup('CREATE', stream, consumerGroup, '$', 'MKSTREAM'); return true; } catch (error) { // if group exist for this stream. log debug. - if (error?.message.includes('BUSYGROUP')) { - this.logger.debug( + if (error instanceof Error && error.message.includes('BUSYGROUP')) { + this.logger.debug!( 'Consumer Group "' + consumerGroup + '" already exists for stream: ' + @@ -134,6 +136,8 @@ export class RedisStreamStrategy ); } + if (!this.client) throw new Error('Redis client instance not found.'); + await this.client.xadd(responseObj.stream, '*', ...serializedEntries); }), ); @@ -147,6 +151,8 @@ export class RedisStreamStrategy private async handleAck(inboundContext: RedisStreamContext) { try { + if (!this.client) throw new Error('Redis client instance not found.'); + await this.client.xack( inboundContext.getStream(), inboundContext.getConsumerGroup(), @@ -248,14 +254,16 @@ export class RedisStreamStrategy } } - private async listenOnStreams() { + private async listenOnStreams(): Promise { try { + if (!this.redis) throw new Error('Redis instance not found.'); + let results: any[]; results = await this.redis.xreadgroup( 'GROUP', - this.options?.streams?.consumerGroup || undefined, - this.options?.streams?.consumer || undefined, // need to make it throw an error. + this.options?.streams?.consumerGroup || '', + this.options?.streams?.consumer || '', // need to make it throw an error. 'BLOCK', this.options?.streams?.block || 0, 'STREAMS', diff --git a/lib/redis.utils.ts b/lib/redis.utils.ts index 8a2a388..48732b2 100644 --- a/lib/redis.utils.ts +++ b/lib/redis.utils.ts @@ -10,6 +10,7 @@ export function createRedisConnection( if (connection?.url) { return new Redis(connection?.url, connection); } else { - return new Redis(connection); + // TODO appropriate verification is required when the connection is undefined. + return new Redis(connection!); } } diff --git a/lib/requests-map.ts b/lib/requests-map.ts index 095fa1b..0bf34e4 100644 --- a/lib/requests-map.ts +++ b/lib/requests-map.ts @@ -1,18 +1,18 @@ -export class RequestsMap { - private map = {}; +export class RequestsMap { + private map: Record = {} as Record; constructor() {} - public addEntry(requestId, handler) { + public addEntry(requestId: T, handler: S) { this.map[requestId] = handler; return true; } - public getEntry(requestId) { + public getEntry(requestId: T) { return this.map[requestId]; } - public removeEntry(requestId) { + public removeEntry(requestId: T) { delete this.map[requestId]; return true; } diff --git a/lib/streams.utils.ts b/lib/streams.utils.ts index c35e971..a4fffc8 100644 --- a/lib/streams.utils.ts +++ b/lib/streams.utils.ts @@ -44,7 +44,7 @@ export async function serialize( return stringifiedResponse; } catch (error) { logger.error(error); - return null; + return []; } } @@ -61,7 +61,7 @@ export async function parseJson(data: string): Promise { export function parseRawMessage(rawMessage: any): any { let payload = rawMessage[1]; - let obj = {}; + let obj: {[key: string]: any} = {}; for (let i = 0; i < payload.length; i += 2) { obj[payload[i]] = payload[i + 1]; diff --git a/package-lock.json b/package-lock.json index d3c2c44..33b9651 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,6 +22,7 @@ "@types/jest": "28.1.8", "@types/node": "^16.0.0", "@types/supertest": "^2.0.11", + "@types/uuid": "^9.0.8", "@typescript-eslint/eslint-plugin": "^5.0.0", "@typescript-eslint/parser": "^5.0.0", "eslint": "^8.0.1", @@ -1201,6 +1202,14 @@ } } }, + "node_modules/@nestjs/common/node_modules/uuid": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz", + "integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==", + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/@nestjs/core": { "version": "9.1.4", "resolved": "https://registry.npmjs.org/@nestjs/core/-/core-9.1.4.tgz", @@ -1240,6 +1249,15 @@ } } }, + "node_modules/@nestjs/core/node_modules/uuid": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz", + "integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==", + "peer": true, + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/@nestjs/microservices": { "version": "9.1.4", "resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-9.1.4.tgz", @@ -1689,6 +1707,12 @@ "@types/superagent": "*" } }, + "node_modules/@types/uuid": { + "version": "9.0.8", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.8.tgz", + "integrity": "sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA==", + "dev": true + }, "node_modules/@types/yargs": { "version": "17.0.13", "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.13.tgz", @@ -5778,9 +5802,13 @@ } }, "node_modules/uuid": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz", - "integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], "bin": { "uuid": "dist/bin/uuid" } @@ -6917,6 +6945,13 @@ "iterare": "1.2.1", "tslib": "2.4.0", "uuid": "9.0.0" + }, + "dependencies": { + "uuid": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz", + "integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==" + } } }, "@nestjs/core": { @@ -6932,6 +6967,14 @@ "path-to-regexp": "3.2.0", "tslib": "2.4.0", "uuid": "9.0.0" + }, + "dependencies": { + "uuid": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz", + "integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==", + "peer": true + } } }, "@nestjs/microservices": { @@ -7301,6 +7344,12 @@ "@types/superagent": "*" } }, + "@types/uuid": { + "version": "9.0.8", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.8.tgz", + "integrity": "sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA==", + "dev": true + }, "@types/yargs": { "version": "17.0.13", "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.13.tgz", @@ -10292,9 +10341,9 @@ } }, "uuid": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz", - "integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==" + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==" }, "v8-compile-cache-lib": { "version": "3.0.1", diff --git a/package.json b/package.json index 740893a..feca992 100644 --- a/package.json +++ b/package.json @@ -50,6 +50,7 @@ "@types/jest": "28.1.8", "@types/node": "^16.0.0", "@types/supertest": "^2.0.11", + "@types/uuid": "^9.0.8", "@typescript-eslint/eslint-plugin": "^5.0.0", "@typescript-eslint/parser": "^5.0.0", "eslint": "^8.0.1", diff --git a/tsconfig.json b/tsconfig.json index 8683185..ec1624d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,6 +2,7 @@ "compilerOptions": { "module": "commonjs", "declaration": true, + // "strict": true, "noImplicitAny": false, "noUnusedLocals": false, "importHelpers": true, From 4e09fee4a05785f39b677de17e0ce7ef7030ae22 Mon Sep 17 00:00:00 2001 From: tamimaj Date: Tue, 9 Apr 2024 17:32:59 +0200 Subject: [PATCH 2/4] Fix: TS strict mode errors. --- lib/redis.client.ts | 6 +++--- lib/redis.server.ts | 8 +++++--- lib/redis.utils.ts | 2 -- lib/streams.utils.ts | 10 +++++----- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/redis.client.ts b/lib/redis.client.ts index 781dc1a..bb8b70c 100644 --- a/lib/redis.client.ts +++ b/lib/redis.client.ts @@ -225,7 +225,7 @@ export class RedisStreamClient extends ClientProxy { private async createConsumerGroup(stream: string, consumerGroup: string) { try { if (!this.redis) throw new Error('Redis instance not found.'); - + await this.redis.xgroup('CREATE', stream, consumerGroup, '$', 'MKSTREAM'); return true; @@ -249,13 +249,13 @@ export class RedisStreamClient extends ClientProxy { private async listenOnStreams(): Promise { try { if (!this.redis) throw new Error('Redis instance not found.'); - + let results: any[]; results = await this.redis.xreadgroup( 'GROUP', this.options?.streams?.consumerGroup || '', - this.options?.streams?.consumer || '', // need to make it throw an error. + this.options?.streams?.consumer || '', 'BLOCK', this.options?.streams?.block || 0, 'STREAMS', diff --git a/lib/redis.server.ts b/lib/redis.server.ts index c556728..9648181 100644 --- a/lib/redis.server.ts +++ b/lib/redis.server.ts @@ -20,7 +20,7 @@ export class RedisStreamStrategy private streamHandlerMap: { [key: string]: any } = {}; private redis: RedisInstance | null = null; - + private client: RedisInstance | null = null; constructor(private readonly options: ConstructorOptions) { @@ -40,7 +40,9 @@ export class RedisStreamStrategy this.logger.log( 'Redis connected successfully on ' + (this.options.connection?.url ?? - this.options.connection?.host + ':' + this.options.connection?.port), + this.options.connection?.host + + ':' + + this.options.connection?.port), ); this.bindHandlers(); @@ -263,7 +265,7 @@ export class RedisStreamStrategy results = await this.redis.xreadgroup( 'GROUP', this.options?.streams?.consumerGroup || '', - this.options?.streams?.consumer || '', // need to make it throw an error. + this.options?.streams?.consumer || '', 'BLOCK', this.options?.streams?.block || 0, 'STREAMS', diff --git a/lib/redis.utils.ts b/lib/redis.utils.ts index 48732b2..73dfdaf 100644 --- a/lib/redis.utils.ts +++ b/lib/redis.utils.ts @@ -6,11 +6,9 @@ export function createRedisConnection( connection?: RedisConnectionOptions, ): RedisInstance { // connection obj is optional, ioredis handle the default connection to localhost:6379 - if (connection?.url) { return new Redis(connection?.url, connection); } else { - // TODO appropriate verification is required when the connection is undefined. return new Redis(connection!); } } diff --git a/lib/streams.utils.ts b/lib/streams.utils.ts index a4fffc8..bd6b069 100644 --- a/lib/streams.utils.ts +++ b/lib/streams.utils.ts @@ -58,10 +58,10 @@ export async function parseJson(data: string): Promise { } } -export function parseRawMessage(rawMessage: any): any { +export function parseRawMessage(rawMessage: any): Record { let payload = rawMessage[1]; - let obj: {[key: string]: any} = {}; + let obj: Record = {}; for (let i = 0; i < payload.length; i += 2) { obj[payload[i]] = payload[i + 1]; @@ -70,9 +70,9 @@ export function parseRawMessage(rawMessage: any): any { return obj; } -export function stringifyMessage(messageObj: any): any { +export function stringifyMessage(messageObj: Record): string[] { try { - let finalArray = []; + let finalArray: string[] = []; for (let key in messageObj) { finalArray.push(key); @@ -82,7 +82,7 @@ export function stringifyMessage(messageObj: any): any { return finalArray; } catch (error) { logger.error(error); - return null; + return []; } } From 3ac76d1448dacf1e5dc0aacb4248422fd8fe52f8 Mon Sep 17 00:00:00 2001 From: tamimaj Date: Tue, 9 Apr 2024 17:35:42 +0200 Subject: [PATCH 3/4] Refactor: Updated tests. --- tests/requests-map.spec.ts | 4 ---- tests/streams.utils.spec.ts | 6 ++--- tsconfig.json | 44 ++++++++++++++++--------------------- 3 files changed, 22 insertions(+), 32 deletions(-) diff --git a/tests/requests-map.spec.ts b/tests/requests-map.spec.ts index c73663a..c1c4e24 100644 --- a/tests/requests-map.spec.ts +++ b/tests/requests-map.spec.ts @@ -7,10 +7,6 @@ describe('RequestsMap', () => { requestsMap = new RequestsMap(); }); - afterEach(() => { - requestsMap = null; - }); - describe('addEntry', () => { it('should add an entry to the map', () => { const handler = jest.fn(); diff --git a/tests/streams.utils.spec.ts b/tests/streams.utils.spec.ts index 4231fe8..257a8ae 100644 --- a/tests/streams.utils.spec.ts +++ b/tests/streams.utils.spec.ts @@ -39,7 +39,7 @@ describe('[Stream Utils]', () => { let r = await serialize(data, ctx); throw new Error("didn't throw for non existing data"); } catch (error) { - expect(error.toString()).toContain( + expect((error as Error).toString()).toContain( "Could not find the 'data' key in the payload.", ); } @@ -71,7 +71,7 @@ describe('[Stream Utils]', () => { ); throw new Error("didn't throw for non existing data"); } catch (error) { - expect(error.toString()).toContain( + expect((error as Error).toString()).toContain( "Could not find the 'data' key in the message.", ); } @@ -105,7 +105,7 @@ describe('[Stream Utils]', () => { test('returns null and logs an error for invalid input', () => { const invalidInput = null; - const output = stringifyMessage(invalidInput); + const output = stringifyMessage(invalidInput as any); expect(output).toEqual([]); }); }); diff --git a/tsconfig.json b/tsconfig.json index ec1624d..efa1b1a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,27 +1,21 @@ { - "compilerOptions": { - "module": "commonjs", - "declaration": true, - // "strict": true, - "noImplicitAny": false, - "noUnusedLocals": false, - "importHelpers": true, - "removeComments": true, - "noLib": false, - "emitDecoratorMetadata": true, - "experimentalDecorators": true, - "target": "es6", - "sourceMap": false, - "outDir": "./dist", - "rootDir": "./lib", - "lib": ["es7"] - }, - "include": [ - "lib/**/*" - ], - "exclude": [ - "node_modules" - ] + "compilerOptions": { + "module": "commonjs", + "declaration": true, + "strict": true, + "noImplicitAny": false, + "noUnusedLocals": false, + "importHelpers": true, + "removeComments": true, + "noLib": false, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "target": "es6", + "sourceMap": false, + "outDir": "./dist", + "rootDir": "./lib", + "lib": ["es7"] + }, + "include": ["lib/**/*"], + "exclude": ["node_modules"] } - - \ No newline at end of file From ed4f77675c962851214be64d0e002dfafe7411f7 Mon Sep 17 00:00:00 2001 From: tamimaj Date: Tue, 9 Apr 2024 17:35:55 +0200 Subject: [PATCH 4/4] v1.0.5 --- examples/client-app/package-lock.json | 4 +++- examples/users-microservice/package-lock.json | 4 +++- package-lock.json | 4 ++-- package.json | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/examples/client-app/package-lock.json b/examples/client-app/package-lock.json index e76e2c4..be52b83 100644 --- a/examples/client-app/package-lock.json +++ b/examples/client-app/package-lock.json @@ -44,7 +44,7 @@ }, "../..": { "name": "@tamimaj/nestjs-redis-streams", - "version": "1.0.2", + "version": "1.0.5", "license": "MIT", "dependencies": { "@nestjs/common": "^9.0.0", @@ -60,6 +60,7 @@ "@types/jest": "28.1.8", "@types/node": "^16.0.0", "@types/supertest": "^2.0.11", + "@types/uuid": "^9.0.8", "@typescript-eslint/eslint-plugin": "^5.0.0", "@typescript-eslint/parser": "^5.0.0", "eslint": "^8.0.1", @@ -9809,6 +9810,7 @@ "@types/jest": "28.1.8", "@types/node": "^16.0.0", "@types/supertest": "^2.0.11", + "@types/uuid": "^9.0.8", "@typescript-eslint/eslint-plugin": "^5.0.0", "@typescript-eslint/parser": "^5.0.0", "eslint": "^8.0.1", diff --git a/examples/users-microservice/package-lock.json b/examples/users-microservice/package-lock.json index 072d428..b5b9504 100644 --- a/examples/users-microservice/package-lock.json +++ b/examples/users-microservice/package-lock.json @@ -46,7 +46,7 @@ }, "../..": { "name": "@tamimaj/nestjs-redis-streams", - "version": "1.0.2", + "version": "1.0.5", "license": "MIT", "dependencies": { "@nestjs/common": "^9.0.0", @@ -62,6 +62,7 @@ "@types/jest": "28.1.8", "@types/node": "^16.0.0", "@types/supertest": "^2.0.11", + "@types/uuid": "^9.0.8", "@typescript-eslint/eslint-plugin": "^5.0.0", "@typescript-eslint/parser": "^5.0.0", "eslint": "^8.0.1", @@ -10165,6 +10166,7 @@ "@types/jest": "28.1.8", "@types/node": "^16.0.0", "@types/supertest": "^2.0.11", + "@types/uuid": "^9.0.8", "@typescript-eslint/eslint-plugin": "^5.0.0", "@typescript-eslint/parser": "^5.0.0", "eslint": "^8.0.1", diff --git a/package-lock.json b/package-lock.json index 33b9651..dfc6e2e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@tamimaj/nestjs-redis-streams", - "version": "1.0.4", + "version": "1.0.5", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@tamimaj/nestjs-redis-streams", - "version": "1.0.4", + "version": "1.0.5", "license": "MIT", "dependencies": { "@nestjs/common": "^9.0.0", diff --git a/package.json b/package.json index feca992..d48f9eb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@tamimaj/nestjs-redis-streams", - "version": "1.0.4", + "version": "1.0.5", "description": "Redis Streams Transport for NestJS.", "author": "Tamim Abbas Aljuratli ", "private": false,