@livestore/cli 0.4.0 → 0.5.0-dev.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 (125) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/__tests__/fixtures/mock-config.d.ts +8 -9
  3. package/dist/__tests__/fixtures/mock-config.d.ts.map +1 -1
  4. package/dist/__tests__/fixtures/mock-config.js +18 -8
  5. package/dist/__tests__/fixtures/mock-config.js.map +1 -1
  6. package/dist/__tests__/sync-operations.test.js +32 -22
  7. package/dist/__tests__/sync-operations.test.js.map +1 -1
  8. package/dist/bin.js +7 -6
  9. package/dist/bin.js.map +1 -1
  10. package/dist/cli.d.ts +2 -23
  11. package/dist/cli.d.ts.map +1 -1
  12. package/dist/cli.js +4 -4
  13. package/dist/cli.js.map +1 -1
  14. package/dist/commands/__fixtures__/mcp-protocol-server.d.ts +2 -0
  15. package/dist/commands/__fixtures__/mcp-protocol-server.d.ts.map +1 -0
  16. package/dist/commands/__fixtures__/mcp-protocol-server.js +10 -0
  17. package/dist/commands/__fixtures__/mcp-protocol-server.js.map +1 -0
  18. package/dist/commands/import-export.d.ts +5 -19
  19. package/dist/commands/import-export.d.ts.map +1 -1
  20. package/dist/commands/import-export.js +13 -13
  21. package/dist/commands/import-export.js.map +1 -1
  22. package/dist/commands/mcp-coach.d.ts +8 -7
  23. package/dist/commands/mcp-coach.d.ts.map +1 -1
  24. package/dist/commands/mcp-coach.js +11 -11
  25. package/dist/commands/mcp-coach.js.map +1 -1
  26. package/dist/commands/mcp-protocols.d.ts +7 -0
  27. package/dist/commands/mcp-protocols.d.ts.map +1 -0
  28. package/dist/commands/mcp-protocols.js +12 -0
  29. package/dist/commands/mcp-protocols.js.map +1 -0
  30. package/dist/commands/mcp-protocols.test.d.ts +2 -0
  31. package/dist/commands/mcp-protocols.test.d.ts.map +1 -0
  32. package/dist/commands/mcp-protocols.test.js +60 -0
  33. package/dist/commands/mcp-protocols.test.js.map +1 -0
  34. package/dist/commands/mcp-stdio.test.d.ts +2 -0
  35. package/dist/commands/mcp-stdio.test.d.ts.map +1 -0
  36. package/dist/commands/mcp-stdio.test.js +79 -0
  37. package/dist/commands/mcp-stdio.test.js.map +1 -0
  38. package/dist/commands/mcp-tool-handlers.d.ts +1 -1
  39. package/dist/commands/mcp-tool-handlers.d.ts.map +1 -1
  40. package/dist/commands/mcp-tool-handlers.js +9 -8
  41. package/dist/commands/mcp-tool-handlers.js.map +1 -1
  42. package/dist/commands/mcp-tools-defs.d.ts +74 -73
  43. package/dist/commands/mcp-tools-defs.d.ts.map +1 -1
  44. package/dist/commands/mcp-tools-defs.js +64 -57
  45. package/dist/commands/mcp-tools-defs.js.map +1 -1
  46. package/dist/commands/mcp-tools-defs.test.d.ts +2 -0
  47. package/dist/commands/mcp-tools-defs.test.d.ts.map +1 -0
  48. package/dist/commands/mcp-tools-defs.test.js +11 -0
  49. package/dist/commands/mcp-tools-defs.test.js.map +1 -0
  50. package/dist/commands/mcp.d.ts +1 -3
  51. package/dist/commands/mcp.d.ts.map +1 -1
  52. package/dist/commands/mcp.js +15 -14
  53. package/dist/commands/mcp.js.map +1 -1
  54. package/dist/commands/new-project.d.ts +19 -27
  55. package/dist/commands/new-project.d.ts.map +1 -1
  56. package/dist/commands/new-project.js +19 -18
  57. package/dist/commands/new-project.js.map +1 -1
  58. package/dist/mcp-content/architecture.d.ts +1 -1
  59. package/dist/mcp-content/architecture.d.ts.map +1 -1
  60. package/dist/mcp-content/architecture.js +3 -3
  61. package/dist/mcp-content/features.d.ts +1 -1
  62. package/dist/mcp-content/features.d.ts.map +1 -1
  63. package/dist/mcp-content/features.js +1 -1
  64. package/dist/mcp-content/getting-started.d.ts +1 -1
  65. package/dist/mcp-content/getting-started.d.ts.map +1 -1
  66. package/dist/mcp-content/getting-started.js +37 -37
  67. package/dist/mcp-content/overview.d.ts +1 -1
  68. package/dist/mcp-content/overview.d.ts.map +1 -1
  69. package/dist/mcp-content/overview.js +6 -6
  70. package/dist/mcp-content/schemas/blog.d.ts +1 -1
  71. package/dist/mcp-content/schemas/blog.d.ts.map +1 -1
  72. package/dist/mcp-content/schemas/blog.js +25 -25
  73. package/dist/mcp-content/schemas/ecommerce.d.ts +1 -1
  74. package/dist/mcp-content/schemas/ecommerce.d.ts.map +1 -1
  75. package/dist/mcp-content/schemas/ecommerce.js +67 -67
  76. package/dist/mcp-content/schemas/social.d.ts +1 -1
  77. package/dist/mcp-content/schemas/social.d.ts.map +1 -1
  78. package/dist/mcp-content/schemas/social.js +48 -48
  79. package/dist/mcp-content/schemas/todo.d.ts +1 -1
  80. package/dist/mcp-content/schemas/todo.d.ts.map +1 -1
  81. package/dist/mcp-content/schemas/todo.js +35 -35
  82. package/dist/mcp-runtime/runtime.d.ts +5 -5
  83. package/dist/mcp-runtime/runtime.d.ts.map +1 -1
  84. package/dist/mcp-runtime/runtime.js +5 -5
  85. package/dist/mcp-runtime/runtime.js.map +1 -1
  86. package/dist/mod.js +1 -1
  87. package/dist/module-loader.d.ts +2 -2
  88. package/dist/module-loader.d.ts.map +1 -1
  89. package/dist/module-loader.js +8 -8
  90. package/dist/module-loader.js.map +1 -1
  91. package/dist/package-manager.d.ts +3 -3
  92. package/dist/package-manager.d.ts.map +1 -1
  93. package/dist/package-manager.test.js +1 -1
  94. package/dist/sync-operations.d.ts +24 -30
  95. package/dist/sync-operations.d.ts.map +1 -1
  96. package/dist/sync-operations.js +15 -15
  97. package/dist/sync-operations.js.map +1 -1
  98. package/package.json +45 -59
  99. package/src/__tests__/fixtures/.gitignore +1 -0
  100. package/src/__tests__/fixtures/mock-config.ts +21 -10
  101. package/src/__tests__/sync-operations.test.ts +36 -35
  102. package/src/bin.ts +7 -6
  103. package/src/cli.ts +1 -1
  104. package/src/commands/__fixtures__/mcp-protocol-server.ts +12 -0
  105. package/src/commands/import-export.ts +29 -29
  106. package/src/commands/mcp-coach.ts +13 -12
  107. package/src/commands/mcp-protocols.test.ts +76 -0
  108. package/src/commands/mcp-protocols.ts +12 -0
  109. package/src/commands/mcp-stdio.test.ts +93 -0
  110. package/src/commands/mcp-tool-handlers.ts +11 -8
  111. package/src/commands/mcp-tools-defs.test.ts +13 -0
  112. package/src/commands/mcp-tools-defs.ts +57 -55
  113. package/src/commands/mcp.ts +9 -4
  114. package/src/commands/new-project.ts +50 -37
  115. package/src/mcp-content/architecture.ts +3 -3
  116. package/src/mcp-content/features.ts +1 -1
  117. package/src/mcp-content/getting-started.ts +37 -37
  118. package/src/mcp-content/overview.ts +6 -6
  119. package/src/mcp-content/schemas/blog.ts +25 -25
  120. package/src/mcp-content/schemas/ecommerce.ts +67 -67
  121. package/src/mcp-content/schemas/social.ts +48 -48
  122. package/src/mcp-content/schemas/todo.ts +35 -35
  123. package/src/mcp-runtime/runtime.ts +7 -7
  124. package/src/module-loader.ts +11 -12
  125. package/src/sync-operations.ts +26 -19
@@ -36,13 +36,13 @@ export const tables = {
36
36
  createdAt: State.SQLite.integer({ schema: Schema.DateFromNumber }),
37
37
  },
38
38
  }),
39
-
39
+
40
40
  // Client-only state (not synced)
41
41
  uiState: State.SQLite.clientDocument({
42
42
  name: 'uiState',
43
- schema: Schema.Struct({
44
- newTodoText: Schema.String,
45
- filter: Schema.Literal('all', 'active', 'completed')
43
+ schema: Schema.Struct({
44
+ newTodoText: Schema.String,
45
+ filter: Schema.Literal('all', 'active', 'completed')
46
46
  }),
47
47
  default: { id: SessionIdSymbol, value: { newTodoText: '', filter: 'all' } },
48
48
  }),
@@ -52,10 +52,10 @@ export const tables = {
52
52
  export const events = {
53
53
  todoCreated: Events.synced({
54
54
  name: 'v1.TodoCreated',
55
- schema: Schema.Struct({
56
- id: Schema.String,
55
+ schema: Schema.Struct({
56
+ id: Schema.String,
57
57
  text: Schema.String,
58
- createdAt: Schema.Date
58
+ createdAt: Schema.Date
59
59
  }),
60
60
  }),
61
61
  todoCompleted: Events.synced({
@@ -70,23 +70,23 @@ export const events = {
70
70
  name: 'v1.TodoDeleted',
71
71
  schema: Schema.Struct({ id: Schema.String, deletedAt: Schema.Date }),
72
72
  }),
73
-
73
+
74
74
  // UI state events (local only)
75
75
  uiStateSet: tables.uiState.set,
76
76
  }
77
77
 
78
78
  // Materializers map events to state changes
79
79
  const materializers = State.SQLite.materializers(events, {
80
- 'v1.TodoCreated': ({ id, text, createdAt }) =>
80
+ 'v1.TodoCreated': ({ id, text, createdAt }) =>
81
81
  tables.todos.insert({ id, text, completed: false, createdAt }),
82
-
83
- 'v1.TodoCompleted': ({ id }) =>
82
+
83
+ 'v1.TodoCompleted': ({ id }) =>
84
84
  tables.todos.update({ completed: true }).where({ id }),
85
-
86
- 'v1.TodoUncompleted': ({ id }) =>
85
+
86
+ 'v1.TodoUncompleted': ({ id }) =>
87
87
  tables.todos.update({ completed: false }).where({ id }),
88
-
89
- 'v1.TodoDeleted': ({ id, deletedAt }) =>
88
+
89
+ 'v1.TodoDeleted': ({ id, deletedAt }) =>
90
90
  tables.todos.update({ deletedAt }).where({ id }),
91
91
  })
92
92
 
@@ -144,28 +144,28 @@ const TodoApp: React.FC = () => {
144
144
  const activeTodos = useLiveQuery(activeTodos$)
145
145
  const completedTodos = useLiveQuery(completedTodos$)
146
146
  const uiState = useLiveQuery(uiState$)
147
-
147
+
148
148
  const createTodo = (text: string) => {
149
149
  const id = crypto.randomUUID()
150
150
  dispatchEvent(events.todoCreated({ id, text, createdAt: new Date() }))
151
151
  }
152
-
152
+
153
153
  const toggleTodo = (id: string, completed: boolean) => {
154
154
  dispatchEvent(
155
- completed
155
+ completed
156
156
  ? events.todoCompleted({ id })
157
157
  : events.todoUncompleted({ id })
158
158
  )
159
159
  }
160
-
160
+
161
161
  const deleteTodo = (id: string) => {
162
162
  dispatchEvent(events.todoDeleted({ id, deletedAt: new Date() }))
163
163
  }
164
-
164
+
165
165
  return (
166
166
  <div className="todo-app">
167
167
  <h1>Local-First Todos</h1>
168
-
168
+
169
169
  {/* Add todo form */}
170
170
  <form onSubmit={(e) => {
171
171
  e.preventDefault()
@@ -179,13 +179,13 @@ const TodoApp: React.FC = () => {
179
179
  <input name="todo" placeholder="What needs to be done?" />
180
180
  <button type="submit">Add Todo</button>
181
181
  </form>
182
-
182
+
183
183
  {/* Active todos */}
184
184
  <div className="todo-list">
185
185
  <h2>Active ({activeTodos.length})</h2>
186
186
  {activeTodos.map(todo => (
187
187
  <div key={todo.id} className="todo-item">
188
- <input
188
+ <input
189
189
  type="checkbox"
190
190
  checked={false}
191
191
  onChange={() => toggleTodo(todo.id, true)}
@@ -195,13 +195,13 @@ const TodoApp: React.FC = () => {
195
195
  </div>
196
196
  ))}
197
197
  </div>
198
-
198
+
199
199
  {/* Completed todos */}
200
200
  <div className="todo-list">
201
201
  <h2>Completed ({completedTodos.length})</h2>
202
202
  {completedTodos.map(todo => (
203
203
  <div key={todo.id} className="todo-item completed">
204
- <input
204
+ <input
205
205
  type="checkbox"
206
206
  checked={true}
207
207
  onChange={() => toggleTodo(todo.id, false)}
@@ -225,16 +225,16 @@ export default TodoApp
225
225
  <template>
226
226
  <div class="todo-app">
227
227
  <h1>Local-First Todos</h1>
228
-
228
+
229
229
  <form @submit.prevent="createTodo">
230
230
  <input v-model="newTodoText" placeholder="What needs to be done?" />
231
231
  <button type="submit">Add Todo</button>
232
232
  </form>
233
-
233
+
234
234
  <div class="todo-list">
235
235
  <h2>Active ({{ activeTodos.length }})</h2>
236
236
  <div v-for="todo in activeTodos" :key="todo.id" class="todo-item">
237
- <input
237
+ <input
238
238
  type="checkbox"
239
239
  :checked="false"
240
240
  @change="toggleTodo(todo.id, true)"
@@ -258,10 +258,10 @@ const newTodoText = ref('')
258
258
  const createTodo = () => {
259
259
  if (newTodoText.value.trim()) {
260
260
  const id = crypto.randomUUID()
261
- dispatchEvent(events.todoCreated({
262
- id,
263
- text: newTodoText.value.trim(),
264
- createdAt: new Date()
261
+ dispatchEvent(events.todoCreated({
262
+ id,
263
+ text: newTodoText.value.trim(),
264
+ createdAt: new Date()
265
265
  }))
266
266
  newTodoText.value = ''
267
267
  }
@@ -269,7 +269,7 @@ const createTodo = () => {
269
269
 
270
270
  const toggleTodo = (id: string, completed: boolean) => {
271
271
  dispatchEvent(
272
- completed
272
+ completed
273
273
  ? events.todoCompleted({ id })
274
274
  : events.todoUncompleted({ id })
275
275
  )
@@ -332,7 +332,7 @@ Multiple users can collaborate in real-time. Conflicts are automatically resolve
332
332
  \`\`\`typescript
333
333
  // Custom conflict resolution
334
334
  const materializers = State.SQLite.materializers(events, {
335
- 'v1.TodoTextChanged': ({ id, text, editedAt }) =>
335
+ 'v1.TodoTextChanged': ({ id, text, editedAt }) =>
336
336
  // Use timestamp for conflict resolution
337
337
  tables.todos
338
338
  .update({ text, editedAt })
@@ -350,18 +350,18 @@ import { schema, events } from './schema.js'
350
350
 
351
351
  test('creating and completing todos', async () => {
352
352
  const store = createTestStore(schema)
353
-
353
+
354
354
  // Dispatch events
355
355
  await store.dispatch([
356
356
  events.todoCreated({ id: '1', text: 'Test todo', createdAt: new Date() }),
357
357
  events.todoCompleted({ id: '1' })
358
358
  ])
359
-
359
+
360
360
  // Query final state
361
361
  const completedTodos = await store.query(
362
362
  tables.todos.select().where({ completed: true })
363
363
  )
364
-
364
+
365
365
  expect(completedTodos).toHaveLength(1)
366
366
  expect(completedTodos[0].text).toBe('Test todo')
367
367
  })
@@ -26,7 +26,7 @@ LiveStore is a production-ready local-first data platform that combines the imme
26
26
 
27
27
  ### 🔐 End-to-End Type Safety
28
28
  - **Schema-first development** with Effect-based validation
29
- - **Compile-time query validation** prevents runtime errors
29
+ - **Compile-time query validation** prevents runtime errors
30
30
  - **Automatic TypeScript generation** from schema definitions
31
31
  - **Runtime safety** with comprehensive input validation
32
32
 
@@ -43,7 +43,7 @@ LiveStore is a production-ready local-first data platform that combines the imme
43
43
  - **Design tools** with multiplayer editing capabilities
44
44
  - **Chat applications** with offline message queuing
45
45
 
46
- ### 📱 Mobile-First Applications
46
+ ### 📱 Mobile-First Applications
47
47
  - **Field service apps** that work in areas with poor connectivity
48
48
  - **Healthcare applications** with sensitive data that must stay local
49
49
  - **Educational apps** for students in low-connectivity environments
@@ -61,16 +61,16 @@ LiveStore is a production-ready local-first data platform that combines the imme
61
61
  graph TB
62
62
  UI[UI Framework] --> Queries[Reactive Queries]
63
63
  UI --> Events[Event Dispatch]
64
-
64
+
65
65
  Events --> EventLog[Event Log]
66
66
  EventLog --> Materializers[Materializers]
67
67
  Materializers --> SQLite[SQLite Database]
68
68
  Queries --> SQLite
69
-
69
+
70
70
  EventLog --> Sync[Sync Engine]
71
71
  Sync --> Network[Network Layer]
72
72
  Network --> Server[Sync Server]
73
-
73
+
74
74
  Server --> OtherClients[Other Clients]
75
75
  OtherClients --> Server
76
76
  Server --> Network
@@ -95,7 +95,7 @@ Unlike traditional ORMs that hide change tracking, LiveStore makes all state cha
95
95
  ### Sophisticated Conflict Resolution
96
96
  LiveStore handles conflicts intelligently using multiple strategies:
97
97
  - **Last-Write-Wins**: Simple timestamp-based resolution
98
- - **Semantic Merging**: Application-specific conflict resolution logic
98
+ - **Semantic Merging**: Application-specific conflict resolution logic
99
99
  - **Operational Transforms**: For real-time collaborative text editing
100
100
  - **CRDT Integration**: Conflict-free data types for specific use cases
101
101
 
@@ -17,7 +17,7 @@ export const tables = {
17
17
  version: State.SQLite.integer({ default: 1 }), // For optimistic concurrency
18
18
  },
19
19
  }),
20
-
20
+
21
21
  comments: State.SQLite.table({
22
22
  name: 'comments',
23
23
  columns: {
@@ -31,7 +31,7 @@ export const tables = {
31
31
  deletedAt: State.SQLite.integer({ nullable: true, schema: Schema.DateFromNumber }),
32
32
  },
33
33
  }),
34
-
34
+
35
35
  authors: State.SQLite.table({
36
36
  name: 'authors',
37
37
  columns: {
@@ -43,7 +43,7 @@ export const tables = {
43
43
  createdAt: State.SQLite.integer({ schema: Schema.DateFromNumber }),
44
44
  },
45
45
  }),
46
-
46
+
47
47
  // Track collaborative editing sessions
48
48
  editingSessions: State.SQLite.clientDocument({
49
49
  name: 'editingSessions',
@@ -53,8 +53,8 @@ export const tables = {
53
53
  lastActivity: Schema.Date,
54
54
  cursorPosition: Schema.Number,
55
55
  }),
56
- default: {
57
- id: SessionIdSymbol,
56
+ default: {
57
+ id: SessionIdSymbol,
58
58
  value: { postId: '', authorId: '', lastActivity: new Date(), cursorPosition: 0 }
59
59
  },
60
60
  }),
@@ -72,7 +72,7 @@ export const events = {
72
72
  createdAt: Schema.Date,
73
73
  }),
74
74
  }),
75
-
75
+
76
76
  postTitleChanged: Events.synced({
77
77
  name: 'v1.PostTitleChanged',
78
78
  schema: Schema.Struct({
@@ -81,7 +81,7 @@ export const events = {
81
81
  version: Schema.Number, // Optimistic concurrency control
82
82
  }),
83
83
  }),
84
-
84
+
85
85
  postContentChanged: Events.synced({
86
86
  name: 'v1.PostContentChanged',
87
87
  schema: Schema.Struct({
@@ -91,7 +91,7 @@ export const events = {
91
91
  authorId: Schema.String,
92
92
  }),
93
93
  }),
94
-
94
+
95
95
  postPublished: Events.synced({
96
96
  name: 'v1.PostPublished',
97
97
  schema: Schema.Struct({
@@ -99,12 +99,12 @@ export const events = {
99
99
  publishedAt: Schema.Date,
100
100
  }),
101
101
  }),
102
-
102
+
103
103
  postUnpublished: Events.synced({
104
104
  name: 'v1.PostUnpublished',
105
105
  schema: Schema.Struct({ id: Schema.String }),
106
106
  }),
107
-
107
+
108
108
  postDeleted: Events.synced({
109
109
  name: 'v1.PostDeleted',
110
110
  schema: Schema.Struct({
@@ -112,7 +112,7 @@ export const events = {
112
112
  deletedAt: Schema.Date,
113
113
  }),
114
114
  }),
115
-
115
+
116
116
  // Comment events
117
117
  commentCreated: Events.synced({
118
118
  name: 'v1.CommentCreated',
@@ -125,7 +125,7 @@ export const events = {
125
125
  createdAt: Schema.Date,
126
126
  }),
127
127
  }),
128
-
128
+
129
129
  commentEdited: Events.synced({
130
130
  name: 'v1.CommentEdited',
131
131
  schema: Schema.Struct({
@@ -134,7 +134,7 @@ export const events = {
134
134
  editedAt: Schema.Date,
135
135
  }),
136
136
  }),
137
-
137
+
138
138
  commentDeleted: Events.synced({
139
139
  name: 'v1.CommentDeleted',
140
140
  schema: Schema.Struct({
@@ -142,7 +142,7 @@ export const events = {
142
142
  deletedAt: Schema.Date,
143
143
  }),
144
144
  }),
145
-
145
+
146
146
  // Author events
147
147
  authorCreated: Events.synced({
148
148
  name: 'v1.AuthorCreated',
@@ -153,7 +153,7 @@ export const events = {
153
153
  createdAt: Schema.Date,
154
154
  }),
155
155
  }),
156
-
156
+
157
157
  // Local editing session tracking
158
158
  editingSessionUpdated: tables.editingSessions.set,
159
159
  }
@@ -163,33 +163,33 @@ const materializers = State.SQLite.materializers(events, {
163
163
  // Post materializers
164
164
  'v1.PostCreated': ({ id, title, slug, authorId, createdAt }) =>
165
165
  tables.posts.insert({ id, title, content: '', slug, authorId, createdAt, version: 1 }),
166
-
166
+
167
167
  'v1.PostTitleChanged': ({ id, title, version }) =>
168
168
  // Last-write-wins with version check for optimistic concurrency
169
169
  tables.posts.update({ title, version }).where({ id }),
170
-
170
+
171
171
  'v1.PostContentChanged': ({ id, content, version, authorId }) =>
172
172
  tables.posts.update({ content, version }).where({ id }),
173
-
173
+
174
174
  'v1.PostPublished': ({ id, publishedAt }) =>
175
175
  tables.posts.update({ published: true, publishedAt }).where({ id }),
176
-
176
+
177
177
  'v1.PostUnpublished': ({ id }) =>
178
178
  tables.posts.update({ published: false, publishedAt: null }).where({ id }),
179
-
179
+
180
180
  'v1.PostDeleted': ({ id, deletedAt }) =>
181
181
  tables.posts.update({ deletedAt }).where({ id }),
182
-
182
+
183
183
  // Comment materializers
184
184
  'v1.CommentCreated': ({ id, postId, authorId, content, parentId, createdAt }) =>
185
185
  tables.comments.insert({ id, postId, authorId, content, parentId, createdAt }),
186
-
186
+
187
187
  'v1.CommentEdited': ({ id, content, editedAt }) =>
188
188
  tables.comments.update({ content, editedAt }).where({ id }),
189
-
189
+
190
190
  'v1.CommentDeleted': ({ id, deletedAt }) =>
191
191
  tables.comments.update({ deletedAt }).where({ id }),
192
-
192
+
193
193
  // Author materializers
194
194
  'v1.AuthorCreated': ({ id, name, email, createdAt }) =>
195
195
  tables.authors.insert({ id, name, email, createdAt }),
@@ -215,7 +215,7 @@ export const schema = makeSchema({ events, state })
215
215
  // const postComments$ = (postId: string) => queryDb(
216
216
  // tables.comments
217
217
  // .select()
218
- // .join(tables.authors, 'authorId', 'id')
218
+ // .join(tables.authors, 'authorId', 'id')
219
219
  // .where({ postId, deletedAt: null })
220
220
  // .orderBy('createdAt'),
221
221
  // { label: \`postComments-\${postId}\` }