@shirudo/ddd-kit 3.0.0-rc.5 → 3.0.0-rc.6
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/dist/chunks/ports.js +82 -16
- package/dist/chunks/ports.js.map +1 -1
- package/dist/index.d.ts +49 -8
- package/dist/index.js +121 -65
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -2031,9 +2031,11 @@ declare abstract class Entity<TState, TId extends Id<string>> implements IEntity
|
|
|
2031
2031
|
* `TState` publicly would expose the aggregate's live object graph and
|
|
2032
2032
|
* let nested mutation bypass behavior, validation, versioning, and
|
|
2033
2033
|
* dirty tracking. Concrete entities should expose business-meaningful queries or
|
|
2034
|
-
* detached immutable DTOs.
|
|
2035
|
-
*
|
|
2036
|
-
*
|
|
2034
|
+
* detached immutable DTOs (`deepFreeze(detachState(this.state))` for a
|
|
2035
|
+
* plain-data state). Snapshot projection belongs to the persistence
|
|
2036
|
+
* adapter, which captures the aggregate from outside through those
|
|
2037
|
+
* queries and DTOs rather than asking the entity to create its own
|
|
2038
|
+
* persistence memento.
|
|
2037
2039
|
*/
|
|
2038
2040
|
protected get state(): TState;
|
|
2039
2041
|
/**
|
|
@@ -3159,9 +3161,12 @@ declare function deepFreeze<T>(obj: T): Readonly<T>;
|
|
|
3159
3161
|
* The input is first deep-cloned, then the clone is frozen, so calling
|
|
3160
3162
|
* `vo(input)` never freezes the caller's own object graph as a
|
|
3161
3163
|
* side-effect. Mutating the input afterwards does not bleed into the VO.
|
|
3162
|
-
* Symbol-keyed properties are preserved (matching `voEquals`)
|
|
3163
|
-
*
|
|
3164
|
-
*
|
|
3164
|
+
* Symbol-keyed properties are preserved (matching `voEquals`). A kit
|
|
3165
|
+
* `ValueObject` instance nested in the input is kept by reference and
|
|
3166
|
+
* frozen in place; it must keep all of its state in `props`. A value
|
|
3167
|
+
* object as the input itself is rejected.
|
|
3168
|
+
* Function values and every other custom class instance are rejected
|
|
3169
|
+
* (Value Objects are plain data, not behaviour-bearing object graphs). Inputs must be trusted and
|
|
3165
3170
|
* Proxy-free: ECMAScript provides no portable way to identify a transparent
|
|
3166
3171
|
* Proxy without potentially executing its traps, so `vo()` is not a sandbox
|
|
3167
3172
|
* for hostile in-process objects. Built-ins that cannot provide immutable,
|
|
@@ -3212,6 +3217,11 @@ declare function voEquals<T>(a: VO<T>, b: VO<T>): boolean;
|
|
|
3212
3217
|
* Useful for comparing value objects that contain metadata or optional fields
|
|
3213
3218
|
* that should not affect equality comparison.
|
|
3214
3219
|
*
|
|
3220
|
+
* The walk enters a nested `ValueObject` instance like any other object,
|
|
3221
|
+
* so inside it the path continues with `props`; `ignoreKeys: ["props"]`
|
|
3222
|
+
* empties every nested value object. The key under which the kit records
|
|
3223
|
+
* the class of the instance is never ignored.
|
|
3224
|
+
*
|
|
3215
3225
|
* @param a - First value object
|
|
3216
3226
|
* @param b - Second value object
|
|
3217
3227
|
* @param options - Options specifying which keys to ignore during comparison
|
|
@@ -3310,7 +3320,11 @@ interface IValueObject<T extends object> {
|
|
|
3310
3320
|
}
|
|
3311
3321
|
/**
|
|
3312
3322
|
* Abstract base class for creating Value Objects.
|
|
3313
|
-
* Value Objects are immutable and defined by their properties.
|
|
3323
|
+
* Value Objects are immutable and defined by their properties. A value
|
|
3324
|
+
* object can hold other value objects in its props. Every instance
|
|
3325
|
+
* records its class under an own symbol key, so `equals` compares a
|
|
3326
|
+
* nested value object by class and props and does not call its `equals`
|
|
3327
|
+
* method.
|
|
3314
3328
|
*
|
|
3315
3329
|
* @template T - The shape of the value object's properties
|
|
3316
3330
|
*/
|
|
@@ -3431,6 +3445,33 @@ declare function voValidated<T>(t: T, validate: (issues: ValidationError, value:
|
|
|
3431
3445
|
*/
|
|
3432
3446
|
declare function deepEqual(a: unknown, b: unknown): boolean;
|
|
3433
3447
|
//#endregion
|
|
3448
|
+
//#region src/internal/structural/detach-state.d.ts
|
|
3449
|
+
/**
|
|
3450
|
+
* Returns a copy of `state` that shares no object with the original.
|
|
3451
|
+
* Throws a `TypeError` that names the path when the graph carries a value
|
|
3452
|
+
* a structured clone would lose or silently degrade. A class instance, a
|
|
3453
|
+
* subclass of a built-in included, loses the methods on its prototype. A
|
|
3454
|
+
* symbol-keyed, non-enumerable, or accessor property and an expando on a
|
|
3455
|
+
* built-in are dropped. A function or a symbol value throws a raw
|
|
3456
|
+
* `DataCloneError`. An Error, a Promise, a WeakMap, or a WeakSet cannot be
|
|
3457
|
+
* detached at all. A SharedArrayBuffer and a view over one keep sharing
|
|
3458
|
+
* their memory. A Proxy is invisible to the walk and fails inside the
|
|
3459
|
+
* clone; that failure is rethrown as a `TypeError` with the cause.
|
|
3460
|
+
*
|
|
3461
|
+
* Plain objects (from any realm), arrays, Dates, Maps, Sets, bigints, and
|
|
3462
|
+
* typed arrays pass. A RegExp passes: pattern and flags survive the clone,
|
|
3463
|
+
* and `lastIndex` restores as 0. The scan state of a global or sticky
|
|
3464
|
+
* pattern is not domain data. A non-enumerable property on a built-in
|
|
3465
|
+
* passes: it is the built-in's own machinery (`lastIndex`), not data. A
|
|
3466
|
+
* non-enumerable symbol key passes anywhere: it is metadata by convention.
|
|
3467
|
+
*
|
|
3468
|
+
* The concrete entity uses it for a detached read DTO of a plain-data
|
|
3469
|
+
* state. The snapshot model uses it for the captured DTO and the restored
|
|
3470
|
+
* state. A state that carries a class-based child is mapped to plain data
|
|
3471
|
+
* first, in the entity or in the model.
|
|
3472
|
+
*/
|
|
3473
|
+
declare function detachState<T>(state: T): T;
|
|
3474
|
+
//#endregion
|
|
3434
3475
|
//#region src/messaging/event-bus/errors.d.ts
|
|
3435
3476
|
/**
|
|
3436
3477
|
* Thrown when one publish chain reaches `maxPublishDepth`.
|
|
@@ -4222,5 +4263,5 @@ declare function captureAggregateSnapshot<TAggregate extends SnapshotAggregate,
|
|
|
4222
4263
|
*/
|
|
4223
4264
|
declare function reconstituteAggregateFromSnapshot<TAggregate extends SnapshotAggregate, TSnapshotState>(model: SnapshotModel<TAggregate, TSnapshotState>, id: TAggregate["id"], snapshot: AggregateSnapshot<unknown>): TAggregate;
|
|
4224
4265
|
//#endregion
|
|
4225
|
-
export { type Aggregate, type AggregateAddress, type AggregateAddressMismatchOptions, type AggregateClass, type AggregateCommitToken, type AggregateConfig, AggregateDeletedError, AggregateNotFoundError, type AggregateNotFoundErrorOptions, type AggregatePersistence, type AggregatePersistenceWrite, type AggregateSnapshot, AggregateTrackingError, type AggregateTrackingFailure, type AggregateWriteIntent, type AggregateWriteRegistration, type AnyDomainEvent, type AnyUncommittedDomainEvent, CapabilityRegistryConflictError, type ClockFactory, type Command, CommandBus, type CommandBusOptions, type CommandCommitOriginCandidate, type CommandHandler, type CommandMessageContent, type CommandMessageRelationships, type CommandOutboxCommitCandidate, type CommandOutboxMapper, type CommandOutboxWriter, type CommitEnrollment, type CommitEnrollmentOptions, CommitError, type CommitPosition, type CommittedDomainEvent, type CompatibleRepositoryDefinitions, ConcurrencyConflictError, type ConcurrencyConflictErrorOptions, type CreateDomainEventFromFactsOptions, type CreateDomainEventOptions, type CreateDomainEventStampOptions, type CreateUncommittedDomainEventOptions, type DeadLetterDeadline, type DeadLetterRecord, DeadlineProcessor, type DeadlineProcessorObservers, type DeadlineProcessorOptions, type DeadlineStore, type DeepEqualExceptOptions, type DeepOmitKey, type DeepOmitOptions, type DeepOmitPathSegment, type DeliveryFailureAssessment, type DeliveryFailureClassifier, type DeliveryFailureKind, DirectStateMutationError, type DispatchTrackingOutbox, DomainError, type DomainErrorClass, type DomainEvent, type DomainEventFactory, type DomainEventFactoryOptions, type DomainEventStamp, type DomainEventStampFactory, type DomainEventStampProvider, type DomainEventValidationCode, DomainEventValidationError, type DomainEventValidationField, type DomainMachineDefinition, type DomainMachineDefinitionAnalysis, type DomainMachineDefinitionDiagnostic, type DomainMachineInput, type DomainMachineReadonly, type DomainMachineSnapshot, type DomainMachineTransitionDescription, DomainStateMachine, type DomainStateNode, type DomainTransition, DomainTransitionGuardRejectedError, type DomainTransitionGuardResult, type DomainTransitionOutcome, type DomainTransitionResult, type DueDeadline, DuplicateAggregateError, type DuplicateAggregateErrorOptions, DuplicateEventIdError, DuplicateHandlerRegistrationError, type DuplicateHandlerRegistrationErrorOptions, type DurableCommandMessage, Entity, type EntityConfig, ErrorMapperFailedError, type ErrorMapperFailedErrorOptions, type EventBus, EventBusClosedError, EventBusImpl, type EventBusObservers, type EventBusOptions, type EventCommitCandidate, type EventCommitCandidatePosition, type EventHandler, EventHarvestError, type EventIdFactory, type EventMetadata, EventSourcedAggregate, type EventStore, type EventStoreAppendOptions, type ExecutionContext, FoldReturnedNoStateError, ForeignEventError, type HandlerFailureReport, HostileStateKeyError, type ICommandBus, type IEntity, type IQueryBus, type IValueObject, type Id, type IdGenerator, type IdempotencyClaim, type IdempotencyClaimHandle, IdempotencyClaimLostError, type IdempotencyClaimLostErrorOptions, IdempotencyCompletionWithoutClaimError, IdempotencyInFlightError, type IdempotencyInFlightErrorOptions, IdempotencyKeyReuseError, type IdempotencyKeyReuseErrorOptions, type IdempotencyLease, type IdempotencyOperationErrorContext, type IdempotencyReconciliation, type IdempotencyReconciliationDecision, IdempotencyReconciliationRequiredError, type IdempotencyReconciliationRequiredErrorOptions, type IdempotencyStore, type IdempotentCommitRequest, type IdempotentCommitResult, type IdempotentExecution, type Identifiable, IdentityMap, InMemoryCapacityExceededError, type InMemoryCapacityExceededErrorOptions, InMemoryDeadlineStore, type InMemoryDeadlineStoreOptions, InMemoryEventStore, type InMemoryEventStoreOptions, InMemoryIdempotencyStore, type InMemoryIdempotencyStoreOptions, InMemoryOutbox, type InMemoryOutboxOptions, InMemoryProjectionCheckpointStore, type InMemoryProjectionCheckpointStoreOptions, InMemorySnapshotStore, type InMemorySnapshotStoreOptions, InfrastructureError, type IntegrationMessage, type IntegrationMessageContent, type IntegrationMessageMapper, type IntegrationMessageRelationships, InvalidCommandMessageError, InvalidDomainMachineContextError, InvalidDomainMachineDefinitionError, InvalidDomainMachineInputError, InvalidDomainMachineSnapshotError, InvalidDomainTransitionError, InvalidDomainTransitionGuardResultError, InvalidDomainTransitionResultError, InvalidIntegrationMessageError, InvalidRepositoryAdapterError, InvalidRepositoryDefinitionError, InvalidVersionError, type JsonObject, type JsonPrimitive, type JsonValue, type KitErrorCode, type KitErrorOptions, MisaddressedEventError, MissingEntityIdError, MissingFoldError, MissingHandlerError, NestedUnitOfWorkError, NonProgressingEventStreamPageError, type NonProgressingEventStreamPageErrorOptions, type OnceOptions, type Outbox, OutboxDispatcher, type OutboxDispatcherObservers, type OutboxDispatcherOptions, type OutboxRecord, type OutboxSink, type OutboxWriter, type PendingDomainEvent, PendingEventBatchMismatchError, PendingEventLimitExceededError, type PendingEventLimitExceededErrorOptions, type PersistenceBaseline, type PersistenceChanges, type PersistenceLifecycle, type PersistenceModel, type PhysicalRemovalRegistration, type PreparedDomainMachineDefinition, type ProjectOptions, type Projection, type ProjectionBatchResult, type ProjectionCheckpoint, type ProjectionCheckpointStore, type ProjectionEventHandler, type ProjectionFromHandlersOptions, ProjectionGapError, type ProjectionHandlers, ProjectionIdentityViolationError, ProjectionOrderViolationError, type ProjectionPosition, ProjectionReceiptViolationError, Projector, type ProjectorOptions, type PublishAbortedReport, type PublishChainState, type PublishChainStore, PublishDepthExceededError, type PublishOptions, type PublishedCommand, type Query, QueryBus, type QueryBusOptions, type QueryHandler, type ReadStreamOptions, ReentrantDomainStateMachineEvaluationError, ReentrantEventRecordingError, ReplayHeadMismatchError, type ReplayHeadMismatchErrorOptions, type ReplayableAggregate, type RepositoriesOf, type Repository, type RepositoryDefinition, type RepositoryDefinitionOptions, RepositoryErrorMappingFailedError, type RepositoryTracking, type RetryPolicy, RetryingTransactionScope, RollbackError, type RunOptions, type SharedDomainEventStampOptions, SnapshotCorruptedError, type SnapshotModel, SnapshotSchemaMismatchError, type SnapshotSchemaMismatchErrorOptions, type SnapshotStore, SnapshotTimeValidationError, SnapshotVersionNotRestoredError, type SnapshotVersionNotRestoredErrorOptions, Specification, type SpecificationComposite, StateStoredAggregate, type StateValidator, type StreamReadResult, type SubscriptionThresholdReport, TransactionClosedError, type TransactionScope, type TransactionalOptions, type UncommittedDomainEvent, type UncommittedDomainEventOf, UnenrolledChangesError, UnitOfWork, type UnitOfWorkContext, type UnitOfWorkDeps, type UnitOfWorkIdentityMap, UnmanagedInstanceError, UnmintedEventError, UnprojectableEventError, UnregisteredHandlerError, type UnregisteredHandlerErrorOptions, UnreplayableAggregateError, type VO, ValueObject, type Version, type WithCommitDeps, type WithCommitWorkResult, type WithIdempotentCommitDeps, analyzeDomainMachineDefinition, canTransitionDomainState, captureAggregateSnapshot, capturePersistenceBaseline, copyMetadata, createDomainEvent, createDomainEventFactory, createDomainEventFromFacts, createInitialDomainMachineSnapshot, createIntegrationMessage, createUncommittedDomainEvent, decodeIntegrationMessage, deepEqual, deepEqualExcept, deepFreeze, deepOmit, defaultDomainEventFactory, defineRepository, defineSnapshotModel, derivePersistenceChanges, domainErrorToResult, encodeIntegrationMessage, entityIds, eventBusSink, findEntityById, freezeShallow, hasEntityId, ignoreProjectionEvent, insertPersistenceBaseline, integrationMessageToCommittedEvent, isDomainErrorLike, isInfrastructureErrorLike, isPositionAfter, mergeMetadata, outboxWriterAcceptingEventLoss, persistenceProjectionDrifted, prepareDomainMachineDefinition, projectionFromHandlers, recapturePersistenceBaseline, reconstituteAggregateFromHistory, reconstituteAggregateFromSnapshot, recordDomainEvent, recordPendingEvents, removeEntityById, replaceEntityById, routeEventsToCommandOutbox, sameEntity, sameVersion, specification, toVersion, transitionDomainState, updateEntityById, vo, voEquals, voEqualsExcept, voValidated, voWithValidation, withCommit, withIdempotentCommit };
|
|
4266
|
+
export { type Aggregate, type AggregateAddress, type AggregateAddressMismatchOptions, type AggregateClass, type AggregateCommitToken, type AggregateConfig, AggregateDeletedError, AggregateNotFoundError, type AggregateNotFoundErrorOptions, type AggregatePersistence, type AggregatePersistenceWrite, type AggregateSnapshot, AggregateTrackingError, type AggregateTrackingFailure, type AggregateWriteIntent, type AggregateWriteRegistration, type AnyDomainEvent, type AnyUncommittedDomainEvent, CapabilityRegistryConflictError, type ClockFactory, type Command, CommandBus, type CommandBusOptions, type CommandCommitOriginCandidate, type CommandHandler, type CommandMessageContent, type CommandMessageRelationships, type CommandOutboxCommitCandidate, type CommandOutboxMapper, type CommandOutboxWriter, type CommitEnrollment, type CommitEnrollmentOptions, CommitError, type CommitPosition, type CommittedDomainEvent, type CompatibleRepositoryDefinitions, ConcurrencyConflictError, type ConcurrencyConflictErrorOptions, type CreateDomainEventFromFactsOptions, type CreateDomainEventOptions, type CreateDomainEventStampOptions, type CreateUncommittedDomainEventOptions, type DeadLetterDeadline, type DeadLetterRecord, DeadlineProcessor, type DeadlineProcessorObservers, type DeadlineProcessorOptions, type DeadlineStore, type DeepEqualExceptOptions, type DeepOmitKey, type DeepOmitOptions, type DeepOmitPathSegment, type DeliveryFailureAssessment, type DeliveryFailureClassifier, type DeliveryFailureKind, DirectStateMutationError, type DispatchTrackingOutbox, DomainError, type DomainErrorClass, type DomainEvent, type DomainEventFactory, type DomainEventFactoryOptions, type DomainEventStamp, type DomainEventStampFactory, type DomainEventStampProvider, type DomainEventValidationCode, DomainEventValidationError, type DomainEventValidationField, type DomainMachineDefinition, type DomainMachineDefinitionAnalysis, type DomainMachineDefinitionDiagnostic, type DomainMachineInput, type DomainMachineReadonly, type DomainMachineSnapshot, type DomainMachineTransitionDescription, DomainStateMachine, type DomainStateNode, type DomainTransition, DomainTransitionGuardRejectedError, type DomainTransitionGuardResult, type DomainTransitionOutcome, type DomainTransitionResult, type DueDeadline, DuplicateAggregateError, type DuplicateAggregateErrorOptions, DuplicateEventIdError, DuplicateHandlerRegistrationError, type DuplicateHandlerRegistrationErrorOptions, type DurableCommandMessage, Entity, type EntityConfig, ErrorMapperFailedError, type ErrorMapperFailedErrorOptions, type EventBus, EventBusClosedError, EventBusImpl, type EventBusObservers, type EventBusOptions, type EventCommitCandidate, type EventCommitCandidatePosition, type EventHandler, EventHarvestError, type EventIdFactory, type EventMetadata, EventSourcedAggregate, type EventStore, type EventStoreAppendOptions, type ExecutionContext, FoldReturnedNoStateError, ForeignEventError, type HandlerFailureReport, HostileStateKeyError, type ICommandBus, type IEntity, type IQueryBus, type IValueObject, type Id, type IdGenerator, type IdempotencyClaim, type IdempotencyClaimHandle, IdempotencyClaimLostError, type IdempotencyClaimLostErrorOptions, IdempotencyCompletionWithoutClaimError, IdempotencyInFlightError, type IdempotencyInFlightErrorOptions, IdempotencyKeyReuseError, type IdempotencyKeyReuseErrorOptions, type IdempotencyLease, type IdempotencyOperationErrorContext, type IdempotencyReconciliation, type IdempotencyReconciliationDecision, IdempotencyReconciliationRequiredError, type IdempotencyReconciliationRequiredErrorOptions, type IdempotencyStore, type IdempotentCommitRequest, type IdempotentCommitResult, type IdempotentExecution, type Identifiable, IdentityMap, InMemoryCapacityExceededError, type InMemoryCapacityExceededErrorOptions, InMemoryDeadlineStore, type InMemoryDeadlineStoreOptions, InMemoryEventStore, type InMemoryEventStoreOptions, InMemoryIdempotencyStore, type InMemoryIdempotencyStoreOptions, InMemoryOutbox, type InMemoryOutboxOptions, InMemoryProjectionCheckpointStore, type InMemoryProjectionCheckpointStoreOptions, InMemorySnapshotStore, type InMemorySnapshotStoreOptions, InfrastructureError, type IntegrationMessage, type IntegrationMessageContent, type IntegrationMessageMapper, type IntegrationMessageRelationships, InvalidCommandMessageError, InvalidDomainMachineContextError, InvalidDomainMachineDefinitionError, InvalidDomainMachineInputError, InvalidDomainMachineSnapshotError, InvalidDomainTransitionError, InvalidDomainTransitionGuardResultError, InvalidDomainTransitionResultError, InvalidIntegrationMessageError, InvalidRepositoryAdapterError, InvalidRepositoryDefinitionError, InvalidVersionError, type JsonObject, type JsonPrimitive, type JsonValue, type KitErrorCode, type KitErrorOptions, MisaddressedEventError, MissingEntityIdError, MissingFoldError, MissingHandlerError, NestedUnitOfWorkError, NonProgressingEventStreamPageError, type NonProgressingEventStreamPageErrorOptions, type OnceOptions, type Outbox, OutboxDispatcher, type OutboxDispatcherObservers, type OutboxDispatcherOptions, type OutboxRecord, type OutboxSink, type OutboxWriter, type PendingDomainEvent, PendingEventBatchMismatchError, PendingEventLimitExceededError, type PendingEventLimitExceededErrorOptions, type PersistenceBaseline, type PersistenceChanges, type PersistenceLifecycle, type PersistenceModel, type PhysicalRemovalRegistration, type PreparedDomainMachineDefinition, type ProjectOptions, type Projection, type ProjectionBatchResult, type ProjectionCheckpoint, type ProjectionCheckpointStore, type ProjectionEventHandler, type ProjectionFromHandlersOptions, ProjectionGapError, type ProjectionHandlers, ProjectionIdentityViolationError, ProjectionOrderViolationError, type ProjectionPosition, ProjectionReceiptViolationError, Projector, type ProjectorOptions, type PublishAbortedReport, type PublishChainState, type PublishChainStore, PublishDepthExceededError, type PublishOptions, type PublishedCommand, type Query, QueryBus, type QueryBusOptions, type QueryHandler, type ReadStreamOptions, ReentrantDomainStateMachineEvaluationError, ReentrantEventRecordingError, ReplayHeadMismatchError, type ReplayHeadMismatchErrorOptions, type ReplayableAggregate, type RepositoriesOf, type Repository, type RepositoryDefinition, type RepositoryDefinitionOptions, RepositoryErrorMappingFailedError, type RepositoryTracking, type RetryPolicy, RetryingTransactionScope, RollbackError, type RunOptions, type SharedDomainEventStampOptions, SnapshotCorruptedError, type SnapshotModel, SnapshotSchemaMismatchError, type SnapshotSchemaMismatchErrorOptions, type SnapshotStore, SnapshotTimeValidationError, SnapshotVersionNotRestoredError, type SnapshotVersionNotRestoredErrorOptions, Specification, type SpecificationComposite, StateStoredAggregate, type StateValidator, type StreamReadResult, type SubscriptionThresholdReport, TransactionClosedError, type TransactionScope, type TransactionalOptions, type UncommittedDomainEvent, type UncommittedDomainEventOf, UnenrolledChangesError, UnitOfWork, type UnitOfWorkContext, type UnitOfWorkDeps, type UnitOfWorkIdentityMap, UnmanagedInstanceError, UnmintedEventError, UnprojectableEventError, UnregisteredHandlerError, type UnregisteredHandlerErrorOptions, UnreplayableAggregateError, type VO, ValueObject, type Version, type WithCommitDeps, type WithCommitWorkResult, type WithIdempotentCommitDeps, analyzeDomainMachineDefinition, canTransitionDomainState, captureAggregateSnapshot, capturePersistenceBaseline, copyMetadata, createDomainEvent, createDomainEventFactory, createDomainEventFromFacts, createInitialDomainMachineSnapshot, createIntegrationMessage, createUncommittedDomainEvent, decodeIntegrationMessage, deepEqual, deepEqualExcept, deepFreeze, deepOmit, defaultDomainEventFactory, defineRepository, defineSnapshotModel, derivePersistenceChanges, detachState, domainErrorToResult, encodeIntegrationMessage, entityIds, eventBusSink, findEntityById, freezeShallow, hasEntityId, ignoreProjectionEvent, insertPersistenceBaseline, integrationMessageToCommittedEvent, isDomainErrorLike, isInfrastructureErrorLike, isPositionAfter, mergeMetadata, outboxWriterAcceptingEventLoss, persistenceProjectionDrifted, prepareDomainMachineDefinition, projectionFromHandlers, recapturePersistenceBaseline, reconstituteAggregateFromHistory, reconstituteAggregateFromSnapshot, recordDomainEvent, recordPendingEvents, removeEntityById, replaceEntityById, routeEventsToCommandOutbox, sameEntity, sameVersion, specification, toVersion, transitionDomainState, updateEntityById, vo, voEquals, voEqualsExcept, voValidated, voWithValidation, withCommit, withIdempotentCommit };
|
|
4226
4267
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { A as NonProgressingEventStreamPageError, B as SnapshotSchemaMismatchError, C as InvalidIntegrationMessageError, D as MissingEntityIdError, E as MisaddressedEventError, F as ProjectionOrderViolationError, G as UnprojectableEventError, H as UnenrolledChangesError, I as ProjectionReceiptViolationError, J as assertNoHostileOwnProtoKey, K as UnregisteredHandlerError, L as ReentrantEventRecordingError, M as PendingEventLimitExceededError, N as ProjectionGapError, O as MissingFoldError, P as ProjectionIdentityViolationError, R as ReplayHeadMismatchError, S as InvalidCommandMessageError, T as KitWiringError, U as UnmanagedInstanceError, V as SnapshotVersionNotRestoredError, W as UnmintedEventError, X as isInfrastructureErrorLike, Y as isDomainErrorLike, _ as IdempotencyInFlightError, a as DirectStateMutationError, b as InMemoryCapacityExceededError, c as DuplicateEventIdError, d as EventHarvestError, f as FoldReturnedNoStateError, g as IdempotencyCompletionWithoutClaimError, h as IdempotencyClaimLostError, i as ConcurrencyConflictError, j as PendingEventBatchMismatchError, k as MissingHandlerError, l as DuplicateHandlerRegistrationError, m as HostileStateKeyError, n as AggregateNotFoundError, o as DomainError, p as ForeignEventError, q as UnreplayableAggregateError, r as CapabilityRegistryConflictError, s as DuplicateAggregateError, t as AggregateDeletedError, u as ErrorMapperFailedError, v as IdempotencyKeyReuseError, w as InvalidVersionError, x as InfrastructureError, y as IdempotencyReconciliationRequiredError, z as SnapshotCorruptedError } from "./chunks/kit-errors.js";
|
|
2
|
-
import { A as
|
|
2
|
+
import { A as isBuiltInObject, C as voWithValidation, D as builtInTagWithoutInvokingAccessors, E as deepEqual, M as isWeakMap, O as findPropertyDescriptor, S as voEqualsExcept, T as deepOmit, _ as stampCooperativeBrand, a as createDomainEvent, b as vo, c as createUncommittedDomainEvent, d as isUncommittedDomainEvent, f as mergeMetadata, g as hasCooperativeBrand, h as SnapshotTimeValidationError, i as copyMetadata, j as isIntrinsicConstructorPrototype, k as hasIntrinsicPrototypeChain, l as defaultDomainEventFactory, m as DomainEventValidationError, n as adoptRecordedDomainEvent, o as createDomainEventFactory, p as recordDomainEvent, r as adoptUncommittedDomainEvent, s as createDomainEventFromFacts, t as isDispatchTrackingOutbox, u as isRecordedDomainEvent, v as ValueObject, w as deepEqualExcept, x as voEquals, y as deepFreeze } from "./chunks/ports.js";
|
|
3
3
|
import { err, ok } from "@shirudo/result";
|
|
4
4
|
import { ValidationError, someChainRetryable } from "@shirudo/base-error";
|
|
5
5
|
|
|
@@ -3518,9 +3518,11 @@ var Entity = class {
|
|
|
3518
3518
|
* `TState` publicly would expose the aggregate's live object graph and
|
|
3519
3519
|
* let nested mutation bypass behavior, validation, versioning, and
|
|
3520
3520
|
* dirty tracking. Concrete entities should expose business-meaningful queries or
|
|
3521
|
-
* detached immutable DTOs.
|
|
3522
|
-
*
|
|
3523
|
-
*
|
|
3521
|
+
* detached immutable DTOs (`deepFreeze(detachState(this.state))` for a
|
|
3522
|
+
* plain-data state). Snapshot projection belongs to the persistence
|
|
3523
|
+
* adapter, which captures the aggregate from outside through those
|
|
3524
|
+
* queries and DTOs rather than asking the entity to create its own
|
|
3525
|
+
* persistence memento.
|
|
3524
3526
|
*/
|
|
3525
3527
|
get state() {
|
|
3526
3528
|
return this._state;
|
|
@@ -5327,6 +5329,117 @@ function voValidated(t, validate, message = "Validation failed") {
|
|
|
5327
5329
|
return issues.hasIssues() ? err(issues) : ok(vo(t));
|
|
5328
5330
|
}
|
|
5329
5331
|
|
|
5332
|
+
//#endregion
|
|
5333
|
+
//#region src/internal/structural/detach-state.ts
|
|
5334
|
+
/**
|
|
5335
|
+
* Returns a copy of `state` that shares no object with the original.
|
|
5336
|
+
* Throws a `TypeError` that names the path when the graph carries a value
|
|
5337
|
+
* a structured clone would lose or silently degrade. A class instance, a
|
|
5338
|
+
* subclass of a built-in included, loses the methods on its prototype. A
|
|
5339
|
+
* symbol-keyed, non-enumerable, or accessor property and an expando on a
|
|
5340
|
+
* built-in are dropped. A function or a symbol value throws a raw
|
|
5341
|
+
* `DataCloneError`. An Error, a Promise, a WeakMap, or a WeakSet cannot be
|
|
5342
|
+
* detached at all. A SharedArrayBuffer and a view over one keep sharing
|
|
5343
|
+
* their memory. A Proxy is invisible to the walk and fails inside the
|
|
5344
|
+
* clone; that failure is rethrown as a `TypeError` with the cause.
|
|
5345
|
+
*
|
|
5346
|
+
* Plain objects (from any realm), arrays, Dates, Maps, Sets, bigints, and
|
|
5347
|
+
* typed arrays pass. A RegExp passes: pattern and flags survive the clone,
|
|
5348
|
+
* and `lastIndex` restores as 0. The scan state of a global or sticky
|
|
5349
|
+
* pattern is not domain data. A non-enumerable property on a built-in
|
|
5350
|
+
* passes: it is the built-in's own machinery (`lastIndex`), not data. A
|
|
5351
|
+
* non-enumerable symbol key passes anywhere: it is metadata by convention.
|
|
5352
|
+
*
|
|
5353
|
+
* The concrete entity uses it for a detached read DTO of a plain-data
|
|
5354
|
+
* state. The snapshot model uses it for the captured DTO and the restored
|
|
5355
|
+
* state. A state that carries a class-based child is mapped to plain data
|
|
5356
|
+
* first, in the entity or in the model.
|
|
5357
|
+
*/
|
|
5358
|
+
function detachState(state) {
|
|
5359
|
+
assertDetachable(state, "", /* @__PURE__ */ new WeakSet());
|
|
5360
|
+
try {
|
|
5361
|
+
return structuredClone(state);
|
|
5362
|
+
} catch (cause) {
|
|
5363
|
+
throw new TypeError("detachState: state holds a Proxy or a host object that cannot be cloned; map it to plain data", { cause });
|
|
5364
|
+
}
|
|
5365
|
+
}
|
|
5366
|
+
const INDEX_KEY = /^(0|[1-9]\d*)$/;
|
|
5367
|
+
function assertDetachable(value, path, seen) {
|
|
5368
|
+
if (typeof value === "function") throw new TypeError(`detachState: state${path} is a function; map it to plain data`);
|
|
5369
|
+
if (typeof value === "symbol") throw new TypeError(`detachState: state${path} is a symbol; map it to plain data`);
|
|
5370
|
+
if (value === null || typeof value !== "object") return;
|
|
5371
|
+
const object = value;
|
|
5372
|
+
if (seen.has(object)) return;
|
|
5373
|
+
seen.add(object);
|
|
5374
|
+
if (Array.isArray(object)) {
|
|
5375
|
+
if (!hasIntrinsicPrototypeChain(object, "Array")) throwClassInstance(object, path);
|
|
5376
|
+
assertOwnPropertiesDetachable(object, path, seen, "array");
|
|
5377
|
+
return;
|
|
5378
|
+
}
|
|
5379
|
+
const tag = builtInTagWithoutInvokingAccessors(object);
|
|
5380
|
+
if (tag !== void 0) {
|
|
5381
|
+
if (!hasIntrinsicPrototypeChain(object)) throwClassInstance(object, path);
|
|
5382
|
+
if (tag === "[object Map]") {
|
|
5383
|
+
let index = 0;
|
|
5384
|
+
for (const [key, entry] of object) {
|
|
5385
|
+
assertDetachable(key, `${path}<map key #${index}>`, seen);
|
|
5386
|
+
assertDetachable(entry, `${path}<map value #${index}>`, seen);
|
|
5387
|
+
index++;
|
|
5388
|
+
}
|
|
5389
|
+
} else if (tag === "[object Set]") {
|
|
5390
|
+
let index = 0;
|
|
5391
|
+
for (const member of object) {
|
|
5392
|
+
assertDetachable(member, `${path}<set member #${index}>`, seen);
|
|
5393
|
+
index++;
|
|
5394
|
+
}
|
|
5395
|
+
} else if (tag === "[object Promise]" || tag === "[object WeakMap]" || tag === "[object WeakSet]") throw new TypeError(`detachState: state${path} is a ${tag.slice(8, -1)} and cannot be detached`);
|
|
5396
|
+
else if (tag === "[object Error]") throw new TypeError(`detachState: state${path} is an Error; map it to plain data`);
|
|
5397
|
+
else if (sharesMemory(object, tag)) throw new TypeError(`detachState: state${path} is backed by a SharedArrayBuffer and the copy would share its memory; map it to plain data`);
|
|
5398
|
+
assertOwnPropertiesDetachable(object, path, seen, "built-in");
|
|
5399
|
+
return;
|
|
5400
|
+
}
|
|
5401
|
+
const prototype = Object.getPrototypeOf(object);
|
|
5402
|
+
if (!(prototype === null || isIntrinsicConstructorPrototype(prototype, "Object") && Object.getPrototypeOf(prototype) === null)) throwClassInstance(object, path);
|
|
5403
|
+
assertOwnPropertiesDetachable(object, path, seen, "record");
|
|
5404
|
+
}
|
|
5405
|
+
/**
|
|
5406
|
+
* Audits the own properties the clone would copy or drop. The clone keeps
|
|
5407
|
+
* the enumerable own keys of a record and of an array, expandos included,
|
|
5408
|
+
* and drops every own key of another built-in. `length` on an array and
|
|
5409
|
+
* the non-enumerable keys of a built-in (`lastIndex`) are its own
|
|
5410
|
+
* machinery, not data. Index keys of a typed array or a boxed String are
|
|
5411
|
+
* its content and pass as such.
|
|
5412
|
+
*/
|
|
5413
|
+
function assertOwnPropertiesDetachable(object, path, seen, kind) {
|
|
5414
|
+
for (const key of Reflect.ownKeys(object)) {
|
|
5415
|
+
const descriptor = Object.getOwnPropertyDescriptor(object, key);
|
|
5416
|
+
if (descriptor === void 0) continue;
|
|
5417
|
+
if (typeof key === "symbol") {
|
|
5418
|
+
if (!descriptor.enumerable) continue;
|
|
5419
|
+
throw new TypeError(`detachState: state${path} has a symbol-keyed property; map it to plain data`);
|
|
5420
|
+
}
|
|
5421
|
+
if (kind === "array" && key === "length") continue;
|
|
5422
|
+
const isIndex = INDEX_KEY.test(key);
|
|
5423
|
+
if (!descriptor.enumerable) {
|
|
5424
|
+
if (kind === "built-in") continue;
|
|
5425
|
+
throw new TypeError(`detachState: state${path}.${key} is not enumerable and the clone would drop it; map it to plain data`);
|
|
5426
|
+
}
|
|
5427
|
+
if (kind === "built-in" && isIndex) continue;
|
|
5428
|
+
const memberPath = isIndex ? `${path}[${key}]` : `${path}.${key}`;
|
|
5429
|
+
if (!("value" in descriptor)) throw new TypeError(`detachState: state${memberPath} is an accessor property; map it to plain data`);
|
|
5430
|
+
if (kind === "built-in") throw new TypeError(`detachState: state${memberPath} is an expando on a ${object.constructor?.name ?? "built-in"} and the clone would drop it; map it to plain data`);
|
|
5431
|
+
assertDetachable(descriptor.value, memberPath, seen);
|
|
5432
|
+
}
|
|
5433
|
+
}
|
|
5434
|
+
function sharesMemory(object, tag) {
|
|
5435
|
+
if (tag === "[object SharedArrayBuffer]") return true;
|
|
5436
|
+
return ArrayBuffer.isView(object) && Object.prototype.toString.call(object.buffer) === "[object SharedArrayBuffer]";
|
|
5437
|
+
}
|
|
5438
|
+
function throwClassInstance(object, path) {
|
|
5439
|
+
const name = Object.getPrototypeOf(object)?.constructor?.name || "anonymous class";
|
|
5440
|
+
throw new TypeError(`detachState: state${path} is a class instance (${name}); map it to plain data`);
|
|
5441
|
+
}
|
|
5442
|
+
|
|
5330
5443
|
//#endregion
|
|
5331
5444
|
//#region src/messaging/event-bus/errors.ts
|
|
5332
5445
|
/** Keeps a deep chain readable in the message without losing the recent path. */
|
|
@@ -6907,7 +7020,7 @@ function defineSnapshotModel(model) {
|
|
|
6907
7020
|
function captureAggregateSnapshot(model, aggregate, snapshotAt) {
|
|
6908
7021
|
assertSnapshotModel(model);
|
|
6909
7022
|
const recordedAt = copySnapshotAt(snapshotAt);
|
|
6910
|
-
const state =
|
|
7023
|
+
const state = detachState(model.capture(aggregate));
|
|
6911
7024
|
return deepFreeze({
|
|
6912
7025
|
state,
|
|
6913
7026
|
version: aggregate.version,
|
|
@@ -6943,8 +7056,8 @@ function reconstituteAggregateFromSnapshot(model, id, snapshot) {
|
|
|
6943
7056
|
let aggregate;
|
|
6944
7057
|
try {
|
|
6945
7058
|
let state;
|
|
6946
|
-
if (storedSchemaVersion === model.schemaVersion) state =
|
|
6947
|
-
else if (model.migrate) state =
|
|
7059
|
+
if (storedSchemaVersion === model.schemaVersion) state = detachState(snapshot.state);
|
|
7060
|
+
else if (model.migrate) state = detachState(model.migrate(detachState(snapshot.state), storedSchemaVersion));
|
|
6948
7061
|
else throw new SnapshotSchemaMismatchError({
|
|
6949
7062
|
aggregateType: model.aggregateType,
|
|
6950
7063
|
aggregateId: String(id),
|
|
@@ -6974,64 +7087,7 @@ function copySnapshotAt(snapshotAt) {
|
|
|
6974
7087
|
if (!(snapshotAt instanceof Date) || !Number.isFinite(snapshotAt.getTime())) throw new SnapshotTimeValidationError();
|
|
6975
7088
|
return new Date(snapshotAt.getTime());
|
|
6976
7089
|
}
|
|
6977
|
-
function detachSnapshotState(state) {
|
|
6978
|
-
assertSnapshotSafe(state, "", /* @__PURE__ */ new WeakSet());
|
|
6979
|
-
return structuredClone(state);
|
|
6980
|
-
}
|
|
6981
|
-
/**
|
|
6982
|
-
* Rejects graphs that structured cloning would lose or silently degrade.
|
|
6983
|
-
* Snapshot models map class-based domain state to plain persistence DTOs.
|
|
6984
|
-
* A RegExp passes: pattern and flags survive the clone, and `lastIndex`
|
|
6985
|
-
* restores as 0. The scan state of a global or sticky pattern is not
|
|
6986
|
-
* domain data.
|
|
6987
|
-
*/
|
|
6988
|
-
function assertSnapshotSafe(value, path, seen) {
|
|
6989
|
-
if (typeof value === "function") throw new TypeError(`snapshot state${path} is a function; map it to serialisable data in the snapshot model`);
|
|
6990
|
-
if (typeof value === "symbol") throw new TypeError(`snapshot state${path} is a symbol; map it to serialisable data in the snapshot model`);
|
|
6991
|
-
if (value === null || typeof value !== "object") return;
|
|
6992
|
-
const object = value;
|
|
6993
|
-
if (seen.has(object)) return;
|
|
6994
|
-
seen.add(object);
|
|
6995
|
-
if (Array.isArray(object)) {
|
|
6996
|
-
for (let index = 0; index < object.length; index++) assertSnapshotSafe(object[index], `${path}[${index}]`, seen);
|
|
6997
|
-
return;
|
|
6998
|
-
}
|
|
6999
|
-
const tag = Object.prototype.toString.call(object);
|
|
7000
|
-
if (isBuiltInObject(object, tag)) {
|
|
7001
|
-
if (tag === "[object Map]") {
|
|
7002
|
-
let index = 0;
|
|
7003
|
-
for (const [key, entry] of object) {
|
|
7004
|
-
assertSnapshotSafe(key, `${path}<map key #${index}>`, seen);
|
|
7005
|
-
assertSnapshotSafe(entry, `${path}<map value #${index}>`, seen);
|
|
7006
|
-
index++;
|
|
7007
|
-
}
|
|
7008
|
-
return;
|
|
7009
|
-
}
|
|
7010
|
-
if (tag === "[object Set]") {
|
|
7011
|
-
let index = 0;
|
|
7012
|
-
for (const member of object) {
|
|
7013
|
-
assertSnapshotSafe(member, `${path}<set member #${index}>`, seen);
|
|
7014
|
-
index++;
|
|
7015
|
-
}
|
|
7016
|
-
return;
|
|
7017
|
-
}
|
|
7018
|
-
if (tag === "[object Promise]" || tag === "[object WeakMap]" || tag === "[object WeakSet]") throw new TypeError(`snapshot state${path} is a ${tag.slice(8, -1)} and cannot be persisted`);
|
|
7019
|
-
if (tag === "[object Error]") throw new TypeError(`snapshot state${path} is an Error; map it to plain data in the snapshot model`);
|
|
7020
|
-
return;
|
|
7021
|
-
}
|
|
7022
|
-
const prototype = Object.getPrototypeOf(object);
|
|
7023
|
-
if (prototype === Object.prototype || prototype === null) {
|
|
7024
|
-
for (const key of Reflect.ownKeys(object)) {
|
|
7025
|
-
if (!Object.getOwnPropertyDescriptor(object, key)?.enumerable) continue;
|
|
7026
|
-
if (typeof key === "symbol") throw new TypeError(`snapshot state${path} has a symbol-keyed property; map it to plain data in the snapshot model`);
|
|
7027
|
-
assertSnapshotSafe(object[key], `${path}.${key}`, seen);
|
|
7028
|
-
}
|
|
7029
|
-
return;
|
|
7030
|
-
}
|
|
7031
|
-
const name = prototype.constructor?.name || "anonymous class";
|
|
7032
|
-
throw new TypeError(`snapshot state${path} is a class instance (${name}); map it to plain data in the snapshot model`);
|
|
7033
|
-
}
|
|
7034
7090
|
|
|
7035
7091
|
//#endregion
|
|
7036
|
-
export { AggregateDeletedError, AggregateNotFoundError, AggregateTrackingError, CapabilityRegistryConflictError, CommandBus, CommitError, ConcurrencyConflictError, DeadlineProcessor, DirectStateMutationError, DomainError, DomainEventValidationError, DomainStateMachine, DomainTransitionGuardRejectedError, DuplicateAggregateError, DuplicateEventIdError, DuplicateHandlerRegistrationError, Entity, ErrorMapperFailedError, EventBusClosedError, EventBusImpl, EventHarvestError, EventSourcedAggregate, FoldReturnedNoStateError, ForeignEventError, HostileStateKeyError, IdempotencyClaimLostError, IdempotencyCompletionWithoutClaimError, IdempotencyInFlightError, IdempotencyKeyReuseError, IdempotencyReconciliationRequiredError, IdentityMap, InMemoryCapacityExceededError, InMemoryDeadlineStore, InMemoryEventStore, InMemoryIdempotencyStore, InMemoryOutbox, InMemoryProjectionCheckpointStore, InMemorySnapshotStore, InfrastructureError, InvalidCommandMessageError, InvalidDomainMachineContextError, InvalidDomainMachineDefinitionError, InvalidDomainMachineInputError, InvalidDomainMachineSnapshotError, InvalidDomainTransitionError, InvalidDomainTransitionGuardResultError, InvalidDomainTransitionResultError, InvalidIntegrationMessageError, InvalidRepositoryAdapterError, InvalidRepositoryDefinitionError, InvalidVersionError, MisaddressedEventError, MissingEntityIdError, MissingFoldError, MissingHandlerError, NestedUnitOfWorkError, NonProgressingEventStreamPageError, OutboxDispatcher, PendingEventBatchMismatchError, PendingEventLimitExceededError, ProjectionGapError, ProjectionIdentityViolationError, ProjectionOrderViolationError, ProjectionReceiptViolationError, Projector, PublishDepthExceededError, QueryBus, ReentrantDomainStateMachineEvaluationError, ReentrantEventRecordingError, ReplayHeadMismatchError, RepositoryErrorMappingFailedError, RetryingTransactionScope, RollbackError, SnapshotCorruptedError, SnapshotSchemaMismatchError, SnapshotTimeValidationError, SnapshotVersionNotRestoredError, Specification, StateStoredAggregate, TransactionClosedError, UnenrolledChangesError, UnitOfWork, UnmanagedInstanceError, UnmintedEventError, UnprojectableEventError, UnregisteredHandlerError, UnreplayableAggregateError, ValueObject, analyzeDomainMachineDefinition, canTransitionDomainState, captureAggregateSnapshot, capturePersistenceBaseline, copyMetadata, createDomainEvent, createDomainEventFactory, createDomainEventFromFacts, createInitialDomainMachineSnapshot, createIntegrationMessage, createUncommittedDomainEvent, decodeIntegrationMessage, deepEqual, deepEqualExcept, deepFreeze, deepOmit, defaultDomainEventFactory, defineRepository, defineSnapshotModel, derivePersistenceChanges, domainErrorToResult, encodeIntegrationMessage, entityIds, eventBusSink, findEntityById, freezeShallow, hasEntityId, ignoreProjectionEvent, insertPersistenceBaseline, integrationMessageToCommittedEvent, isDomainErrorLike, isInfrastructureErrorLike, isPositionAfter, mergeMetadata, outboxWriterAcceptingEventLoss, persistenceProjectionDrifted, prepareDomainMachineDefinition, projectionFromHandlers, recapturePersistenceBaseline, reconstituteAggregateFromHistory, reconstituteAggregateFromSnapshot, recordDomainEvent, recordPendingEvents, removeEntityById, replaceEntityById, routeEventsToCommandOutbox, sameEntity, sameVersion, specification, toVersion, transitionDomainState, updateEntityById, vo, voEquals, voEqualsExcept, voValidated, voWithValidation, withCommit, withIdempotentCommit };
|
|
7092
|
+
export { AggregateDeletedError, AggregateNotFoundError, AggregateTrackingError, CapabilityRegistryConflictError, CommandBus, CommitError, ConcurrencyConflictError, DeadlineProcessor, DirectStateMutationError, DomainError, DomainEventValidationError, DomainStateMachine, DomainTransitionGuardRejectedError, DuplicateAggregateError, DuplicateEventIdError, DuplicateHandlerRegistrationError, Entity, ErrorMapperFailedError, EventBusClosedError, EventBusImpl, EventHarvestError, EventSourcedAggregate, FoldReturnedNoStateError, ForeignEventError, HostileStateKeyError, IdempotencyClaimLostError, IdempotencyCompletionWithoutClaimError, IdempotencyInFlightError, IdempotencyKeyReuseError, IdempotencyReconciliationRequiredError, IdentityMap, InMemoryCapacityExceededError, InMemoryDeadlineStore, InMemoryEventStore, InMemoryIdempotencyStore, InMemoryOutbox, InMemoryProjectionCheckpointStore, InMemorySnapshotStore, InfrastructureError, InvalidCommandMessageError, InvalidDomainMachineContextError, InvalidDomainMachineDefinitionError, InvalidDomainMachineInputError, InvalidDomainMachineSnapshotError, InvalidDomainTransitionError, InvalidDomainTransitionGuardResultError, InvalidDomainTransitionResultError, InvalidIntegrationMessageError, InvalidRepositoryAdapterError, InvalidRepositoryDefinitionError, InvalidVersionError, MisaddressedEventError, MissingEntityIdError, MissingFoldError, MissingHandlerError, NestedUnitOfWorkError, NonProgressingEventStreamPageError, OutboxDispatcher, PendingEventBatchMismatchError, PendingEventLimitExceededError, ProjectionGapError, ProjectionIdentityViolationError, ProjectionOrderViolationError, ProjectionReceiptViolationError, Projector, PublishDepthExceededError, QueryBus, ReentrantDomainStateMachineEvaluationError, ReentrantEventRecordingError, ReplayHeadMismatchError, RepositoryErrorMappingFailedError, RetryingTransactionScope, RollbackError, SnapshotCorruptedError, SnapshotSchemaMismatchError, SnapshotTimeValidationError, SnapshotVersionNotRestoredError, Specification, StateStoredAggregate, TransactionClosedError, UnenrolledChangesError, UnitOfWork, UnmanagedInstanceError, UnmintedEventError, UnprojectableEventError, UnregisteredHandlerError, UnreplayableAggregateError, ValueObject, analyzeDomainMachineDefinition, canTransitionDomainState, captureAggregateSnapshot, capturePersistenceBaseline, copyMetadata, createDomainEvent, createDomainEventFactory, createDomainEventFromFacts, createInitialDomainMachineSnapshot, createIntegrationMessage, createUncommittedDomainEvent, decodeIntegrationMessage, deepEqual, deepEqualExcept, deepFreeze, deepOmit, defaultDomainEventFactory, defineRepository, defineSnapshotModel, derivePersistenceChanges, detachState, domainErrorToResult, encodeIntegrationMessage, entityIds, eventBusSink, findEntityById, freezeShallow, hasEntityId, ignoreProjectionEvent, insertPersistenceBaseline, integrationMessageToCommittedEvent, isDomainErrorLike, isInfrastructureErrorLike, isPositionAfter, mergeMetadata, outboxWriterAcceptingEventLoss, persistenceProjectionDrifted, prepareDomainMachineDefinition, projectionFromHandlers, recapturePersistenceBaseline, reconstituteAggregateFromHistory, reconstituteAggregateFromSnapshot, recordDomainEvent, recordPendingEvents, removeEntityById, replaceEntityById, routeEventsToCommandOutbox, sameEntity, sameVersion, specification, toVersion, transitionDomainState, updateEntityById, vo, voEquals, voEqualsExcept, voValidated, voWithValidation, withCommit, withIdempotentCommit };
|
|
7037
7093
|
//# sourceMappingURL=index.js.map
|