@wataruoguchi/emmett-event-store-kysely 2.0.1 → 2.1.0
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/README.md +3 -14
- package/dist/event-store/kysely-event-store.d.ts.map +1 -1
- package/dist/event-store/kysely-event-store.js +26 -17
- package/dist/index.cjs +31 -15
- package/dist/types.d.ts +2 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -20,13 +20,12 @@ npm install @wataruoguchi/emmett-event-store-kysely @event-driven-io/emmett kyse
|
|
|
20
20
|
|
|
21
21
|
### 1. Database Setup
|
|
22
22
|
|
|
23
|
-
Set up the required PostgreSQL tables using [our migration example](https://github.com/wataruoguchi/emmett-event-store-kysely/blob/main/
|
|
23
|
+
Set up the required PostgreSQL tables using [our migration example](https://github.com/wataruoguchi/emmett-event-store-kysely/blob/main/packages/emmett-event-store-kysely/database/migrations/1758758113676_event_sourcing_migration_example.ts):
|
|
24
24
|
|
|
25
25
|
```typescript
|
|
26
26
|
import { Kysely } from "kysely";
|
|
27
27
|
|
|
28
28
|
// Required tables: messages, streams, subscriptions
|
|
29
|
-
// See https://github.com/wataruoguchi/emmett-event-store-kysely/blob/main/package/docs/database-setup.md for details
|
|
30
29
|
```
|
|
31
30
|
|
|
32
31
|
A read model table expects to have the following columns:
|
|
@@ -110,24 +109,14 @@ await runner.projectEvents("subscription-id", "cart-123", {
|
|
|
110
109
|
});
|
|
111
110
|
```
|
|
112
111
|
|
|
113
|
-
See [Snapshot Projections documentation](https://github.com/wataruoguchi/emmett-event-store-kysely/blob/main/package/docs/snapshot-projections.md) for details.
|
|
114
|
-
|
|
115
112
|
## Documentation
|
|
116
113
|
|
|
117
|
-
📚 **[Complete Documentation](https://github.com/wataruoguchi/emmett-event-store-kysely/blob/main/
|
|
118
|
-
|
|
119
|
-
### Core Guides
|
|
120
|
-
|
|
121
|
-
- [Database Setup](https://github.com/wataruoguchi/emmett-event-store-kysely/blob/main/package/docs/database-setup.md) - PostgreSQL schema and requirements
|
|
122
|
-
- [Event Store](https://github.com/wataruoguchi/emmett-event-store-kysely/blob/main/package/docs/event-store.md) - Core event store API
|
|
123
|
-
- [Snapshot Projections](https://github.com/wataruoguchi/emmett-event-store-kysely/blob/main/package/docs/snapshot-projections.md) - Build read models (recommended) ⭐
|
|
124
|
-
- [Event Consumer](https://github.com/wataruoguchi/emmett-event-store-kysely/blob/main/package/docs/consumer.md) - Continuous background processing
|
|
125
|
-
- [Projection Runner](https://github.com/wataruoguchi/emmett-event-store-kysely/blob/main/package/docs/projection-runner.md) - On-demand processing for tests
|
|
114
|
+
📚 **[Complete Documentation](https://github.com/wataruoguchi/emmett-event-store-kysely/blob/main/packages/emmett-event-store-kysely/docs/README.md)**
|
|
126
115
|
|
|
127
116
|
### Examples
|
|
128
117
|
|
|
129
118
|
- [Working Example](https://github.com/wataruoguchi/emmett-event-store-kysely/tree/main/example/) - Complete application with carts and generators
|
|
130
|
-
- [Migration Example](https://github.com/wataruoguchi/emmett-event-store-kysely/blob/main/
|
|
119
|
+
- [Migration Example](https://github.com/wataruoguchi/emmett-event-store-kysely/blob/main/packages/emmett-event-store-kysely/database/migrations/1758758113676_event_sourcing_migration_example.ts) - Database setup
|
|
131
120
|
|
|
132
121
|
## License
|
|
133
122
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kysely-event-store.d.ts","sourceRoot":"","sources":["../../src/event-store/kysely-event-store.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,KAAK,qBAAqB,EAC1B,KAAK,sCAAsC,EAC3C,KAAK,KAAK,EACV,KAAK,UAAU,EAEf,KAAK,wBAAwB,EAE7B,KAAK,mCAAmC,EACxC,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACtB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACrC,OAAO,EAGL,KAAK,YAAY,EACjB,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AC;IACjE,cAAc,CAAC,SAAS,SAAS,KAAK,EACpC,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,SAAS,EAAE,EACnB,OAAO,CAAC,EAAE,6BAA6B,GACtC,OAAO,CAAC,sCAAsC,CAAC,CAAC;IACnD,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACvB,MAAM,EAAE;QACN,GAAG,IAAI,MAAM,CAAC;QACd,KAAK,IAAI,IAAI,CAAC;QACd,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;KAC1B,CAAC;CACH;AAED,MAAM,MAAM,uBAAuB,GAAG;IACpC,kCAAkC;IAClC,iBAAiB,CAAC,EAAE;QAClB,iDAAiD;QACjD,EAAE,CAAC,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;KACtB,CAAC;IACF,gCAAgC;IAChC,MAAM,CAAC,EAAE;QACP,8BAA8B;QAC9B,aAAa,CAAC,EAAE,gBAAgB,GAAG,MAAM,CAAC;KAC3C,CAAC;IACF,iCAAiC;IACjC,KAAK,CAAC,EAAE;QACN,qCAAqC;QACrC,oBAAoB,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;KACnD,CAAC;CACH,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,uBAIlC,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,MAAM,YAAY,KAAG,gBAgLxD,CAAC"}
|
|
@@ -7,7 +7,7 @@ export const defaultKyselyOptions = {
|
|
|
7
7
|
},
|
|
8
8
|
};
|
|
9
9
|
export const getKyselyEventStore = (deps) => {
|
|
10
|
-
const { db, logger } = deps;
|
|
10
|
+
const { db, logger, inTransaction = false } = deps;
|
|
11
11
|
const eventStore = {
|
|
12
12
|
/**
|
|
13
13
|
* @description We do not use schema management in this package.
|
|
@@ -18,17 +18,25 @@ export const getKyselyEventStore = (deps) => {
|
|
|
18
18
|
migrate: async () => Promise.resolve(),
|
|
19
19
|
},
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
21
|
+
* Provide a session-bound event store using a Kysely transaction.
|
|
22
|
+
* All operations within the callback will share the same DB transaction.
|
|
22
23
|
*/
|
|
23
24
|
async withSession(callback) {
|
|
24
|
-
return await
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
return await db.transaction().execute(async (trx) => {
|
|
26
|
+
const sessionEventStore = getKyselyEventStore({
|
|
27
|
+
db: trx,
|
|
28
|
+
logger,
|
|
29
|
+
inTransaction: true,
|
|
30
|
+
});
|
|
31
|
+
return await callback({
|
|
32
|
+
eventStore: sessionEventStore,
|
|
33
|
+
close: () => Promise.resolve(),
|
|
34
|
+
});
|
|
27
35
|
});
|
|
28
36
|
},
|
|
29
37
|
async aggregateStream(streamName, options) {
|
|
30
38
|
const { evolve, initialState, read } = options;
|
|
31
|
-
logger.
|
|
39
|
+
logger.debug?.({ streamName, options }, "aggregateStream");
|
|
32
40
|
const expectedStreamVersion = read?.expectedStreamVersion;
|
|
33
41
|
const result = await eventStore.readStream(streamName, read);
|
|
34
42
|
assertExpectedVersionMatchesCurrent(result.currentStreamVersion, expectedStreamVersion, PostgreSQLEventStoreDefaultStreamVersion);
|
|
@@ -41,7 +49,7 @@ export const getKyselyEventStore = (deps) => {
|
|
|
41
49
|
},
|
|
42
50
|
async readStream(streamName, options) {
|
|
43
51
|
const partition = getPartition(options);
|
|
44
|
-
logger.
|
|
52
|
+
logger.debug?.({ streamName, options, partition }, "readStream");
|
|
45
53
|
const { currentStreamVersion, streamExists } = await fetchStreamInfo(db, streamName, partition);
|
|
46
54
|
const range = parseRangeOptions(options);
|
|
47
55
|
const rows = await buildEventsQuery({ db, logger }, streamName, partition, range).execute();
|
|
@@ -56,25 +64,27 @@ export const getKyselyEventStore = (deps) => {
|
|
|
56
64
|
const streamType = getStreamType(options);
|
|
57
65
|
const partition = getPartition(options);
|
|
58
66
|
const expected = options?.expectedStreamVersion;
|
|
59
|
-
logger.
|
|
67
|
+
logger.debug?.({ streamName, events, options, partition }, "appendToStream");
|
|
60
68
|
ensureEventsNotEmpty(events, expected);
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
const { currentStreamVersion, streamExists } = await fetchStreamInfo(trx, streamName, partition);
|
|
69
|
+
// It may be called within a transaction via withSession.
|
|
70
|
+
const executeOn = async (executor) => {
|
|
71
|
+
const { currentStreamVersion, streamExists } = await fetchStreamInfo(executor, streamName, partition);
|
|
65
72
|
assertExpectedVersion(expected, currentStreamVersion, streamExists);
|
|
66
73
|
const basePos = currentStreamVersion;
|
|
67
74
|
const nextStreamPosition = computeNextStreamPosition(basePos, events.length);
|
|
68
|
-
await upsertStreamRow(
|
|
75
|
+
await upsertStreamRow(executor, streamName, partition, streamType, basePos, nextStreamPosition, expected, streamExists);
|
|
69
76
|
const messagesToInsert = buildMessagesToInsert(events, basePos, streamName, partition);
|
|
70
|
-
const lastEventGlobalPosition = await insertMessagesAndGetLastGlobalPosition(
|
|
77
|
+
const lastEventGlobalPosition = await insertMessagesAndGetLastGlobalPosition(executor, messagesToInsert);
|
|
71
78
|
return {
|
|
72
79
|
nextExpectedStreamVersion: nextStreamPosition,
|
|
73
80
|
lastEventGlobalPosition,
|
|
74
81
|
createdNewStream: !streamExists,
|
|
75
82
|
};
|
|
76
|
-
}
|
|
77
|
-
|
|
83
|
+
};
|
|
84
|
+
if (inTransaction) {
|
|
85
|
+
return executeOn(db);
|
|
86
|
+
}
|
|
87
|
+
return db.transaction().execute(async (trx) => executeOn(trx));
|
|
78
88
|
},
|
|
79
89
|
close: async () => {
|
|
80
90
|
// Kysely doesn't require explicit closing for most cases
|
|
@@ -155,7 +165,6 @@ function buildMessagesToInsert(events, basePos, streamId, partition) {
|
|
|
155
165
|
const rawMeta = "metadata" in e ? e.metadata : undefined;
|
|
156
166
|
const eventMeta = rawMeta && typeof rawMeta === "object" ? rawMeta : {};
|
|
157
167
|
const messageMetadata = {
|
|
158
|
-
messageId,
|
|
159
168
|
...eventMeta,
|
|
160
169
|
};
|
|
161
170
|
return {
|
package/dist/index.cjs
CHANGED
|
@@ -184,7 +184,7 @@ function createProjectionRegistry(...registries) {
|
|
|
184
184
|
|
|
185
185
|
// src/event-store/kysely-event-store.ts
|
|
186
186
|
var getKyselyEventStore = (deps) => {
|
|
187
|
-
const { db, logger } = deps;
|
|
187
|
+
const { db, logger, inTransaction = false } = deps;
|
|
188
188
|
const eventStore = {
|
|
189
189
|
/**
|
|
190
190
|
* @description We do not use schema management in this package.
|
|
@@ -195,17 +195,25 @@ var getKyselyEventStore = (deps) => {
|
|
|
195
195
|
migrate: async () => Promise.resolve()
|
|
196
196
|
},
|
|
197
197
|
/**
|
|
198
|
-
*
|
|
198
|
+
* Provide a session-bound event store using a Kysely transaction.
|
|
199
|
+
* All operations within the callback will share the same DB transaction.
|
|
199
200
|
*/
|
|
200
201
|
async withSession(callback) {
|
|
201
|
-
return await
|
|
202
|
-
|
|
203
|
-
|
|
202
|
+
return await db.transaction().execute(async (trx) => {
|
|
203
|
+
const sessionEventStore = getKyselyEventStore({
|
|
204
|
+
db: trx,
|
|
205
|
+
logger,
|
|
206
|
+
inTransaction: true
|
|
207
|
+
});
|
|
208
|
+
return await callback({
|
|
209
|
+
eventStore: sessionEventStore,
|
|
210
|
+
close: () => Promise.resolve()
|
|
211
|
+
});
|
|
204
212
|
});
|
|
205
213
|
},
|
|
206
214
|
async aggregateStream(streamName, options) {
|
|
207
215
|
const { evolve, initialState, read } = options;
|
|
208
|
-
logger.
|
|
216
|
+
logger.debug?.({ streamName, options }, "aggregateStream");
|
|
209
217
|
const expectedStreamVersion = read?.expectedStreamVersion;
|
|
210
218
|
const result = await eventStore.readStream(streamName, read);
|
|
211
219
|
(0, import_emmett.assertExpectedVersionMatchesCurrent)(
|
|
@@ -225,7 +233,7 @@ var getKyselyEventStore = (deps) => {
|
|
|
225
233
|
},
|
|
226
234
|
async readStream(streamName, options) {
|
|
227
235
|
const partition = getPartition(options);
|
|
228
|
-
logger.
|
|
236
|
+
logger.debug?.({ streamName, options, partition }, "readStream");
|
|
229
237
|
const { currentStreamVersion, streamExists } = await fetchStreamInfo(
|
|
230
238
|
db,
|
|
231
239
|
streamName,
|
|
@@ -251,11 +259,14 @@ var getKyselyEventStore = (deps) => {
|
|
|
251
259
|
const streamType = getStreamType(options);
|
|
252
260
|
const partition = getPartition(options);
|
|
253
261
|
const expected = options?.expectedStreamVersion;
|
|
254
|
-
logger.
|
|
262
|
+
logger.debug?.(
|
|
263
|
+
{ streamName, events, options, partition },
|
|
264
|
+
"appendToStream"
|
|
265
|
+
);
|
|
255
266
|
ensureEventsNotEmpty(events, expected);
|
|
256
|
-
const
|
|
267
|
+
const executeOn = async (executor) => {
|
|
257
268
|
const { currentStreamVersion, streamExists } = await fetchStreamInfo(
|
|
258
|
-
|
|
269
|
+
executor,
|
|
259
270
|
streamName,
|
|
260
271
|
partition
|
|
261
272
|
);
|
|
@@ -266,7 +277,7 @@ var getKyselyEventStore = (deps) => {
|
|
|
266
277
|
events.length
|
|
267
278
|
);
|
|
268
279
|
await upsertStreamRow(
|
|
269
|
-
|
|
280
|
+
executor,
|
|
270
281
|
streamName,
|
|
271
282
|
partition,
|
|
272
283
|
streamType,
|
|
@@ -281,14 +292,20 @@ var getKyselyEventStore = (deps) => {
|
|
|
281
292
|
streamName,
|
|
282
293
|
partition
|
|
283
294
|
);
|
|
284
|
-
const lastEventGlobalPosition = await insertMessagesAndGetLastGlobalPosition(
|
|
295
|
+
const lastEventGlobalPosition = await insertMessagesAndGetLastGlobalPosition(
|
|
296
|
+
executor,
|
|
297
|
+
messagesToInsert
|
|
298
|
+
);
|
|
285
299
|
return {
|
|
286
300
|
nextExpectedStreamVersion: nextStreamPosition,
|
|
287
301
|
lastEventGlobalPosition,
|
|
288
302
|
createdNewStream: !streamExists
|
|
289
303
|
};
|
|
290
|
-
}
|
|
291
|
-
|
|
304
|
+
};
|
|
305
|
+
if (inTransaction) {
|
|
306
|
+
return executeOn(db);
|
|
307
|
+
}
|
|
308
|
+
return db.transaction().execute(async (trx) => executeOn(trx));
|
|
292
309
|
},
|
|
293
310
|
close: async () => {
|
|
294
311
|
await Promise.resolve();
|
|
@@ -351,7 +368,6 @@ function buildMessagesToInsert(events, basePos, streamId, partition) {
|
|
|
351
368
|
const rawMeta = "metadata" in e ? e.metadata : void 0;
|
|
352
369
|
const eventMeta = rawMeta && typeof rawMeta === "object" ? rawMeta : {};
|
|
353
370
|
const messageMetadata = {
|
|
354
|
-
messageId,
|
|
355
371
|
...eventMeta
|
|
356
372
|
};
|
|
357
373
|
return {
|
package/dist/types.d.ts
CHANGED
|
@@ -9,6 +9,8 @@ export type Logger = {
|
|
|
9
9
|
export type Dependencies<T = any> = {
|
|
10
10
|
db: DatabaseExecutor<T>;
|
|
11
11
|
logger: Logger;
|
|
12
|
+
/** If true, the provided db is already a transaction executor. */
|
|
13
|
+
inTransaction?: boolean;
|
|
12
14
|
};
|
|
13
15
|
export type ExtendedOptions = {
|
|
14
16
|
partition?: string;
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGrC,MAAM,MAAM,gBAAgB,CAAC,CAAC,GAAG,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC;AAElD,MAAM,MAAM,MAAM,GAAG;IACnB,IAAI,EAAE,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,KAAK,EAAE,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG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ishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "2.0
|
|
6
|
+
"version": "2.1.0",
|
|
7
7
|
"description": "Emmett Event Store with Kysely",
|
|
8
8
|
"author": "Wataru Oguchi",
|
|
9
9
|
"license": "MIT",
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"scripts": {
|
|
31
31
|
"build": "rm -rf dist && tsc -p tsconfig.build.json && tsup src/index.ts src/projections/index.ts",
|
|
32
32
|
"type-check": "tsc --noEmit",
|
|
33
|
+
"tc": "npm run type-check",
|
|
33
34
|
"test": "npm run type-check && vitest run",
|
|
34
35
|
"release": "semantic-release",
|
|
35
36
|
"release:dry-run": "semantic-release --dry-run"
|
|
@@ -46,8 +47,8 @@
|
|
|
46
47
|
"vitest": "^3.2.4"
|
|
47
48
|
},
|
|
48
49
|
"peerDependencies": {
|
|
49
|
-
"@event-driven-io/emmett": "
|
|
50
|
-
"kysely": "
|
|
50
|
+
"@event-driven-io/emmett": "0",
|
|
51
|
+
"kysely": "0"
|
|
51
52
|
},
|
|
52
53
|
"optionalDependencies": {
|
|
53
54
|
"@rollup/rollup-linux-x64-gnu": "4.9.5"
|