@travetto/model-redis 7.0.0-rc.2 → 7.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.
package/README.md CHANGED
@@ -45,11 +45,7 @@ where the [RedisModelConfig](https://github.com/travetto/travetto/tree/main/modu
45
45
  export class RedisModelConfig {
46
46
  client: redis.RedisClientOptions = {};
47
47
  namespace?: string;
48
- autoCreate?: boolean;
49
-
50
- postConstruct(): void {
51
-
52
- }
48
+ modifyStorage?: boolean;
53
49
  }
54
50
  ```
55
51
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/model-redis",
3
- "version": "7.0.0-rc.2",
3
+ "version": "7.0.0-rc.4",
4
4
  "description": "Redis backing for the travetto model module.",
5
5
  "keywords": [
6
6
  "typescript",
@@ -26,9 +26,9 @@
26
26
  },
27
27
  "dependencies": {
28
28
  "@redis/client": "^5.10.0",
29
- "@travetto/cli": "^7.0.0-rc.2",
30
- "@travetto/config": "^7.0.0-rc.2",
31
- "@travetto/model": "^7.0.0-rc.2"
29
+ "@travetto/cli": "^7.0.0-rc.4",
30
+ "@travetto/config": "^7.0.0-rc.4",
31
+ "@travetto/model": "^7.0.0-rc.4"
32
32
  },
33
33
  "travetto": {
34
34
  "displayName": "Redis Model Support"
package/src/config.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type redis from 'redis';
1
+ import type redis from '@redis/client';
2
2
 
3
3
  import { Config } from '@travetto/config';
4
4
 
@@ -6,9 +6,5 @@ import { Config } from '@travetto/config';
6
6
  export class RedisModelConfig {
7
7
  client: redis.RedisClientOptions = {};
8
8
  namespace?: string;
9
- autoCreate?: boolean;
10
-
11
- postConstruct(): void {
12
-
13
- }
9
+ modifyStorage?: boolean;
14
10
  }
package/src/service.ts CHANGED
@@ -170,7 +170,7 @@ export class RedisModelService implements ModelCrudSupport, ModelExpirySupport,
170
170
  async postConstruct(): Promise<void> {
171
171
  this.client = createClient(this.config.client);
172
172
  await this.client.connect();
173
- await ModelStorageUtil.registerModelChangeListener(this);
173
+ await ModelStorageUtil.storageInitialization(this);
174
174
  ShutdownManager.onGracefulShutdown(() => this.client.destroy());
175
175
  for (const cls of ModelRegistryIndex.getClasses()) {
176
176
  for (const idx of ModelRegistryIndex.getConfig(cls).indices ?? []) {