Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@eveble/eveble

eveble14MIT2.6.1TypeScript support: included

Event sourcing framework with modular architecture for domain driven designed applications in Node.js

eveble, modular, architecture, dependencies, dependency, injection, di, ioc, inversion of control, messaging, api, command bus, cqrs, eventsourcing, event sourcing, event source, ddd, dddd, command, event, domain, driven, design

readme

banner

Event Sourcing framework for Node.js

Eveble is an event sourcing framework with modular architecture for DDD(Domain Driven Design) applications in Node.js


Requirements

Installation

To use install Eveble:

npm install @eveble/eveble

or

yarn add @eveble/eveble

You'll also need to setup development environment or use directly our boilerplate to create new project.

Complementary Packages

Most likely, you'll also need the Eveble testing framework:

npm install @eveble/eveble
npm install --save-dev @eveble/testing

Create a Eveble App

The recommended way to start new apps with Eveble is by using the official Eveble boilerplate:

# Clone the repository
$ git clone https://github.com/eveble/eveble-boilerplate.git <YOUR_PROJECT_NAME>
# Go into the repository
$ cd <YOUR_PROJECT_NAME>
# Run setup
$ npm run setup

Documentation

The @eveble/eveble docs are now published at https://eveble.github.io/eveble/ .

License

MIT

changelog

2.6.1 (2024-02-29)

Bug Fixes

  • ensure that serializables is array on List (a9022f9)

2.6.0 (2023-05-20)

Features

  • export annotation with TitleCase (5173560)

2.5.5 (2023-04-23)

Bug Fixes

  • docs: fix docs build do to issue with node_modules types (5fa5364)

2.5.4 (2023-04-21)

Bug Fixes

  • exports: export missing can decorator (b6152e0)

2.5.3 (2023-04-21)

Bug Fixes

  • deps: update eveble dependencies on yarn.lock (1ae54b4)

2.5.2 (2023-04-17)

Bug Fixes

  • typedoc: update typedoc.json for v0.23 (2e13824)

2.5.1 (2023-04-12)

Bug Fixes

  • github: remove Publish To GitHub Package Registry step from release.yml (49b511a)

2.5.0 (2023-04-12)

Features

  • fix versioning for semantic-release (389c53b)

2.4.3 (2023-04-12)

Bug Fixes

2.4.2 (2023-04-12)

Bug Fixes

  • github: streamline release action on release.yml (df4f3ef)

2.4.1 (2023-04-12)

Bug Fixes

  • release: update repositoryUrl on .releaserc.json (c80b411)

2.4.0 (2023-04-12)

Bug Fixes

  • cast stubs to any (3e25b57)
  • domain: remove SAVED_STATE_KEY from Entity definition (a7cca36)
  • github: update release.yml (425e775)
  • github: update release.yml action (6d452ee)
  • github: update release.yml action (562a1ef)
  • set types (333b2c9)

Features

  • decorators: add can decorator (8f03e52)

2.3.0 (2021-05-23)

Bug Fixes

  • conversion of List to plain object (b15c894)

Features

  • export LOGGING_LEVELS on root (329c9cc)

2.2.1 (2020-10-17)

Bug Fixes

2.2.0 (2020-10-17)

Features

  • types: export Strintifiable interface directly (8be9ea7)

2.1.4 (2020-09-01)

Bug Fixes

  • infrastructure: expose as public setup of message handler on Router (7e338d2)

2.1.3 (2020-08-30)

Bug Fixes

  • infrastructure: inject dependencies on repository level on handled non-initializing message (873db13)

2.1.2 (2020-08-26)

Bug Fixes

  • domain: ensure referenceable properties on recorded events at EventSourceable are lost (105ee26)

2.1.1 (2020-08-20)

Bug Fixes

  • app: assigning new properties that are optional on Config construction (d6e44a5)

2.1.0 (2020-08-02)

Features

2.0.5 (2020-08-01)

Bug Fixes

  • disallow initializing event sourceable with already existing id (dc6cadc)

2.0.4 (2020-07-28)

Bug Fixes

  • using nested Structs on configuration (be4a129)

2.0.3 (2020-07-28)

Bug Fixes

  • using Structs on configuration (ab5be83)

2.0.2 (2020-07-25)

Bug Fixes

  • messaging: support serialization and deserialization of nested objects on types (536e305)

2.0.1 (2020-07-23)

Bug Fixes

  • update imports of exported elements to @eveble/core (a7bef4d)

2.0.0 (2020-07-18)

Features

  • components: add generic constructor type to Command & Event (3bd776f)
  • refactor!: remove PickableProperties (fa50a88)

BREAKING CHANGES

  • remove PickableProperties in favor of more explicit approach

1.0.0 (2020-07-05)

Bug Fixes

  • core: inconsistent tests based on environment do to use of chalk (67dd92d)
  • docs: bump the memory limit on docusaurus build (7e4802f)
  • add process argument to isMochaInWachMode (68a4afd)
  • add process argument to isMochaInWachMode (274e149)
  • change order to alphabetical of default values on initializing property (169fc70)
  • change order to alphabetical of default values on initializing property (24abf55)
  • Command and Event paths on types (004e21b)
  • ensure that serializablesListProps is not undefined (543b9fd)
  • ensure that serializablesListProps is not undefined (eeb15af)
  • exec toJSONValue without prior set serializer on kernel (b7c4f32)
  • filename typo on DomainException (135be8a)
  • invalid thrown InvalidTypeError with UnregistrableTypeError (e89cfbc)
  • invalid thrown InvalidTypeError with UnregistrableTypeError (0a6d1f7)
  • Inversify injectable singletons ‘Cannot read property 'constructor' of null’ on mixins (6c7ce90)
  • Inversify injectable singletons ‘Cannot read property 'constructor' of null’ on mixins (0792dd7)
  • issue with converting nested array types toData (11d8e72)
  • issue with converting nested array types toData (ea32ffc)
  • issue with DefinableMixin’s toPlainObject incorrectly cloning state with cloneDeep (d1be6ac)
  • issue with HookableMixin incorrectly initialising hook container (5d229e2)
  • issue with HookableMixin incorrectly initialising hook container (e20bcc8)
  • issue with registering serializable list hook (b8ae201)
  • issue with registering serializable list hook (5b1e97f)
  • issue with toJSONValue on SerializableMixin with kernel without prior set serializer (5cd718d)
  • issue with validating dependency properties on Struct (c0d174a)
  • issue with validating dependency properties on Struct (4384595)
  • leakage of set process.env during test (b9e9804)
  • leakage of set process.env during test (c974122)
  • missing import reflect-metadata (40614e8)
  • rollup config to use ttypescript transformer (9a59977)
  • target type on delegate annotation (f4bf9df)
  • target type on delegate annotation (755e278)
  • toPlainObject incorrectly cloning state with cloneDeep (b126244)
  • update .env.defaults (7a268a9)
  • update env file for test environment (09c1db9)
  • update to newest typend’s api for PropTypes.oneOf (642f624)
  • domain: issue with rollbacking serializable lists on rollback (f5fcce4)
  • update to newest typend’s api for PropTypes.oneOf (c5c572b)
  • components: merging plain records on Struct by use of isPlainRecord on merge module (f53aafe)
  • domain: issue with rollbacking serializable lists on rollback (f720032)

Features

  • add replaceBy method to List (ceb54c6)
  • add replaceById method to List (899698d)
  • add support for declering generic types on Config (6036f9d)
  • add support for onValidation hooks on Struct (275170c)
  • annotations: add initial (a67876d)
  • annotations: add initial (92e9ee5)
  • annotations: add route (4967b29)
  • annotations: add route (a5b2da5)
  • app: add AgendaCommandSchedulerModule (4c1d7f0)
  • app: add App (6ebac2a)
  • app: add Eveble module (1cf3211)
  • app: add MongoDBCommitStorageModule (88118ec)
  • app: add MongoDBSnapshotStorageModule (ad48dbd)
  • components: add support for lists with serializables (b3b0b32)
  • configs: add EvebleConfig (de5630f)
  • core: add support for auto initializing singletons on BaseApp (563820a)
  • domain: add ‘ensure’ and ‘can’ assertion methods to Entity (a5a6b5d)
  • domain: add Aggregate (f9217a7)
  • domain: add Aggregate (fd62c70)
  • domain: add AssertionError (67dda18)
  • domain: add BoundedContext (cfd6113)
  • domain: add BoundedContext (816bd66)
  • domain: add DomainError (80e78ef)
  • domain: add DomainException (c0bec75)
  • domain: add Entity (27fe214)
  • domain: add EventSourceable (db571a4)
  • domain: add EventSourceable (e6480a1)
  • domain: add Guid (b982f80)
  • domain: add hasAction evaluator to Asserter (84b3e79)
  • domain: add hasApi evaluator to Asserter (516f719)
  • domain: add History (e0f36b0)
  • domain: add History (aed0e65)
  • domain: add method to clear current action on asserter (e0e3a9b)
  • domain: add Process (7f6f45d)
  • domain: add Process (3f46bc1)
  • domain: add SavedStateNotFoundError (8d1f5a3)
  • domain: add SavedStateNotFoundError (b4f8102)
  • domain: add ScheduleCommand (95f7936)
  • domain: add ScheduleCommand (903a1f7)
  • domain: add support for BDD assertions (37ff901)
  • domain: add UndefinedActionError (a319a32)
  • domain: add UnscheduleCommand (d5edd91)
  • domain: add UnscheduleCommand (864f52d)
  • domain: add ValueObject and ValueObjectError (9ebc3b6)
  • domain: support for registering proxified api from assertions on Asserter (d8344f2)
  • infrastructure: add AgendaClient (175ee00)
  • infrastructure: add AgendaCommandScheduler (7772de1)
  • infrastructure: add AgendaScheduledJobTransformer (38f5ca0)
  • infrastructure: add Client (571b209)
  • infrastructure: add Client (1d52de1)
  • infrastructure: add CommandSchedulingService (7487539)
  • infrastructure: add Commit and CommitReceiver (bf43ca9)
  • infrastructure: add Commit and CommitReceiver (e94bfae)
  • infrastructure: add CommitMongoDBObserver (06e68dc)
  • infrastructure: add CommitMongoDBObserver (6ad41e1)
  • infrastructure: add CommitMongoDBStorage (762c857)
  • infrastructure: add CommitMongoDBStorage (0aa9847)
  • infrastructure: add CommitPublisher (9baec6a)
  • infrastructure: add CommitPublisher (83cae91)
  • infrastructure: add CommitSerializer (7be0f5c)
  • infrastructure: add CommitSerializer (8d9e8cd)
  • infrastructure: add CommitStore (27fbdd6)
  • infrastructure: add CommitStore (ec443ca)
  • infrastructure: add EventSourceableRepository (3a6a0cd)
  • infrastructure: add EventSourceableRepository (4cfe451)
  • infrastructure: add MongoDBClient (22970b0)
  • infrastructure: add MongoDBClient (fb502ec)
  • infrastructure: add Projection (067de13)
  • infrastructure: add ProjectionRebuilder (35ca119)
  • infrastructure: add Router (b73a86a)
  • infrastructure: add Router (0f055a7)
  • infrastructure: add Service (32871ec)
  • infrastructure: add SnapshotMongoDBStorage (95f0e54)
  • infrastructure: add SnapshotSerializer (c9aaf8b)
  • infrastructure: add Snapshotter (4c31ecf)
  • infrastructure: add Snapshotter (ee4b22c)
  • ioc: add Injector binding to syntax for routing routers - toRoute (092ef15)
  • ioc: add support for resolving service identifiers on container by matching scope (8d5db17)
  • add support for setting console transport logging level with ENV (60c69be)
  • infrastructure: add ScheduledJob (72d9982)
  • ioc: add Injector binding to syntax for routing routers - toRoute (33b5a51)
  • messaging: add InitializingMessageAlreadyExistsError (3e33bc3)
  • add hasAssertion evaluator to Asserter (57fa60c)
  • add literal keys COMMANDS_KEY, EVENTS_KEY (b8e9b48)
  • add metadata keys: ROUTED_COMMANDS_CONTAINER_KEY, ROUTED_EVENTS_CONTAINER_KEY, INITIALIZING_MESSAGE_KEY (196ab25)
  • add replaceBy method to List (2559738)
  • add replaceById method to List (4f96fe1)
  • add setter for Asserter on kernel (227c73b)
  • add static ‘from’ constructor method on Config (11a63f0)
  • add support for abbreviating long types on logging (fb8e572)
  • add support for declering generic types on Config (01751ab)
  • add support for onValidation hooks on Struct (a237085)
  • allow for overriding onPublish hook (15bb02e)
  • allow for overriding onSend hook (c3e3eed)
  • allow to disable serializable list conversion (466955a)
  • allow to enumerate hidden fields via ENV flag on ExtendableError (58e7f9a)
  • allow to enumerate hidden fields via ENV flag on List (e0ee8d6)
  • app: add AgendaCommandSchedulerModule (9468ec0)
  • app: add App (7a81436)
  • app: add Eveble module (408f466)
  • app: add MongoDBCommitStorageModule (1b88045)
  • app: add MongoDBSnapshotStorageModule (5b1233b)
  • configs: add EvebleConfig (f2eb562)
  • core: add support for auto initializing singletons on BaseApp (657b90a)
  • domain: add ‘ensure’ and ‘can’ assertion methods to Entity (ec7a697)
  • domain: add AssertionError (46726b3)
  • domain: add hasAction evaluator to Asserter (bb7aee9)
  • domain: add hasApi evaluator to Asserter (eebec2b)
  • domain: add method to clear current action on asserter (c0580b7)
  • domain: add UndefinedActionError (8fde4bc)
  • domain: support for registering proxified api from assertions on Asserter (0f4929b)
  • infrastructure: add AgendaClient (41e0860)
  • infrastructure: add AgendaCommandScheduler (757efde)
  • infrastructure: add AgendaScheduledJobTransformer (435ec01)
  • infrastructure: add CommandSchedulingService (0f2b2fd)
  • infrastructure: add Projection (2453dfa)
  • infrastructure: add ProjectionRebuilder (3824bb7)
  • infrastructure: add ScheduledJob (cd4d1e7)
  • infrastructure: add Service (69a71eb)
  • infrastructure: add SnapshotMongoDBStorage (51587e3)
  • infrastructure: add SnapshotSerializer (99826d8)
  • ioc: add support for resolving service identifiers on container by matching scope (cd98f70)
  • add support for setting console transport logging level with ENV (b80248c)
  • messaging: add InitializingMessageAlreadyExistsError (636a5eb)
  • add getSchemaVersion method on VersionableMixin (dbab3db)
  • add hasAssertion evaluator to Asserter (f5dd960)
  • add literal keys COMMANDS_KEY, EVENTS_KEY (8272812)
  • add metadata keys: ROUTED_COMMANDS_CONTAINER_KEY, ROUTED_EVENTS_CONTAINER_KEY, INITIALIZING_MESSAGE_KEY (b5e10a9)
  • add setter for Asserter on kernel (985fbcb)
  • add static ‘from’ constructor method on Config (104b86c)
  • add static constructor to Serializable (a8979b4)
  • add support for abbreviating long types on logging (4f8e0af)
  • add support for overriding mode on Library to fix issue with EJSON (5bb3138)
  • add support for pickable properties on Message (81e958e)
  • add support on Message for other stringifiable identifiers as correlation id (75abb89)
  • add UnavailableAsserterError (df8cab5)
  • allow for overriding onPublish hook (30c9675)
  • allow for overriding onSend hook (66722d9)
  • allow to disable serializable list conversion (1b50216)
  • allow to enumerate hidden fields via ENV flag on ExtendableError (17cc749)
  • allow to enumerate hidden fields via ENV flag on List (f9c1484)
  • annotations: add delegating annotation for types with property initializers (7a6734b)
  • annotations: add support for versioning types (b6dcf5b)
  • components: add Command (194c23d)
  • components: add Config (e5ed597)
  • components: add Event (90c5717)
  • components: add ExtendableError (4c86d3f)
  • components: add LogEntry (2e1fb1f)
  • components: add Message (bee838b)
  • components: add Serializable (1133bb2)
  • components: add SerializableError (4f646be)
  • components: add Struct (53a3cec)
  • configs: add AppConfig (9ec5f4e)
  • configs: add LoggingConfig (3049d66)
  • configs: add LogTransportConfig (36fffd4)
  • core: add BaseApp (9c95b91)
  • core: add BaseModule (eb6b59e)
  • core: add ConsoleTransport logging transport for winston (7ef45ac)
  • core: add errors (8afede0)
  • core: add IoC container (9f6974d)
  • core: add Kernel (60b14ee)
  • core: add Library (cbc07d7)
  • core: add Logger (32fc28e)
  • core: add LogTransport (6f5f968)
  • messaging: add CommandBus (5a3f473)
  • messaging: add EJSONSerializerAdapter (e031449)
  • messaging: add errors (b2bf708)
  • messaging: add EventBus (51b6375)
  • mixins: add CommandHandlingMixin (bc34219)
  • mixins: add EjsonableMixin (af8c07d)
  • mixins: add EventHandlingMixin (e17b693)
  • mixins: add mixin for registering multiple handlers for individual message type (c71d6cc)
  • mixins: add mixin for registering single handler for individual message type (746f487)
  • add handling message support (517516d)
  • mixins: add HookableMixin (a08a447)
  • mixins: add SerializableMixin (9e58ca1)
  • mixins: add StatfulMixin for managing state (3ab4e18)
  • mixins: add StatusfulMixin (52388cb)
  • utils: add helpers (edd2bbb)
  • utils: add isPlainRecord helper (7030038)
  • add default constants (4c99392)
  • add IoC container bindings (a5e7884)
  • add literal keys (1149e22)
  • add metadata keys (70f536d)
  • add specifications constants (0f06554)
  • add support for defining types (6fc4f2d)
  • add TypeScript type declarations (c4d823c)

Performance Improvements

  • add evaluation for instance of Struct on isDefinable (72d1ed5)
  • add evaluation for instance of Struct on isDefinable (e9c1a51)
  • use instanceof evaluator on isHandleabe (c358ed4)