@rocicorp/zero 0.12.2025012601 → 0.12.2025012801

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 (454) hide show
  1. package/out/advanced.js +2 -2
  2. package/out/{chunk-F5QR3K72.js → chunk-424PT5DM.js} +1 -1
  3. package/out/{chunk-I5GSZARI.js → chunk-QAAJZ32T.js} +1 -1
  4. package/out/{chunk-I5GSZARI.js.map → chunk-QAAJZ32T.js.map} +1 -1
  5. package/out/{chunk-JZD6FXRT.js → chunk-TYCUDFUS.js} +37 -43
  6. package/out/{chunk-JZD6FXRT.js.map → chunk-TYCUDFUS.js.map} +3 -3
  7. package/out/datadog/src/mod.d.ts +1 -1
  8. package/out/react.js +1 -1
  9. package/out/react.js.map +1 -1
  10. package/out/replicache/src/btree/diff.d.ts +2 -2
  11. package/out/replicache/src/btree/node.d.ts +8 -8
  12. package/out/replicache/src/btree/read.d.ts +6 -6
  13. package/out/replicache/src/btree/write.d.ts +7 -7
  14. package/out/replicache/src/call-default-fetch.d.ts +1 -1
  15. package/out/replicache/src/config.d.ts +1 -1
  16. package/out/replicache/src/connection-loop-delegates.d.ts +2 -2
  17. package/out/replicache/src/connection-loop.d.ts +1 -1
  18. package/out/replicache/src/cookies.d.ts +2 -2
  19. package/out/replicache/src/dag/chunk.d.ts +1 -1
  20. package/out/replicache/src/dag/gc.d.ts +2 -2
  21. package/out/replicache/src/dag/key.d.ts +2 -2
  22. package/out/replicache/src/dag/lazy-store.d.ts +5 -5
  23. package/out/replicache/src/dag/store-impl.d.ts +5 -5
  24. package/out/replicache/src/dag/store.d.ts +3 -3
  25. package/out/replicache/src/dag/visitor.d.ts +3 -3
  26. package/out/replicache/src/db/commit.d.ts +8 -8
  27. package/out/replicache/src/db/index.d.ts +7 -7
  28. package/out/replicache/src/db/read.d.ts +8 -8
  29. package/out/replicache/src/db/rebase.d.ts +7 -7
  30. package/out/replicache/src/db/scan.d.ts +1 -1
  31. package/out/replicache/src/db/write.d.ts +14 -14
  32. package/out/replicache/src/filter-async-iterable.d.ts +1 -1
  33. package/out/replicache/src/format-version.d.ts +2 -2
  34. package/out/replicache/src/frozen-json.d.ts +2 -2
  35. package/out/replicache/src/get-default-puller.d.ts +1 -1
  36. package/out/replicache/src/get-default-pusher.d.ts +1 -1
  37. package/out/replicache/src/hash.d.ts +1 -1
  38. package/out/replicache/src/impl.d.ts +3 -3
  39. package/out/replicache/src/index-defs.d.ts +1 -1
  40. package/out/replicache/src/kv/idb-store-with-mem-fallback.d.ts +1 -1
  41. package/out/replicache/src/kv/idb-store.d.ts +1 -1
  42. package/out/replicache/src/kv/idb-store.d.ts.map +1 -1
  43. package/out/replicache/src/kv/mem-store.d.ts +1 -1
  44. package/out/replicache/src/kv/read-impl.d.ts +2 -2
  45. package/out/replicache/src/kv/store.d.ts +1 -1
  46. package/out/replicache/src/kv/write-impl-base.d.ts +3 -3
  47. package/out/replicache/src/kv/write-impl.d.ts +3 -3
  48. package/out/replicache/src/merge-async-iterables.d.ts +1 -1
  49. package/out/replicache/src/mod.d.ts +36 -36
  50. package/out/replicache/src/mutation-recovery.d.ts +8 -8
  51. package/out/replicache/src/new-client-channel.d.ts +1 -1
  52. package/out/replicache/src/on-persist-channel.d.ts +1 -1
  53. package/out/replicache/src/patch-operation.d.ts +1 -1
  54. package/out/replicache/src/pending-mutations.d.ts +3 -3
  55. package/out/replicache/src/persist/client-gc.d.ts +3 -3
  56. package/out/replicache/src/persist/client-group-gc.d.ts +2 -2
  57. package/out/replicache/src/persist/client-groups.d.ts +5 -5
  58. package/out/replicache/src/persist/clients.d.ts +9 -9
  59. package/out/replicache/src/persist/collect-idb-databases.d.ts +3 -3
  60. package/out/replicache/src/persist/gather-mem-only-visitor.d.ts +4 -4
  61. package/out/replicache/src/persist/gather-not-cached-visitor.d.ts +5 -5
  62. package/out/replicache/src/persist/heartbeat.d.ts +3 -3
  63. package/out/replicache/src/persist/idb-databases-store.d.ts +1 -1
  64. package/out/replicache/src/persist/persist.d.ts +6 -6
  65. package/out/replicache/src/persist/refresh.d.ts +7 -7
  66. package/out/replicache/src/process-scheduler.d.ts +1 -1
  67. package/out/replicache/src/puller.d.ts +6 -6
  68. package/out/replicache/src/pusher.d.ts +3 -3
  69. package/out/replicache/src/replicache-impl.d.ts +12 -12
  70. package/out/replicache/src/replicache-options.d.ts +5 -5
  71. package/out/replicache/src/replicache.d.ts +10 -10
  72. package/out/replicache/src/scan-iterator.d.ts +6 -6
  73. package/out/replicache/src/scan-options.d.ts +2 -2
  74. package/out/replicache/src/subscriptions.d.ts +7 -7
  75. package/out/replicache/src/subscriptions.d.ts.map +1 -1
  76. package/out/replicache/src/sync/diff.d.ts +6 -6
  77. package/out/replicache/src/sync/ids.d.ts +1 -1
  78. package/out/replicache/src/sync/patch.d.ts +2 -2
  79. package/out/replicache/src/sync/pull.d.ts +11 -11
  80. package/out/replicache/src/sync/push.d.ts +4 -4
  81. package/out/replicache/src/sync/request-id.d.ts +1 -1
  82. package/out/replicache/src/transactions.d.ts +9 -9
  83. package/out/replicache/src/types.d.ts +5 -5
  84. package/out/shared/src/btree-set.js +1 -1
  85. package/out/shared/src/deep-clone.d.ts +1 -1
  86. package/out/shared/src/iterables.js +1 -1
  87. package/out/shared/src/json-schema.d.ts +1 -1
  88. package/out/shared/src/json-schema.js +3 -3
  89. package/out/shared/src/json.js +3 -3
  90. package/out/shared/src/options.d.ts +1 -1
  91. package/out/shared/src/options.js +3 -3
  92. package/out/shared/src/queue.js +1 -1
  93. package/out/shared/src/random-values.d.ts +1 -1
  94. package/out/shared/src/random-values.d.ts.map +1 -1
  95. package/out/shared/src/sleep.js +1 -1
  96. package/out/solid.js +3 -3
  97. package/out/solid.js.map +1 -1
  98. package/out/zero/src/advanced.d.ts +1 -1
  99. package/out/zero/src/build-schema.d.ts +1 -1
  100. package/out/zero/src/build-schema.js +1 -1
  101. package/out/zero/src/change-protocol.d.ts +1 -1
  102. package/out/zero/src/change-protocol.js +1 -1
  103. package/out/zero/src/cli.d.ts +1 -1
  104. package/out/zero/src/cli.js +1 -1
  105. package/out/zero/src/react.d.ts +1 -1
  106. package/out/zero/src/server/change-streamer.d.ts +1 -1
  107. package/out/zero/src/server/change-streamer.js +1 -1
  108. package/out/zero/src/server/main.d.ts +1 -1
  109. package/out/zero/src/server/main.js +1 -1
  110. package/out/zero/src/server/multi/main.d.ts +1 -1
  111. package/out/zero/src/server/multi/main.js +1 -1
  112. package/out/zero/src/server/replicator.d.ts +1 -1
  113. package/out/zero/src/server/replicator.js +1 -1
  114. package/out/zero/src/server/syncer.d.ts +1 -1
  115. package/out/zero/src/server/syncer.js +1 -1
  116. package/out/zero/src/solid.d.ts +1 -1
  117. package/out/zero/src/zero-cache-dev.js +3 -3
  118. package/out/zero/src/zero.d.ts +1 -1
  119. package/out/zero-advanced/src/mod.d.ts +8 -8
  120. package/out/zero-advanced/src/mod.d.ts.map +1 -1
  121. package/out/zero-cache/src/auth/jwt.d.ts +1 -1
  122. package/out/zero-cache/src/auth/load-schema.d.ts +3 -3
  123. package/out/zero-cache/src/auth/load-schema.d.ts.map +1 -1
  124. package/out/zero-cache/src/auth/load-schema.js +3 -3
  125. package/out/zero-cache/src/auth/load-schema.js.map +1 -1
  126. package/out/zero-cache/src/auth/read-authorizer.d.ts +2 -2
  127. package/out/zero-cache/src/auth/read-authorizer.d.ts.map +1 -1
  128. package/out/zero-cache/src/auth/read-authorizer.js +3 -3
  129. package/out/zero-cache/src/auth/read-authorizer.js.map +1 -1
  130. package/out/zero-cache/src/auth/write-authorizer.d.ts +5 -5
  131. package/out/zero-cache/src/auth/write-authorizer.js +14 -14
  132. package/out/zero-cache/src/config/zero-config.d.ts +6 -2
  133. package/out/zero-cache/src/config/zero-config.d.ts.map +1 -1
  134. package/out/zero-cache/src/config/zero-config.js +12 -6
  135. package/out/zero-cache/src/config/zero-config.js.map +1 -1
  136. package/out/zero-cache/src/db/create.d.ts +1 -1
  137. package/out/zero-cache/src/db/create.js +1 -1
  138. package/out/zero-cache/src/db/lite-tables.d.ts +2 -2
  139. package/out/zero-cache/src/db/lite-tables.js +5 -5
  140. package/out/zero-cache/src/db/migration-lite.d.ts +2 -2
  141. package/out/zero-cache/src/db/migration-lite.js +4 -4
  142. package/out/zero-cache/src/db/migration.d.ts +2 -2
  143. package/out/zero-cache/src/db/migration.js +3 -3
  144. package/out/zero-cache/src/db/pg-to-lite.d.ts +2 -2
  145. package/out/zero-cache/src/db/pg-to-lite.js +5 -5
  146. package/out/zero-cache/src/db/short-lived-client.d.ts +1 -1
  147. package/out/zero-cache/src/db/short-lived-client.js +1 -1
  148. package/out/zero-cache/src/db/specs.d.ts +4 -4
  149. package/out/zero-cache/src/db/specs.js +3 -3
  150. package/out/zero-cache/src/db/statements.d.ts +2 -2
  151. package/out/zero-cache/src/db/statements.js +2 -2
  152. package/out/zero-cache/src/db/transaction-pool.d.ts +4 -4
  153. package/out/zero-cache/src/db/transaction-pool.js +3 -3
  154. package/out/zero-cache/src/server/change-streamer.d.ts +1 -1
  155. package/out/zero-cache/src/server/change-streamer.js +13 -13
  156. package/out/zero-cache/src/server/logging.d.ts +1 -1
  157. package/out/zero-cache/src/server/logging.js +2 -2
  158. package/out/zero-cache/src/server/main.d.ts +1 -1
  159. package/out/zero-cache/src/server/main.js +13 -13
  160. package/out/zero-cache/src/server/multi/config.d.ts +2 -2
  161. package/out/zero-cache/src/server/multi/config.js +3 -3
  162. package/out/zero-cache/src/server/multi/main.d.ts +1 -1
  163. package/out/zero-cache/src/server/multi/main.js +8 -8
  164. package/out/zero-cache/src/server/multi/runtime.js +1 -1
  165. package/out/zero-cache/src/server/multi/tenant-dispatcher.d.ts +2 -2
  166. package/out/zero-cache/src/server/multi/tenant-dispatcher.js +2 -2
  167. package/out/zero-cache/src/server/replicator.d.ts +1 -1
  168. package/out/zero-cache/src/server/replicator.js +10 -10
  169. package/out/zero-cache/src/server/syncer.d.ts +1 -1
  170. package/out/zero-cache/src/server/syncer.js +21 -21
  171. package/out/zero-cache/src/services/change-source/pg/change-source.d.ts +8 -8
  172. package/out/zero-cache/src/services/change-source/pg/change-source.js +24 -24
  173. package/out/zero-cache/src/services/change-source/pg/initial-sync.d.ts +2 -2
  174. package/out/zero-cache/src/services/change-source/pg/initial-sync.js +15 -15
  175. package/out/zero-cache/src/services/change-source/pg/lsn.d.ts +2 -2
  176. package/out/zero-cache/src/services/change-source/pg/lsn.js +2 -2
  177. package/out/zero-cache/src/services/change-source/pg/schema/ddl.d.ts +1 -1
  178. package/out/zero-cache/src/services/change-source/pg/schema/ddl.js +3 -3
  179. package/out/zero-cache/src/services/change-source/pg/schema/init.d.ts +2 -2
  180. package/out/zero-cache/src/services/change-source/pg/schema/init.js +3 -3
  181. package/out/zero-cache/src/services/change-source/pg/schema/published.d.ts +1 -1
  182. package/out/zero-cache/src/services/change-source/pg/schema/published.js +3 -3
  183. package/out/zero-cache/src/services/change-source/pg/schema/shard.d.ts +4 -4
  184. package/out/zero-cache/src/services/change-source/pg/schema/shard.js +7 -7
  185. package/out/zero-cache/src/services/change-source/pg/schema/validation.d.ts +1 -1
  186. package/out/zero-cache/src/services/change-source/pg/schema/validation.js +4 -4
  187. package/out/zero-cache/src/services/change-source/pg/sync-schema.d.ts +2 -2
  188. package/out/zero-cache/src/services/change-source/pg/sync-schema.js +3 -3
  189. package/out/zero-cache/src/services/change-source/protocol/current/control.d.ts +1 -1
  190. package/out/zero-cache/src/services/change-source/protocol/current/control.js +1 -1
  191. package/out/zero-cache/src/services/change-source/protocol/current/data.d.ts +14 -14
  192. package/out/zero-cache/src/services/change-source/protocol/current/data.js +3 -3
  193. package/out/zero-cache/src/services/change-source/protocol/current/downstream.d.ts +16 -16
  194. package/out/zero-cache/src/services/change-source/protocol/current/downstream.js +4 -4
  195. package/out/zero-cache/src/services/change-source/protocol/current/mod.d.ts +6 -6
  196. package/out/zero-cache/src/services/change-source/protocol/current/mod.js +6 -6
  197. package/out/zero-cache/src/services/change-source/protocol/current/status.d.ts +1 -1
  198. package/out/zero-cache/src/services/change-source/protocol/current/status.js +1 -1
  199. package/out/zero-cache/src/services/change-source/protocol/current/upstream.d.ts +1 -1
  200. package/out/zero-cache/src/services/change-source/protocol/current/upstream.js +2 -2
  201. package/out/zero-cache/src/services/change-source/protocol/mod.d.ts +1 -1
  202. package/out/zero-cache/src/services/change-source/protocol/mod.js +1 -1
  203. package/out/zero-cache/src/services/change-streamer/change-streamer-http.d.ts +4 -4
  204. package/out/zero-cache/src/services/change-streamer/change-streamer-http.js +7 -7
  205. package/out/zero-cache/src/services/change-streamer/change-streamer-service.d.ts +6 -6
  206. package/out/zero-cache/src/services/change-streamer/change-streamer-service.js +13 -13
  207. package/out/zero-cache/src/services/change-streamer/change-streamer.d.ts +10 -10
  208. package/out/zero-cache/src/services/change-streamer/change-streamer.js +3 -3
  209. package/out/zero-cache/src/services/change-streamer/forwarder.d.ts +2 -2
  210. package/out/zero-cache/src/services/change-streamer/forwarder.js +2 -2
  211. package/out/zero-cache/src/services/change-streamer/schema/init.d.ts +1 -1
  212. package/out/zero-cache/src/services/change-streamer/schema/init.js +2 -2
  213. package/out/zero-cache/src/services/change-streamer/schema/tables.d.ts +3 -3
  214. package/out/zero-cache/src/services/change-streamer/schema/tables.js +2 -2
  215. package/out/zero-cache/src/services/change-streamer/storer.d.ts +6 -6
  216. package/out/zero-cache/src/services/change-streamer/storer.js +9 -9
  217. package/out/zero-cache/src/services/change-streamer/subscriber.d.ts +5 -5
  218. package/out/zero-cache/src/services/change-streamer/subscriber.js +5 -5
  219. package/out/zero-cache/src/services/dispatcher/connect-params.d.ts +1 -1
  220. package/out/zero-cache/src/services/dispatcher/connect-params.js +3 -3
  221. package/out/zero-cache/src/services/dispatcher/sync-dispatcher.d.ts +2 -2
  222. package/out/zero-cache/src/services/dispatcher/sync-dispatcher.js +4 -4
  223. package/out/zero-cache/src/services/dispatcher/websocket-handoff.d.ts +2 -2
  224. package/out/zero-cache/src/services/dispatcher/websocket-handoff.js +3 -3
  225. package/out/zero-cache/src/services/http-service.d.ts +1 -1
  226. package/out/zero-cache/src/services/http-service.js +2 -2
  227. package/out/zero-cache/src/services/life-cycle.d.ts +2 -2
  228. package/out/zero-cache/src/services/life-cycle.js +2 -2
  229. package/out/zero-cache/src/services/limiter/sliding-window-limiter.js +1 -1
  230. package/out/zero-cache/src/services/litestream/commands.d.ts +1 -1
  231. package/out/zero-cache/src/services/litestream/commands.js +2 -2
  232. package/out/zero-cache/src/services/mutagen/mutagen.d.ts +8 -8
  233. package/out/zero-cache/src/services/mutagen/mutagen.d.ts.map +1 -1
  234. package/out/zero-cache/src/services/mutagen/mutagen.js +14 -14
  235. package/out/zero-cache/src/services/replicator/change-processor.d.ts +23 -0
  236. package/out/zero-cache/src/services/replicator/change-processor.d.ts.map +1 -0
  237. package/out/zero-cache/src/services/replicator/change-processor.js +415 -0
  238. package/out/zero-cache/src/services/replicator/change-processor.js.map +1 -0
  239. package/out/zero-cache/src/services/replicator/incremental-sync.d.ts +5 -27
  240. package/out/zero-cache/src/services/replicator/incremental-sync.d.ts.map +1 -1
  241. package/out/zero-cache/src/services/replicator/incremental-sync.js +9 -421
  242. package/out/zero-cache/src/services/replicator/incremental-sync.js.map +1 -1
  243. package/out/zero-cache/src/services/replicator/notifier.d.ts +2 -2
  244. package/out/zero-cache/src/services/replicator/notifier.js +1 -1
  245. package/out/zero-cache/src/services/replicator/replicator.d.ts +5 -5
  246. package/out/zero-cache/src/services/replicator/replicator.js +3 -3
  247. package/out/zero-cache/src/services/replicator/schema/change-log.d.ts +6 -6
  248. package/out/zero-cache/src/services/replicator/schema/change-log.js +4 -4
  249. package/out/zero-cache/src/services/replicator/schema/replication-state.d.ts +3 -3
  250. package/out/zero-cache/src/services/replicator/schema/replication-state.js +3 -3
  251. package/out/zero-cache/src/services/runner.d.ts +1 -1
  252. package/out/zero-cache/src/services/running-state.d.ts +1 -1
  253. package/out/zero-cache/src/services/running-state.js +2 -2
  254. package/out/zero-cache/src/services/view-syncer/client-handler.d.ts +7 -7
  255. package/out/zero-cache/src/services/view-syncer/client-handler.js +9 -9
  256. package/out/zero-cache/src/services/view-syncer/cvr-store.d.ts +6 -6
  257. package/out/zero-cache/src/services/view-syncer/cvr-store.js +17 -17
  258. package/out/zero-cache/src/services/view-syncer/cvr.d.ts +6 -6
  259. package/out/zero-cache/src/services/view-syncer/cvr.js +8 -8
  260. package/out/zero-cache/src/services/view-syncer/database-storage.d.ts +2 -2
  261. package/out/zero-cache/src/services/view-syncer/database-storage.js +1 -1
  262. package/out/zero-cache/src/services/view-syncer/drain-coordinator.js +1 -1
  263. package/out/zero-cache/src/services/view-syncer/key-columns.d.ts +2 -2
  264. package/out/zero-cache/src/services/view-syncer/key-columns.js +3 -3
  265. package/out/zero-cache/src/services/view-syncer/pipeline-driver.d.ts +6 -6
  266. package/out/zero-cache/src/services/view-syncer/pipeline-driver.js +8 -8
  267. package/out/zero-cache/src/services/view-syncer/schema/cvr.d.ts +2 -2
  268. package/out/zero-cache/src/services/view-syncer/schema/cvr.js +4 -4
  269. package/out/zero-cache/src/services/view-syncer/schema/init.d.ts +1 -1
  270. package/out/zero-cache/src/services/view-syncer/schema/init.js +2 -2
  271. package/out/zero-cache/src/services/view-syncer/schema/types.d.ts +12 -12
  272. package/out/zero-cache/src/services/view-syncer/schema/types.js +4 -4
  273. package/out/zero-cache/src/services/view-syncer/snapshotter.d.ts +5 -5
  274. package/out/zero-cache/src/services/view-syncer/snapshotter.js +12 -12
  275. package/out/zero-cache/src/services/view-syncer/view-syncer.d.ts +9 -9
  276. package/out/zero-cache/src/services/view-syncer/view-syncer.js +20 -20
  277. package/out/zero-cache/src/types/bigint-json.d.ts +1 -1
  278. package/out/zero-cache/src/types/bigint-json.js +1 -1
  279. package/out/zero-cache/src/types/error-for-client.d.ts +1 -1
  280. package/out/zero-cache/src/types/lexi-version.js +2 -2
  281. package/out/zero-cache/src/types/lite.d.ts +4 -4
  282. package/out/zero-cache/src/types/lite.js +2 -2
  283. package/out/zero-cache/src/types/pg.d.ts +3 -3
  284. package/out/zero-cache/src/types/pg.js +2 -2
  285. package/out/zero-cache/src/types/row-key.d.ts +1 -1
  286. package/out/zero-cache/src/types/row-key.js +3 -3
  287. package/out/zero-cache/src/types/schema-versions.d.ts +1 -1
  288. package/out/zero-cache/src/types/schema-versions.js +2 -2
  289. package/out/zero-cache/src/types/streams.d.ts +2 -2
  290. package/out/zero-cache/src/types/streams.js +4 -4
  291. package/out/zero-cache/src/types/subscription.d.ts +1 -1
  292. package/out/zero-cache/src/types/timeout.js +1 -1
  293. package/out/zero-cache/src/workers/connection.d.ts +5 -5
  294. package/out/zero-cache/src/workers/connection.js +9 -9
  295. package/out/zero-cache/src/workers/replicator.d.ts +5 -5
  296. package/out/zero-cache/src/workers/replicator.js +4 -4
  297. package/out/zero-cache/src/workers/syncer.d.ts +8 -8
  298. package/out/zero-cache/src/workers/syncer.js +10 -10
  299. package/out/zero-client/src/client/context.d.ts +6 -6
  300. package/out/zero-client/src/client/crud.d.ts +6 -6
  301. package/out/zero-client/src/client/crud.d.ts.map +1 -1
  302. package/out/zero-client/src/client/keys.d.ts +2 -2
  303. package/out/zero-client/src/client/log-options.d.ts +2 -2
  304. package/out/zero-client/src/client/log-options.d.ts.map +1 -1
  305. package/out/zero-client/src/client/metrics.d.ts +2 -2
  306. package/out/zero-client/src/client/options.d.ts +3 -3
  307. package/out/zero-client/src/client/query-manager.d.ts +6 -6
  308. package/out/zero-client/src/client/reload-error-handler.d.ts +1 -1
  309. package/out/zero-client/src/client/replicache-types.d.ts +1 -1
  310. package/out/zero-client/src/client/server-error.d.ts +2 -2
  311. package/out/zero-client/src/client/server-option.d.ts +1 -1
  312. package/out/zero-client/src/client/zero-poke-handler.d.ts +4 -4
  313. package/out/zero-client/src/client/zero-poke-handler.d.ts.map +1 -1
  314. package/out/zero-client/src/client/zero.d.ts +12 -12
  315. package/out/zero-client/src/mod.d.ts +17 -17
  316. package/out/zero-client/src/mod.d.ts.map +1 -1
  317. package/out/zero-client/src/util/socket.d.ts +1 -1
  318. package/out/zero-protocol/src/ast-hash.d.ts +1 -1
  319. package/out/zero-protocol/src/ast-hash.js +2 -2
  320. package/out/zero-protocol/src/ast.d.ts +2 -2
  321. package/out/zero-protocol/src/ast.js +5 -5
  322. package/out/zero-protocol/src/change-desired-queries.d.ts +3 -3
  323. package/out/zero-protocol/src/change-desired-queries.js +2 -2
  324. package/out/zero-protocol/src/clients-patch.d.ts +1 -1
  325. package/out/zero-protocol/src/clients-patch.js +1 -1
  326. package/out/zero-protocol/src/connect.d.ts +3 -3
  327. package/out/zero-protocol/src/connect.js +2 -2
  328. package/out/zero-protocol/src/data.d.ts +3 -3
  329. package/out/zero-protocol/src/data.js +2 -2
  330. package/out/zero-protocol/src/delete-clients.d.ts +1 -1
  331. package/out/zero-protocol/src/delete-clients.js +1 -1
  332. package/out/zero-protocol/src/down.d.ts +6 -6
  333. package/out/zero-protocol/src/down.js +7 -7
  334. package/out/zero-protocol/src/error.d.ts +1 -1
  335. package/out/zero-protocol/src/error.js +2 -2
  336. package/out/zero-protocol/src/mod.d.ts +14 -14
  337. package/out/zero-protocol/src/mod.js +14 -14
  338. package/out/zero-protocol/src/ping.d.ts +1 -1
  339. package/out/zero-protocol/src/ping.js +1 -1
  340. package/out/zero-protocol/src/poke.d.ts +9 -9
  341. package/out/zero-protocol/src/poke.js +5 -5
  342. package/out/zero-protocol/src/pong.d.ts +1 -1
  343. package/out/zero-protocol/src/pong.js +1 -1
  344. package/out/zero-protocol/src/primary-key.d.ts +1 -1
  345. package/out/zero-protocol/src/primary-key.js +1 -1
  346. package/out/zero-protocol/src/protocol-version.js +1 -1
  347. package/out/zero-protocol/src/pull.d.ts +1 -1
  348. package/out/zero-protocol/src/pull.js +2 -2
  349. package/out/zero-protocol/src/push.d.ts +26 -26
  350. package/out/zero-protocol/src/push.js +5 -5
  351. package/out/zero-protocol/src/queries-patch.d.ts +4 -4
  352. package/out/zero-protocol/src/queries-patch.js +2 -2
  353. package/out/zero-protocol/src/row-patch.d.ts +5 -5
  354. package/out/zero-protocol/src/row-patch.js +4 -4
  355. package/out/zero-protocol/src/up.d.ts +7 -7
  356. package/out/zero-protocol/src/up.js +7 -7
  357. package/out/zero-protocol/src/up.js.map +1 -1
  358. package/out/zero-protocol/src/version.d.ts +1 -1
  359. package/out/zero-protocol/src/version.js +1 -1
  360. package/out/zero-protocol/src/warm.d.ts +1 -1
  361. package/out/zero-protocol/src/warm.js +1 -1
  362. package/out/zero-react/src/mod.d.ts +8 -8
  363. package/out/zero-react/src/use-query.d.ts +4 -4
  364. package/out/zero-react/src/use-zero.d.ts +2 -2
  365. package/out/zero-schema/src/build-schema-options.d.ts +1 -1
  366. package/out/zero-schema/src/build-schema-options.js +1 -1
  367. package/out/zero-schema/src/build-schema.js +5 -5
  368. package/out/zero-schema/src/build-schema.js.map +1 -1
  369. package/out/zero-schema/src/builder/relationship-builder.d.ts +2 -2
  370. package/out/zero-schema/src/builder/schema-builder.d.ts +3 -3
  371. package/out/zero-schema/src/builder/schema-builder.js +1 -1
  372. package/out/zero-schema/src/builder/table-builder.d.ts +3 -3
  373. package/out/zero-schema/src/compiled-permissions.d.ts +18 -18
  374. package/out/zero-schema/src/compiled-permissions.js +2 -2
  375. package/out/zero-schema/src/mod.d.ts +4 -4
  376. package/out/zero-schema/src/mod.d.ts.map +1 -1
  377. package/out/zero-schema/src/permissions.d.ts +5 -5
  378. package/out/zero-schema/src/schema-config.d.ts +4 -4
  379. package/out/zero-schema/src/schema-config.d.ts.map +1 -1
  380. package/out/zero-schema/src/schema-config.js +4 -4
  381. package/out/zero-schema/src/schema-config.js.map +1 -1
  382. package/out/zero-schema/src/table-schema.d.ts +1 -1
  383. package/out/zero-solid/src/create-zero.d.ts +2 -2
  384. package/out/zero-solid/src/create-zero.d.ts.map +1 -1
  385. package/out/zero-solid/src/mod.d.ts +2 -2
  386. package/out/zero-solid/src/solid-view.d.ts +3 -3
  387. package/out/zero-solid/src/use-query.d.ts +3 -3
  388. package/out/zero-solid/src/use-query.d.ts.map +1 -1
  389. package/out/zero.js +3 -3
  390. package/out/zql/src/builder/builder.d.ts +7 -7
  391. package/out/zql/src/builder/builder.js +10 -10
  392. package/out/zql/src/builder/filter.d.ts +2 -2
  393. package/out/zql/src/builder/filter.js +2 -2
  394. package/out/zql/src/builder/like.d.ts +1 -1
  395. package/out/zql/src/builder/like.js +1 -1
  396. package/out/zql/src/ivm/array-view.d.ts +4 -4
  397. package/out/zql/src/ivm/array-view.js +2 -2
  398. package/out/zql/src/ivm/change.d.ts +2 -2
  399. package/out/zql/src/ivm/constraint.d.ts +2 -2
  400. package/out/zql/src/ivm/constraint.js +3 -3
  401. package/out/zql/src/ivm/data.d.ts +3 -3
  402. package/out/zql/src/ivm/data.js +1 -1
  403. package/out/zql/src/ivm/exists.d.ts +6 -6
  404. package/out/zql/src/ivm/exists.js +7 -7
  405. package/out/zql/src/ivm/fan-in.d.ts +6 -6
  406. package/out/zql/src/ivm/fan-in.js +4 -4
  407. package/out/zql/src/ivm/fan-out.d.ts +5 -5
  408. package/out/zql/src/ivm/filter-push.d.ts +3 -3
  409. package/out/zql/src/ivm/filter-push.d.ts.map +1 -1
  410. package/out/zql/src/ivm/filter-push.js +2 -2
  411. package/out/zql/src/ivm/filter-push.js.map +1 -1
  412. package/out/zql/src/ivm/filter.d.ts +5 -5
  413. package/out/zql/src/ivm/filter.js +2 -2
  414. package/out/zql/src/ivm/join.d.ts +7 -7
  415. package/out/zql/src/ivm/join.js +4 -4
  416. package/out/zql/src/ivm/maybe-split-and-push-edit-change.d.ts +3 -3
  417. package/out/zql/src/ivm/memory-source.d.ts +11 -11
  418. package/out/zql/src/ivm/memory-source.js +9 -9
  419. package/out/zql/src/ivm/memory-storage.d.ts +3 -3
  420. package/out/zql/src/ivm/operator.d.ts +7 -7
  421. package/out/zql/src/ivm/operator.js +1 -1
  422. package/out/zql/src/ivm/schema.d.ts +4 -4
  423. package/out/zql/src/ivm/skip.d.ts +6 -6
  424. package/out/zql/src/ivm/skip.js +2 -2
  425. package/out/zql/src/ivm/source.d.ts +3 -3
  426. package/out/zql/src/ivm/take.d.ts +6 -6
  427. package/out/zql/src/ivm/take.js +8 -8
  428. package/out/zql/src/ivm/view-apply-change.d.ts +3 -3
  429. package/out/zql/src/ivm/view-apply-change.js +2 -2
  430. package/out/zql/src/ivm/view.d.ts +4 -4
  431. package/out/zql/src/query/auth-query.d.ts +7 -7
  432. package/out/zql/src/query/auth-query.js +2 -2
  433. package/out/zql/src/query/dnf.d.ts +1 -1
  434. package/out/zql/src/query/dnf.js +2 -2
  435. package/out/zql/src/query/expression.d.ts +3 -4
  436. package/out/zql/src/query/expression.d.ts.map +1 -1
  437. package/out/zql/src/query/expression.js +2 -2
  438. package/out/zql/src/query/query-impl.d.ts +8 -8
  439. package/out/zql/src/query/query-impl.d.ts.map +1 -1
  440. package/out/zql/src/query/query-impl.js +7 -7
  441. package/out/zql/src/query/query-impl.js.map +1 -1
  442. package/out/zql/src/query/query-internal.d.ts +4 -4
  443. package/out/zql/src/query/query.d.ts +7 -10
  444. package/out/zql/src/query/query.d.ts.map +1 -1
  445. package/out/zql/src/query/typed-view.d.ts +1 -1
  446. package/out/zqlite/src/db.js +2 -2
  447. package/out/zqlite/src/internal/statement-cache.d.ts +1 -1
  448. package/out/zqlite/src/internal/statement-cache.d.ts.map +1 -1
  449. package/out/zqlite/src/internal/statement-cache.js +1 -1
  450. package/out/zqlite/src/internal/statement-cache.js.map +1 -1
  451. package/out/zqlite/src/table-source.d.ts +6 -6
  452. package/out/zqlite/src/table-source.js +11 -11
  453. package/package.json +4 -4
  454. /package/out/{chunk-F5QR3K72.js.map → chunk-424PT5DM.js.map} +0 -0
@@ -1,20 +1,20 @@
1
1
  import { PG_INSUFFICIENT_PRIVILEGE } from '@drdgvhbh/postgres-error-codes';
2
2
  import postgres from 'postgres';
3
- import { Database } from '../../../../../zqlite/src/db.js';
4
- import { createIndexStatement, createTableStatement, } from '../../../db/create.js';
5
- import * as Mode from '../../../db/mode-enum.js';
6
- import { mapPostgresToLite, mapPostgresToLiteIndex, } from '../../../db/pg-to-lite.js';
7
- import { importSnapshot, TransactionPool } from '../../../db/transaction-pool.js';
8
- import { liteValues } from '../../../types/lite.js';
9
- import { liteTableName } from '../../../types/names.js';
10
- import { pgClient } from '../../../types/pg.js';
11
- import { id } from '../../../types/sql.js';
12
- import { initChangeLog } from '../../replicator/schema/change-log.js';
13
- import { initReplicationState, ZERO_VERSION_COLUMN_NAME, } from '../../replicator/schema/replication-state.js';
14
- import { toLexiVersion } from './lsn.js';
15
- import { initShardSchema } from './schema/init.js';
16
- import { getPublicationInfo } from './schema/published.js';
17
- import { getInternalShardConfig, setInitialSchema, validatePublications, } from './schema/shard.js';
3
+ import { Database } from "../../../../../zqlite/src/db.js";
4
+ import { createIndexStatement, createTableStatement, } from "../../../db/create.js";
5
+ import * as Mode from "../../../db/mode-enum.js";
6
+ import { mapPostgresToLite, mapPostgresToLiteIndex, } from "../../../db/pg-to-lite.js";
7
+ import { importSnapshot, TransactionPool } from "../../../db/transaction-pool.js";
8
+ import { liteValues } from "../../../types/lite.js";
9
+ import { liteTableName } from "../../../types/names.js";
10
+ import { pgClient } from "../../../types/pg.js";
11
+ import { id } from "../../../types/sql.js";
12
+ import { initChangeLog } from "../../replicator/schema/change-log.js";
13
+ import { initReplicationState, ZERO_VERSION_COLUMN_NAME, } from "../../replicator/schema/replication-state.js";
14
+ import { toLexiVersion } from "./lsn.js";
15
+ import { initShardSchema } from "./schema/init.js";
16
+ import { getPublicationInfo } from "./schema/published.js";
17
+ import { getInternalShardConfig, setInitialSchema, validatePublications, } from "./schema/shard.js";
18
18
  // https://www.postgresql.org/docs/current/warm-standby.html#STREAMING-REPLICATION-SLOTS-MANIPULATION
19
19
  const ALLOWED_SHARD_ID_CHARACTERS = /^[a-z0-9_]+$/;
20
20
  export function replicationSlot(shardID) {
@@ -1,5 +1,5 @@
1
- import { type LexiVersion } from '../../../types/lexi-version.js';
2
- import type { Change } from '../protocol/current/data.js';
1
+ import { type LexiVersion } from '../../../types/lexi-version.ts';
2
+ import type { Change } from '../protocol/current/data.ts';
3
3
  /**
4
4
  * Parsing and conversion utilities for the pg_lsn Type, which represents
5
5
  * the "Log Sequence Number" used as a monotonic progress marker for logical
@@ -1,5 +1,5 @@
1
- import { assert } from '../../../../../shared/src/asserts.js';
2
- import { versionFromLexi, versionToLexi, } from '../../../types/lexi-version.js';
1
+ import { assert } from "../../../../../shared/src/asserts.js";
2
+ import { versionFromLexi, versionToLexi, } from "../../../types/lexi-version.js";
3
3
  export function toLexiVersion(lsn) {
4
4
  const parts = lsn.split('/');
5
5
  assert(parts.length === 2, `Malformed LSN: "${lsn}"`);
@@ -1,4 +1,4 @@
1
- import * as v from '../../../../../../shared/src/valita.js';
1
+ import * as v from '../../../../../../shared/src/valita.ts';
2
2
  export declare const PROTOCOL_VERSION = 1;
3
3
  export declare const ddlEventSchema: v.ObjectType<Omit<{
4
4
  context: v.ObjectType<{
@@ -1,7 +1,7 @@
1
1
  import { literal as lit } from 'pg-format';
2
- import * as v from '../../../../../../shared/src/valita.js';
3
- import { id } from '../../../../types/sql.js';
4
- import { indexDefinitionsQuery, publishedSchema, publishedTableQuery, } from './published.js';
2
+ import * as v from "../../../../../../shared/src/valita.js";
3
+ import { id } from "../../../../types/sql.js";
4
+ import { indexDefinitionsQuery, publishedSchema, publishedTableQuery, } from "./published.js";
5
5
  // Sent in the 'version' tag of "ddlStart" and "ddlUpdate" event messages.
6
6
  // This is used to ensure that the message constructed in the upstream
7
7
  // Trigger function is compatible with the code processing it in the zero-cache.
@@ -1,6 +1,6 @@
1
1
  import type { LogContext } from '@rocicorp/logger';
2
- import type { PostgresDB } from '../../../../types/pg.js';
3
- import type { ShardConfig } from '../shard-config.js';
2
+ import type { PostgresDB } from '../../../../types/pg.ts';
3
+ import type { ShardConfig } from '../shard-config.ts';
4
4
  /**
5
5
  * Initializes a shard for initial sync.
6
6
  * This will drop any existing shard setup.
@@ -1,6 +1,6 @@
1
- import { getVersionHistory, runSchemaMigrations, } from '../../../../db/migration.js';
2
- import { AutoResetSignal } from '../../../change-streamer/schema/tables.js';
3
- import { dropShard, setupTablesAndReplication, unescapedSchema, } from './shard.js';
1
+ import { getVersionHistory, runSchemaMigrations, } from "../../../../db/migration.js";
2
+ import { AutoResetSignal } from "../../../change-streamer/schema/tables.js";
3
+ import { dropShard, setupTablesAndReplication, unescapedSchema, } from "./shard.js";
4
4
  /**
5
5
  * Initializes a shard for initial sync.
6
6
  * This will drop any existing shard setup.
@@ -1,5 +1,5 @@
1
1
  import type postgres from 'postgres';
2
- import * as v from '../../../../../../shared/src/valita.js';
2
+ import * as v from '../../../../../../shared/src/valita.ts';
3
3
  export declare function publishedTableQuery(publications: string[]): string;
4
4
  export declare function indexDefinitionsQuery(publications: string[]): string;
5
5
  export declare const publishedSchema: v.ObjectType<Omit<{
@@ -1,7 +1,7 @@
1
1
  import { literal } from 'pg-format';
2
- import { equals } from '../../../../../../shared/src/set-utils.js';
3
- import * as v from '../../../../../../shared/src/valita.js';
4
- import { publishedIndexSpec, publishedTableSpec } from '../../../../db/specs.js';
2
+ import { equals } from "../../../../../../shared/src/set-utils.js";
3
+ import * as v from "../../../../../../shared/src/valita.js";
4
+ import { publishedIndexSpec, publishedTableSpec } from "../../../../db/specs.js";
5
5
  export function publishedTableQuery(publications) {
6
6
  return `
7
7
  WITH published_columns AS (SELECT
@@ -1,8 +1,8 @@
1
1
  import type { LogContext } from '@rocicorp/logger';
2
- import * as v from '../../../../../../shared/src/valita.js';
3
- import type { PostgresDB, PostgresTransaction } from '../../../../types/pg.js';
4
- import type { ShardConfig } from '../shard-config.js';
5
- import { type PublicationInfo, type PublishedSchema } from './published.js';
2
+ import * as v from '../../../../../../shared/src/valita.ts';
3
+ import type { PostgresDB, PostgresTransaction } from '../../../../types/pg.ts';
4
+ import type { ShardConfig } from '../shard-config.ts';
5
+ import { type PublicationInfo, type PublishedSchema } from './published.ts';
6
6
  export declare function append(shardID: string): (name: string) => string;
7
7
  export declare function schemaFor(shardID: string): string;
8
8
  export declare function unescapedSchema(shardID: string): string;
@@ -1,13 +1,13 @@
1
1
  import { PG_INSUFFICIENT_PRIVILEGE } from '@drdgvhbh/postgres-error-codes';
2
2
  import { literal } from 'pg-format';
3
3
  import postgres from 'postgres';
4
- import { assert } from '../../../../../../shared/src/asserts.js';
5
- import * as v from '../../../../../../shared/src/valita.js';
6
- import { Default } from '../../../../db/postgres-replica-identity-enum.js';
7
- import { id } from '../../../../types/sql.js';
8
- import { createEventTriggerStatements } from './ddl.js';
9
- import { getPublicationInfo, publishedSchema, } from './published.js';
10
- import { validate } from './validation.js';
4
+ import { assert } from "../../../../../../shared/src/asserts.js";
5
+ import * as v from "../../../../../../shared/src/valita.js";
6
+ import { Default } from "../../../../db/postgres-replica-identity-enum.js";
7
+ import { id } from "../../../../types/sql.js";
8
+ import { createEventTriggerStatements } from "./ddl.js";
9
+ import { getPublicationInfo, publishedSchema, } from "./published.js";
10
+ import { validate } from "./validation.js";
11
11
  // Creates a function that appends `_SHARD_ID` to the input.
12
12
  export function append(shardID) {
13
13
  return (name) => id(name + '_' + shardID);
@@ -1,5 +1,5 @@
1
1
  import type { LogContext } from '@rocicorp/logger';
2
- import type { PublishedTableSpec } from '../../../../db/specs.js';
2
+ import type { PublishedTableSpec } from '../../../../db/specs.ts';
3
3
  export declare function validate(lc: LogContext, shardID: string, table: PublishedTableSpec): void;
4
4
  export declare class UnsupportedTableSchemaError extends Error {
5
5
  readonly name = "UnsupportedTableSchemaError";
@@ -1,7 +1,7 @@
1
- import { mapPostgresToLite, warnIfDataTypeSupported, } from '../../../../db/pg-to-lite.js';
2
- import { Default } from '../../../../db/postgres-replica-identity-enum.js';
3
- import { ZERO_VERSION_COLUMN_NAME } from '../../../replicator/schema/replication-state.js';
4
- import { unescapedSchema } from './shard.js';
1
+ import { mapPostgresToLite, warnIfDataTypeSupported, } from "../../../../db/pg-to-lite.js";
2
+ import { Default } from "../../../../db/postgres-replica-identity-enum.js";
3
+ import { ZERO_VERSION_COLUMN_NAME } from "../../../replicator/schema/replication-state.js";
4
+ import { unescapedSchema } from "./shard.js";
5
5
  const ALLOWED_IDENTIFIER_CHARS = /^[A-Za-z_]+[A-Za-z0-9_-]*$/;
6
6
  export function validate(lc, shardID, table) {
7
7
  const shardSchema = unescapedSchema(shardID);
@@ -1,5 +1,5 @@
1
1
  import type { LogContext } from '@rocicorp/logger';
2
- import { type InitialSyncOptions } from './initial-sync.js';
3
- import type { ShardConfig } from './shard-config.js';
2
+ import { type InitialSyncOptions } from './initial-sync.ts';
3
+ import type { ShardConfig } from './shard-config.ts';
4
4
  export declare function initSyncSchema(log: LogContext, debugName: string, shard: ShardConfig, dbPath: string, upstreamURI: string, syncOptions: InitialSyncOptions): Promise<void>;
5
5
  //# sourceMappingURL=sync-schema.d.ts.map
@@ -1,6 +1,6 @@
1
- import { runSchemaMigrations, } from '../../../db/migration-lite.js';
2
- import { AutoResetSignal } from '../../change-streamer/schema/tables.js';
3
- import { initialSync } from './initial-sync.js';
1
+ import { runSchemaMigrations, } from "../../../db/migration-lite.js";
2
+ import { AutoResetSignal } from "../../change-streamer/schema/tables.js";
3
+ import { initialSync } from "./initial-sync.js";
4
4
  export async function initSyncSchema(log, debugName, shard, dbPath, upstreamURI, syncOptions) {
5
5
  const setupMigration = {
6
6
  migrateSchema: (log, tx) => initialSync(log, shard, tx, upstreamURI, syncOptions),
@@ -3,7 +3,7 @@
3
3
  * ChangeSource and ChangeStreamer. These are not forwarded to subscribers
4
4
  * of the ChangeStreamer.
5
5
  */
6
- import * as v from '../../../../../../shared/src/valita.js';
6
+ import * as v from '../../../../../../shared/src/valita.ts';
7
7
  /**
8
8
  * Indicates that replication cannot continue and that the replica must be resynced
9
9
  * from scratch. The replication-manager will shutdown in response to this message,
@@ -3,7 +3,7 @@
3
3
  * ChangeSource and ChangeStreamer. These are not forwarded to subscribers
4
4
  * of the ChangeStreamer.
5
5
  */
6
- import * as v from '../../../../../../shared/src/valita.js';
6
+ import * as v from "../../../../../../shared/src/valita.js";
7
7
  /**
8
8
  * Indicates that replication cannot continue and that the replica must be resynced
9
9
  * from scratch. The replication-manager will shutdown in response to this message,
@@ -3,9 +3,9 @@
3
3
  * forwarded / fanned out to subscribers by the ChangeStreamerService, and
4
4
  * stored in the Change DB for catchup of old subscribers.
5
5
  */
6
- import * as v from '../../../../../../shared/src/valita.js';
7
- import { type JSONObject } from '../../../../types/bigint-json.js';
8
- import type { Satisfies } from '../../../../types/satisfies.js';
6
+ import * as v from '../../../../../../shared/src/valita.ts';
7
+ import { type JSONObject } from '../../../../types/bigint-json.ts';
8
+ import type { Satisfies } from '../../../../types/satisfies.ts';
9
9
  export declare const beginSchema: v.ObjectType<{
10
10
  tag: v.Type<"begin">;
11
11
  }, undefined>;
@@ -22,7 +22,7 @@ export declare const relationSchema: v.ObjectType<{
22
22
  replicaIdentity: v.UnionType<[v.Type<"default">, v.Type<"nothing">, v.Type<"full">, v.Type<"index">]>;
23
23
  keyColumns: v.ArrayType<v.Type<string>>;
24
24
  }, undefined>;
25
- export declare const rowSchema: v.Type<Record<string, import("../../../../types/bigint-json.js").JSONValue>>;
25
+ export declare const rowSchema: v.Type<Record<string, import("../../../../types/bigint-json.ts").JSONValue>>;
26
26
  export declare const insertSchema: v.ObjectType<{
27
27
  tag: v.Type<"insert">;
28
28
  relation: v.ObjectType<{
@@ -32,7 +32,7 @@ export declare const insertSchema: v.ObjectType<{
32
32
  replicaIdentity: v.UnionType<[v.Type<"default">, v.Type<"nothing">, v.Type<"full">, v.Type<"index">]>;
33
33
  keyColumns: v.ArrayType<v.Type<string>>;
34
34
  }, undefined>;
35
- new: v.Type<Record<string, import("../../../../types/bigint-json.js").JSONValue>>;
35
+ new: v.Type<Record<string, import("../../../../types/bigint-json.ts").JSONValue>>;
36
36
  }, undefined>;
37
37
  export declare const updateSchema: v.ObjectType<{
38
38
  tag: v.Type<"update">;
@@ -43,9 +43,9 @@ export declare const updateSchema: v.ObjectType<{
43
43
  replicaIdentity: v.UnionType<[v.Type<"default">, v.Type<"nothing">, v.Type<"full">, v.Type<"index">]>;
44
44
  keyColumns: v.ArrayType<v.Type<string>>;
45
45
  }, undefined>;
46
- key: v.Type<Record<string, import("../../../../types/bigint-json.js").JSONValue> | null>;
47
- old: v.Type<Record<string, import("../../../../types/bigint-json.js").JSONValue> | null>;
48
- new: v.Type<Record<string, import("../../../../types/bigint-json.js").JSONValue>>;
46
+ key: v.Type<Record<string, import("../../../../types/bigint-json.ts").JSONValue> | null>;
47
+ old: v.Type<Record<string, import("../../../../types/bigint-json.ts").JSONValue> | null>;
48
+ new: v.Type<Record<string, import("../../../../types/bigint-json.ts").JSONValue>>;
49
49
  }, undefined>;
50
50
  export declare const deleteSchema: v.ObjectType<{
51
51
  tag: v.Type<"delete">;
@@ -56,7 +56,7 @@ export declare const deleteSchema: v.ObjectType<{
56
56
  replicaIdentity: v.UnionType<[v.Type<"default">, v.Type<"nothing">, v.Type<"full">, v.Type<"index">]>;
57
57
  keyColumns: v.ArrayType<v.Type<string>>;
58
58
  }, undefined>;
59
- key: v.Type<Record<string, import("../../../../types/bigint-json.js").JSONValue>>;
59
+ key: v.Type<Record<string, import("../../../../types/bigint-json.ts").JSONValue>>;
60
60
  }, undefined>;
61
61
  export declare const truncateSchema: v.ObjectType<{
62
62
  tag: v.Type<"truncate">;
@@ -206,7 +206,7 @@ export declare const dataChangeSchema: v.UnionType<[v.ObjectType<{
206
206
  replicaIdentity: v.UnionType<[v.Type<"default">, v.Type<"nothing">, v.Type<"full">, v.Type<"index">]>;
207
207
  keyColumns: v.ArrayType<v.Type<string>>;
208
208
  }, undefined>;
209
- new: v.Type<Record<string, import("../../../../types/bigint-json.js").JSONValue>>;
209
+ new: v.Type<Record<string, import("../../../../types/bigint-json.ts").JSONValue>>;
210
210
  }, undefined>, v.ObjectType<{
211
211
  tag: v.Type<"update">;
212
212
  relation: v.ObjectType<{
@@ -216,9 +216,9 @@ export declare const dataChangeSchema: v.UnionType<[v.ObjectType<{
216
216
  replicaIdentity: v.UnionType<[v.Type<"default">, v.Type<"nothing">, v.Type<"full">, v.Type<"index">]>;
217
217
  keyColumns: v.ArrayType<v.Type<string>>;
218
218
  }, undefined>;
219
- key: v.Type<Record<string, import("../../../../types/bigint-json.js").JSONValue> | null>;
220
- old: v.Type<Record<string, import("../../../../types/bigint-json.js").JSONValue> | null>;
221
- new: v.Type<Record<string, import("../../../../types/bigint-json.js").JSONValue>>;
219
+ key: v.Type<Record<string, import("../../../../types/bigint-json.ts").JSONValue> | null>;
220
+ old: v.Type<Record<string, import("../../../../types/bigint-json.ts").JSONValue> | null>;
221
+ new: v.Type<Record<string, import("../../../../types/bigint-json.ts").JSONValue>>;
222
222
  }, undefined>, v.ObjectType<{
223
223
  tag: v.Type<"delete">;
224
224
  relation: v.ObjectType<{
@@ -228,7 +228,7 @@ export declare const dataChangeSchema: v.UnionType<[v.ObjectType<{
228
228
  replicaIdentity: v.UnionType<[v.Type<"default">, v.Type<"nothing">, v.Type<"full">, v.Type<"index">]>;
229
229
  keyColumns: v.ArrayType<v.Type<string>>;
230
230
  }, undefined>;
231
- key: v.Type<Record<string, import("../../../../types/bigint-json.js").JSONValue>>;
231
+ key: v.Type<Record<string, import("../../../../types/bigint-json.ts").JSONValue>>;
232
232
  }, undefined>, v.ObjectType<{
233
233
  tag: v.Type<"truncate">;
234
234
  relations: v.ArrayType<v.ObjectType<{
@@ -3,9 +3,9 @@
3
3
  * forwarded / fanned out to subscribers by the ChangeStreamerService, and
4
4
  * stored in the Change DB for catchup of old subscribers.
5
5
  */
6
- import * as v from '../../../../../../shared/src/valita.js';
7
- import { columnSpec, indexSpec, tableSpec } from '../../../../db/specs.js';
8
- import { jsonValueSchema, } from '../../../../types/bigint-json.js';
6
+ import * as v from "../../../../../../shared/src/valita.js";
7
+ import { columnSpec, indexSpec, tableSpec } from "../../../../db/specs.js";
8
+ import { jsonValueSchema, } from "../../../../types/bigint-json.js";
9
9
  export const beginSchema = v.object({
10
10
  tag: v.literal('begin'),
11
11
  });
@@ -1,4 +1,4 @@
1
- import * as v from '../../../../../../shared/src/valita.js';
1
+ import * as v from '../../../../../../shared/src/valita.ts';
2
2
  declare const begin: v.TupleType<[v.Type<"begin">, v.ObjectType<{
3
3
  tag: v.Type<"begin">;
4
4
  }, undefined>, v.ObjectType<{
@@ -13,7 +13,7 @@ declare const data: v.TupleType<[v.Type<"data">, v.UnionType<[v.ObjectType<{
13
13
  replicaIdentity: v.UnionType<[v.Type<"default">, v.Type<"nothing">, v.Type<"full">, v.Type<"index">]>;
14
14
  keyColumns: v.ArrayType<v.Type<string>>;
15
15
  }, undefined>;
16
- new: v.Type<Record<string, import("../../../../types/bigint-json.js").JSONValue>>;
16
+ new: v.Type<Record<string, import("../../../../types/bigint-json.ts").JSONValue>>;
17
17
  }, undefined>, v.ObjectType<{
18
18
  tag: v.Type<"update">;
19
19
  relation: v.ObjectType<{
@@ -23,9 +23,9 @@ declare const data: v.TupleType<[v.Type<"data">, v.UnionType<[v.ObjectType<{
23
23
  replicaIdentity: v.UnionType<[v.Type<"default">, v.Type<"nothing">, v.Type<"full">, v.Type<"index">]>;
24
24
  keyColumns: v.ArrayType<v.Type<string>>;
25
25
  }, undefined>;
26
- key: v.Type<Record<string, import("../../../../types/bigint-json.js").JSONValue> | null>;
27
- old: v.Type<Record<string, import("../../../../types/bigint-json.js").JSONValue> | null>;
28
- new: v.Type<Record<string, import("../../../../types/bigint-json.js").JSONValue>>;
26
+ key: v.Type<Record<string, import("../../../../types/bigint-json.ts").JSONValue> | null>;
27
+ old: v.Type<Record<string, import("../../../../types/bigint-json.ts").JSONValue> | null>;
28
+ new: v.Type<Record<string, import("../../../../types/bigint-json.ts").JSONValue>>;
29
29
  }, undefined>, v.ObjectType<{
30
30
  tag: v.Type<"delete">;
31
31
  relation: v.ObjectType<{
@@ -35,7 +35,7 @@ declare const data: v.TupleType<[v.Type<"data">, v.UnionType<[v.ObjectType<{
35
35
  replicaIdentity: v.UnionType<[v.Type<"default">, v.Type<"nothing">, v.Type<"full">, v.Type<"index">]>;
36
36
  keyColumns: v.ArrayType<v.Type<string>>;
37
37
  }, undefined>;
38
- key: v.Type<Record<string, import("../../../../types/bigint-json.js").JSONValue>>;
38
+ key: v.Type<Record<string, import("../../../../types/bigint-json.ts").JSONValue>>;
39
39
  }, undefined>, v.ObjectType<{
40
40
  tag: v.Type<"truncate">;
41
41
  relations: v.ArrayType<v.ObjectType<{
@@ -171,7 +171,7 @@ export declare const changeStreamDataSchema: v.UnionType<[v.TupleType<[v.Type<"b
171
171
  replicaIdentity: v.UnionType<[v.Type<"default">, v.Type<"nothing">, v.Type<"full">, v.Type<"index">]>;
172
172
  keyColumns: v.ArrayType<v.Type<string>>;
173
173
  }, undefined>;
174
- new: v.Type<Record<string, import("../../../../types/bigint-json.js").JSONValue>>;
174
+ new: v.Type<Record<string, import("../../../../types/bigint-json.ts").JSONValue>>;
175
175
  }, undefined>, v.ObjectType<{
176
176
  tag: v.Type<"update">;
177
177
  relation: v.ObjectType<{
@@ -181,9 +181,9 @@ export declare const changeStreamDataSchema: v.UnionType<[v.TupleType<[v.Type<"b
181
181
  replicaIdentity: v.UnionType<[v.Type<"default">, v.Type<"nothing">, v.Type<"full">, v.Type<"index">]>;
182
182
  keyColumns: v.ArrayType<v.Type<string>>;
183
183
  }, undefined>;
184
- key: v.Type<Record<string, import("../../../../types/bigint-json.js").JSONValue> | null>;
185
- old: v.Type<Record<string, import("../../../../types/bigint-json.js").JSONValue> | null>;
186
- new: v.Type<Record<string, import("../../../../types/bigint-json.js").JSONValue>>;
184
+ key: v.Type<Record<string, import("../../../../types/bigint-json.ts").JSONValue> | null>;
185
+ old: v.Type<Record<string, import("../../../../types/bigint-json.ts").JSONValue> | null>;
186
+ new: v.Type<Record<string, import("../../../../types/bigint-json.ts").JSONValue>>;
187
187
  }, undefined>, v.ObjectType<{
188
188
  tag: v.Type<"delete">;
189
189
  relation: v.ObjectType<{
@@ -193,7 +193,7 @@ export declare const changeStreamDataSchema: v.UnionType<[v.TupleType<[v.Type<"b
193
193
  replicaIdentity: v.UnionType<[v.Type<"default">, v.Type<"nothing">, v.Type<"full">, v.Type<"index">]>;
194
194
  keyColumns: v.ArrayType<v.Type<string>>;
195
195
  }, undefined>;
196
- key: v.Type<Record<string, import("../../../../types/bigint-json.js").JSONValue>>;
196
+ key: v.Type<Record<string, import("../../../../types/bigint-json.ts").JSONValue>>;
197
197
  }, undefined>, v.ObjectType<{
198
198
  tag: v.Type<"truncate">;
199
199
  relations: v.ArrayType<v.ObjectType<{
@@ -329,7 +329,7 @@ export declare const changeStreamMessageSchema: v.UnionType<[v.UnionType<[v.Tupl
329
329
  replicaIdentity: v.UnionType<[v.Type<"default">, v.Type<"nothing">, v.Type<"full">, v.Type<"index">]>;
330
330
  keyColumns: v.ArrayType<v.Type<string>>;
331
331
  }, undefined>;
332
- new: v.Type<Record<string, import("../../../../types/bigint-json.js").JSONValue>>;
332
+ new: v.Type<Record<string, import("../../../../types/bigint-json.ts").JSONValue>>;
333
333
  }, undefined>, v.ObjectType<{
334
334
  tag: v.Type<"update">;
335
335
  relation: v.ObjectType<{
@@ -339,9 +339,9 @@ export declare const changeStreamMessageSchema: v.UnionType<[v.UnionType<[v.Tupl
339
339
  replicaIdentity: v.UnionType<[v.Type<"default">, v.Type<"nothing">, v.Type<"full">, v.Type<"index">]>;
340
340
  keyColumns: v.ArrayType<v.Type<string>>;
341
341
  }, undefined>;
342
- key: v.Type<Record<string, import("../../../../types/bigint-json.js").JSONValue> | null>;
343
- old: v.Type<Record<string, import("../../../../types/bigint-json.js").JSONValue> | null>;
344
- new: v.Type<Record<string, import("../../../../types/bigint-json.js").JSONValue>>;
342
+ key: v.Type<Record<string, import("../../../../types/bigint-json.ts").JSONValue> | null>;
343
+ old: v.Type<Record<string, import("../../../../types/bigint-json.ts").JSONValue> | null>;
344
+ new: v.Type<Record<string, import("../../../../types/bigint-json.ts").JSONValue>>;
345
345
  }, undefined>, v.ObjectType<{
346
346
  tag: v.Type<"delete">;
347
347
  relation: v.ObjectType<{
@@ -351,7 +351,7 @@ export declare const changeStreamMessageSchema: v.UnionType<[v.UnionType<[v.Tupl
351
351
  replicaIdentity: v.UnionType<[v.Type<"default">, v.Type<"nothing">, v.Type<"full">, v.Type<"index">]>;
352
352
  keyColumns: v.ArrayType<v.Type<string>>;
353
353
  }, undefined>;
354
- key: v.Type<Record<string, import("../../../../types/bigint-json.js").JSONValue>>;
354
+ key: v.Type<Record<string, import("../../../../types/bigint-json.ts").JSONValue>>;
355
355
  }, undefined>, v.ObjectType<{
356
356
  tag: v.Type<"truncate">;
357
357
  relations: v.ArrayType<v.ObjectType<{
@@ -1,7 +1,7 @@
1
- import * as v from '../../../../../../shared/src/valita.js';
2
- import { resetRequiredSchema } from './control.js';
3
- import { beginSchema, commitSchema, dataChangeSchema, rollbackSchema, } from './data.js';
4
- import { statusMessageSchema } from './status.js';
1
+ import * as v from "../../../../../../shared/src/valita.js";
2
+ import { resetRequiredSchema } from "./control.js";
3
+ import { beginSchema, commitSchema, dataChangeSchema, rollbackSchema, } from "./data.js";
4
+ import { statusMessageSchema } from "./status.js";
5
5
  const begin = v.tuple([
6
6
  v.literal('begin'),
7
7
  beginSchema,
@@ -1,7 +1,7 @@
1
- export * from './control.js';
2
- export * from './data.js';
3
- export * from './downstream.js';
4
- export * from './path.js';
5
- export * from './status.js';
6
- export * from './upstream.js';
1
+ export * from './control.ts';
2
+ export * from './data.ts';
3
+ export * from './downstream.ts';
4
+ export * from './path.ts';
5
+ export * from './status.ts';
6
+ export * from './upstream.ts';
7
7
  //# sourceMappingURL=mod.d.ts.map
@@ -1,7 +1,7 @@
1
- export * from './control.js';
2
- export * from './data.js';
3
- export * from './downstream.js';
4
- export * from './path.js';
5
- export * from './status.js';
6
- export * from './upstream.js';
1
+ export * from "./control.js";
2
+ export * from "./data.js";
3
+ export * from "./downstream.js";
4
+ export * from "./path.js";
5
+ export * from "./status.js";
6
+ export * from "./upstream.js";
7
7
  //# sourceMappingURL=mod.js.map
@@ -1,4 +1,4 @@
1
- import * as v from '../../../../../../shared/src/valita.js';
1
+ import * as v from '../../../../../../shared/src/valita.ts';
2
2
  /**
3
3
  * The StatusMessage payload itself is unspecified. The `zero-cache` will
4
4
  * send the Commit payload when acknowledging a completed transaction, and
@@ -1,4 +1,4 @@
1
- import * as v from '../../../../../../shared/src/valita.js';
1
+ import * as v from "../../../../../../shared/src/valita.js";
2
2
  /**
3
3
  * The StatusMessage payload itself is unspecified. The `zero-cache` will
4
4
  * send the Commit payload when acknowledging a completed transaction, and
@@ -1,4 +1,4 @@
1
- import * as v from '../../../../../../shared/src/valita.js';
1
+ import * as v from '../../../../../../shared/src/valita.ts';
2
2
  /** At the moment, the only upstream messages are status messages. */
3
3
  export declare const changeSourceUpstreamSchema: v.TupleType<[v.Type<"status">, v.ObjectType<{}, undefined>, v.ObjectType<{
4
4
  watermark: v.Type<string>;
@@ -1,5 +1,5 @@
1
- import * as v from '../../../../../../shared/src/valita.js';
2
- import { statusMessageSchema } from './status.js';
1
+ import * as v from "../../../../../../shared/src/valita.js";
2
+ import { statusMessageSchema } from "./status.js";
3
3
  /** At the moment, the only upstream messages are status messages. */
4
4
  export const changeSourceUpstreamSchema = statusMessageSchema;
5
5
  //# sourceMappingURL=upstream.js.map
@@ -1,2 +1,2 @@
1
- export * as v0 from './current/mod.js';
1
+ export * as v0 from './current/mod.ts';
2
2
  //# sourceMappingURL=mod.d.ts.map
@@ -1,5 +1,5 @@
1
1
  // Types are externally exported under stable versions. Code within
2
2
  // zero-cache, on the contrary, should reference the files in
3
3
  // current/* so that it is versioned with the latest version.
4
- export * as v0 from './current/mod.js';
4
+ export * as v0 from "./current/mod.js";
5
5
  //# sourceMappingURL=mod.js.map
@@ -1,9 +1,9 @@
1
1
  import { LogContext } from '@rocicorp/logger';
2
2
  import { IncomingMessage } from 'node:http';
3
- import { type Worker } from '../../types/processes.js';
4
- import { type Source } from '../../types/streams.js';
5
- import { HttpService, type Options } from '../http-service.js';
6
- import { type ChangeStreamer, type Downstream, type SubscriberContext } from './change-streamer.js';
3
+ import { type Worker } from '../../types/processes.ts';
4
+ import { type Source } from '../../types/streams.ts';
5
+ import { HttpService, type Options } from '../http-service.ts';
6
+ import { type ChangeStreamer, type Downstream, type SubscriberContext } from './change-streamer.ts';
7
7
  export declare class ChangeStreamerHttpServer extends HttpService {
8
8
  #private;
9
9
  readonly id = "change-streamer-http-server";
@@ -2,13 +2,13 @@ import websocket from '@fastify/websocket';
2
2
  import { LogContext } from '@rocicorp/logger';
3
3
  import { IncomingMessage } from 'node:http';
4
4
  import WebSocket from 'ws';
5
- import {} from '../../types/processes.js';
6
- import { streamIn, streamOut } from '../../types/streams.js';
7
- import { URLParams } from '../../types/url-params.js';
8
- import { closeWithProtocolError } from '../../types/ws.js';
9
- import { installWebSocketReceiver } from '../dispatcher/websocket-handoff.js';
10
- import { HttpService } from '../http-service.js';
11
- import { downstreamSchema, } from './change-streamer.js';
5
+ import {} from "../../types/processes.js";
6
+ import { streamIn, streamOut } from "../../types/streams.js";
7
+ import { URLParams } from "../../types/url-params.js";
8
+ import { closeWithProtocolError } from "../../types/ws.js";
9
+ import { installWebSocketReceiver } from "../dispatcher/websocket-handoff.js";
10
+ import { HttpService } from "../http-service.js";
11
+ import { downstreamSchema, } from "./change-streamer.js";
12
12
  const DIRECT_PATH_PATTERN = '/replication/:version/changes';
13
13
  const TENANT_PATH_PATTERN = '/:tenant' + DIRECT_PATH_PATTERN;
14
14
  const V0_CHANGES_PATH = '/replication/v0/changes';
@@ -1,10 +1,10 @@
1
1
  import { LogContext } from '@rocicorp/logger';
2
- import type { PostgresDB } from '../../types/pg.js';
3
- import type { Sink, Source } from '../../types/streams.js';
4
- import { type ChangeStreamData, type ChangeStreamMessage } from '../change-source/protocol/current/downstream.js';
5
- import type { ChangeSourceUpstream } from '../change-source/protocol/current/upstream.js';
6
- import { type ChangeStreamerService } from './change-streamer.js';
7
- import { type ReplicationConfig } from './schema/tables.js';
2
+ import type { PostgresDB } from '../../types/pg.ts';
3
+ import type { Sink, Source } from '../../types/streams.ts';
4
+ import { type ChangeStreamData, type ChangeStreamMessage } from '../change-source/protocol/current/downstream.ts';
5
+ import type { ChangeSourceUpstream } from '../change-source/protocol/current/upstream.ts';
6
+ import { type ChangeStreamerService } from './change-streamer.ts';
7
+ import { type ReplicationConfig } from './schema/tables.ts';
8
8
  /**
9
9
  * Performs initialization and schema migrations to initialize a ChangeStreamerImpl.
10
10
  */
@@ -1,18 +1,18 @@
1
1
  import { LogContext } from '@rocicorp/logger';
2
2
  import { resolver } from '@rocicorp/resolver';
3
- import { unreachable } from '../../../../shared/src/asserts.js';
4
- import { min, } from '../../types/lexi-version.js';
5
- import { Subscription } from '../../types/subscription.js';
6
- import { orTimeout } from '../../types/timeout.js';
7
- import {} from '../change-source/protocol/current/downstream.js';
8
- import { DEFAULT_MAX_RETRY_DELAY_MS, RunningState, UnrecoverableError, } from '../running-state.js';
9
- import {} from './change-streamer.js';
10
- import * as ErrorType from './error-type-enum.js';
11
- import { Forwarder } from './forwarder.js';
12
- import { initChangeStreamerSchema } from './schema/init.js';
13
- import { AutoResetSignal, ensureReplicationConfig, markResetRequired, } from './schema/tables.js';
14
- import { Storer } from './storer.js';
15
- import { Subscriber } from './subscriber.js';
3
+ import { unreachable } from "../../../../shared/src/asserts.js";
4
+ import { min, } from "../../types/lexi-version.js";
5
+ import { Subscription } from "../../types/subscription.js";
6
+ import { orTimeout } from "../../types/timeout.js";
7
+ import {} from "../change-source/protocol/current/downstream.js";
8
+ import { DEFAULT_MAX_RETRY_DELAY_MS, RunningState, UnrecoverableError, } from "../running-state.js";
9
+ import {} from "./change-streamer.js";
10
+ import * as ErrorType from "./error-type-enum.js";
11
+ import { Forwarder } from "./forwarder.js";
12
+ import { initChangeStreamerSchema } from "./schema/init.js";
13
+ import { AutoResetSignal, ensureReplicationConfig, markResetRequired, } from "./schema/tables.js";
14
+ import { Storer } from "./storer.js";
15
+ import { Subscriber } from "./subscriber.js";
16
16
  /**
17
17
  * Performs initialization and schema migrations to initialize a ChangeStreamerImpl.
18
18
  */