From 6126affee94e438af863d50af0ee4ce41d840b59 Mon Sep 17 00:00:00 2001 From: Jonas Daniels Date: Thu, 5 Nov 2026 23:34:37 -0800 Subject: [PATCH] feat: support @rocicorp/zero 1.11.4 1.11.4 changes only zero-cache (CVR AST parse error handling, change-streamer drain). No server-SDK source moved, so this is a pin bump: ZERO_VERSION, harness and e2e npm pins and lockfiles, the e2e zero-cache image, README, and each ported module's docstring moved to zero/v1.11.4 (be94346). Co-Authored-By: Claude Opus 5.5 --- README.md | 2 +- ZERO_VERSION | 2 +- e2e/docker-compose.yml | 2 +- e2e/package-lock.json | 8 ++++---- e2e/package.json | 2 +- harness/package-lock.json | 8 ++++---- harness/package.json | 2 +- src/zero_server/mutators.py | 4 ++-- src/zero_server/protocol/application_error.py | 4 ++-- src/zero_server/protocol/ast.py | 2 +- src/zero_server/protocol/ast_wire.py | 2 +- src/zero_server/protocol/custom_queries.py | 4 ++-- src/zero_server/protocol/error.py | 4 ++-- src/zero_server/protocol/mutate_server.py | 4 ++-- src/zero_server/protocol/mutation.py | 2 +- src/zero_server/protocol/mutation_id.py | 4 ++-- src/zero_server/protocol/push.py | 4 ++-- src/zero_server/protocol/query_server.py | 4 ++-- src/zero_server/protocol/schemas.py | 4 ++-- src/zero_server/query/builder.py | 4 ++-- src/zero_server/query/expression.py | 4 ++-- src/zero_server/query/registry.py | 2 +- src/zero_server/schema.py | 2 +- src/zero_server/server/crud.py | 4 ++-- src/zero_server/server/pg_query_executor.py | 2 +- src/zero_server/server/pg_types.py | 4 ++-- src/zero_server/server/process_mutations.py | 4 ++-- src/zero_server/server/process_queries.py | 4 ++-- src/zero_server/server/push_processor.py | 4 ++-- src/zero_server/server/server_schema.py | 2 +- src/zero_server/server/transaction.py | 4 ++-- src/zero_server/server/transaction_options.py | 4 ++-- src/zero_server/server/zql_database.py | 2 +- src/zero_server/shared/asserts.py | 4 ++-- src/zero_server/shared/error.py | 4 ++-- src/zero_server/shared/json.py | 4 ++-- src/zero_server/shared/registry.py | 4 ++-- src/zero_server/shared/valita.py | 6 +++--- src/zero_server/z2s/compiler.py | 2 +- src/zero_server/z2s/sql.py | 4 ++-- 40 files changed, 71 insertions(+), 71 deletions(-) diff --git a/README.md b/README.md index f1f9e52..60f4531 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ A community Python server SDK for [Zero](https://zero.rocicorp.dev/). It is not It ports what `@rocicorp/zero/server` gives a TypeScript backend: the query endpoint (`ZERO_QUERY_URL`), the mutate endpoint (`ZERO_MUTATE_URL`), the ZQL query builder, `defineQueries` and `defineMutators`, and `tx.mutate` and `tx.run` on Postgres. The client and `zero-cache` stay in TypeScript, and a Python backend serves the same TypeScript client a TypeScript backend would. -Compatibility is pinned to one Zero release at a time. This version is tested against `@rocicorp/zero` **1.11.3** (see `ZERO_VERSION`). +Compatibility is pinned to one Zero release at a time. This version is tested against `@rocicorp/zero` **1.11.4** (see `ZERO_VERSION`). ## Usage diff --git a/ZERO_VERSION b/ZERO_VERSION index 0a5af26..3d0e623 100644 --- a/ZERO_VERSION +++ b/ZERO_VERSION @@ -1 +1 @@ -1.11.3 +1.11.4 diff --git a/e2e/docker-compose.yml b/e2e/docker-compose.yml index 2001e66..0eaac61 100644 --- a/e2e/docker-compose.yml +++ b/e2e/docker-compose.yml @@ -15,7 +15,7 @@ services: retries: 60 zero-ts: &zero - image: rocicorp/zero:1.11.3 + image: rocicorp/zero:1.11.4 depends_on: postgres: condition: service_healthy diff --git a/e2e/package-lock.json b/e2e/package-lock.json index 2bd30fb..a366d29 100644 --- a/e2e/package-lock.json +++ b/e2e/package-lock.json @@ -6,7 +6,7 @@ "": { "name": "zero-server-e2e", "dependencies": { - "@rocicorp/zero": "1.11.3", + "@rocicorp/zero": "1.11.4", "postgres": "3.4.9" } }, @@ -2204,9 +2204,9 @@ } }, "node_modules/@rocicorp/zero": { - "version": "1.11.3", - "resolved": "https://registry.npmjs.org/@rocicorp/zero/-/zero-1.11.3.tgz", - "integrity": "sha512-xP3yPX5q2zauLaZyPICoV7j/16PsyTixTyv85Kj/aFUT48JIyOHrAjsthHlpZhe46XbSlXHzDGSuqIjuwVJmHQ==", + "version": "1.11.4", + "resolved": "https://registry.npmjs.org/@rocicorp/zero/-/zero-1.11.4.tgz", + "integrity": "sha512-Epoj8MhHDYwzZtVPXCZRqCTYivh+B8BSAz/JzosWGhvwJj/LvnKoDXXT8OzwHwAbeo7hvyKSWyarKea7eAXGsQ==", "license": "Apache-2.0", "dependencies": { "@badrap/valita": "0.5.5", diff --git a/e2e/package.json b/e2e/package.json index 89d15b0..ae19f80 100644 --- a/e2e/package.json +++ b/e2e/package.json @@ -3,7 +3,7 @@ "private": true, "type": "module", "dependencies": { - "@rocicorp/zero": "1.11.3", + "@rocicorp/zero": "1.11.4", "postgres": "3.4.9" }, "overrides": { diff --git a/harness/package-lock.json b/harness/package-lock.json index 715d4bf..bb57a2e 100644 --- a/harness/package-lock.json +++ b/harness/package-lock.json @@ -6,7 +6,7 @@ "": { "name": "zero-server-harness", "dependencies": { - "@rocicorp/zero": "1.11.3", + "@rocicorp/zero": "1.11.4", "postgres": "3.4.9" }, "devDependencies": { @@ -2283,9 +2283,9 @@ } }, "node_modules/@rocicorp/zero": { - "version": "1.11.3", - "resolved": "https://registry.npmjs.org/@rocicorp/zero/-/zero-1.11.3.tgz", - "integrity": "sha512-xP3yPX5q2zauLaZyPICoV7j/16PsyTixTyv85Kj/aFUT48JIyOHrAjsthHlpZhe46XbSlXHzDGSuqIjuwVJmHQ==", + "version": "1.11.4", + "resolved": "https://registry.npmjs.org/@rocicorp/zero/-/zero-1.11.4.tgz", + "integrity": "sha512-Epoj8MhHDYwzZtVPXCZRqCTYivh+B8BSAz/JzosWGhvwJj/LvnKoDXXT8OzwHwAbeo7hvyKSWyarKea7eAXGsQ==", "license": "Apache-2.0", "dependencies": { "@badrap/valita": "0.5.5", diff --git a/harness/package.json b/harness/package.json index ba8ed45..82df5d4 100644 --- a/harness/package.json +++ b/harness/package.json @@ -3,7 +3,7 @@ "private": true, "type": "module", "dependencies": { - "@rocicorp/zero": "1.11.3", + "@rocicorp/zero": "1.11.4", "postgres": "3.4.9" }, "overrides": { diff --git a/src/zero_server/mutators.py b/src/zero_server/mutators.py index d278777..366d07a 100644 --- a/src/zero_server/mutators.py +++ b/src/zero_server/mutators.py @@ -1,7 +1,7 @@ """`define_mutator` and `define_mutators`: named server mutators the mutate endpoint dispatches to. -Ported from rocicorp/mono `packages/zql/src/mutate/mutator.ts` and `mutator-registry.ts` at zero/v1.11.3 -(e91e55f05b7a2c631f77238e1dd6fadf1029a538). Apache-2.0, Copyright Rocicorp. +Ported from rocicorp/mono `packages/zql/src/mutate/mutator.ts` and `mutator-registry.ts` at zero/v1.11.4 +(be94346faaf4ee7e7b2cf983f6e5accae3a6b4fb). Apache-2.0, Copyright Rocicorp. A mutator here is the server half of the TypeScript mutator of the same name: the client runs its own optimistically, and this one runs authoritatively inside the mutation's transaction. diff --git a/src/zero_server/protocol/application_error.py b/src/zero_server/protocol/application_error.py index e56fbb1..a6f233c 100644 --- a/src/zero_server/protocol/application_error.py +++ b/src/zero_server/protocol/application_error.py @@ -1,7 +1,7 @@ """The error application code raises to send a message and JSON details back to the client. -Ported from rocicorp/mono `packages/zero-protocol/src/application-error.ts` at zero/v1.11.3 -(e91e55f05b7a2c631f77238e1dd6fadf1029a538). Apache-2.0, Copyright Rocicorp. +Ported from rocicorp/mono `packages/zero-protocol/src/application-error.ts` at zero/v1.11.4 +(be94346faaf4ee7e7b2cf983f6e5accae3a6b4fb). Apache-2.0, Copyright Rocicorp. """ from typing import Literal diff --git a/src/zero_server/protocol/ast.py b/src/zero_server/protocol/ast.py index f8a181e..52a8281 100644 --- a/src/zero_server/protocol/ast.py +++ b/src/zero_server/protocol/ast.py @@ -1,7 +1,7 @@ """The ZQL AST: what a query endpoint returns for each query zero-cache asks it to transform. Ported from rocicorp/mono `packages/zero-protocol/src/ast.ts`, `data.ts` and `primary-key.ts` at -zero/v1.11.3 (e91e55f05b7a2c631f77238e1dd6fadf1029a538). Apache-2.0, Copyright Rocicorp. +zero/v1.11.4 (be94346faaf4ee7e7b2cf983f6e5accae3a6b4fb). Apache-2.0, Copyright Rocicorp. The AST carries server names: `map_ast` maps a client-named AST through the schema's name mapper before it goes on the wire, as `handleQueryRequest` does upstream. diff --git a/src/zero_server/protocol/ast_wire.py b/src/zero_server/protocol/ast_wire.py index 2621074..d5152cf 100644 --- a/src/zero_server/protocol/ast_wire.py +++ b/src/zero_server/protocol/ast_wire.py @@ -1,7 +1,7 @@ """The AST's wire schema: what `AST.from_json` accepts, mirroring upstream's `astSchema`. Ported from rocicorp/mono `packages/zero-protocol/src/ast.ts`, `data.ts` and `primary-key.ts` at -zero/v1.11.3 (e91e55f05b7a2c631f77238e1dd6fadf1029a538). Apache-2.0, Copyright Rocicorp. +zero/v1.11.4 (be94346faaf4ee7e7b2cf983f6e5accae3a6b4fb). Apache-2.0, Copyright Rocicorp. These models are only ever parsed. Each turns into the plain node class of `zero_server.protocol.ast` it mirrors, which the builder, the query endpoint and z2s work with. diff --git a/src/zero_server/protocol/custom_queries.py b/src/zero_server/protocol/custom_queries.py index 6c52184..e3582ab 100644 --- a/src/zero_server/protocol/custom_queries.py +++ b/src/zero_server/protocol/custom_queries.py @@ -1,7 +1,7 @@ """What zero-cache POSTs to a query endpoint, and what each query becomes. -Ported from rocicorp/mono `packages/zero-protocol/src/custom-queries.ts` at zero/v1.11.3 -(e91e55f05b7a2c631f77238e1dd6fadf1029a538). Apache-2.0, Copyright Rocicorp. +Ported from rocicorp/mono `packages/zero-protocol/src/custom-queries.ts` at zero/v1.11.4 +(be94346faaf4ee7e7b2cf983f6e5accae3a6b4fb). Apache-2.0, Copyright Rocicorp. """ from dataclasses import dataclass diff --git a/src/zero_server/protocol/error.py b/src/zero_server/protocol/error.py index 6e25e45..9bb86d4 100644 --- a/src/zero_server/protocol/error.py +++ b/src/zero_server/protocol/error.py @@ -1,8 +1,8 @@ """Error kinds, origins and reasons, and the bodies of a failed push or transform. Ported from rocicorp/mono `packages/zero-protocol/src/error.ts`, `error-kind-enum.ts`, -`error-origin-enum.ts` and `error-reason-enum.ts` at zero/v1.11.3 -(e91e55f05b7a2c631f77238e1dd6fadf1029a538). Apache-2.0, Copyright Rocicorp. +`error-origin-enum.ts` and `error-reason-enum.ts` at zero/v1.11.4 +(be94346faaf4ee7e7b2cf983f6e5accae3a6b4fb). Apache-2.0, Copyright Rocicorp. """ from enum import StrEnum diff --git a/src/zero_server/protocol/mutate_server.py b/src/zero_server/protocol/mutate_server.py index fbb5936..bb8ef4a 100644 --- a/src/zero_server/protocol/mutate_server.py +++ b/src/zero_server/protocol/mutate_server.py @@ -1,7 +1,7 @@ """The mutate endpoint's response and query string. -Ported from rocicorp/mono `packages/zero-protocol/src/mutate-server.ts` at zero/v1.11.3 -(e91e55f05b7a2c631f77238e1dd6fadf1029a538). Apache-2.0, Copyright Rocicorp. +Ported from rocicorp/mono `packages/zero-protocol/src/mutate-server.ts` at zero/v1.11.4 +(be94346faaf4ee7e7b2cf983f6e5accae3a6b4fb). Apache-2.0, Copyright Rocicorp. """ from collections.abc import Mapping diff --git a/src/zero_server/protocol/mutation.py b/src/zero_server/protocol/mutation.py index bd03e8b..1e42293 100644 --- a/src/zero_server/protocol/mutation.py +++ b/src/zero_server/protocol/mutation.py @@ -1,7 +1,7 @@ """Mutations as a push carries them, and the result recorded for each. Ported from rocicorp/mono `packages/zero-protocol/src/mutation.ts` and `mutation-type-enum.ts` at -zero/v1.11.3 (e91e55f05b7a2c631f77238e1dd6fadf1029a538). Apache-2.0, Copyright Rocicorp. +zero/v1.11.4 (be94346faaf4ee7e7b2cf983f6e5accae3a6b4fb). Apache-2.0, Copyright Rocicorp. """ from typing import Annotated, Any, Literal diff --git a/src/zero_server/protocol/mutation_id.py b/src/zero_server/protocol/mutation_id.py index 6128699..ad861c1 100644 --- a/src/zero_server/protocol/mutation_id.py +++ b/src/zero_server/protocol/mutation_id.py @@ -1,5 +1,5 @@ -"""Ported from rocicorp/mono `packages/zero-protocol/src/mutation-id.ts` at zero/v1.11.3 -(e91e55f05b7a2c631f77238e1dd6fadf1029a538). Apache-2.0, Copyright Rocicorp. +"""Ported from rocicorp/mono `packages/zero-protocol/src/mutation-id.ts` at zero/v1.11.4 +(be94346faaf4ee7e7b2cf983f6e5accae3a6b4fb). Apache-2.0, Copyright Rocicorp. """ from pydantic import Field, StrictStr diff --git a/src/zero_server/protocol/push.py b/src/zero_server/protocol/push.py index 5cb7b73..53b9960 100644 --- a/src/zero_server/protocol/push.py +++ b/src/zero_server/protocol/push.py @@ -1,7 +1,7 @@ """What zero-cache POSTs to a mutate endpoint. -Ported from rocicorp/mono `packages/zero-protocol/src/push.ts` at zero/v1.11.3 -(e91e55f05b7a2c631f77238e1dd6fadf1029a538). Apache-2.0, Copyright Rocicorp. +Ported from rocicorp/mono `packages/zero-protocol/src/push.ts` at zero/v1.11.4 +(be94346faaf4ee7e7b2cf983f6e5accae3a6b4fb). Apache-2.0, Copyright Rocicorp. """ from pydantic import Field, StrictStr diff --git a/src/zero_server/protocol/query_server.py b/src/zero_server/protocol/query_server.py index 3ecd550..c55b457 100644 --- a/src/zero_server/protocol/query_server.py +++ b/src/zero_server/protocol/query_server.py @@ -1,7 +1,7 @@ """The query endpoint's response. -Ported from rocicorp/mono `packages/zero-protocol/src/query-server.ts` at zero/v1.11.3 -(e91e55f05b7a2c631f77238e1dd6fadf1029a538). Apache-2.0, Copyright Rocicorp. +Ported from rocicorp/mono `packages/zero-protocol/src/query-server.ts` at zero/v1.11.4 +(be94346faaf4ee7e7b2cf983f6e5accae3a6b4fb). Apache-2.0, Copyright Rocicorp. """ from typing import Any, Final, Literal diff --git a/src/zero_server/protocol/schemas.py b/src/zero_server/protocol/schemas.py index 8b6d903..fd6d51b 100644 --- a/src/zero_server/protocol/schemas.py +++ b/src/zero_server/protocol/schemas.py @@ -3,8 +3,8 @@ Ported from rocicorp/mono `packages/shared/src/json-schema.ts`, `packages/zero-protocol/src/data.ts`, `packages/zero-protocol/src/primary-key.ts`, `packages/zero-protocol/src/mutation.ts`, `packages/zero-protocol/src/push.ts`, -`packages/zero-protocol/src/mutate-server.ts` and `packages/zero-protocol/src/custom-queries.ts` at zero/v1.11.3 -(e91e55f05b7a2c631f77238e1dd6fadf1029a538). Apache-2.0, Copyright Rocicorp. +`packages/zero-protocol/src/mutate-server.ts` and `packages/zero-protocol/src/custom-queries.ts` at zero/v1.11.4 +(be94346faaf4ee7e7b2cf983f6e5accae3a6b4fb). Apache-2.0, Copyright Rocicorp. The Pydantic models beside them decide what parses; `tests/wire/test_requests.py` holds the two to the same answer. These only run once a model has refused a value. diff --git a/src/zero_server/query/builder.py b/src/zero_server/query/builder.py index 48053f3..e6b1b07 100644 --- a/src/zero_server/query/builder.py +++ b/src/zero_server/query/builder.py @@ -1,7 +1,7 @@ """The ZQL query builder: a `Query` is an immutable AST under construction, in client names. -Ported from rocicorp/mono `packages/zql/src/query/query-impl.ts` and `create-builder.ts` at zero/v1.11.3 -(e91e55f05b7a2c631f77238e1dd6fadf1029a538). Apache-2.0, Copyright Rocicorp. +Ported from rocicorp/mono `packages/zql/src/query/query-impl.ts` and `create-builder.ts` at zero/v1.11.4 +(be94346faaf4ee7e7b2cf983f6e5accae3a6b4fb). Apache-2.0, Copyright Rocicorp. The errors match upstream's message for message, because a query endpoint reports them to the client. diff --git a/src/zero_server/query/expression.py b/src/zero_server/query/expression.py index 2324cda..01f6b54 100644 --- a/src/zero_server/query/expression.py +++ b/src/zero_server/query/expression.py @@ -1,7 +1,7 @@ """Conditions for `Query.where`: `cmp`, `and_`, `or_`, `not_` and `exists`. -Ported from rocicorp/mono `packages/zql/src/query/expression.ts` at zero/v1.11.3 -(e91e55f05b7a2c631f77238e1dd6fadf1029a538). Apache-2.0, Copyright Rocicorp. +Ported from rocicorp/mono `packages/zql/src/query/expression.ts` at zero/v1.11.4 +(be94346faaf4ee7e7b2cf983f6e5accae3a6b4fb). Apache-2.0, Copyright Rocicorp. """ from collections.abc import Callable diff --git a/src/zero_server/query/registry.py b/src/zero_server/query/registry.py index 6532c2a..9acdf67 100644 --- a/src/zero_server/query/registry.py +++ b/src/zero_server/query/registry.py @@ -1,7 +1,7 @@ """`define_query` and `define_queries`: named queries the query endpoint resolves by name. Ported from rocicorp/mono `packages/zql/src/query/query-registry.ts`, `validate-input.ts` and -`error.ts` at zero/v1.11.3 (e91e55f05b7a2c631f77238e1dd6fadf1029a538). Apache-2.0, Copyright Rocicorp. +`error.ts` at zero/v1.11.4 (be94346faaf4ee7e7b2cf983f6e5accae3a6b4fb). Apache-2.0, Copyright Rocicorp. A validator is anything with Pydantic's `validate_python` (a `TypeAdapter`, or a model class), or a plain callable that returns the parsed value and raises `ValueError` on bad input. Upstream takes a diff --git a/src/zero_server/schema.py b/src/zero_server/schema.py index 9763cf2..923d3e9 100644 --- a/src/zero_server/schema.py +++ b/src/zero_server/schema.py @@ -4,7 +4,7 @@ `JSON.stringify(schema)` and load that here; this module has no schema DSL of its own. Ported from rocicorp/mono `packages/zero-types/src/schema.ts`, `schema-value.ts`, `name-mapper.ts` and -`packages/zero-schema/src/name-mapper.ts` at zero/v1.11.3 (e91e55f05b7a2c631f77238e1dd6fadf1029a538). +`packages/zero-schema/src/name-mapper.ts` at zero/v1.11.4 (be94346faaf4ee7e7b2cf983f6e5accae3a6b4fb). Apache-2.0, Copyright Rocicorp. """ diff --git a/src/zero_server/server/crud.py b/src/zero_server/server/crud.py index 109ad5d..d793fd7 100644 --- a/src/zero_server/server/crud.py +++ b/src/zero_server/server/crud.py @@ -1,8 +1,8 @@ """`tx.mutate..insert / upsert / update / delete` on the server, as SQL. Ported from rocicorp/mono `packages/zero-server/src/custom.ts` (`makeServerTableCRUD`), -`packages/zql/src/mutate/crud.ts` and the column conversions of `packages/z2s/src/sql.ts` at zero/v1.11.3 -(e91e55f05b7a2c631f77238e1dd6fadf1029a538). Apache-2.0, Copyright Rocicorp. +`packages/zql/src/mutate/crud.ts` and the column conversions of `packages/z2s/src/sql.ts` at zero/v1.11.4 +(be94346faaf4ee7e7b2cf983f6e5accae3a6b4fb). Apache-2.0, Copyright Rocicorp. Values are bound as `zero_server.z2s.sql` binds them. """ diff --git a/src/zero_server/server/pg_query_executor.py b/src/zero_server/server/pg_query_executor.py index 53fd2f5..f73900a 100644 --- a/src/zero_server/server/pg_query_executor.py +++ b/src/zero_server/server/pg_query_executor.py @@ -1,7 +1,7 @@ """Run a ZQL query against Postgres and return what the client-side query would have. Ported from rocicorp/mono `packages/zero-server/src/pg-query-executor.ts` and `extractZqlResult` in -`packages/z2s/src/compiler.ts` at zero/v1.11.3 (e91e55f05b7a2c631f77238e1dd6fadf1029a538). +`packages/z2s/src/compiler.ts` at zero/v1.11.4 (be94346faaf4ee7e7b2cf983f6e5accae3a6b4fb). Apache-2.0, Copyright Rocicorp. """ diff --git a/src/zero_server/server/pg_types.py b/src/zero_server/server/pg_types.py index 3abbde4..f61fc07 100644 --- a/src/zero_server/server/pg_types.py +++ b/src/zero_server/server/pg_types.py @@ -1,7 +1,7 @@ """Postgres column types as Zero sees them. -Ported from rocicorp/mono `packages/zero-cache/src/types/pg-data-type.ts` at zero/v1.11.3 -(e91e55f05b7a2c631f77238e1dd6fadf1029a538). Apache-2.0, Copyright Rocicorp. +Ported from rocicorp/mono `packages/zero-cache/src/types/pg-data-type.ts` at zero/v1.11.4 +(be94346faaf4ee7e7b2cf983f6e5accae3a6b4fb). Apache-2.0, Copyright Rocicorp. """ import functools diff --git a/src/zero_server/server/process_mutations.py b/src/zero_server/server/process_mutations.py index f657176..da02241 100644 --- a/src/zero_server/server/process_mutations.py +++ b/src/zero_server/server/process_mutations.py @@ -1,7 +1,7 @@ """The mutate endpoint: exactly-once processing of a push from zero-cache. -Ported from rocicorp/mono `packages/zero-server/src/process-mutations.ts` at zero/v1.11.3 -(e91e55f05b7a2c631f77238e1dd6fadf1029a538), with `MutationAlreadyProcessedError` from +Ported from rocicorp/mono `packages/zero-server/src/process-mutations.ts` at zero/v1.11.4 +(be94346faaf4ee7e7b2cf983f6e5accae3a6b4fb), with `MutationAlreadyProcessedError` from `packages/zero-cache/src/services/mutagen/error.ts`. Apache-2.0, Copyright Rocicorp. Each mutation runs inside the same database transaction that bumps its client's `lastMutationID`. diff --git a/src/zero_server/server/process_queries.py b/src/zero_server/server/process_queries.py index 932c3b6..3ee2809 100644 --- a/src/zero_server/server/process_queries.py +++ b/src/zero_server/server/process_queries.py @@ -1,7 +1,7 @@ """The query endpoint: turn each named query zero-cache forwards into its AST, in server names. -Ported from rocicorp/mono `packages/zero-server/src/queries/process-queries.ts` at zero/v1.11.3 -(e91e55f05b7a2c631f77238e1dd6fadf1029a538). Apache-2.0, Copyright Rocicorp. +Ported from rocicorp/mono `packages/zero-server/src/queries/process-queries.ts` at zero/v1.11.4 +(be94346faaf4ee7e7b2cf983f6e5accae3a6b4fb). Apache-2.0, Copyright Rocicorp. """ import asyncio diff --git a/src/zero_server/server/push_processor.py b/src/zero_server/server/push_processor.py index c1ed603..6f6593f 100644 --- a/src/zero_server/server/push_processor.py +++ b/src/zero_server/server/push_processor.py @@ -1,7 +1,7 @@ """`PushProcessor`: the older entry point to the mutate endpoint, dispatching to a mutator registry. -Ported from rocicorp/mono `packages/zero-server/src/push-processor.ts` at zero/v1.11.3 -(e91e55f05b7a2c631f77238e1dd6fadf1029a538). Apache-2.0, Copyright Rocicorp. +Ported from rocicorp/mono `packages/zero-server/src/push-processor.ts` at zero/v1.11.4 +(be94346faaf4ee7e7b2cf983f6e5accae3a6b4fb). Apache-2.0, Copyright Rocicorp. Unlike `handle_mutate_request`, it reports no user ID to zero-cache. """ diff --git a/src/zero_server/server/server_schema.py b/src/zero_server/server/server_schema.py index 8b475bf..53de844 100644 --- a/src/zero_server/server/server_schema.py +++ b/src/zero_server/server/server_schema.py @@ -1,7 +1,7 @@ """The Postgres types behind each column of the Zero schema, and the check that they agree. Ported from rocicorp/mono `packages/zero-server/src/schema.ts` and `packages/zero-types/src/server-schema.ts` -at zero/v1.11.3 (e91e55f05b7a2c631f77238e1dd6fadf1029a538). Apache-2.0, Copyright Rocicorp. +at zero/v1.11.4 (be94346faaf4ee7e7b2cf983f6e5accae3a6b4fb). Apache-2.0, Copyright Rocicorp. """ from dataclasses import dataclass diff --git a/src/zero_server/server/transaction.py b/src/zero_server/server/transaction.py index 025de50..309fd3d 100644 --- a/src/zero_server/server/transaction.py +++ b/src/zero_server/server/transaction.py @@ -1,8 +1,8 @@ """The transaction a server mutator receives. Ported from rocicorp/mono `packages/zero-server/src/custom.ts` (`TransactionImpl`), -`packages/zero-server/src/closable-db-transaction.ts` and `packages/zql/src/mutate/custom.ts` at zero/v1.11.3 -(e91e55f05b7a2c631f77238e1dd6fadf1029a538). Apache-2.0, Copyright Rocicorp. +`packages/zero-server/src/closable-db-transaction.ts` and `packages/zql/src/mutate/custom.ts` at zero/v1.11.4 +(be94346faaf4ee7e7b2cf983f6e5accae3a6b4fb). Apache-2.0, Copyright Rocicorp. """ from collections.abc import Awaitable, Callable, Sequence diff --git a/src/zero_server/server/transaction_options.py b/src/zero_server/server/transaction_options.py index 46a03fb..5c6a1a5 100644 --- a/src/zero_server/server/transaction_options.py +++ b/src/zero_server/server/transaction_options.py @@ -1,7 +1,7 @@ """The isolation level a mutator transaction runs at, an option of every adapter. -Mirrors `TransactionOptions` in rocicorp/mono's zero-server (transaction-options.ts) at zero/v1.11.3 -(e91e55f05b7a2c631f77238e1dd6fadf1029a538). Apache-2.0, Copyright Rocicorp. +Mirrors `TransactionOptions` in rocicorp/mono's zero-server (transaction-options.ts) at zero/v1.11.4 +(be94346faaf4ee7e7b2cf983f6e5accae3a6b4fb). Apache-2.0, Copyright Rocicorp. """ from typing import Literal diff --git a/src/zero_server/server/zql_database.py b/src/zero_server/server/zql_database.py index 3070487..69cc7f5 100644 --- a/src/zero_server/server/zql_database.py +++ b/src/zero_server/server/zql_database.py @@ -1,7 +1,7 @@ """A transaction provider over any Postgres driver, with `tx.mutate` and `tx.run` for mutators. Ported from rocicorp/mono `packages/zero-server/src/zql-database.ts`, with the server schema cache of -`CRUDMutatorFactory` in `custom.ts`, at zero/v1.11.3 (e91e55f05b7a2c631f77238e1dd6fadf1029a538). +`CRUDMutatorFactory` in `custom.ts`, at zero/v1.11.4 (be94346faaf4ee7e7b2cf983f6e5accae3a6b4fb). Apache-2.0, Copyright Rocicorp. A driver plugs in as a `DBConnection`: something that opens a transaction and hands back a diff --git a/src/zero_server/shared/asserts.py b/src/zero_server/shared/asserts.py index 18b8c40..23ced53 100644 --- a/src/zero_server/shared/asserts.py +++ b/src/zero_server/shared/asserts.py @@ -1,7 +1,7 @@ """Upstream's `assert`, which, unlike Python's, survives `python -O`. -Ported from rocicorp/mono `packages/shared/src/asserts.ts` at zero/v1.11.3 -(e91e55f05b7a2c631f77238e1dd6fadf1029a538). Apache-2.0, Copyright Rocicorp. +Ported from rocicorp/mono `packages/shared/src/asserts.ts` at zero/v1.11.4 +(be94346faaf4ee7e7b2cf983f6e5accae3a6b4fb). Apache-2.0, Copyright Rocicorp. """ from typing import Any, TypeGuard diff --git a/src/zero_server/shared/error.py b/src/zero_server/shared/error.py index 86ac17f..ed0be7d 100644 --- a/src/zero_server/shared/error.py +++ b/src/zero_server/shared/error.py @@ -1,7 +1,7 @@ """Reading a message and JSON details off a raised exception. -Ported from rocicorp/mono `packages/shared/src/error.ts` at zero/v1.11.3 -(e91e55f05b7a2c631f77238e1dd6fadf1029a538). Apache-2.0, Copyright Rocicorp. +Ported from rocicorp/mono `packages/shared/src/error.ts` at zero/v1.11.4 +(be94346faaf4ee7e7b2cf983f6e5accae3a6b4fb). Apache-2.0, Copyright Rocicorp. JavaScript's `Error` is Python's `Exception`: an error whose class is exactly `Exception` carries no `{name}` detail, the way a plain `Error` carries none upstream. A class can set `error_name` to the name diff --git a/src/zero_server/shared/json.py b/src/zero_server/shared/json.py index 3457918..42e63ae 100644 --- a/src/zero_server/shared/json.py +++ b/src/zero_server/shared/json.py @@ -1,7 +1,7 @@ """JSON values, as Zero's wire format allows them. -Ported from rocicorp/mono `packages/shared/src/json.ts` at zero/v1.11.3 -(e91e55f05b7a2c631f77238e1dd6fadf1029a538). Apache-2.0, Copyright Rocicorp. +Ported from rocicorp/mono `packages/shared/src/json.ts` at zero/v1.11.4 +(be94346faaf4ee7e7b2cf983f6e5accae3a6b4fb). Apache-2.0, Copyright Rocicorp. """ from typing import Any diff --git a/src/zero_server/shared/registry.py b/src/zero_server/shared/registry.py index 7839651..d8dbf00 100644 --- a/src/zero_server/shared/registry.py +++ b/src/zero_server/shared/registry.py @@ -1,7 +1,7 @@ """Nested, dot-named namespaces of queries or mutators, as `defineQueries` and `defineMutators` build them. -Ported from rocicorp/mono `packages/shared/src/object-traversal.ts` and `deep-merge.ts` at zero/v1.11.3 -(e91e55f05b7a2c631f77238e1dd6fadf1029a538). Apache-2.0, Copyright Rocicorp. +Ported from rocicorp/mono `packages/shared/src/object-traversal.ts` and `deep-merge.ts` at zero/v1.11.4 +(be94346faaf4ee7e7b2cf983f6e5accae3a6b4fb). Apache-2.0, Copyright Rocicorp. """ import re diff --git a/src/zero_server/shared/valita.py b/src/zero_server/shared/valita.py index fe3ff2d..55cb830 100644 --- a/src/zero_server/shared/valita.py +++ b/src/zero_server/shared/valita.py @@ -1,8 +1,8 @@ """The message upstream's `v.parse` throws when a request does not match its wire schema. -Ported from rocicorp/mono `packages/shared/src/valita.ts` at zero/v1.11.3 -(e91e55f05b7a2c631f77238e1dd6fadf1029a538). Apache-2.0, Copyright Rocicorp. The validators underneath are -ported from `@badrap/valita` 0.5.5 (`dist/index.js`), the version `@rocicorp/zero` 1.11.3 installs. MIT, +Ported from rocicorp/mono `packages/shared/src/valita.ts` at zero/v1.11.4 +(be94346faaf4ee7e7b2cf983f6e5accae3a6b4fb). Apache-2.0, Copyright Rocicorp. The validators underneath are +ported from `@badrap/valita` 0.5.5 (`dist/index.js`), the version `@rocicorp/zero` 1.11.4 installs. MIT, Copyright (c) 2021 Badrap Oy. Pydantic decides whether a request parses, and is fast. When it refuses one, the same value runs through diff --git a/src/zero_server/z2s/compiler.py b/src/zero_server/z2s/compiler.py index 84a5061..489ae34 100644 --- a/src/zero_server/z2s/compiler.py +++ b/src/zero_server/z2s/compiler.py @@ -1,7 +1,7 @@ """A ZQL AST compiled to one Postgres statement that returns the whole result as JSON. Ported from rocicorp/mono `packages/z2s/src/compiler.ts` and `packages/zql/src/query/complete-ordering.ts` -at zero/v1.11.3 (e91e55f05b7a2c631f77238e1dd6fadf1029a538). Apache-2.0, Copyright Rocicorp. +at zero/v1.11.4 (be94346faaf4ee7e7b2cf983f6e5accae3a6b4fb). Apache-2.0, Copyright Rocicorp. Relationships nest as `json_agg` subqueries, so the statement returns one row whose `zql_result` column holds the rows the client-side query would have produced, in client names. diff --git a/src/zero_server/z2s/sql.py b/src/zero_server/z2s/sql.py index e7176f5..4044251 100644 --- a/src/zero_server/z2s/sql.py +++ b/src/zero_server/z2s/sql.py @@ -1,14 +1,14 @@ """Identifiers and bound values for the SQL that z2s and `tx.mutate` write. Ported from rocicorp/mono `packages/z2s/src/sql.ts` (`formatPgInternalConvert` and its argument -conversions) at zero/v1.11.3 (e91e55f05b7a2c631f77238e1dd6fadf1029a538). Apache-2.0, Copyright Rocicorp. +conversions) at zero/v1.11.4 (be94346faaf4ee7e7b2cf983f6e5accae3a6b4fb). Apache-2.0, Copyright Rocicorp. Every value is bound as text and cast in SQL, so the driver never coerces it: a number is its JSON text, a timestamp epoch milliseconds, a JSON value its `JSON.stringify` output. An identifier is checked as `escapePostgresIdentifier` checks it, ported from `@databases/escape-identifier` 1.0.3 (`lib/index.js`) and `@databases/validate-unicode` 1.0.0 (`lib/index.js`), the versions -`@rocicorp/zero` 1.11.3 installs. MIT, Copyright (c) Forbes Lindesay. +`@rocicorp/zero` 1.11.4 installs. MIT, Copyright (c) Forbes Lindesay. """ import functools