@travetto/model-redis 7.1.3 → 8.0.0-alpha.0

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 +5 -5
  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": "7.1.3",
3
+ "version": "8.0.0-alpha.0",
4
4
  "type": "module",
5
5
  "description": "Redis backing for the travetto model module.",
6
6
  "keywords": [
@@ -26,12 +26,12 @@
26
26
  "directory": "module/model-redis"
27
27
  },
28
28
  "dependencies": {
29
- "@redis/client": "^5.10.0",
30
- "@travetto/config": "^7.1.3",
31
- "@travetto/model": "^7.1.3"
29
+ "@redis/client": "^5.11.0",
30
+ "@travetto/config": "^8.0.0-alpha.0",
31
+ "@travetto/model": "^8.0.0-alpha.0"
32
32
  },
33
33
  "peerDependencies": {
34
- "@travetto/cli": "^7.1.3"
34
+ "@travetto/cli": "^8.0.0-alpha.0"
35
35
  },
36
36
  "peerDependenciesMeta": {
37
37
  "@travetto/cli": {
package/src/service.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { createClient } from '@redis/client';
2
2
 
3
- import { ShutdownManager, type Class, type DeepPartial } from '@travetto/runtime';
3
+ import { JSONUtil, ShutdownManager, type Class, type DeepPartial } from '@travetto/runtime';
4
4
  import {
5
5
  type ModelCrudSupport, type ModelExpirySupport, ModelRegistryIndex, type ModelType, type ModelStorageSupport,
6
6
  NotFoundError, ExistsError, type ModelIndexedSupport, type OptionalId,
@@ -106,7 +106,7 @@ export class RedisModelService implements ModelCrudSupport, ModelExpirySupport,
106
106
  }
107
107
  switch (action) {
108
108
  case 'write': {
109
- multi.set(key, JSON.stringify(item));
109
+ multi.set(key, JSONUtil.toUTF8(item));
110
110
  this.#addIndices(cls, item, multi);
111
111
  break;
112
112
  }
@@ -119,7 +119,7 @@ export class RedisModelService implements ModelCrudSupport, ModelExpirySupport,
119
119
  } else {
120
120
  switch (action) {
121
121
  case 'write': {
122
- await this.client.set(key, JSON.stringify(item));
122
+ await this.client.set(key, JSONUtil.toUTF8(item));
123
123
  break;
124
124
  }
125
125
  case 'delete': {