# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [3.0.0] - 2019-06-19
### Added
- Persistent models recurring to mongoose

### Updated
- Test runner swapped from `jest` to `mocha`.

### Removed
- Old model structure (`AbstractModel` and `AbstractRemoteModel`).
- `APP_NAMESPACE` env variable.
- Module initializer which would load modules by the namespace.
- Full import feature.

## [2.3.0] - 2019-04-08
### Added
- Module `Models` property to carry all declared models.
- AbstractModel - `findOne()` method to fetch one entry from the database.

### Updated
- Dependencies package versions.

### Removed
- AbstractModel - `fullImport()` method (thus `fullImport` event).

## [2.2.1] - 2019-02-15
### Updated
- JSDoc blocks.

## [2.2.0] - 2019-02-14
### Updated
- `clock-trigger` events now triggered using the `node-schedule` package.

## [2.1.1] - 2019-02-06
### Fixed
- AbstractRemoteModel `updateAll()` not parsing if no array is returned from `fetchEntries`.

## [2.1.0] - 2019-02-01
### Added
- HTTP Server.

## [2.0.5] - 2019-01-29
### Fixed
- `this` property on event error handler. 

## [2.0.4] - 2019-01-29
### Fixed
- Argument passing on event error handler. 

## [2.0.3] - 2019-01-23
### Added
- Handling for errors thrown when events are triggered. 

## [2.0.2] - 2019-01-16
### Fixed
- `debug` package as a production dependency. 

## [2.0.1] - 2019-01-07
### Updated
- AbstractModule - Event handlers attachment now binding the module as the `this` property. 

## [2.0.0] - 2019-01-07
### Added
- AbstractPlugin class with common code for plugins.
- AbstractPlugin `handleClockTrigger()` method which as the default listener for `clock-trigger` events.
- AbstractTask class with common code for tasks.

### Removed
- AbstractModule as an exported resource - use AbstractPlugin and AbstractTask instead.

### Updated
- AbstractModel value comparison routine.
- AbstractRemoteModel - `updateAll()` now returns current models.
- Module initialization prioritizing Tasks over Plugins.

## [1.2.1] - 2019-01-03
### Fixed
- Fixed clock module initialization before env variable verification.

## [1.2.0] - 2019-01-03
### Added
- AbstractModel - `fullImport()` method to export all stored information via the `fullImport` event. 

### Changed
- AbstractModel - `created` and `updated` events triggered by `save()` method.

### Fixed
- Module initialization procedure.

## [1.1.2] - 2019-01-03
### Changed
- Package name to support `npm publish`.

## [1.1.1] - 2019-01-03
### Fixed
- Event arguments being sent individually, instead of being sent on an array.

## [1.1.0] - 2019-01-02
### Added
- Possibility to use a custom `APP_NAMESPACE`.
- Jest tests.
- AbstractRemoteModel Class with common functionality for models based on remote information.
- CHANGELOG.md and README.md files.

## [1.0.0] - 1970-01-01
### Added
- AbstractModel Class with common functionality for models.
- AbstractModule Class to define how other modules should work.
- Custom EventEmitter which allows to debug emitted events.
- MongoAdapter with basic connection to MongoDB.
- Clock module to trigger a `clock-trigger` event at each second 0.
