@travetto/model-redis 6.0.0-rc.1 → 6.0.0-rc.3

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
@@ -16,9 +16,10 @@ yarn add @travetto/model-redis
16
16
  This module provides an [redis](https://redis.io)-based implementation for the [Data Modeling Support](https://github.com/travetto/travetto/tree/main/module/model#readme "Datastore abstraction for core operations."). This source allows the [Data Modeling Support](https://github.com/travetto/travetto/tree/main/module/model#readme "Datastore abstraction for core operations.") module to read, write and query against [redis](https://redis.io).
17
17
 
18
18
  Supported features:
19
- * [CRUD](https://github.com/travetto/travetto/tree/main/module/model/src/service/crud.ts#L11)
20
- * [Expiry](https://github.com/travetto/travetto/tree/main/module/model/src/service/expiry.ts#L11)
21
- * [Indexed](https://github.com/travetto/travetto/tree/main/module/model/src/service/indexed.ts#L12)
19
+ * [CRUD](https://github.com/travetto/travetto/tree/main/module/model/src/types/crud.ts#L11)
20
+ * [Expiry](https://github.com/travetto/travetto/tree/main/module/model/src/types/expiry.ts#L10)
21
+ * [Indexed](https://github.com/travetto/travetto/tree/main/module/model/src/types/indexed.ts#L11)
22
+
22
23
  Out of the box, by installing the module, everything should be wired up by default.If you need to customize any aspect of the source or config, you can override and register it with the [Dependency Injection](https://github.com/travetto/travetto/tree/main/module/di#readme "Dependency registration/management and injection support.") module.
23
24
 
24
25
  **Code: Wiring up a custom Model Source**
@@ -40,11 +41,6 @@ where the [RedisModelConfig](https://github.com/travetto/travetto/tree/main/modu
40
41
 
41
42
  **Code: Structure of RedisModelConfig**
42
43
  ```typescript
43
- import type redis from 'redis';
44
-
45
- import { Config } from '@travetto/config';
46
- import { Field } from '@travetto/schema';
47
-
48
44
  @Config('model.redis')
49
45
  export class RedisModelConfig {
50
46
 
package/__index__.ts CHANGED
@@ -1,2 +1,2 @@
1
- export * from './src/service';
2
- export * from './src/config';
1
+ export * from './src/service.ts';
2
+ export * from './src/config.ts';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/model-redis",
3
- "version": "6.0.0-rc.1",
3
+ "version": "6.0.0-rc.3",
4
4
  "description": "Redis backing for the travetto model module.",
5
5
  "keywords": [
6
6
  "typescript",
@@ -25,9 +25,9 @@
25
25
  "directory": "module/model-redis"
26
26
  },
27
27
  "dependencies": {
28
- "@travetto/cli": "^6.0.0-rc.1",
29
- "@travetto/config": "^6.0.0-rc.1",
30
- "@travetto/model": "^6.0.0-rc.1",
28
+ "@travetto/cli": "^6.0.0-rc.3",
29
+ "@travetto/config": "^6.0.0-rc.2",
30
+ "@travetto/model": "^6.0.0-rc.2",
31
31
  "redis": "^4.7.0"
32
32
  },
33
33
  "travetto": {
package/src/service.ts CHANGED
@@ -3,16 +3,12 @@ import { createClient } from 'redis';
3
3
  import { ShutdownManager, type Class, type DeepPartial } from '@travetto/runtime';
4
4
  import {
5
5
  ModelCrudSupport, ModelExpirySupport, ModelRegistry, ModelType, ModelStorageSupport,
6
- NotFoundError, ExistsError, ModelIndexedSupport, OptionalId
6
+ NotFoundError, ExistsError, ModelIndexedSupport, OptionalId,
7
+ ModelCrudUtil, ModelExpiryUtil, ModelIndexedUtil, ModelStorageUtil,
7
8
  } from '@travetto/model';
8
9
  import { Injectable } from '@travetto/di';
9
10
 
10
- import { ModelCrudUtil } from '@travetto/model/src/internal/service/crud';
11
- import { ModelExpiryUtil } from '@travetto/model/src/internal/service/expiry';
12
- import { ModelIndexedUtil } from '@travetto/model/src/internal/service/indexed';
13
- import { ModelStorageUtil } from '@travetto/model/src/internal/service/storage';
14
-
15
- import { RedisModelConfig } from './config';
11
+ import { RedisModelConfig } from './config.ts';
16
12
 
17
13
  type RedisScan = { key: string } | { match: string };
18
14
  type RedisClient = ReturnType<typeof createClient>;
@@ -267,7 +263,7 @@ export class RedisModelService implements ModelCrudSupport, ModelExpirySupport,
267
263
  }
268
264
 
269
265
  // Expiry
270
- async deleteExpired<T extends ModelType>(cls: Class<T>): Promise<number> {
266
+ async deleteExpired<T extends ModelType>(_cls: Class<T>): Promise<number> {
271
267
  // Automatic
272
268
  return -1;
273
269
  }