@wataruoguchi/emmett-event-store-kysely 2.0.0 → 2.0.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.
Files changed (2) hide show
  1. package/README.md +20 -12
  2. package/package.json +4 -9
package/README.md CHANGED
@@ -20,15 +20,23 @@ 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](./database/migrations/1758758113676_event_sourcing_migration_example.ts):
23
+ Set up the required PostgreSQL tables using [our migration example](https://github.com/wataruoguchi/emmett-event-store-kysely/blob/main/package/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 docs/database-setup.md for details
29
+ // See https://github.com/wataruoguchi/emmett-event-store-kysely/blob/main/package/docs/database-setup.md for details
30
30
  ```
31
31
 
32
+ A read model table expects to have the following columns:
33
+
34
+ - stream_id (uuid)
35
+ - last_stream_position (bigint)
36
+ - last_global_position (bigint)
37
+ - partition (text)
38
+ - snapshot (jsonb)
39
+
32
40
  ### 2. Create Event Store
33
41
 
34
42
  ```typescript
@@ -102,24 +110,24 @@ await runner.projectEvents("subscription-id", "cart-123", {
102
110
  });
103
111
  ```
104
112
 
105
- See [Snapshot Projections documentation](./docs/snapshot-projections.md) for details.
113
+ See [Snapshot Projections documentation](https://github.com/wataruoguchi/emmett-event-store-kysely/blob/main/package/docs/snapshot-projections.md) for details.
106
114
 
107
115
  ## Documentation
108
116
 
109
- 📚 **[Complete Documentation](./docs/README.md)**
117
+ 📚 **[Complete Documentation](https://github.com/wataruoguchi/emmett-event-store-kysely/blob/main/package/docs/README.md)**
110
118
 
111
119
  ### Core Guides
112
120
 
113
- - [Database Setup](./docs/database-setup.md) - PostgreSQL schema and requirements
114
- - [Event Store](./docs/event-store.md) - Core event store API
115
- - [Snapshot Projections](./docs/snapshot-projections.md) - Build read models (recommended) ⭐
116
- - [Event Consumer](./docs/consumer.md) - Continuous background processing
117
- - [Projection Runner](./docs/projection-runner.md) - On-demand processing for tests
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
118
126
 
119
127
  ### Examples
120
128
 
121
- - [Working Example](../example/) - Complete application with carts and generators
122
- - [Migration Example](./database/migrations/1758758113676_event_sourcing_migration_example.ts) - Database setup
129
+ - [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/package/database/migrations/1758758113676_event_sourcing_migration_example.ts) - Database setup
123
131
 
124
132
  ## License
125
133
 
@@ -127,4 +135,4 @@ MIT
127
135
 
128
136
  ## Contributing
129
137
 
130
- Contributions are welcome! Please see our [GitHub repository](https://github.com/wataruoguchi/poc-emmett) for issues and PRs.
138
+ Contributions are welcome! Please see our [GitHub repository](https://github.com/wataruoguchi/emmett-event-store-kysely) for issues and PRs.
package/package.json CHANGED
@@ -3,16 +3,16 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "2.0.0",
6
+ "version": "2.0.1",
7
7
  "description": "Emmett Event Store with Kysely",
8
8
  "author": "Wataru Oguchi",
9
9
  "license": "MIT",
10
10
  "repository": {
11
11
  "type": "git",
12
- "url": "https://github.com/wataruoguchi/poc-emmett.git"
12
+ "url": "https://github.com/wataruoguchi/emmett-event-store-kysely.git"
13
13
  },
14
- "homepage": "https://github.com/wataruoguchi/poc-emmett",
15
- "bugs": "https://github.com/wataruoguchi/poc-emmett/issues",
14
+ "homepage": "https://github.com/wataruoguchi/emmett-event-store-kysely",
15
+ "bugs": "https://github.com/wataruoguchi/emmett-event-store-kysely/issues",
16
16
  "type": "module",
17
17
  "main": "dist/index.js",
18
18
  "module": "dist/index.js",
@@ -25,11 +25,6 @@
25
25
  "types": "./dist/index.d.ts",
26
26
  "import": "./dist/index.js",
27
27
  "require": "./dist/index.cjs"
28
- },
29
- "./projections": {
30
- "types": "./dist/projections/index.d.ts",
31
- "import": "./dist/projections/index.js",
32
- "require": "./dist/projections/index.cjs"
33
28
  }
34
29
  },
35
30
  "scripts": {