@rocicorp/zero 0.12.2025012601 → 0.12.2025012800

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 (452) hide show
  1. package/out/advanced.js +2 -2
  2. package/out/{chunk-F5QR3K72.js → chunk-424PT5DM.js} +1 -1
  3. package/out/{chunk-JZD6FXRT.js → chunk-MJYDJPXG.js} +37 -43
  4. package/out/{chunk-JZD6FXRT.js.map → chunk-MJYDJPXG.js.map} +3 -3
  5. package/out/{chunk-I5GSZARI.js → chunk-QAAJZ32T.js} +1 -1
  6. package/out/{chunk-I5GSZARI.js.map → chunk-QAAJZ32T.js.map} +1 -1
  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 +2 -2
  133. package/out/zero-cache/src/config/zero-config.js +6 -6
  134. package/out/zero-cache/src/db/create.d.ts +1 -1
  135. package/out/zero-cache/src/db/create.js +1 -1
  136. package/out/zero-cache/src/db/lite-tables.d.ts +2 -2
  137. package/out/zero-cache/src/db/lite-tables.js +5 -5
  138. package/out/zero-cache/src/db/migration-lite.d.ts +2 -2
  139. package/out/zero-cache/src/db/migration-lite.js +4 -4
  140. package/out/zero-cache/src/db/migration.d.ts +2 -2
  141. package/out/zero-cache/src/db/migration.js +3 -3
  142. package/out/zero-cache/src/db/pg-to-lite.d.ts +2 -2
  143. package/out/zero-cache/src/db/pg-to-lite.js +5 -5
  144. package/out/zero-cache/src/db/short-lived-client.d.ts +1 -1
  145. package/out/zero-cache/src/db/short-lived-client.js +1 -1
  146. package/out/zero-cache/src/db/specs.d.ts +4 -4
  147. package/out/zero-cache/src/db/specs.js +3 -3
  148. package/out/zero-cache/src/db/statements.d.ts +2 -2
  149. package/out/zero-cache/src/db/statements.js +2 -2
  150. package/out/zero-cache/src/db/transaction-pool.d.ts +4 -4
  151. package/out/zero-cache/src/db/transaction-pool.js +3 -3
  152. package/out/zero-cache/src/server/change-streamer.d.ts +1 -1
  153. package/out/zero-cache/src/server/change-streamer.js +13 -13
  154. package/out/zero-cache/src/server/logging.d.ts +1 -1
  155. package/out/zero-cache/src/server/logging.js +2 -2
  156. package/out/zero-cache/src/server/main.d.ts +1 -1
  157. package/out/zero-cache/src/server/main.js +13 -13
  158. package/out/zero-cache/src/server/multi/config.d.ts +2 -2
  159. package/out/zero-cache/src/server/multi/config.js +3 -3
  160. package/out/zero-cache/src/server/multi/main.d.ts +1 -1
  161. package/out/zero-cache/src/server/multi/main.js +8 -8
  162. package/out/zero-cache/src/server/multi/runtime.js +1 -1
  163. package/out/zero-cache/src/server/multi/tenant-dispatcher.d.ts +2 -2
  164. package/out/zero-cache/src/server/multi/tenant-dispatcher.js +2 -2
  165. package/out/zero-cache/src/server/replicator.d.ts +1 -1
  166. package/out/zero-cache/src/server/replicator.js +10 -10
  167. package/out/zero-cache/src/server/syncer.d.ts +1 -1
  168. package/out/zero-cache/src/server/syncer.js +21 -21
  169. package/out/zero-cache/src/services/change-source/pg/change-source.d.ts +8 -8
  170. package/out/zero-cache/src/services/change-source/pg/change-source.js +24 -24
  171. package/out/zero-cache/src/services/change-source/pg/initial-sync.d.ts +2 -2
  172. package/out/zero-cache/src/services/change-source/pg/initial-sync.js +15 -15
  173. package/out/zero-cache/src/services/change-source/pg/lsn.d.ts +2 -2
  174. package/out/zero-cache/src/services/change-source/pg/lsn.js +2 -2
  175. package/out/zero-cache/src/services/change-source/pg/schema/ddl.d.ts +1 -1
  176. package/out/zero-cache/src/services/change-source/pg/schema/ddl.js +3 -3
  177. package/out/zero-cache/src/services/change-source/pg/schema/init.d.ts +2 -2
  178. package/out/zero-cache/src/services/change-source/pg/schema/init.js +3 -3
  179. package/out/zero-cache/src/services/change-source/pg/schema/published.d.ts +1 -1
  180. package/out/zero-cache/src/services/change-source/pg/schema/published.js +3 -3
  181. package/out/zero-cache/src/services/change-source/pg/schema/shard.d.ts +4 -4
  182. package/out/zero-cache/src/services/change-source/pg/schema/shard.js +7 -7
  183. package/out/zero-cache/src/services/change-source/pg/schema/validation.d.ts +1 -1
  184. package/out/zero-cache/src/services/change-source/pg/schema/validation.js +4 -4
  185. package/out/zero-cache/src/services/change-source/pg/sync-schema.d.ts +2 -2
  186. package/out/zero-cache/src/services/change-source/pg/sync-schema.js +3 -3
  187. package/out/zero-cache/src/services/change-source/protocol/current/control.d.ts +1 -1
  188. package/out/zero-cache/src/services/change-source/protocol/current/control.js +1 -1
  189. package/out/zero-cache/src/services/change-source/protocol/current/data.d.ts +14 -14
  190. package/out/zero-cache/src/services/change-source/protocol/current/data.js +3 -3
  191. package/out/zero-cache/src/services/change-source/protocol/current/downstream.d.ts +16 -16
  192. package/out/zero-cache/src/services/change-source/protocol/current/downstream.js +4 -4
  193. package/out/zero-cache/src/services/change-source/protocol/current/mod.d.ts +6 -6
  194. package/out/zero-cache/src/services/change-source/protocol/current/mod.js +6 -6
  195. package/out/zero-cache/src/services/change-source/protocol/current/status.d.ts +1 -1
  196. package/out/zero-cache/src/services/change-source/protocol/current/status.js +1 -1
  197. package/out/zero-cache/src/services/change-source/protocol/current/upstream.d.ts +1 -1
  198. package/out/zero-cache/src/services/change-source/protocol/current/upstream.js +2 -2
  199. package/out/zero-cache/src/services/change-source/protocol/mod.d.ts +1 -1
  200. package/out/zero-cache/src/services/change-source/protocol/mod.js +1 -1
  201. package/out/zero-cache/src/services/change-streamer/change-streamer-http.d.ts +4 -4
  202. package/out/zero-cache/src/services/change-streamer/change-streamer-http.js +7 -7
  203. package/out/zero-cache/src/services/change-streamer/change-streamer-service.d.ts +6 -6
  204. package/out/zero-cache/src/services/change-streamer/change-streamer-service.js +13 -13
  205. package/out/zero-cache/src/services/change-streamer/change-streamer.d.ts +10 -10
  206. package/out/zero-cache/src/services/change-streamer/change-streamer.js +3 -3
  207. package/out/zero-cache/src/services/change-streamer/forwarder.d.ts +2 -2
  208. package/out/zero-cache/src/services/change-streamer/forwarder.js +2 -2
  209. package/out/zero-cache/src/services/change-streamer/schema/init.d.ts +1 -1
  210. package/out/zero-cache/src/services/change-streamer/schema/init.js +2 -2
  211. package/out/zero-cache/src/services/change-streamer/schema/tables.d.ts +3 -3
  212. package/out/zero-cache/src/services/change-streamer/schema/tables.js +2 -2
  213. package/out/zero-cache/src/services/change-streamer/storer.d.ts +6 -6
  214. package/out/zero-cache/src/services/change-streamer/storer.js +9 -9
  215. package/out/zero-cache/src/services/change-streamer/subscriber.d.ts +5 -5
  216. package/out/zero-cache/src/services/change-streamer/subscriber.js +5 -5
  217. package/out/zero-cache/src/services/dispatcher/connect-params.d.ts +1 -1
  218. package/out/zero-cache/src/services/dispatcher/connect-params.js +3 -3
  219. package/out/zero-cache/src/services/dispatcher/sync-dispatcher.d.ts +2 -2
  220. package/out/zero-cache/src/services/dispatcher/sync-dispatcher.js +4 -4
  221. package/out/zero-cache/src/services/dispatcher/websocket-handoff.d.ts +2 -2
  222. package/out/zero-cache/src/services/dispatcher/websocket-handoff.js +3 -3
  223. package/out/zero-cache/src/services/http-service.d.ts +1 -1
  224. package/out/zero-cache/src/services/http-service.js +2 -2
  225. package/out/zero-cache/src/services/life-cycle.d.ts +2 -2
  226. package/out/zero-cache/src/services/life-cycle.js +2 -2
  227. package/out/zero-cache/src/services/limiter/sliding-window-limiter.js +1 -1
  228. package/out/zero-cache/src/services/litestream/commands.d.ts +1 -1
  229. package/out/zero-cache/src/services/litestream/commands.js +2 -2
  230. package/out/zero-cache/src/services/mutagen/mutagen.d.ts +8 -8
  231. package/out/zero-cache/src/services/mutagen/mutagen.d.ts.map +1 -1
  232. package/out/zero-cache/src/services/mutagen/mutagen.js +14 -14
  233. package/out/zero-cache/src/services/replicator/change-processor.d.ts +23 -0
  234. package/out/zero-cache/src/services/replicator/change-processor.d.ts.map +1 -0
  235. package/out/zero-cache/src/services/replicator/change-processor.js +415 -0
  236. package/out/zero-cache/src/services/replicator/change-processor.js.map +1 -0
  237. package/out/zero-cache/src/services/replicator/incremental-sync.d.ts +5 -27
  238. package/out/zero-cache/src/services/replicator/incremental-sync.d.ts.map +1 -1
  239. package/out/zero-cache/src/services/replicator/incremental-sync.js +9 -421
  240. package/out/zero-cache/src/services/replicator/incremental-sync.js.map +1 -1
  241. package/out/zero-cache/src/services/replicator/notifier.d.ts +2 -2
  242. package/out/zero-cache/src/services/replicator/notifier.js +1 -1
  243. package/out/zero-cache/src/services/replicator/replicator.d.ts +5 -5
  244. package/out/zero-cache/src/services/replicator/replicator.js +3 -3
  245. package/out/zero-cache/src/services/replicator/schema/change-log.d.ts +6 -6
  246. package/out/zero-cache/src/services/replicator/schema/change-log.js +4 -4
  247. package/out/zero-cache/src/services/replicator/schema/replication-state.d.ts +3 -3
  248. package/out/zero-cache/src/services/replicator/schema/replication-state.js +3 -3
  249. package/out/zero-cache/src/services/runner.d.ts +1 -1
  250. package/out/zero-cache/src/services/running-state.d.ts +1 -1
  251. package/out/zero-cache/src/services/running-state.js +2 -2
  252. package/out/zero-cache/src/services/view-syncer/client-handler.d.ts +7 -7
  253. package/out/zero-cache/src/services/view-syncer/client-handler.js +9 -9
  254. package/out/zero-cache/src/services/view-syncer/cvr-store.d.ts +6 -6
  255. package/out/zero-cache/src/services/view-syncer/cvr-store.js +17 -17
  256. package/out/zero-cache/src/services/view-syncer/cvr.d.ts +6 -6
  257. package/out/zero-cache/src/services/view-syncer/cvr.js +8 -8
  258. package/out/zero-cache/src/services/view-syncer/database-storage.d.ts +2 -2
  259. package/out/zero-cache/src/services/view-syncer/database-storage.js +1 -1
  260. package/out/zero-cache/src/services/view-syncer/drain-coordinator.js +1 -1
  261. package/out/zero-cache/src/services/view-syncer/key-columns.d.ts +2 -2
  262. package/out/zero-cache/src/services/view-syncer/key-columns.js +3 -3
  263. package/out/zero-cache/src/services/view-syncer/pipeline-driver.d.ts +6 -6
  264. package/out/zero-cache/src/services/view-syncer/pipeline-driver.js +8 -8
  265. package/out/zero-cache/src/services/view-syncer/schema/cvr.d.ts +2 -2
  266. package/out/zero-cache/src/services/view-syncer/schema/cvr.js +4 -4
  267. package/out/zero-cache/src/services/view-syncer/schema/init.d.ts +1 -1
  268. package/out/zero-cache/src/services/view-syncer/schema/init.js +2 -2
  269. package/out/zero-cache/src/services/view-syncer/schema/types.d.ts +12 -12
  270. package/out/zero-cache/src/services/view-syncer/schema/types.js +4 -4
  271. package/out/zero-cache/src/services/view-syncer/snapshotter.d.ts +5 -5
  272. package/out/zero-cache/src/services/view-syncer/snapshotter.js +12 -12
  273. package/out/zero-cache/src/services/view-syncer/view-syncer.d.ts +9 -9
  274. package/out/zero-cache/src/services/view-syncer/view-syncer.js +20 -20
  275. package/out/zero-cache/src/types/bigint-json.d.ts +1 -1
  276. package/out/zero-cache/src/types/bigint-json.js +1 -1
  277. package/out/zero-cache/src/types/error-for-client.d.ts +1 -1
  278. package/out/zero-cache/src/types/lexi-version.js +2 -2
  279. package/out/zero-cache/src/types/lite.d.ts +4 -4
  280. package/out/zero-cache/src/types/lite.js +2 -2
  281. package/out/zero-cache/src/types/pg.d.ts +3 -3
  282. package/out/zero-cache/src/types/pg.js +2 -2
  283. package/out/zero-cache/src/types/row-key.d.ts +1 -1
  284. package/out/zero-cache/src/types/row-key.js +3 -3
  285. package/out/zero-cache/src/types/schema-versions.d.ts +1 -1
  286. package/out/zero-cache/src/types/schema-versions.js +2 -2
  287. package/out/zero-cache/src/types/streams.d.ts +2 -2
  288. package/out/zero-cache/src/types/streams.js +4 -4
  289. package/out/zero-cache/src/types/subscription.d.ts +1 -1
  290. package/out/zero-cache/src/types/timeout.js +1 -1
  291. package/out/zero-cache/src/workers/connection.d.ts +5 -5
  292. package/out/zero-cache/src/workers/connection.js +9 -9
  293. package/out/zero-cache/src/workers/replicator.d.ts +5 -5
  294. package/out/zero-cache/src/workers/replicator.js +4 -4
  295. package/out/zero-cache/src/workers/syncer.d.ts +8 -8
  296. package/out/zero-cache/src/workers/syncer.js +10 -10
  297. package/out/zero-client/src/client/context.d.ts +6 -6
  298. package/out/zero-client/src/client/crud.d.ts +6 -6
  299. package/out/zero-client/src/client/crud.d.ts.map +1 -1
  300. package/out/zero-client/src/client/keys.d.ts +2 -2
  301. package/out/zero-client/src/client/log-options.d.ts +2 -2
  302. package/out/zero-client/src/client/log-options.d.ts.map +1 -1
  303. package/out/zero-client/src/client/metrics.d.ts +2 -2
  304. package/out/zero-client/src/client/options.d.ts +3 -3
  305. package/out/zero-client/src/client/query-manager.d.ts +6 -6
  306. package/out/zero-client/src/client/reload-error-handler.d.ts +1 -1
  307. package/out/zero-client/src/client/replicache-types.d.ts +1 -1
  308. package/out/zero-client/src/client/server-error.d.ts +2 -2
  309. package/out/zero-client/src/client/server-option.d.ts +1 -1
  310. package/out/zero-client/src/client/zero-poke-handler.d.ts +4 -4
  311. package/out/zero-client/src/client/zero-poke-handler.d.ts.map +1 -1
  312. package/out/zero-client/src/client/zero.d.ts +12 -12
  313. package/out/zero-client/src/mod.d.ts +17 -17
  314. package/out/zero-client/src/mod.d.ts.map +1 -1
  315. package/out/zero-client/src/util/socket.d.ts +1 -1
  316. package/out/zero-protocol/src/ast-hash.d.ts +1 -1
  317. package/out/zero-protocol/src/ast-hash.js +2 -2
  318. package/out/zero-protocol/src/ast.d.ts +2 -2
  319. package/out/zero-protocol/src/ast.js +5 -5
  320. package/out/zero-protocol/src/change-desired-queries.d.ts +3 -3
  321. package/out/zero-protocol/src/change-desired-queries.js +2 -2
  322. package/out/zero-protocol/src/clients-patch.d.ts +1 -1
  323. package/out/zero-protocol/src/clients-patch.js +1 -1
  324. package/out/zero-protocol/src/connect.d.ts +3 -3
  325. package/out/zero-protocol/src/connect.js +2 -2
  326. package/out/zero-protocol/src/data.d.ts +3 -3
  327. package/out/zero-protocol/src/data.js +2 -2
  328. package/out/zero-protocol/src/delete-clients.d.ts +1 -1
  329. package/out/zero-protocol/src/delete-clients.js +1 -1
  330. package/out/zero-protocol/src/down.d.ts +6 -6
  331. package/out/zero-protocol/src/down.js +7 -7
  332. package/out/zero-protocol/src/error.d.ts +1 -1
  333. package/out/zero-protocol/src/error.js +2 -2
  334. package/out/zero-protocol/src/mod.d.ts +14 -14
  335. package/out/zero-protocol/src/mod.js +14 -14
  336. package/out/zero-protocol/src/ping.d.ts +1 -1
  337. package/out/zero-protocol/src/ping.js +1 -1
  338. package/out/zero-protocol/src/poke.d.ts +9 -9
  339. package/out/zero-protocol/src/poke.js +5 -5
  340. package/out/zero-protocol/src/pong.d.ts +1 -1
  341. package/out/zero-protocol/src/pong.js +1 -1
  342. package/out/zero-protocol/src/primary-key.d.ts +1 -1
  343. package/out/zero-protocol/src/primary-key.js +1 -1
  344. package/out/zero-protocol/src/protocol-version.js +1 -1
  345. package/out/zero-protocol/src/pull.d.ts +1 -1
  346. package/out/zero-protocol/src/pull.js +2 -2
  347. package/out/zero-protocol/src/push.d.ts +26 -26
  348. package/out/zero-protocol/src/push.js +5 -5
  349. package/out/zero-protocol/src/queries-patch.d.ts +4 -4
  350. package/out/zero-protocol/src/queries-patch.js +2 -2
  351. package/out/zero-protocol/src/row-patch.d.ts +5 -5
  352. package/out/zero-protocol/src/row-patch.js +4 -4
  353. package/out/zero-protocol/src/up.d.ts +7 -7
  354. package/out/zero-protocol/src/up.js +7 -7
  355. package/out/zero-protocol/src/up.js.map +1 -1
  356. package/out/zero-protocol/src/version.d.ts +1 -1
  357. package/out/zero-protocol/src/version.js +1 -1
  358. package/out/zero-protocol/src/warm.d.ts +1 -1
  359. package/out/zero-protocol/src/warm.js +1 -1
  360. package/out/zero-react/src/mod.d.ts +8 -8
  361. package/out/zero-react/src/use-query.d.ts +4 -4
  362. package/out/zero-react/src/use-zero.d.ts +2 -2
  363. package/out/zero-schema/src/build-schema-options.d.ts +1 -1
  364. package/out/zero-schema/src/build-schema-options.js +1 -1
  365. package/out/zero-schema/src/build-schema.js +5 -5
  366. package/out/zero-schema/src/build-schema.js.map +1 -1
  367. package/out/zero-schema/src/builder/relationship-builder.d.ts +2 -2
  368. package/out/zero-schema/src/builder/schema-builder.d.ts +3 -3
  369. package/out/zero-schema/src/builder/schema-builder.js +1 -1
  370. package/out/zero-schema/src/builder/table-builder.d.ts +3 -3
  371. package/out/zero-schema/src/compiled-permissions.d.ts +18 -18
  372. package/out/zero-schema/src/compiled-permissions.js +2 -2
  373. package/out/zero-schema/src/mod.d.ts +4 -4
  374. package/out/zero-schema/src/mod.d.ts.map +1 -1
  375. package/out/zero-schema/src/permissions.d.ts +5 -5
  376. package/out/zero-schema/src/schema-config.d.ts +4 -4
  377. package/out/zero-schema/src/schema-config.d.ts.map +1 -1
  378. package/out/zero-schema/src/schema-config.js +4 -4
  379. package/out/zero-schema/src/schema-config.js.map +1 -1
  380. package/out/zero-schema/src/table-schema.d.ts +1 -1
  381. package/out/zero-solid/src/create-zero.d.ts +2 -2
  382. package/out/zero-solid/src/create-zero.d.ts.map +1 -1
  383. package/out/zero-solid/src/mod.d.ts +2 -2
  384. package/out/zero-solid/src/solid-view.d.ts +3 -3
  385. package/out/zero-solid/src/use-query.d.ts +3 -3
  386. package/out/zero-solid/src/use-query.d.ts.map +1 -1
  387. package/out/zero.js +3 -3
  388. package/out/zql/src/builder/builder.d.ts +7 -7
  389. package/out/zql/src/builder/builder.js +10 -10
  390. package/out/zql/src/builder/filter.d.ts +2 -2
  391. package/out/zql/src/builder/filter.js +2 -2
  392. package/out/zql/src/builder/like.d.ts +1 -1
  393. package/out/zql/src/builder/like.js +1 -1
  394. package/out/zql/src/ivm/array-view.d.ts +4 -4
  395. package/out/zql/src/ivm/array-view.js +2 -2
  396. package/out/zql/src/ivm/change.d.ts +2 -2
  397. package/out/zql/src/ivm/constraint.d.ts +2 -2
  398. package/out/zql/src/ivm/constraint.js +3 -3
  399. package/out/zql/src/ivm/data.d.ts +3 -3
  400. package/out/zql/src/ivm/data.js +1 -1
  401. package/out/zql/src/ivm/exists.d.ts +6 -6
  402. package/out/zql/src/ivm/exists.js +7 -7
  403. package/out/zql/src/ivm/fan-in.d.ts +6 -6
  404. package/out/zql/src/ivm/fan-in.js +4 -4
  405. package/out/zql/src/ivm/fan-out.d.ts +5 -5
  406. package/out/zql/src/ivm/filter-push.d.ts +3 -3
  407. package/out/zql/src/ivm/filter-push.d.ts.map +1 -1
  408. package/out/zql/src/ivm/filter-push.js +2 -2
  409. package/out/zql/src/ivm/filter-push.js.map +1 -1
  410. package/out/zql/src/ivm/filter.d.ts +5 -5
  411. package/out/zql/src/ivm/filter.js +2 -2
  412. package/out/zql/src/ivm/join.d.ts +7 -7
  413. package/out/zql/src/ivm/join.js +4 -4
  414. package/out/zql/src/ivm/maybe-split-and-push-edit-change.d.ts +3 -3
  415. package/out/zql/src/ivm/memory-source.d.ts +11 -11
  416. package/out/zql/src/ivm/memory-source.js +9 -9
  417. package/out/zql/src/ivm/memory-storage.d.ts +3 -3
  418. package/out/zql/src/ivm/operator.d.ts +7 -7
  419. package/out/zql/src/ivm/operator.js +1 -1
  420. package/out/zql/src/ivm/schema.d.ts +4 -4
  421. package/out/zql/src/ivm/skip.d.ts +6 -6
  422. package/out/zql/src/ivm/skip.js +2 -2
  423. package/out/zql/src/ivm/source.d.ts +3 -3
  424. package/out/zql/src/ivm/take.d.ts +6 -6
  425. package/out/zql/src/ivm/take.js +8 -8
  426. package/out/zql/src/ivm/view-apply-change.d.ts +3 -3
  427. package/out/zql/src/ivm/view-apply-change.js +2 -2
  428. package/out/zql/src/ivm/view.d.ts +4 -4
  429. package/out/zql/src/query/auth-query.d.ts +7 -7
  430. package/out/zql/src/query/auth-query.js +2 -2
  431. package/out/zql/src/query/dnf.d.ts +1 -1
  432. package/out/zql/src/query/dnf.js +2 -2
  433. package/out/zql/src/query/expression.d.ts +3 -4
  434. package/out/zql/src/query/expression.d.ts.map +1 -1
  435. package/out/zql/src/query/expression.js +2 -2
  436. package/out/zql/src/query/query-impl.d.ts +8 -8
  437. package/out/zql/src/query/query-impl.d.ts.map +1 -1
  438. package/out/zql/src/query/query-impl.js +7 -7
  439. package/out/zql/src/query/query-impl.js.map +1 -1
  440. package/out/zql/src/query/query-internal.d.ts +4 -4
  441. package/out/zql/src/query/query.d.ts +7 -10
  442. package/out/zql/src/query/query.d.ts.map +1 -1
  443. package/out/zql/src/query/typed-view.d.ts +1 -1
  444. package/out/zqlite/src/db.js +2 -2
  445. package/out/zqlite/src/internal/statement-cache.d.ts +1 -1
  446. package/out/zqlite/src/internal/statement-cache.d.ts.map +1 -1
  447. package/out/zqlite/src/internal/statement-cache.js +1 -1
  448. package/out/zqlite/src/internal/statement-cache.js.map +1 -1
  449. package/out/zqlite/src/table-source.d.ts +6 -6
  450. package/out/zqlite/src/table-source.js +11 -11
  451. package/package.json +4 -4
  452. /package/out/{chunk-F5QR3K72.js.map → chunk-424PT5DM.js.map} +0 -0
@@ -1,6 +1,6 @@
1
1
  import type { LogContext } from '@rocicorp/logger';
2
- import * as v from '../../../shared/src/valita.js';
3
- import type { Database as Db } from '../../../zqlite/src/db.js';
2
+ import * as v from '../../../shared/src/valita.ts';
3
+ import type { Database as Db } from '../../../zqlite/src/db.ts';
4
4
  type Operations = (log: LogContext, tx: Db) => Promise<void> | void;
5
5
  /**
6
6
  * Encapsulates the logic for setting up or upgrading to a new schema. After the
@@ -1,7 +1,7 @@
1
- import { assert } from '../../../shared/src/asserts.js';
2
- import { randInt } from '../../../shared/src/rand.js';
3
- import * as v from '../../../shared/src/valita.js';
4
- import { Database } from '../../../zqlite/src/db.js';
1
+ import { assert } from "../../../shared/src/asserts.js";
2
+ import { randInt } from "../../../shared/src/rand.js";
3
+ import * as v from "../../../shared/src/valita.js";
4
+ import { Database } from "../../../zqlite/src/db.js";
5
5
  /**
6
6
  * Ensures that the schema is compatible with the current code, updating and
7
7
  * migrating the schema if necessary.
@@ -1,7 +1,7 @@
1
1
  import type { LogContext } from '@rocicorp/logger';
2
2
  import type postgres from 'postgres';
3
- import * as v from '../../../shared/src/valita.js';
4
- import type { PostgresDB, PostgresTransaction } from '../types/pg.js';
3
+ import * as v from '../../../shared/src/valita.ts';
4
+ import type { PostgresDB, PostgresTransaction } from '../types/pg.ts';
5
5
  type Operations = (log: LogContext, tx: PostgresTransaction) => Promise<void>;
6
6
  /**
7
7
  * Encapsulates the logic for setting up or upgrading to a new schema. After the
@@ -1,6 +1,6 @@
1
- import { assert } from '../../../shared/src/asserts.js';
2
- import { randInt } from '../../../shared/src/rand.js';
3
- import * as v from '../../../shared/src/valita.js';
1
+ import { assert } from "../../../shared/src/asserts.js";
2
+ import { randInt } from "../../../shared/src/rand.js";
3
+ import * as v from "../../../shared/src/valita.js";
4
4
  /**
5
5
  * Ensures that the schema is compatible with the current code, updating and
6
6
  * migrating the schema if necessary.
@@ -1,6 +1,6 @@
1
1
  import type { LogContext } from '@rocicorp/logger';
2
- import { type LiteTypeString } from '../types/lite.js';
3
- import { type ColumnSpec, type IndexSpec, type LiteIndexSpec, type LiteTableSpec, type TableSpec } from './specs.js';
2
+ import { type LiteTypeString } from '../types/lite.ts';
3
+ import { type ColumnSpec, type IndexSpec, type LiteIndexSpec, type LiteTableSpec, type TableSpec } from './specs.ts';
4
4
  export declare const ZERO_VERSION_COLUMN_SPEC: ColumnSpec;
5
5
  export declare function warnIfDataTypeSupported(lc: LogContext, liteTypeString: LiteTypeString, table: string, column: string): void;
6
6
  export declare function mapPostgresToLiteColumn(table: string, column: {
@@ -1,8 +1,8 @@
1
- import { ZERO_VERSION_COLUMN_NAME } from '../services/replicator/schema/replication-state.js';
2
- import { dataTypeToZqlValueType, liteTypeString, upstreamDataType, } from '../types/lite.js';
3
- import { liteTableName } from '../types/names.js';
4
- import * as PostgresTypeClass from './postgres-type-class-enum.js';
5
- import {} from './specs.js';
1
+ import { ZERO_VERSION_COLUMN_NAME } from "../services/replicator/schema/replication-state.js";
2
+ import { dataTypeToZqlValueType, liteTypeString, upstreamDataType, } from "../types/lite.js";
3
+ import { liteTableName } from "../types/names.js";
4
+ import * as PostgresTypeClass from "./postgres-type-class-enum.js";
5
+ import {} from "./specs.js";
6
6
  export const ZERO_VERSION_COLUMN_SPEC = {
7
7
  pos: Number.MAX_SAFE_INTEGER, // i.e. last
8
8
  characterMaximumLength: null,
@@ -1,5 +1,5 @@
1
1
  import type { LogContext } from '@rocicorp/logger';
2
- import { type PostgresDB } from '../types/pg.js';
2
+ import { type PostgresDB } from '../types/pg.ts';
3
3
  /**
4
4
  * Manages on-demand short-lived connections to a DB, shutting down after
5
5
  * an idle delay.
@@ -1,4 +1,4 @@
1
- import { pgClient } from '../types/pg.js';
1
+ import { pgClient } from "../types/pg.js";
2
2
  /**
3
3
  * Manages on-demand short-lived connections to a DB, shutting down after
4
4
  * an idle delay.
@@ -1,7 +1,7 @@
1
- import type { DeepReadonly } from '../../../shared/src/json.js';
2
- import * as v from '../../../shared/src/valita.js';
3
- import type { PrimaryKey } from '../../../zero-protocol/src/primary-key.js';
4
- import type { SchemaValue } from '../../../zero-schema/src/table-schema.js';
1
+ import type { DeepReadonly } from '../../../shared/src/json.ts';
2
+ import * as v from '../../../shared/src/valita.ts';
3
+ import type { PrimaryKey } from '../../../zero-protocol/src/primary-key.ts';
4
+ import type { SchemaValue } from '../../../zero-schema/src/table-schema.ts';
5
5
  export declare const pgTypeClassSchema: v.UnionType<[v.Type<"b">, v.Type<"c">, v.Type<"d">, v.Type<"e">, v.Type<"p">, v.Type<"r">, v.Type<"m">]>;
6
6
  export declare const pgReplicaIdentitySchema: v.UnionType<[v.Type<"d">, v.Type<"n">, v.Type<"f">, v.Type<"i">]>;
7
7
  export declare const columnSpec: v.ObjectType<{
@@ -1,6 +1,6 @@
1
- import * as v from '../../../shared/src/valita.js';
2
- import * as PostgresReplicaIdentity from './postgres-replica-identity-enum.js';
3
- import * as PostgresTypeClass from './postgres-type-class-enum.js';
1
+ import * as v from "../../../shared/src/valita.js";
2
+ import * as PostgresReplicaIdentity from "./postgres-replica-identity-enum.js";
3
+ import * as PostgresTypeClass from "./postgres-type-class-enum.js";
4
4
  export const pgTypeClassSchema = v.union(v.literal(PostgresTypeClass.Base), v.literal(PostgresTypeClass.Composite), v.literal(PostgresTypeClass.Domain), v.literal(PostgresTypeClass.Enum), v.literal(PostgresTypeClass.Pseudo), v.literal(PostgresTypeClass.Range), v.literal(PostgresTypeClass.Multirange));
5
5
  export const pgReplicaIdentitySchema = v.union(v.literal(PostgresReplicaIdentity.Default), v.literal(PostgresReplicaIdentity.Nothing), v.literal(PostgresReplicaIdentity.Full), v.literal(PostgresReplicaIdentity.Index));
6
6
  export const columnSpec = v.object({
@@ -1,6 +1,6 @@
1
1
  import type { RunResult } from '@rocicorp/zero-sqlite3';
2
- import { Database } from '../../../zqlite/src/db.js';
3
- import { StatementCache } from '../../../zqlite/src/internal/statement-cache.js';
2
+ import { Database } from '../../../zqlite/src/db.ts';
3
+ import { StatementCache } from '../../../zqlite/src/internal/statement-cache.ts';
4
4
  /**
5
5
  * A stateless wrapper around a {@link StatementCache} that facilitates single-line
6
6
  * `printf()` style invocations of cached prepared statement operations.
@@ -1,5 +1,5 @@
1
- import { Database } from '../../../zqlite/src/db.js';
2
- import { StatementCache } from '../../../zqlite/src/internal/statement-cache.js';
1
+ import { Database } from "../../../zqlite/src/db.js";
2
+ import { StatementCache } from "../../../zqlite/src/internal/statement-cache.js";
3
3
  /**
4
4
  * A stateless wrapper around a {@link StatementCache} that facilitates single-line
5
5
  * `printf()` style invocations of cached prepared statement operations.
@@ -1,8 +1,8 @@
1
1
  import type { LogContext } from '@rocicorp/logger';
2
2
  import type postgres from 'postgres';
3
- import type { Enum } from '../../../shared/src/enum.js';
4
- import type { PostgresDB, PostgresTransaction } from '../types/pg.js';
5
- import * as Mode from './mode-enum.js';
3
+ import type { Enum } from '../../../shared/src/enum.ts';
4
+ import type { PostgresDB, PostgresTransaction } from '../types/pg.ts';
5
+ import * as Mode from './mode-enum.ts';
6
6
  type Mode = Enum<typeof Mode>;
7
7
  type MaybePromise<T> = Promise<T> | T;
8
8
  export type Statement = postgres.PendingQuery<(postgres.Row & Iterable<postgres.Row>)[]> | postgres.PendingQuery<postgres.Row[]>;
@@ -59,7 +59,7 @@ export declare class TransactionPool {
59
59
  * Returns an object that can be used to add more parameters.
60
60
  */
61
61
  addLoggingContext(key: string, value: string): {
62
- addLoggingContext: (key: string, value: string) => any;
62
+ addLoggingContext: (key: string, value: string) => /*elided*/ any;
63
63
  };
64
64
  /**
65
65
  * Returns a promise that:
@@ -1,7 +1,7 @@
1
1
  import { resolver } from '@rocicorp/resolver';
2
- import { assert } from '../../../shared/src/asserts.js';
3
- import { Queue } from '../../../shared/src/queue.js';
4
- import * as Mode from './mode-enum.js';
2
+ import { assert } from "../../../shared/src/asserts.js";
3
+ import { Queue } from "../../../shared/src/queue.js";
4
+ import * as Mode from "./mode-enum.js";
5
5
  /**
6
6
  * A TransactionPool is a pool of one or more {@link postgres.TransactionSql}
7
7
  * objects that participate in processing a dynamic queue of tasks.
@@ -1,3 +1,3 @@
1
- import { type Worker } from '../types/processes.js';
1
+ import { type Worker } from '../types/processes.ts';
2
2
  export default function runWorker(parent: Worker, env: NodeJS.ProcessEnv): Promise<void>;
3
3
  //# sourceMappingURL=change-streamer.d.ts.map
@@ -1,16 +1,16 @@
1
- import { assert } from '../../../shared/src/asserts.js';
2
- import { must } from '../../../shared/src/must.js';
3
- import { DatabaseInitError } from '../../../zqlite/src/db.js';
4
- import { getZeroConfig } from '../config/zero-config.js';
5
- import { deleteLiteDB } from '../db/delete-lite-db.js';
6
- import { initializeChangeSource } from '../services/change-source/pg/change-source.js';
7
- import { ChangeStreamerHttpServer } from '../services/change-streamer/change-streamer-http.js';
8
- import { initializeStreamer } from '../services/change-streamer/change-streamer-service.js';
9
- import { AutoResetSignal } from '../services/change-streamer/schema/tables.js';
10
- import { exitAfter, runUntilKilled } from '../services/life-cycle.js';
11
- import { pgClient } from '../types/pg.js';
12
- import { parentWorker, singleProcessMode, } from '../types/processes.js';
13
- import { createLogContext } from './logging.js';
1
+ import { assert } from "../../../shared/src/asserts.js";
2
+ import { must } from "../../../shared/src/must.js";
3
+ import { DatabaseInitError } from "../../../zqlite/src/db.js";
4
+ import { getZeroConfig } from "../config/zero-config.js";
5
+ import { deleteLiteDB } from "../db/delete-lite-db.js";
6
+ import { initializeChangeSource } from "../services/change-source/pg/change-source.js";
7
+ import { ChangeStreamerHttpServer } from "../services/change-streamer/change-streamer-http.js";
8
+ import { initializeStreamer } from "../services/change-streamer/change-streamer-service.js";
9
+ import { AutoResetSignal } from "../services/change-streamer/schema/tables.js";
10
+ import { exitAfter, runUntilKilled } from "../services/life-cycle.js";
11
+ import { pgClient } from "../types/pg.js";
12
+ import { parentWorker, singleProcessMode, } from "../types/processes.js";
13
+ import { createLogContext } from "./logging.js";
14
14
  export default async function runWorker(parent, env) {
15
15
  const config = getZeroConfig(env);
16
16
  const port = config.changeStreamerPort ?? config.port + 1;
@@ -1,5 +1,5 @@
1
1
  import { LogContext } from '@rocicorp/logger';
2
- import { type ZeroConfig } from '../config/zero-config.js';
2
+ import { type ZeroConfig } from '../config/zero-config.ts';
3
3
  export declare function createLogContext(config: Pick<ZeroConfig, 'log' | 'tenantID'>, context: {
4
4
  worker: string;
5
5
  }): LogContext;
@@ -1,7 +1,7 @@
1
1
  import { LogContext, consoleLogSink, } from '@rocicorp/logger';
2
2
  import { pid } from 'node:process';
3
- import {} from '../config/zero-config.js';
4
- import { stringify } from '../types/bigint-json.js';
3
+ import {} from "../config/zero-config.js";
4
+ import { stringify } from "../types/bigint-json.js";
5
5
  function createLogSink(config) {
6
6
  return config.format === 'json' ? consoleJsonLogSink : consoleLogSink;
7
7
  }
@@ -1,3 +1,3 @@
1
- import { type Worker } from '../types/processes.js';
1
+ import { type Worker } from '../types/processes.ts';
2
2
  export default function runWorker(parent: Worker | null, env: NodeJS.ProcessEnv): Promise<void>;
3
3
  //# sourceMappingURL=main.d.ts.map
@@ -1,19 +1,19 @@
1
1
  import { resolver } from '@rocicorp/resolver';
2
2
  import { availableParallelism } from 'node:os';
3
3
  import path from 'node:path';
4
- import { must } from '../../../shared/src/must.js';
5
- import { getZeroConfig } from '../config/zero-config.js';
6
- import { getSubscriberContext } from '../services/change-streamer/change-streamer-http.js';
7
- import { SyncDispatcher } from '../services/dispatcher/sync-dispatcher.js';
8
- import { installWebSocketHandoff } from '../services/dispatcher/websocket-handoff.js';
9
- import { exitAfter, ProcessManager, runUntilKilled, } from '../services/life-cycle.js';
10
- import { restoreReplica, startReplicaBackupProcess, } from '../services/litestream/commands.js';
11
- import { initViewSyncerSchema } from '../services/view-syncer/schema/init.js';
12
- import { pgClient } from '../types/pg.js';
13
- import { childWorker, parentWorker, singleProcessMode, } from '../types/processes.js';
14
- import { orTimeout } from '../types/timeout.js';
15
- import { createNotifierFrom, handleSubscriptionsFrom, subscribeTo, } from '../workers/replicator.js';
16
- import { createLogContext } from './logging.js';
4
+ import { must } from "../../../shared/src/must.js";
5
+ import { getZeroConfig } from "../config/zero-config.js";
6
+ import { getSubscriberContext } from "../services/change-streamer/change-streamer-http.js";
7
+ import { SyncDispatcher } from "../services/dispatcher/sync-dispatcher.js";
8
+ import { installWebSocketHandoff } from "../services/dispatcher/websocket-handoff.js";
9
+ import { exitAfter, ProcessManager, runUntilKilled, } from "../services/life-cycle.js";
10
+ import { restoreReplica, startReplicaBackupProcess, } from "../services/litestream/commands.js";
11
+ import { initViewSyncerSchema } from "../services/view-syncer/schema/init.js";
12
+ import { pgClient } from "../types/pg.js";
13
+ import { childWorker, parentWorker, singleProcessMode, } from "../types/processes.js";
14
+ import { orTimeout } from "../types/timeout.js";
15
+ import { createNotifierFrom, handleSubscriptionsFrom, subscribeTo, } from "../workers/replicator.js";
16
+ import { createLogContext } from "./logging.js";
17
17
  export default async function runWorker(parent, env) {
18
18
  const startMs = Date.now();
19
19
  const config = getZeroConfig(env);
@@ -1,5 +1,5 @@
1
- import { type Config } from '../../../../shared/src/options.js';
2
- import * as v from '../../../../shared/src/valita.js';
1
+ import { type Config } from '../../../../shared/src/options.ts';
2
+ import * as v from '../../../../shared/src/valita.ts';
3
3
  export declare const multiConfigSchema: {
4
4
  tenantsJSON: {
5
5
  type: v.Optional<string>;
@@ -1,6 +1,6 @@
1
- import { envSchema, parseOptionsAdvanced, } from '../../../../shared/src/options.js';
2
- import * as v from '../../../../shared/src/valita.js';
3
- import { zeroOptions } from '../../config/zero-config.js';
1
+ import { envSchema, parseOptionsAdvanced, } from "../../../../shared/src/options.js";
2
+ import * as v from "../../../../shared/src/valita.js";
3
+ import { zeroOptions } from "../../config/zero-config.js";
4
4
  const ENV_VAR_PREFIX = 'ZERO_';
5
5
  export const multiConfigSchema = {
6
6
  ...zeroOptions,
@@ -1,4 +1,4 @@
1
1
  import 'dotenv/config';
2
- import { type Worker } from '../../types/processes.js';
2
+ import { type Worker } from '../../types/processes.ts';
3
3
  export default function runWorker(parent: Worker | null, env: NodeJS.ProcessEnv): Promise<void>;
4
4
  //# sourceMappingURL=main.d.ts.map
@@ -1,12 +1,12 @@
1
1
  import 'dotenv/config'; // Imports ENV variables from .env
2
- import { assert } from '../../../../shared/src/asserts.js';
3
- import { exitAfter, ProcessManager, runUntilKilled, } from '../../services/life-cycle.js';
4
- import { childWorker, parentWorker, singleProcessMode, } from '../../types/processes.js';
5
- import { orTimeout } from '../../types/timeout.js';
6
- import { createLogContext } from '../logging.js';
7
- import { getMultiZeroConfig } from './config.js';
8
- import { getTaskID } from './runtime.js';
9
- import { TenantDispatcher } from './tenant-dispatcher.js';
2
+ import { assert } from "../../../../shared/src/asserts.js";
3
+ import { exitAfter, ProcessManager, runUntilKilled, } from "../../services/life-cycle.js";
4
+ import { childWorker, parentWorker, singleProcessMode, } from "../../types/processes.js";
5
+ import { orTimeout } from "../../types/timeout.js";
6
+ import { createLogContext } from "../logging.js";
7
+ import { getMultiZeroConfig } from "./config.js";
8
+ import { getTaskID } from "./runtime.js";
9
+ import { TenantDispatcher } from "./tenant-dispatcher.js";
10
10
  export default async function runWorker(parent, env) {
11
11
  const startMs = Date.now();
12
12
  const { config, env: baseEnv } = getMultiZeroConfig(env);
@@ -1,5 +1,5 @@
1
1
  import { nanoid } from 'nanoid';
2
- import * as v from '../../../../shared/src/valita.js';
2
+ import * as v from "../../../../shared/src/valita.js";
3
3
  // https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-metadata-endpoint-v4-response.html
4
4
  const containerMetadataSchema = v.object({ ['TaskARN']: v.string() });
5
5
  export async function getTaskID(lc) {
@@ -1,6 +1,6 @@
1
1
  import type { LogContext } from '@rocicorp/logger';
2
- import { HttpService, type Options } from '../../services/http-service.js';
3
- import type { Worker } from '../../types/processes.js';
2
+ import { HttpService, type Options } from '../../services/http-service.ts';
3
+ import type { Worker } from '../../types/processes.ts';
4
4
  type Tenant = {
5
5
  id: string;
6
6
  host?: string | undefined;
@@ -1,5 +1,5 @@
1
- import { installWebSocketHandoff } from '../../services/dispatcher/websocket-handoff.js';
2
- import { HttpService } from '../../services/http-service.js';
1
+ import { installWebSocketHandoff } from "../../services/dispatcher/websocket-handoff.js";
2
+ import { HttpService } from "../../services/http-service.js";
3
3
  export class TenantDispatcher extends HttpService {
4
4
  id = 'tenant-dispatcher';
5
5
  #tenants;
@@ -1,3 +1,3 @@
1
- import { type Worker } from '../types/processes.js';
1
+ import { type Worker } from '../types/processes.ts';
2
2
  export default function runWorker(parent: Worker, env: NodeJS.ProcessEnv, ...args: string[]): Promise<void>;
3
3
  //# sourceMappingURL=replicator.d.ts.map
@@ -1,14 +1,14 @@
1
1
  import { pid } from 'node:process';
2
- import { assert } from '../../../shared/src/asserts.js';
3
- import { must } from '../../../shared/src/must.js';
4
- import * as v from '../../../shared/src/valita.js';
5
- import { getZeroConfig } from '../config/zero-config.js';
6
- import { ChangeStreamerHttpClient } from '../services/change-streamer/change-streamer-http.js';
7
- import { exitAfter, runUntilKilled } from '../services/life-cycle.js';
8
- import { ReplicatorService, } from '../services/replicator/replicator.js';
9
- import { parentWorker, singleProcessMode, } from '../types/processes.js';
10
- import { replicaFileModeSchema, setUpMessageHandlers, setupReplica, } from '../workers/replicator.js';
11
- import { createLogContext } from './logging.js';
2
+ import { assert } from "../../../shared/src/asserts.js";
3
+ import { must } from "../../../shared/src/must.js";
4
+ import * as v from "../../../shared/src/valita.js";
5
+ import { getZeroConfig } from "../config/zero-config.js";
6
+ import { ChangeStreamerHttpClient } from "../services/change-streamer/change-streamer-http.js";
7
+ import { exitAfter, runUntilKilled } from "../services/life-cycle.js";
8
+ import { ReplicatorService, } from "../services/replicator/replicator.js";
9
+ import { parentWorker, singleProcessMode, } from "../types/processes.js";
10
+ import { replicaFileModeSchema, setUpMessageHandlers, setupReplica, } from "../workers/replicator.js";
11
+ import { createLogContext } from "./logging.js";
12
12
  export default async function runWorker(parent, env, ...args) {
13
13
  assert(args.length > 0, `replicator mode not specified`);
14
14
  const fileMode = v.parse(args[0], replicaFileModeSchema);
@@ -1,3 +1,3 @@
1
- import { type Worker } from '../types/processes.js';
1
+ import { type Worker } from '../types/processes.ts';
2
2
  export default function runWorker(parent: Worker, env: NodeJS.ProcessEnv, ...args: string[]): Promise<void>;
3
3
  //# sourceMappingURL=syncer.d.ts.map
@@ -5,27 +5,27 @@ import { ATTR_SERVICE_NAME, ATTR_SERVICE_VERSION, } from '@opentelemetry/semanti
5
5
  import { tmpdir } from 'node:os';
6
6
  import path from 'node:path';
7
7
  import { pid } from 'node:process';
8
- import { NoopSpanExporter } from '../../../otel/src/noop-span-exporter.js';
9
- import { version } from '../../../otel/src/version.js';
10
- import { assert } from '../../../shared/src/asserts.js';
11
- import { must } from '../../../shared/src/must.js';
12
- import { randInt } from '../../../shared/src/rand.js';
13
- import * as v from '../../../shared/src/valita.js';
14
- import { getSchema } from '../auth/load-schema.js';
15
- import { getZeroConfig } from '../config/zero-config.js';
16
- import { exitAfter, runUntilKilled } from '../services/life-cycle.js';
17
- import { MutagenService } from '../services/mutagen/mutagen.js';
18
- import { DatabaseStorage } from '../services/view-syncer/database-storage.js';
19
- import { DrainCoordinator } from '../services/view-syncer/drain-coordinator.js';
20
- import { PipelineDriver } from '../services/view-syncer/pipeline-driver.js';
21
- import { Snapshotter } from '../services/view-syncer/snapshotter.js';
22
- import { ViewSyncerService } from '../services/view-syncer/view-syncer.js';
23
- import { pgClient } from '../types/pg.js';
24
- import { parentWorker, singleProcessMode, } from '../types/processes.js';
25
- import { Subscription } from '../types/subscription.js';
26
- import { replicaFileModeSchema, replicaFileName } from '../workers/replicator.js';
27
- import { Syncer } from '../workers/syncer.js';
28
- import { createLogContext } from './logging.js';
8
+ import { NoopSpanExporter } from "../../../otel/src/noop-span-exporter.js";
9
+ import { version } from "../../../otel/src/version.js";
10
+ import { assert } from "../../../shared/src/asserts.js";
11
+ import { must } from "../../../shared/src/must.js";
12
+ import { randInt } from "../../../shared/src/rand.js";
13
+ import * as v from "../../../shared/src/valita.js";
14
+ import { getSchema } from "../auth/load-schema.js";
15
+ import { getZeroConfig } from "../config/zero-config.js";
16
+ import { exitAfter, runUntilKilled } from "../services/life-cycle.js";
17
+ import { MutagenService } from "../services/mutagen/mutagen.js";
18
+ import { DatabaseStorage } from "../services/view-syncer/database-storage.js";
19
+ import { DrainCoordinator } from "../services/view-syncer/drain-coordinator.js";
20
+ import { PipelineDriver } from "../services/view-syncer/pipeline-driver.js";
21
+ import { Snapshotter } from "../services/view-syncer/snapshotter.js";
22
+ import { ViewSyncerService } from "../services/view-syncer/view-syncer.js";
23
+ import { pgClient } from "../types/pg.js";
24
+ import { parentWorker, singleProcessMode, } from "../types/processes.js";
25
+ import { Subscription } from "../types/subscription.js";
26
+ import { replicaFileModeSchema, replicaFileName } from "../workers/replicator.js";
27
+ import { Syncer } from "../workers/syncer.js";
28
+ import { createLogContext } from "./logging.js";
29
29
  function randomID() {
30
30
  return randInt(1, Number.MAX_SAFE_INTEGER).toString(36);
31
31
  }
@@ -1,13 +1,13 @@
1
1
  import { LogContext } from '@rocicorp/logger';
2
2
  import { LogicalReplicationService } from 'pg-logical-replication';
3
- import type { MessageRelation } from 'pg-logical-replication/dist/output-plugins/pgoutput/pgoutput.types.js';
4
- import type { PublishedTableSpec } from '../../../db/specs.js';
5
- import { type LexiVersion } from '../../../types/lexi-version.js';
6
- import type { ChangeSource } from '../../change-streamer/change-streamer-service.js';
7
- import { type ReplicationConfig } from '../../change-streamer/schema/tables.js';
8
- import { type InitialSyncOptions } from './initial-sync.js';
9
- import { type PublishedSchema } from './schema/published.js';
10
- import type { ShardConfig } from './shard-config.js';
3
+ import type { MessageRelation } from 'pg-logical-replication/dist/output-plugins/pgoutput/pgoutput.types.ts';
4
+ import type { PublishedTableSpec } from '../../../db/specs.ts';
5
+ import { type LexiVersion } from '../../../types/lexi-version.ts';
6
+ import type { ChangeSource } from '../../change-streamer/change-streamer-service.ts';
7
+ import { type ReplicationConfig } from '../../change-streamer/schema/tables.ts';
8
+ import { type InitialSyncOptions } from './initial-sync.ts';
9
+ import { type PublishedSchema } from './schema/published.ts';
10
+ import type { ShardConfig } from './shard-config.ts';
11
11
  /**
12
12
  * Initializes a Postgres change source, including the initial sync of the
13
13
  * replica, before streaming changes from the corresponding logical replication
@@ -4,30 +4,30 @@ import { LogContext } from '@rocicorp/logger';
4
4
  import { resolver } from '@rocicorp/resolver';
5
5
  import { LogicalReplicationService, Pgoutput, PgoutputPlugin, } from 'pg-logical-replication';
6
6
  import { DatabaseError } from 'pg-protocol';
7
- import { AbortError } from '../../../../../shared/src/abort-error.js';
8
- import { assert } from '../../../../../shared/src/asserts.js';
9
- import { deepEqual } from '../../../../../shared/src/json.js';
10
- import { must } from '../../../../../shared/src/must.js';
11
- import { intersection, symmetricDifferences, } from '../../../../../shared/src/set-utils.js';
12
- import { sleep } from '../../../../../shared/src/sleep.js';
13
- import * as v from '../../../../../shared/src/valita.js';
14
- import { Database } from '../../../../../zqlite/src/db.js';
15
- import { ShortLivedClient } from '../../../db/short-lived-client.js';
16
- import { StatementRunner } from '../../../db/statements.js';
17
- import { stringify } from '../../../types/bigint-json.js';
18
- import { oneAfter } from '../../../types/lexi-version.js';
19
- import { pgClient, registerPostgresTypeParsers, } from '../../../types/pg.js';
20
- import { Subscription } from '../../../types/subscription.js';
21
- import { AutoResetSignal, } from '../../change-streamer/schema/tables.js';
22
- import { getSubscriptionState } from '../../replicator/schema/replication-state.js';
23
- import { replicationSlot } from './initial-sync.js';
24
- import { fromLexiVersion, toLexiVersion } from './lsn.js';
25
- import { replicationEventSchema } from './schema/ddl.js';
26
- import { updateShardSchema } from './schema/init.js';
27
- import { getPublicationInfo } from './schema/published.js';
28
- import { getInternalShardConfig, INTERNAL_PUBLICATION_PREFIX, replicaIdentitiesForTablesWithoutPrimaryKeys, } from './schema/shard.js';
29
- import { validate } from './schema/validation.js';
30
- import { initSyncSchema } from './sync-schema.js';
7
+ import { AbortError } from "../../../../../shared/src/abort-error.js";
8
+ import { assert } from "../../../../../shared/src/asserts.js";
9
+ import { deepEqual } from "../../../../../shared/src/json.js";
10
+ import { must } from "../../../../../shared/src/must.js";
11
+ import { intersection, symmetricDifferences, } from "../../../../../shared/src/set-utils.js";
12
+ import { sleep } from "../../../../../shared/src/sleep.js";
13
+ import * as v from "../../../../../shared/src/valita.js";
14
+ import { Database } from "../../../../../zqlite/src/db.js";
15
+ import { ShortLivedClient } from "../../../db/short-lived-client.js";
16
+ import { StatementRunner } from "../../../db/statements.js";
17
+ import { stringify } from "../../../types/bigint-json.js";
18
+ import { oneAfter } from "../../../types/lexi-version.js";
19
+ import { pgClient, registerPostgresTypeParsers, } from "../../../types/pg.js";
20
+ import { Subscription } from "../../../types/subscription.js";
21
+ import { AutoResetSignal, } from "../../change-streamer/schema/tables.js";
22
+ import { getSubscriptionState } from "../../replicator/schema/replication-state.js";
23
+ import { replicationSlot } from "./initial-sync.js";
24
+ import { fromLexiVersion, toLexiVersion } from "./lsn.js";
25
+ import { replicationEventSchema } from "./schema/ddl.js";
26
+ import { updateShardSchema } from "./schema/init.js";
27
+ import { getPublicationInfo } from "./schema/published.js";
28
+ import { getInternalShardConfig, INTERNAL_PUBLICATION_PREFIX, replicaIdentitiesForTablesWithoutPrimaryKeys, } from "./schema/shard.js";
29
+ import { validate } from "./schema/validation.js";
30
+ import { initSyncSchema } from "./sync-schema.js";
31
31
  // BigInt support from LogicalReplicationService.
32
32
  registerPostgresTypeParsers();
33
33
  /**
@@ -1,6 +1,6 @@
1
1
  import type { LogContext } from '@rocicorp/logger';
2
- import { Database } from '../../../../../zqlite/src/db.js';
3
- import type { ShardConfig } from './shard-config.js';
2
+ import { Database } from '../../../../../zqlite/src/db.ts';
3
+ import type { ShardConfig } from './shard-config.ts';
4
4
  export type InitialSyncOptions = {
5
5
  tableCopyWorkers: number;
6
6
  rowBatchSize: number;
@@ -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}"`);