Skip to content

Latest Changes

Michal Paszkiewicz edited this page Jun 26, 2017 · 7 revisions

2.0.12

ApplicationService.Instance.replayEventsUpTo(domainEvent, msInterval, inclusive) and ApplicationService.Instance.hardReplayEventsUpTo(domainEvent, msInterval, inclusive) now allow you to replay your events up to, or just before a particular domain event.

2.0.9

ApplicationService.Instance.onCommandValidated(callback) allows a callback that can be fired between command validation and command handling when ApplicationService.Instance.handleCommand(command) is triggered

2.0.8

IAmAValueObject interface now exists, forcing you to implement equals(other: T)

2.0.5

Replay of navigations completed with Link components can now be replayed

2.0.3

React components (and therefore also cqrs-react-router pages) require subscription on mounting and should unsubscribe when unmounted.

ApplicationService.Instance.subscribePage(page, viewName, callback) is a new method that means you no longer have to worry about the mounting-unmounting process.

Please be aware that you probably might want to still manually write the mounting/unmounting code if you have custom code you need run there.

2.0.2

ApplicationService.Instance.validateHypotheticalCommand(command, onError) now available for when you want to run all your business logic without changing the current state.

2.0.1

Events can now be replayed slowly by calling replayEvents with two arguments:

ApplicationService.Instance.replayEvents(Clock.now(), 1000); 

2.0.0

Breaking changes:

IAmAnAction renamed to IAmADomainEvent

ActionStore renamed to EventStore

DatedAction renamed to DatedEvent

AuditedAction renamed to AuditedEvent

All other functions and properties with "action" in them have been renamed with "event"

This is due to the fact that "actions" are usually associated with commands, whereas in this project, they clearly correspond to events.

1.1.0

onActionStored can now be called on an ApplicationService instance.

ApplicationService.Instance.onActionStored(callback: (action: IAmAnAction) => {
    // do something with this action
})

1.0.6

hardReplayActions in ApplicationService that will allow you to also reset aggregate roots (replayActions only resets views).

1.0.5

Introduction of AuditedAction abstract class that will enforce use of createdBy string property.

1.0.4

Small fix to ClockDate object - adding of time now returns a new object and doesn't mutate the original ClockDate.

1.0.2

DatedAction now comes as part of the package - it is an abstract class that implements IAmAnAction. It will automatically set the "Created" property on creation and therefore is more useful to users who want to use their actions for auditing purposes.

1.0.0

Breaking change: the use of 'id' in IAmAnAction was a bit ambiguous, so IAmAnAction now has a property 'aggregateID' instead.

CommandValidator abstract class now available and can be registered to your ApplicationService.

You can now also get a report of your state from your application service with:

var report = ApplicationService.Instance.getStateReport();

0.1.9

You can now handle domain errors neatly by subscribe a domain error event for your application service:

ApplicationService.Instance.onDomainError((error: DomainError) => {
    alert(error.message);
});

Please not that this will not handle any generic errors - only errors specified as DomainErrors.

Clone this wiki locally