@ddd-ts-kit/kernel 0.114.1 → 0.116.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 +74 -60
- package/README.md +68 -55
- package/dist/application/audit/restamped.d.ts +9 -0
- package/dist/application/audit/restamped.d.ts.map +1 -0
- package/dist/application/audit/restamped.js +9 -0
- package/dist/application/audit/restamped.js.map +1 -0
- package/dist/application/audit/stamp-update.d.ts +1 -6
- package/dist/application/audit/stamp-update.d.ts.map +1 -1
- package/dist/application/audit/stamp-update.js +2 -8
- package/dist/application/audit/stamp-update.js.map +1 -1
- package/dist/application/background/enqueued-job.d.ts +1 -1
- package/dist/application/background/enqueued-job.d.ts.map +1 -1
- package/dist/application/error-reporting/report-once.d.ts.map +1 -1
- package/dist/application/error-reporting/report-once.js +2 -6
- package/dist/application/error-reporting/report-once.js.map +1 -1
- package/dist/application/event-sourcing/event-envelope.d.ts +2 -1
- package/dist/application/event-sourcing/event-envelope.d.ts.map +1 -1
- package/dist/application/event-sourcing/event-to-append.d.ts +1 -1
- package/dist/application/event-sourcing/event-to-append.d.ts.map +1 -1
- package/dist/application/execution/with-actor.d.ts +2 -2
- package/dist/application/execution/with-actor.js +3 -3
- package/dist/application/execution/with-actor.js.map +1 -1
- package/dist/application/files/stored-file.d.ts +3 -3
- package/dist/application/files/stored-file.d.ts.map +1 -1
- package/dist/application/hydration/hydration.d.ts.map +1 -1
- package/dist/application/hydration/hydration.js +3 -2
- package/dist/application/hydration/hydration.js.map +1 -1
- package/dist/application/logging/hidden-keys.d.ts +8 -0
- package/dist/application/logging/hidden-keys.d.ts.map +1 -0
- package/dist/application/logging/hidden-keys.js +10 -0
- package/dist/application/logging/hidden-keys.js.map +1 -0
- package/dist/application/logging/index.d.ts +1 -0
- package/dist/application/logging/index.d.ts.map +1 -1
- package/dist/application/logging/index.js +1 -0
- package/dist/application/logging/index.js.map +1 -1
- package/dist/application/observation/safely.d.ts +6 -0
- package/dist/application/observation/safely.d.ts.map +1 -0
- package/dist/application/observation/safely.js +13 -0
- package/dist/application/observation/safely.js.map +1 -0
- package/dist/application/persistence/append-changes.d.ts +1 -0
- package/dist/application/persistence/append-changes.d.ts.map +1 -1
- package/dist/application/persistence/append-changes.js +7 -6
- package/dist/application/persistence/append-changes.js.map +1 -1
- package/dist/application/persistence/optimistic-update.d.ts +6 -2
- package/dist/application/persistence/optimistic-update.d.ts.map +1 -1
- package/dist/application/persistence/optimistic-update.js +11 -3
- package/dist/application/persistence/optimistic-update.js.map +1 -1
- package/dist/application/ports/domain-event-dispatcher.d.ts +1 -1
- package/dist/application/ports/domain-event-dispatcher.js +1 -1
- package/dist/application/ports/logger.d.ts +3 -3
- package/dist/application/ports/unit-of-work.d.ts +1 -1
- package/dist/application/ports/unit-of-work.js +1 -1
- package/dist/application/read-model/stamp-of.d.ts +11 -4
- package/dist/application/read-model/stamp-of.d.ts.map +1 -1
- package/dist/application/read-model/stamp-of.js +10 -8
- package/dist/application/read-model/stamp-of.js.map +1 -1
- package/dist/application/session/anonymous-session.d.ts.map +1 -1
- package/dist/application/session/anonymous-session.js +4 -2
- package/dist/application/session/anonymous-session.js.map +1 -1
- package/dist/application/session/never-issued.d.ts +2 -1
- package/dist/application/session/never-issued.d.ts.map +1 -1
- package/dist/application/session/never-issued.js +4 -1
- package/dist/application/session/never-issued.js.map +1 -1
- package/dist/application/session/system-session.d.ts.map +1 -1
- package/dist/application/session/system-session.js +2 -2
- package/dist/application/session/system-session.js.map +1 -1
- package/dist/application/undecided/index.d.ts +3 -0
- package/dist/application/undecided/index.d.ts.map +1 -0
- package/dist/application/undecided/index.js +3 -0
- package/dist/application/undecided/index.js.map +1 -0
- package/dist/application/undecided/undecided-error.d.ts +12 -0
- package/dist/application/undecided/undecided-error.d.ts.map +1 -0
- package/dist/application/undecided/undecided-error.js +15 -0
- package/dist/application/undecided/undecided-error.js.map +1 -0
- package/dist/application/undecided/undecided.d.ts +7 -0
- package/dist/application/undecided/undecided.d.ts.map +1 -0
- package/dist/application/undecided/undecided.js +9 -0
- package/dist/application/undecided/undecided.js.map +1 -0
- package/dist/domain/aggregate-root.d.ts +6 -13
- package/dist/domain/aggregate-root.d.ts.map +1 -1
- package/dist/domain/aggregate-root.js +10 -16
- package/dist/domain/aggregate-root.js.map +1 -1
- package/dist/domain/aggregate-tracking.d.ts +30 -0
- package/dist/domain/aggregate-tracking.d.ts.map +1 -0
- package/dist/domain/aggregate-tracking.js +48 -0
- package/dist/domain/aggregate-tracking.js.map +1 -0
- package/dist/domain/domain-event.d.ts +4 -0
- package/dist/domain/domain-event.d.ts.map +1 -1
- package/dist/domain/domain-event.js.map +1 -1
- package/dist/domain/errors/domain-error.d.ts.map +1 -1
- package/dist/domain/errors/domain-error.js +2 -1
- package/dist/domain/errors/domain-error.js.map +1 -1
- package/dist/domain/errors/factual-refusal.d.ts.map +1 -1
- package/dist/domain/errors/factual-refusal.js +3 -0
- package/dist/domain/errors/factual-refusal.js.map +1 -1
- package/dist/domain/errors/kit-codes.d.ts +2 -0
- package/dist/domain/errors/kit-codes.d.ts.map +1 -1
- package/dist/domain/errors/kit-codes.js +2 -0
- package/dist/domain/errors/kit-codes.js.map +1 -1
- package/dist/domain/event-id-of.d.ts +8 -0
- package/dist/domain/event-id-of.d.ts.map +1 -0
- package/dist/domain/event-id-of.js +10 -0
- package/dist/domain/event-id-of.js.map +1 -0
- package/dist/domain/event-rank.d.ts +8 -0
- package/dist/domain/event-rank.d.ts.map +1 -0
- package/dist/domain/event-rank.js +8 -0
- package/dist/domain/event-rank.js.map +1 -0
- package/dist/domain/event-sourcing/event-sourced-aggregate.d.ts +0 -1
- package/dist/domain/event-sourcing/event-sourced-aggregate.d.ts.map +1 -1
- package/dist/domain/event-sourcing/event-sourced-aggregate.js +4 -8
- package/dist/domain/event-sourcing/event-sourced-aggregate.js.map +1 -1
- package/dist/domain/named-domain-event.d.ts +11 -4
- package/dist/domain/named-domain-event.d.ts.map +1 -1
- package/dist/domain/named-domain-event.js +14 -3
- package/dist/domain/named-domain-event.js.map +1 -1
- package/dist/domain/rank-of.d.ts +8 -0
- package/dist/domain/rank-of.d.ts.map +1 -0
- package/dist/domain/rank-of.js +14 -0
- package/dist/domain/rank-of.js.map +1 -0
- package/dist/domain/ranked.d.ts +10 -0
- package/dist/domain/ranked.d.ts.map +1 -0
- package/dist/domain/ranked.js +19 -0
- package/dist/domain/ranked.js.map +1 -0
- package/dist/domain/result/unwrap.d.ts +1 -0
- package/dist/domain/result/unwrap.d.ts.map +1 -1
- package/dist/domain/result/unwrap.js +4 -1
- package/dist/domain/result/unwrap.js.map +1 -1
- package/dist/domain/state-machine/state-machine.d.ts +4 -0
- package/dist/domain/state-machine/state-machine.d.ts.map +1 -1
- package/dist/domain/state-machine/state-machine.js +14 -4
- package/dist/domain/state-machine/state-machine.js.map +1 -1
- package/dist/domain/value-object/frozen-copy.d.ts +8 -0
- package/dist/domain/value-object/frozen-copy.d.ts.map +1 -0
- package/dist/domain/value-object/frozen-copy.js +34 -0
- package/dist/domain/value-object/frozen-copy.js.map +1 -0
- package/dist/domain/value-object/index.d.ts +2 -0
- package/dist/domain/value-object/index.d.ts.map +1 -0
- package/dist/domain/value-object/index.js +2 -0
- package/dist/domain/value-object/index.js.map +1 -0
- package/dist/domain/value-object/is-plain-record.d.ts +3 -0
- package/dist/domain/value-object/is-plain-record.d.ts.map +1 -0
- package/dist/domain/value-object/is-plain-record.js +9 -0
- package/dist/domain/value-object/is-plain-record.js.map +1 -0
- package/dist/domain/value-object/same-value.d.ts +8 -0
- package/dist/domain/value-object/same-value.d.ts.map +1 -0
- package/dist/domain/value-object/same-value.js +43 -0
- package/dist/domain/value-object/same-value.js.map +1 -0
- package/dist/domain/value-object/value-object.d.ts +28 -0
- package/dist/domain/value-object/value-object.d.ts.map +1 -0
- package/dist/domain/value-object/value-object.js +24 -0
- package/dist/domain/value-object/value-object.js.map +1 -0
- package/dist/index.d.ts +10 -12
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -12
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/aggregates/aggregate-mapper.d.ts +21 -0
- package/dist/infrastructure/aggregates/aggregate-mapper.d.ts.map +1 -0
- package/dist/infrastructure/aggregates/aggregate-mapper.js +18 -0
- package/dist/infrastructure/aggregates/aggregate-mapper.js.map +1 -0
- package/dist/infrastructure/aggregates/aggregate-save.d.ts +22 -0
- package/dist/infrastructure/aggregates/aggregate-save.d.ts.map +1 -0
- package/dist/infrastructure/aggregates/aggregate-save.js +2 -0
- package/dist/infrastructure/aggregates/aggregate-save.js.map +1 -0
- package/dist/infrastructure/aggregates/as-found.d.ts +8 -0
- package/dist/infrastructure/aggregates/as-found.d.ts.map +1 -0
- package/dist/infrastructure/aggregates/as-found.js +2 -0
- package/dist/infrastructure/aggregates/as-found.js.map +1 -0
- package/dist/infrastructure/aggregates/give-back.d.ts +9 -0
- package/dist/infrastructure/aggregates/give-back.d.ts.map +1 -0
- package/dist/infrastructure/aggregates/give-back.js +13 -0
- package/dist/infrastructure/aggregates/give-back.js.map +1 -0
- package/dist/infrastructure/aggregates/index.d.ts +7 -0
- package/dist/infrastructure/aggregates/index.d.ts.map +1 -0
- package/dist/infrastructure/aggregates/index.js +7 -0
- package/dist/infrastructure/aggregates/index.js.map +1 -0
- package/dist/infrastructure/aggregates/loaded-at.d.ts +8 -0
- package/dist/infrastructure/aggregates/loaded-at.d.ts.map +1 -0
- package/dist/infrastructure/aggregates/loaded-at.js +12 -0
- package/dist/infrastructure/aggregates/loaded-at.js.map +1 -0
- package/dist/infrastructure/aggregates/noted-as-found.d.ts +8 -0
- package/dist/infrastructure/aggregates/noted-as-found.d.ts.map +1 -0
- package/dist/infrastructure/aggregates/noted-as-found.js +15 -0
- package/dist/infrastructure/aggregates/noted-as-found.js.map +1 -0
- package/dist/infrastructure/aggregates/recorded-events-of.d.ts +4 -0
- package/dist/infrastructure/aggregates/recorded-events-of.d.ts.map +1 -0
- package/dist/infrastructure/aggregates/recorded-events-of.js +6 -0
- package/dist/infrastructure/aggregates/recorded-events-of.js.map +1 -0
- package/dist/infrastructure/aggregates/save-aggregate-row.d.ts +23 -0
- package/dist/infrastructure/aggregates/save-aggregate-row.d.ts.map +1 -0
- package/dist/infrastructure/aggregates/save-aggregate-row.js +17 -0
- package/dist/infrastructure/aggregates/save-aggregate-row.js.map +1 -0
- package/dist/infrastructure/aggregates/stored-at.d.ts +7 -0
- package/dist/infrastructure/aggregates/stored-at.d.ts.map +1 -0
- package/dist/infrastructure/aggregates/stored-at.js +14 -0
- package/dist/infrastructure/aggregates/stored-at.js.map +1 -0
- package/dist/infrastructure/aggregates/take-recorded-events.d.ts +9 -0
- package/dist/infrastructure/aggregates/take-recorded-events.d.ts.map +1 -0
- package/dist/infrastructure/aggregates/take-recorded-events.js +17 -0
- package/dist/infrastructure/aggregates/take-recorded-events.js.map +1 -0
- package/dist/infrastructure/aggregates/unstored-events-of.d.ts +4 -0
- package/dist/infrastructure/aggregates/unstored-events-of.d.ts.map +1 -0
- package/dist/infrastructure/aggregates/unstored-events-of.js +7 -0
- package/dist/infrastructure/aggregates/unstored-events-of.js.map +1 -0
- package/dist/infrastructure/clock/fixed-clock.d.ts +2 -1
- package/dist/infrastructure/clock/fixed-clock.d.ts.map +1 -1
- package/dist/infrastructure/clock/fixed-clock.js +5 -4
- package/dist/infrastructure/clock/fixed-clock.js.map +1 -1
- package/dist/infrastructure/context/scoped-actor-context.d.ts.map +1 -1
- package/dist/infrastructure/context/scoped-actor-context.js +2 -6
- package/dist/infrastructure/context/scoped-actor-context.js.map +1 -1
- package/dist/infrastructure/domain-events/announce-domain-events.d.ts +1 -1
- package/dist/infrastructure/domain-events/announce-domain-events.js +1 -1
- package/dist/infrastructure/domain-events/dispatching-on-save.d.ts +1 -1
- package/dist/infrastructure/domain-events/dispatching-on-save.d.ts.map +1 -1
- package/dist/infrastructure/domain-events/dispatching-on-save.js +3 -2
- package/dist/infrastructure/domain-events/dispatching-on-save.js.map +1 -1
- package/dist/infrastructure/domain-events/index.d.ts +14 -0
- package/dist/infrastructure/domain-events/index.d.ts.map +1 -0
- package/dist/infrastructure/domain-events/index.js +14 -0
- package/dist/infrastructure/domain-events/index.js.map +1 -0
- package/dist/infrastructure/domain-events/on-rollback.d.ts +10 -0
- package/dist/infrastructure/domain-events/on-rollback.d.ts.map +1 -0
- package/dist/infrastructure/domain-events/on-rollback.js +17 -0
- package/dist/infrastructure/domain-events/on-rollback.js.map +1 -0
- package/dist/infrastructure/domain-events/recorded-aggregates.d.ts +2 -5
- package/dist/infrastructure/domain-events/recorded-aggregates.d.ts.map +1 -1
- package/dist/infrastructure/domain-events/recorded-aggregates.js +3 -5
- package/dist/infrastructure/domain-events/recorded-aggregates.js.map +1 -1
- package/dist/infrastructure/domain-events/unit-of-work-aborted-error.d.ts +10 -0
- package/dist/infrastructure/domain-events/unit-of-work-aborted-error.d.ts.map +1 -0
- package/dist/infrastructure/domain-events/unit-of-work-aborted-error.js +13 -0
- package/dist/infrastructure/domain-events/unit-of-work-aborted-error.js.map +1 -0
- package/dist/infrastructure/domain-events/unit-of-work-over.d.ts +37 -0
- package/dist/infrastructure/domain-events/unit-of-work-over.d.ts.map +1 -0
- package/dist/infrastructure/domain-events/unit-of-work-over.js +146 -0
- package/dist/infrastructure/domain-events/unit-of-work-over.js.map +1 -0
- package/dist/infrastructure/domain-events/unit-of-work-scope.d.ts +11 -1
- package/dist/infrastructure/domain-events/unit-of-work-scope.d.ts.map +1 -1
- package/dist/infrastructure/domain-events/unit-of-work-scope.js.map +1 -1
- package/dist/infrastructure/domain-events/unscoped-unit-of-work-error.d.ts +8 -0
- package/dist/infrastructure/domain-events/unscoped-unit-of-work-error.d.ts.map +1 -0
- package/dist/infrastructure/domain-events/unscoped-unit-of-work-error.js +11 -0
- package/dist/infrastructure/domain-events/unscoped-unit-of-work-error.js.map +1 -0
- package/dist/infrastructure/domain-events/when-committed.d.ts.map +1 -1
- package/dist/infrastructure/domain-events/when-committed.js +2 -9
- package/dist/infrastructure/domain-events/when-committed.js.map +1 -1
- package/dist/infrastructure/event-sourcing/aggregate-id-of.d.ts +4 -0
- package/dist/infrastructure/event-sourcing/aggregate-id-of.d.ts.map +1 -0
- package/dist/infrastructure/event-sourcing/aggregate-id-of.js +6 -0
- package/dist/infrastructure/event-sourcing/aggregate-id-of.js.map +1 -0
- package/dist/infrastructure/event-sourcing/event-serializer.d.ts +3 -4
- package/dist/infrastructure/event-sourcing/event-serializer.d.ts.map +1 -1
- package/dist/infrastructure/event-sourcing/event-serializer.js +10 -12
- package/dist/infrastructure/event-sourcing/event-serializer.js.map +1 -1
- package/dist/infrastructure/event-sourcing/event-store-personal-data-export.d.ts.map +1 -1
- package/dist/infrastructure/event-sourcing/event-store-personal-data-export.js +1 -5
- package/dist/infrastructure/event-sourcing/event-store-personal-data-export.js.map +1 -1
- package/dist/infrastructure/events/idempotent.d.ts.map +1 -1
- package/dist/infrastructure/events/idempotent.js +9 -3
- package/dist/infrastructure/events/idempotent.js.map +1 -1
- package/dist/infrastructure/in-memory/as-json-carries.d.ts +9 -0
- package/dist/infrastructure/in-memory/as-json-carries.d.ts.map +1 -0
- package/dist/infrastructure/in-memory/as-json-carries.js +12 -0
- package/dist/infrastructure/in-memory/as-json-carries.js.map +1 -0
- package/dist/infrastructure/in-memory/composite-key.d.ts +6 -0
- package/dist/infrastructure/in-memory/composite-key.d.ts.map +1 -0
- package/dist/infrastructure/in-memory/composite-key.js +8 -0
- package/dist/infrastructure/in-memory/composite-key.js.map +1 -0
- package/dist/infrastructure/in-memory/in-memory-cache.d.ts +3 -1
- package/dist/infrastructure/in-memory/in-memory-cache.d.ts.map +1 -1
- package/dist/infrastructure/in-memory/in-memory-cache.js +7 -3
- package/dist/infrastructure/in-memory/in-memory-cache.js.map +1 -1
- package/dist/infrastructure/in-memory/in-memory-checkpoint-store.d.ts +1 -1
- package/dist/infrastructure/in-memory/in-memory-checkpoint-store.d.ts.map +1 -1
- package/dist/infrastructure/in-memory/in-memory-checkpoint-store.js +3 -2
- package/dist/infrastructure/in-memory/in-memory-checkpoint-store.js.map +1 -1
- package/dist/infrastructure/in-memory/in-memory-domain-event-dispatcher.d.ts +0 -1
- package/dist/infrastructure/in-memory/in-memory-domain-event-dispatcher.d.ts.map +1 -1
- package/dist/infrastructure/in-memory/in-memory-domain-event-dispatcher.js +2 -9
- package/dist/infrastructure/in-memory/in-memory-domain-event-dispatcher.js.map +1 -1
- package/dist/infrastructure/in-memory/in-memory-event-bus.d.ts +7 -14
- package/dist/infrastructure/in-memory/in-memory-event-bus.d.ts.map +1 -1
- package/dist/infrastructure/in-memory/in-memory-event-bus.js +17 -9
- package/dist/infrastructure/in-memory/in-memory-event-bus.js.map +1 -1
- package/dist/infrastructure/in-memory/in-memory-event-store.d.ts +8 -2
- package/dist/infrastructure/in-memory/in-memory-event-store.d.ts.map +1 -1
- package/dist/infrastructure/in-memory/in-memory-event-store.js +29 -14
- package/dist/infrastructure/in-memory/in-memory-event-store.js.map +1 -1
- package/dist/infrastructure/in-memory/in-memory-process-store.d.ts +1 -1
- package/dist/infrastructure/in-memory/in-memory-process-store.d.ts.map +1 -1
- package/dist/infrastructure/in-memory/in-memory-process-store.js +7 -8
- package/dist/infrastructure/in-memory/in-memory-process-store.js.map +1 -1
- package/dist/infrastructure/in-memory/in-memory-processed-event-store.d.ts +1 -0
- package/dist/infrastructure/in-memory/in-memory-processed-event-store.d.ts.map +1 -1
- package/dist/infrastructure/in-memory/in-memory-processed-event-store.js +6 -6
- package/dist/infrastructure/in-memory/in-memory-processed-event-store.js.map +1 -1
- package/dist/infrastructure/in-memory/in-memory-read-model-table.d.ts +2 -1
- package/dist/infrastructure/in-memory/in-memory-read-model-table.d.ts.map +1 -1
- package/dist/infrastructure/in-memory/in-memory-read-model-table.js +5 -3
- package/dist/infrastructure/in-memory/in-memory-read-model-table.js.map +1 -1
- package/dist/infrastructure/in-memory/in-memory-snapshot-store.d.ts +1 -1
- package/dist/infrastructure/in-memory/in-memory-snapshot-store.d.ts.map +1 -1
- package/dist/infrastructure/in-memory/in-memory-snapshot-store.js +3 -2
- package/dist/infrastructure/in-memory/in-memory-snapshot-store.js.map +1 -1
- package/dist/infrastructure/in-memory/in-memory-unit-of-work.d.ts +5 -2
- package/dist/infrastructure/in-memory/in-memory-unit-of-work.d.ts.map +1 -1
- package/dist/infrastructure/in-memory/in-memory-unit-of-work.js +7 -4
- package/dist/infrastructure/in-memory/in-memory-unit-of-work.js.map +1 -1
- package/dist/infrastructure/in-memory/in-process-bus.d.ts +1 -0
- package/dist/infrastructure/in-memory/in-process-bus.d.ts.map +1 -1
- package/dist/infrastructure/in-memory/in-process-bus.js +4 -3
- package/dist/infrastructure/in-memory/in-process-bus.js.map +1 -1
- package/dist/infrastructure/in-memory/rollback-map.d.ts +15 -0
- package/dist/infrastructure/in-memory/rollback-map.d.ts.map +1 -0
- package/dist/infrastructure/in-memory/rollback-map.js +52 -0
- package/dist/infrastructure/in-memory/rollback-map.js.map +1 -0
- package/dist/infrastructure/in-memory/unit-of-work-middleware.d.ts +5 -5
- package/dist/infrastructure/in-memory/unit-of-work-middleware.d.ts.map +1 -1
- package/dist/infrastructure/in-memory/unit-of-work-middleware.js +13 -4
- package/dist/infrastructure/in-memory/unit-of-work-middleware.js.map +1 -1
- package/package.json +1 -1
- package/dist/domain/event-sourcing/unstored-events.d.ts +0 -8
- package/dist/domain/event-sourcing/unstored-events.d.ts.map +0 -1
- package/dist/domain/event-sourcing/unstored-events.js +0 -7
- package/dist/domain/event-sourcing/unstored-events.js.map +0 -1
- package/dist/domain/value-object.d.ts +0 -12
- package/dist/domain/value-object.d.ts.map +0 -1
- package/dist/domain/value-object.js +0 -40
- package/dist/domain/value-object.js.map +0 -1
- package/dist/infrastructure/domain-events/within-unit-of-work.d.ts +0 -25
- package/dist/infrastructure/domain-events/within-unit-of-work.d.ts.map +0 -1
- package/dist/infrastructure/domain-events/within-unit-of-work.js +0 -85
- package/dist/infrastructure/domain-events/within-unit-of-work.js.map +0 -1
- package/dist/infrastructure/event-sourcing/stored-origins.d.ts +0 -5
- package/dist/infrastructure/event-sourcing/stored-origins.d.ts.map +0 -1
- package/dist/infrastructure/event-sourcing/stored-origins.js +0 -3
- package/dist/infrastructure/event-sourcing/stored-origins.js.map +0 -1
- package/dist/infrastructure/event-sourcing/stored-stamp-of.d.ts +0 -11
- package/dist/infrastructure/event-sourcing/stored-stamp-of.d.ts.map +0 -1
- package/dist/infrastructure/event-sourcing/stored-stamp-of.js +0 -15
- package/dist/infrastructure/event-sourcing/stored-stamp-of.js.map +0 -1
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Immutable, compared by value, valid at construction. Subclass with a private constructor and
|
|
3
|
-
* a `create` factory that validates, then returns the value object or throws the refusal of its
|
|
4
|
-
* concept (or returns a `Result`, in a project that says `"stack.valueObjects": "result"`).
|
|
5
|
-
*/
|
|
6
|
-
export class ValueObject {
|
|
7
|
-
props;
|
|
8
|
-
constructor(props) {
|
|
9
|
-
this.props = Object.freeze({ ...props });
|
|
10
|
-
}
|
|
11
|
-
equals(other) {
|
|
12
|
-
if (other === undefined || other === null || other.constructor !== this.constructor) {
|
|
13
|
-
return false;
|
|
14
|
-
}
|
|
15
|
-
return structurallyEqual(this.props, other.props);
|
|
16
|
-
}
|
|
17
|
-
toJSON() {
|
|
18
|
-
return this.props;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
function structurallyEqual(a, b) {
|
|
22
|
-
if (Object.is(a, b)) {
|
|
23
|
-
return true;
|
|
24
|
-
}
|
|
25
|
-
if (a instanceof Date && b instanceof Date) {
|
|
26
|
-
return a.getTime() === b.getTime();
|
|
27
|
-
}
|
|
28
|
-
if (Array.isArray(a) && Array.isArray(b)) {
|
|
29
|
-
return a.length === b.length && a.every((item, i) => structurallyEqual(item, b[i]));
|
|
30
|
-
}
|
|
31
|
-
if (isRecord(a) && isRecord(b)) {
|
|
32
|
-
const keys = Object.keys(a);
|
|
33
|
-
return keys.length === Object.keys(b).length && keys.every((key) => key in b && structurallyEqual(a[key], b[key]));
|
|
34
|
-
}
|
|
35
|
-
return false;
|
|
36
|
-
}
|
|
37
|
-
function isRecord(value) {
|
|
38
|
-
return typeof value === 'object' && value !== null;
|
|
39
|
-
}
|
|
40
|
-
//# sourceMappingURL=value-object.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"value-object.js","sourceRoot":"","sources":["../../src/domain/value-object.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,OAAgB,WAAW;IACZ,KAAK,CAAkB;IAE1C,YAAsB,KAAY;QAChC,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,GAAG,KAAK,EAAE,CAAC,CAAC;IAC3C,CAAC;IAED,MAAM,CAAC,KAA4C;QACjD,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,CAAC,WAAW,KAAK,IAAI,CAAC,WAAW,EAAE,CAAC;YACpF,OAAO,KAAK,CAAC;QACf,CAAC;QAED,OAAO,iBAAiB,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IACpD,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;CACF;AAED,SAAS,iBAAiB,CAAC,CAAU,EAAE,CAAU;IAC/C,IAAI,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;QACpB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY,IAAI,EAAE,CAAC;QAC3C,OAAO,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC;IACrC,CAAC;IAED,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;QACzC,OAAO,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,iBAAiB,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACtF,CAAC;IAED,IAAI,QAAQ,CAAC,CAAC,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;QAC/B,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAE5B,OAAO,IAAI,CAAC,MAAM,KAAK,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,IAAI,CAAC,IAAI,iBAAiB,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IACrH,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,CAAC;AACrD,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* What every `UnitOfWork.run` is made of. `transaction` runs what it is given atomically: it
|
|
3
|
-
* begins, calls it, and commits when it resolved or rolls back when it rejected.
|
|
4
|
-
*
|
|
5
|
-
* The domain events of the aggregates saved by `work` wait in the scope of this unit of work,
|
|
6
|
-
* in recording order across the saves. Once `work` has returned they are dispatched, still
|
|
7
|
-
* inside `transaction`: the handlers see every save, and what they save or append to the outbox
|
|
8
|
-
* commits with the rest. A handler that fails, like `work` that fails, rejects the whole: the
|
|
9
|
-
* transaction rolls back, the waiting events are dropped and never come back on the aggregates.
|
|
10
|
-
* The steps handed to `atCommit` are applied last, still inside `transaction`; when it rejects,
|
|
11
|
-
* those applied are undone. Once `transaction` has resolved, and only then, the `after-commit`
|
|
12
|
-
* handlers run, then the work handed to `afterCommit`.
|
|
13
|
-
*
|
|
14
|
-
* A deadlock or a serialization failure the database raised anywhere in the transaction, on the
|
|
15
|
-
* statement it chose, rejects the outermost unit of work as a `TransactionConflictError`, a
|
|
16
|
-
* `ConcurrencyError` whose `cause` is the error of the driver: the caller runs it again. A
|
|
17
|
-
* transaction its ORM could not start in time, the pool being busy, or ended for running too
|
|
18
|
-
* long rejects it as a `TransactionTimeoutError` (`SERVICE_UNAVAILABLE`), the same way.
|
|
19
|
-
*
|
|
20
|
-
* Called inside a unit of work already running on the same asynchronous call chain it joins it:
|
|
21
|
-
* `transaction(work)` and nothing else, so one dispatch, at the end of the outermost. Two
|
|
22
|
-
* concurrent calls never share a scope.
|
|
23
|
-
*/
|
|
24
|
-
export declare function withinUnitOfWork<T>(work: () => Promise<T>, transaction: (work: () => Promise<T>) => Promise<T>): Promise<T>;
|
|
25
|
-
//# sourceMappingURL=within-unit-of-work.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"within-unit-of-work.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/domain-events/within-unit-of-work.ts"],"names":[],"mappings":"AASA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAsB,gBAAgB,CAAC,CAAC,EACtC,IAAI,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACtB,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,GAClD,OAAO,CAAC,CAAC,CAAC,CAsBZ"}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { TransactionConflictError } from '../../domain/errors/transaction-conflict-error.js';
|
|
2
|
-
import { isTransactionConflict } from '../persistence/is-transaction-conflict.js';
|
|
3
|
-
import { isTransactionTimeout } from '../persistence/is-transaction-timeout.js';
|
|
4
|
-
import { TransactionTimeoutError } from '../persistence/transaction-timeout-error.js';
|
|
5
|
-
import { dispatchAfterCommit } from './dispatch-after-commit.js';
|
|
6
|
-
import { dispatchBeforeCommit } from './dispatch-before-commit.js';
|
|
7
|
-
import { unitOfWorkScope } from './unit-of-work-scope.js';
|
|
8
|
-
/**
|
|
9
|
-
* What every `UnitOfWork.run` is made of. `transaction` runs what it is given atomically: it
|
|
10
|
-
* begins, calls it, and commits when it resolved or rolls back when it rejected.
|
|
11
|
-
*
|
|
12
|
-
* The domain events of the aggregates saved by `work` wait in the scope of this unit of work,
|
|
13
|
-
* in recording order across the saves. Once `work` has returned they are dispatched, still
|
|
14
|
-
* inside `transaction`: the handlers see every save, and what they save or append to the outbox
|
|
15
|
-
* commits with the rest. A handler that fails, like `work` that fails, rejects the whole: the
|
|
16
|
-
* transaction rolls back, the waiting events are dropped and never come back on the aggregates.
|
|
17
|
-
* The steps handed to `atCommit` are applied last, still inside `transaction`; when it rejects,
|
|
18
|
-
* those applied are undone. Once `transaction` has resolved, and only then, the `after-commit`
|
|
19
|
-
* handlers run, then the work handed to `afterCommit`.
|
|
20
|
-
*
|
|
21
|
-
* A deadlock or a serialization failure the database raised anywhere in the transaction, on the
|
|
22
|
-
* statement it chose, rejects the outermost unit of work as a `TransactionConflictError`, a
|
|
23
|
-
* `ConcurrencyError` whose `cause` is the error of the driver: the caller runs it again. A
|
|
24
|
-
* transaction its ORM could not start in time, the pool being busy, or ended for running too
|
|
25
|
-
* long rejects it as a `TransactionTimeoutError` (`SERVICE_UNAVAILABLE`), the same way.
|
|
26
|
-
*
|
|
27
|
-
* Called inside a unit of work already running on the same asynchronous call chain it joins it:
|
|
28
|
-
* `transaction(work)` and nothing else, so one dispatch, at the end of the outermost. Two
|
|
29
|
-
* concurrent calls never share a scope.
|
|
30
|
-
*/
|
|
31
|
-
export async function withinUnitOfWork(work, transaction) {
|
|
32
|
-
if (isRunning(unitOfWorkScope.getStore())) {
|
|
33
|
-
return transaction(work);
|
|
34
|
-
}
|
|
35
|
-
const scope = openScope();
|
|
36
|
-
const applied = [];
|
|
37
|
-
const result = await unitOfWorkScope
|
|
38
|
-
.run(scope, () => transaction(() => thenDispatched(work, scope, applied)))
|
|
39
|
-
.catch(async (error) => {
|
|
40
|
-
await undone(applied);
|
|
41
|
-
throw translated(error);
|
|
42
|
-
})
|
|
43
|
-
.finally(() => {
|
|
44
|
-
scope.stage = 'closed';
|
|
45
|
-
scope.queue.length = 0;
|
|
46
|
-
});
|
|
47
|
-
await afterTheCommit(scope);
|
|
48
|
-
return result;
|
|
49
|
-
}
|
|
50
|
-
/** What the database said of the transaction, in the words of the kernel; any other failure as it is. */
|
|
51
|
-
function translated(error) {
|
|
52
|
-
if (isTransactionConflict(error)) {
|
|
53
|
-
return new TransactionConflictError(error);
|
|
54
|
-
}
|
|
55
|
-
return isTransactionTimeout(error) ? new TransactionTimeoutError(error) : error;
|
|
56
|
-
}
|
|
57
|
-
function isRunning(scope) {
|
|
58
|
-
return scope?.kind === 'unit-of-work' && (scope.stage === 'open' || scope.stage === 'before-commit');
|
|
59
|
-
}
|
|
60
|
-
function openScope() {
|
|
61
|
-
return { kind: 'unit-of-work', stage: 'open', queue: [], dispatched: [], committed: [], atCommit: [] };
|
|
62
|
-
}
|
|
63
|
-
async function thenDispatched(work, scope, applied) {
|
|
64
|
-
const result = await work();
|
|
65
|
-
await dispatchBeforeCommit(scope);
|
|
66
|
-
for (const step of scope.atCommit ?? []) {
|
|
67
|
-
await step.apply();
|
|
68
|
-
applied.push(step);
|
|
69
|
-
}
|
|
70
|
-
return result;
|
|
71
|
-
}
|
|
72
|
-
/** Newest first; an undo that fails reported itself, and the others still run. */
|
|
73
|
-
async function undone(applied) {
|
|
74
|
-
for (const step of [...applied].reverse()) {
|
|
75
|
-
await step.undo().catch(() => undefined);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
/** The `after-commit` handlers, then the work handed to `afterCommit`; a rejection is dropped, the work reported its own. */
|
|
79
|
-
async function afterTheCommit(scope) {
|
|
80
|
-
await dispatchAfterCommit(scope);
|
|
81
|
-
for (const work of scope.committed ?? []) {
|
|
82
|
-
await work().catch(() => undefined);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
//# sourceMappingURL=within-unit-of-work.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"within-unit-of-work.js","sourceRoot":"","sources":["../../../src/infrastructure/domain-events/within-unit-of-work.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { StoredEvent } from '../../application/event-sourcing/stored-event.js';
|
|
2
|
-
import type { DomainEvent } from '../../domain/domain-event.js';
|
|
3
|
-
/** The stored event each domain event was read from, for `storedStampOf`. */
|
|
4
|
-
export declare const storedOrigins: WeakMap<DomainEvent, StoredEvent>;
|
|
5
|
-
//# sourceMappingURL=stored-origins.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"stored-origins.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/event-sourcing/stored-origins.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AACjF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAE7D,6EAA6E;AAC7E,eAAO,MAAM,aAAa,mCAA0C,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"stored-origins.js","sourceRoot":"","sources":["../../../src/infrastructure/event-sourcing/stored-origins.ts"],"names":[],"mappings":"AAGA,6EAA6E;AAC7E,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,OAAO,EAA4B,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { EventStamp } from '../../application/read-model/event-stamp.js';
|
|
2
|
-
import type { DomainEvent } from '../../domain/domain-event.js';
|
|
3
|
-
/**
|
|
4
|
-
* The stamp of a domain event read from an event store, for the row of a read model it changes:
|
|
5
|
-
* the id of the stored event, its instant and its version in its stream, so that the rows of one
|
|
6
|
-
* stream are ordered by the stream and not by clocks. `undefined` for an event that was not read
|
|
7
|
-
* from a store (dispatched by a save): a projection fed both ways falls back to `stampOf`,
|
|
8
|
-
* and its keys should then see one kind of stamp each, since two kinds are ordered by their instants.
|
|
9
|
-
*/
|
|
10
|
-
export declare function storedStampOf(event: DomainEvent): EventStamp | undefined;
|
|
11
|
-
//# sourceMappingURL=stored-stamp-of.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"stored-stamp-of.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/event-sourcing/stored-stamp-of.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AAC3E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAG7D;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,WAAW,GAAG,UAAU,GAAG,SAAS,CAMxE"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { storedOrigins } from './stored-origins.js';
|
|
2
|
-
/**
|
|
3
|
-
* The stamp of a domain event read from an event store, for the row of a read model it changes:
|
|
4
|
-
* the id of the stored event, its instant and its version in its stream, so that the rows of one
|
|
5
|
-
* stream are ordered by the stream and not by clocks. `undefined` for an event that was not read
|
|
6
|
-
* from a store (dispatched by a save): a projection fed both ways falls back to `stampOf`,
|
|
7
|
-
* and its keys should then see one kind of stamp each, since two kinds are ordered by their instants.
|
|
8
|
-
*/
|
|
9
|
-
export function storedStampOf(event) {
|
|
10
|
-
const stored = storedOrigins.get(event);
|
|
11
|
-
return stored === undefined
|
|
12
|
-
? undefined
|
|
13
|
-
: { eventId: stored.id, occurredAt: stored.occurredAt, version: stored.version };
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=stored-stamp-of.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"stored-stamp-of.js","sourceRoot":"","sources":["../../../src/infrastructure/event-sourcing/stored-stamp-of.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD;;;;;;GAMG;AACH,MAAM,UAAU,aAAa,CAAC,KAAkB;IAC9C,MAAM,MAAM,GAAG,aAAa,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAExC,OAAO,MAAM,KAAK,SAAS;QACzB,CAAC,CAAC,SAAS;QACX,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,EAAE,UAAU,EAAE,MAAM,CAAC,UAAU,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC;AACrF,CAAC"}
|