@rocicorp/zero 1.10.0-canary.23 → 1.10.0-canary.25

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 (485) hide show
  1. package/out/analyze-query/src/bin-analyze.js +1 -1
  2. package/out/analyze-query/src/bin-analyze.js.map +1 -1
  3. package/out/replicache/src/btree/read.d.ts +1 -12
  4. package/out/replicache/src/btree/read.d.ts.map +1 -1
  5. package/out/replicache/src/btree/read.js +12 -24
  6. package/out/replicache/src/btree/read.js.map +1 -1
  7. package/out/replicache/src/dag/gc.d.ts.map +1 -1
  8. package/out/replicache/src/dag/gc.js +1 -2
  9. package/out/replicache/src/dag/gc.js.map +1 -1
  10. package/out/replicache/src/dag/store-impl.d.ts +2 -12
  11. package/out/replicache/src/dag/store-impl.d.ts.map +1 -1
  12. package/out/replicache/src/dag/store-impl.js +8 -22
  13. package/out/replicache/src/dag/store-impl.js.map +1 -1
  14. package/out/replicache/src/db/rebase.d.ts +2 -14
  15. package/out/replicache/src/db/rebase.d.ts.map +1 -1
  16. package/out/replicache/src/db/rebase.js +5 -27
  17. package/out/replicache/src/db/rebase.js.map +1 -1
  18. package/out/replicache/src/db/write.js.map +1 -1
  19. package/out/replicache/src/kv/expo-sqlite/store.d.ts.map +1 -1
  20. package/out/replicache/src/kv/expo-sqlite/store.js +5 -28
  21. package/out/replicache/src/kv/expo-sqlite/store.js.map +1 -1
  22. package/out/replicache/src/kv/idb-store-with-mem-fallback.d.ts +5 -15
  23. package/out/replicache/src/kv/idb-store-with-mem-fallback.d.ts.map +1 -1
  24. package/out/replicache/src/kv/idb-store-with-mem-fallback.js +25 -25
  25. package/out/replicache/src/kv/idb-store-with-mem-fallback.js.map +1 -1
  26. package/out/replicache/src/kv/idb-store.d.ts +0 -9
  27. package/out/replicache/src/kv/idb-store.d.ts.map +1 -1
  28. package/out/replicache/src/kv/idb-store.js +2 -14
  29. package/out/replicache/src/kv/idb-store.js.map +1 -1
  30. package/out/replicache/src/kv/mem-store.d.ts +0 -1
  31. package/out/replicache/src/kv/mem-store.d.ts.map +1 -1
  32. package/out/replicache/src/kv/mem-store.js +0 -3
  33. package/out/replicache/src/kv/mem-store.js.map +1 -1
  34. package/out/replicache/src/kv/op-sqlite/store.d.ts.map +1 -1
  35. package/out/replicache/src/kv/op-sqlite/store.js +1 -1
  36. package/out/replicache/src/kv/op-sqlite/store.js.map +1 -1
  37. package/out/replicache/src/kv/sqlite-store.d.ts +1 -13
  38. package/out/replicache/src/kv/sqlite-store.d.ts.map +1 -1
  39. package/out/replicache/src/kv/sqlite-store.js +4 -49
  40. package/out/replicache/src/kv/sqlite-store.js.map +1 -1
  41. package/out/replicache/src/kv/store.d.ts +0 -6
  42. package/out/replicache/src/kv/store.d.ts.map +1 -1
  43. package/out/replicache/src/persist/collect-idb-databases.d.ts +5 -10
  44. package/out/replicache/src/persist/collect-idb-databases.d.ts.map +1 -1
  45. package/out/replicache/src/persist/collect-idb-databases.js +9 -16
  46. package/out/replicache/src/persist/collect-idb-databases.js.map +1 -1
  47. package/out/replicache/src/persist/persist.d.ts.map +1 -1
  48. package/out/replicache/src/persist/persist.js +5 -12
  49. package/out/replicache/src/persist/persist.js.map +1 -1
  50. package/out/replicache/src/persist/refresh.js +2 -6
  51. package/out/replicache/src/persist/refresh.js.map +1 -1
  52. package/out/replicache/src/replicache-impl.d.ts +3 -14
  53. package/out/replicache/src/replicache-impl.d.ts.map +1 -1
  54. package/out/replicache/src/replicache-impl.js +11 -118
  55. package/out/replicache/src/replicache-impl.js.map +1 -1
  56. package/out/replicache/src/replicache-options.d.ts +0 -9
  57. package/out/replicache/src/replicache-options.d.ts.map +1 -1
  58. package/out/replicache/src/transactions.d.ts.map +1 -1
  59. package/out/replicache/src/transactions.js +1 -1
  60. package/out/replicache/src/transactions.js.map +1 -1
  61. package/out/shared/src/arrays.js +15 -1
  62. package/out/shared/src/arrays.js.map +1 -1
  63. package/out/shared/src/base64.d.ts +19 -0
  64. package/out/shared/src/base64.d.ts.map +1 -0
  65. package/out/shared/src/base64.js +40 -0
  66. package/out/shared/src/base64.js.map +1 -0
  67. package/out/shared/src/error.d.ts +0 -11
  68. package/out/shared/src/error.d.ts.map +1 -1
  69. package/out/shared/src/error.js +1 -35
  70. package/out/shared/src/error.js.map +1 -1
  71. package/out/shared/src/hash.d.ts +0 -1
  72. package/out/shared/src/hash.d.ts.map +1 -1
  73. package/out/shared/src/hash.js +10 -87
  74. package/out/shared/src/hash.js.map +1 -1
  75. package/out/shared/src/iterables.d.ts +0 -2
  76. package/out/shared/src/iterables.d.ts.map +1 -1
  77. package/out/shared/src/iterables.js +1 -18
  78. package/out/shared/src/iterables.js.map +1 -1
  79. package/out/shared/src/json.d.ts.map +1 -1
  80. package/out/shared/src/json.js +2 -2
  81. package/out/shared/src/json.js.map +1 -1
  82. package/out/shared/src/map.d.ts +2 -7
  83. package/out/shared/src/map.d.ts.map +1 -1
  84. package/out/shared/src/map.js.map +1 -1
  85. package/out/shared/src/packed-boolean-map.d.ts +7 -0
  86. package/out/shared/src/packed-boolean-map.d.ts.map +1 -0
  87. package/out/shared/src/packed-boolean-map.js +36 -0
  88. package/out/shared/src/packed-boolean-map.js.map +1 -0
  89. package/out/shared/src/ring-buffer.d.ts +0 -8
  90. package/out/shared/src/ring-buffer.d.ts.map +1 -1
  91. package/out/shared/src/ring-buffer.js +1 -22
  92. package/out/shared/src/ring-buffer.js.map +1 -1
  93. package/out/z2s/src/compiler.js +1 -1
  94. package/out/zero/package.js +3 -2
  95. package/out/zero/package.js.map +1 -1
  96. package/out/zero-cache/src/auth/read-authorizer.js +1 -1
  97. package/out/zero-cache/src/config/zero-config.d.ts +2 -27
  98. package/out/zero-cache/src/config/zero-config.d.ts.map +1 -1
  99. package/out/zero-cache/src/config/zero-config.js +28 -114
  100. package/out/zero-cache/src/config/zero-config.js.map +1 -1
  101. package/out/zero-cache/src/custom-queries/transform-query.js +1 -1
  102. package/out/zero-cache/src/db/create.d.ts.map +1 -1
  103. package/out/zero-cache/src/db/create.js +1 -4
  104. package/out/zero-cache/src/db/create.js.map +1 -1
  105. package/out/zero-cache/src/db/lite-tables.d.ts +2 -10
  106. package/out/zero-cache/src/db/lite-tables.d.ts.map +1 -1
  107. package/out/zero-cache/src/db/lite-tables.js +3 -8
  108. package/out/zero-cache/src/db/lite-tables.js.map +1 -1
  109. package/out/zero-cache/src/db/specs.d.ts +0 -41
  110. package/out/zero-cache/src/db/specs.d.ts.map +1 -1
  111. package/out/zero-cache/src/db/specs.js +3 -30
  112. package/out/zero-cache/src/db/specs.js.map +1 -1
  113. package/out/zero-cache/src/server/change-streamer.d.ts.map +1 -1
  114. package/out/zero-cache/src/server/change-streamer.js +4 -13
  115. package/out/zero-cache/src/server/change-streamer.js.map +1 -1
  116. package/out/zero-cache/src/server/inspector-delegate.d.ts +2 -18
  117. package/out/zero-cache/src/server/inspector-delegate.d.ts.map +1 -1
  118. package/out/zero-cache/src/server/inspector-delegate.js +9 -23
  119. package/out/zero-cache/src/server/inspector-delegate.js.map +1 -1
  120. package/out/zero-cache/src/server/main.d.ts.map +1 -1
  121. package/out/zero-cache/src/server/main.js +1 -8
  122. package/out/zero-cache/src/server/main.js.map +1 -1
  123. package/out/zero-cache/src/server/mutator.js +0 -2
  124. package/out/zero-cache/src/server/mutator.js.map +1 -1
  125. package/out/zero-cache/src/server/reaper.d.ts.map +1 -1
  126. package/out/zero-cache/src/server/reaper.js +0 -2
  127. package/out/zero-cache/src/server/reaper.js.map +1 -1
  128. package/out/zero-cache/src/server/replicator.d.ts.map +1 -1
  129. package/out/zero-cache/src/server/replicator.js +2 -8
  130. package/out/zero-cache/src/server/replicator.js.map +1 -1
  131. package/out/zero-cache/src/server/runner/zero-dispatcher.d.ts.map +1 -1
  132. package/out/zero-cache/src/server/runner/zero-dispatcher.js +0 -3
  133. package/out/zero-cache/src/server/runner/zero-dispatcher.js.map +1 -1
  134. package/out/zero-cache/src/server/syncer.d.ts.map +1 -1
  135. package/out/zero-cache/src/server/syncer.js +0 -2
  136. package/out/zero-cache/src/server/syncer.js.map +1 -1
  137. package/out/zero-cache/src/services/analyze.d.ts.map +1 -1
  138. package/out/zero-cache/src/services/analyze.js +2 -3
  139. package/out/zero-cache/src/services/analyze.js.map +1 -1
  140. package/out/zero-cache/src/services/change-source/common/backfill-manager.d.ts.map +1 -1
  141. package/out/zero-cache/src/services/change-source/common/backfill-manager.js +1 -14
  142. package/out/zero-cache/src/services/change-source/common/backfill-manager.js.map +1 -1
  143. package/out/zero-cache/src/services/change-source/common/change-stream-multiplexer.d.ts.map +1 -1
  144. package/out/zero-cache/src/services/change-source/common/change-stream-multiplexer.js +3 -15
  145. package/out/zero-cache/src/services/change-source/common/change-stream-multiplexer.js.map +1 -1
  146. package/out/zero-cache/src/services/change-source/pg/change-source.d.ts +1 -11
  147. package/out/zero-cache/src/services/change-source/pg/change-source.d.ts.map +1 -1
  148. package/out/zero-cache/src/services/change-source/pg/change-source.js +2 -21
  149. package/out/zero-cache/src/services/change-source/pg/change-source.js.map +1 -1
  150. package/out/zero-cache/src/services/change-source/pg/initial-sync.d.ts +0 -1
  151. package/out/zero-cache/src/services/change-source/pg/initial-sync.d.ts.map +1 -1
  152. package/out/zero-cache/src/services/change-source/pg/initial-sync.js +7 -8
  153. package/out/zero-cache/src/services/change-source/pg/initial-sync.js.map +1 -1
  154. package/out/zero-cache/src/services/change-source/pg/schema/ddl.d.ts +229 -1513
  155. package/out/zero-cache/src/services/change-source/pg/schema/ddl.d.ts.map +1 -1
  156. package/out/zero-cache/src/services/change-source/pg/schema/ddl.js +2 -2
  157. package/out/zero-cache/src/services/change-source/pg/schema/ddl.js.map +1 -1
  158. package/out/zero-cache/src/services/change-source/pg/schema/init.d.ts +1 -1
  159. package/out/zero-cache/src/services/change-source/pg/schema/init.d.ts.map +1 -1
  160. package/out/zero-cache/src/services/change-source/pg/schema/init.js +6 -15
  161. package/out/zero-cache/src/services/change-source/pg/schema/init.js.map +1 -1
  162. package/out/zero-cache/src/services/change-source/pg/schema/published.d.ts +20 -137
  163. package/out/zero-cache/src/services/change-source/pg/schema/published.d.ts.map +1 -1
  164. package/out/zero-cache/src/services/change-source/pg/schema/published.js +13 -82
  165. package/out/zero-cache/src/services/change-source/pg/schema/published.js.map +1 -1
  166. package/out/zero-cache/src/services/change-source/pg/schema/shard.d.ts +21 -128
  167. package/out/zero-cache/src/services/change-source/pg/schema/shard.d.ts.map +1 -1
  168. package/out/zero-cache/src/services/change-source/pg/schema/shard.js +5 -5
  169. package/out/zero-cache/src/services/change-source/pg/schema/shard.js.map +1 -1
  170. package/out/zero-cache/src/services/change-source/protocol/current/data.d.ts +0 -2
  171. package/out/zero-cache/src/services/change-source/protocol/current/data.d.ts.map +1 -1
  172. package/out/zero-cache/src/services/change-source/protocol/current/downstream.d.ts +0 -3
  173. package/out/zero-cache/src/services/change-source/protocol/current/downstream.d.ts.map +1 -1
  174. package/out/zero-cache/src/services/change-streamer/change-streamer-http.d.ts +0 -3
  175. package/out/zero-cache/src/services/change-streamer/change-streamer-http.d.ts.map +1 -1
  176. package/out/zero-cache/src/services/change-streamer/change-streamer-http.js +1 -3
  177. package/out/zero-cache/src/services/change-streamer/change-streamer-http.js.map +1 -1
  178. package/out/zero-cache/src/services/change-streamer/change-streamer.d.ts +0 -1
  179. package/out/zero-cache/src/services/change-streamer/change-streamer.d.ts.map +1 -1
  180. package/out/zero-cache/src/services/litestream/commands.d.ts.map +1 -1
  181. package/out/zero-cache/src/services/litestream/commands.js +3 -8
  182. package/out/zero-cache/src/services/litestream/commands.js.map +1 -1
  183. package/out/zero-cache/src/services/litestream/config-v5.yml +1 -15
  184. package/out/zero-cache/src/services/mutagen/mutagen.d.ts +0 -5
  185. package/out/zero-cache/src/services/mutagen/mutagen.d.ts.map +1 -1
  186. package/out/zero-cache/src/services/mutagen/mutagen.js +1 -7
  187. package/out/zero-cache/src/services/mutagen/mutagen.js.map +1 -1
  188. package/out/zero-cache/src/services/mutagen/pusher.d.ts +87 -87
  189. package/out/zero-cache/src/services/mutagen/pusher.js +2 -3
  190. package/out/zero-cache/src/services/mutagen/pusher.js.map +1 -1
  191. package/out/zero-cache/src/services/replicator/change-processor.d.ts.map +1 -1
  192. package/out/zero-cache/src/services/replicator/change-processor.js +16 -16
  193. package/out/zero-cache/src/services/replicator/change-processor.js.map +1 -1
  194. package/out/zero-cache/src/services/replicator/incremental-sync.d.ts.map +1 -1
  195. package/out/zero-cache/src/services/replicator/incremental-sync.js +0 -1
  196. package/out/zero-cache/src/services/replicator/incremental-sync.js.map +1 -1
  197. package/out/zero-cache/src/services/replicator/write-worker-client.d.ts +2 -27
  198. package/out/zero-cache/src/services/replicator/write-worker-client.d.ts.map +1 -1
  199. package/out/zero-cache/src/services/replicator/write-worker-client.js +2 -3
  200. package/out/zero-cache/src/services/replicator/write-worker-client.js.map +1 -1
  201. package/out/zero-cache/src/services/replicator/write-worker.js +5 -24
  202. package/out/zero-cache/src/services/replicator/write-worker.js.map +1 -1
  203. package/out/zero-cache/src/services/run-ast.d.ts +0 -12
  204. package/out/zero-cache/src/services/run-ast.d.ts.map +1 -1
  205. package/out/zero-cache/src/services/run-ast.js +15 -27
  206. package/out/zero-cache/src/services/run-ast.js.map +1 -1
  207. package/out/zero-cache/src/services/runner.d.ts.map +1 -1
  208. package/out/zero-cache/src/services/runner.js +1 -1
  209. package/out/zero-cache/src/services/runner.js.map +1 -1
  210. package/out/zero-cache/src/services/view-syncer/cvr.d.ts +0 -45
  211. package/out/zero-cache/src/services/view-syncer/cvr.d.ts.map +1 -1
  212. package/out/zero-cache/src/services/view-syncer/cvr.js +1 -133
  213. package/out/zero-cache/src/services/view-syncer/cvr.js.map +1 -1
  214. package/out/zero-cache/src/services/view-syncer/drain-coordinator.d.ts +1 -14
  215. package/out/zero-cache/src/services/view-syncer/drain-coordinator.d.ts.map +1 -1
  216. package/out/zero-cache/src/services/view-syncer/drain-coordinator.js +4 -30
  217. package/out/zero-cache/src/services/view-syncer/drain-coordinator.js.map +1 -1
  218. package/out/zero-cache/src/services/view-syncer/inspect-handler.d.ts +1 -1
  219. package/out/zero-cache/src/services/view-syncer/inspect-handler.d.ts.map +1 -1
  220. package/out/zero-cache/src/services/view-syncer/inspect-handler.js +2 -2
  221. package/out/zero-cache/src/services/view-syncer/inspect-handler.js.map +1 -1
  222. package/out/zero-cache/src/services/view-syncer/pipeline-driver.d.ts +1 -2
  223. package/out/zero-cache/src/services/view-syncer/pipeline-driver.d.ts.map +1 -1
  224. package/out/zero-cache/src/services/view-syncer/pipeline-driver.js +18 -33
  225. package/out/zero-cache/src/services/view-syncer/pipeline-driver.js.map +1 -1
  226. package/out/zero-cache/src/services/view-syncer/query-covering.d.ts.map +1 -1
  227. package/out/zero-cache/src/services/view-syncer/query-covering.js.map +1 -1
  228. package/out/zero-cache/src/services/view-syncer/snapshotter.d.ts +1 -4
  229. package/out/zero-cache/src/services/view-syncer/snapshotter.d.ts.map +1 -1
  230. package/out/zero-cache/src/services/view-syncer/snapshotter.js +3 -9
  231. package/out/zero-cache/src/services/view-syncer/snapshotter.js.map +1 -1
  232. package/out/zero-cache/src/services/view-syncer/view-syncer.d.ts +1 -11
  233. package/out/zero-cache/src/services/view-syncer/view-syncer.d.ts.map +1 -1
  234. package/out/zero-cache/src/services/view-syncer/view-syncer.js +90 -470
  235. package/out/zero-cache/src/services/view-syncer/view-syncer.js.map +1 -1
  236. package/out/zero-cache/src/types/processes.d.ts +0 -32
  237. package/out/zero-cache/src/types/processes.d.ts.map +1 -1
  238. package/out/zero-cache/src/types/processes.js +4 -43
  239. package/out/zero-cache/src/types/processes.js.map +1 -1
  240. package/out/zero-cache/src/types/profiler.d.ts +0 -12
  241. package/out/zero-cache/src/types/profiler.d.ts.map +1 -1
  242. package/out/zero-cache/src/types/profiler.js +1 -46
  243. package/out/zero-cache/src/types/profiler.js.map +1 -1
  244. package/out/zero-cache/src/workers/connect-params.d.ts +17 -1
  245. package/out/zero-cache/src/workers/connect-params.d.ts.map +1 -1
  246. package/out/zero-cache/src/workers/connect-params.js +21 -1
  247. package/out/zero-cache/src/workers/connect-params.js.map +1 -1
  248. package/out/zero-cache/src/workers/connection.d.ts +4 -4
  249. package/out/zero-cache/src/workers/connection.d.ts.map +1 -1
  250. package/out/zero-cache/src/workers/connection.js +8 -8
  251. package/out/zero-cache/src/workers/connection.js.map +1 -1
  252. package/out/zero-cache/src/workers/replicator.d.ts +0 -1
  253. package/out/zero-cache/src/workers/replicator.d.ts.map +1 -1
  254. package/out/zero-cache/src/workers/replicator.js +2 -4
  255. package/out/zero-cache/src/workers/replicator.js.map +1 -1
  256. package/out/zero-cache/src/workers/syncer-ws-message-handler.d.ts.map +1 -1
  257. package/out/zero-cache/src/workers/syncer-ws-message-handler.js +16 -21
  258. package/out/zero-cache/src/workers/syncer-ws-message-handler.js.map +1 -1
  259. package/out/zero-cache/src/workers/syncer.d.ts.map +1 -1
  260. package/out/zero-cache/src/workers/syncer.js +1 -10
  261. package/out/zero-cache/src/workers/syncer.js.map +1 -1
  262. package/out/zero-client/src/client/connection-manager.d.ts +0 -20
  263. package/out/zero-client/src/client/connection-manager.d.ts.map +1 -1
  264. package/out/zero-client/src/client/connection-manager.js +13 -77
  265. package/out/zero-client/src/client/connection-manager.js.map +1 -1
  266. package/out/zero-client/src/client/connection-status-enum.d.ts +0 -2
  267. package/out/zero-client/src/client/connection-status-enum.d.ts.map +1 -1
  268. package/out/zero-client/src/client/connection-status-enum.js +1 -3
  269. package/out/zero-client/src/client/connection-status-enum.js.map +1 -1
  270. package/out/zero-client/src/client/connection.d.ts +0 -6
  271. package/out/zero-client/src/client/connection.d.ts.map +1 -1
  272. package/out/zero-client/src/client/connection.js +1 -2
  273. package/out/zero-client/src/client/connection.js.map +1 -1
  274. package/out/zero-client/src/client/context.d.ts +2 -27
  275. package/out/zero-client/src/client/context.d.ts.map +1 -1
  276. package/out/zero-client/src/client/context.js +1 -112
  277. package/out/zero-client/src/client/context.js.map +1 -1
  278. package/out/zero-client/src/client/custom.js +2 -2
  279. package/out/zero-client/src/client/custom.js.map +1 -1
  280. package/out/zero-client/src/client/error.js +1 -1
  281. package/out/zero-client/src/client/inspector/lazy-inspector.js +2 -2
  282. package/out/zero-client/src/client/inspector/lazy-inspector.js.map +1 -1
  283. package/out/zero-client/src/client/ivm-branch.d.ts.map +1 -1
  284. package/out/zero-client/src/client/ivm-branch.js +3 -20
  285. package/out/zero-client/src/client/ivm-branch.js.map +1 -1
  286. package/out/zero-client/src/client/mutation-tracker.d.ts.map +1 -1
  287. package/out/zero-client/src/client/mutation-tracker.js +1 -1
  288. package/out/zero-client/src/client/mutation-tracker.js.map +1 -1
  289. package/out/zero-client/src/client/mutator-proxy.d.ts.map +1 -1
  290. package/out/zero-client/src/client/mutator-proxy.js +1 -2
  291. package/out/zero-client/src/client/mutator-proxy.js.map +1 -1
  292. package/out/zero-client/src/client/options.d.ts +0 -3
  293. package/out/zero-client/src/client/options.d.ts.map +1 -1
  294. package/out/zero-client/src/client/options.js.map +1 -1
  295. package/out/zero-client/src/client/query-manager.d.ts +0 -2
  296. package/out/zero-client/src/client/query-manager.d.ts.map +1 -1
  297. package/out/zero-client/src/client/query-manager.js +9 -48
  298. package/out/zero-client/src/client/query-manager.js.map +1 -1
  299. package/out/zero-client/src/client/version.js +1 -1
  300. package/out/zero-client/src/client/zero-rep.d.ts +0 -1
  301. package/out/zero-client/src/client/zero-rep.d.ts.map +1 -1
  302. package/out/zero-client/src/client/zero-rep.js +6 -9
  303. package/out/zero-client/src/client/zero-rep.js.map +1 -1
  304. package/out/zero-client/src/client/zero.d.ts +3 -18
  305. package/out/zero-client/src/client/zero.d.ts.map +1 -1
  306. package/out/zero-client/src/client/zero.js +36 -123
  307. package/out/zero-client/src/client/zero.js.map +1 -1
  308. package/out/zero-client/src/types/query-result.d.ts +0 -2
  309. package/out/zero-client/src/types/query-result.d.ts.map +1 -1
  310. package/out/zero-protocol/src/ast.d.ts +1 -64
  311. package/out/zero-protocol/src/ast.d.ts.map +1 -1
  312. package/out/zero-protocol/src/ast.js +51 -223
  313. package/out/zero-protocol/src/ast.js.map +1 -1
  314. package/out/zero-protocol/src/connect.d.ts +16 -0
  315. package/out/zero-protocol/src/connect.d.ts.map +1 -1
  316. package/out/zero-protocol/src/connect.js +27 -1
  317. package/out/zero-protocol/src/connect.js.map +1 -1
  318. package/out/zero-protocol/src/error.d.ts +1 -1
  319. package/out/zero-protocol/src/feature-flag-enum.d.ts +7 -0
  320. package/out/zero-protocol/src/feature-flag-enum.d.ts.map +1 -0
  321. package/out/zero-protocol/src/feature-flag-enum.js +7 -0
  322. package/out/zero-protocol/src/feature-flag-enum.js.map +1 -0
  323. package/out/zero-protocol/src/feature-flag.d.ts +5 -0
  324. package/out/zero-protocol/src/feature-flag.d.ts.map +1 -0
  325. package/out/zero-protocol/src/poke.d.ts +11 -4
  326. package/out/zero-protocol/src/poke.d.ts.map +1 -1
  327. package/out/zero-protocol/src/poke.js +3 -2
  328. package/out/zero-protocol/src/poke.js.map +1 -1
  329. package/out/zero-protocol/src/protocol-version.d.ts +30 -6
  330. package/out/zero-protocol/src/protocol-version.d.ts.map +1 -1
  331. package/out/zero-protocol/src/protocol-version.js +1 -1
  332. package/out/zero-protocol/src/protocol-version.js.map +1 -1
  333. package/out/zero-protocol/src/query-hash.d.ts +2 -7
  334. package/out/zero-protocol/src/query-hash.d.ts.map +1 -1
  335. package/out/zero-protocol/src/query-hash.js +9 -12
  336. package/out/zero-protocol/src/query-hash.js.map +1 -1
  337. package/out/zero-react/src/use-query.d.ts +4 -5
  338. package/out/zero-react/src/use-query.d.ts.map +1 -1
  339. package/out/zero-react/src/use-query.js +9 -86
  340. package/out/zero-react/src/use-query.js.map +1 -1
  341. package/out/zero-solid/src/solid-view.d.ts +0 -17
  342. package/out/zero-solid/src/solid-view.d.ts.map +1 -1
  343. package/out/zero-solid/src/solid-view.js +1 -39
  344. package/out/zero-solid/src/solid-view.js.map +1 -1
  345. package/out/zero-solid/src/use-query.js +3 -5
  346. package/out/zero-solid/src/use-query.js.map +1 -1
  347. package/out/zql/src/builder/debug-delegate.d.ts +1 -6
  348. package/out/zql/src/builder/debug-delegate.d.ts.map +1 -1
  349. package/out/zql/src/builder/debug-delegate.js +2 -14
  350. package/out/zql/src/builder/debug-delegate.js.map +1 -1
  351. package/out/zql/src/ivm/array-view.d.ts +0 -29
  352. package/out/zql/src/ivm/array-view.d.ts.map +1 -1
  353. package/out/zql/src/ivm/array-view.js +12 -63
  354. package/out/zql/src/ivm/array-view.js.map +1 -1
  355. package/out/zql/src/ivm/cap.d.ts.map +1 -1
  356. package/out/zql/src/ivm/cap.js +3 -5
  357. package/out/zql/src/ivm/cap.js.map +1 -1
  358. package/out/zql/src/ivm/data.d.ts.map +1 -1
  359. package/out/zql/src/ivm/data.js +3 -8
  360. package/out/zql/src/ivm/data.js.map +1 -1
  361. package/out/zql/src/ivm/exists.d.ts +1 -1
  362. package/out/zql/src/ivm/exists.d.ts.map +1 -1
  363. package/out/zql/src/ivm/exists.js +1 -1
  364. package/out/zql/src/ivm/exists.js.map +1 -1
  365. package/out/zql/src/ivm/fan-in.d.ts +2 -2
  366. package/out/zql/src/ivm/fan-in.d.ts.map +1 -1
  367. package/out/zql/src/ivm/fan-in.js +5 -6
  368. package/out/zql/src/ivm/fan-in.js.map +1 -1
  369. package/out/zql/src/ivm/fan-out.d.ts +2 -2
  370. package/out/zql/src/ivm/fan-out.d.ts.map +1 -1
  371. package/out/zql/src/ivm/fan-out.js.map +1 -1
  372. package/out/zql/src/ivm/filter-operators.d.ts +4 -4
  373. package/out/zql/src/ivm/filter-operators.d.ts.map +1 -1
  374. package/out/zql/src/ivm/filter-operators.js +8 -10
  375. package/out/zql/src/ivm/filter-operators.js.map +1 -1
  376. package/out/zql/src/ivm/filter.d.ts +2 -2
  377. package/out/zql/src/ivm/filter.d.ts.map +1 -1
  378. package/out/zql/src/ivm/filter.js +4 -7
  379. package/out/zql/src/ivm/filter.js.map +1 -1
  380. package/out/zql/src/ivm/flipped-join.js +2 -2
  381. package/out/zql/src/ivm/flipped-join.js.map +1 -1
  382. package/out/zql/src/ivm/maybe-split-and-push-edit-change.d.ts +1 -1
  383. package/out/zql/src/ivm/maybe-split-and-push-edit-change.d.ts.map +1 -1
  384. package/out/zql/src/ivm/maybe-split-and-push-edit-change.js +4 -6
  385. package/out/zql/src/ivm/maybe-split-and-push-edit-change.js.map +1 -1
  386. package/out/zql/src/ivm/memory-source.d.ts +3 -15
  387. package/out/zql/src/ivm/memory-source.d.ts.map +1 -1
  388. package/out/zql/src/ivm/memory-source.js +19 -40
  389. package/out/zql/src/ivm/memory-source.js.map +1 -1
  390. package/out/zql/src/ivm/take.d.ts.map +1 -1
  391. package/out/zql/src/ivm/take.js +4 -3
  392. package/out/zql/src/ivm/take.js.map +1 -1
  393. package/out/zql/src/ivm/union-fan-in.d.ts.map +1 -1
  394. package/out/zql/src/ivm/union-fan-in.js +7 -9
  395. package/out/zql/src/ivm/union-fan-in.js.map +1 -1
  396. package/out/zql/src/ivm/view-apply-change.d.ts.map +1 -1
  397. package/out/zql/src/ivm/view-apply-change.js +4 -9
  398. package/out/zql/src/ivm/view-apply-change.js.map +1 -1
  399. package/out/zql/src/ivm/view.d.ts +0 -15
  400. package/out/zql/src/ivm/view.d.ts.map +1 -1
  401. package/out/zql/src/mutate/mutator-registry.d.ts.map +1 -1
  402. package/out/zql/src/mutate/mutator-registry.js +2 -2
  403. package/out/zql/src/mutate/mutator-registry.js.map +1 -1
  404. package/out/zql/src/query/query-delegate-base.d.ts +1 -9
  405. package/out/zql/src/query/query-delegate-base.d.ts.map +1 -1
  406. package/out/zql/src/query/query-delegate-base.js +36 -132
  407. package/out/zql/src/query/query-delegate-base.js.map +1 -1
  408. package/out/zql/src/query/query-delegate.d.ts +1 -50
  409. package/out/zql/src/query/query-delegate.d.ts.map +1 -1
  410. package/out/zql/src/query/query-impl.d.ts +14 -25
  411. package/out/zql/src/query/query-impl.d.ts.map +1 -1
  412. package/out/zql/src/query/query-impl.js +94 -414
  413. package/out/zql/src/query/query-impl.js.map +1 -1
  414. package/out/zql/src/query/query-internals.d.ts +11 -21
  415. package/out/zql/src/query/query-internals.d.ts.map +1 -1
  416. package/out/zql/src/query/query-internals.js.map +1 -1
  417. package/out/zql/src/query/query.d.ts +2 -11
  418. package/out/zql/src/query/query.d.ts.map +1 -1
  419. package/out/zql/src/query/runnable-query-impl.d.ts +2 -3
  420. package/out/zql/src/query/runnable-query-impl.d.ts.map +1 -1
  421. package/out/zql/src/query/runnable-query-impl.js +2 -23
  422. package/out/zql/src/query/runnable-query-impl.js.map +1 -1
  423. package/out/zql/src/query/typed-view.d.ts +1 -1
  424. package/out/zql/src/query/typed-view.d.ts.map +1 -1
  425. package/out/zqlite/src/db.d.ts +1 -9
  426. package/out/zqlite/src/db.d.ts.map +1 -1
  427. package/out/zqlite/src/db.js +2 -8
  428. package/out/zqlite/src/db.js.map +1 -1
  429. package/out/zqlite/src/query-builder.d.ts.map +1 -1
  430. package/out/zqlite/src/query-builder.js +1 -2
  431. package/out/zqlite/src/query-builder.js.map +1 -1
  432. package/out/zqlite/src/sqlite-stat-fanout.d.ts.map +1 -1
  433. package/out/zqlite/src/sqlite-stat-fanout.js +0 -1
  434. package/out/zqlite/src/sqlite-stat-fanout.js.map +1 -1
  435. package/out/zqlite/src/table-source.d.ts +1 -2
  436. package/out/zqlite/src/table-source.d.ts.map +1 -1
  437. package/out/zqlite/src/table-source.js +6 -12
  438. package/out/zqlite/src/table-source.js.map +1 -1
  439. package/package.json +3 -2
  440. package/out/replicache/src/dag/invalid-ref-count-error.d.ts +0 -12
  441. package/out/replicache/src/dag/invalid-ref-count-error.d.ts.map +0 -1
  442. package/out/replicache/src/dag/invalid-ref-count-error.js +0 -19
  443. package/out/replicache/src/dag/invalid-ref-count-error.js.map +0 -1
  444. package/out/shared/src/xxhash32.d.ts +0 -36
  445. package/out/shared/src/xxhash32.d.ts.map +0 -1
  446. package/out/shared/src/xxhash32.js +0 -51
  447. package/out/shared/src/xxhash32.js.map +0 -1
  448. package/out/zero-cache/src/db/index-predicate.d.ts +0 -4
  449. package/out/zero-cache/src/db/index-predicate.d.ts.map +0 -1
  450. package/out/zero-cache/src/db/index-predicate.js +0 -46
  451. package/out/zero-cache/src/db/index-predicate.js.map +0 -1
  452. package/out/zero-cache/src/services/change-source/pg/schema/index-predicate.d.ts +0 -19
  453. package/out/zero-cache/src/services/change-source/pg/schema/index-predicate.d.ts.map +0 -1
  454. package/out/zero-cache/src/services/change-source/pg/schema/index-predicate.js +0 -581
  455. package/out/zero-cache/src/services/change-source/pg/schema/index-predicate.js.map +0 -1
  456. package/out/zero-cache/src/services/litestream/litestream-checkpointer.js +0 -131
  457. package/out/zero-cache/src/services/litestream/litestream-checkpointer.js.map +0 -1
  458. package/out/zero-cache/src/services/litestream/litestream-controller.d.ts +0 -70
  459. package/out/zero-cache/src/services/litestream/litestream-controller.d.ts.map +0 -1
  460. package/out/zero-cache/src/services/litestream/litestream-controller.js +0 -101
  461. package/out/zero-cache/src/services/litestream/litestream-controller.js.map +0 -1
  462. package/out/zero-cache/src/services/profz.d.ts +0 -7
  463. package/out/zero-cache/src/services/profz.d.ts.map +0 -1
  464. package/out/zero-cache/src/services/profz.js +0 -103
  465. package/out/zero-cache/src/services/profz.js.map +0 -1
  466. package/out/zero-cache/src/services/view-syncer/hydration-budget.d.ts +0 -33
  467. package/out/zero-cache/src/services/view-syncer/hydration-budget.d.ts.map +0 -1
  468. package/out/zero-cache/src/services/view-syncer/hydration-budget.js +0 -62
  469. package/out/zero-cache/src/services/view-syncer/hydration-budget.js.map +0 -1
  470. package/out/zero-cache/src/services/view-syncer/hydration-circuit-breaker.d.ts +0 -51
  471. package/out/zero-cache/src/services/view-syncer/hydration-circuit-breaker.d.ts.map +0 -1
  472. package/out/zero-cache/src/services/view-syncer/hydration-circuit-breaker.js +0 -78
  473. package/out/zero-cache/src/services/view-syncer/hydration-circuit-breaker.js.map +0 -1
  474. package/out/zero-protocol/src/query-hash-visitor.d.ts +0 -81
  475. package/out/zero-protocol/src/query-hash-visitor.d.ts.map +0 -1
  476. package/out/zero-protocol/src/query-hash-visitor.js +0 -324
  477. package/out/zero-protocol/src/query-hash-visitor.js.map +0 -1
  478. package/out/zql/src/ivm/deferred-input.d.ts +0 -44
  479. package/out/zql/src/ivm/deferred-input.d.ts.map +0 -1
  480. package/out/zql/src/ivm/deferred-input.js +0 -89
  481. package/out/zql/src/ivm/deferred-input.js.map +0 -1
  482. package/out/zql/src/query/query-transitions.d.ts +0 -171
  483. package/out/zql/src/query/query-transitions.d.ts.map +0 -1
  484. package/out/zql/src/query/query-transitions.js +0 -207
  485. package/out/zql/src/query/query-transitions.js.map +0 -1
@@ -1,51 +0,0 @@
1
- import type { MonotonicClock } from './hydration-budget.ts';
2
- /**
3
- * How long a tripped query stays rejected before a retry is allowed.
4
- *
5
- * A query that blows the timeout is almost always slow because of the shape
6
- * of its data rather than because of transient load, so retrying it on every
7
- * reconnect would burn a full timeout each time. The cooldown keeps that cost
8
- * to at most one timeout per cooldown period per query.
9
- */
10
- export declare const DEFAULT_CIRCUIT_BREAKER_OPEN_MS: number;
11
- /**
12
- * A per-query circuit breaker for view-syncer hydration.
13
- *
14
- * Hydration of a single query is aborted once its processing time exceeds
15
- * {@link timeoutMs}. Callers check {@link exceeded} at the yield points of a
16
- * hydration, so a query is only ever aborted between time slices.
17
- *
18
- * Once a query has been aborted the breaker is "open" for its transformation
19
- * hash: {@link isOpen} reports true for {@link openMs}, and callers reject the
20
- * query up front instead of hydrating it again. After that the breaker is
21
- * implicitly half-open: the next hydration attempt runs, and either succeeds
22
- * or trips the breaker again.
23
- *
24
- * The breaker is keyed by transformation hash rather than query hash because
25
- * the transformation (permissions, auth context) determines the pipeline that
26
- * runs, and a different transformation of the same query may well be fast.
27
- */
28
- export declare class HydrationCircuitBreaker {
29
- #private;
30
- readonly timeoutMs: number;
31
- readonly openMs: number;
32
- constructor(timeoutMs: number, openMs?: number, now?: MonotonicClock);
33
- /** Whether the breaker does anything at all. */
34
- get enabled(): boolean;
35
- /**
36
- * Whether a hydration that has consumed `elapsedMs` of processing time must
37
- * be aborted. Always false when the breaker is disabled.
38
- */
39
- exceeded(elapsedMs: number): boolean;
40
- /**
41
- * Records that hydrating `transformationHash` was aborted.
42
- *
43
- * Trips are rare, so this is also when expired entries are swept, which
44
- * keeps the map bounded by the number of hashes tripped within one cooldown
45
- * rather than by every hash ever tripped.
46
- */
47
- trip(transformationHash: string): void;
48
- /** Whether `transformationHash` is currently rejected. */
49
- isOpen(transformationHash: string): boolean;
50
- }
51
- //# sourceMappingURL=hydration-circuit-breaker.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"hydration-circuit-breaker.d.ts","sourceRoot":"","sources":["../../../../../../zero-cache/src/services/view-syncer/hydration-circuit-breaker.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,uBAAuB,CAAC;AAE1D;;;;;;;GAOG;AACH,eAAO,MAAM,+BAA+B,QAAa,CAAC;AAE1D;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,uBAAuB;;IAClC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;gBAKtB,SAAS,EAAE,MAAM,EACjB,MAAM,GAAE,MAAwC,EAChD,GAAG,GAAE,cAAkD;IAYzD,gDAAgD;IAChD,IAAI,OAAO,IAAI,OAAO,CAErB;IAED;;;OAGG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO;IAIpC;;;;;;OAMG;IACH,IAAI,CAAC,kBAAkB,EAAE,MAAM,GAAG,IAAI;IAUtC,0DAA0D;IAC1D,MAAM,CAAC,kBAAkB,EAAE,MAAM,GAAG,OAAO;CAW5C"}
@@ -1,78 +0,0 @@
1
- import { assert } from "../../../../shared/src/asserts.js";
2
- //#region ../zero-cache/src/services/view-syncer/hydration-circuit-breaker.ts
3
- /**
4
- * How long a tripped query stays rejected before a retry is allowed.
5
- *
6
- * A query that blows the timeout is almost always slow because of the shape
7
- * of its data rather than because of transient load, so retrying it on every
8
- * reconnect would burn a full timeout each time. The cooldown keeps that cost
9
- * to at most one timeout per cooldown period per query.
10
- */
11
- var DEFAULT_CIRCUIT_BREAKER_OPEN_MS = 5 * 6e4;
12
- /**
13
- * A per-query circuit breaker for view-syncer hydration.
14
- *
15
- * Hydration of a single query is aborted once its processing time exceeds
16
- * {@link timeoutMs}. Callers check {@link exceeded} at the yield points of a
17
- * hydration, so a query is only ever aborted between time slices.
18
- *
19
- * Once a query has been aborted the breaker is "open" for its transformation
20
- * hash: {@link isOpen} reports true for {@link openMs}, and callers reject the
21
- * query up front instead of hydrating it again. After that the breaker is
22
- * implicitly half-open: the next hydration attempt runs, and either succeeds
23
- * or trips the breaker again.
24
- *
25
- * The breaker is keyed by transformation hash rather than query hash because
26
- * the transformation (permissions, auth context) determines the pipeline that
27
- * runs, and a different transformation of the same query may well be fast.
28
- */
29
- var HydrationCircuitBreaker = class {
30
- timeoutMs;
31
- openMs;
32
- #now;
33
- #openedAt = /* @__PURE__ */ new Map();
34
- constructor(timeoutMs, openMs = DEFAULT_CIRCUIT_BREAKER_OPEN_MS, now = performance.now.bind(performance)) {
35
- assert(Number.isSafeInteger(timeoutMs) && timeoutMs >= 0, "Hydration timeout must be a nonnegative integer");
36
- assert(openMs >= 0, "Circuit breaker open duration must be nonnegative");
37
- this.timeoutMs = timeoutMs;
38
- this.openMs = openMs;
39
- this.#now = now;
40
- }
41
- /** Whether the breaker does anything at all. */
42
- get enabled() {
43
- return this.timeoutMs > 0;
44
- }
45
- /**
46
- * Whether a hydration that has consumed `elapsedMs` of processing time must
47
- * be aborted. Always false when the breaker is disabled.
48
- */
49
- exceeded(elapsedMs) {
50
- return this.enabled && elapsedMs >= this.timeoutMs;
51
- }
52
- /**
53
- * Records that hydrating `transformationHash` was aborted.
54
- *
55
- * Trips are rare, so this is also when expired entries are swept, which
56
- * keeps the map bounded by the number of hashes tripped within one cooldown
57
- * rather than by every hash ever tripped.
58
- */
59
- trip(transformationHash) {
60
- const now = this.#now();
61
- for (const [hash, openedAt] of this.#openedAt) if (now - openedAt >= this.openMs) this.#openedAt.delete(hash);
62
- this.#openedAt.set(transformationHash, now);
63
- }
64
- /** Whether `transformationHash` is currently rejected. */
65
- isOpen(transformationHash) {
66
- const openedAt = this.#openedAt.get(transformationHash);
67
- if (openedAt === void 0) return false;
68
- if (this.#now() - openedAt >= this.openMs) {
69
- this.#openedAt.delete(transformationHash);
70
- return false;
71
- }
72
- return true;
73
- }
74
- };
75
- //#endregion
76
- export { HydrationCircuitBreaker };
77
-
78
- //# sourceMappingURL=hydration-circuit-breaker.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"hydration-circuit-breaker.js","names":["#now","#openedAt"],"sources":["../../../../../../zero-cache/src/services/view-syncer/hydration-circuit-breaker.ts"],"sourcesContent":["import {assert} from '../../../../shared/src/asserts.ts';\nimport type {MonotonicClock} from './hydration-budget.ts';\n\n/**\n * How long a tripped query stays rejected before a retry is allowed.\n *\n * A query that blows the timeout is almost always slow because of the shape\n * of its data rather than because of transient load, so retrying it on every\n * reconnect would burn a full timeout each time. The cooldown keeps that cost\n * to at most one timeout per cooldown period per query.\n */\nexport const DEFAULT_CIRCUIT_BREAKER_OPEN_MS = 5 * 60_000;\n\n/**\n * A per-query circuit breaker for view-syncer hydration.\n *\n * Hydration of a single query is aborted once its processing time exceeds\n * {@link timeoutMs}. Callers check {@link exceeded} at the yield points of a\n * hydration, so a query is only ever aborted between time slices.\n *\n * Once a query has been aborted the breaker is \"open\" for its transformation\n * hash: {@link isOpen} reports true for {@link openMs}, and callers reject the\n * query up front instead of hydrating it again. After that the breaker is\n * implicitly half-open: the next hydration attempt runs, and either succeeds\n * or trips the breaker again.\n *\n * The breaker is keyed by transformation hash rather than query hash because\n * the transformation (permissions, auth context) determines the pipeline that\n * runs, and a different transformation of the same query may well be fast.\n */\nexport class HydrationCircuitBreaker {\n readonly timeoutMs: number;\n readonly openMs: number;\n readonly #now: MonotonicClock;\n readonly #openedAt = new Map<string, number>();\n\n constructor(\n timeoutMs: number,\n openMs: number = DEFAULT_CIRCUIT_BREAKER_OPEN_MS,\n now: MonotonicClock = performance.now.bind(performance),\n ) {\n assert(\n Number.isSafeInteger(timeoutMs) && timeoutMs >= 0,\n 'Hydration timeout must be a nonnegative integer',\n );\n assert(openMs >= 0, 'Circuit breaker open duration must be nonnegative');\n this.timeoutMs = timeoutMs;\n this.openMs = openMs;\n this.#now = now;\n }\n\n /** Whether the breaker does anything at all. */\n get enabled(): boolean {\n return this.timeoutMs > 0;\n }\n\n /**\n * Whether a hydration that has consumed `elapsedMs` of processing time must\n * be aborted. Always false when the breaker is disabled.\n */\n exceeded(elapsedMs: number): boolean {\n return this.enabled && elapsedMs >= this.timeoutMs;\n }\n\n /**\n * Records that hydrating `transformationHash` was aborted.\n *\n * Trips are rare, so this is also when expired entries are swept, which\n * keeps the map bounded by the number of hashes tripped within one cooldown\n * rather than by every hash ever tripped.\n */\n trip(transformationHash: string): void {\n const now = this.#now();\n for (const [hash, openedAt] of this.#openedAt) {\n if (now - openedAt >= this.openMs) {\n this.#openedAt.delete(hash);\n }\n }\n this.#openedAt.set(transformationHash, now);\n }\n\n /** Whether `transformationHash` is currently rejected. */\n isOpen(transformationHash: string): boolean {\n const openedAt = this.#openedAt.get(transformationHash);\n if (openedAt === undefined) {\n return false;\n }\n if (this.#now() - openedAt >= this.openMs) {\n this.#openedAt.delete(transformationHash);\n return false;\n }\n return true;\n }\n}\n"],"mappings":";;;;;;;;;;AAWA,IAAa,kCAAkC,IAAI;;;;;;;;;;;;;;;;;;AAmBnD,IAAa,0BAAb,MAAqC;CACnC;CACA;CACA;CACA,4BAAqB,IAAI,IAAoB;CAE7C,YACE,WACA,SAAiB,iCACjB,MAAsB,YAAY,IAAI,KAAK,WAAW,GACtD;EACA,OACE,OAAO,cAAc,SAAS,KAAK,aAAa,GAChD,iDACF;EACA,OAAO,UAAU,GAAG,mDAAmD;EACvE,KAAK,YAAY;EACjB,KAAK,SAAS;EACd,KAAKA,OAAO;CACd;;CAGA,IAAI,UAAmB;EACrB,OAAO,KAAK,YAAY;CAC1B;;;;;CAMA,SAAS,WAA4B;EACnC,OAAO,KAAK,WAAW,aAAa,KAAK;CAC3C;;;;;;;;CASA,KAAK,oBAAkC;EACrC,MAAM,MAAM,KAAKA,KAAK;EACtB,KAAK,MAAM,CAAC,MAAM,aAAa,KAAKC,WAClC,IAAI,MAAM,YAAY,KAAK,QACzB,KAAKA,UAAU,OAAO,IAAI;EAG9B,KAAKA,UAAU,IAAI,oBAAoB,GAAG;CAC5C;;CAGA,OAAO,oBAAqC;EAC1C,MAAM,WAAW,KAAKA,UAAU,IAAI,kBAAkB;EACtD,IAAI,aAAa,KAAA,GACf,OAAO;EAET,IAAI,KAAKD,KAAK,IAAI,YAAY,KAAK,QAAQ;GACzC,KAAKC,UAAU,OAAO,kBAAkB;GACxC,OAAO;EACT;EACA,OAAO;CACT;AACF"}
@@ -1,81 +0,0 @@
1
- import type { Format } from '../../zero-types/src/format.ts';
2
- /**
3
- * Hashes a normalized AST by visiting it, rather than by rendering it to JSON
4
- * and hashing the bytes. `hashOfAST` and `hashOfNameAndArgs` in
5
- * `query-hash.ts` are both built on this, so these digests are the query IDs
6
- * the client registers and the transformation hashes the server stores.
7
- *
8
- * The pipeline this replaced was
9
- * `h64(JSON.stringify(normalizeAST(ast))).toString(36)`, which materialized
10
- * the whole AST as a string, UTF-8 encoded it, and only then hashed it — three
11
- * passes over the data, two of which existed purely to produce bytes to hash.
12
- *
13
- * A visitor can fold values into the hash state as it walks, so nothing is
14
- * materialized at all. The primitives that make that pay off:
15
- *
16
- * - Two 32-bit accumulators held in module-level `let`s, so the "state" is
17
- * plain numbers in registers rather than an object being threaded through
18
- * the walk.
19
- * - xxHash32's own round and final mix, shared with `shared/src/hash.ts` via
20
- * `shared/src/xxhash32.ts`. Only the ingestion differs: that one feeds them
21
- * UTF-8 bytes, this one feeds them words straight out of the structure.
22
- * - Strings folded straight from `charCodeAt`, two UTF-16 units at a time, into
23
- * one 32-bit word. No UTF-8 encoding, and half the loop iterations a
24
- * byte-oriented hash would need over ASCII.
25
- *
26
- * These digests do not agree with xxHash32 over the old JSON encoding, and are
27
- * not meant to: nothing recomputes a hash produced elsewhere and compares it,
28
- * so the encoding is free to change as long as every writer moves together.
29
- * What it does have to give is distinct words for structurally distinct
30
- * queries — a 64-bit digest cannot promise that absolutely, but every field
31
- * and node kind must at least reach the mixer, and no two of them may be
32
- * written so as to be confusable. `query-hash-visitor.test.ts` holds that
33
- * line with a corpus and a per-field mutation test.
34
- *
35
- * The walk is deliberately specialized to the AST shape rather than written as
36
- * a generic JSON-value walk. That is not premature: a generic version was
37
- * measured alongside this one and came out ~2.4x slower, no better than the
38
- * `JSON.stringify` it was meant to replace, because `for...in` and the
39
- * megamorphic property loads cost about what the native stringify costs. Only
40
- * `visitValue` below stays generic, for the two places an AST holds arbitrary
41
- * JSON: a literal's value and a bound's row.
42
- */
43
- import type { AST, System } from './ast.ts';
44
- export declare function hashAST(ast: AST): string;
45
- /**
46
- * The identity of a custom query: its name and its arguments.
47
- *
48
- * Same walk, entered at a different node. `args` is arbitrary JSON, which is
49
- * what `visitValue` already exists to handle. The leading tag keeps this hash
50
- * space disjoint from `hashAST`'s -- both produce query IDs that live in the
51
- * same namespace, so an AST must not be able to fold to the same words as some
52
- * name and args.
53
- */
54
- export declare function hashNameAndArgs(name: string, args: readonly unknown[]): string;
55
- /**
56
- * The identity of a query as the client sees it: its AST, the shape it returns,
57
- * the system it was built for, and -- for a custom query -- the name and
58
- * arguments it was declared with.
59
- *
60
- * Everything past the AST is here because it is part of what makes two queries
61
- * different while leaving no trace, or an incomplete one, in the AST itself:
62
- *
63
- * - **name and args**: `nameAndArgs` reuses the AST it is given and only
64
- * attaches a `CustomQueryID`, so without these two different named queries
65
- * over the same table would be indistinguishable.
66
- * - **system**: a query stamps it onto every `related` entry and every `exists`
67
- * correlation it builds, so it is already hashed via
68
- * {@link visitCorrelatedSubquery} -- but a query with neither has nowhere to
69
- * put it, and would otherwise hash the same whether it was built for the
70
- * client or for permissions.
71
- * - **currentJunction**: builder state, set on the sub-query handed to a
72
- * two-hop relationship's callback, which makes `limit` and `orderBy` throw.
73
- * It leaves no trace in the AST at all, so two queries that differ only in
74
- * whether those methods work would otherwise be indistinguishable.
75
- *
76
- * The name and args are taken apart rather than as a `CustomQueryID` because
77
- * that type lives in `zql`, which is above this package; `hashNameAndArgs`
78
- * splits them the same way.
79
- */
80
- export declare function hashOfQueryInternals(ast: AST, format: Format, system: System, currentJunction: string | undefined, customQueryName: string | undefined, customQueryArgs: readonly unknown[] | undefined): string;
81
- //# sourceMappingURL=query-hash-visitor.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"query-hash-visitor.d.ts","sourceRoot":"","sources":["../../../../zero-protocol/src/query-hash-visitor.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,gCAAgC,CAAC;AAE3D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,OAAO,KAAK,EACV,GAAG,EAIH,MAAM,EAEP,MAAM,UAAU,CAAC;AA8UlB,wBAAgB,OAAO,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,CAcxC;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAC7B,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,SAAS,OAAO,EAAE,GACvB,MAAM,CAaR;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,oBAAoB,CAClC,GAAG,EAAE,GAAG,EACR,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,eAAe,EAAE,MAAM,GAAG,SAAS,EACnC,eAAe,EAAE,MAAM,GAAG,SAAS,EACnC,eAAe,EAAE,SAAS,OAAO,EAAE,GAAG,SAAS,GAC9C,MAAM,CA2BR"}
@@ -1,324 +0,0 @@
1
- import { unreachable } from "../../shared/src/asserts.js";
2
- import { PRIME32_1, PRIME32_5, avalanche32, round32 } from "../../shared/src/xxhash32.js";
3
- import "../../shared/src/hash.js";
4
- //#region ../zero-protocol/src/query-hash-visitor.ts
5
- var h1 = 0;
6
- var h2 = 0;
7
- /**
8
- * Fold one 32-bit word into both lanes.
9
- *
10
- * Both lanes run xxHash32's own round; only their starting values differ, so
11
- * they diverge immediately and stay diverged. That is the same construction
12
- * `h64` uses to widen xxHash32 past 32 bits, just fed words taken from a
13
- * structure rather than bytes taken from a string.
14
- */
15
- function mix(w) {
16
- h1 = round32(h1, w);
17
- h2 = round32(h2, w);
18
- }
19
- /**
20
- * Fold a string, two UTF-16 units per word.
21
- *
22
- * The leading length keeps `['ab','c']` and `['a','bc']` apart. STR_MARK is
23
- * folded into that same word rather than mixed separately: it costs nothing,
24
- * and since every other count written by this file is a small array length, a
25
- * string can never fold like one.
26
- */
27
- function mixString(s) {
28
- const n = s.length;
29
- mix(n | STR_MARK);
30
- let i = 0;
31
- for (; i + 1 < n; i += 2) mix(s.charCodeAt(i) | s.charCodeAt(i + 1) << 16);
32
- if (i < n) mix(s.charCodeAt(i));
33
- }
34
- var numView = /* @__PURE__ */ new DataView(/* @__PURE__ */ new ArrayBuffer(8));
35
- /** Fold a number: one word for an int32, two for anything else. */
36
- function mixNumber(n) {
37
- if ((n | 0) === n) mix(n);
38
- else {
39
- numView.setFloat64(0, n, true);
40
- mix(numView.getInt32(0, true));
41
- mix(numView.getInt32(4, true));
42
- }
43
- }
44
- var TAG_NULL = 4097;
45
- var TAG_FALSE = 4098;
46
- var TAG_TRUE = 4099;
47
- var TAG_INT = 4100;
48
- var TAG_FLOAT = 4101;
49
- var TAG_ARR = 4103;
50
- var TAG_OBJ = 4104;
51
- var TAG_END = 4105;
52
- var TAG_UNDEF = 4106;
53
- var TAG_LITERAL = 8193;
54
- var TAG_COLUMN = 8194;
55
- var TAG_STATIC = 8195;
56
- var TAG_SIMPLE = 8196;
57
- var TAG_SUBQUERY = 8197;
58
- var TAG_AND = 8198;
59
- var TAG_OR = 8199;
60
- var TAG_FORMAT = 8200;
61
- var TAG_NAME_ARGS = 8201;
62
- var TAG_SYSTEM_PERMISSIONS = 8202;
63
- var TAG_SYSTEM_CLIENT = 8203;
64
- var TAG_SYSTEM_TEST = 8204;
65
- var TAG_JUNCTION = 8205;
66
- var STR_MARK = 1073741824;
67
- function reset() {
68
- h1 = PRIME32_5;
69
- h2 = PRIME32_1;
70
- }
71
- /** Collapse the two lanes into one 64-bit value, avalanching each first. */
72
- function finalize() {
73
- return avalanche32(h1).toString(36).padStart(7, "0") + avalanche32(h2).toString(36).padStart(7, "0");
74
- }
75
- function visitValue(v) {
76
- switch (typeof v) {
77
- case "string":
78
- mixString(v);
79
- return;
80
- case "number":
81
- if (!Number.isFinite(v)) {
82
- mix(TAG_NULL);
83
- return;
84
- }
85
- mix((v | 0) === v ? TAG_INT : TAG_FLOAT);
86
- mixNumber(v);
87
- return;
88
- case "boolean":
89
- mix(v ? TAG_TRUE : TAG_FALSE);
90
- return;
91
- case "object": {
92
- if (v === null) {
93
- mix(TAG_NULL);
94
- return;
95
- }
96
- if (Array.isArray(v)) {
97
- mix(TAG_ARR);
98
- for (let i = 0; i < v.length; i++) {
99
- const e = v[i];
100
- visitValue(e === void 0 ? null : e);
101
- }
102
- mix(TAG_END);
103
- return;
104
- }
105
- mix(TAG_OBJ);
106
- const keys = Object.keys(v).sort();
107
- for (const k of keys) {
108
- const val = v[k];
109
- if (val === void 0) continue;
110
- mixString(k);
111
- visitValue(val);
112
- }
113
- mix(TAG_END);
114
- return;
115
- }
116
- default: return;
117
- }
118
- }
119
- function visitOptionalString(s) {
120
- if (s === void 0) mix(TAG_UNDEF);
121
- else mixString(s);
122
- }
123
- function mixOptionalSystem(system) {
124
- if (system === void 0) mix(TAG_UNDEF);
125
- else mixSystem(system);
126
- }
127
- function mixSystem(system) {
128
- switch (system) {
129
- case "permissions":
130
- mix(TAG_SYSTEM_PERMISSIONS);
131
- break;
132
- case "client":
133
- mix(TAG_SYSTEM_CLIENT);
134
- break;
135
- case "test":
136
- mix(TAG_SYSTEM_TEST);
137
- break;
138
- default: unreachable(system);
139
- }
140
- }
141
- function visitCompoundKey(k) {
142
- mix(k.length);
143
- for (let i = 0; i < k.length; i++) mixString(k[i]);
144
- }
145
- function visitOrdering(o) {
146
- if (o === void 0) {
147
- mix(TAG_UNDEF);
148
- return;
149
- }
150
- mix(o.length);
151
- for (let i = 0; i < o.length; i++) {
152
- const [field, dir] = o[i];
153
- mixString(field);
154
- mix(dir === "asc" ? TAG_TRUE : TAG_FALSE);
155
- }
156
- }
157
- function visitValuePosition(v) {
158
- switch (v.type) {
159
- case "literal":
160
- mix(TAG_LITERAL);
161
- visitValue(v.value);
162
- return;
163
- case "column":
164
- mix(TAG_COLUMN);
165
- mixString(v.name);
166
- return;
167
- case "static":
168
- mix(TAG_STATIC);
169
- mixString(v.anchor);
170
- if (typeof v.field === "string") mixString(v.field);
171
- else visitCompoundKey(v.field);
172
- return;
173
- default: unreachable(v);
174
- }
175
- }
176
- function visitCondition(c) {
177
- switch (c.type) {
178
- case "simple":
179
- mix(TAG_SIMPLE);
180
- mixString(c.op);
181
- visitValuePosition(c.left);
182
- visitValuePosition(c.right);
183
- return;
184
- case "correlatedSubquery":
185
- mix(TAG_SUBQUERY);
186
- mixString(c.op);
187
- mix(c.flip === void 0 ? TAG_UNDEF : c.flip ? TAG_TRUE : TAG_FALSE);
188
- mix(c.scalar === void 0 ? TAG_UNDEF : c.scalar ? TAG_TRUE : TAG_FALSE);
189
- visitCorrelatedSubquery(c.related);
190
- return;
191
- default: {
192
- c.type;
193
- mix(c.type === "and" ? TAG_AND : TAG_OR);
194
- const conds = c.conditions;
195
- mix(conds.length);
196
- for (let i = 0; i < conds.length; i++) visitCondition(conds[i]);
197
- return;
198
- }
199
- }
200
- }
201
- function visitCorrelatedSubquery(csq) {
202
- visitCompoundKey(csq.correlation.parentField);
203
- visitCompoundKey(csq.correlation.childField);
204
- mix(csq.hidden === void 0 ? TAG_UNDEF : csq.hidden ? TAG_TRUE : TAG_FALSE);
205
- mixOptionalSystem(csq.system);
206
- visitAST(csq.subquery);
207
- }
208
- function visitAST(ast) {
209
- mix(TAG_OBJ);
210
- visitOptionalString(ast.schema);
211
- mixString(ast.table);
212
- visitOptionalString(ast.alias);
213
- if (ast.where === void 0) mix(TAG_UNDEF);
214
- else visitCondition(ast.where);
215
- const related = ast.related;
216
- if (related === void 0) mix(TAG_UNDEF);
217
- else {
218
- mix(related.length);
219
- for (let i = 0; i < related.length; i++) visitCorrelatedSubquery(related[i]);
220
- }
221
- const start = ast.start;
222
- if (start === void 0) mix(TAG_UNDEF);
223
- else {
224
- mix(start.exclusive ? TAG_TRUE : TAG_FALSE);
225
- visitValue(start.row);
226
- }
227
- if (ast.limit === void 0) mix(TAG_UNDEF);
228
- else {
229
- mix(TAG_INT);
230
- mixNumber(ast.limit);
231
- }
232
- visitOrdering(ast.orderBy);
233
- mix(TAG_END);
234
- }
235
- function hashAST(ast) {
236
- const s1 = h1;
237
- const s2 = h2;
238
- try {
239
- reset();
240
- visitAST(ast);
241
- return finalize();
242
- } finally {
243
- h1 = s1;
244
- h2 = s2;
245
- }
246
- }
247
- /**
248
- * The identity of a custom query: its name and its arguments.
249
- *
250
- * Same walk, entered at a different node. `args` is arbitrary JSON, which is
251
- * what `visitValue` already exists to handle. The leading tag keeps this hash
252
- * space disjoint from `hashAST`'s -- both produce query IDs that live in the
253
- * same namespace, so an AST must not be able to fold to the same words as some
254
- * name and args.
255
- */
256
- function hashNameAndArgs(name, args) {
257
- const s1 = h1;
258
- const s2 = h2;
259
- try {
260
- reset();
261
- mix(TAG_NAME_ARGS);
262
- mixString(name);
263
- visitValue(args);
264
- return finalize();
265
- } finally {
266
- h1 = s1;
267
- h2 = s2;
268
- }
269
- }
270
- /**
271
- * The identity of a query as the client sees it: its AST, the shape it returns,
272
- * the system it was built for, and -- for a custom query -- the name and
273
- * arguments it was declared with.
274
- *
275
- * Everything past the AST is here because it is part of what makes two queries
276
- * different while leaving no trace, or an incomplete one, in the AST itself:
277
- *
278
- * - **name and args**: `nameAndArgs` reuses the AST it is given and only
279
- * attaches a `CustomQueryID`, so without these two different named queries
280
- * over the same table would be indistinguishable.
281
- * - **system**: a query stamps it onto every `related` entry and every `exists`
282
- * correlation it builds, so it is already hashed via
283
- * {@link visitCorrelatedSubquery} -- but a query with neither has nowhere to
284
- * put it, and would otherwise hash the same whether it was built for the
285
- * client or for permissions.
286
- * - **currentJunction**: builder state, set on the sub-query handed to a
287
- * two-hop relationship's callback, which makes `limit` and `orderBy` throw.
288
- * It leaves no trace in the AST at all, so two queries that differ only in
289
- * whether those methods work would otherwise be indistinguishable.
290
- *
291
- * The name and args are taken apart rather than as a `CustomQueryID` because
292
- * that type lives in `zql`, which is above this package; `hashNameAndArgs`
293
- * splits them the same way.
294
- */
295
- function hashOfQueryInternals(ast, format, system, currentJunction, customQueryName, customQueryArgs) {
296
- const s1 = h1;
297
- const s2 = h2;
298
- try {
299
- reset();
300
- visitAST(ast);
301
- mix(TAG_FORMAT);
302
- visitValue(format);
303
- mixSystem(system);
304
- if (currentJunction === void 0) mix(TAG_UNDEF);
305
- else {
306
- mix(TAG_JUNCTION);
307
- mixString(currentJunction);
308
- }
309
- if (customQueryName === void 0) mix(TAG_UNDEF);
310
- else {
311
- mix(TAG_NAME_ARGS);
312
- mixString(customQueryName);
313
- visitValue(customQueryArgs);
314
- }
315
- return finalize();
316
- } finally {
317
- h1 = s1;
318
- h2 = s2;
319
- }
320
- }
321
- //#endregion
322
- export { hashAST, hashNameAndArgs, hashOfQueryInternals };
323
-
324
- //# sourceMappingURL=query-hash-visitor.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"query-hash-visitor.js","names":[],"sources":["../../../../zero-protocol/src/query-hash-visitor.ts"],"sourcesContent":["import {unreachable} from '../../shared/src/asserts.ts';\n// These live in shared/src/xxhash32.ts, imported via hash.ts's re-export\n// rather than directly: the direct zero-protocol -> shared/xxhash32.ts edge\n// makes tsc 7.0.2 mis-evaluate Query-type relations in other programs --\n// phantom TS2345s in zql's runnable-query-impl.ts under the packages/zero\n// declaration build, and zero-client silently losing the type error that\n// custom.test.ts pins with a ts-expect-error directive. Bisected cold-cache\n// to that one import statement; the hash.ts route checks clean everywhere.\n// Collapse to a direct import when TypeScript is upgraded past this.\nimport {\n avalanche32,\n PRIME32_1,\n PRIME32_5,\n round32,\n} from '../../shared/src/hash.ts';\nimport type {Format} from '../../zero-types/src/format.ts';\n\n/**\n * Hashes a normalized AST by visiting it, rather than by rendering it to JSON\n * and hashing the bytes. `hashOfAST` and `hashOfNameAndArgs` in\n * `query-hash.ts` are both built on this, so these digests are the query IDs\n * the client registers and the transformation hashes the server stores.\n *\n * The pipeline this replaced was\n * `h64(JSON.stringify(normalizeAST(ast))).toString(36)`, which materialized\n * the whole AST as a string, UTF-8 encoded it, and only then hashed it — three\n * passes over the data, two of which existed purely to produce bytes to hash.\n *\n * A visitor can fold values into the hash state as it walks, so nothing is\n * materialized at all. The primitives that make that pay off:\n *\n * - Two 32-bit accumulators held in module-level `let`s, so the \"state\" is\n * plain numbers in registers rather than an object being threaded through\n * the walk.\n * - xxHash32's own round and final mix, shared with `shared/src/hash.ts` via\n * `shared/src/xxhash32.ts`. Only the ingestion differs: that one feeds them\n * UTF-8 bytes, this one feeds them words straight out of the structure.\n * - Strings folded straight from `charCodeAt`, two UTF-16 units at a time, into\n * one 32-bit word. No UTF-8 encoding, and half the loop iterations a\n * byte-oriented hash would need over ASCII.\n *\n * These digests do not agree with xxHash32 over the old JSON encoding, and are\n * not meant to: nothing recomputes a hash produced elsewhere and compares it,\n * so the encoding is free to change as long as every writer moves together.\n * What it does have to give is distinct words for structurally distinct\n * queries — a 64-bit digest cannot promise that absolutely, but every field\n * and node kind must at least reach the mixer, and no two of them may be\n * written so as to be confusable. `query-hash-visitor.test.ts` holds that\n * line with a corpus and a per-field mutation test.\n *\n * The walk is deliberately specialized to the AST shape rather than written as\n * a generic JSON-value walk. That is not premature: a generic version was\n * measured alongside this one and came out ~2.4x slower, no better than the\n * `JSON.stringify` it was meant to replace, because `for...in` and the\n * megamorphic property loads cost about what the native stringify costs. Only\n * `visitValue` below stays generic, for the two places an AST holds arbitrary\n * JSON: a literal's value and a bound's row.\n */\nimport type {\n AST,\n Condition,\n CorrelatedSubquery,\n Ordering,\n System,\n ValuePosition,\n} from './ast.ts';\n\n// Two 32-bit lanes, combined into 64 bits at the end. Module-level so the walk\n// mutates registers rather than allocating or threading state through it.\nlet h1 = 0;\nlet h2 = 0;\n\n/**\n * Fold one 32-bit word into both lanes.\n *\n * Both lanes run xxHash32's own round; only their starting values differ, so\n * they diverge immediately and stay diverged. That is the same construction\n * `h64` uses to widen xxHash32 past 32 bits, just fed words taken from a\n * structure rather than bytes taken from a string.\n */\nfunction mix(w: number): void {\n h1 = round32(h1, w);\n h2 = round32(h2, w);\n}\n\n/**\n * Fold a string, two UTF-16 units per word.\n *\n * The leading length keeps `['ab','c']` and `['a','bc']` apart. STR_MARK is\n * folded into that same word rather than mixed separately: it costs nothing,\n * and since every other count written by this file is a small array length, a\n * string can never fold like one.\n */\nfunction mixString(s: string): void {\n const n = s.length;\n mix(n | STR_MARK);\n let i = 0;\n for (; i + 1 < n; i += 2) {\n mix(s.charCodeAt(i) | (s.charCodeAt(i + 1) << 16));\n }\n if (i < n) {\n mix(s.charCodeAt(i));\n }\n}\n\n// A DataView with an explicit byte order, not a Float64Array/Int32Array\n// aliasing pair: typed arrays read the buffer in host byte order, and these\n// digests are persisted, so a big-endian runtime would fold a float's words\n// swapped and disagree with every little-endian peer.\nconst numView = new DataView(new ArrayBuffer(8));\n\n/** Fold a number: one word for an int32, two for anything else. */\nfunction mixNumber(n: number): void {\n if ((n | 0) === n) {\n mix(n);\n } else {\n numView.setFloat64(0, n, true);\n mix(numView.getInt32(0, true));\n mix(numView.getInt32(4, true));\n }\n}\n\n// Structural tags. Distinct constants so that, say, a string \"1\" and the\n// number 1 cannot fold to the same state.\nconst TAG_NULL = 0x1001;\nconst TAG_FALSE = 0x1002;\nconst TAG_TRUE = 0x1003;\nconst TAG_INT = 0x1004;\nconst TAG_FLOAT = 0x1005;\nconst TAG_ARR = 0x1007;\nconst TAG_OBJ = 0x1008;\nconst TAG_END = 0x1009;\nconst TAG_UNDEF = 0x100a;\n\n// Discriminators for the AST's own unions, kept distinct from the value tags\n// above so a node kind can never fold like a value of some other type.\nconst TAG_LITERAL = 0x2001;\nconst TAG_COLUMN = 0x2002;\nconst TAG_STATIC = 0x2003;\nconst TAG_SIMPLE = 0x2004;\nconst TAG_SUBQUERY = 0x2005;\nconst TAG_AND = 0x2006;\nconst TAG_OR = 0x2007;\nconst TAG_FORMAT = 0x2008;\nconst TAG_NAME_ARGS = 0x2009;\n// `System` is a closed set of three, so it folds as one word rather than as a\n// string -- on an AST it appears once per correlated subquery, so this is on\n// the walk's hot path. The switch below is exhaustive, so adding a member is a\n// type error rather than a silent collision with an existing one.\nconst TAG_SYSTEM_PERMISSIONS = 0x200a;\nconst TAG_SYSTEM_CLIENT = 0x200b;\nconst TAG_SYSTEM_TEST = 0x200c;\nconst TAG_JUNCTION = 0x200d;\n\n// Set on a string's length word. High enough that no array length reaches it.\nconst STR_MARK = 0x40000000;\n\nfunction reset(): void {\n h1 = PRIME32_5;\n h2 = PRIME32_1;\n}\n\n/** Collapse the two lanes into one 64-bit value, avalanching each first. */\nfunction finalize(): string {\n return (\n avalanche32(h1).toString(36).padStart(7, '0') +\n avalanche32(h2).toString(36).padStart(7, '0')\n );\n}\n\n// ---------------------------------------------------------------------------\n// The generic part: arbitrary JSON, for literal values and bound rows.\n// ---------------------------------------------------------------------------\n\nfunction visitValue(v: unknown): void {\n switch (typeof v) {\n case 'string':\n mixString(v);\n return;\n case 'number':\n // NaN and Infinity are null by the time they reach the wire, because\n // that is what JSON.stringify writes for them. Two queries identical on\n // the wire must not get different IDs.\n if (!Number.isFinite(v)) {\n mix(TAG_NULL);\n return;\n }\n mix((v | 0) === v ? TAG_INT : TAG_FLOAT);\n mixNumber(v);\n return;\n case 'boolean':\n mix(v ? TAG_TRUE : TAG_FALSE);\n return;\n case 'object': {\n if (v === null) {\n mix(TAG_NULL);\n return;\n }\n if (Array.isArray(v)) {\n mix(TAG_ARR);\n for (let i = 0; i < v.length; i++) {\n // An `undefined` element is `null` by the time it reaches the wire,\n // because that is what JSON.stringify makes of it. Dropping it\n // instead would fold `[undefined]` onto `[]`.\n const e: unknown = v[i];\n visitValue(e === undefined ? null : e);\n }\n mix(TAG_END);\n return;\n }\n mix(TAG_OBJ);\n // Sorted, so the digest is a function of the object's contents and not\n // of its key order. Rows and custom-query args round-trip through\n // Postgres JSONB, which reorders keys; an order-sensitive digest made\n // reloaded query records look changed. (The AST's own fields don't need\n // this: visitAST reads them in a fixed order by name.)\n const keys = Object.keys(v).sort();\n for (const k of keys) {\n const val = (v as Record<string, unknown>)[k];\n if (val === undefined) {\n continue; // as JSON.stringify does\n }\n mixString(k);\n visitValue(val);\n }\n mix(TAG_END);\n return;\n }\n default:\n // `undefined` and functions as an object's value: dropped, as\n // JSON.stringify drops them. Array elements are handled above.\n return;\n }\n}\n\n// ---------------------------------------------------------------------------\n// The specialized part: the AST's own shape.\n// ---------------------------------------------------------------------------\n\nfunction visitOptionalString(s: string | undefined): void {\n if (s === undefined) {\n mix(TAG_UNDEF);\n } else {\n mixString(s);\n }\n}\n\nfunction mixOptionalSystem(system: System | undefined): void {\n if (system === undefined) {\n mix(TAG_UNDEF);\n } else {\n mixSystem(system);\n }\n}\n\nfunction mixSystem(system: System): void {\n switch (system) {\n case 'permissions':\n mix(TAG_SYSTEM_PERMISSIONS);\n break;\n case 'client':\n mix(TAG_SYSTEM_CLIENT);\n break;\n case 'test':\n mix(TAG_SYSTEM_TEST);\n break;\n default:\n unreachable(system);\n }\n}\n\nfunction visitCompoundKey(k: readonly string[]): void {\n mix(k.length);\n for (let i = 0; i < k.length; i++) {\n mixString(k[i]);\n }\n}\n\nfunction visitOrdering(o: Ordering | undefined): void {\n if (o === undefined) {\n mix(TAG_UNDEF);\n return;\n }\n mix(o.length);\n for (let i = 0; i < o.length; i++) {\n const [field, dir] = o[i];\n mixString(field);\n mix(dir === 'asc' ? TAG_TRUE : TAG_FALSE);\n }\n}\n\nfunction visitValuePosition(v: ValuePosition): void {\n switch (v.type) {\n case 'literal':\n mix(TAG_LITERAL);\n visitValue(v.value);\n return;\n case 'column':\n mix(TAG_COLUMN);\n mixString(v.name);\n return;\n case 'static': {\n mix(TAG_STATIC);\n mixString(v.anchor);\n if (typeof v.field === 'string') {\n mixString(v.field);\n } else {\n visitCompoundKey(v.field);\n }\n return;\n }\n default:\n unreachable(v);\n }\n}\n\nfunction visitCondition(c: Condition): void {\n switch (c.type) {\n case 'simple':\n mix(TAG_SIMPLE);\n mixString(c.op);\n visitValuePosition(c.left);\n visitValuePosition(c.right);\n return;\n case 'correlatedSubquery':\n mix(TAG_SUBQUERY);\n mixString(c.op);\n mix(c.flip === undefined ? TAG_UNDEF : c.flip ? TAG_TRUE : TAG_FALSE);\n mix(c.scalar === undefined ? TAG_UNDEF : c.scalar ? TAG_TRUE : TAG_FALSE);\n visitCorrelatedSubquery(c.related);\n return;\n default: {\n c.type satisfies 'and' | 'or';\n mix(c.type === 'and' ? TAG_AND : TAG_OR);\n const conds = c.conditions;\n mix(conds.length);\n for (let i = 0; i < conds.length; i++) {\n visitCondition(conds[i]);\n }\n return;\n }\n }\n}\n\nfunction visitCorrelatedSubquery(csq: CorrelatedSubquery): void {\n visitCompoundKey(csq.correlation.parentField);\n visitCompoundKey(csq.correlation.childField);\n mix(csq.hidden === undefined ? TAG_UNDEF : csq.hidden ? TAG_TRUE : TAG_FALSE);\n mixOptionalSystem(csq.system);\n visitAST(csq.subquery);\n}\n\nfunction visitAST(ast: AST): void {\n mix(TAG_OBJ);\n visitOptionalString(ast.schema);\n mixString(ast.table);\n visitOptionalString(ast.alias);\n\n if (ast.where === undefined) {\n mix(TAG_UNDEF);\n } else {\n visitCondition(ast.where);\n }\n\n const related = ast.related;\n if (related === undefined) {\n mix(TAG_UNDEF);\n } else {\n mix(related.length);\n for (let i = 0; i < related.length; i++) {\n visitCorrelatedSubquery(related[i]);\n }\n }\n\n const start = ast.start;\n if (start === undefined) {\n mix(TAG_UNDEF);\n } else {\n mix(start.exclusive ? TAG_TRUE : TAG_FALSE);\n visitValue(start.row);\n }\n\n if (ast.limit === undefined) {\n mix(TAG_UNDEF);\n } else {\n // Tagged, because this is the one optional field whose present and absent\n // forms would otherwise both write a single bare word: an untagged\n // `limit: 4106` is the same word as TAG_UNDEF. The other optionals are\n // safe -- a present string carries STR_MARK, a condition or bound leads\n // with its own kind tag, and `related`/`orderBy` write a count followed by\n // that many items, so their streams diverge straight after.\n mix(TAG_INT);\n mixNumber(ast.limit);\n }\n\n visitOrdering(ast.orderBy);\n mix(TAG_END);\n}\n\nexport function hashAST(ast: AST): string {\n // Save and restore the lanes: `visitValue` reads properties of arbitrary\n // runtime objects, and a getter is free to ask for another hash mid-walk.\n // Without this, the inner call's reset() would corrupt the outer digest.\n const s1 = h1;\n const s2 = h2;\n try {\n reset();\n visitAST(ast);\n return finalize();\n } finally {\n h1 = s1;\n h2 = s2;\n }\n}\n\n/**\n * The identity of a custom query: its name and its arguments.\n *\n * Same walk, entered at a different node. `args` is arbitrary JSON, which is\n * what `visitValue` already exists to handle. The leading tag keeps this hash\n * space disjoint from `hashAST`'s -- both produce query IDs that live in the\n * same namespace, so an AST must not be able to fold to the same words as some\n * name and args.\n */\nexport function hashNameAndArgs(\n name: string,\n args: readonly unknown[],\n): string {\n const s1 = h1;\n const s2 = h2;\n try {\n reset();\n mix(TAG_NAME_ARGS);\n mixString(name);\n visitValue(args);\n return finalize();\n } finally {\n h1 = s1;\n h2 = s2;\n }\n}\n\n/**\n * The identity of a query as the client sees it: its AST, the shape it returns,\n * the system it was built for, and -- for a custom query -- the name and\n * arguments it was declared with.\n *\n * Everything past the AST is here because it is part of what makes two queries\n * different while leaving no trace, or an incomplete one, in the AST itself:\n *\n * - **name and args**: `nameAndArgs` reuses the AST it is given and only\n * attaches a `CustomQueryID`, so without these two different named queries\n * over the same table would be indistinguishable.\n * - **system**: a query stamps it onto every `related` entry and every `exists`\n * correlation it builds, so it is already hashed via\n * {@link visitCorrelatedSubquery} -- but a query with neither has nowhere to\n * put it, and would otherwise hash the same whether it was built for the\n * client or for permissions.\n * - **currentJunction**: builder state, set on the sub-query handed to a\n * two-hop relationship's callback, which makes `limit` and `orderBy` throw.\n * It leaves no trace in the AST at all, so two queries that differ only in\n * whether those methods work would otherwise be indistinguishable.\n *\n * The name and args are taken apart rather than as a `CustomQueryID` because\n * that type lives in `zql`, which is above this package; `hashNameAndArgs`\n * splits them the same way.\n */\nexport function hashOfQueryInternals(\n ast: AST,\n format: Format,\n system: System,\n currentJunction: string | undefined,\n customQueryName: string | undefined,\n customQueryArgs: readonly unknown[] | undefined,\n): string {\n const s1 = h1;\n const s2 = h2;\n try {\n reset();\n visitAST(ast);\n mix(TAG_FORMAT);\n visitValue(format);\n mixSystem(system);\n if (currentJunction === undefined) {\n mix(TAG_UNDEF);\n } else {\n mix(TAG_JUNCTION);\n mixString(currentJunction);\n }\n if (customQueryName === undefined) {\n mix(TAG_UNDEF);\n } else {\n mix(TAG_NAME_ARGS);\n mixString(customQueryName);\n visitValue(customQueryArgs);\n }\n return finalize();\n } finally {\n h1 = s1;\n h2 = s2;\n }\n}\n"],"mappings":"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"}
@@ -1,44 +0,0 @@
1
- import type { Node } from './data.ts';
2
- import type { FetchRequest, Input, Output } from './operator.ts';
3
- import type { SourceSchema } from './schema.ts';
4
- import { type Stream } from './stream.ts';
5
- /**
6
- * A placeholder `Input` for a view whose pipeline has not been built yet.
7
- *
8
- * Until {@link attach} is called it behaves like an empty pipeline: `fetch`
9
- * yields nothing and pushes never happen. When the real pipeline is attached
10
- * the view is hydrated with a single `fetch`, whose rows are delivered to the
11
- * view as add changes, so the view sees the data exactly as it would see rows
12
- * arriving incrementally.
13
- *
14
- * This lets `materialize()` stay synchronous and return a view immediately
15
- * while the expensive pipeline construction and hydration are postponed, for
16
- * example until the client's replica has been loaded into the IVM sources.
17
- */
18
- export declare class DeferredInput implements Input {
19
- #private;
20
- /**
21
- * @param schema The schema the built pipeline reports. Passed in so this
22
- * input can answer `getSchema()` unconditionally, as the `Input` contract
23
- * requires, before its pipeline exists.
24
- * @param build Builds the real pipeline. Called once, from {@link attach}.
25
- */
26
- constructor(schema: SourceSchema, build: () => Input);
27
- get attached(): boolean;
28
- get destroyed(): boolean;
29
- setOutput(output: Output): void;
30
- getSchema(): SourceSchema;
31
- fetch(req: FetchRequest): Stream<Node | 'yield'>;
32
- destroy(): void;
33
- /**
34
- * Build the real pipeline and hydrate the output with its current contents.
35
- *
36
- * Must be called inside the delegate's `batchViewUpdates`; the delegate is
37
- * responsible for notifying commit listeners afterwards so views flush.
38
- *
39
- * If building or hydrating throws, the pipeline is torn down again and this
40
- * input stays unattached so the caller can report the failure.
41
- */
42
- attach(): void;
43
- }
44
- //# sourceMappingURL=deferred-input.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"deferred-input.d.ts","sourceRoot":"","sources":["../../../../../zql/src/ivm/deferred-input.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,EAAC,YAAY,EAAE,KAAK,EAAE,MAAM,EAAC,MAAM,eAAe,CAAC;AAC/D,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAU,KAAK,MAAM,EAAC,MAAM,aAAa,CAAC;AAEjD;;;;;;;;;;;;GAYG;AACH,qBAAa,aAAc,YAAW,KAAK;;IAOzC;;;;;OAKG;gBACS,MAAM,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,KAAK;IAKpD,IAAI,QAAQ,IAAI,OAAO,CAEtB;IAED,IAAI,SAAS,IAAI,OAAO,CAEvB;IAED,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAK/B,SAAS,IAAI,YAAY;IAIzB,KAAK,CAAC,GAAG,EAAE,YAAY,GAAG,MAAM,CAAC,IAAI,GAAG,OAAO,CAAC;IAIhD,OAAO,IAAI,IAAI;IAKf;;;;;;;;OAQG;IACH,MAAM,IAAI,IAAI;CAwBf"}