@travetto/model-redis 4.0.0-rc.2 → 4.0.0-rc.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +4 -4
  2. package/src/service.ts +3 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/model-redis",
3
- "version": "4.0.0-rc.2",
3
+ "version": "4.0.0-rc.4",
4
4
  "description": "Redis backing for the travetto model module.",
5
5
  "keywords": [
6
6
  "typescript",
@@ -25,12 +25,12 @@
25
25
  "directory": "module/model-redis"
26
26
  },
27
27
  "dependencies": {
28
- "@travetto/config": "^4.0.0-rc.2",
29
- "@travetto/model": "^4.0.0-rc.2",
28
+ "@travetto/config": "^4.0.0-rc.4",
29
+ "@travetto/model": "^4.0.0-rc.4",
30
30
  "redis": "^4.6.12"
31
31
  },
32
32
  "peerDependencies": {
33
- "@travetto/command": "^4.0.0-rc.2"
33
+ "@travetto/command": "^4.0.0-rc.4"
34
34
  },
35
35
  "peerDependenciesMeta": {
36
36
  "@travetto/command": {
package/src/service.ts CHANGED
@@ -1,4 +1,4 @@
1
- import * as redis from 'redis';
1
+ import { createClient } from 'redis';
2
2
 
3
3
  import { ShutdownManager, type Class } from '@travetto/base';
4
4
  import { DeepPartial } from '@travetto/schema';
@@ -16,7 +16,7 @@ import { ModelStorageUtil } from '@travetto/model/src/internal/service/storage';
16
16
  import { RedisModelConfig } from './config';
17
17
 
18
18
  type RedisScan = { key: string } | { match: string };
19
- type RedisClient = ReturnType<typeof redis.createClient>;
19
+ type RedisClient = ReturnType<typeof createClient>;
20
20
  type RedisMulti = ReturnType<RedisClient['multi']>;
21
21
 
22
22
  /**
@@ -173,7 +173,7 @@ export class RedisModelService implements ModelCrudSupport, ModelExpirySupport,
173
173
  }
174
174
 
175
175
  async postConstruct(): Promise<void> {
176
- this.client = redis.createClient(this.config.client);
176
+ this.client = createClient(this.config.client);
177
177
  await this.client.connect();
178
178
  await ModelStorageUtil.registerModelChangeListener(this);
179
179
  ShutdownManager.onGracefulShutdown(() => this.client.disconnect(), this);