@rocicorp/zero 0.12.2025012601 → 0.12.2025012800
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/out/advanced.js +2 -2
- package/out/{chunk-F5QR3K72.js → chunk-424PT5DM.js} +1 -1
- package/out/{chunk-JZD6FXRT.js → chunk-MJYDJPXG.js} +37 -43
- package/out/{chunk-JZD6FXRT.js.map → chunk-MJYDJPXG.js.map} +3 -3
- package/out/{chunk-I5GSZARI.js → chunk-QAAJZ32T.js} +1 -1
- package/out/{chunk-I5GSZARI.js.map → chunk-QAAJZ32T.js.map} +1 -1
- package/out/datadog/src/mod.d.ts +1 -1
- package/out/react.js +1 -1
- package/out/react.js.map +1 -1
- package/out/replicache/src/btree/diff.d.ts +2 -2
- package/out/replicache/src/btree/node.d.ts +8 -8
- package/out/replicache/src/btree/read.d.ts +6 -6
- package/out/replicache/src/btree/write.d.ts +7 -7
- package/out/replicache/src/call-default-fetch.d.ts +1 -1
- package/out/replicache/src/config.d.ts +1 -1
- package/out/replicache/src/connection-loop-delegates.d.ts +2 -2
- package/out/replicache/src/connection-loop.d.ts +1 -1
- package/out/replicache/src/cookies.d.ts +2 -2
- package/out/replicache/src/dag/chunk.d.ts +1 -1
- package/out/replicache/src/dag/gc.d.ts +2 -2
- package/out/replicache/src/dag/key.d.ts +2 -2
- package/out/replicache/src/dag/lazy-store.d.ts +5 -5
- package/out/replicache/src/dag/store-impl.d.ts +5 -5
- package/out/replicache/src/dag/store.d.ts +3 -3
- package/out/replicache/src/dag/visitor.d.ts +3 -3
- package/out/replicache/src/db/commit.d.ts +8 -8
- package/out/replicache/src/db/index.d.ts +7 -7
- package/out/replicache/src/db/read.d.ts +8 -8
- package/out/replicache/src/db/rebase.d.ts +7 -7
- package/out/replicache/src/db/scan.d.ts +1 -1
- package/out/replicache/src/db/write.d.ts +14 -14
- package/out/replicache/src/filter-async-iterable.d.ts +1 -1
- package/out/replicache/src/format-version.d.ts +2 -2
- package/out/replicache/src/frozen-json.d.ts +2 -2
- package/out/replicache/src/get-default-puller.d.ts +1 -1
- package/out/replicache/src/get-default-pusher.d.ts +1 -1
- package/out/replicache/src/hash.d.ts +1 -1
- package/out/replicache/src/impl.d.ts +3 -3
- package/out/replicache/src/index-defs.d.ts +1 -1
- package/out/replicache/src/kv/idb-store-with-mem-fallback.d.ts +1 -1
- package/out/replicache/src/kv/idb-store.d.ts +1 -1
- package/out/replicache/src/kv/idb-store.d.ts.map +1 -1
- package/out/replicache/src/kv/mem-store.d.ts +1 -1
- package/out/replicache/src/kv/read-impl.d.ts +2 -2
- package/out/replicache/src/kv/store.d.ts +1 -1
- package/out/replicache/src/kv/write-impl-base.d.ts +3 -3
- package/out/replicache/src/kv/write-impl.d.ts +3 -3
- package/out/replicache/src/merge-async-iterables.d.ts +1 -1
- package/out/replicache/src/mod.d.ts +36 -36
- package/out/replicache/src/mutation-recovery.d.ts +8 -8
- package/out/replicache/src/new-client-channel.d.ts +1 -1
- package/out/replicache/src/on-persist-channel.d.ts +1 -1
- package/out/replicache/src/patch-operation.d.ts +1 -1
- package/out/replicache/src/pending-mutations.d.ts +3 -3
- package/out/replicache/src/persist/client-gc.d.ts +3 -3
- package/out/replicache/src/persist/client-group-gc.d.ts +2 -2
- package/out/replicache/src/persist/client-groups.d.ts +5 -5
- package/out/replicache/src/persist/clients.d.ts +9 -9
- package/out/replicache/src/persist/collect-idb-databases.d.ts +3 -3
- package/out/replicache/src/persist/gather-mem-only-visitor.d.ts +4 -4
- package/out/replicache/src/persist/gather-not-cached-visitor.d.ts +5 -5
- package/out/replicache/src/persist/heartbeat.d.ts +3 -3
- package/out/replicache/src/persist/idb-databases-store.d.ts +1 -1
- package/out/replicache/src/persist/persist.d.ts +6 -6
- package/out/replicache/src/persist/refresh.d.ts +7 -7
- package/out/replicache/src/process-scheduler.d.ts +1 -1
- package/out/replicache/src/puller.d.ts +6 -6
- package/out/replicache/src/pusher.d.ts +3 -3
- package/out/replicache/src/replicache-impl.d.ts +12 -12
- package/out/replicache/src/replicache-options.d.ts +5 -5
- package/out/replicache/src/replicache.d.ts +10 -10
- package/out/replicache/src/scan-iterator.d.ts +6 -6
- package/out/replicache/src/scan-options.d.ts +2 -2
- package/out/replicache/src/subscriptions.d.ts +7 -7
- package/out/replicache/src/subscriptions.d.ts.map +1 -1
- package/out/replicache/src/sync/diff.d.ts +6 -6
- package/out/replicache/src/sync/ids.d.ts +1 -1
- package/out/replicache/src/sync/patch.d.ts +2 -2
- package/out/replicache/src/sync/pull.d.ts +11 -11
- package/out/replicache/src/sync/push.d.ts +4 -4
- package/out/replicache/src/sync/request-id.d.ts +1 -1
- package/out/replicache/src/transactions.d.ts +9 -9
- package/out/replicache/src/types.d.ts +5 -5
- package/out/shared/src/btree-set.js +1 -1
- package/out/shared/src/deep-clone.d.ts +1 -1
- package/out/shared/src/iterables.js +1 -1
- package/out/shared/src/json-schema.d.ts +1 -1
- package/out/shared/src/json-schema.js +3 -3
- package/out/shared/src/json.js +3 -3
- package/out/shared/src/options.d.ts +1 -1
- package/out/shared/src/options.js +3 -3
- package/out/shared/src/queue.js +1 -1
- package/out/shared/src/random-values.d.ts +1 -1
- package/out/shared/src/random-values.d.ts.map +1 -1
- package/out/shared/src/sleep.js +1 -1
- package/out/solid.js +3 -3
- package/out/solid.js.map +1 -1
- package/out/zero/src/advanced.d.ts +1 -1
- package/out/zero/src/build-schema.d.ts +1 -1
- package/out/zero/src/build-schema.js +1 -1
- package/out/zero/src/change-protocol.d.ts +1 -1
- package/out/zero/src/change-protocol.js +1 -1
- package/out/zero/src/cli.d.ts +1 -1
- package/out/zero/src/cli.js +1 -1
- package/out/zero/src/react.d.ts +1 -1
- package/out/zero/src/server/change-streamer.d.ts +1 -1
- package/out/zero/src/server/change-streamer.js +1 -1
- package/out/zero/src/server/main.d.ts +1 -1
- package/out/zero/src/server/main.js +1 -1
- package/out/zero/src/server/multi/main.d.ts +1 -1
- package/out/zero/src/server/multi/main.js +1 -1
- package/out/zero/src/server/replicator.d.ts +1 -1
- package/out/zero/src/server/replicator.js +1 -1
- package/out/zero/src/server/syncer.d.ts +1 -1
- package/out/zero/src/server/syncer.js +1 -1
- package/out/zero/src/solid.d.ts +1 -1
- package/out/zero/src/zero-cache-dev.js +3 -3
- package/out/zero/src/zero.d.ts +1 -1
- package/out/zero-advanced/src/mod.d.ts +8 -8
- package/out/zero-advanced/src/mod.d.ts.map +1 -1
- package/out/zero-cache/src/auth/jwt.d.ts +1 -1
- package/out/zero-cache/src/auth/load-schema.d.ts +3 -3
- package/out/zero-cache/src/auth/load-schema.d.ts.map +1 -1
- package/out/zero-cache/src/auth/load-schema.js +3 -3
- package/out/zero-cache/src/auth/load-schema.js.map +1 -1
- package/out/zero-cache/src/auth/read-authorizer.d.ts +2 -2
- package/out/zero-cache/src/auth/read-authorizer.d.ts.map +1 -1
- package/out/zero-cache/src/auth/read-authorizer.js +3 -3
- package/out/zero-cache/src/auth/read-authorizer.js.map +1 -1
- package/out/zero-cache/src/auth/write-authorizer.d.ts +5 -5
- package/out/zero-cache/src/auth/write-authorizer.js +14 -14
- package/out/zero-cache/src/config/zero-config.d.ts +2 -2
- package/out/zero-cache/src/config/zero-config.js +6 -6
- package/out/zero-cache/src/db/create.d.ts +1 -1
- package/out/zero-cache/src/db/create.js +1 -1
- package/out/zero-cache/src/db/lite-tables.d.ts +2 -2
- package/out/zero-cache/src/db/lite-tables.js +5 -5
- package/out/zero-cache/src/db/migration-lite.d.ts +2 -2
- package/out/zero-cache/src/db/migration-lite.js +4 -4
- package/out/zero-cache/src/db/migration.d.ts +2 -2
- package/out/zero-cache/src/db/migration.js +3 -3
- package/out/zero-cache/src/db/pg-to-lite.d.ts +2 -2
- package/out/zero-cache/src/db/pg-to-lite.js +5 -5
- package/out/zero-cache/src/db/short-lived-client.d.ts +1 -1
- package/out/zero-cache/src/db/short-lived-client.js +1 -1
- package/out/zero-cache/src/db/specs.d.ts +4 -4
- package/out/zero-cache/src/db/specs.js +3 -3
- package/out/zero-cache/src/db/statements.d.ts +2 -2
- package/out/zero-cache/src/db/statements.js +2 -2
- package/out/zero-cache/src/db/transaction-pool.d.ts +4 -4
- package/out/zero-cache/src/db/transaction-pool.js +3 -3
- package/out/zero-cache/src/server/change-streamer.d.ts +1 -1
- package/out/zero-cache/src/server/change-streamer.js +13 -13
- package/out/zero-cache/src/server/logging.d.ts +1 -1
- package/out/zero-cache/src/server/logging.js +2 -2
- package/out/zero-cache/src/server/main.d.ts +1 -1
- package/out/zero-cache/src/server/main.js +13 -13
- package/out/zero-cache/src/server/multi/config.d.ts +2 -2
- package/out/zero-cache/src/server/multi/config.js +3 -3
- package/out/zero-cache/src/server/multi/main.d.ts +1 -1
- package/out/zero-cache/src/server/multi/main.js +8 -8
- package/out/zero-cache/src/server/multi/runtime.js +1 -1
- package/out/zero-cache/src/server/multi/tenant-dispatcher.d.ts +2 -2
- package/out/zero-cache/src/server/multi/tenant-dispatcher.js +2 -2
- package/out/zero-cache/src/server/replicator.d.ts +1 -1
- package/out/zero-cache/src/server/replicator.js +10 -10
- package/out/zero-cache/src/server/syncer.d.ts +1 -1
- package/out/zero-cache/src/server/syncer.js +21 -21
- package/out/zero-cache/src/services/change-source/pg/change-source.d.ts +8 -8
- package/out/zero-cache/src/services/change-source/pg/change-source.js +24 -24
- package/out/zero-cache/src/services/change-source/pg/initial-sync.d.ts +2 -2
- package/out/zero-cache/src/services/change-source/pg/initial-sync.js +15 -15
- package/out/zero-cache/src/services/change-source/pg/lsn.d.ts +2 -2
- package/out/zero-cache/src/services/change-source/pg/lsn.js +2 -2
- package/out/zero-cache/src/services/change-source/pg/schema/ddl.d.ts +1 -1
- package/out/zero-cache/src/services/change-source/pg/schema/ddl.js +3 -3
- package/out/zero-cache/src/services/change-source/pg/schema/init.d.ts +2 -2
- package/out/zero-cache/src/services/change-source/pg/schema/init.js +3 -3
- package/out/zero-cache/src/services/change-source/pg/schema/published.d.ts +1 -1
- package/out/zero-cache/src/services/change-source/pg/schema/published.js +3 -3
- package/out/zero-cache/src/services/change-source/pg/schema/shard.d.ts +4 -4
- package/out/zero-cache/src/services/change-source/pg/schema/shard.js +7 -7
- package/out/zero-cache/src/services/change-source/pg/schema/validation.d.ts +1 -1
- package/out/zero-cache/src/services/change-source/pg/schema/validation.js +4 -4
- package/out/zero-cache/src/services/change-source/pg/sync-schema.d.ts +2 -2
- package/out/zero-cache/src/services/change-source/pg/sync-schema.js +3 -3
- package/out/zero-cache/src/services/change-source/protocol/current/control.d.ts +1 -1
- package/out/zero-cache/src/services/change-source/protocol/current/control.js +1 -1
- package/out/zero-cache/src/services/change-source/protocol/current/data.d.ts +14 -14
- package/out/zero-cache/src/services/change-source/protocol/current/data.js +3 -3
- package/out/zero-cache/src/services/change-source/protocol/current/downstream.d.ts +16 -16
- package/out/zero-cache/src/services/change-source/protocol/current/downstream.js +4 -4
- package/out/zero-cache/src/services/change-source/protocol/current/mod.d.ts +6 -6
- package/out/zero-cache/src/services/change-source/protocol/current/mod.js +6 -6
- package/out/zero-cache/src/services/change-source/protocol/current/status.d.ts +1 -1
- package/out/zero-cache/src/services/change-source/protocol/current/status.js +1 -1
- package/out/zero-cache/src/services/change-source/protocol/current/upstream.d.ts +1 -1
- package/out/zero-cache/src/services/change-source/protocol/current/upstream.js +2 -2
- package/out/zero-cache/src/services/change-source/protocol/mod.d.ts +1 -1
- package/out/zero-cache/src/services/change-source/protocol/mod.js +1 -1
- package/out/zero-cache/src/services/change-streamer/change-streamer-http.d.ts +4 -4
- package/out/zero-cache/src/services/change-streamer/change-streamer-http.js +7 -7
- package/out/zero-cache/src/services/change-streamer/change-streamer-service.d.ts +6 -6
- package/out/zero-cache/src/services/change-streamer/change-streamer-service.js +13 -13
- package/out/zero-cache/src/services/change-streamer/change-streamer.d.ts +10 -10
- package/out/zero-cache/src/services/change-streamer/change-streamer.js +3 -3
- package/out/zero-cache/src/services/change-streamer/forwarder.d.ts +2 -2
- package/out/zero-cache/src/services/change-streamer/forwarder.js +2 -2
- package/out/zero-cache/src/services/change-streamer/schema/init.d.ts +1 -1
- package/out/zero-cache/src/services/change-streamer/schema/init.js +2 -2
- package/out/zero-cache/src/services/change-streamer/schema/tables.d.ts +3 -3
- package/out/zero-cache/src/services/change-streamer/schema/tables.js +2 -2
- package/out/zero-cache/src/services/change-streamer/storer.d.ts +6 -6
- package/out/zero-cache/src/services/change-streamer/storer.js +9 -9
- package/out/zero-cache/src/services/change-streamer/subscriber.d.ts +5 -5
- package/out/zero-cache/src/services/change-streamer/subscriber.js +5 -5
- package/out/zero-cache/src/services/dispatcher/connect-params.d.ts +1 -1
- package/out/zero-cache/src/services/dispatcher/connect-params.js +3 -3
- package/out/zero-cache/src/services/dispatcher/sync-dispatcher.d.ts +2 -2
- package/out/zero-cache/src/services/dispatcher/sync-dispatcher.js +4 -4
- package/out/zero-cache/src/services/dispatcher/websocket-handoff.d.ts +2 -2
- package/out/zero-cache/src/services/dispatcher/websocket-handoff.js +3 -3
- package/out/zero-cache/src/services/http-service.d.ts +1 -1
- package/out/zero-cache/src/services/http-service.js +2 -2
- package/out/zero-cache/src/services/life-cycle.d.ts +2 -2
- package/out/zero-cache/src/services/life-cycle.js +2 -2
- package/out/zero-cache/src/services/limiter/sliding-window-limiter.js +1 -1
- package/out/zero-cache/src/services/litestream/commands.d.ts +1 -1
- package/out/zero-cache/src/services/litestream/commands.js +2 -2
- package/out/zero-cache/src/services/mutagen/mutagen.d.ts +8 -8
- package/out/zero-cache/src/services/mutagen/mutagen.d.ts.map +1 -1
- package/out/zero-cache/src/services/mutagen/mutagen.js +14 -14
- package/out/zero-cache/src/services/replicator/change-processor.d.ts +23 -0
- package/out/zero-cache/src/services/replicator/change-processor.d.ts.map +1 -0
- package/out/zero-cache/src/services/replicator/change-processor.js +415 -0
- package/out/zero-cache/src/services/replicator/change-processor.js.map +1 -0
- package/out/zero-cache/src/services/replicator/incremental-sync.d.ts +5 -27
- package/out/zero-cache/src/services/replicator/incremental-sync.d.ts.map +1 -1
- package/out/zero-cache/src/services/replicator/incremental-sync.js +9 -421
- package/out/zero-cache/src/services/replicator/incremental-sync.js.map +1 -1
- package/out/zero-cache/src/services/replicator/notifier.d.ts +2 -2
- package/out/zero-cache/src/services/replicator/notifier.js +1 -1
- package/out/zero-cache/src/services/replicator/replicator.d.ts +5 -5
- package/out/zero-cache/src/services/replicator/replicator.js +3 -3
- package/out/zero-cache/src/services/replicator/schema/change-log.d.ts +6 -6
- package/out/zero-cache/src/services/replicator/schema/change-log.js +4 -4
- package/out/zero-cache/src/services/replicator/schema/replication-state.d.ts +3 -3
- package/out/zero-cache/src/services/replicator/schema/replication-state.js +3 -3
- package/out/zero-cache/src/services/runner.d.ts +1 -1
- package/out/zero-cache/src/services/running-state.d.ts +1 -1
- package/out/zero-cache/src/services/running-state.js +2 -2
- package/out/zero-cache/src/services/view-syncer/client-handler.d.ts +7 -7
- package/out/zero-cache/src/services/view-syncer/client-handler.js +9 -9
- package/out/zero-cache/src/services/view-syncer/cvr-store.d.ts +6 -6
- package/out/zero-cache/src/services/view-syncer/cvr-store.js +17 -17
- package/out/zero-cache/src/services/view-syncer/cvr.d.ts +6 -6
- package/out/zero-cache/src/services/view-syncer/cvr.js +8 -8
- package/out/zero-cache/src/services/view-syncer/database-storage.d.ts +2 -2
- package/out/zero-cache/src/services/view-syncer/database-storage.js +1 -1
- package/out/zero-cache/src/services/view-syncer/drain-coordinator.js +1 -1
- package/out/zero-cache/src/services/view-syncer/key-columns.d.ts +2 -2
- package/out/zero-cache/src/services/view-syncer/key-columns.js +3 -3
- package/out/zero-cache/src/services/view-syncer/pipeline-driver.d.ts +6 -6
- package/out/zero-cache/src/services/view-syncer/pipeline-driver.js +8 -8
- package/out/zero-cache/src/services/view-syncer/schema/cvr.d.ts +2 -2
- package/out/zero-cache/src/services/view-syncer/schema/cvr.js +4 -4
- package/out/zero-cache/src/services/view-syncer/schema/init.d.ts +1 -1
- package/out/zero-cache/src/services/view-syncer/schema/init.js +2 -2
- package/out/zero-cache/src/services/view-syncer/schema/types.d.ts +12 -12
- package/out/zero-cache/src/services/view-syncer/schema/types.js +4 -4
- package/out/zero-cache/src/services/view-syncer/snapshotter.d.ts +5 -5
- package/out/zero-cache/src/services/view-syncer/snapshotter.js +12 -12
- package/out/zero-cache/src/services/view-syncer/view-syncer.d.ts +9 -9
- package/out/zero-cache/src/services/view-syncer/view-syncer.js +20 -20
- package/out/zero-cache/src/types/bigint-json.d.ts +1 -1
- package/out/zero-cache/src/types/bigint-json.js +1 -1
- package/out/zero-cache/src/types/error-for-client.d.ts +1 -1
- package/out/zero-cache/src/types/lexi-version.js +2 -2
- package/out/zero-cache/src/types/lite.d.ts +4 -4
- package/out/zero-cache/src/types/lite.js +2 -2
- package/out/zero-cache/src/types/pg.d.ts +3 -3
- package/out/zero-cache/src/types/pg.js +2 -2
- package/out/zero-cache/src/types/row-key.d.ts +1 -1
- package/out/zero-cache/src/types/row-key.js +3 -3
- package/out/zero-cache/src/types/schema-versions.d.ts +1 -1
- package/out/zero-cache/src/types/schema-versions.js +2 -2
- package/out/zero-cache/src/types/streams.d.ts +2 -2
- package/out/zero-cache/src/types/streams.js +4 -4
- package/out/zero-cache/src/types/subscription.d.ts +1 -1
- package/out/zero-cache/src/types/timeout.js +1 -1
- package/out/zero-cache/src/workers/connection.d.ts +5 -5
- package/out/zero-cache/src/workers/connection.js +9 -9
- package/out/zero-cache/src/workers/replicator.d.ts +5 -5
- package/out/zero-cache/src/workers/replicator.js +4 -4
- package/out/zero-cache/src/workers/syncer.d.ts +8 -8
- package/out/zero-cache/src/workers/syncer.js +10 -10
- package/out/zero-client/src/client/context.d.ts +6 -6
- package/out/zero-client/src/client/crud.d.ts +6 -6
- package/out/zero-client/src/client/crud.d.ts.map +1 -1
- package/out/zero-client/src/client/keys.d.ts +2 -2
- package/out/zero-client/src/client/log-options.d.ts +2 -2
- package/out/zero-client/src/client/log-options.d.ts.map +1 -1
- package/out/zero-client/src/client/metrics.d.ts +2 -2
- package/out/zero-client/src/client/options.d.ts +3 -3
- package/out/zero-client/src/client/query-manager.d.ts +6 -6
- package/out/zero-client/src/client/reload-error-handler.d.ts +1 -1
- package/out/zero-client/src/client/replicache-types.d.ts +1 -1
- package/out/zero-client/src/client/server-error.d.ts +2 -2
- package/out/zero-client/src/client/server-option.d.ts +1 -1
- package/out/zero-client/src/client/zero-poke-handler.d.ts +4 -4
- package/out/zero-client/src/client/zero-poke-handler.d.ts.map +1 -1
- package/out/zero-client/src/client/zero.d.ts +12 -12
- package/out/zero-client/src/mod.d.ts +17 -17
- package/out/zero-client/src/mod.d.ts.map +1 -1
- package/out/zero-client/src/util/socket.d.ts +1 -1
- package/out/zero-protocol/src/ast-hash.d.ts +1 -1
- package/out/zero-protocol/src/ast-hash.js +2 -2
- package/out/zero-protocol/src/ast.d.ts +2 -2
- package/out/zero-protocol/src/ast.js +5 -5
- package/out/zero-protocol/src/change-desired-queries.d.ts +3 -3
- package/out/zero-protocol/src/change-desired-queries.js +2 -2
- package/out/zero-protocol/src/clients-patch.d.ts +1 -1
- package/out/zero-protocol/src/clients-patch.js +1 -1
- package/out/zero-protocol/src/connect.d.ts +3 -3
- package/out/zero-protocol/src/connect.js +2 -2
- package/out/zero-protocol/src/data.d.ts +3 -3
- package/out/zero-protocol/src/data.js +2 -2
- package/out/zero-protocol/src/delete-clients.d.ts +1 -1
- package/out/zero-protocol/src/delete-clients.js +1 -1
- package/out/zero-protocol/src/down.d.ts +6 -6
- package/out/zero-protocol/src/down.js +7 -7
- package/out/zero-protocol/src/error.d.ts +1 -1
- package/out/zero-protocol/src/error.js +2 -2
- package/out/zero-protocol/src/mod.d.ts +14 -14
- package/out/zero-protocol/src/mod.js +14 -14
- package/out/zero-protocol/src/ping.d.ts +1 -1
- package/out/zero-protocol/src/ping.js +1 -1
- package/out/zero-protocol/src/poke.d.ts +9 -9
- package/out/zero-protocol/src/poke.js +5 -5
- package/out/zero-protocol/src/pong.d.ts +1 -1
- package/out/zero-protocol/src/pong.js +1 -1
- package/out/zero-protocol/src/primary-key.d.ts +1 -1
- package/out/zero-protocol/src/primary-key.js +1 -1
- package/out/zero-protocol/src/protocol-version.js +1 -1
- package/out/zero-protocol/src/pull.d.ts +1 -1
- package/out/zero-protocol/src/pull.js +2 -2
- package/out/zero-protocol/src/push.d.ts +26 -26
- package/out/zero-protocol/src/push.js +5 -5
- package/out/zero-protocol/src/queries-patch.d.ts +4 -4
- package/out/zero-protocol/src/queries-patch.js +2 -2
- package/out/zero-protocol/src/row-patch.d.ts +5 -5
- package/out/zero-protocol/src/row-patch.js +4 -4
- package/out/zero-protocol/src/up.d.ts +7 -7
- package/out/zero-protocol/src/up.js +7 -7
- package/out/zero-protocol/src/up.js.map +1 -1
- package/out/zero-protocol/src/version.d.ts +1 -1
- package/out/zero-protocol/src/version.js +1 -1
- package/out/zero-protocol/src/warm.d.ts +1 -1
- package/out/zero-protocol/src/warm.js +1 -1
- package/out/zero-react/src/mod.d.ts +8 -8
- package/out/zero-react/src/use-query.d.ts +4 -4
- package/out/zero-react/src/use-zero.d.ts +2 -2
- package/out/zero-schema/src/build-schema-options.d.ts +1 -1
- package/out/zero-schema/src/build-schema-options.js +1 -1
- package/out/zero-schema/src/build-schema.js +5 -5
- package/out/zero-schema/src/build-schema.js.map +1 -1
- package/out/zero-schema/src/builder/relationship-builder.d.ts +2 -2
- package/out/zero-schema/src/builder/schema-builder.d.ts +3 -3
- package/out/zero-schema/src/builder/schema-builder.js +1 -1
- package/out/zero-schema/src/builder/table-builder.d.ts +3 -3
- package/out/zero-schema/src/compiled-permissions.d.ts +18 -18
- package/out/zero-schema/src/compiled-permissions.js +2 -2
- package/out/zero-schema/src/mod.d.ts +4 -4
- package/out/zero-schema/src/mod.d.ts.map +1 -1
- package/out/zero-schema/src/permissions.d.ts +5 -5
- package/out/zero-schema/src/schema-config.d.ts +4 -4
- package/out/zero-schema/src/schema-config.d.ts.map +1 -1
- package/out/zero-schema/src/schema-config.js +4 -4
- package/out/zero-schema/src/schema-config.js.map +1 -1
- package/out/zero-schema/src/table-schema.d.ts +1 -1
- package/out/zero-solid/src/create-zero.d.ts +2 -2
- package/out/zero-solid/src/create-zero.d.ts.map +1 -1
- package/out/zero-solid/src/mod.d.ts +2 -2
- package/out/zero-solid/src/solid-view.d.ts +3 -3
- package/out/zero-solid/src/use-query.d.ts +3 -3
- package/out/zero-solid/src/use-query.d.ts.map +1 -1
- package/out/zero.js +3 -3
- package/out/zql/src/builder/builder.d.ts +7 -7
- package/out/zql/src/builder/builder.js +10 -10
- package/out/zql/src/builder/filter.d.ts +2 -2
- package/out/zql/src/builder/filter.js +2 -2
- package/out/zql/src/builder/like.d.ts +1 -1
- package/out/zql/src/builder/like.js +1 -1
- package/out/zql/src/ivm/array-view.d.ts +4 -4
- package/out/zql/src/ivm/array-view.js +2 -2
- package/out/zql/src/ivm/change.d.ts +2 -2
- package/out/zql/src/ivm/constraint.d.ts +2 -2
- package/out/zql/src/ivm/constraint.js +3 -3
- package/out/zql/src/ivm/data.d.ts +3 -3
- package/out/zql/src/ivm/data.js +1 -1
- package/out/zql/src/ivm/exists.d.ts +6 -6
- package/out/zql/src/ivm/exists.js +7 -7
- package/out/zql/src/ivm/fan-in.d.ts +6 -6
- package/out/zql/src/ivm/fan-in.js +4 -4
- package/out/zql/src/ivm/fan-out.d.ts +5 -5
- package/out/zql/src/ivm/filter-push.d.ts +3 -3
- package/out/zql/src/ivm/filter-push.d.ts.map +1 -1
- package/out/zql/src/ivm/filter-push.js +2 -2
- package/out/zql/src/ivm/filter-push.js.map +1 -1
- package/out/zql/src/ivm/filter.d.ts +5 -5
- package/out/zql/src/ivm/filter.js +2 -2
- package/out/zql/src/ivm/join.d.ts +7 -7
- package/out/zql/src/ivm/join.js +4 -4
- package/out/zql/src/ivm/maybe-split-and-push-edit-change.d.ts +3 -3
- package/out/zql/src/ivm/memory-source.d.ts +11 -11
- package/out/zql/src/ivm/memory-source.js +9 -9
- package/out/zql/src/ivm/memory-storage.d.ts +3 -3
- package/out/zql/src/ivm/operator.d.ts +7 -7
- package/out/zql/src/ivm/operator.js +1 -1
- package/out/zql/src/ivm/schema.d.ts +4 -4
- package/out/zql/src/ivm/skip.d.ts +6 -6
- package/out/zql/src/ivm/skip.js +2 -2
- package/out/zql/src/ivm/source.d.ts +3 -3
- package/out/zql/src/ivm/take.d.ts +6 -6
- package/out/zql/src/ivm/take.js +8 -8
- package/out/zql/src/ivm/view-apply-change.d.ts +3 -3
- package/out/zql/src/ivm/view-apply-change.js +2 -2
- package/out/zql/src/ivm/view.d.ts +4 -4
- package/out/zql/src/query/auth-query.d.ts +7 -7
- package/out/zql/src/query/auth-query.js +2 -2
- package/out/zql/src/query/dnf.d.ts +1 -1
- package/out/zql/src/query/dnf.js +2 -2
- package/out/zql/src/query/expression.d.ts +3 -4
- package/out/zql/src/query/expression.d.ts.map +1 -1
- package/out/zql/src/query/expression.js +2 -2
- package/out/zql/src/query/query-impl.d.ts +8 -8
- package/out/zql/src/query/query-impl.d.ts.map +1 -1
- package/out/zql/src/query/query-impl.js +7 -7
- package/out/zql/src/query/query-impl.js.map +1 -1
- package/out/zql/src/query/query-internal.d.ts +4 -4
- package/out/zql/src/query/query.d.ts +7 -10
- package/out/zql/src/query/query.d.ts.map +1 -1
- package/out/zql/src/query/typed-view.d.ts +1 -1
- package/out/zqlite/src/db.js +2 -2
- package/out/zqlite/src/internal/statement-cache.d.ts +1 -1
- package/out/zqlite/src/internal/statement-cache.d.ts.map +1 -1
- package/out/zqlite/src/internal/statement-cache.js +1 -1
- package/out/zqlite/src/internal/statement-cache.js.map +1 -1
- package/out/zqlite/src/table-source.d.ts +6 -6
- package/out/zqlite/src/table-source.js +11 -11
- package/package.json +4 -4
- /package/out/{chunk-F5QR3K72.js.map → chunk-424PT5DM.js.map} +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { LogContext } from '@rocicorp/logger';
|
|
2
|
-
import { type JSONObject as SafeJSONObject } from '../../../../shared/src/json.
|
|
3
|
-
import type { AST } from '../../../../zero-protocol/src/ast.
|
|
4
|
-
import type { Downstream } from '../../../../zero-protocol/src/mod.
|
|
5
|
-
import type { JSONObject } from '../../types/bigint-json.
|
|
6
|
-
import { type SchemaVersions } from '../../types/schema-versions.
|
|
7
|
-
import type { Subscription } from '../../types/subscription.
|
|
8
|
-
import { type ClientPatch, type CVRVersion, type DelQueryPatch, type NullableCVRVersion, type PutQueryPatch, type RowID } from './schema/types.
|
|
2
|
+
import { type JSONObject as SafeJSONObject } from '../../../../shared/src/json.ts';
|
|
3
|
+
import type { AST } from '../../../../zero-protocol/src/ast.ts';
|
|
4
|
+
import type { Downstream } from '../../../../zero-protocol/src/mod.ts';
|
|
5
|
+
import type { JSONObject } from '../../types/bigint-json.ts';
|
|
6
|
+
import { type SchemaVersions } from '../../types/schema-versions.ts';
|
|
7
|
+
import type { Subscription } from '../../types/subscription.ts';
|
|
8
|
+
import { type ClientPatch, type CVRVersion, type DelQueryPatch, type NullableCVRVersion, type PutQueryPatch, type RowID } from './schema/types.ts';
|
|
9
9
|
export type PutRowPatch = {
|
|
10
10
|
type: 'row';
|
|
11
11
|
op: 'put';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { unreachable } from
|
|
2
|
-
import { assertJSONValue, } from
|
|
3
|
-
import * as v from
|
|
4
|
-
import { rowSchema } from
|
|
5
|
-
import { primaryKeyValueRecordSchema } from
|
|
6
|
-
import { getLogLevel } from
|
|
7
|
-
import { getErrorForClientIfSchemaVersionNotSupported, } from
|
|
8
|
-
import { unescapedSchema as schema } from
|
|
9
|
-
import { cmpVersions, cookieToVersion, versionToCookie, versionToNullableCookie, } from
|
|
1
|
+
import { unreachable } from "../../../../shared/src/asserts.js";
|
|
2
|
+
import { assertJSONValue, } from "../../../../shared/src/json.js";
|
|
3
|
+
import * as v from "../../../../shared/src/valita.js";
|
|
4
|
+
import { rowSchema } from "../../../../zero-protocol/src/data.js";
|
|
5
|
+
import { primaryKeyValueRecordSchema } from "../../../../zero-protocol/src/primary-key.js";
|
|
6
|
+
import { getLogLevel } from "../../types/error-for-client.js";
|
|
7
|
+
import { getErrorForClientIfSchemaVersionNotSupported, } from "../../types/schema-versions.js";
|
|
8
|
+
import { unescapedSchema as schema } from "../change-source/pg/schema/shard.js";
|
|
9
|
+
import { cmpVersions, cookieToVersion, versionToCookie, versionToNullableCookie, } from "./schema/types.js";
|
|
10
10
|
const NOOP = {
|
|
11
11
|
addPatch: () => { },
|
|
12
12
|
cancel: () => { },
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { LogContext } from '@rocicorp/logger';
|
|
2
|
-
import { ErrorWithLevel } from '../../types/error-for-client.
|
|
3
|
-
import type { PostgresDB } from '../../types/pg.
|
|
4
|
-
import type { PatchToVersion } from './client-handler.
|
|
5
|
-
import type { CVR, CVRSnapshot } from './cvr.
|
|
6
|
-
import { type RowsRow } from './schema/cvr.
|
|
7
|
-
import { type ClientRecord, type CVRVersion, type NullableCVRVersion, type QueryPatch, type QueryRecord, type RowID, type RowRecord } from './schema/types.
|
|
2
|
+
import { ErrorWithLevel } from '../../types/error-for-client.ts';
|
|
3
|
+
import type { PostgresDB } from '../../types/pg.ts';
|
|
4
|
+
import type { PatchToVersion } from './client-handler.ts';
|
|
5
|
+
import type { CVR, CVRSnapshot } from './cvr.ts';
|
|
6
|
+
import { type RowsRow } from './schema/cvr.ts';
|
|
7
|
+
import { type ClientRecord, type CVRVersion, type NullableCVRVersion, type QueryPatch, type QueryRecord, type RowID, type RowRecord } from './schema/types.ts';
|
|
8
8
|
export type CVRFlushStats = {
|
|
9
9
|
instances: number;
|
|
10
10
|
queries: number;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { trace } from '@opentelemetry/api';
|
|
2
2
|
import { resolver } from '@rocicorp/resolver';
|
|
3
|
-
import { startAsyncSpan } from
|
|
4
|
-
import { version } from
|
|
5
|
-
import { assert } from
|
|
6
|
-
import { CustomKeyMap } from
|
|
7
|
-
import { CustomKeySet } from
|
|
8
|
-
import { deepEqual, } from
|
|
9
|
-
import { must } from
|
|
10
|
-
import { promiseVoid } from
|
|
11
|
-
import { sleep } from
|
|
12
|
-
import { astSchema } from
|
|
13
|
-
import * as ErrorKind from
|
|
14
|
-
import * as Mode from
|
|
15
|
-
import { TransactionPool } from
|
|
16
|
-
import { ErrorForClient, ErrorWithLevel } from
|
|
17
|
-
import { rowIDString } from
|
|
18
|
-
import { rowRecordToRowsRow, rowsRowToRowRecord, } from
|
|
19
|
-
import { cmpVersions, EMPTY_CVR_VERSION, versionFromString, versionString, versionToNullableCookie, } from
|
|
3
|
+
import { startAsyncSpan } from "../../../../otel/src/span.js";
|
|
4
|
+
import { version } from "../../../../otel/src/version.js";
|
|
5
|
+
import { assert } from "../../../../shared/src/asserts.js";
|
|
6
|
+
import { CustomKeyMap } from "../../../../shared/src/custom-key-map.js";
|
|
7
|
+
import { CustomKeySet } from "../../../../shared/src/custom-key-set.js";
|
|
8
|
+
import { deepEqual, } from "../../../../shared/src/json.js";
|
|
9
|
+
import { must } from "../../../../shared/src/must.js";
|
|
10
|
+
import { promiseVoid } from "../../../../shared/src/resolved-promises.js";
|
|
11
|
+
import { sleep } from "../../../../shared/src/sleep.js";
|
|
12
|
+
import { astSchema } from "../../../../zero-protocol/src/ast.js";
|
|
13
|
+
import * as ErrorKind from "../../../../zero-protocol/src/error-kind-enum.js";
|
|
14
|
+
import * as Mode from "../../db/mode-enum.js";
|
|
15
|
+
import { TransactionPool } from "../../db/transaction-pool.js";
|
|
16
|
+
import { ErrorForClient, ErrorWithLevel } from "../../types/error-for-client.js";
|
|
17
|
+
import { rowIDString } from "../../types/row-key.js";
|
|
18
|
+
import { rowRecordToRowsRow, rowsRowToRowRecord, } from "./schema/cvr.js";
|
|
19
|
+
import { cmpVersions, EMPTY_CVR_VERSION, versionFromString, versionString, versionToNullableCookie, } from "./schema/types.js";
|
|
20
20
|
const tracer = trace.getTracer('cvr-store', version);
|
|
21
21
|
/**
|
|
22
22
|
* The RowRecordCache is an in-memory cache of the `cvr.rows` tables that
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { LogContext } from '@rocicorp/logger';
|
|
2
|
-
import type { AST } from '../../../../zero-protocol/src/ast.
|
|
3
|
-
import { type JSONObject } from '../../types/bigint-json.
|
|
4
|
-
import type { LexiVersion } from '../../types/lexi-version.
|
|
5
|
-
import type { PatchToVersion } from './client-handler.
|
|
6
|
-
import type { CVRFlushStats, CVRStore } from './cvr-store.
|
|
7
|
-
import { type CVRVersion, type ClientRecord, type QueryRecord, type RowID } from './schema/types.
|
|
2
|
+
import type { AST } from '../../../../zero-protocol/src/ast.ts';
|
|
3
|
+
import { type JSONObject } from '../../types/bigint-json.ts';
|
|
4
|
+
import type { LexiVersion } from '../../types/lexi-version.ts';
|
|
5
|
+
import type { PatchToVersion } from './client-handler.ts';
|
|
6
|
+
import type { CVRFlushStats, CVRStore } from './cvr-store.ts';
|
|
7
|
+
import { type CVRVersion, type ClientRecord, type QueryRecord, type RowID } from './schema/types.ts';
|
|
8
8
|
export type RowUpdate = {
|
|
9
9
|
version?: string;
|
|
10
10
|
contents?: JSONObject;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { compareUTF8 } from 'compare-utf8';
|
|
2
|
-
import { assert } from
|
|
3
|
-
import { CustomKeyMap } from
|
|
4
|
-
import { difference, intersection, union, } from
|
|
5
|
-
import { stringify } from
|
|
6
|
-
import { rowIDString } from
|
|
7
|
-
import { unescapedSchema as schema } from
|
|
8
|
-
import { KeyColumns } from
|
|
9
|
-
import { cmpVersions, oneAfter, versionString, } from
|
|
2
|
+
import { assert } from "../../../../shared/src/asserts.js";
|
|
3
|
+
import { CustomKeyMap } from "../../../../shared/src/custom-key-map.js";
|
|
4
|
+
import { difference, intersection, union, } from "../../../../shared/src/set-utils.js";
|
|
5
|
+
import { stringify } from "../../types/bigint-json.js";
|
|
6
|
+
import { rowIDString } from "../../types/row-key.js";
|
|
7
|
+
import { unescapedSchema as schema } from "../change-source/pg/schema/shard.js";
|
|
8
|
+
import { KeyColumns } from "./key-columns.js";
|
|
9
|
+
import { cmpVersions, oneAfter, versionString, } from "./schema/types.js";
|
|
10
10
|
const CLIENT_LMID_QUERY_ID = 'lmids';
|
|
11
11
|
function assertNotInternal(query) {
|
|
12
12
|
if (query.internal) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LogContext } from '@rocicorp/logger';
|
|
2
|
-
import type { Storage } from '../../../../zql/src/ivm/operator.
|
|
3
|
-
import { Database } from '../../../../zqlite/src/db.
|
|
2
|
+
import type { Storage } from '../../../../zql/src/ivm/operator.ts';
|
|
3
|
+
import { Database } from '../../../../zqlite/src/db.ts';
|
|
4
4
|
export interface ClientGroupStorage {
|
|
5
5
|
/** Creates a {@link Storage} instance for a single operator. */
|
|
6
6
|
createStorage(): Storage;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LogContext } from '@rocicorp/logger';
|
|
2
|
-
import { Database, Statement } from
|
|
2
|
+
import { Database, Statement } from "../../../../zqlite/src/db.js";
|
|
3
3
|
// Exported for testing.
|
|
4
4
|
export const CREATE_STORAGE_TABLE = `
|
|
5
5
|
CREATE TABLE storage (
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { resolver } from '@rocicorp/resolver';
|
|
2
|
-
import { assert } from
|
|
2
|
+
import { assert } from "../../../../shared/src/asserts.js";
|
|
3
3
|
// The target (additional) utilization to impose on the server
|
|
4
4
|
// that receives the drained connections.
|
|
5
5
|
const TARGET_UTILIZATION = 0.6;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { JSONObject } from '../../types/bigint-json.
|
|
2
|
-
import type { RowID, RowRecord } from './schema/types.
|
|
1
|
+
import type { JSONObject } from '../../types/bigint-json.ts';
|
|
2
|
+
import type { RowID, RowRecord } from './schema/types.ts';
|
|
3
3
|
/**
|
|
4
4
|
* KeyColumns track the key columns used to reference rows in the CVR.
|
|
5
5
|
* This is then used to potentially compute a backwards compatible row
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { deepEqual } from
|
|
2
|
-
import * as ErrorKind from
|
|
3
|
-
import { ErrorForClient } from
|
|
1
|
+
import { deepEqual } from "../../../../shared/src/json.js";
|
|
2
|
+
import * as ErrorKind from "../../../../zero-protocol/src/error-kind-enum.js";
|
|
3
|
+
import { ErrorForClient } from "../../types/error-for-client.js";
|
|
4
4
|
/**
|
|
5
5
|
* KeyColumns track the key columns used to reference rows in the CVR.
|
|
6
6
|
* This is then used to potentially compute a backwards compatible row
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { LogContext } from '@rocicorp/logger';
|
|
2
|
-
import type { AST } from '../../../../zero-protocol/src/ast.
|
|
3
|
-
import type { Row } from '../../../../zero-protocol/src/data.
|
|
4
|
-
import type { RowKey } from '../../types/row-key.
|
|
5
|
-
import type { SchemaVersions } from '../../types/schema-versions.
|
|
6
|
-
import type { ClientGroupStorage } from './database-storage.
|
|
7
|
-
import { Snapshotter } from './snapshotter.
|
|
2
|
+
import type { AST } from '../../../../zero-protocol/src/ast.ts';
|
|
3
|
+
import type { Row } from '../../../../zero-protocol/src/data.ts';
|
|
4
|
+
import type { RowKey } from '../../types/row-key.ts';
|
|
5
|
+
import type { SchemaVersions } from '../../types/schema-versions.ts';
|
|
6
|
+
import type { ClientGroupStorage } from './database-storage.ts';
|
|
7
|
+
import { Snapshotter } from './snapshotter.ts';
|
|
8
8
|
export type RowAdd = {
|
|
9
9
|
readonly type: 'add';
|
|
10
10
|
readonly queryHash: string;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { LogContext } from '@rocicorp/logger';
|
|
2
|
-
import { assert, unreachable } from
|
|
3
|
-
import { must } from
|
|
4
|
-
import { buildPipeline } from
|
|
5
|
-
import { runtimeDebugFlags, runtimeDebugStats, } from
|
|
6
|
-
import { TableSource } from
|
|
7
|
-
import { computeZqlSpecs } from
|
|
8
|
-
import { getSubscriptionState } from
|
|
9
|
-
import { Snapshotter } from
|
|
2
|
+
import { assert, unreachable } from "../../../../shared/src/asserts.js";
|
|
3
|
+
import { must } from "../../../../shared/src/must.js";
|
|
4
|
+
import { buildPipeline } from "../../../../zql/src/builder/builder.js";
|
|
5
|
+
import { runtimeDebugFlags, runtimeDebugStats, } from "../../../../zqlite/src/runtime-debug.js";
|
|
6
|
+
import { TableSource } from "../../../../zqlite/src/table-source.js";
|
|
7
|
+
import { computeZqlSpecs } from "../../db/lite-tables.js";
|
|
8
|
+
import { getSubscriptionState } from "../replicator/schema/replication-state.js";
|
|
9
|
+
import { Snapshotter } from "./snapshotter.js";
|
|
10
10
|
/**
|
|
11
11
|
* Manages the state of IVM pipelines for a given ViewSyncer (i.e. client group).
|
|
12
12
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { LogContext } from '@rocicorp/logger';
|
|
2
2
|
import type postgres from 'postgres';
|
|
3
|
-
import { type JSONObject, type JSONValue } from '../../../types/bigint-json.
|
|
4
|
-
import { type RowID, type RowRecord } from './types.
|
|
3
|
+
import { type JSONObject, type JSONValue } from '../../../types/bigint-json.ts';
|
|
4
|
+
import { type RowID, type RowRecord } from './types.ts';
|
|
5
5
|
export declare const PG_SCHEMA = "cvr";
|
|
6
6
|
export type InstancesRow = {
|
|
7
7
|
clientGroupID: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { stringCompare } from
|
|
2
|
-
import { stringify, } from
|
|
3
|
-
import { normalizedKeyOrder } from
|
|
4
|
-
import { versionFromString, versionString, } from
|
|
1
|
+
import { stringCompare } from "../../../../../shared/src/string-compare.js";
|
|
2
|
+
import { stringify, } from "../../../types/bigint-json.js";
|
|
3
|
+
import { normalizedKeyOrder } from "../../../types/row-key.js";
|
|
4
|
+
import { versionFromString, versionString, } from "./types.js";
|
|
5
5
|
export const PG_SCHEMA = 'cvr';
|
|
6
6
|
const CREATE_CVR_SCHEMA = `CREATE SCHEMA IF NOT EXISTS cvr;`;
|
|
7
7
|
const CREATE_CVR_INSTANCES_TABLE = `
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { LogContext } from '@rocicorp/logger';
|
|
2
|
-
import type { PostgresDB } from '../../../types/pg.
|
|
2
|
+
import type { PostgresDB } from '../../../types/pg.ts';
|
|
3
3
|
export declare function initViewSyncerSchema(log: LogContext, db: PostgresDB): Promise<void>;
|
|
4
4
|
//# sourceMappingURL=init.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { runSchemaMigrations, } from
|
|
2
|
-
import { CREATE_CVR_ROWS_VERSION_TABLE, PG_SCHEMA, setupCVRTables, } from
|
|
1
|
+
import { runSchemaMigrations, } from "../../../db/migration.js";
|
|
2
|
+
import { CREATE_CVR_ROWS_VERSION_TABLE, PG_SCHEMA, setupCVRTables, } from "./cvr.js";
|
|
3
3
|
const setupMigration = {
|
|
4
4
|
migrateSchema: setupCVRTables,
|
|
5
5
|
minSafeVersion: 1,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as v from '../../../../../shared/src/valita.
|
|
1
|
+
import * as v from '../../../../../shared/src/valita.ts';
|
|
2
2
|
export declare const cvrVersionSchema: v.ObjectType<{
|
|
3
3
|
/**
|
|
4
4
|
* The database `stateVersion` with which the rows in the CVR are consistent.
|
|
@@ -82,7 +82,7 @@ export declare const baseQueryRecordSchema: v.ObjectType<{
|
|
|
82
82
|
/** The client-specified ID used to identify this query. Typically a hash. */
|
|
83
83
|
id: v.Type<string>;
|
|
84
84
|
/** The original AST as supplied by the client. */
|
|
85
|
-
ast: v.Type<import("../../../../../zero-protocol/src/ast.
|
|
85
|
+
ast: v.Type<import("../../../../../zero-protocol/src/ast.ts").AST>;
|
|
86
86
|
/**
|
|
87
87
|
* The hash of the query after server-side transformations, which include:
|
|
88
88
|
*
|
|
@@ -130,7 +130,7 @@ export declare const internalQueryRecordSchema: v.ObjectType<Omit<{
|
|
|
130
130
|
/** The client-specified ID used to identify this query. Typically a hash. */
|
|
131
131
|
id: v.Type<string>;
|
|
132
132
|
/** The original AST as supplied by the client. */
|
|
133
|
-
ast: v.Type<import("../../../../../zero-protocol/src/ast.
|
|
133
|
+
ast: v.Type<import("../../../../../zero-protocol/src/ast.ts").AST>;
|
|
134
134
|
/**
|
|
135
135
|
* The hash of the query after server-side transformations, which include:
|
|
136
136
|
*
|
|
@@ -175,7 +175,7 @@ export declare const clientQueryRecordSchema: v.ObjectType<Omit<{
|
|
|
175
175
|
/** The client-specified ID used to identify this query. Typically a hash. */
|
|
176
176
|
id: v.Type<string>;
|
|
177
177
|
/** The original AST as supplied by the client. */
|
|
178
|
-
ast: v.Type<import("../../../../../zero-protocol/src/ast.
|
|
178
|
+
ast: v.Type<import("../../../../../zero-protocol/src/ast.ts").AST>;
|
|
179
179
|
/**
|
|
180
180
|
* The hash of the query after server-side transformations, which include:
|
|
181
181
|
*
|
|
@@ -228,7 +228,7 @@ export declare const queryRecordSchema: v.UnionType<[v.ObjectType<Omit<{
|
|
|
228
228
|
/** The client-specified ID used to identify this query. Typically a hash. */
|
|
229
229
|
id: v.Type<string>;
|
|
230
230
|
/** The original AST as supplied by the client. */
|
|
231
|
-
ast: v.Type<import("../../../../../zero-protocol/src/ast.
|
|
231
|
+
ast: v.Type<import("../../../../../zero-protocol/src/ast.ts").AST>;
|
|
232
232
|
/**
|
|
233
233
|
* The hash of the query after server-side transformations, which include:
|
|
234
234
|
*
|
|
@@ -279,7 +279,7 @@ export declare const queryRecordSchema: v.UnionType<[v.ObjectType<Omit<{
|
|
|
279
279
|
/** The client-specified ID used to identify this query. Typically a hash. */
|
|
280
280
|
id: v.Type<string>;
|
|
281
281
|
/** The original AST as supplied by the client. */
|
|
282
|
-
ast: v.Type<import("../../../../../zero-protocol/src/ast.
|
|
282
|
+
ast: v.Type<import("../../../../../zero-protocol/src/ast.ts").AST>;
|
|
283
283
|
/**
|
|
284
284
|
* The hash of the query after server-side transformations, which include:
|
|
285
285
|
*
|
|
@@ -323,7 +323,7 @@ export type QueryRecord = v.Infer<typeof queryRecordSchema>;
|
|
|
323
323
|
export declare const rowIDSchema: v.ObjectType<{
|
|
324
324
|
schema: v.Type<string>;
|
|
325
325
|
table: v.Type<string>;
|
|
326
|
-
rowKey: v.Type<Record<string, import("../../../types/bigint-json.
|
|
326
|
+
rowKey: v.Type<Record<string, import("../../../types/bigint-json.ts").JSONValue>>;
|
|
327
327
|
}, undefined>;
|
|
328
328
|
export type RowID = v.Infer<typeof rowIDSchema>;
|
|
329
329
|
export declare const rowRecordSchema: v.ObjectType<Omit<{
|
|
@@ -366,7 +366,7 @@ export declare const rowRecordSchema: v.ObjectType<Omit<{
|
|
|
366
366
|
id: v.ObjectType<{
|
|
367
367
|
schema: v.Type<string>;
|
|
368
368
|
table: v.Type<string>;
|
|
369
|
-
rowKey: v.Type<Record<string, import("../../../types/bigint-json.
|
|
369
|
+
rowKey: v.Type<Record<string, import("../../../types/bigint-json.ts").JSONValue>>;
|
|
370
370
|
}, undefined>;
|
|
371
371
|
rowVersion: v.Type<string>;
|
|
372
372
|
refCounts: v.Type<Record<string, number> | null>;
|
|
@@ -385,7 +385,7 @@ export declare const putRowPatchSchema: v.ObjectType<Omit<{
|
|
|
385
385
|
id: v.ObjectType<{
|
|
386
386
|
schema: v.Type<string>;
|
|
387
387
|
table: v.Type<string>;
|
|
388
|
-
rowKey: v.Type<Record<string, import("../../../types/bigint-json.
|
|
388
|
+
rowKey: v.Type<Record<string, import("../../../types/bigint-json.ts").JSONValue>>;
|
|
389
389
|
}, undefined>;
|
|
390
390
|
rowVersion: v.Type<string>;
|
|
391
391
|
}, undefined>;
|
|
@@ -399,7 +399,7 @@ export declare const delRowPatchSchema: v.ObjectType<Omit<{
|
|
|
399
399
|
id: v.ObjectType<{
|
|
400
400
|
schema: v.Type<string>;
|
|
401
401
|
table: v.Type<string>;
|
|
402
|
-
rowKey: v.Type<Record<string, import("../../../types/bigint-json.
|
|
402
|
+
rowKey: v.Type<Record<string, import("../../../types/bigint-json.ts").JSONValue>>;
|
|
403
403
|
}, undefined>;
|
|
404
404
|
}, undefined>;
|
|
405
405
|
export type DelRowPatch = v.Infer<typeof delRowPatchSchema>;
|
|
@@ -412,7 +412,7 @@ export declare const rowPatchSchema: v.UnionType<[v.ObjectType<Omit<{
|
|
|
412
412
|
id: v.ObjectType<{
|
|
413
413
|
schema: v.Type<string>;
|
|
414
414
|
table: v.Type<string>;
|
|
415
|
-
rowKey: v.Type<Record<string, import("../../../types/bigint-json.
|
|
415
|
+
rowKey: v.Type<Record<string, import("../../../types/bigint-json.ts").JSONValue>>;
|
|
416
416
|
}, undefined>;
|
|
417
417
|
rowVersion: v.Type<string>;
|
|
418
418
|
}, undefined>, v.ObjectType<Omit<{
|
|
@@ -424,7 +424,7 @@ export declare const rowPatchSchema: v.UnionType<[v.ObjectType<Omit<{
|
|
|
424
424
|
id: v.ObjectType<{
|
|
425
425
|
schema: v.Type<string>;
|
|
426
426
|
table: v.Type<string>;
|
|
427
|
-
rowKey: v.Type<Record<string, import("../../../types/bigint-json.
|
|
427
|
+
rowKey: v.Type<Record<string, import("../../../types/bigint-json.ts").JSONValue>>;
|
|
428
428
|
}, undefined>;
|
|
429
429
|
}, undefined>]>;
|
|
430
430
|
export type RowPatch = v.Infer<typeof rowPatchSchema>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as v from
|
|
2
|
-
import { astSchema } from
|
|
3
|
-
import { jsonValueSchema } from
|
|
4
|
-
import { versionFromLexi, versionToLexi } from
|
|
1
|
+
import * as v from "../../../../../shared/src/valita.js";
|
|
2
|
+
import { astSchema } from "../../../../../zero-protocol/src/ast.js";
|
|
3
|
+
import { jsonValueSchema } from "../../../types/bigint-json.js";
|
|
4
|
+
import { versionFromLexi, versionToLexi } from "../../../types/lexi-version.js";
|
|
5
5
|
export const cvrVersionSchema = v.object({
|
|
6
6
|
/**
|
|
7
7
|
* The database `stateVersion` with which the rows in the CVR are consistent.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { LogContext } from '@rocicorp/logger';
|
|
2
|
-
import type { LiteAndZqlSpec, LiteTableSpecWithKeys } from '../../db/specs.
|
|
3
|
-
import { StatementRunner } from '../../db/statements.
|
|
4
|
-
import { type JSONValue } from '../../types/bigint-json.
|
|
5
|
-
import { type RowValue } from '../../types/row-key.
|
|
6
|
-
import { type SchemaVersions } from '../../types/schema-versions.
|
|
2
|
+
import type { LiteAndZqlSpec, LiteTableSpecWithKeys } from '../../db/specs.ts';
|
|
3
|
+
import { StatementRunner } from '../../db/statements.ts';
|
|
4
|
+
import { type JSONValue } from '../../types/bigint-json.ts';
|
|
5
|
+
import { type RowValue } from '../../types/row-key.ts';
|
|
6
|
+
import { type SchemaVersions } from '../../types/schema-versions.ts';
|
|
7
7
|
/**
|
|
8
8
|
* A `Snapshotter` manages the progression of database snapshots for a
|
|
9
9
|
* ViewSyncer.
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { LogContext } from '@rocicorp/logger';
|
|
2
|
-
import { assert } from
|
|
3
|
-
import { must } from
|
|
4
|
-
import * as v from
|
|
5
|
-
import { Database } from
|
|
6
|
-
import { fromSQLiteTypes } from
|
|
7
|
-
import { StatementRunner } from
|
|
8
|
-
import {} from
|
|
9
|
-
import { normalizedKeyOrder, } from
|
|
10
|
-
import {} from
|
|
11
|
-
import { id } from
|
|
12
|
-
import { RESET_OP, changeLogEntrySchema as schema, SET_OP, TRUNCATE_OP, } from
|
|
13
|
-
import { getReplicationState, ZERO_VERSION_COLUMN_NAME as ROW_VERSION, } from
|
|
2
|
+
import { assert } from "../../../../shared/src/asserts.js";
|
|
3
|
+
import { must } from "../../../../shared/src/must.js";
|
|
4
|
+
import * as v from "../../../../shared/src/valita.js";
|
|
5
|
+
import { Database } from "../../../../zqlite/src/db.js";
|
|
6
|
+
import { fromSQLiteTypes } from "../../../../zqlite/src/table-source.js";
|
|
7
|
+
import { StatementRunner } from "../../db/statements.js";
|
|
8
|
+
import {} from "../../types/bigint-json.js";
|
|
9
|
+
import { normalizedKeyOrder, } from "../../types/row-key.js";
|
|
10
|
+
import {} from "../../types/schema-versions.js";
|
|
11
|
+
import { id } from "../../types/sql.js";
|
|
12
|
+
import { RESET_OP, changeLogEntrySchema as schema, SET_OP, TRUNCATE_OP, } from "../replicator/schema/change-log.js";
|
|
13
|
+
import { getReplicationState, ZERO_VERSION_COLUMN_NAME as ROW_VERSION, } from "../replicator/schema/replication-state.js";
|
|
14
14
|
/**
|
|
15
15
|
* A `Snapshotter` manages the progression of database snapshots for a
|
|
16
16
|
* ViewSyncer.
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import type { LogContext } from '@rocicorp/logger';
|
|
2
2
|
import type { JWTPayload } from 'jose';
|
|
3
|
-
import { type ChangeDesiredQueriesMessage, type Downstream, type InitConnectionMessage } from '../../../../zero-protocol/src/mod.
|
|
4
|
-
import type { PermissionsConfig } from '../../../../zero-schema/src/compiled-permissions.
|
|
5
|
-
import type { PostgresDB } from '../../types/pg.
|
|
6
|
-
import type { Source } from '../../types/streams.
|
|
7
|
-
import { Subscription } from '../../types/subscription.
|
|
8
|
-
import type { ReplicaState } from '../replicator/replicator.
|
|
9
|
-
import type { ActivityBasedService } from '../service.
|
|
10
|
-
import type { DrainCoordinator } from './drain-coordinator.
|
|
11
|
-
import { PipelineDriver } from './pipeline-driver.
|
|
3
|
+
import { type ChangeDesiredQueriesMessage, type Downstream, type InitConnectionMessage } from '../../../../zero-protocol/src/mod.ts';
|
|
4
|
+
import type { PermissionsConfig } from '../../../../zero-schema/src/compiled-permissions.ts';
|
|
5
|
+
import type { PostgresDB } from '../../types/pg.ts';
|
|
6
|
+
import type { Source } from '../../types/streams.ts';
|
|
7
|
+
import { Subscription } from '../../types/subscription.ts';
|
|
8
|
+
import type { ReplicaState } from '../replicator/replicator.ts';
|
|
9
|
+
import type { ActivityBasedService } from '../service.ts';
|
|
10
|
+
import type { DrainCoordinator } from './drain-coordinator.ts';
|
|
11
|
+
import { PipelineDriver } from './pipeline-driver.ts';
|
|
12
12
|
export type TokenData = {
|
|
13
13
|
readonly raw: string;
|
|
14
14
|
readonly decoded: JWTPayload;
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { trace } from '@opentelemetry/api';
|
|
2
2
|
import { Lock } from '@rocicorp/lock';
|
|
3
3
|
import { resolver } from '@rocicorp/resolver';
|
|
4
|
-
import { manualSpan, startAsyncSpan, startSpan, } from
|
|
5
|
-
import { version } from
|
|
6
|
-
import { assert, unreachable } from
|
|
7
|
-
import { CustomKeyMap } from
|
|
8
|
-
import { must } from
|
|
9
|
-
import { randInt } from
|
|
10
|
-
import * as ErrorKind from
|
|
11
|
-
import {} from
|
|
12
|
-
import { transformAndHashQuery } from
|
|
13
|
-
import { stringify } from
|
|
14
|
-
import { ErrorForClient, getLogLevel } from
|
|
15
|
-
import { rowIDString } from
|
|
16
|
-
import { Subscription } from
|
|
17
|
-
import { ZERO_VERSION_COLUMN_NAME } from
|
|
18
|
-
import { ClientHandler, } from
|
|
19
|
-
import { CVRStore } from
|
|
20
|
-
import { CVRConfigDrivenUpdater, CVRQueryDrivenUpdater, } from
|
|
21
|
-
import { PipelineDriver } from
|
|
22
|
-
import { cmpVersions, EMPTY_CVR_VERSION, versionFromString, versionString, versionToCookie, } from
|
|
23
|
-
import { ResetPipelinesSignal } from
|
|
4
|
+
import { manualSpan, startAsyncSpan, startSpan, } from "../../../../otel/src/span.js";
|
|
5
|
+
import { version } from "../../../../otel/src/version.js";
|
|
6
|
+
import { assert, unreachable } from "../../../../shared/src/asserts.js";
|
|
7
|
+
import { CustomKeyMap } from "../../../../shared/src/custom-key-map.js";
|
|
8
|
+
import { must } from "../../../../shared/src/must.js";
|
|
9
|
+
import { randInt } from "../../../../shared/src/rand.js";
|
|
10
|
+
import * as ErrorKind from "../../../../zero-protocol/src/error-kind-enum.js";
|
|
11
|
+
import {} from "../../../../zero-protocol/src/mod.js";
|
|
12
|
+
import { transformAndHashQuery } from "../../auth/read-authorizer.js";
|
|
13
|
+
import { stringify } from "../../types/bigint-json.js";
|
|
14
|
+
import { ErrorForClient, getLogLevel } from "../../types/error-for-client.js";
|
|
15
|
+
import { rowIDString } from "../../types/row-key.js";
|
|
16
|
+
import { Subscription } from "../../types/subscription.js";
|
|
17
|
+
import { ZERO_VERSION_COLUMN_NAME } from "../replicator/schema/replication-state.js";
|
|
18
|
+
import { ClientHandler, } from "./client-handler.js";
|
|
19
|
+
import { CVRStore } from "./cvr-store.js";
|
|
20
|
+
import { CVRConfigDrivenUpdater, CVRQueryDrivenUpdater, } from "./cvr.js";
|
|
21
|
+
import { PipelineDriver } from "./pipeline-driver.js";
|
|
22
|
+
import { cmpVersions, EMPTY_CVR_VERSION, versionFromString, versionString, versionToCookie, } from "./schema/types.js";
|
|
23
|
+
import { ResetPipelinesSignal } from "./snapshotter.js";
|
|
24
24
|
const tracer = trace.getTracer('view-syncer', version);
|
|
25
25
|
const DEFAULT_KEEPALIVE_MS = 5_000;
|
|
26
26
|
function randomID() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as v from '../../../shared/src/valita.
|
|
1
|
+
import * as v from '../../../shared/src/valita.ts';
|
|
2
2
|
export type JSONValue = null | string | number | bigint | boolean | Date | readonly JSONValue[] | JSONObject;
|
|
3
3
|
export type JSONObject = {
|
|
4
4
|
readonly [prop: string]: JSONValue | undefined;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* https://neon.tech/blog/parsing-json-from-postgres-in-js
|
|
5
5
|
*/
|
|
6
6
|
import { parse as customParse, stringify as customStringify, } from 'json-custom-numbers';
|
|
7
|
-
import * as v from
|
|
7
|
+
import * as v from "../../../shared/src/valita.js";
|
|
8
8
|
function numberParser(_, v) {
|
|
9
9
|
const n = +v;
|
|
10
10
|
if (n >= Number.MIN_SAFE_INTEGER && n <= Number.MAX_SAFE_INTEGER)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { LogLevel } from '@rocicorp/logger';
|
|
2
|
-
import type { ErrorBody } from '../../../zero-protocol/src/error.
|
|
2
|
+
import type { ErrorBody } from '../../../zero-protocol/src/error.ts';
|
|
3
3
|
export declare class ErrorWithLevel extends Error {
|
|
4
4
|
readonly logLevel: LogLevel;
|
|
5
5
|
constructor(msg: string, logLevel?: LogLevel, options?: ErrorOptions);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { assert } from
|
|
2
|
-
import { parseBigInt } from
|
|
1
|
+
import { assert } from "../../../shared/src/asserts.js";
|
|
2
|
+
import { parseBigInt } from "../../../shared/src/parse-big-int.js";
|
|
3
3
|
export function versionToLexi(v) {
|
|
4
4
|
assert(v >= 0, 'Negative versions are not supported');
|
|
5
5
|
assert(typeof v === 'bigint' ||
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { SchemaValue, ValueType } from '../../../zero-schema/src/table-schema.
|
|
2
|
-
import type { LiteTableSpec } from '../db/specs.
|
|
3
|
-
import type { PostgresValueType } from './pg.
|
|
4
|
-
import type { RowValue } from './row-key.
|
|
1
|
+
import type { SchemaValue, ValueType } from '../../../zero-schema/src/table-schema.ts';
|
|
2
|
+
import type { LiteTableSpec } from '../db/specs.ts';
|
|
3
|
+
import type { PostgresValueType } from './pg.ts';
|
|
4
|
+
import type { RowValue } from './row-key.ts';
|
|
5
5
|
/** Javascript value types supported by better-sqlite3. */
|
|
6
6
|
export type LiteValueType = number | bigint | string | null | Uint8Array;
|
|
7
7
|
export type LiteRow = Readonly<Record<string, LiteValueType>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { assert } from
|
|
2
|
-
import { stringify } from
|
|
1
|
+
import { assert } from "../../../shared/src/asserts.js";
|
|
2
|
+
import { stringify } from "./bigint-json.js";
|
|
3
3
|
function columnType(col, table) {
|
|
4
4
|
const spec = table.columns[col];
|
|
5
5
|
assert(spec, `Unknown column ${col} in table ${table.name}`);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LogContext } from '@rocicorp/logger';
|
|
2
2
|
import postgres, { type PostgresType } from 'postgres';
|
|
3
|
-
import { type JSONValue } from './bigint-json.
|
|
3
|
+
import { type JSONValue } from './bigint-json.ts';
|
|
4
4
|
/** Registers types for the 'pg' library used by `pg-logical-replication`. */
|
|
5
5
|
export declare function registerPostgresTypeParsers(): void;
|
|
6
6
|
export declare function timestampToFpMillis(timestamp: string): number;
|
|
@@ -24,8 +24,8 @@ export declare const postgresTypeConfig: () => {
|
|
|
24
24
|
json: {
|
|
25
25
|
to: number;
|
|
26
26
|
from: number[];
|
|
27
|
-
serialize: typeof import("./bigint-json.
|
|
28
|
-
parse: typeof import("./bigint-json.
|
|
27
|
+
serialize: typeof import("./bigint-json.ts").stringify;
|
|
28
|
+
parse: typeof import("./bigint-json.ts").parse;
|
|
29
29
|
};
|
|
30
30
|
timestamp: {
|
|
31
31
|
to: number;
|