-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
'immer' didn't really work for us and led to all kinds of hard-to-debug problems. Instead of relying on 'immer' to handle changes during event sourcing, we now carefully deep-copy relevant data in the `*_eventsourcing.ts` files and have the event-specific modules `mutate` the aggregate in-place. This makes the latter very simple; at the same time we ensure that the aggregates stored in the cache aren't changed outside the cache. Affected aggregates: - project - subproject - workflowitem
- Loading branch information
1 parent
5e99704
commit b26909d
Showing
55 changed files
with
1,023 additions
and
668 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import Joi = require("joi"); | ||
import { VError } from "verror"; | ||
|
||
import { Ctx } from "../lib/ctx"; | ||
|
||
interface Info { | ||
ctx: Ctx; | ||
requestPath: string; | ||
validationResult: Joi.ValidationError; | ||
} | ||
|
||
export class BadRequest extends VError { | ||
constructor(info: Info) { | ||
super({ name: "BadRequest", info }, `invalid request to ${info.requestPath}`); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.