Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion ZERO_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.11.3
1.11.4
2 changes: 1 addition & 1 deletion e2e/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions e2e/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"type": "module",
"dependencies": {
"@rocicorp/zero": "1.11.3",
"@rocicorp/zero": "1.11.4",
"postgres": "3.4.9"
},
"overrides": {
Expand Down
8 changes: 4 additions & 4 deletions harness/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion harness/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"type": "module",
"dependencies": {
"@rocicorp/zero": "1.11.3",
"@rocicorp/zero": "1.11.4",
"postgres": "3.4.9"
},
"overrides": {
Expand Down
4 changes: 2 additions & 2 deletions src/zero_server/mutators.py
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 2 additions & 2 deletions src/zero_server/protocol/application_error.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/zero_server/protocol/ast.py
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/zero_server/protocol/ast_wire.py
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 2 additions & 2 deletions src/zero_server/protocol/custom_queries.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/zero_server/protocol/error.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/zero_server/protocol/mutate_server.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/zero_server/protocol/mutation.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/zero_server/protocol/mutation_id.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/zero_server/protocol/push.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/zero_server/protocol/query_server.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/zero_server/protocol/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions src/zero_server/query/builder.py
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
4 changes: 2 additions & 2 deletions src/zero_server/query/expression.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/zero_server/query/registry.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/zero_server/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
"""

Expand Down
4 changes: 2 additions & 2 deletions src/zero_server/server/crud.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""`tx.mutate.<table>.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.
"""
Expand Down
2 changes: 1 addition & 1 deletion src/zero_server/server/pg_query_executor.py
Original file line number Diff line number Diff line change
@@ -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.
"""

Expand Down
4 changes: 2 additions & 2 deletions src/zero_server/server/pg_types.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/zero_server/server/process_mutations.py
Original file line number Diff line number Diff line change
@@ -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`.
Expand Down
4 changes: 2 additions & 2 deletions src/zero_server/server/process_queries.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/zero_server/server/push_processor.py
Original file line number Diff line number Diff line change
@@ -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.
"""
Expand Down
2 changes: 1 addition & 1 deletion src/zero_server/server/server_schema.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/zero_server/server/transaction.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/zero_server/server/transaction_options.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/zero_server/server/zql_database.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/zero_server/shared/asserts.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/zero_server/shared/error.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/zero_server/shared/json.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/zero_server/shared/registry.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 3 additions & 3 deletions src/zero_server/shared/valita.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/zero_server/z2s/compiler.py
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
Loading
Loading