@ossy/event-store 1.3.0 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ossy/event-store",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.1",
|
|
4
4
|
"description": "Ossy Event Store — Aggregate, EventStore, and MongoDB client",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -23,12 +23,12 @@
|
|
|
23
23
|
"author": "Ossy <yourfriends@ossy.se> (https://ossy.se)",
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@ossy/observability": "^1.
|
|
26
|
+
"@ossy/observability": "^1.4.1",
|
|
27
27
|
"mongodb": "^7.2.0",
|
|
28
28
|
"nanoid": "^5.1.11"
|
|
29
29
|
},
|
|
30
30
|
"files": [
|
|
31
31
|
"src"
|
|
32
32
|
],
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "a144d7767264d96bc6ae095784d4f884f03a89a0"
|
|
34
34
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AggregateRebuild } from '@ossy/event-store'
|
|
2
|
+
|
|
3
|
+
export const metadata = {
|
|
4
|
+
id: 'aggregate-rebuild',
|
|
5
|
+
// Empty trigger matches all events. AggregateRebuild.BuildAndSave silently
|
|
6
|
+
// skips any aggregateType not registered in the manifest, so only events
|
|
7
|
+
// for known aggregate types result in a rebuild.
|
|
8
|
+
triggers: [{}]
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export async function run ({ event }) {
|
|
12
|
+
await AggregateRebuild.BuildAndSave(event.aggregateType, event.aggregateId)
|
|
13
|
+
}
|