This follows our existing patterns and protects us from th eslint max line rule
when wiring up dependencies. The rule is designed to keep logic out of glue
code, and this file won't have logic, just lots of deps.
refs https://github.com/TryGhost/Team/issues/3349
Tidies up the remaining major pieces which were not covered by tests.
Extends the existing test patterns, although the API mocks are getting a
bit unmanageable.
refs https://github.com/TryGhost/Team/issues/3504
This migrates comments-ui to TypeScript. Only `App.js` is left to
migrate, but since this isn't using hooks yet, it will need a bigger
rewrite so this will need to happen in a separate PR.
refs https://github.com/TryGhost/Team/issues/3169
- The "current" part of the payload should always have the "id" included to make the data structure easier to use for the event consumer
refs https://github.com/TryGhost/Team/issues/3169
- With the new architecture all possible dependencies should be injected rather than required directly - this applies to the DomainEvents module as well.
refs https://github.com/TryGhost/Team/issues/3169
- When a not yet mapped event is produced by Ghost model the posts belonging to a collection are recalculated in a brute-force way. This causes a lot of strain on the database and times out some of the tests. Right now we only care about a handful of events, so limited the ones we listen to and will be uncommenting the rest when we have an optimal mapping/handling for them.
refs https://github.com/TryGhost/Team/issues/3169
- To be able to apply NQL filtering on Collection Posts the dates should be serialized to be ISO Date Strings instead of raw Dates. Otherwise, NQL filtering fails to compare Date with a Date String.
refs https://github.com/TryGhost/Team/issues/3169
- This piece of logic handles the 'post.added' model event mapping to Collection's PostAddedEvent domain event and logic related to updating collections when the new post is added.
refs https://github.com/TryGhost/Team/issues/3169
- The collection entity properties used to be modified, which is not a good practice for logic encapsulation. Extracted editing logic to it's own method which can also contain validation logic when wrong data is passed when editing a collection.
refs https://github.com/TryGhost/Team/issues/3169
- When handling a single generic event the code becomes riddled with if statements to detect correct "data" that is being passed with the event. Switching to have a domain event per model event helps solving this problem and makes code more readable.
refs https://github.com/TryGhost/Team/issues/3169
- To make the coupling to Ghost's model events as loose as possible added a bridge that maps model events to domain events. These domain events it what the collections module can subscribe to to make necessary updates.
refs https://github.com/TryGhost/Team/issues/3169
- Ghost model events should not be crossing emitted to outside libraries. The wrapper code is a "glue code" that can still listen to model events but transforms them to specific format that is useful for the collections module
- This hooks up the Ghost model events and transforms them into a "CollectionEvent" format.
refs https://github.com/TryGhost/Team/issues/3428
- I'm taking an approach of adding specialized support for each event one-by-one.
- The post resource deletion event is the most straight forward and works same for both types of collections.
refs https://github.com/TryGhost/Toolbox/issues/602
- the new regex allows for the filename to contain seconds, which would have
helped prevent a bug we had with migrations being in the wrong order
- mentioned filename ordering in the migration review comment to bring
that to the forefront of the mind
refs https://github.com/TryGhost/Ghost/issues/15725
This pull request adds a new configuration option for the Mailgun email
provider that allows the user to set the maximum number of recipients
per email batch via a new config option `bulkEmail.batchSize`
closes https://github.com/TryGhost/Team/issues/2463
- it merges the similar history events by adding additional properties
to the events data
- `skip` was added to the current event when the next event is similar to
it, so that the event isn't output on the frontend
- `count` was added to the last item of the similar events and it's used
for outputting the number of repeated similar events