@ddd-ts-kit/kernel 0.86.0 → 0.88.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.
package/README.fr.md CHANGED
@@ -1,5 +1,5 @@
1
1
  [English](README.md) · **Français**
2
- <!-- translation-of: README.md sha256:631fb2d21644d419 -->
2
+ <!-- translation-of: README.md sha256:c138d885ebd7555a -->
3
3
 
4
4
  # @ddd-ts-kit/kernel
5
5
 
@@ -62,7 +62,7 @@ chacun son propre fichier, et `ddd-ts-kit generate` les écrit) :
62
62
  ```ts
63
63
  import { AggregateRoot, DomainRefusal, Entity, ValueObject, NamedDomainEvent } from '@ddd-ts-kit/kernel';
64
64
 
65
- // Les codes du contexte, dans domain/errors/codes.ts, et ses refus, une classe chacun (voir « Erreurs du domaine »).
65
+ // Les codes du contexte, dans <context>.codes.ts, et ses refus, une classe chacun (voir « Erreurs du domaine »).
66
66
  export const OrderingCodes = {
67
67
  InvalidQuantity: 'INVALID_QUANTITY',
68
68
  OrderAlreadyPlaced: 'ORDER_ALREADY_PLACED',
@@ -211,7 +211,7 @@ Un refus métier est une `DomainError` : une réponse que le code a prévue, con
211
211
  `code`. Un contexte a une classe par refus, nommée d'après ce qui est refusé, qui étend
212
212
  `DomainRefusal` ; ses fabriques statiques sont nommées d'après ce sur quoi porte le refus, et le
213
213
  code de chaque refus du contexte est écrit une seule fois, dans la liste fermée
214
- `domain/errors/codes.ts` :
214
+ `<context>.codes.ts` :
215
215
 
216
216
  <!-- checked sample -->
217
217
  ```ts
@@ -220,7 +220,7 @@ import { DomainRefusal } from '@ddd-ts-kit/kernel';
220
220
  declare const calendar: { readonly id: string };
221
221
  declare const slot: { readonly startsAt: Date };
222
222
 
223
- // domain/errors/codes.ts
223
+ // scheduling.codes.ts
224
224
  export const SchedulingCodes = {
225
225
  SlotTaken: 'SLOT_TAKEN',
226
226
  UnknownAppointment: 'APPOINTMENT_NOT_FOUND',
@@ -363,7 +363,7 @@ import { AggregateRoot, DomainRefusal, defineStateMachine } from '@ddd-ts-kit/ke
363
363
  export const ParcelStatus = { Registered: 'registered', Shipped: 'shipped', Delivered: 'delivered' } as const;
364
364
  export type ParcelStatus = (typeof ParcelStatus)[keyof typeof ParcelStatus];
365
365
 
366
- // domain/errors/codes.ts, puis une classe par refus
366
+ // shipping.codes.ts, puis une classe par refus
367
367
  export const ShippingCodes = {
368
368
  ParcelUnpaid: 'PARCEL_UNPAID',
369
369
  ParcelTransitionRefused: 'PARCEL_TRANSITION_REFUSED',
package/README.md CHANGED
@@ -59,7 +59,7 @@ file, and `ddd-ts-kit generate` writes them):
59
59
  ```ts
60
60
  import { AggregateRoot, DomainRefusal, Entity, ValueObject, NamedDomainEvent } from '@ddd-ts-kit/kernel';
61
61
 
62
- // The codes of the context, in domain/errors/codes.ts, and its refusals, one class each (see "Domain errors").
62
+ // The codes of the context, in <context>.codes.ts, and its refusals, one class each (see "Domain errors").
63
63
  export const OrderingCodes = {
64
64
  InvalidQuantity: 'INVALID_QUANTITY',
65
65
  OrderAlreadyPlaced: 'ORDER_ALREADY_PLACED',
@@ -206,7 +206,7 @@ refusal instead of throwing it (`"stack.valueObjects": "result"`). Why each bloc
206
206
  A business refusal is a `DomainError`: an answer the code planned for, known everywhere by its
207
207
  `code`. A context has one class per refusal, named after what is refused, which extends
208
208
  `DomainRefusal`; its static factories are named after what the refusal is about, and the code
209
- of every refusal of the context is written once, in the closed list `domain/errors/codes.ts`:
209
+ of every refusal of the context is written once, in the closed list `<context>.codes.ts`:
210
210
 
211
211
  <!-- checked sample -->
212
212
  ```ts
@@ -215,7 +215,7 @@ import { DomainRefusal } from '@ddd-ts-kit/kernel';
215
215
  declare const calendar: { readonly id: string };
216
216
  declare const slot: { readonly startsAt: Date };
217
217
 
218
- // domain/errors/codes.ts
218
+ // scheduling.codes.ts
219
219
  export const SchedulingCodes = {
220
220
  SlotTaken: 'SLOT_TAKEN',
221
221
  UnknownAppointment: 'APPOINTMENT_NOT_FOUND',
@@ -356,7 +356,7 @@ import { AggregateRoot, DomainRefusal, defineStateMachine } from '@ddd-ts-kit/ke
356
356
  export const ParcelStatus = { Registered: 'registered', Shipped: 'shipped', Delivered: 'delivered' } as const;
357
357
  export type ParcelStatus = (typeof ParcelStatus)[keyof typeof ParcelStatus];
358
358
 
359
- // domain/errors/codes.ts, then one class per refusal
359
+ // shipping.codes.ts, then one class per refusal
360
360
  export const ShippingCodes = {
361
361
  ParcelUnpaid: 'PARCEL_UNPAID',
362
362
  ParcelTransitionRefused: 'PARCEL_TRANSITION_REFUSED',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ddd-ts-kit/kernel",
3
- "version": "0.86.0",
3
+ "version": "0.88.0",
4
4
  "description": "Framework-agnostic Domain-Driven Design (DDD) building blocks for TypeScript: aggregates, entities, value objects, domain events, CQRS command and query buses, unit of work and application ports, with an in-memory event bus.",
5
5
  "keywords": [
6
6
  "ddd",