@ddd-ts-kit/kernel 0.102.0 → 0.104.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 +4 -3
- package/README.md +3 -2
- package/dist/application/event-sourcing/erased-value.d.ts +11 -0
- package/dist/application/event-sourcing/erased-value.d.ts.map +1 -0
- package/dist/application/event-sourcing/erased-value.js +2 -0
- package/dist/application/event-sourcing/erased-value.js.map +1 -0
- package/dist/application/event-sourcing/index.d.ts +2 -0
- package/dist/application/event-sourcing/index.d.ts.map +1 -1
- package/dist/application/event-sourcing/index.js +2 -0
- package/dist/application/event-sourcing/index.js.map +1 -1
- package/dist/application/event-sourcing/is-erased-value.d.ts +4 -0
- package/dist/application/event-sourcing/is-erased-value.d.ts.map +1 -0
- package/dist/application/event-sourcing/is-erased-value.js +10 -0
- package/dist/application/event-sourcing/is-erased-value.js.map +1 -0
- package/dist/application/event-sourcing/stored-event-data.d.ts +21 -0
- package/dist/application/event-sourcing/stored-event-data.d.ts.map +1 -1
- package/dist/application/event-sourcing/stored-event-data.js +39 -1
- package/dist/application/event-sourcing/stored-event-data.js.map +1 -1
- package/dist/application/persistence/optimistic-update.d.ts +5 -3
- package/dist/application/persistence/optimistic-update.d.ts.map +1 -1
- package/dist/application/persistence/optimistic-update.js +10 -4
- package/dist/application/persistence/optimistic-update.js.map +1 -1
- package/dist/application/personal-data/index.d.ts +1 -0
- package/dist/application/personal-data/index.d.ts.map +1 -1
- package/dist/application/personal-data/index.js +1 -0
- package/dist/application/personal-data/index.js.map +1 -1
- package/dist/application/personal-data/personal-data-record-event.d.ts +9 -0
- package/dist/application/personal-data/personal-data-record-event.d.ts.map +1 -0
- package/dist/application/personal-data/personal-data-record-event.js +2 -0
- package/dist/application/personal-data/personal-data-record-event.js.map +1 -0
- package/dist/application/personal-data/personal-data-record.d.ts +5 -0
- package/dist/application/personal-data/personal-data-record.d.ts.map +1 -1
- package/dist/domain/errors/index.d.ts +1 -0
- package/dist/domain/errors/index.d.ts.map +1 -1
- package/dist/domain/errors/index.js +1 -0
- package/dist/domain/errors/index.js.map +1 -1
- package/dist/domain/errors/unique-violation-error.d.ts +14 -0
- package/dist/domain/errors/unique-violation-error.d.ts.map +1 -0
- package/dist/domain/errors/unique-violation-error.js +14 -0
- package/dist/domain/errors/unique-violation-error.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/domain-events/within-unit-of-work.d.ts +3 -1
- package/dist/infrastructure/domain-events/within-unit-of-work.d.ts.map +1 -1
- package/dist/infrastructure/domain-events/within-unit-of-work.js +13 -2
- package/dist/infrastructure/domain-events/within-unit-of-work.js.map +1 -1
- package/dist/infrastructure/event-sourcing/event-store-personal-data-export.d.ts +41 -0
- package/dist/infrastructure/event-sourcing/event-store-personal-data-export.d.ts.map +1 -0
- package/dist/infrastructure/event-sourcing/event-store-personal-data-export.js +72 -0
- package/dist/infrastructure/event-sourcing/event-store-personal-data-export.js.map +1 -0
- package/dist/infrastructure/event-sourcing/personal-data-cipher.d.ts +13 -1
- package/dist/infrastructure/event-sourcing/personal-data-cipher.d.ts.map +1 -1
- package/dist/infrastructure/event-sourcing/personal-data-cipher.js +65 -9
- package/dist/infrastructure/event-sourcing/personal-data-cipher.js.map +1 -1
- package/dist/infrastructure/event-sourcing/subject-values.d.ts +6 -0
- package/dist/infrastructure/event-sourcing/subject-values.d.ts.map +1 -0
- package/dist/infrastructure/event-sourcing/subject-values.js +2 -0
- package/dist/infrastructure/event-sourcing/subject-values.js.map +1 -0
- package/dist/infrastructure/persistence/has-driver-code.d.ts +3 -4
- package/dist/infrastructure/persistence/has-driver-code.d.ts.map +1 -1
- package/dist/infrastructure/persistence/has-driver-code.js +5 -13
- package/dist/infrastructure/persistence/has-driver-code.js.map +1 -1
- package/dist/infrastructure/persistence/has-driver-error.d.ts +6 -0
- package/dist/infrastructure/persistence/has-driver-error.d.ts.map +1 -0
- package/dist/infrastructure/persistence/has-driver-error.js +13 -0
- package/dist/infrastructure/persistence/has-driver-error.js.map +1 -0
- package/dist/infrastructure/persistence/is-transaction-timeout.d.ts +2 -0
- package/dist/infrastructure/persistence/is-transaction-timeout.d.ts.map +1 -0
- package/dist/infrastructure/persistence/is-transaction-timeout.js +16 -0
- package/dist/infrastructure/persistence/is-transaction-timeout.js.map +1 -0
- package/dist/infrastructure/persistence/is-unique-violation.d.ts +3 -0
- package/dist/infrastructure/persistence/is-unique-violation.d.ts.map +1 -0
- package/dist/infrastructure/persistence/is-unique-violation.js +28 -0
- package/dist/infrastructure/persistence/is-unique-violation.js.map +1 -0
- package/dist/infrastructure/persistence/transaction-timeout-error.d.ts +14 -0
- package/dist/infrastructure/persistence/transaction-timeout-error.d.ts.map +1 -0
- package/dist/infrastructure/persistence/transaction-timeout-error.js +17 -0
- package/dist/infrastructure/persistence/transaction-timeout-error.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/** The code of a unit of work the database could not serve in time: answered 503, to try again later. */
|
|
2
|
+
export const SERVICE_UNAVAILABLE = 'SERVICE_UNAVAILABLE';
|
|
3
|
+
/**
|
|
4
|
+
* The unit of work got no transaction in time, every connection of the pool being busy, or ran
|
|
5
|
+
* past the time its ORM allows a transaction: `P2028` and `P2024` of Prisma, the
|
|
6
|
+
* `KnexTimeoutError` of the pool of Knex. A saturation of the infrastructure, not a business
|
|
7
|
+
* refusal: a retry may succeed, a circuit breaker counts it, the error reporting sees it.
|
|
8
|
+
* Nothing of it committed. The error of the driver is the `cause`.
|
|
9
|
+
*/
|
|
10
|
+
export class TransactionTimeoutError extends Error {
|
|
11
|
+
code = SERVICE_UNAVAILABLE;
|
|
12
|
+
constructor(cause) {
|
|
13
|
+
super('The database gave the unit of work no transaction in time, or ended it for running too long', { cause });
|
|
14
|
+
this.name = 'TransactionTimeoutError';
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=transaction-timeout-error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transaction-timeout-error.js","sourceRoot":"","sources":["../../../src/infrastructure/persistence/transaction-timeout-error.ts"],"names":[],"mappings":"AAAA,yGAAyG;AACzG,MAAM,CAAC,MAAM,mBAAmB,GAAG,qBAAqB,CAAC;AAEzD;;;;;;GAMG;AACH,MAAM,OAAO,uBAAwB,SAAQ,KAAK;IACvC,IAAI,GAAG,mBAAmB,CAAC;IAEpC,YAAY,KAAc;QACxB,KAAK,CAAC,6FAA6F,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;QAChH,IAAI,CAAC,IAAI,GAAG,yBAAyB,CAAC;IACxC,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ddd-ts-kit/kernel",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.104.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",
|