From 5e73968d45447949c047b30d5c661d898b340111 Mon Sep 17 00:00:00 2001 From: Harminder Virk Date: Tue, 13 Oct 2020 15:28:16 +0530 Subject: [PATCH] fix: pass application instance to the RedisManager class constructor --- npm-audit.html | 2 +- providers/RedisProvider.ts | 2 +- test/redis-provider.spec.ts | 1 + tsconfig.json | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/npm-audit.html b/npm-audit.html index 30bbe73..1c1a027 100644 --- a/npm-audit.html +++ b/npm-audit.html @@ -55,7 +55,7 @@
- October 13th 2020, 9:16:50 am + October 13th 2020, 9:58:26 am

Last updated

diff --git a/providers/RedisProvider.ts b/providers/RedisProvider.ts index 1433637..1efd1b2 100644 --- a/providers/RedisProvider.ts +++ b/providers/RedisProvider.ts @@ -65,7 +65,7 @@ export default class RedisProvider { const emitter = this.app.container.use('Adonis/Core/Event') const { RedisManager } = require('../src/RedisManager') - return new RedisManager(this.app.container, config, emitter) + return new RedisManager(this.app, config, emitter) }) } diff --git a/test/redis-provider.spec.ts b/test/redis-provider.spec.ts index b69e0ad..8f3a4d9 100644 --- a/test/redis-provider.spec.ts +++ b/test/redis-provider.spec.ts @@ -62,6 +62,7 @@ test.group('Redis Provider', (group) => { }) assert.instanceOf(app.container.use('Adonis/Addons/Redis'), RedisManager) + assert.deepEqual(app.container.use('Adonis/Addons/Redis')['application'], app) assert.deepEqual( app.container.use('Adonis/Addons/Redis'), app.container.use('Adonis/Addons/Redis') diff --git a/tsconfig.json b/tsconfig.json index aa93a1a..560d7eb 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,6 +3,7 @@ "compilerOptions": { "esModuleInterop": true, "skipLibCheck": true, + "importHelpers": true, "types": ["@adonisjs/core", "@adonisjs/repl", "@types/node"] } }