@livestore/common 0.3.2-dev.0 → 0.3.2-dev.10

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 (265) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/ClientSessionLeaderThreadProxy.d.ts +7 -7
  3. package/dist/__tests__/fixture.d.ts +4 -4
  4. package/dist/__tests__/fixture.js +2 -2
  5. package/dist/adapter-types.d.ts +9 -9
  6. package/dist/adapter-types.d.ts.map +1 -1
  7. package/dist/adapter-types.js +4 -4
  8. package/dist/adapter-types.js.map +1 -1
  9. package/dist/debug-info.d.ts +2 -2
  10. package/dist/debug-info.js +2 -2
  11. package/dist/devtools/devtools-messages-client-session.d.ts +27 -27
  12. package/dist/devtools/devtools-messages-client-session.js +4 -4
  13. package/dist/devtools/devtools-messages-common.d.ts +6 -6
  14. package/dist/devtools/devtools-messages-common.d.ts.map +1 -1
  15. package/dist/devtools/devtools-messages-common.js +1 -1
  16. package/dist/devtools/devtools-messages-leader.d.ts +35 -35
  17. package/dist/devtools/devtools-messages-leader.js +4 -4
  18. package/dist/devtools/devtools-messages.d.ts +3 -3
  19. package/dist/devtools/devtools-messages.d.ts.map +1 -1
  20. package/dist/devtools/devtools-messages.js +3 -3
  21. package/dist/devtools/devtools-messages.js.map +1 -1
  22. package/dist/devtools/mod.d.ts +3 -3
  23. package/dist/devtools/mod.js +3 -3
  24. package/dist/index.d.ts +16 -16
  25. package/dist/index.d.ts.map +1 -1
  26. package/dist/index.js +16 -16
  27. package/dist/index.js.map +1 -1
  28. package/dist/leader-thread/LeaderSyncProcessor.d.ts +5 -5
  29. package/dist/leader-thread/LeaderSyncProcessor.js +11 -11
  30. package/dist/leader-thread/LeaderSyncProcessor.js.map +1 -1
  31. package/dist/leader-thread/connection.d.ts +4 -4
  32. package/dist/leader-thread/connection.js +2 -2
  33. package/dist/leader-thread/eventlog.d.ts +7 -7
  34. package/dist/leader-thread/eventlog.js +8 -8
  35. package/dist/leader-thread/eventlog.js.map +1 -1
  36. package/dist/leader-thread/leader-worker-devtools.d.ts +3 -3
  37. package/dist/leader-thread/leader-worker-devtools.js +3 -3
  38. package/dist/leader-thread/make-leader-thread-layer.d.ts +7 -7
  39. package/dist/leader-thread/make-leader-thread-layer.js +10 -10
  40. package/dist/leader-thread/materialize-event.d.ts +4 -4
  41. package/dist/leader-thread/materialize-event.js +7 -7
  42. package/dist/leader-thread/mod.d.ts +8 -8
  43. package/dist/leader-thread/mod.d.ts.map +1 -1
  44. package/dist/leader-thread/mod.js +8 -8
  45. package/dist/leader-thread/mod.js.map +1 -1
  46. package/dist/leader-thread/recreate-db.d.ts +5 -5
  47. package/dist/leader-thread/recreate-db.js +2 -2
  48. package/dist/leader-thread/shutdown-channel.d.ts +1 -1
  49. package/dist/leader-thread/shutdown-channel.js +1 -1
  50. package/dist/leader-thread/types.d.ts +6 -6
  51. package/dist/make-client-session.d.ts +2 -2
  52. package/dist/make-client-session.d.ts.map +1 -1
  53. package/dist/make-client-session.js +2 -2
  54. package/dist/make-client-session.js.map +1 -1
  55. package/dist/materializer-helper.d.ts +5 -5
  56. package/dist/materializer-helper.js +5 -5
  57. package/dist/rematerialize-from-eventlog.d.ts +4 -4
  58. package/dist/rematerialize-from-eventlog.js +3 -3
  59. package/dist/schema/EventDef.d.ts +178 -132
  60. package/dist/schema/EventDef.d.ts.map +1 -1
  61. package/dist/schema/EventDef.js +0 -15
  62. package/dist/schema/EventDef.js.map +1 -1
  63. package/dist/schema/EventSequenceNumber.test.js +1 -1
  64. package/dist/schema/LiveStoreEvent.d.ts +5 -5
  65. package/dist/schema/LiveStoreEvent.js +1 -1
  66. package/dist/schema/events.d.ts +1 -1
  67. package/dist/schema/events.d.ts.map +1 -1
  68. package/dist/schema/events.js +1 -1
  69. package/dist/schema/events.js.map +1 -1
  70. package/dist/schema/mod.d.ts +9 -9
  71. package/dist/schema/mod.d.ts.map +1 -1
  72. package/dist/schema/mod.js +9 -9
  73. package/dist/schema/mod.js.map +1 -1
  74. package/dist/schema/schema.d.ts +4 -8
  75. package/dist/schema/schema.d.ts.map +1 -1
  76. package/dist/schema/schema.js +2 -4
  77. package/dist/schema/schema.js.map +1 -1
  78. package/dist/schema/state/mod.d.ts +2 -2
  79. package/dist/schema/state/mod.js +2 -2
  80. package/dist/schema/state/sqlite/client-document-def.d.ts +17 -5
  81. package/dist/schema/state/sqlite/client-document-def.d.ts.map +1 -1
  82. package/dist/schema/state/sqlite/client-document-def.js +18 -6
  83. package/dist/schema/state/sqlite/client-document-def.js.map +1 -1
  84. package/dist/schema/state/sqlite/client-document-def.test.js +4 -6
  85. package/dist/schema/state/sqlite/client-document-def.test.js.map +1 -1
  86. package/dist/schema/state/sqlite/db-schema/ast/sqlite.js +1 -1
  87. package/dist/schema/state/sqlite/db-schema/ast/validate.d.ts +1 -1
  88. package/dist/schema/state/sqlite/db-schema/dsl/field-defs.test.js +1 -1
  89. package/dist/schema/state/sqlite/db-schema/dsl/mod.d.ts +165 -65
  90. package/dist/schema/state/sqlite/db-schema/dsl/mod.d.ts.map +1 -1
  91. package/dist/schema/state/sqlite/db-schema/dsl/mod.js +1 -1
  92. package/dist/schema/state/sqlite/db-schema/dsl/mod.js.map +1 -1
  93. package/dist/schema/state/sqlite/db-schema/hash.d.ts.map +1 -1
  94. package/dist/schema/state/sqlite/db-schema/hash.js +0 -1
  95. package/dist/schema/state/sqlite/db-schema/hash.js.map +1 -1
  96. package/dist/schema/state/sqlite/db-schema/mod.d.ts +2 -2
  97. package/dist/schema/state/sqlite/db-schema/mod.d.ts.map +1 -1
  98. package/dist/schema/state/sqlite/db-schema/mod.js +2 -2
  99. package/dist/schema/state/sqlite/db-schema/mod.js.map +1 -1
  100. package/dist/schema/state/sqlite/mod.d.ts +7 -7
  101. package/dist/schema/state/sqlite/mod.d.ts.map +1 -1
  102. package/dist/schema/state/sqlite/mod.js +6 -8
  103. package/dist/schema/state/sqlite/mod.js.map +1 -1
  104. package/dist/schema/state/sqlite/query-builder/api.d.ts +560 -307
  105. package/dist/schema/state/sqlite/query-builder/astToSql.d.ts +2 -2
  106. package/dist/schema/state/sqlite/query-builder/astToSql.js +1 -1
  107. package/dist/schema/state/sqlite/query-builder/impl.d.ts +2 -2
  108. package/dist/schema/state/sqlite/query-builder/impl.d.ts.map +1 -1
  109. package/dist/schema/state/sqlite/query-builder/impl.js +4 -14
  110. package/dist/schema/state/sqlite/query-builder/impl.js.map +1 -1
  111. package/dist/schema/state/sqlite/query-builder/impl.test.js +3 -3
  112. package/dist/schema/state/sqlite/query-builder/mod.d.ts +2 -2
  113. package/dist/schema/state/sqlite/query-builder/mod.js +2 -2
  114. package/dist/schema/state/sqlite/schema-helpers.d.ts +1 -1
  115. package/dist/schema/state/sqlite/schema-helpers.js +1 -1
  116. package/dist/schema/state/sqlite/system-tables.d.ts +10 -10
  117. package/dist/schema/state/sqlite/system-tables.js +3 -3
  118. package/dist/schema/state/sqlite/table-def.d.ts +152 -70
  119. package/dist/schema/state/sqlite/table-def.js +2 -2
  120. package/dist/schema-management/common.d.ts +2 -2
  121. package/dist/schema-management/common.js +1 -1
  122. package/dist/schema-management/migrations.d.ts +6 -6
  123. package/dist/schema-management/migrations.js +5 -5
  124. package/dist/schema-management/validate-schema.d.ts +5 -5
  125. package/dist/schema-management/validate-schema.d.ts.map +1 -1
  126. package/dist/schema-management/validate-schema.js +2 -2
  127. package/dist/schema-management/validate-schema.js.map +1 -1
  128. package/dist/sql-queries/index.d.ts +3 -3
  129. package/dist/sql-queries/index.js +3 -3
  130. package/dist/sql-queries/sql-queries.d.ts +2 -2
  131. package/dist/sql-queries/sql-queries.js +3 -3
  132. package/dist/sql-queries/sql-query-builder.d.ts +3 -3
  133. package/dist/sql-queries/sql-query-builder.js +1 -1
  134. package/dist/sql-queries/types.d.ts +133 -37
  135. package/dist/sqlite-db-helper.d.ts +2 -2
  136. package/dist/sqlite-db-helper.js +1 -1
  137. package/dist/sqlite-types.d.ts +4 -4
  138. package/dist/sync/ClientSessionSyncProcessor.d.ts +17 -6
  139. package/dist/sync/ClientSessionSyncProcessor.d.ts.map +1 -1
  140. package/dist/sync/ClientSessionSyncProcessor.js +30 -11
  141. package/dist/sync/ClientSessionSyncProcessor.js.map +1 -1
  142. package/dist/sync/index.d.ts +3 -3
  143. package/dist/sync/index.d.ts.map +1 -1
  144. package/dist/sync/index.js +3 -3
  145. package/dist/sync/index.js.map +1 -1
  146. package/dist/sync/next/compact-events.d.ts +1 -1
  147. package/dist/sync/next/compact-events.js +4 -4
  148. package/dist/sync/next/facts.d.ts +3 -3
  149. package/dist/sync/next/facts.js +2 -2
  150. package/dist/sync/next/graphology.d.ts.map +1 -1
  151. package/dist/sync/next/graphology.js.map +1 -1
  152. package/dist/sync/next/graphology_.d.ts +1 -1
  153. package/dist/sync/next/graphology_.d.ts.map +1 -1
  154. package/dist/sync/next/graphology_.js +1 -1
  155. package/dist/sync/next/graphology_.js.map +1 -1
  156. package/dist/sync/next/history-dag-common.d.ts +3 -3
  157. package/dist/sync/next/history-dag-common.js +2 -2
  158. package/dist/sync/next/history-dag.d.ts +2 -2
  159. package/dist/sync/next/history-dag.js +3 -3
  160. package/dist/sync/next/mod.d.ts +5 -5
  161. package/dist/sync/next/mod.d.ts.map +1 -1
  162. package/dist/sync/next/mod.js +5 -5
  163. package/dist/sync/next/mod.js.map +1 -1
  164. package/dist/sync/next/rebase-events.d.ts +4 -4
  165. package/dist/sync/next/rebase-events.d.ts.map +1 -1
  166. package/dist/sync/next/rebase-events.js +2 -2
  167. package/dist/sync/next/rebase-events.js.map +1 -1
  168. package/dist/sync/next/test/compact-events.calculator.test.js +4 -4
  169. package/dist/sync/next/test/compact-events.test.js +4 -4
  170. package/dist/sync/next/test/event-fixtures.d.ts +3 -3
  171. package/dist/sync/next/test/event-fixtures.js +5 -5
  172. package/dist/sync/next/test/mod.d.ts +1 -1
  173. package/dist/sync/next/test/mod.js +1 -1
  174. package/dist/sync/sync.d.ts +4 -4
  175. package/dist/sync/sync.js +1 -1
  176. package/dist/sync/syncstate.d.ts +1 -1
  177. package/dist/sync/syncstate.js +2 -2
  178. package/dist/sync/syncstate.test.js +3 -4
  179. package/dist/sync/syncstate.test.js.map +1 -1
  180. package/dist/sync/validate-push-payload.d.ts +2 -2
  181. package/dist/sync/validate-push-payload.js +1 -1
  182. package/dist/util.d.ts.map +1 -1
  183. package/dist/util.js +0 -1
  184. package/dist/util.js.map +1 -1
  185. package/dist/version.d.ts +2 -2
  186. package/dist/version.d.ts.map +1 -1
  187. package/dist/version.js +2 -2
  188. package/dist/version.js.map +1 -1
  189. package/package.json +10 -49
  190. package/src/ClientSessionLeaderThreadProxy.ts +7 -7
  191. package/src/__tests__/fixture.ts +2 -2
  192. package/src/adapter-types.ts +10 -9
  193. package/src/debug-info.ts +2 -2
  194. package/src/devtools/devtools-messages-client-session.ts +4 -4
  195. package/src/devtools/devtools-messages-common.ts +1 -1
  196. package/src/devtools/devtools-messages-leader.ts +4 -4
  197. package/src/devtools/devtools-messages.ts +3 -3
  198. package/src/devtools/mod.ts +3 -3
  199. package/src/index.ts +16 -16
  200. package/src/leader-thread/LeaderSyncProcessor.ts +14 -14
  201. package/src/leader-thread/connection.ts +5 -5
  202. package/src/leader-thread/eventlog.ts +12 -12
  203. package/src/leader-thread/leader-worker-devtools.ts +4 -4
  204. package/src/leader-thread/make-leader-thread-layer.ts +16 -16
  205. package/src/leader-thread/materialize-event.ts +9 -9
  206. package/src/leader-thread/mod.ts +8 -8
  207. package/src/leader-thread/recreate-db.ts +6 -6
  208. package/src/leader-thread/shutdown-channel.ts +1 -1
  209. package/src/leader-thread/types.ts +6 -6
  210. package/src/make-client-session.ts +3 -4
  211. package/src/materializer-helper.ts +11 -11
  212. package/src/rematerialize-from-eventlog.ts +6 -6
  213. package/src/schema/EventDef.ts +4 -24
  214. package/src/schema/EventSequenceNumber.test.ts +1 -1
  215. package/src/schema/LiveStoreEvent.ts +3 -3
  216. package/src/schema/events.ts +1 -1
  217. package/src/schema/mod.ts +9 -9
  218. package/src/schema/schema.ts +8 -11
  219. package/src/schema/state/mod.ts +2 -2
  220. package/src/schema/state/sqlite/client-document-def.test.ts +9 -7
  221. package/src/schema/state/sqlite/client-document-def.ts +57 -33
  222. package/src/schema/state/sqlite/db-schema/ast/sqlite.ts +1 -1
  223. package/src/schema/state/sqlite/db-schema/ast/validate.ts +1 -1
  224. package/src/schema/state/sqlite/db-schema/dsl/field-defs.test.ts +1 -1
  225. package/src/schema/state/sqlite/db-schema/dsl/mod.ts +19 -13
  226. package/src/schema/state/sqlite/db-schema/hash.ts +0 -1
  227. package/src/schema/state/sqlite/db-schema/mod.ts +2 -2
  228. package/src/schema/state/sqlite/mod.ts +13 -15
  229. package/src/schema/state/sqlite/query-builder/api.ts +5 -5
  230. package/src/schema/state/sqlite/query-builder/astToSql.ts +4 -4
  231. package/src/schema/state/sqlite/query-builder/impl.test.ts +4 -4
  232. package/src/schema/state/sqlite/query-builder/impl.ts +8 -16
  233. package/src/schema/state/sqlite/query-builder/mod.ts +2 -2
  234. package/src/schema/state/sqlite/schema-helpers.ts +2 -2
  235. package/src/schema/state/sqlite/system-tables.ts +3 -3
  236. package/src/schema/state/sqlite/table-def.ts +3 -3
  237. package/src/schema-management/common.ts +3 -3
  238. package/src/schema-management/migrations.ts +11 -11
  239. package/src/schema-management/validate-schema.ts +5 -5
  240. package/src/sql-queries/index.ts +3 -3
  241. package/src/sql-queries/sql-queries.ts +4 -4
  242. package/src/sql-queries/sql-query-builder.ts +4 -4
  243. package/src/sql-queries/types.ts +1 -1
  244. package/src/sqlite-db-helper.ts +3 -3
  245. package/src/sqlite-types.ts +4 -4
  246. package/src/sync/ClientSessionSyncProcessor.ts +50 -12
  247. package/src/sync/index.ts +3 -3
  248. package/src/sync/next/compact-events.ts +5 -5
  249. package/src/sync/next/facts.ts +4 -4
  250. package/src/sync/next/graphology.ts +2 -4
  251. package/src/sync/next/graphology_.ts +1 -1
  252. package/src/sync/next/history-dag-common.ts +3 -3
  253. package/src/sync/next/history-dag.ts +3 -3
  254. package/src/sync/next/mod.ts +5 -5
  255. package/src/sync/next/rebase-events.ts +6 -6
  256. package/src/sync/next/test/compact-events.calculator.test.ts +4 -4
  257. package/src/sync/next/test/compact-events.test.ts +5 -5
  258. package/src/sync/next/test/event-fixtures.ts +7 -7
  259. package/src/sync/next/test/mod.ts +1 -1
  260. package/src/sync/sync.ts +4 -4
  261. package/src/sync/syncstate.test.ts +9 -6
  262. package/src/sync/syncstate.ts +2 -2
  263. package/src/sync/validate-push-payload.ts +2 -2
  264. package/src/util.ts +0 -1
  265. package/src/version.ts +2 -2
@@ -8,15 +8,16 @@ import {
8
8
  type WebChannel,
9
9
  } from '@livestore/utils/effect'
10
10
 
11
- import type { ClientSessionLeaderThreadProxy } from './ClientSessionLeaderThreadProxy.js'
12
- import type * as Devtools from './devtools/mod.js'
13
- import type { IntentionalShutdownCause, SyncError, UnexpectedError } from './errors.js'
14
- import type { LiveStoreSchema } from './schema/mod.js'
15
- import type { SqliteDb } from './sqlite-types.js'
16
- export * as ClientSessionLeaderThreadProxy from './ClientSessionLeaderThreadProxy.js'
17
- export * from './defs.js'
18
- export * from './errors.js'
19
- export * from './sqlite-types.js'
11
+ import type { ClientSessionLeaderThreadProxy } from './ClientSessionLeaderThreadProxy.ts'
12
+ import type * as Devtools from './devtools/mod.ts'
13
+ import type { IntentionalShutdownCause, SyncError, UnexpectedError } from './errors.ts'
14
+ import type { LiveStoreSchema } from './schema/mod.ts'
15
+ import type { SqliteDb } from './sqlite-types.ts'
16
+
17
+ export * as ClientSessionLeaderThreadProxy from './ClientSessionLeaderThreadProxy.ts'
18
+ export * from './defs.ts'
19
+ export * from './errors.ts'
20
+ export * from './sqlite-types.ts'
20
21
 
21
22
  export interface ClientSession {
22
23
  /** SQLite database with synchronous API running in the same thread (usually in-memory) */
package/src/debug-info.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  /// <reference lib="dom" />
2
2
  import { ParseResult, Schema } from '@livestore/utils/effect'
3
3
 
4
- import { BoundArray } from './bounded-collections.js'
5
- import { PreparedBindValues } from './util.js'
4
+ import { BoundArray } from './bounded-collections.ts'
5
+ import { PreparedBindValues } from './util.ts'
6
6
 
7
7
  export type SlowQueryInfo = {
8
8
  queryStr: string
@@ -1,9 +1,9 @@
1
1
  import { Schema } from '@livestore/utils/effect'
2
2
 
3
- import { DebugInfo } from '../debug-info.js'
4
- import { EventSequenceNumber } from '../schema/mod.js'
5
- import { PreparedBindValues } from '../util.js'
6
- import { LSDClientSessionChannelMessage, LSDClientSessionReqResMessage } from './devtools-messages-common.js'
3
+ import { DebugInfo } from '../debug-info.ts'
4
+ import { EventSequenceNumber } from '../schema/mod.ts'
5
+ import { PreparedBindValues } from '../util.ts'
6
+ import { LSDClientSessionChannelMessage, LSDClientSessionReqResMessage } from './devtools-messages-common.ts'
7
7
 
8
8
  export class DebugInfoReq extends LSDClientSessionReqResMessage('LSD.ClientSession.DebugInfoReq', {}) {}
9
9
 
@@ -1,6 +1,6 @@
1
1
  import { Schema } from '@livestore/utils/effect'
2
2
 
3
- import { liveStoreVersion as pkgVersion } from '../version.js'
3
+ import { liveStoreVersion as pkgVersion } from '../version.ts'
4
4
 
5
5
  export const NetworkStatus = Schema.Struct({
6
6
  isConnected: Schema.Boolean,
@@ -1,9 +1,9 @@
1
1
  import { Schema, Transferable } from '@livestore/utils/effect'
2
2
 
3
- import * as LiveStoreEvent from '../schema/LiveStoreEvent.js'
4
- import { EventSequenceNumber } from '../schema/mod.js'
5
- import * as SyncState from '../sync/syncstate.js'
6
- import { LeaderReqResMessage, LSDMessage, LSDReqResMessage, NetworkStatus } from './devtools-messages-common.js'
3
+ import * as LiveStoreEvent from '../schema/LiveStoreEvent.ts'
4
+ import { EventSequenceNumber } from '../schema/mod.ts'
5
+ import * as SyncState from '../sync/syncstate.ts'
6
+ import { LeaderReqResMessage, LSDMessage, LSDReqResMessage, NetworkStatus } from './devtools-messages-common.ts'
7
7
 
8
8
  export class ResetAllDataReq extends LSDReqResMessage('LSD.Leader.ResetAllDataReq', {
9
9
  mode: Schema.Literal('all-data', 'only-app-db'),
@@ -1,3 +1,3 @@
1
- export * as ClientSession from './devtools-messages-client-session.js'
2
- export * as Leader from './devtools-messages-leader.js'
3
- export * from './devtools-messages-common.js'
1
+ export * as ClientSession from './devtools-messages-client-session.ts'
2
+ export * from './devtools-messages-common.ts'
3
+ export * as Leader from './devtools-messages-leader.ts'
@@ -3,10 +3,10 @@ import { Schema } from '@livestore/utils/effect'
3
3
  import { nanoid } from '@livestore/utils/nanoid'
4
4
  import type { MeshNode } from '@livestore/webmesh'
5
5
 
6
- import * as SessionInfo from './devtools-sessioninfo.js'
6
+ import * as SessionInfo from './devtools-sessioninfo.ts'
7
7
 
8
- export * from './devtools-messages.js'
9
- export * as SessionInfo from './devtools-sessioninfo.js'
8
+ export * from './devtools-messages.ts'
9
+ export * as SessionInfo from './devtools-sessioninfo.ts'
10
10
 
11
11
  export const DevtoolsMode = Schema.Union(
12
12
  Schema.TaggedStruct('node', {
package/src/index.ts CHANGED
@@ -1,16 +1,16 @@
1
- export * from './schema/state/sqlite/system-tables.js'
2
- export * from './util.js'
3
- export * from './adapter-types.js'
4
- export * from './schema-management/migrations.js'
5
- export * from './materializer-helper.js'
6
- export * from './rematerialize-from-eventlog.js'
7
- export * from './sync/index.js'
8
- export * as Devtools from './devtools/mod.js'
9
- export * from './debug-info.js'
10
- export * from './bounded-collections.js'
11
- export * from './version.js'
12
- export * from './schema/state/sqlite/query-builder/mod.js'
13
- export * as SyncState from './sync/syncstate.js'
14
- export * from './otel.js'
15
- export * from './make-client-session.js'
16
- export * as SqliteDbHelper from './sqlite-db-helper.js'
1
+ export * from './adapter-types.ts'
2
+ export * from './bounded-collections.ts'
3
+ export * from './debug-info.ts'
4
+ export * as Devtools from './devtools/mod.ts'
5
+ export * from './make-client-session.ts'
6
+ export * from './materializer-helper.ts'
7
+ export * from './otel.ts'
8
+ export * from './rematerialize-from-eventlog.ts'
9
+ export * from './schema/state/sqlite/query-builder/mod.ts'
10
+ export * from './schema/state/sqlite/system-tables.ts'
11
+ export * from './schema-management/migrations.ts'
12
+ export * as SqliteDbHelper from './sqlite-db-helper.ts'
13
+ export * from './sync/index.ts'
14
+ export * as SyncState from './sync/syncstate.ts'
15
+ export * from './util.ts'
16
+ export * from './version.ts'
@@ -17,18 +17,18 @@ import {
17
17
  } from '@livestore/utils/effect'
18
18
  import type * as otel from '@opentelemetry/api'
19
19
 
20
- import type { SqliteDb } from '../adapter-types.js'
21
- import { SyncError, UnexpectedError } from '../adapter-types.js'
22
- import { makeMaterializerHash } from '../materializer-helper.js'
23
- import type { LiveStoreSchema } from '../schema/mod.js'
24
- import { EventSequenceNumber, getEventDef, LiveStoreEvent, SystemTables } from '../schema/mod.js'
25
- import { LeaderAheadError } from '../sync/sync.js'
26
- import * as SyncState from '../sync/syncstate.js'
27
- import { sql } from '../util.js'
28
- import * as Eventlog from './eventlog.js'
29
- import { rollback } from './materialize-event.js'
30
- import type { InitialBlockingSyncContext, LeaderSyncProcessor } from './types.js'
31
- import { LeaderThreadCtx } from './types.js'
20
+ import type { SqliteDb } from '../adapter-types.ts'
21
+ import { SyncError, UnexpectedError } from '../adapter-types.ts'
22
+ import { makeMaterializerHash } from '../materializer-helper.ts'
23
+ import type { LiveStoreSchema } from '../schema/mod.ts'
24
+ import { EventSequenceNumber, getEventDef, LiveStoreEvent, SystemTables } from '../schema/mod.ts'
25
+ import { LeaderAheadError } from '../sync/sync.ts'
26
+ import * as SyncState from '../sync/syncstate.ts'
27
+ import { sql } from '../util.ts'
28
+ import * as Eventlog from './eventlog.ts'
29
+ import { rollback } from './materialize-event.ts'
30
+ import type { InitialBlockingSyncContext, LeaderSyncProcessor } from './types.ts'
31
+ import { LeaderThreadCtx } from './types.ts'
32
32
 
33
33
  type LocalPushQueueItem = [
34
34
  event: LiveStoreEvent.EncodedWithMeta,
@@ -98,8 +98,8 @@ export const makeLeaderSyncProcessor = ({
98
98
  }): Effect.Effect<LeaderSyncProcessor, UnexpectedError, Scope.Scope> =>
99
99
  Effect.gen(function* () {
100
100
  const syncBackendPushQueue = yield* BucketQueue.make<LiveStoreEvent.EncodedWithMeta>()
101
- const localPushBatchSize = params.localPushBatchSize ?? 10
102
- const backendPushBatchSize = params.backendPushBatchSize ?? 50
101
+ const localPushBatchSize = params.localPushBatchSize ?? 1
102
+ const backendPushBatchSize = params.backendPushBatchSize ?? 2
103
103
 
104
104
  const syncStateSref = yield* SubscriptionRef.make<SyncState.SyncState | undefined>(undefined)
105
105
 
@@ -1,11 +1,11 @@
1
1
  // import type { WaSqlite } from '@livestore/sqlite-wasm'
2
2
  import { Effect } from '@livestore/utils/effect'
3
3
 
4
- import type { SqliteDb } from '../adapter-types.js'
5
- import { SqliteError } from '../adapter-types.js'
6
- import type { BindValues } from '../sql-queries/index.js'
7
- import type { PreparedBindValues } from '../util.js'
8
- import { prepareBindValues, sql } from '../util.js'
4
+ import type { SqliteDb } from '../adapter-types.ts'
5
+ import { SqliteError } from '../adapter-types.ts'
6
+ import type { BindValues } from '../sql-queries/index.ts'
7
+ import type { PreparedBindValues } from '../util.ts'
8
+ import { prepareBindValues, sql } from '../util.ts'
9
9
 
10
10
  // TODO
11
11
  namespace WaSqlite {
@@ -1,23 +1,23 @@
1
1
  import { LS_DEV, shouldNeverHappen } from '@livestore/utils'
2
2
  import { Effect, Option, Schema } from '@livestore/utils/effect'
3
3
 
4
- import type { SqliteDb } from '../adapter-types.js'
5
- import * as EventSequenceNumber from '../schema/EventSequenceNumber.js'
6
- import * as LiveStoreEvent from '../schema/LiveStoreEvent.js'
4
+ import type { SqliteDb } from '../adapter-types.ts'
5
+ import * as EventSequenceNumber from '../schema/EventSequenceNumber.ts'
6
+ import * as LiveStoreEvent from '../schema/LiveStoreEvent.ts'
7
7
  import {
8
8
  EVENTLOG_META_TABLE,
9
9
  eventlogMetaTable,
10
10
  eventlogSystemTables,
11
- sessionChangesetMetaTable,
12
11
  SYNC_STATUS_TABLE,
13
- } from '../schema/state/sqlite/system-tables.js'
14
- import { migrateTable } from '../schema-management/migrations.js'
15
- import { insertRow, updateRows } from '../sql-queries/sql-queries.js'
16
- import type { PreparedBindValues } from '../util.js'
17
- import { sql } from '../util.js'
18
- import { execSql } from './connection.js'
19
- import type { InitialSyncInfo } from './types.js'
20
- import { LeaderThreadCtx } from './types.js'
12
+ sessionChangesetMetaTable,
13
+ } from '../schema/state/sqlite/system-tables.ts'
14
+ import { migrateTable } from '../schema-management/migrations.ts'
15
+ import { insertRow, updateRows } from '../sql-queries/sql-queries.ts'
16
+ import type { PreparedBindValues } from '../util.ts'
17
+ import { sql } from '../util.ts'
18
+ import { execSql } from './connection.ts'
19
+ import type { InitialSyncInfo } from './types.ts'
20
+ import { LeaderThreadCtx } from './types.ts'
21
21
 
22
22
  export const initEventlogDb = (dbEventlog: SqliteDb) =>
23
23
  Effect.gen(function* () {
@@ -1,10 +1,10 @@
1
1
  import { Effect, FiberMap, Option, Stream, SubscriptionRef } from '@livestore/utils/effect'
2
2
  import { nanoid } from '@livestore/utils/nanoid'
3
3
 
4
- import { Devtools, IntentionalShutdownCause, liveStoreVersion, UnexpectedError } from '../index.js'
5
- import { SystemTables } from '../schema/mod.js'
6
- import type { DevtoolsOptions, PersistenceInfoPair } from './types.js'
7
- import { LeaderThreadCtx } from './types.js'
4
+ import { Devtools, IntentionalShutdownCause, liveStoreVersion, UnexpectedError } from '../index.ts'
5
+ import { SystemTables } from '../schema/mod.ts'
6
+ import type { DevtoolsOptions, PersistenceInfoPair } from './types.ts'
7
+ import { LeaderThreadCtx } from './types.ts'
8
8
 
9
9
  type SendMessageToDevtools = (message: Devtools.Leader.MessageFromApp) => Effect.Effect<void>
10
10
 
@@ -2,28 +2,28 @@ import { shouldNeverHappen } from '@livestore/utils'
2
2
  import type { HttpClient, Schema, Scope } from '@livestore/utils/effect'
3
3
  import { Deferred, Effect, Layer, Queue, SubscriptionRef } from '@livestore/utils/effect'
4
4
 
5
- import type { BootStatus, MakeSqliteDb, SqliteDb, SqliteError } from '../adapter-types.js'
6
- import { UnexpectedError } from '../adapter-types.js'
7
- import type * as Devtools from '../devtools/mod.js'
8
- import type { LiveStoreSchema } from '../schema/mod.js'
9
- import { EventSequenceNumber, LiveStoreEvent } from '../schema/mod.js'
10
- import type { InvalidPullError, IsOfflineError, SyncOptions } from '../sync/sync.js'
11
- import { SyncState } from '../sync/syncstate.js'
12
- import { sql } from '../util.js'
13
- import * as Eventlog from './eventlog.js'
14
- import { makeLeaderSyncProcessor } from './LeaderSyncProcessor.js'
15
- import { bootDevtools } from './leader-worker-devtools.js'
16
- import { makeMaterializeEvent } from './materialize-event.js'
17
- import { recreateDb } from './recreate-db.js'
18
- import type { ShutdownChannel } from './shutdown-channel.js'
5
+ import type { BootStatus, MakeSqliteDb, SqliteDb, SqliteError } from '../adapter-types.ts'
6
+ import { UnexpectedError } from '../adapter-types.ts'
7
+ import type * as Devtools from '../devtools/mod.ts'
8
+ import type { LiveStoreSchema } from '../schema/mod.ts'
9
+ import { EventSequenceNumber, LiveStoreEvent } from '../schema/mod.ts'
10
+ import type { InvalidPullError, IsOfflineError, SyncOptions } from '../sync/sync.ts'
11
+ import { SyncState } from '../sync/syncstate.ts'
12
+ import { sql } from '../util.ts'
13
+ import * as Eventlog from './eventlog.ts'
14
+ import { makeLeaderSyncProcessor } from './LeaderSyncProcessor.ts'
15
+ import { bootDevtools } from './leader-worker-devtools.ts'
16
+ import { makeMaterializeEvent } from './materialize-event.ts'
17
+ import { recreateDb } from './recreate-db.ts'
18
+ import type { ShutdownChannel } from './shutdown-channel.ts'
19
19
  import type {
20
20
  DevtoolsOptions,
21
21
  InitialBlockingSyncContext,
22
22
  InitialSyncOptions,
23
23
  LeaderSqliteDb,
24
24
  ShutdownState,
25
- } from './types.js'
26
- import { LeaderThreadCtx } from './types.js'
25
+ } from './types.ts'
26
+ import { LeaderThreadCtx } from './types.ts'
27
27
 
28
28
  export interface MakeLeaderThreadLayerParams {
29
29
  storeId: string
@@ -1,15 +1,15 @@
1
1
  import { isDevEnv, LS_DEV, shouldNeverHappen } from '@livestore/utils'
2
2
  import { Effect, Option, ReadonlyArray, Schema } from '@livestore/utils/effect'
3
3
 
4
- import { type SqliteDb, UnexpectedError } from '../adapter-types.js'
5
- import { getExecStatementsFromMaterializer, hashMaterializerResults } from '../materializer-helper.js'
6
- import type { LiveStoreSchema } from '../schema/mod.js'
7
- import { EventSequenceNumber, getEventDef, SystemTables } from '../schema/mod.js'
8
- import { insertRow } from '../sql-queries/index.js'
9
- import { sql } from '../util.js'
10
- import { execSql, execSqlPrepared } from './connection.js'
11
- import * as Eventlog from './eventlog.js'
12
- import type { MaterializeEvent } from './types.js'
4
+ import { type SqliteDb, UnexpectedError } from '../adapter-types.ts'
5
+ import { getExecStatementsFromMaterializer, hashMaterializerResults } from '../materializer-helper.ts'
6
+ import type { LiveStoreSchema } from '../schema/mod.ts'
7
+ import { EventSequenceNumber, getEventDef, SystemTables } from '../schema/mod.ts'
8
+ import { insertRow } from '../sql-queries/index.ts'
9
+ import { sql } from '../util.ts'
10
+ import { execSql, execSqlPrepared } from './connection.ts'
11
+ import * as Eventlog from './eventlog.ts'
12
+ import type { MaterializeEvent } from './types.ts'
13
13
 
14
14
  export const makeMaterializeEvent = ({
15
15
  schema,
@@ -1,8 +1,8 @@
1
- export * from './connection.js'
2
- export * from './types.js'
3
- export * as ShutdownChannel from './shutdown-channel.js'
4
- export * from './leader-worker-devtools.js'
5
- export * from './make-leader-thread-layer.js'
6
- export * as Eventlog from './eventlog.js'
7
- export * from './materialize-event.js'
8
- export * from './recreate-db.js'
1
+ export * from './connection.ts'
2
+ export * as Eventlog from './eventlog.ts'
3
+ export * from './leader-worker-devtools.ts'
4
+ export * from './make-leader-thread-layer.ts'
5
+ export * from './materialize-event.ts'
6
+ export * from './recreate-db.ts'
7
+ export * as ShutdownChannel from './shutdown-channel.ts'
8
+ export * from './types.ts'
@@ -1,12 +1,12 @@
1
1
  import { casesHandled } from '@livestore/utils'
2
2
  import { Effect, Queue } from '@livestore/utils/effect'
3
3
 
4
- import type { MigrationsReport } from '../defs.js'
5
- import type { BootStatus, MigrationHooks, SqliteDb, SqliteError } from '../index.js'
6
- import { migrateDb, rematerializeFromEventlog, UnexpectedError } from '../index.js'
7
- import type { LiveStoreSchema } from '../schema/mod.js'
8
- import { configureConnection } from './connection.js'
9
- import type { MaterializeEvent } from './types.js'
4
+ import type { MigrationsReport } from '../defs.ts'
5
+ import type { BootStatus, MigrationHooks, SqliteDb, SqliteError } from '../index.ts'
6
+ import { migrateDb, rematerializeFromEventlog, UnexpectedError } from '../index.ts'
7
+ import type { LiveStoreSchema } from '../schema/mod.ts'
8
+ import { configureConnection } from './connection.ts'
9
+ import type { MaterializeEvent } from './types.ts'
10
10
 
11
11
  export const recreateDb = ({
12
12
  dbState,
@@ -1,7 +1,7 @@
1
1
  import type { WebChannel } from '@livestore/utils/effect'
2
2
  import { Schema } from '@livestore/utils/effect'
3
3
 
4
- import { IntentionalShutdownCause, UnexpectedError } from '../index.js'
4
+ import { IntentionalShutdownCause, UnexpectedError } from '../index.ts'
5
5
 
6
6
  export class All extends Schema.Union(IntentionalShutdownCause, UnexpectedError) {}
7
7
 
@@ -12,8 +12,8 @@ import type {
12
12
  import { Context, Schema } from '@livestore/utils/effect'
13
13
  import type { MeshNode } from '@livestore/webmesh'
14
14
 
15
- import type { MigrationsReport } from '../defs.js'
16
- import type { SqliteError } from '../errors.js'
15
+ import type { MigrationsReport } from '../defs.ts'
16
+ import type { SqliteError } from '../errors.ts'
17
17
  import type {
18
18
  BootStatus,
19
19
  Devtools,
@@ -23,10 +23,10 @@ import type {
23
23
  SqliteDb,
24
24
  SyncBackend,
25
25
  UnexpectedError,
26
- } from '../index.js'
27
- import type { EventSequenceNumber, LiveStoreEvent, LiveStoreSchema } from '../schema/mod.js'
28
- import type * as SyncState from '../sync/syncstate.js'
29
- import type { ShutdownChannel } from './shutdown-channel.js'
26
+ } from '../index.ts'
27
+ import type { EventSequenceNumber, LiveStoreEvent, LiveStoreSchema } from '../schema/mod.ts'
28
+ import type * as SyncState from '../sync/syncstate.ts'
29
+ import type { ShutdownChannel } from './shutdown-channel.ts'
30
30
 
31
31
  export type ShutdownState = 'running' | 'shutting-down'
32
32
 
@@ -9,12 +9,11 @@ import type {
9
9
  LockStatus,
10
10
  SqliteDb,
11
11
  UnexpectedError,
12
- } from './adapter-types.js'
13
- import * as Devtools from './devtools/mod.js'
14
- import { liveStoreVersion } from './version.js'
12
+ } from './adapter-types.ts'
13
+ import * as Devtools from './devtools/mod.ts'
14
+ import { liveStoreVersion } from './version.ts'
15
15
 
16
16
  declare global {
17
- // eslint-disable-next-line no-var
18
17
  var __debugWebmeshNode: any
19
18
  }
20
19
 
@@ -1,17 +1,17 @@
1
1
  import { isDevEnv, isNil, isReadonlyArray } from '@livestore/utils'
2
2
  import { Hash, Option, Schema } from '@livestore/utils/effect'
3
3
 
4
- import type { SqliteDb } from './adapter-types.js'
5
- import { SessionIdSymbol } from './adapter-types.js'
6
- import type { EventDef, Materializer, MaterializerContextQuery, MaterializerResult } from './schema/EventDef.js'
7
- import type * as LiveStoreEvent from './schema/LiveStoreEvent.js'
8
- import { getEventDef, type LiveStoreSchema } from './schema/schema.js'
9
- import type { QueryBuilder } from './schema/state/sqlite/query-builder/api.js'
10
- import { isQueryBuilder } from './schema/state/sqlite/query-builder/api.js'
11
- import { getResultSchema } from './schema/state/sqlite/query-builder/impl.js'
12
- import type { BindValues } from './sql-queries/sql-queries.js'
13
- import type { ParamsObject, PreparedBindValues } from './util.js'
14
- import { prepareBindValues } from './util.js'
4
+ import type { SqliteDb } from './adapter-types.ts'
5
+ import { SessionIdSymbol } from './adapter-types.ts'
6
+ import type { EventDef, Materializer, MaterializerContextQuery, MaterializerResult } from './schema/EventDef.ts'
7
+ import type * as LiveStoreEvent from './schema/LiveStoreEvent.ts'
8
+ import { getEventDef, type LiveStoreSchema } from './schema/schema.ts'
9
+ import type { QueryBuilder } from './schema/state/sqlite/query-builder/api.ts'
10
+ import { isQueryBuilder } from './schema/state/sqlite/query-builder/api.ts'
11
+ import { getResultSchema } from './schema/state/sqlite/query-builder/impl.ts'
12
+ import type { BindValues } from './sql-queries/sql-queries.ts'
13
+ import type { ParamsObject, PreparedBindValues } from './util.ts'
14
+ import { prepareBindValues } from './util.ts'
15
15
 
16
16
  export const getExecStatementsFromMaterializer = ({
17
17
  eventDef,
@@ -1,12 +1,12 @@
1
1
  import { memoizeByRef } from '@livestore/utils'
2
2
  import { Chunk, Effect, Option, Schema, Stream } from '@livestore/utils/effect'
3
3
 
4
- import { type SqliteDb, UnexpectedError } from './adapter-types.js'
5
- import type { MaterializeEvent } from './leader-thread/mod.js'
6
- import type { EventDef, LiveStoreSchema } from './schema/mod.js'
7
- import { EventSequenceNumber, getEventDef, LiveStoreEvent, SystemTables } from './schema/mod.js'
8
- import type { PreparedBindValues } from './util.js'
9
- import { sql } from './util.js'
4
+ import { type SqliteDb, UnexpectedError } from './adapter-types.ts'
5
+ import type { MaterializeEvent } from './leader-thread/mod.ts'
6
+ import type { EventDef, LiveStoreSchema } from './schema/mod.ts'
7
+ import { EventSequenceNumber, getEventDef, LiveStoreEvent, SystemTables } from './schema/mod.ts'
8
+ import type { PreparedBindValues } from './util.ts'
9
+ import { sql } from './util.ts'
10
10
 
11
11
  export const rematerializeFromEventlog = ({
12
12
  dbEventlog,
@@ -2,15 +2,14 @@ import type { SingleOrReadonlyArray } from '@livestore/utils'
2
2
  import { shouldNeverHappen } from '@livestore/utils'
3
3
  import { Schema } from '@livestore/utils/effect'
4
4
 
5
- import type { BindValues } from '../sql-queries/sql-queries.js'
6
- import type { ParamsObject } from '../util.js'
7
- import type { QueryBuilder } from './state/sqlite/query-builder/mod.js'
5
+ import type { BindValues } from '../sql-queries/sql-queries.ts'
6
+ import type { ParamsObject } from '../util.ts'
7
+ import type { QueryBuilder } from './state/sqlite/query-builder/mod.ts'
8
8
 
9
9
  export type EventDefMap = {
10
- map: Map<string | 'livestore.RawSql', EventDef.Any>
10
+ map: Map<string, EventDef.Any>
11
11
  }
12
12
  export type EventDefRecord = {
13
- 'livestore.RawSql': RawSqlEvent
14
13
  [name: string]: EventDef.Any
15
14
  }
16
15
 
@@ -218,22 +217,3 @@ export const materializers = <TInputRecord extends Record<string, EventDef.AnyWi
218
217
  ) => {
219
218
  return handlers
220
219
  }
221
-
222
- export const rawSqlEvent = defineEvent({
223
- name: 'livestore.RawSql',
224
- schema: Schema.Struct({
225
- sql: Schema.String,
226
- bindValues: Schema.optional(Schema.Record({ key: Schema.String, value: Schema.Any })),
227
- writeTables: Schema.optional(Schema.ReadonlySet(Schema.String)),
228
- }),
229
- clientOnly: true,
230
- derived: true,
231
- })
232
-
233
- export const rawSqlMaterializer = defineMaterializer(rawSqlEvent, ({ sql, bindValues, writeTables }) => ({
234
- sql,
235
- bindValues: bindValues ?? {},
236
- writeTables,
237
- }))
238
-
239
- export type RawSqlEvent = typeof rawSqlEvent
@@ -1,7 +1,7 @@
1
1
  import { Vitest } from '@livestore/utils-dev/node-vitest'
2
2
  import { expect } from 'vitest'
3
3
 
4
- import { EventSequenceNumber } from './mod.js'
4
+ import { EventSequenceNumber } from './mod.ts'
5
5
 
6
6
  Vitest.describe('EventSequenceNumber', () => {
7
7
  Vitest.test('nextPair (no rebase)', () => {
@@ -1,9 +1,9 @@
1
1
  import { memoizeByRef } from '@livestore/utils'
2
2
  import { Option, Schema } from '@livestore/utils/effect'
3
3
 
4
- import type { EventDef, EventDefRecord } from './EventDef.js'
5
- import * as EventSequenceNumber from './EventSequenceNumber.js'
6
- import type { LiveStoreSchema } from './schema.js'
4
+ import type { EventDef, EventDefRecord } from './EventDef.ts'
5
+ import * as EventSequenceNumber from './EventSequenceNumber.ts'
6
+ import type { LiveStoreSchema } from './schema.ts'
7
7
 
8
8
  export namespace ForEventDef {
9
9
  export type PartialDecoded<TEventDef extends EventDef.Any> = {
@@ -1 +1 @@
1
- export { defineEvent, synced, clientOnly } from './EventDef.js'
1
+ export { clientOnly, defineEvent, synced } from './EventDef.ts'
package/src/schema/mod.ts CHANGED
@@ -1,9 +1,9 @@
1
- export * as SystemTables from './state/sqlite/system-tables.js'
2
- export { SqliteAst, SqliteDsl } from './state/sqlite/db-schema/mod.js'
3
- export * from './EventDef.js'
4
- export * from './state/sqlite/schema-helpers.js'
5
- export * from './schema.js'
6
- export * as State from './state/mod.js'
7
- export * as LiveStoreEvent from './LiveStoreEvent.js'
8
- export * as EventSequenceNumber from './EventSequenceNumber.js'
9
- export * as Events from './events.js'
1
+ export * from './EventDef.ts'
2
+ export * as EventSequenceNumber from './EventSequenceNumber.ts'
3
+ export * as Events from './events.ts'
4
+ export * as LiveStoreEvent from './LiveStoreEvent.ts'
5
+ export * from './schema.ts'
6
+ export * as State from './state/mod.ts'
7
+ export { SqliteAst, SqliteDsl } from './state/sqlite/db-schema/mod.ts'
8
+ export * from './state/sqlite/schema-helpers.ts'
9
+ export * as SystemTables from './state/sqlite/system-tables.ts'
@@ -1,12 +1,11 @@
1
1
  import { isReadonlyArray, shouldNeverHappen } from '@livestore/utils'
2
2
 
3
- import type { MigrationOptions } from '../adapter-types.js'
4
- import type { EventDef, EventDefRecord, Materializer, RawSqlEvent } from './EventDef.js'
5
- import { rawSqlEvent } from './EventDef.js'
6
- import { tableIsClientDocumentTable } from './state/sqlite/client-document-def.js'
7
- import type { SqliteDsl } from './state/sqlite/db-schema/mod.js'
8
- import { stateSystemTables } from './state/sqlite/system-tables.js'
9
- import type { TableDef } from './state/sqlite/table-def.js'
3
+ import type { MigrationOptions } from '../adapter-types.ts'
4
+ import type { EventDef, EventDefRecord, Materializer } from './EventDef.ts'
5
+ import { tableIsClientDocumentTable } from './state/sqlite/client-document-def.ts'
6
+ import type { SqliteDsl } from './state/sqlite/db-schema/mod.ts'
7
+ import { stateSystemTables } from './state/sqlite/system-tables.ts'
8
+ import type { TableDef } from './state/sqlite/table-def.ts'
10
9
 
11
10
  export const LiveStoreSchemaSymbol = Symbol.for('livestore.LiveStoreSchema')
12
11
  export type LiveStoreSchemaSymbol = typeof LiveStoreSchemaSymbol
@@ -80,8 +79,6 @@ export const makeSchema = <TInputSchema extends InputSchema>(
80
79
  }
81
80
  }
82
81
 
83
- eventsDefsMap.set(rawSqlEvent.name, rawSqlEvent)
84
-
85
82
  for (const tableDef of tables.values()) {
86
83
  if (tableIsClientDocumentTable(tableDef) && eventsDefsMap.has(tableDef.set.name) === false) {
87
84
  eventsDefsMap.set(tableDef.set.name, tableDef.set)
@@ -138,8 +135,8 @@ export namespace FromInputSchema {
138
135
 
139
136
  type EventDefRecordFromInputSchemaEvents<TEvents extends InputSchema['events']> =
140
137
  TEvents extends ReadonlyArray<EventDef.Any>
141
- ? { [K in TEvents[number] as K['name']]: K } & { 'livestore.RawSql': RawSqlEvent }
138
+ ? { [K in TEvents[number] as K['name']]: K }
142
139
  : TEvents extends { [name: string]: EventDef.Any }
143
- ? { [K in keyof TEvents as TEvents[K]['name']]: TEvents[K] } & { 'livestore.RawSql': RawSqlEvent }
140
+ ? { [K in keyof TEvents as TEvents[K]['name']]: TEvents[K] }
144
141
  : never
145
142
  }
@@ -1,2 +1,2 @@
1
- export * as SQLite from './sqlite/mod.js'
2
- export { QueryBuilderAstSymbol, QueryBuilderTypeId } from './sqlite/query-builder/mod.js'
1
+ export * as SQLite from './sqlite/mod.ts'
2
+ export { QueryBuilderAstSymbol, QueryBuilderTypeId } from './sqlite/query-builder/mod.ts'