@rocicorp/zero 0.25.0-canary.8 → 0.25.0-canary.9
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/shared/src/deep-merge.d.ts +20 -3
- package/out/shared/src/deep-merge.d.ts.map +1 -1
- package/out/shared/src/deep-merge.js +27 -0
- package/out/shared/src/deep-merge.js.map +1 -0
- package/out/shared/src/logging.d.ts.map +1 -1
- package/out/shared/src/logging.js +25 -9
- package/out/shared/src/logging.js.map +1 -1
- package/out/shared/src/object-traversal.d.ts +19 -0
- package/out/shared/src/object-traversal.d.ts.map +1 -0
- package/out/shared/src/object-traversal.js +27 -0
- package/out/shared/src/object-traversal.js.map +1 -0
- package/out/zero/package.json.js +1 -1
- package/out/zero/src/pg.js +0 -2
- package/out/zero/src/pg.js.map +1 -1
- package/out/zero/src/server.js +0 -2
- package/out/zero/src/server.js.map +1 -1
- package/out/zero/src/zero.js +19 -3
- package/out/zero/src/zero.js.map +1 -1
- package/out/zero-cache/src/auth/jwt.d.ts +3 -0
- package/out/zero-cache/src/auth/jwt.d.ts.map +1 -1
- package/out/zero-cache/src/auth/jwt.js.map +1 -1
- package/out/zero-cache/src/auth/write-authorizer.d.ts +2 -1
- package/out/zero-cache/src/auth/write-authorizer.d.ts.map +1 -1
- package/out/zero-cache/src/auth/write-authorizer.js +1 -11
- package/out/zero-cache/src/auth/write-authorizer.js.map +1 -1
- package/out/zero-cache/src/config/zero-config.d.ts +27 -0
- package/out/zero-cache/src/config/zero-config.d.ts.map +1 -1
- package/out/zero-cache/src/config/zero-config.js +35 -7
- package/out/zero-cache/src/config/zero-config.js.map +1 -1
- package/out/zero-cache/src/custom/fetch.d.ts +5 -5
- package/out/zero-cache/src/custom/fetch.d.ts.map +1 -1
- package/out/zero-cache/src/custom/fetch.js +14 -11
- package/out/zero-cache/src/custom/fetch.js.map +1 -1
- package/out/zero-cache/src/custom-queries/transform-query.d.ts.map +1 -1
- package/out/zero-cache/src/custom-queries/transform-query.js +2 -4
- package/out/zero-cache/src/custom-queries/transform-query.js.map +1 -1
- package/out/zero-cache/src/db/specs.d.ts +1 -1
- package/out/zero-cache/src/server/change-streamer.d.ts.map +1 -1
- package/out/zero-cache/src/server/change-streamer.js +9 -9
- package/out/zero-cache/src/server/change-streamer.js.map +1 -1
- package/out/zero-cache/src/server/syncer.d.ts.map +1 -1
- package/out/zero-cache/src/server/syncer.js +20 -8
- package/out/zero-cache/src/server/syncer.js.map +1 -1
- package/out/zero-cache/src/services/analyze.d.ts +1 -1
- package/out/zero-cache/src/services/analyze.d.ts.map +1 -1
- package/out/zero-cache/src/services/analyze.js +10 -1
- package/out/zero-cache/src/services/analyze.js.map +1 -1
- package/out/zero-cache/src/services/change-source/pg/schema/ddl.d.ts +5 -5
- package/out/zero-cache/src/services/change-source/pg/schema/published.d.ts +2 -2
- package/out/zero-cache/src/services/change-source/pg/schema/shard.d.ts +1 -1
- package/out/zero-cache/src/services/change-streamer/change-streamer-http.d.ts +11 -2
- package/out/zero-cache/src/services/change-streamer/change-streamer-http.d.ts.map +1 -1
- package/out/zero-cache/src/services/change-streamer/change-streamer-http.js +36 -0
- package/out/zero-cache/src/services/change-streamer/change-streamer-http.js.map +1 -1
- package/out/zero-cache/src/services/http-service.d.ts +5 -4
- package/out/zero-cache/src/services/http-service.d.ts.map +1 -1
- package/out/zero-cache/src/services/http-service.js +15 -10
- package/out/zero-cache/src/services/http-service.js.map +1 -1
- package/out/zero-cache/src/services/mutagen/mutagen.d.ts +2 -1
- package/out/zero-cache/src/services/mutagen/mutagen.d.ts.map +1 -1
- package/out/zero-cache/src/services/mutagen/mutagen.js +3 -2
- package/out/zero-cache/src/services/mutagen/mutagen.js.map +1 -1
- package/out/zero-cache/src/services/mutagen/pusher.d.ts +198 -0
- package/out/zero-cache/src/services/mutagen/pusher.d.ts.map +1 -1
- package/out/zero-cache/src/services/mutagen/pusher.js +5 -5
- package/out/zero-cache/src/services/mutagen/pusher.js.map +1 -1
- package/out/zero-cache/src/services/run-ast.d.ts +4 -0
- package/out/zero-cache/src/services/run-ast.d.ts.map +1 -1
- package/out/zero-cache/src/services/run-ast.js +8 -1
- package/out/zero-cache/src/services/run-ast.js.map +1 -1
- package/out/zero-cache/src/services/view-syncer/inspect-handler.d.ts.map +1 -1
- package/out/zero-cache/src/services/view-syncer/inspect-handler.js +2 -1
- package/out/zero-cache/src/services/view-syncer/inspect-handler.js.map +1 -1
- package/out/zero-cache/src/services/view-syncer/pipeline-driver.d.ts.map +1 -1
- package/out/zero-cache/src/services/view-syncer/pipeline-driver.js +15 -8
- package/out/zero-cache/src/services/view-syncer/pipeline-driver.js.map +1 -1
- package/out/zero-cache/src/services/view-syncer/schema/types.d.ts +4 -4
- package/out/zero-cache/src/services/view-syncer/view-syncer.d.ts.map +1 -1
- package/out/zero-cache/src/services/view-syncer/view-syncer.js +48 -25
- package/out/zero-cache/src/services/view-syncer/view-syncer.js.map +1 -1
- package/out/zero-cache/src/workers/connection.js +20 -15
- package/out/zero-cache/src/workers/connection.js.map +1 -1
- package/out/zero-cache/src/workers/syncer.d.ts.map +1 -1
- package/out/zero-cache/src/workers/syncer.js +3 -3
- package/out/zero-cache/src/workers/syncer.js.map +1 -1
- package/out/zero-client/src/client/bindings.d.ts +4 -4
- package/out/zero-client/src/client/bindings.d.ts.map +1 -1
- package/out/zero-client/src/client/bindings.js.map +1 -1
- package/out/zero-client/src/client/connection.d.ts +1 -1
- package/out/zero-client/src/client/connection.d.ts.map +1 -1
- package/out/zero-client/src/client/connection.js +1 -1
- package/out/zero-client/src/client/connection.js.map +1 -1
- package/out/zero-client/src/client/crud.d.ts +7 -5
- package/out/zero-client/src/client/crud.d.ts.map +1 -1
- package/out/zero-client/src/client/crud.js +7 -7
- package/out/zero-client/src/client/crud.js.map +1 -1
- package/out/zero-client/src/client/custom.d.ts +7 -5
- package/out/zero-client/src/client/custom.d.ts.map +1 -1
- package/out/zero-client/src/client/custom.js +12 -7
- package/out/zero-client/src/client/custom.js.map +1 -1
- package/out/zero-client/src/client/inspector/inspector.d.ts +5 -1
- package/out/zero-client/src/client/inspector/inspector.d.ts.map +1 -1
- package/out/zero-client/src/client/inspector/inspector.js +7 -0
- package/out/zero-client/src/client/inspector/inspector.js.map +1 -1
- package/out/zero-client/src/client/inspector/lazy-inspector.d.ts.map +1 -1
- package/out/zero-client/src/client/inspector/lazy-inspector.js +13 -13
- package/out/zero-client/src/client/inspector/lazy-inspector.js.map +1 -1
- package/out/zero-client/src/client/make-mutate-property.d.ts +43 -0
- package/out/zero-client/src/client/make-mutate-property.d.ts.map +1 -0
- package/out/zero-client/src/client/make-mutate-property.js +38 -0
- package/out/zero-client/src/client/make-mutate-property.js.map +1 -0
- package/out/zero-client/src/client/make-replicache-mutators.d.ts +34 -0
- package/out/zero-client/src/client/make-replicache-mutators.d.ts.map +1 -0
- package/out/zero-client/src/client/make-replicache-mutators.js +103 -0
- package/out/zero-client/src/client/make-replicache-mutators.js.map +1 -0
- package/out/zero-client/src/client/options.d.ts +39 -27
- package/out/zero-client/src/client/options.d.ts.map +1 -1
- package/out/zero-client/src/client/options.js.map +1 -1
- package/out/zero-client/src/client/version.js +1 -1
- package/out/zero-client/src/client/zero.d.ts +23 -33
- package/out/zero-client/src/client/zero.d.ts.map +1 -1
- package/out/zero-client/src/client/zero.js +52 -118
- package/out/zero-client/src/client/zero.js.map +1 -1
- package/out/zero-client/src/mod.d.ts +12 -7
- package/out/zero-client/src/mod.d.ts.map +1 -1
- package/out/zero-protocol/src/analyze-query-result.d.ts +236 -0
- package/out/zero-protocol/src/analyze-query-result.d.ts.map +1 -1
- package/out/zero-protocol/src/analyze-query-result.js +128 -2
- package/out/zero-protocol/src/analyze-query-result.js.map +1 -1
- package/out/zero-protocol/src/ast.d.ts +1 -1
- package/out/zero-protocol/src/connect.d.ts.map +1 -1
- package/out/zero-protocol/src/connect.js +4 -0
- package/out/zero-protocol/src/connect.js.map +1 -1
- package/out/zero-protocol/src/custom-queries.d.ts +1 -1
- package/out/zero-protocol/src/down.d.ts +99 -0
- package/out/zero-protocol/src/down.d.ts.map +1 -1
- package/out/zero-protocol/src/error.d.ts +4 -4
- package/out/zero-protocol/src/inspect-down.d.ts +297 -0
- package/out/zero-protocol/src/inspect-down.d.ts.map +1 -1
- package/out/zero-protocol/src/inspect-up.d.ts +4 -0
- package/out/zero-protocol/src/inspect-up.d.ts.map +1 -1
- package/out/zero-protocol/src/inspect-up.js +2 -1
- package/out/zero-protocol/src/inspect-up.js.map +1 -1
- package/out/zero-protocol/src/protocol-version.d.ts +1 -1
- package/out/zero-protocol/src/protocol-version.d.ts.map +1 -1
- package/out/zero-protocol/src/protocol-version.js +1 -1
- package/out/zero-protocol/src/protocol-version.js.map +1 -1
- package/out/zero-protocol/src/push.d.ts +1 -1
- package/out/zero-protocol/src/up.d.ts +1 -0
- package/out/zero-protocol/src/up.d.ts.map +1 -1
- package/out/zero-react/src/components/inspector.d.ts +3 -2
- package/out/zero-react/src/components/inspector.d.ts.map +1 -1
- package/out/zero-react/src/components/inspector.js.map +1 -1
- package/out/zero-react/src/components/zero-inspector.d.ts +3 -2
- package/out/zero-react/src/components/zero-inspector.d.ts.map +1 -1
- package/out/zero-react/src/components/zero-inspector.js.map +1 -1
- package/out/zero-react/src/use-query.d.ts +5 -4
- package/out/zero-react/src/use-query.d.ts.map +1 -1
- package/out/zero-react/src/use-query.js +4 -3
- package/out/zero-react/src/use-query.js.map +1 -1
- package/out/zero-react/src/zero-provider.d.ts +7 -7
- package/out/zero-react/src/zero-provider.d.ts.map +1 -1
- package/out/zero-react/src/zero-provider.js.map +1 -1
- package/out/zero-schema/src/builder/schema-builder.js +1 -1
- package/out/zero-schema/src/builder/schema-builder.js.map +1 -1
- package/out/zero-server/src/custom.d.ts +4 -5
- package/out/zero-server/src/custom.d.ts.map +1 -1
- package/out/zero-server/src/custom.js.map +1 -1
- package/out/zero-server/src/mod.d.ts +0 -1
- package/out/zero-server/src/mod.d.ts.map +1 -1
- package/out/zero-server/src/process-mutations.d.ts +9 -14
- package/out/zero-server/src/process-mutations.d.ts.map +1 -1
- package/out/zero-server/src/process-mutations.js +151 -105
- package/out/zero-server/src/process-mutations.js.map +1 -1
- package/out/zero-server/src/push-processor.d.ts +5 -3
- package/out/zero-server/src/push-processor.d.ts.map +1 -1
- package/out/zero-server/src/push-processor.js +17 -25
- package/out/zero-server/src/push-processor.js.map +1 -1
- package/out/zero-server/src/queries/process-queries.js +1 -1
- package/out/zero-server/src/queries/process-queries.js.map +1 -1
- package/out/zero-server/src/zql-database.d.ts.map +1 -1
- package/out/zero-server/src/zql-database.js +1 -1
- package/out/zero-server/src/zql-database.js.map +1 -1
- 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-solid/src/use-query.js +27 -38
- package/out/zero-solid/src/use-query.js.map +1 -1
- package/out/zero-solid/src/use-zero-connection-state.d.ts.map +1 -1
- package/out/zero-solid/src/use-zero-connection-state.js +7 -5
- package/out/zero-solid/src/use-zero-connection-state.js.map +1 -1
- package/out/zero-solid/src/use-zero-online.d.ts.map +1 -1
- package/out/zero-solid/src/use-zero-online.js +7 -5
- package/out/zero-solid/src/use-zero-online.js.map +1 -1
- package/out/zero-solid/src/use-zero.d.ts +6 -5
- package/out/zero-solid/src/use-zero.d.ts.map +1 -1
- package/out/zero-solid/src/use-zero.js +2 -6
- package/out/zero-solid/src/use-zero.js.map +1 -1
- package/out/zql/src/builder/builder.d.ts +2 -1
- package/out/zql/src/builder/builder.d.ts.map +1 -1
- package/out/zql/src/builder/builder.js +4 -3
- package/out/zql/src/builder/builder.js.map +1 -1
- package/out/zql/src/mutate/custom.d.ts +15 -6
- package/out/zql/src/mutate/custom.d.ts.map +1 -1
- package/out/zql/src/mutate/custom.js +6 -6
- package/out/zql/src/mutate/custom.js.map +1 -1
- package/out/zql/src/mutate/mutator-registry.d.ts +142 -0
- package/out/zql/src/mutate/mutator-registry.d.ts.map +1 -0
- package/out/zql/src/mutate/mutator-registry.js +97 -0
- package/out/zql/src/mutate/mutator-registry.js.map +1 -0
- package/out/zql/src/mutate/mutator.d.ts +98 -0
- package/out/zql/src/mutate/mutator.d.ts.map +1 -0
- package/out/zql/src/mutate/mutator.js +35 -0
- package/out/zql/src/mutate/mutator.js.map +1 -0
- package/out/zql/src/planner/planner-connection.d.ts +7 -15
- package/out/zql/src/planner/planner-connection.d.ts.map +1 -1
- package/out/zql/src/planner/planner-connection.js +30 -24
- package/out/zql/src/planner/planner-connection.js.map +1 -1
- package/out/zql/src/planner/planner-debug.d.ts +37 -43
- package/out/zql/src/planner/planner-debug.d.ts.map +1 -1
- package/out/zql/src/planner/planner-debug.js +242 -0
- package/out/zql/src/planner/planner-debug.js.map +1 -0
- package/out/zql/src/planner/planner-fan-in.d.ts.map +1 -1
- package/out/zql/src/planner/planner-fan-in.js +11 -8
- package/out/zql/src/planner/planner-fan-in.js.map +1 -1
- package/out/zql/src/planner/planner-fan-out.d.ts.map +1 -1
- package/out/zql/src/planner/planner-fan-out.js +11 -8
- package/out/zql/src/planner/planner-fan-out.js.map +1 -1
- package/out/zql/src/planner/planner-graph.d.ts.map +1 -1
- package/out/zql/src/planner/planner-graph.js +13 -5
- package/out/zql/src/planner/planner-graph.js.map +1 -1
- package/out/zql/src/planner/planner-join.d.ts.map +1 -1
- package/out/zql/src/planner/planner-join.js +12 -9
- package/out/zql/src/planner/planner-join.js.map +1 -1
- package/out/zql/src/planner/planner-node.d.ts +4 -0
- package/out/zql/src/planner/planner-node.d.ts.map +1 -1
- package/out/zql/src/planner/planner-node.js +8 -0
- package/out/zql/src/planner/planner-node.js.map +1 -0
- package/out/zql/src/query/create-builder.d.ts +7 -0
- package/out/zql/src/query/create-builder.d.ts.map +1 -0
- package/out/zql/src/query/create-builder.js +44 -0
- package/out/zql/src/query/create-builder.js.map +1 -0
- package/out/zql/src/query/named.d.ts +1 -7
- package/out/zql/src/query/named.d.ts.map +1 -1
- package/out/zql/src/query/named.js +0 -21
- package/out/zql/src/query/named.js.map +1 -1
- package/out/zql/src/query/query-impl.d.ts +4 -3
- package/out/zql/src/query/query-impl.d.ts.map +1 -1
- package/out/zql/src/query/query-impl.js +3 -0
- package/out/zql/src/query/query-impl.js.map +1 -1
- package/out/zql/src/query/query-internals.js +0 -4
- package/out/zql/src/query/query-internals.js.map +1 -1
- package/out/zql/src/query/query-registry.d.ts +253 -0
- package/out/zql/src/query/query-registry.d.ts.map +1 -0
- package/out/zql/src/query/query-registry.js +131 -0
- package/out/zql/src/query/query-registry.js.map +1 -0
- package/out/zql/src/query/query.d.ts +16 -1
- package/out/zql/src/query/query.d.ts.map +1 -1
- package/out/zql/src/query/schema-query.d.ts +6 -0
- package/out/zql/src/query/schema-query.d.ts.map +1 -0
- package/out/zql/src/query/validate-input.js +12 -13
- package/out/zql/src/query/validate-input.js.map +1 -1
- package/package.json +2 -1
- package/out/zero-server/src/query-registry.d.ts +0 -10
- package/out/zero-server/src/query-registry.d.ts.map +0 -1
- package/out/zero-server/src/query-registry.js +0 -35
- package/out/zero-server/src/query-registry.js.map +0 -1
- package/out/zql/src/query/define-query.d.ts +0 -75
- package/out/zql/src/query/define-query.d.ts.map +0 -1
- package/out/zql/src/query/define-query.js +0 -47
- package/out/zql/src/query/define-query.js.map +0 -1
- package/out/zql/src/query/query-definitions.d.ts +0 -32
- package/out/zql/src/query/query-definitions.d.ts.map +0 -1
|
@@ -9,6 +9,7 @@ export type { ClientGroupID, ClientID } from '../../replicache/src/sync/ids.ts';
|
|
|
9
9
|
export { TransactionClosedError } from '../../replicache/src/transaction-closed-error.ts';
|
|
10
10
|
export type { JSONObject, JSONValue, ReadonlyJSONObject, ReadonlyJSONValue, } from '../../shared/src/json.ts';
|
|
11
11
|
export type { MaybePromise } from '../../shared/src/types.ts';
|
|
12
|
+
export type { AnalyzeQueryResult, PlanDebugEventJSON, } from '../../zero-protocol/src/analyze-query-result.ts';
|
|
12
13
|
export { ApplicationError } from '../../zero-protocol/src/application-error.ts';
|
|
13
14
|
export type { ApplicationErrorOptions } from '../../zero-protocol/src/application-error.ts';
|
|
14
15
|
export type { AST, Bound, ColumnReference, CompoundKey, Condition, Conjunction, CorrelatedSubquery, CorrelatedSubqueryCondition, CorrelatedSubqueryConditionOperator, Disjunction, EqualityOps, InOps, LikeOps, LiteralReference, LiteralValue, Ordering, OrderOps, OrderPart, Parameter, SimpleCondition, SimpleOperator, ValuePosition, } from '../../zero-protocol/src/ast.ts';
|
|
@@ -28,16 +29,20 @@ export type { Input, Output } from '../../zql/src/ivm/operator.ts';
|
|
|
28
29
|
export type { Stream } from '../../zql/src/ivm/stream.ts';
|
|
29
30
|
export { applyChange, type ViewChange, } from '../../zql/src/ivm/view-apply-change.ts';
|
|
30
31
|
export type { AnyViewFactory, Entry, Format, View, ViewFactory, } from '../../zql/src/ivm/view.ts';
|
|
31
|
-
export type { DeleteID, InsertValue,
|
|
32
|
-
export {
|
|
33
|
-
export type
|
|
32
|
+
export type { DeleteID, InsertValue, ServerTransaction, Transaction, UpdateValue, UpsertValue, } from '../../zql/src/mutate/custom.ts';
|
|
33
|
+
export { defineMutators, defineMutatorsWithType, getMutator, isMutatorRegistry, mustGetMutator, type AnyMutatorRegistry, type MutatorDefinitions, type MutatorRegistry, } from '../../zql/src/mutate/mutator-registry.ts';
|
|
34
|
+
export { defineMutator, defineMutatorWithType, isMutator, isMutatorDefinition, type MutatorDefinition, } from '../../zql/src/mutate/mutator.ts';
|
|
35
|
+
export type { MutationRequest, Mutator } from '../../zql/src/mutate/mutator.ts';
|
|
36
|
+
export { createBuilder } from '../../zql/src/query/create-builder.ts';
|
|
34
37
|
export { escapeLike } from '../../zql/src/query/escape-like.ts';
|
|
35
38
|
export type { ExpressionBuilder, ExpressionFactory, } from '../../zql/src/query/expression.ts';
|
|
36
|
-
export {
|
|
39
|
+
export { syncedQuery, syncedQueryWithContext, withValidation, } from '../../zql/src/query/named.ts';
|
|
37
40
|
export type { CustomQueryID, HasParseFn, ParseFn, Parser, QueryFn, SyncedQuery, } from '../../zql/src/query/named.ts';
|
|
38
|
-
export type { QueryDefinitions } from '../../zql/src/query/query-definitions.ts';
|
|
39
41
|
export type { QueryInternals } from '../../zql/src/query/query-internals.ts';
|
|
40
|
-
export
|
|
42
|
+
export { defineQueries, defineQueriesWithType, defineQuery, defineQueryWithType, getQuery, isQueryDefinition, mustGetQuery, type QueryRegistry, } from '../../zql/src/query/query-registry.ts';
|
|
43
|
+
export type { CustomQuery, QueryDefinition, QueryDefinitions, } from '../../zql/src/query/query-registry.ts';
|
|
44
|
+
export type { AnyQuery, HumanReadable, PullRow, Query, QueryResultType, QueryRowType, Row, RunOptions, ToQuery, ZeRow, } from '../../zql/src/query/query.ts';
|
|
45
|
+
export type { SchemaQuery } from '../../zql/src/query/schema-query.ts';
|
|
41
46
|
export { type TTL } from '../../zql/src/query/ttl.ts';
|
|
42
47
|
export type { ResultType, TypedView } from '../../zql/src/query/typed-view.ts';
|
|
43
48
|
export { bindingsForZero, registerZeroDelegate, type BindingsForZero, } from './client/bindings.ts';
|
|
@@ -50,6 +55,6 @@ export type { Inspector } from './client/inspector/inspector.ts';
|
|
|
50
55
|
export type { Query as InspectorQuery } from './client/inspector/query.ts';
|
|
51
56
|
export type { UpdateNeededReason, ZeroOptions } from './client/options.ts';
|
|
52
57
|
export { UpdateNeededReasonType } from './client/update-needed-reason-type.ts';
|
|
53
|
-
export { Zero
|
|
58
|
+
export { Zero } from './client/zero.ts';
|
|
54
59
|
export type { QueryErrorDetails, QueryResultDetails, } from './types/query-result.ts';
|
|
55
60
|
//# sourceMappingURL=mod.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../../zero-client/src/mod.ts"],"names":[],"mappings":"AAAA,YAAY,EAAC,2BAA2B,EAAC,MAAM,yCAAyC,CAAC;AACzF,OAAO,EAAC,gBAAgB,EAAC,MAAM,4CAA4C,CAAC;AAC5E,YAAY,EAAC,eAAe,EAAC,MAAM,2C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EAAC,UAAU,EAAE,SAAS,EAAC,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,KAAK,eAAe,GACrB,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EACV,UAAU,EACV,gBAAgB,EAChB,eAAe,EACf,MAAM,GACP,MAAM,wBAAwB,CAAC;AAChC,YAAY,EAAC,YAAY,EAAE,SAAS,EAAE,YAAY,EAAC,MAAM,kBAAkB,CAAC;AAC5E,YAAY,EACV,iBAAiB,EACjB,iBAAiB,EACjB,0BAA0B,EAC1B,2BAA2B,EAC3B,oBAAoB,EACpB,yBAAyB,EACzB,2BAA2B,EAC3B,aAAa,IAAI,uBAAuB,GACzC,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EAAC,WAAW,IAAI,oBAAoB,EAAC,MAAM,oCAAoC,CAAC;AAC5F,YAAY,EAAC,MAAM,IAAI,eAAe,EAAC,MAAM,8BAA8B,CAAC;AAC5E,YAAY,EAAC,SAAS,EAAC,MAAM,iCAAiC,CAAC;AAC/D,YAAY,EAAC,KAAK,IAAI,cAAc,EAAC,MAAM,6BAA6B,CAAC;AACzE,YAAY,EAAC,kBAAkB,EAAE,WAAW,EAAC,MAAM,qBAAqB,CAAC;AACzE,OAAO,EAAC,sBAAsB,EAAC,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EAAC,IAAI,EAAC,MAAM,kBAAkB,CAAC;AACtC,YAAY,EACV,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,yBAAyB,CAAC"}
|
|
@@ -7,6 +7,143 @@ export declare const rowsByQuerySchema: v.Type<Record<string, Readonly<Record<st
|
|
|
7
7
|
export type RowsByQuery = v.Infer<typeof rowsByQuerySchema>;
|
|
8
8
|
export declare const rowsBySourceSchema: v.Type<Record<string, Record<string, Readonly<Record<string, import("../../shared/src/json.ts").ReadonlyJSONValue | undefined>>[]>>>;
|
|
9
9
|
export type RowsBySource = v.Infer<typeof rowsBySourceSchema>;
|
|
10
|
+
declare const attemptStartEventJSONSchema: v.ObjectType<{
|
|
11
|
+
type: v.Type<"attempt-start">;
|
|
12
|
+
attemptNumber: v.Type<number>;
|
|
13
|
+
totalAttempts: v.Type<number>;
|
|
14
|
+
}, undefined>;
|
|
15
|
+
declare const connectionSelectedEventJSONSchema: v.ObjectType<{
|
|
16
|
+
type: v.Type<"connection-selected">;
|
|
17
|
+
attemptNumber: v.Type<number>;
|
|
18
|
+
connection: v.Type<string>;
|
|
19
|
+
cost: v.Type<number>;
|
|
20
|
+
isRoot: v.Type<boolean>;
|
|
21
|
+
}, undefined>;
|
|
22
|
+
declare const planFailedEventJSONSchema: v.ObjectType<{
|
|
23
|
+
type: v.Type<"plan-failed">;
|
|
24
|
+
attemptNumber: v.Type<number>;
|
|
25
|
+
reason: v.Type<string>;
|
|
26
|
+
}, undefined>;
|
|
27
|
+
declare const bestPlanSelectedEventJSONSchema: v.ObjectType<{
|
|
28
|
+
type: v.Type<"best-plan-selected">;
|
|
29
|
+
bestAttemptNumber: v.Type<number>;
|
|
30
|
+
totalCost: v.Type<number>;
|
|
31
|
+
flipPattern: v.Type<number>;
|
|
32
|
+
joinStates: v.ArrayType<v.ObjectType<{
|
|
33
|
+
join: v.Type<string>;
|
|
34
|
+
type: v.UnionType<[v.Type<"semi">, v.Type<"flipped">, v.Type<"unflippable">]>;
|
|
35
|
+
}, undefined>>;
|
|
36
|
+
}, undefined>;
|
|
37
|
+
declare const nodeConstraintEventJSONSchema: v.ObjectType<{
|
|
38
|
+
type: v.Type<"node-constraint">;
|
|
39
|
+
attemptNumber: v.Optional<number>;
|
|
40
|
+
nodeType: v.UnionType<[v.Type<"connection">, v.Type<"join">, v.Type<"fan-out">, v.Type<"fan-in">, v.Type<"terminus">]>;
|
|
41
|
+
node: v.Type<string>;
|
|
42
|
+
branchPattern: v.ArrayType<v.Type<number>>;
|
|
43
|
+
constraint: v.Optional<Record<string, unknown> | null>;
|
|
44
|
+
from: v.Type<string>;
|
|
45
|
+
}, undefined>;
|
|
46
|
+
declare const planDebugEventJSONSchema: v.UnionType<[v.ObjectType<{
|
|
47
|
+
type: v.Type<"attempt-start">;
|
|
48
|
+
attemptNumber: v.Type<number>;
|
|
49
|
+
totalAttempts: v.Type<number>;
|
|
50
|
+
}, undefined>, v.ObjectType<{
|
|
51
|
+
type: v.Type<"connection-costs">;
|
|
52
|
+
attemptNumber: v.Type<number>;
|
|
53
|
+
costs: v.ArrayType<v.ObjectType<{
|
|
54
|
+
connection: v.Type<string>;
|
|
55
|
+
cost: v.Type<number>;
|
|
56
|
+
costEstimate: v.ObjectType<{
|
|
57
|
+
startupCost: v.Type<number>;
|
|
58
|
+
scanEst: v.Type<number>;
|
|
59
|
+
cost: v.Type<number>;
|
|
60
|
+
returnedRows: v.Type<number>;
|
|
61
|
+
selectivity: v.Type<number>;
|
|
62
|
+
limit: v.Optional<number>;
|
|
63
|
+
}, undefined>;
|
|
64
|
+
pinned: v.Type<boolean>;
|
|
65
|
+
constraints: v.Type<Record<string, Record<string, unknown> | null>>;
|
|
66
|
+
constraintCosts: v.Type<Record<string, {
|
|
67
|
+
limit?: number | undefined;
|
|
68
|
+
startupCost: number;
|
|
69
|
+
scanEst: number;
|
|
70
|
+
cost: number;
|
|
71
|
+
returnedRows: number;
|
|
72
|
+
selectivity: number;
|
|
73
|
+
}>>;
|
|
74
|
+
}, undefined>>;
|
|
75
|
+
}, undefined>, v.ObjectType<{
|
|
76
|
+
type: v.Type<"connection-selected">;
|
|
77
|
+
attemptNumber: v.Type<number>;
|
|
78
|
+
connection: v.Type<string>;
|
|
79
|
+
cost: v.Type<number>;
|
|
80
|
+
isRoot: v.Type<boolean>;
|
|
81
|
+
}, undefined>, v.ObjectType<{
|
|
82
|
+
type: v.Type<"constraints-propagated">;
|
|
83
|
+
attemptNumber: v.Type<number>;
|
|
84
|
+
connectionConstraints: v.ArrayType<v.ObjectType<{
|
|
85
|
+
connection: v.Type<string>;
|
|
86
|
+
constraints: v.Type<Record<string, Record<string, unknown> | null>>;
|
|
87
|
+
constraintCosts: v.Type<Record<string, {
|
|
88
|
+
limit?: number | undefined;
|
|
89
|
+
startupCost: number;
|
|
90
|
+
scanEst: number;
|
|
91
|
+
cost: number;
|
|
92
|
+
returnedRows: number;
|
|
93
|
+
selectivity: number;
|
|
94
|
+
}>>;
|
|
95
|
+
}, undefined>>;
|
|
96
|
+
}, undefined>, v.ObjectType<{
|
|
97
|
+
type: v.Type<"plan-complete">;
|
|
98
|
+
attemptNumber: v.Type<number>;
|
|
99
|
+
totalCost: v.Type<number>;
|
|
100
|
+
flipPattern: v.Type<number>;
|
|
101
|
+
joinStates: v.ArrayType<v.ObjectType<{
|
|
102
|
+
join: v.Type<string>;
|
|
103
|
+
type: v.UnionType<[v.Type<"semi">, v.Type<"flipped">, v.Type<"unflippable">]>;
|
|
104
|
+
}, undefined>>;
|
|
105
|
+
}, undefined>, v.ObjectType<{
|
|
106
|
+
type: v.Type<"plan-failed">;
|
|
107
|
+
attemptNumber: v.Type<number>;
|
|
108
|
+
reason: v.Type<string>;
|
|
109
|
+
}, undefined>, v.ObjectType<{
|
|
110
|
+
type: v.Type<"best-plan-selected">;
|
|
111
|
+
bestAttemptNumber: v.Type<number>;
|
|
112
|
+
totalCost: v.Type<number>;
|
|
113
|
+
flipPattern: v.Type<number>;
|
|
114
|
+
joinStates: v.ArrayType<v.ObjectType<{
|
|
115
|
+
join: v.Type<string>;
|
|
116
|
+
type: v.UnionType<[v.Type<"semi">, v.Type<"flipped">, v.Type<"unflippable">]>;
|
|
117
|
+
}, undefined>>;
|
|
118
|
+
}, undefined>, v.ObjectType<{
|
|
119
|
+
type: v.Type<"node-cost">;
|
|
120
|
+
attemptNumber: v.Optional<number>;
|
|
121
|
+
nodeType: v.UnionType<[v.Type<"connection">, v.Type<"join">, v.Type<"fan-out">, v.Type<"fan-in">, v.Type<"terminus">]>;
|
|
122
|
+
node: v.Type<string>;
|
|
123
|
+
branchPattern: v.ArrayType<v.Type<number>>;
|
|
124
|
+
downstreamChildSelectivity: v.Type<number>;
|
|
125
|
+
costEstimate: v.ObjectType<{
|
|
126
|
+
startupCost: v.Type<number>;
|
|
127
|
+
scanEst: v.Type<number>;
|
|
128
|
+
cost: v.Type<number>;
|
|
129
|
+
returnedRows: v.Type<number>;
|
|
130
|
+
selectivity: v.Type<number>;
|
|
131
|
+
limit: v.Optional<number>;
|
|
132
|
+
}, undefined>;
|
|
133
|
+
filters: v.Optional<import("./ast.ts").Condition>;
|
|
134
|
+
ordering: v.Optional<readonly (readonly [string, "desc" | "asc"])[]>;
|
|
135
|
+
joinType: v.Optional<"semi" | "flipped" | "unflippable">;
|
|
136
|
+
}, undefined>, v.ObjectType<{
|
|
137
|
+
type: v.Type<"node-constraint">;
|
|
138
|
+
attemptNumber: v.Optional<number>;
|
|
139
|
+
nodeType: v.UnionType<[v.Type<"connection">, v.Type<"join">, v.Type<"fan-out">, v.Type<"fan-in">, v.Type<"terminus">]>;
|
|
140
|
+
node: v.Type<string>;
|
|
141
|
+
branchPattern: v.ArrayType<v.Type<number>>;
|
|
142
|
+
constraint: v.Optional<Record<string, unknown> | null>;
|
|
143
|
+
from: v.Type<string>;
|
|
144
|
+
}, undefined>]>;
|
|
145
|
+
export type PlanDebugEventJSON = v.Infer<typeof planDebugEventJSONSchema>;
|
|
146
|
+
export { attemptStartEventJSONSchema, connectionSelectedEventJSONSchema, planFailedEventJSONSchema, bestPlanSelectedEventJSONSchema, nodeConstraintEventJSONSchema, };
|
|
10
147
|
export declare const analyzeQueryResultSchema: v.ObjectType<{
|
|
11
148
|
warnings: v.ArrayType<v.Type<string>>;
|
|
12
149
|
syncedRows: v.Optional<Record<string, Readonly<Record<string, import("../../shared/src/json.ts").ReadonlyJSONValue | undefined>>[]>>;
|
|
@@ -25,6 +162,105 @@ export declare const analyzeQueryResultSchema: v.ObjectType<{
|
|
|
25
162
|
readRowCountsByQuery: v.Optional<Record<string, Record<string, number>>>;
|
|
26
163
|
readRowCount: v.Optional<number>;
|
|
27
164
|
dbScansByQuery: v.Optional<Record<string, Record<string, number>>>;
|
|
165
|
+
plannerEvents: v.Optional<({
|
|
166
|
+
type: "attempt-start";
|
|
167
|
+
attemptNumber: number;
|
|
168
|
+
totalAttempts: number;
|
|
169
|
+
} | {
|
|
170
|
+
type: "connection-costs";
|
|
171
|
+
attemptNumber: number;
|
|
172
|
+
costs: {
|
|
173
|
+
connection: string;
|
|
174
|
+
cost: number;
|
|
175
|
+
costEstimate: {
|
|
176
|
+
limit?: number | undefined;
|
|
177
|
+
startupCost: number;
|
|
178
|
+
scanEst: number;
|
|
179
|
+
cost: number;
|
|
180
|
+
returnedRows: number;
|
|
181
|
+
selectivity: number;
|
|
182
|
+
};
|
|
183
|
+
pinned: boolean;
|
|
184
|
+
constraints: Record<string, Record<string, unknown> | null>;
|
|
185
|
+
constraintCosts: Record<string, {
|
|
186
|
+
limit?: number | undefined;
|
|
187
|
+
startupCost: number;
|
|
188
|
+
scanEst: number;
|
|
189
|
+
cost: number;
|
|
190
|
+
returnedRows: number;
|
|
191
|
+
selectivity: number;
|
|
192
|
+
}>;
|
|
193
|
+
}[];
|
|
194
|
+
} | {
|
|
195
|
+
type: "connection-selected";
|
|
196
|
+
attemptNumber: number;
|
|
197
|
+
connection: string;
|
|
198
|
+
cost: number;
|
|
199
|
+
isRoot: boolean;
|
|
200
|
+
} | {
|
|
201
|
+
type: "constraints-propagated";
|
|
202
|
+
attemptNumber: number;
|
|
203
|
+
connectionConstraints: {
|
|
204
|
+
connection: string;
|
|
205
|
+
constraints: Record<string, Record<string, unknown> | null>;
|
|
206
|
+
constraintCosts: Record<string, {
|
|
207
|
+
limit?: number | undefined;
|
|
208
|
+
startupCost: number;
|
|
209
|
+
scanEst: number;
|
|
210
|
+
cost: number;
|
|
211
|
+
returnedRows: number;
|
|
212
|
+
selectivity: number;
|
|
213
|
+
}>;
|
|
214
|
+
}[];
|
|
215
|
+
} | {
|
|
216
|
+
type: "plan-complete";
|
|
217
|
+
attemptNumber: number;
|
|
218
|
+
totalCost: number;
|
|
219
|
+
flipPattern: number;
|
|
220
|
+
joinStates: {
|
|
221
|
+
join: string;
|
|
222
|
+
type: "semi" | "flipped" | "unflippable";
|
|
223
|
+
}[];
|
|
224
|
+
} | {
|
|
225
|
+
type: "plan-failed";
|
|
226
|
+
attemptNumber: number;
|
|
227
|
+
reason: string;
|
|
228
|
+
} | {
|
|
229
|
+
type: "best-plan-selected";
|
|
230
|
+
bestAttemptNumber: number;
|
|
231
|
+
totalCost: number;
|
|
232
|
+
flipPattern: number;
|
|
233
|
+
joinStates: {
|
|
234
|
+
join: string;
|
|
235
|
+
type: "semi" | "flipped" | "unflippable";
|
|
236
|
+
}[];
|
|
237
|
+
} | {
|
|
238
|
+
attemptNumber?: number | undefined;
|
|
239
|
+
filters?: import("./ast.ts").Condition | undefined;
|
|
240
|
+
ordering?: readonly (readonly [string, "desc" | "asc"])[] | undefined;
|
|
241
|
+
joinType?: "semi" | "flipped" | "unflippable" | undefined;
|
|
242
|
+
type: "node-cost";
|
|
243
|
+
nodeType: "join" | "connection" | "fan-out" | "fan-in" | "terminus";
|
|
244
|
+
node: string;
|
|
245
|
+
branchPattern: number[];
|
|
246
|
+
downstreamChildSelectivity: number;
|
|
247
|
+
costEstimate: {
|
|
248
|
+
limit?: number | undefined;
|
|
249
|
+
startupCost: number;
|
|
250
|
+
scanEst: number;
|
|
251
|
+
cost: number;
|
|
252
|
+
returnedRows: number;
|
|
253
|
+
selectivity: number;
|
|
254
|
+
};
|
|
255
|
+
} | {
|
|
256
|
+
attemptNumber?: number | undefined;
|
|
257
|
+
constraint?: Record<string, unknown> | null | undefined;
|
|
258
|
+
type: "node-constraint";
|
|
259
|
+
nodeType: "join" | "connection" | "fan-out" | "fan-in" | "terminus";
|
|
260
|
+
node: string;
|
|
261
|
+
branchPattern: number[];
|
|
262
|
+
from: string;
|
|
263
|
+
})[]>;
|
|
28
264
|
}, undefined>;
|
|
29
265
|
export type AnalyzeQueryResult = v.Infer<typeof analyzeQueryResultSchema>;
|
|
30
266
|
//# sourceMappingURL=analyze-query-result.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analyze-query-result.d.ts","sourceRoot":"","sources":["../../../../zero-protocol/src/analyze-query-result.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"analyze-query-result.d.ts","sourceRoot":"","sources":["../../../../zero-protocol/src/analyze-query-result.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,4BAA4B,CAAC;AAKhD,eAAO,MAAM,sBAAsB,gCAAuB,CAAC;AAC3D,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,eAAO,MAAM,uBAAuB,gDAAmC,CAAC;AACxE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,eAAO,MAAM,iBAAiB,sHAA+B,CAAC;AAC9D,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,eAAO,MAAM,kBAAkB,sIAA8B,CAAC;AAC9D,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAe9D,QAAA,MAAM,2BAA2B;;;;aAI/B,CAAC;AAiBH,QAAA,MAAM,iCAAiC;;;;;;aAMrC,CAAC;AAiCH,QAAA,MAAM,yBAAyB;;;;aAI7B,CAAC;AAEH,QAAA,MAAM,+BAA+B;;;;;;;;;aAWnC,CAAC;AAuBH,QAAA,MAAM,6BAA6B;;;;;;;;aAQjC,CAAC;AAEH,QAAA,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eAU7B,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,OAAO,EACL,2BAA2B,EAC3B,iCAAiC,EACjC,yBAAyB,EACzB,+BAA+B,EAC/B,6BAA6B,GAC9B,CAAC;AAEF,eAAO,MAAM,wBAAwB;;;;;IAKnC,8CAA8C;;;;IAI9C,2CAA2C;;IAE3C,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAQ/B,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
|
|
@@ -1,10 +1,130 @@
|
|
|
1
1
|
import "../../shared/src/valita.js";
|
|
2
|
+
import { orderingSchema, conditionSchema } from "./ast.js";
|
|
2
3
|
import { rowSchema } from "./data.js";
|
|
3
|
-
import { record, number, array, object, string } from "@badrap/valita";
|
|
4
|
+
import { record, number, array, object, union, unknown, null as _null, literal, boolean, string } from "@badrap/valita";
|
|
4
5
|
const rowCountsByQuerySchema = record(number());
|
|
5
6
|
const rowCountsBySourceSchema = record(rowCountsByQuerySchema);
|
|
6
7
|
const rowsByQuerySchema = record(array(rowSchema));
|
|
7
8
|
const rowsBySourceSchema = record(rowsByQuerySchema);
|
|
9
|
+
const costEstimateJSONSchema = object({
|
|
10
|
+
startupCost: number(),
|
|
11
|
+
scanEst: number(),
|
|
12
|
+
cost: number(),
|
|
13
|
+
returnedRows: number(),
|
|
14
|
+
selectivity: number(),
|
|
15
|
+
limit: number().optional()
|
|
16
|
+
});
|
|
17
|
+
const plannerConstraintSchema = record(union(unknown(), _null()));
|
|
18
|
+
const attemptStartEventJSONSchema = object({
|
|
19
|
+
type: literal("attempt-start"),
|
|
20
|
+
attemptNumber: number(),
|
|
21
|
+
totalAttempts: number()
|
|
22
|
+
});
|
|
23
|
+
const connectionCostsEventJSONSchema = object({
|
|
24
|
+
type: literal("connection-costs"),
|
|
25
|
+
attemptNumber: number(),
|
|
26
|
+
costs: array(
|
|
27
|
+
object({
|
|
28
|
+
connection: string(),
|
|
29
|
+
cost: number(),
|
|
30
|
+
costEstimate: costEstimateJSONSchema,
|
|
31
|
+
pinned: boolean(),
|
|
32
|
+
constraints: record(union(plannerConstraintSchema, _null())),
|
|
33
|
+
constraintCosts: record(costEstimateJSONSchema)
|
|
34
|
+
})
|
|
35
|
+
)
|
|
36
|
+
});
|
|
37
|
+
const connectionSelectedEventJSONSchema = object({
|
|
38
|
+
type: literal("connection-selected"),
|
|
39
|
+
attemptNumber: number(),
|
|
40
|
+
connection: string(),
|
|
41
|
+
cost: number(),
|
|
42
|
+
isRoot: boolean()
|
|
43
|
+
});
|
|
44
|
+
const constraintsPropagatedEventJSONSchema = object({
|
|
45
|
+
type: literal("constraints-propagated"),
|
|
46
|
+
attemptNumber: number(),
|
|
47
|
+
connectionConstraints: array(
|
|
48
|
+
object({
|
|
49
|
+
connection: string(),
|
|
50
|
+
constraints: record(union(plannerConstraintSchema, _null())),
|
|
51
|
+
constraintCosts: record(costEstimateJSONSchema)
|
|
52
|
+
})
|
|
53
|
+
)
|
|
54
|
+
});
|
|
55
|
+
const joinTypeSchema = union(
|
|
56
|
+
literal("semi"),
|
|
57
|
+
literal("flipped"),
|
|
58
|
+
literal("unflippable")
|
|
59
|
+
);
|
|
60
|
+
const planCompleteEventJSONSchema = object({
|
|
61
|
+
type: literal("plan-complete"),
|
|
62
|
+
attemptNumber: number(),
|
|
63
|
+
totalCost: number(),
|
|
64
|
+
flipPattern: number(),
|
|
65
|
+
joinStates: array(
|
|
66
|
+
object({
|
|
67
|
+
join: string(),
|
|
68
|
+
type: joinTypeSchema
|
|
69
|
+
})
|
|
70
|
+
)
|
|
71
|
+
});
|
|
72
|
+
const planFailedEventJSONSchema = object({
|
|
73
|
+
type: literal("plan-failed"),
|
|
74
|
+
attemptNumber: number(),
|
|
75
|
+
reason: string()
|
|
76
|
+
});
|
|
77
|
+
const bestPlanSelectedEventJSONSchema = object({
|
|
78
|
+
type: literal("best-plan-selected"),
|
|
79
|
+
bestAttemptNumber: number(),
|
|
80
|
+
totalCost: number(),
|
|
81
|
+
flipPattern: number(),
|
|
82
|
+
joinStates: array(
|
|
83
|
+
object({
|
|
84
|
+
join: string(),
|
|
85
|
+
type: joinTypeSchema
|
|
86
|
+
})
|
|
87
|
+
)
|
|
88
|
+
});
|
|
89
|
+
const nodeTypeSchema = union(
|
|
90
|
+
literal("connection"),
|
|
91
|
+
literal("join"),
|
|
92
|
+
literal("fan-out"),
|
|
93
|
+
literal("fan-in"),
|
|
94
|
+
literal("terminus")
|
|
95
|
+
);
|
|
96
|
+
const nodeCostEventJSONSchema = object({
|
|
97
|
+
type: literal("node-cost"),
|
|
98
|
+
attemptNumber: number().optional(),
|
|
99
|
+
nodeType: nodeTypeSchema,
|
|
100
|
+
node: string(),
|
|
101
|
+
branchPattern: array(number()),
|
|
102
|
+
downstreamChildSelectivity: number(),
|
|
103
|
+
costEstimate: costEstimateJSONSchema,
|
|
104
|
+
filters: conditionSchema.optional(),
|
|
105
|
+
ordering: orderingSchema.optional(),
|
|
106
|
+
joinType: joinTypeSchema.optional()
|
|
107
|
+
});
|
|
108
|
+
const nodeConstraintEventJSONSchema = object({
|
|
109
|
+
type: literal("node-constraint"),
|
|
110
|
+
attemptNumber: number().optional(),
|
|
111
|
+
nodeType: nodeTypeSchema,
|
|
112
|
+
node: string(),
|
|
113
|
+
branchPattern: array(number()),
|
|
114
|
+
constraint: union(plannerConstraintSchema, _null()).optional(),
|
|
115
|
+
from: string()
|
|
116
|
+
});
|
|
117
|
+
const planDebugEventJSONSchema = union(
|
|
118
|
+
attemptStartEventJSONSchema,
|
|
119
|
+
connectionCostsEventJSONSchema,
|
|
120
|
+
connectionSelectedEventJSONSchema,
|
|
121
|
+
constraintsPropagatedEventJSONSchema,
|
|
122
|
+
planCompleteEventJSONSchema,
|
|
123
|
+
planFailedEventJSONSchema,
|
|
124
|
+
bestPlanSelectedEventJSONSchema,
|
|
125
|
+
nodeCostEventJSONSchema,
|
|
126
|
+
nodeConstraintEventJSONSchema
|
|
127
|
+
);
|
|
8
128
|
const analyzeQueryResultSchema = object({
|
|
9
129
|
warnings: array(string()),
|
|
10
130
|
syncedRows: record(array(rowSchema)).optional(),
|
|
@@ -22,10 +142,16 @@ const analyzeQueryResultSchema = object({
|
|
|
22
142
|
readRows: rowsBySourceSchema.optional(),
|
|
23
143
|
readRowCountsByQuery: rowCountsBySourceSchema.optional(),
|
|
24
144
|
readRowCount: number().optional(),
|
|
25
|
-
dbScansByQuery: rowCountsBySourceSchema.optional()
|
|
145
|
+
dbScansByQuery: rowCountsBySourceSchema.optional(),
|
|
146
|
+
plannerEvents: array(planDebugEventJSONSchema).optional()
|
|
26
147
|
});
|
|
27
148
|
export {
|
|
28
149
|
analyzeQueryResultSchema,
|
|
150
|
+
attemptStartEventJSONSchema,
|
|
151
|
+
bestPlanSelectedEventJSONSchema,
|
|
152
|
+
connectionSelectedEventJSONSchema,
|
|
153
|
+
nodeConstraintEventJSONSchema,
|
|
154
|
+
planFailedEventJSONSchema,
|
|
29
155
|
rowCountsByQuerySchema,
|
|
30
156
|
rowCountsBySourceSchema,
|
|
31
157
|
rowsByQuerySchema,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analyze-query-result.js","sources":["../../../../zero-protocol/src/analyze-query-result.ts"],"sourcesContent":["import * as v from '../../shared/src/valita.ts';\n\nimport {rowSchema} from './data.ts';\n\nexport const rowCountsByQuerySchema = v.record(v.number());\nexport type RowCountsByQuery = v.Infer<typeof rowCountsByQuerySchema>;\n\nexport const rowCountsBySourceSchema = v.record(rowCountsByQuerySchema);\nexport type RowCountsBySource = v.Infer<typeof rowCountsBySourceSchema>;\n\nexport const rowsByQuerySchema = v.record(v.array(rowSchema));\nexport type RowsByQuery = v.Infer<typeof rowsByQuerySchema>;\n\nexport const rowsBySourceSchema = v.record(rowsByQuerySchema);\nexport type RowsBySource = v.Infer<typeof rowsBySourceSchema>;\n\nexport const analyzeQueryResultSchema = v.object({\n warnings: v.array(v.string()),\n syncedRows: v.record(v.array(rowSchema)).optional(),\n syncedRowCount: v.number(),\n start: v.number(),\n /** @deprecated Use start + elapsed instead */\n end: v.number(),\n elapsed: v.number().optional(),\n afterPermissions: v.string().optional(),\n /** @deprecated Use readRowCountsByQuery */\n vendedRowCounts: rowCountsBySourceSchema.optional(),\n /** @deprecated Use readRows */\n vendedRows: rowsBySourceSchema.optional(),\n plans: v.record(v.array(v.string())).optional(),\n readRows: rowsBySourceSchema.optional(),\n readRowCountsByQuery: rowCountsBySourceSchema.optional(),\n readRowCount: v.number().optional(),\n dbScansByQuery: rowCountsBySourceSchema.optional(),\n});\n\nexport type AnalyzeQueryResult = v.Infer<typeof analyzeQueryResultSchema>;\n"],"names":["v.record","v.number","v.array","v.object","v.string"],"mappings":"
|
|
1
|
+
{"version":3,"file":"analyze-query-result.js","sources":["../../../../zero-protocol/src/analyze-query-result.ts"],"sourcesContent":["import * as v from '../../shared/src/valita.ts';\n\nimport {conditionSchema, orderingSchema} from './ast.ts';\nimport {rowSchema} from './data.ts';\n\nexport const rowCountsByQuerySchema = v.record(v.number());\nexport type RowCountsByQuery = v.Infer<typeof rowCountsByQuerySchema>;\n\nexport const rowCountsBySourceSchema = v.record(rowCountsByQuerySchema);\nexport type RowCountsBySource = v.Infer<typeof rowCountsBySourceSchema>;\n\nexport const rowsByQuerySchema = v.record(v.array(rowSchema));\nexport type RowsByQuery = v.Infer<typeof rowsByQuerySchema>;\n\nexport const rowsBySourceSchema = v.record(rowsByQuerySchema);\nexport type RowsBySource = v.Infer<typeof rowsBySourceSchema>;\n\n// Planner debug event schemas\n\nconst costEstimateJSONSchema = v.object({\n startupCost: v.number(),\n scanEst: v.number(),\n cost: v.number(),\n returnedRows: v.number(),\n selectivity: v.number(),\n limit: v.number().optional(),\n});\n\nconst plannerConstraintSchema = v.record(v.union(v.unknown(), v.null()));\n\nconst attemptStartEventJSONSchema = v.object({\n type: v.literal('attempt-start'),\n attemptNumber: v.number(),\n totalAttempts: v.number(),\n});\n\nconst connectionCostsEventJSONSchema = v.object({\n type: v.literal('connection-costs'),\n attemptNumber: v.number(),\n costs: v.array(\n v.object({\n connection: v.string(),\n cost: v.number(),\n costEstimate: costEstimateJSONSchema,\n pinned: v.boolean(),\n constraints: v.record(v.union(plannerConstraintSchema, v.null())),\n constraintCosts: v.record(costEstimateJSONSchema),\n }),\n ),\n});\n\nconst connectionSelectedEventJSONSchema = v.object({\n type: v.literal('connection-selected'),\n attemptNumber: v.number(),\n connection: v.string(),\n cost: v.number(),\n isRoot: v.boolean(),\n});\n\nconst constraintsPropagatedEventJSONSchema = v.object({\n type: v.literal('constraints-propagated'),\n attemptNumber: v.number(),\n connectionConstraints: v.array(\n v.object({\n connection: v.string(),\n constraints: v.record(v.union(plannerConstraintSchema, v.null())),\n constraintCosts: v.record(costEstimateJSONSchema),\n }),\n ),\n});\n\nconst joinTypeSchema = v.union(\n v.literal('semi'),\n v.literal('flipped'),\n v.literal('unflippable'),\n);\n\nconst planCompleteEventJSONSchema = v.object({\n type: v.literal('plan-complete'),\n attemptNumber: v.number(),\n totalCost: v.number(),\n flipPattern: v.number(),\n joinStates: v.array(\n v.object({\n join: v.string(),\n type: joinTypeSchema,\n }),\n ),\n});\n\nconst planFailedEventJSONSchema = v.object({\n type: v.literal('plan-failed'),\n attemptNumber: v.number(),\n reason: v.string(),\n});\n\nconst bestPlanSelectedEventJSONSchema = v.object({\n type: v.literal('best-plan-selected'),\n bestAttemptNumber: v.number(),\n totalCost: v.number(),\n flipPattern: v.number(),\n joinStates: v.array(\n v.object({\n join: v.string(),\n type: joinTypeSchema,\n }),\n ),\n});\n\nconst nodeTypeSchema = v.union(\n v.literal('connection'),\n v.literal('join'),\n v.literal('fan-out'),\n v.literal('fan-in'),\n v.literal('terminus'),\n);\n\nconst nodeCostEventJSONSchema = v.object({\n type: v.literal('node-cost'),\n attemptNumber: v.number().optional(),\n nodeType: nodeTypeSchema,\n node: v.string(),\n branchPattern: v.array(v.number()),\n downstreamChildSelectivity: v.number(),\n costEstimate: costEstimateJSONSchema,\n filters: conditionSchema.optional(),\n ordering: orderingSchema.optional(),\n joinType: joinTypeSchema.optional(),\n});\n\nconst nodeConstraintEventJSONSchema = v.object({\n type: v.literal('node-constraint'),\n attemptNumber: v.number().optional(),\n nodeType: nodeTypeSchema,\n node: v.string(),\n branchPattern: v.array(v.number()),\n constraint: v.union(plannerConstraintSchema, v.null()).optional(),\n from: v.string(),\n});\n\nconst planDebugEventJSONSchema = v.union(\n attemptStartEventJSONSchema,\n connectionCostsEventJSONSchema,\n connectionSelectedEventJSONSchema,\n constraintsPropagatedEventJSONSchema,\n planCompleteEventJSONSchema,\n planFailedEventJSONSchema,\n bestPlanSelectedEventJSONSchema,\n nodeCostEventJSONSchema,\n nodeConstraintEventJSONSchema,\n);\n\nexport type PlanDebugEventJSON = v.Infer<typeof planDebugEventJSONSchema>;\n\nexport {\n attemptStartEventJSONSchema,\n connectionSelectedEventJSONSchema,\n planFailedEventJSONSchema,\n bestPlanSelectedEventJSONSchema,\n nodeConstraintEventJSONSchema,\n};\n\nexport const analyzeQueryResultSchema = v.object({\n warnings: v.array(v.string()),\n syncedRows: v.record(v.array(rowSchema)).optional(),\n syncedRowCount: v.number(),\n start: v.number(),\n /** @deprecated Use start + elapsed instead */\n end: v.number(),\n elapsed: v.number().optional(),\n afterPermissions: v.string().optional(),\n /** @deprecated Use readRowCountsByQuery */\n vendedRowCounts: rowCountsBySourceSchema.optional(),\n /** @deprecated Use readRows */\n vendedRows: rowsBySourceSchema.optional(),\n plans: v.record(v.array(v.string())).optional(),\n readRows: rowsBySourceSchema.optional(),\n readRowCountsByQuery: rowCountsBySourceSchema.optional(),\n readRowCount: v.number().optional(),\n dbScansByQuery: rowCountsBySourceSchema.optional(),\n plannerEvents: v.array(planDebugEventJSONSchema).optional(),\n});\n\nexport type AnalyzeQueryResult = v.Infer<typeof analyzeQueryResultSchema>;\n"],"names":["v.record","v.number","v.array","v.object","v.union","v.unknown","v.null","v.literal","v.string","v.boolean"],"mappings":";;;;AAKO,MAAM,yBAAyBA,OAASC,QAAU;AAGlD,MAAM,0BAA0BD,OAAS,sBAAsB;AAG/D,MAAM,oBAAoBA,OAASE,MAAQ,SAAS,CAAC;AAGrD,MAAM,qBAAqBF,OAAS,iBAAiB;AAK5D,MAAM,yBAAyBG,OAAS;AAAA,EACtC,aAAaF,OAAE;AAAA,EACf,SAASA,OAAE;AAAA,EACX,MAAMA,OAAE;AAAA,EACR,cAAcA,OAAE;AAAA,EAChB,aAAaA,OAAE;AAAA,EACf,OAAOA,OAAE,EAAS,SAAA;AACpB,CAAC;AAED,MAAM,0BAA0BD,OAASI,MAAQC,QAAE,GAAWC,MAAE,CAAM,CAAC;AAEvE,MAAM,8BAA8BH,OAAS;AAAA,EAC3C,MAAMI,QAAU,eAAe;AAAA,EAC/B,eAAeN,OAAE;AAAA,EACjB,eAAeA,OAAE;AACnB,CAAC;AAED,MAAM,iCAAiCE,OAAS;AAAA,EAC9C,MAAMI,QAAU,kBAAkB;AAAA,EAClC,eAAeN,OAAE;AAAA,EACjB,OAAOC;AAAAA,IACLC,OAAS;AAAA,MACP,YAAYK,OAAE;AAAA,MACd,MAAMP,OAAE;AAAA,MACR,cAAc;AAAA,MACd,QAAQQ,QAAE;AAAA,MACV,aAAaT,OAASI,MAAQ,yBAAyBE,MAAE,CAAM,CAAC;AAAA,MAChE,iBAAiBN,OAAS,sBAAsB;AAAA,IAAA,CACjD;AAAA,EAAA;AAEL,CAAC;AAED,MAAM,oCAAoCG,OAAS;AAAA,EACjD,MAAMI,QAAU,qBAAqB;AAAA,EACrC,eAAeN,OAAE;AAAA,EACjB,YAAYO,OAAE;AAAA,EACd,MAAMP,OAAE;AAAA,EACR,QAAQQ,QAAE;AAC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,wBAAwB,SAAA;AAAA,EACxC,eAAeC,MAAQ,wBAAwB,EAAE,SAAA;AACnD,CAAC;"}
|
|
@@ -55,7 +55,7 @@ export declare const correlatedSubquerySchemaOmitSubquery: v.ObjectType<Readonly
|
|
|
55
55
|
childField: v.Type<CompoundKey>;
|
|
56
56
|
}>, undefined>;
|
|
57
57
|
hidden: v.Optional<boolean>;
|
|
58
|
-
system: v.Optional<"
|
|
58
|
+
system: v.Optional<"permissions" | "client" | "test">;
|
|
59
59
|
}>, undefined>;
|
|
60
60
|
export declare const correlatedSubquerySchema: v.Type<CorrelatedSubquery>;
|
|
61
61
|
export declare const astSchema: v.Type<AST>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connect.d.ts","sourceRoot":"","sources":["../../../../zero-protocol/src/connect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,4BAA4B,CAAC;AAKhD;;;;;;GAMG;AAEH,eAAO,MAAM,mBAAmB;;;aAG9B,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;eAGjC,CAAC;AAEH,QAAA,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"connect.d.ts","sourceRoot":"","sources":["../../../../zero-protocol/src/connect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,4BAA4B,CAAC;AAKhD;;;;;;GAMG;AAEH,eAAO,MAAM,mBAAmB;;;aAG9B,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;eAGjC,CAAC;AAEH,QAAA,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAa5B;;;;;OAKG;;aAEH,CAAC;AAEH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IATtC;;;;;OAKG;;eAOH,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC1E,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,wBAAgB,kBAAkB,CAChC,qBAAqB,EAAE,qBAAqB,GAAG,SAAS,EACxD,SAAS,EAAE,MAAM,GAAG,SAAS,GAC5B,MAAM,CAgBR;AAED,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,GAAG;IACvD,qBAAqB,EAAE,qBAAqB,GAAG,SAAS,CAAC;IACzD,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;CAC/B,CAIA"}
|
|
@@ -13,6 +13,10 @@ const connectedMessageSchema = tuple([
|
|
|
13
13
|
]);
|
|
14
14
|
const initConnectionBodySchema = object({
|
|
15
15
|
desiredQueriesPatch: upQueriesPatchSchema,
|
|
16
|
+
// As the schema can be large, client only sends when it does not have a
|
|
17
|
+
// server snapshot (i.e. a snapshot with a cookie). Once it has a server
|
|
18
|
+
// snapshot it will assume the zero-cache already has the schema for this
|
|
19
|
+
// client's client group in the CVR store.
|
|
16
20
|
clientSchema: clientSchemaSchema.optional(),
|
|
17
21
|
deleted: deleteClientsBodySchema.optional(),
|
|
18
22
|
// parameters to configure the mutate endpoint
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connect.js","sources":["../../../../zero-protocol/src/connect.ts"],"sourcesContent":["import * as v from '../../shared/src/valita.ts';\nimport {clientSchemaSchema} from './client-schema.ts';\nimport {deleteClientsBodySchema} from './delete-clients.ts';\nimport {upQueriesPatchSchema} from './queries-patch.ts';\n\n/**\n * After opening a websocket the client waits for a `connected` message\n * from the server. It then sends an `initConnection` message to the\n * server. The server waits for the `initConnection` message before\n * beginning to send pokes to the newly connected client, so as to avoid\n * syncing lots of queries which are no longer desired by the client.\n */\n\nexport const connectedBodySchema = v.object({\n wsid: v.string(),\n timestamp: v.number().optional(),\n});\n\nexport const connectedMessageSchema = v.tuple([\n v.literal('connected'),\n connectedBodySchema,\n]);\n\nconst initConnectionBodySchema = v.object({\n desiredQueriesPatch: upQueriesPatchSchema,\n clientSchema: clientSchemaSchema.optional(),\n deleted: deleteClientsBodySchema.optional(),\n // parameters to configure the mutate endpoint\n userPushURL: v.string().optional(),\n // parameters to configure the query endpoint\n userQueryURL: v.string().optional(),\n\n /**\n * `activeClients` is an optional array of client IDs that are currently active\n * in the client group. This is used to inform the server about the clients\n * that are currently active (aka running, aka alive), so it can inactive\n * queries from inactive clients.\n */\n activeClients: v.array(v.string()).optional(),\n});\n\nexport const initConnectionMessageSchema = v.tuple([\n v.literal('initConnection'),\n initConnectionBodySchema,\n]);\n\nexport type ConnectedBody = v.Infer<typeof connectedBodySchema>;\nexport type ConnectedMessage = v.Infer<typeof connectedMessageSchema>;\nexport type InitConnectionBody = v.Infer<typeof initConnectionBodySchema>;\nexport type InitConnectionMessage = v.Infer<typeof initConnectionMessageSchema>;\n\nexport function encodeSecProtocols(\n initConnectionMessage: InitConnectionMessage | undefined,\n authToken: string | undefined,\n): string {\n const protocols = {\n initConnectionMessage,\n authToken,\n };\n // WS sec protocols needs to be URI encoded. To save space, we base64 encode\n // the JSON before URI encoding it. But InitConnectionMessage can contain\n // arbitrary unicode strings, so we need to encode the JSON as UTF-8 first.\n // Phew!\n const bytes = new TextEncoder().encode(JSON.stringify(protocols));\n\n // Convert bytes to string without spreading all bytes as arguments\n // to avoid \"Maximum call stack size exceeded\" error with large data\n const s = Array.from(bytes, byte => String.fromCharCode(byte)).join('');\n\n return encodeURIComponent(btoa(s));\n}\n\nexport function decodeSecProtocols(secProtocol: string): {\n initConnectionMessage: InitConnectionMessage | undefined;\n authToken: string | undefined;\n} {\n const binString = atob(decodeURIComponent(secProtocol));\n const bytes = Uint8Array.from(binString, c => c.charCodeAt(0));\n return JSON.parse(new TextDecoder().decode(bytes));\n}\n"],"names":["v.object","v.string","v.number","v.tuple","v.literal","v.array"],"mappings":";;;;;AAaO,MAAM,sBAAsBA,OAAS;AAAA,EAC1C,MAAMC,OAAE;AAAA,EACR,WAAWC,OAAE,EAAS,SAAA;AACxB,CAAC;AAEM,MAAM,yBAAyBC,MAAQ;AAAA,EAC5CC,QAAU,WAAW;AAAA,EACrB;AACF,CAAC;AAED,MAAM,2BAA2BJ,OAAS;AAAA,EACxC,qBAAqB;AAAA,
|
|
1
|
+
{"version":3,"file":"connect.js","sources":["../../../../zero-protocol/src/connect.ts"],"sourcesContent":["import * as v from '../../shared/src/valita.ts';\nimport {clientSchemaSchema} from './client-schema.ts';\nimport {deleteClientsBodySchema} from './delete-clients.ts';\nimport {upQueriesPatchSchema} from './queries-patch.ts';\n\n/**\n * After opening a websocket the client waits for a `connected` message\n * from the server. It then sends an `initConnection` message to the\n * server. The server waits for the `initConnection` message before\n * beginning to send pokes to the newly connected client, so as to avoid\n * syncing lots of queries which are no longer desired by the client.\n */\n\nexport const connectedBodySchema = v.object({\n wsid: v.string(),\n timestamp: v.number().optional(),\n});\n\nexport const connectedMessageSchema = v.tuple([\n v.literal('connected'),\n connectedBodySchema,\n]);\n\nconst initConnectionBodySchema = v.object({\n desiredQueriesPatch: upQueriesPatchSchema,\n // As the schema can be large, client only sends when it does not have a\n // server snapshot (i.e. a snapshot with a cookie). Once it has a server\n // snapshot it will assume the zero-cache already has the schema for this\n // client's client group in the CVR store.\n clientSchema: clientSchemaSchema.optional(),\n deleted: deleteClientsBodySchema.optional(),\n // parameters to configure the mutate endpoint\n userPushURL: v.string().optional(),\n // parameters to configure the query endpoint\n userQueryURL: v.string().optional(),\n\n /**\n * `activeClients` is an optional array of client IDs that are currently active\n * in the client group. This is used to inform the server about the clients\n * that are currently active (aka running, aka alive), so it can inactive\n * queries from inactive clients.\n */\n activeClients: v.array(v.string()).optional(),\n});\n\nexport const initConnectionMessageSchema = v.tuple([\n v.literal('initConnection'),\n initConnectionBodySchema,\n]);\n\nexport type ConnectedBody = v.Infer<typeof connectedBodySchema>;\nexport type ConnectedMessage = v.Infer<typeof connectedMessageSchema>;\nexport type InitConnectionBody = v.Infer<typeof initConnectionBodySchema>;\nexport type InitConnectionMessage = v.Infer<typeof initConnectionMessageSchema>;\n\nexport function encodeSecProtocols(\n initConnectionMessage: InitConnectionMessage | undefined,\n authToken: string | undefined,\n): string {\n const protocols = {\n initConnectionMessage,\n authToken,\n };\n // WS sec protocols needs to be URI encoded. To save space, we base64 encode\n // the JSON before URI encoding it. But InitConnectionMessage can contain\n // arbitrary unicode strings, so we need to encode the JSON as UTF-8 first.\n // Phew!\n const bytes = new TextEncoder().encode(JSON.stringify(protocols));\n\n // Convert bytes to string without spreading all bytes as arguments\n // to avoid \"Maximum call stack size exceeded\" error with large data\n const s = Array.from(bytes, byte => String.fromCharCode(byte)).join('');\n\n return encodeURIComponent(btoa(s));\n}\n\nexport function decodeSecProtocols(secProtocol: string): {\n initConnectionMessage: InitConnectionMessage | undefined;\n authToken: string | undefined;\n} {\n const binString = atob(decodeURIComponent(secProtocol));\n const bytes = Uint8Array.from(binString, c => c.charCodeAt(0));\n return JSON.parse(new TextDecoder().decode(bytes));\n}\n"],"names":["v.object","v.string","v.number","v.tuple","v.literal","v.array"],"mappings":";;;;;AAaO,MAAM,sBAAsBA,OAAS;AAAA,EAC1C,MAAMC,OAAE;AAAA,EACR,WAAWC,OAAE,EAAS,SAAA;AACxB,CAAC;AAEM,MAAM,yBAAyBC,MAAQ;AAAA,EAC5CC,QAAU,WAAW;AAAA,EACrB;AACF,CAAC;AAED,MAAM,2BAA2BJ,OAAS;AAAA,EACxC,qBAAqB;AAAA;AAAA;AAAA;AAAA;AAAA,EAKrB,cAAc,mBAAmB,SAAA;AAAA,EACjC,SAAS,wBAAwB,SAAA;AAAA;AAAA,EAEjC,aAAaC,OAAE,EAAS,SAAA;AAAA;AAAA,EAExB,cAAcA,OAAE,EAAS,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQzB,eAAeI,MAAQJ,OAAE,CAAQ,EAAE,SAAA;AACrC,CAAC;AAEM,MAAM,8BAA8BE,MAAQ;AAAA,EACjDC,QAAU,gBAAgB;AAAA,EAC1B;AACF,CAAC;AAOM,SAAS,mBACd,uBACA,WACQ;AACR,QAAM,YAAY;AAAA,IAChB;AAAA,IACA;AAAA,EAAA;AAMF,QAAM,QAAQ,IAAI,YAAA,EAAc,OAAO,KAAK,UAAU,SAAS,CAAC;AAIhE,QAAM,IAAI,MAAM,KAAK,OAAO,CAAA,SAAQ,OAAO,aAAa,IAAI,CAAC,EAAE,KAAK,EAAE;AAEtE,SAAO,mBAAmB,KAAK,CAAC,CAAC;AACnC;AAEO,SAAS,mBAAmB,aAGjC;AACA,QAAM,YAAY,KAAK,mBAAmB,WAAW,CAAC;AACtD,QAAM,QAAQ,WAAW,KAAK,WAAW,OAAK,EAAE,WAAW,CAAC,CAAC;AAC7D,SAAO,KAAK,MAAM,IAAI,cAAc,OAAO,KAAK,CAAC;AACnD;"}
|
|
@@ -105,7 +105,7 @@ export declare const transformResponseMessageSchema: v.UnionType<[v.TupleType<[v
|
|
|
105
105
|
details: v.Optional<import("../../shared/src/json.ts").ReadonlyJSONValue>;
|
|
106
106
|
queryIDs: v.ArrayType<v.Type<string>>;
|
|
107
107
|
message: v.Type<string>;
|
|
108
|
-
}, "
|
|
108
|
+
}, "reason" | "status" | "origin" | "bodyPreview"> & {
|
|
109
109
|
origin: v.Type<"zeroCache">;
|
|
110
110
|
reason: v.Type<"http">;
|
|
111
111
|
status: v.Type<number>;
|