@ddd-ts-kit/redis 0.113.1 → 0.114.1
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.fr.md +5 -5
- package/README.md +4 -4
- package/package.json +9 -9
package/README.fr.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
[English](README.md) · **Français**
|
|
2
|
-
<!-- translation-of: README.md sha256:
|
|
2
|
+
<!-- translation-of: README.md sha256:9e02c42e5ab46747 -->
|
|
3
3
|
|
|
4
4
|
# @ddd-ts-kit/redis
|
|
5
5
|
|
|
@@ -26,7 +26,7 @@ Rien ici n'est importé depuis `domain/` ou `application/`. Un cas d'usage dépe
|
|
|
26
26
|
(`Cache`, `Lock`, `RateLimiter` du noyau) ; l'adaptateur est choisi dans `platform/` et lié dans
|
|
27
27
|
la racine de composition.
|
|
28
28
|
|
|
29
|
-
, les six adaptateurs de @ddd-ts-kit/redis qui les implémentent, et l'unique serveur auquel ils envoient leurs commandes ; la plateforme les lie, l'outbox et les événements traités restent dans la base de données](https://raw.githubusercontent.com/ddd-ts-kit/ddd-ts-kit/main/docs/assets/diagrams/redis-place-in-an-application.fr.svg)
|
|
30
30
|
|
|
31
31
|
Le même cas d'usage tourne alors contre Redis en production et contre les adaptateurs en mémoire
|
|
32
32
|
du noyau dans ses tests. Au lieu de nommer l'adaptateur, ce qui lie le cas d'usage à un seul
|
|
@@ -431,7 +431,7 @@ qui le précèdent. Un appel refusé n'est pas compté. `RedisRateLimiter` garde
|
|
|
431
431
|
(sorted set) par clé, un membre par appel autorisé, et décide dans un seul script, si bien que des
|
|
432
432
|
appels concurrents venus de plusieurs instances ne peuvent pas prendre tous deux la dernière place.
|
|
433
433
|
|
|
434
|
-

|
|
435
435
|
|
|
436
436
|
`remaining` compte les places qui restent une fois cet appel compté ; `retryAfterMs` vaut 0 pour
|
|
437
437
|
un appel autorisé et, pour un appel refusé, le temps qui reste avant que l'appel le plus ancien de
|
|
@@ -600,7 +600,7 @@ configuré, et la rétention est bornée par la mémoire : voir
|
|
|
600
600
|
Les gestionnaires ne voient jamais ce *package*. Ils publient dans l'outbox ; le relais publie
|
|
601
601
|
dans les flux ; chaque contexte consommateur s'abonne par le bus, sous son propre nom.
|
|
602
602
|
|
|
603
|
-

|
|
604
604
|
|
|
605
605
|
<!-- checked sample -->
|
|
606
606
|
```ts
|
|
@@ -761,7 +761,7 @@ compte.
|
|
|
761
761
|
|
|
762
762
|
### Comportement des nouvelles tentatives et de la file de rejet
|
|
763
763
|
|
|
764
|
-

|
|
765
765
|
|
|
766
766
|
1. Une entrée est acquittée (`XACK`) après que chaque gestionnaire abonné à son type s'est résolu.
|
|
767
767
|
Utilisez `consume` de `@ddd-ts-kit/events` : l'acquittement suit alors la validation (commit)
|
package/README.md
CHANGED
|
@@ -25,7 +25,7 @@ Nothing here is imported from `domain/` or `application/`. A use case depends on
|
|
|
25
25
|
(`Cache`, `Lock`, `RateLimiter` of the kernel); the adapter is chosen in `platform/` and bound
|
|
26
26
|
in the composition root.
|
|
27
27
|
|
|
28
|
-
, the six adapters of @ddd-ts-kit/redis that implement them, and the one server they send their commands to; the platform binds them, the outbox and the processed events stay in the database](https://raw.githubusercontent.com/ddd-ts-kit/ddd-ts-kit/main/docs/assets/diagrams/redis-place-in-an-application.svg)
|
|
29
29
|
|
|
30
30
|
The same use case then runs against Redis in production and against the in-memory adapters of
|
|
31
31
|
the kernel in its tests. Instead of naming the adapter, which ties the use case to one server
|
|
@@ -420,7 +420,7 @@ it. A refused call is not counted. `RedisRateLimiter` keeps one sorted set per k
|
|
|
420
420
|
per allowed call, and decides in a single script, so concurrent calls from several instances
|
|
421
421
|
cannot both take the last place.
|
|
422
422
|
|
|
423
|
-

|
|
424
424
|
|
|
425
425
|
`remaining` counts the places left once this call is counted; `retryAfterMs` is 0 for an
|
|
426
426
|
allowed call, and for a refused one the time until the oldest call of the window leaves it.
|
|
@@ -582,7 +582,7 @@ memory: see [Guarantees and limits](#guarantees-and-limits).
|
|
|
582
582
|
Handlers never see this package. They publish to the outbox; the relay publishes to the
|
|
583
583
|
streams; each consuming context subscribes through the bus under its own name.
|
|
584
584
|
|
|
585
|
-

|
|
586
586
|
|
|
587
587
|
<!-- checked sample -->
|
|
588
588
|
```ts
|
|
@@ -740,7 +740,7 @@ version in the payload when it matters.
|
|
|
740
740
|
|
|
741
741
|
### Retry and dead-letter behaviour
|
|
742
742
|
|
|
743
|
-

|
|
744
744
|
|
|
745
745
|
1. An entry is acknowledged (`XACK`) after every handler subscribed to its type resolved. Use
|
|
746
746
|
`consume` of `@ddd-ts-kit/events`: the acknowledgement then follows the commit of the unit
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ddd-ts-kit/redis",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.114.1",
|
|
4
4
|
"description": "Adapters of the kernel ports on the Redis protocol (Redis, Dragonfly, Valkey): cache, distributed lock, rate limiter, relay wake-up signal, a background job store, and an integration event provider on Redis Streams.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ddd",
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
"license": "MIT",
|
|
20
20
|
"repository": {
|
|
21
21
|
"type": "git",
|
|
22
|
-
"url": "git+https://github.com/
|
|
22
|
+
"url": "git+https://github.com/ddd-ts-kit/ddd-ts-kit.git",
|
|
23
23
|
"directory": "packages/redis"
|
|
24
24
|
},
|
|
25
|
-
"homepage": "https://
|
|
26
|
-
"bugs": "https://github.com/
|
|
25
|
+
"homepage": "https://ddd-ts-kit.github.io/ddd-ts-kit/packages/redis/",
|
|
26
|
+
"bugs": "https://github.com/ddd-ts-kit/ddd-ts-kit/issues",
|
|
27
27
|
"publishConfig": {
|
|
28
28
|
"access": "public",
|
|
29
29
|
"provenance": true
|
|
@@ -51,12 +51,12 @@
|
|
|
51
51
|
"dist"
|
|
52
52
|
],
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@ddd-ts-kit/kernel": "0.
|
|
55
|
-
"@ddd-ts-kit/scheduling": "0.
|
|
54
|
+
"@ddd-ts-kit/kernel": "0.114.1",
|
|
55
|
+
"@ddd-ts-kit/scheduling": "0.114.1"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
58
|
"ioredis": "^5.0.0 || ^6.0.0",
|
|
59
|
-
"@ddd-ts-kit/testing": "0.
|
|
59
|
+
"@ddd-ts-kit/testing": "0.114.1"
|
|
60
60
|
},
|
|
61
61
|
"peerDependenciesMeta": {
|
|
62
62
|
"@ddd-ts-kit/testing": {
|
|
@@ -65,8 +65,8 @@
|
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
67
|
"ioredis": "^6.0.0",
|
|
68
|
-
"@ddd-ts-kit/events": "0.
|
|
69
|
-
"@ddd-ts-kit/testing": "0.
|
|
68
|
+
"@ddd-ts-kit/events": "0.114.1",
|
|
69
|
+
"@ddd-ts-kit/testing": "0.114.1",
|
|
70
70
|
"wasmoon-lua5.1": "1.18.12"
|
|
71
71
|
}
|
|
72
72
|
}
|