@rocicorp/zero 0.24.2025102200 → 0.24.3000000000-canary.0

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 (69) hide show
  1. package/out/{chunk-PIXC6O7W.js → chunk-5RLYQVTQ.js} +3 -3
  2. package/out/{chunk-JS2ABYXG.js → chunk-AIYK3MAI.js} +30 -32
  3. package/out/{chunk-JS2ABYXG.js.map → chunk-AIYK3MAI.js.map} +3 -3
  4. package/out/{chunk-VHLCXJ6Q.js → chunk-OZZJ3HSP.js} +3 -2
  5. package/out/{chunk-VHLCXJ6Q.js.map → chunk-OZZJ3HSP.js.map} +2 -2
  6. package/out/{lazy-inspector-NCBESZMS.js → lazy-inspector-54OA4RT7.js} +3 -3
  7. package/out/{lazy-inspector-NCBESZMS.js.map → lazy-inspector-54OA4RT7.js.map} +2 -2
  8. package/out/react.js +2 -2
  9. package/out/solid.js +3 -3
  10. package/out/zero/package.json +1 -1
  11. package/out/zero-cache/src/auth/write-authorizer.d.ts.map +1 -1
  12. package/out/zero-cache/src/auth/write-authorizer.js +34 -10
  13. package/out/zero-cache/src/auth/write-authorizer.js.map +1 -1
  14. package/out/zero-cache/src/config/zero-config.d.ts +8 -0
  15. package/out/zero-cache/src/config/zero-config.d.ts.map +1 -1
  16. package/out/zero-cache/src/config/zero-config.js +23 -0
  17. package/out/zero-cache/src/config/zero-config.js.map +1 -1
  18. package/out/zero-cache/src/server/change-streamer.d.ts.map +1 -1
  19. package/out/zero-cache/src/server/change-streamer.js +1 -1
  20. package/out/zero-cache/src/server/change-streamer.js.map +1 -1
  21. package/out/zero-cache/src/services/change-streamer/change-streamer-http.d.ts +2 -1
  22. package/out/zero-cache/src/services/change-streamer/change-streamer-http.d.ts.map +1 -1
  23. package/out/zero-cache/src/services/change-streamer/change-streamer-http.js +18 -2
  24. package/out/zero-cache/src/services/change-streamer/change-streamer-http.js.map +1 -1
  25. package/out/zero-cache/src/services/view-syncer/drain-coordinator.d.ts +1 -0
  26. package/out/zero-cache/src/services/view-syncer/drain-coordinator.d.ts.map +1 -1
  27. package/out/zero-cache/src/services/view-syncer/drain-coordinator.js +5 -0
  28. package/out/zero-cache/src/services/view-syncer/drain-coordinator.js.map +1 -1
  29. package/out/zero-cache/src/services/view-syncer/pipeline-driver.d.ts.map +1 -1
  30. package/out/zero-cache/src/services/view-syncer/pipeline-driver.js +1 -0
  31. package/out/zero-cache/src/services/view-syncer/pipeline-driver.js.map +1 -1
  32. package/out/zero-cache/src/services/view-syncer/view-syncer.d.ts +10 -4
  33. package/out/zero-cache/src/services/view-syncer/view-syncer.d.ts.map +1 -1
  34. package/out/zero-cache/src/services/view-syncer/view-syncer.js +74 -21
  35. package/out/zero-cache/src/services/view-syncer/view-syncer.js.map +1 -1
  36. package/out/zero-cache/src/types/streams.d.ts +1 -1
  37. package/out/zero-cache/src/types/streams.d.ts.map +1 -1
  38. package/out/zero-cache/src/types/streams.js +19 -9
  39. package/out/zero-cache/src/types/streams.js.map +1 -1
  40. package/out/zero-cache/src/types/subscription.d.ts +16 -1
  41. package/out/zero-cache/src/types/subscription.d.ts.map +1 -1
  42. package/out/zero-cache/src/types/subscription.js +41 -5
  43. package/out/zero-cache/src/types/subscription.js.map +1 -1
  44. package/out/zero-cache/src/types/websocket-handoff.d.ts +3 -3
  45. package/out/zero-cache/src/types/websocket-handoff.d.ts.map +1 -1
  46. package/out/zero-cache/src/types/websocket-handoff.js +6 -4
  47. package/out/zero-cache/src/types/websocket-handoff.js.map +1 -1
  48. package/out/zero-cache/src/workers/syncer.d.ts.map +1 -1
  49. package/out/zero-cache/src/workers/syncer.js +19 -1
  50. package/out/zero-cache/src/workers/syncer.js.map +1 -1
  51. package/out/zero-client/src/client/inspector/inspector.d.ts.map +1 -1
  52. package/out/zero-client/src/client/inspector/lazy-inspector.d.ts +1 -0
  53. package/out/zero-client/src/client/inspector/lazy-inspector.d.ts.map +1 -1
  54. package/out/zero-client/src/client/query-manager.d.ts +1 -0
  55. package/out/zero-client/src/client/query-manager.d.ts.map +1 -1
  56. package/out/zero.js +3 -3
  57. package/out/zql/src/builder/builder.d.ts +12 -0
  58. package/out/zql/src/builder/builder.d.ts.map +1 -1
  59. package/out/zql/src/builder/builder.js +28 -1
  60. package/out/zql/src/builder/builder.js.map +1 -1
  61. package/out/zql/src/query/query-impl.d.ts.map +1 -1
  62. package/out/zql/src/query/query-impl.js +0 -6
  63. package/out/zql/src/query/query-impl.js.map +1 -1
  64. package/package.json +1 -1
  65. package/out/zql/src/query/assert-no-not-exists.d.ts +0 -17
  66. package/out/zql/src/query/assert-no-not-exists.d.ts.map +0 -1
  67. package/out/zql/src/query/assert-no-not-exists.js +0 -40
  68. package/out/zql/src/query/assert-no-not-exists.js.map +0 -1
  69. /package/out/{chunk-PIXC6O7W.js.map → chunk-5RLYQVTQ.js.map} +0 -0
@@ -5,11 +5,11 @@ import {
5
5
  defaultFormat,
6
6
  newQuery,
7
7
  newQuerySymbol
8
- } from "./chunk-JS2ABYXG.js";
8
+ } from "./chunk-AIYK3MAI.js";
9
9
  import {
10
10
  mapCondition,
11
11
  toStaticParam
12
- } from "./chunk-VHLCXJ6Q.js";
12
+ } from "./chunk-OZZJ3HSP.js";
13
13
  import {
14
14
  assert
15
15
  } from "./chunk-EZM3XBAB.js";
@@ -353,4 +353,4 @@ export {
353
353
  withValidation,
354
354
  createBuilder
355
355
  };
356
- //# sourceMappingURL=chunk-PIXC6O7W.js.map
356
+ //# sourceMappingURL=chunk-5RLYQVTQ.js.map
@@ -123,7 +123,7 @@ import {
123
123
  withWrite,
124
124
  withWriteNoImplicitCommit,
125
125
  wrapIterable
126
- } from "./chunk-VHLCXJ6Q.js";
126
+ } from "./chunk-OZZJ3HSP.js";
127
127
  import {
128
128
  assert,
129
129
  assertArray,
@@ -9672,12 +9672,36 @@ function buildPipeline(ast, delegate, queryID) {
9672
9672
  }
9673
9673
  var EXISTS_LIMIT = 3;
9674
9674
  var PERMISSIONS_EXISTS_LIMIT = 1;
9675
+ function assertNoNotExists(condition) {
9676
+ switch (condition.type) {
9677
+ case "simple":
9678
+ return;
9679
+ case "correlatedSubquery":
9680
+ if (condition.op === "NOT EXISTS") {
9681
+ throw new Error(
9682
+ "not(exists()) is not supported on the client - see https://bugs.rocicorp.dev/issue/3438"
9683
+ );
9684
+ }
9685
+ return;
9686
+ case "and":
9687
+ case "or":
9688
+ for (const c of condition.conditions) {
9689
+ assertNoNotExists(c);
9690
+ }
9691
+ return;
9692
+ default:
9693
+ unreachable(condition);
9694
+ }
9695
+ }
9675
9696
  function buildPipelineInternal(ast, delegate, queryID, name, partitionKey) {
9676
9697
  const source = delegate.getSource(ast.table);
9677
9698
  if (!source) {
9678
9699
  throw new Error(`Source not found: ${ast.table}`);
9679
9700
  }
9680
9701
  ast = uniquifyCorrelatedSubqueryConditionAliases(ast);
9702
+ if (!delegate.enableNotExists && ast.where) {
9703
+ assertNoNotExists(ast.where);
9704
+ }
9681
9705
  const csqConditions = gatherCorrelatedSubqueryQueryConditions(ast.where);
9682
9706
  const splitEditKeys = partitionKey ? new Set(partitionKey) : /* @__PURE__ */ new Set();
9683
9707
  const aliases = /* @__PURE__ */ new Set();
@@ -10200,32 +10224,6 @@ var defaultFormat = {
10200
10224
  relationships: {}
10201
10225
  };
10202
10226
 
10203
- // ../zql/src/query/assert-no-not-exists.ts
10204
- function assertNoNotExists(condition) {
10205
- switch (condition.type) {
10206
- case "simple":
10207
- return;
10208
- case "correlatedSubquery":
10209
- if (condition.op === "NOT EXISTS") {
10210
- throw new Error(
10211
- "not(exists()) is not supported on the client - see https://bugs.rocicorp.dev/issue/3438"
10212
- );
10213
- }
10214
- if (condition.related.subquery.where) {
10215
- assertNoNotExists(condition.related.subquery.where);
10216
- }
10217
- return;
10218
- case "and":
10219
- case "or":
10220
- for (const c of condition.conditions) {
10221
- assertNoNotExists(c);
10222
- }
10223
- return;
10224
- default:
10225
- unreachable(condition);
10226
- }
10227
- }
10228
-
10229
10227
  // ../zql/src/query/query.ts
10230
10228
  var delegateSymbol = Symbol("delegate");
10231
10229
 
@@ -10489,9 +10487,6 @@ var AbstractQuery = class {
10489
10487
  cond = and(existingWhere, cond);
10490
10488
  }
10491
10489
  const where = simplifyCondition(cond);
10492
- if (this.#system === "client") {
10493
- assertNoNotExists(where);
10494
- }
10495
10490
  return this[newQuerySymbol](
10496
10491
  this._delegate,
10497
10492
  this.#schema,
@@ -13065,7 +13060,7 @@ function makeMessage(message, context, logLevel) {
13065
13060
  }
13066
13061
 
13067
13062
  // ../zero-client/src/client/version.ts
13068
- var version2 = "0.24.2025102200";
13063
+ var version2 = "0.24.3000000000-canary.0";
13069
13064
 
13070
13065
  // ../zero-client/src/client/log-options.ts
13071
13066
  var LevelFilterLogSink = class {
@@ -13684,6 +13679,9 @@ var QueryManager = class {
13684
13679
  const ast = this.#queries.get(queryID)?.normalized;
13685
13680
  return ast && mapAST(ast, this.#serverToClient);
13686
13681
  }
13682
+ mapClientASTToServer(ast) {
13683
+ return mapAST(ast, this.#clientToServer);
13684
+ }
13687
13685
  #fireGotCallbacks(queryHash, got) {
13688
13686
  const gotCallbacks = this.#queries.get(queryHash)?.gotCallbacks ?? [];
13689
13687
  for (const gotCallback of gotCallbacks) {
@@ -16048,4 +16046,4 @@ export {
16048
16046
  update_needed_reason_type_enum_exports,
16049
16047
  Zero
16050
16048
  };
16051
- //# sourceMappingURL=chunk-JS2ABYXG.js.map
16049
+ //# sourceMappingURL=chunk-AIYK3MAI.js.map